[
  {
    "path": ".gitignore",
    "content": "# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\n\n# Compiled Dynamic libraries\n*.so\n*.dylib\n*.dll\n\n# Compiled Static libraries\n*.lai\n*.la\n*.a\n*.lib\n\n# User files\n*.pro.user\n.directory\n\n# Executables\n*.exe\n"
  },
  {
    "path": "DroidSM_Font_License.txt",
    "content": "Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"[]\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright [yyyy] [name of copyright owner]\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License."
  },
  {
    "path": "ICON_AUTHOR",
    "content": "Author of \"nx.ico\" and \"nx_icon_48.png\" images is ~Doctor-Cool: http://doctor-cool.deviantart.com/\n\nGallery:\nhttp://doctor-cool.deviantart.com/art/Cave-Story-Icons-Compilation-283589292\n"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<http://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<http://www.gnu.org/philosophy/why-not-lgpl.html>.\n"
  },
  {
    "path": "Makefile.dingux",
    "content": "#############################################################################\n# Makefile for building: NXEngine (OpenDingux/Dingux devices) \n# More build information can be found here: https://github.com/EXL/NXEngine.git\n# Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013\n# Fixed by EXL on: 11/9/2013\n#############################################################################\n\n####### Compiler, tools and options\n\n# Please uncomment \"-D_L10N_CP1251\" for Russian Localization\nCC            = mipsel-linux-gcc\nCXX           = mipsel-linux-g++\nDEFINES       = -D_320X240 -D_DINGUX -D_SDL_MIXER # -D_L10N_CP1251\nCFLAGS        = -pipe -mips32 -O2 -mabi=32 -msoft-float -ffast-math -G0 $(DEFINES)\nCXXFLAGS      = -pipe -mips32 -O2 -O2 -mabi=32 -msoft-float -ffast-math -G0 $(DEFINES)\nINCPATH       = -I/opt/mipsel-linux-uclibc/usr/include -I/opt/mipsel-linux-uclibc/usr/include/SDL -I.\nLINK          = mipsel-linux-g++\nLFLAGS        = -Wl,-O1 -Wl,-rpath,/opt/mipsel-linux-uclibc/usr/lib\nLIBS          = -lSDLmain -lSDL -lSDL_ttf -lSDL_mixer \nSTRIP         = mipsel-linux-strip\nDEL_FILE      = rm -f\n\n####### Output directory\n\nOBJECTS_DIR   = ./\n\n####### Files\n\nSOURCES =\tcaret.cpp \\\n\t\t\tconsole.cpp \\\n\t\t\tdebug.cpp \\\n\t\t\tfloattext.cpp \\\n\t\t\tgame.cpp \\\n\t\t\tinput.cpp \\\n\t\t\tinventory.cpp \\\n\t\t\tmain.cpp \\\n\t\t\tmap.cpp \\\n\t\t\tmap_system.cpp \\\n\t\t\tniku.cpp \\\n\t\t\tobject.cpp \\\n\t\t\tObjManager.cpp \\\n\t\t\tp_arms.cpp \\\n\t\t\tplatform.cpp \\\n\t\t\tplayer.cpp \\\n\t\t\tplayerstats.cpp \\\n\t\t\tprofile.cpp \\\n\t\t\treplay.cpp \\\n\t\t\tscreeneffect.cpp \\\n\t\t\tsettings.cpp \\\n\t\t\tslope.cpp \\\n\t\t\tstageboss.cpp \\\n\t\t\tstagedata.cpp \\\n\t\t\tstatusbar.cpp \\\n\t\t\ttrig.cpp \\\n\t\t\ttsc.cpp \\\n\t\t\tai/ai.cpp \\\n\t\t\tai/balrog_common.cpp \\\n\t\t\tai/IrregularBBox.cpp \\\n\t\t\tautogen/AssignSprites.cpp \\\n\t\t\tautogen/objnames.cpp \\\n\t\t\tcommon/BList.cpp \\\n\t\t\tcommon/bufio.cpp \\\n\t\t\tcommon/DBuffer.cpp \\\n\t\t\tcommon/DString.cpp \\\n\t\t\tcommon/FileBuffer.cpp \\\n\t\t\tcommon/InitList.cpp \\\n\t\t\tcommon/misc_comm.cpp \\\n\t\t\tcommon/stat.cpp \\\n\t\t\tcommon/StringList.cpp \\\n\t\t\tendgame/credits.cpp \\\n\t\t\tendgame/CredReader.cpp \\\n\t\t\tendgame/island.cpp \\\n\t\t\tendgame/misc_end.cpp \\\n\t\t\textract/crc.cpp \\\n\t\t\textract/extract.cpp \\\n\t\t\textract/extractfiles.cpp \\\n\t\t\textract/extractpxt.cpp \\\n\t\t\textract/extractstages.cpp \\\n\t\t\tgraphics/font.cpp \\\n\t\t\tgraphics/graphics.cpp \\\n\t\t\tgraphics/nxsurface.cpp \\\n\t\t\tgraphics/palette.cpp \\\n\t\t\tgraphics/safemode.cpp \\\n\t\t\tgraphics/sprites.cpp \\\n\t\t\tgraphics/tileset.cpp \\\n\t\t\tintro/intro.cpp \\\n\t\t\tintro/title.cpp \\\n\t\t\tpause/dialog.cpp \\\n\t\t\tpause/message.cpp \\\n\t\t\tpause/objects.cpp \\\n\t\t\tpause/options.cpp \\\n\t\t\tpause/pause.cpp \\\n\t\t\tsiflib/sectSprites.cpp \\\n\t\t\tsiflib/sectStringArray.cpp \\\n\t\t\tsiflib/sif.cpp \\\n\t\t\tsiflib/sifloader.cpp \\\n\t\t\tsound/org.cpp \\\n\t\t\tsound/pxt.cpp \\\n\t\t\tsound/sound.cpp \\\n\t\t\tsound/sslib.cpp \\\n\t\t\tTextBox/ItemImage.cpp \\\n\t\t\tTextBox/SaveSelect.cpp \\\n\t\t\tTextBox/StageSelect.cpp \\\n\t\t\tTextBox/TextBox.cpp \\\n\t\t\tTextBox/YesNoPrompt.cpp \\\n\t\t\tai/almond/almond.cpp \\\n\t\t\tai/boss/balfrog.cpp \\\n\t\t\tai/boss/ballos.cpp \\\n\t\t\tai/boss/core.cpp \\\n\t\t\tai/boss/heavypress.cpp \\\n\t\t\tai/boss/ironhead.cpp \\\n\t\t\tai/boss/omega.cpp \\\n\t\t\tai/boss/sisters.cpp \\\n\t\t\tai/boss/undead_core.cpp \\\n\t\t\tai/boss/x.cpp \\\n\t\t\tai/egg/egg.cpp \\\n\t\t\tai/egg/egg2.cpp \\\n\t\t\tai/egg/igor.cpp \\\n\t\t\tai/final_battle/balcony.cpp \\\n\t\t\tai/final_battle/doctor.cpp \\\n\t\t\tai/final_battle/doctor_common.cpp \\\n\t\t\tai/final_battle/doctor_frenzied.cpp \\\n\t\t\tai/final_battle/final_misc.cpp \\\n\t\t\tai/final_battle/misery_battle.cpp \\\n\t\t\tai/final_battle/sidekicks.cpp \\\n\t\t\tai/first_cave/first_cave.cpp \\\n\t\t\tai/hell/ballos_misc.cpp \\\n\t\t\tai/hell/ballos_priest.cpp \\\n\t\t\tai/hell/hell.cpp \\\n\t\t\tai/last_cave/last_cave.cpp \\\n\t\t\tai/maze/balrog_boss_missiles.cpp \\\n\t\t\tai/maze/critter_purple.cpp \\\n\t\t\tai/maze/gaudi.cpp \\\n\t\t\tai/maze/labyrinth_m.cpp \\\n\t\t\tai/maze/maze.cpp \\\n\t\t\tai/maze/pooh_black.cpp \\\n\t\t\tai/npc/balrog.cpp \\\n\t\t\tai/npc/curly.cpp \\\n\t\t\tai/npc/curly_ai.cpp \\\n\t\t\tai/npc/misery_ai.cpp \\\n\t\t\tai/npc/npcguest.cpp \\\n\t\t\tai/npc/npcplayer.cpp \\\n\t\t\tai/npc/npcregu.cpp \\\n\t\t\tai/oside/oside.cpp \\\n\t\t\tai/plantation/plantation.cpp \\\n\t\t\tai/sand/curly_boss.cpp \\\n\t\t\tai/sand/puppy.cpp \\\n\t\t\tai/sand/sand.cpp \\\n\t\t\tai/sand/toroko_frenzied.cpp \\\n\t\t\tai/sym/smoke.cpp \\\n\t\t\tai/sym/sym.cpp \\\n\t\t\tai/village/balrog_boss_running.cpp \\\n\t\t\tai/village/ma_pignon.cpp \\\n\t\t\tai/village/village.cpp \\\n\t\t\tai/weapons/blade.cpp \\\n\t\t\tai/weapons/bubbler.cpp \\\n\t\t\tai/weapons/fireball.cpp \\\n\t\t\tai/weapons/missile.cpp \\\n\t\t\tai/weapons/nemesis.cpp \\\n\t\t\tai/weapons/polar_mgun.cpp \\\n\t\t\tai/weapons/snake.cpp \\\n\t\t\tai/weapons/spur.cpp \\\n\t\t\tai/weapons/weapons.cpp \\\n\t\t\tai/weapons/whimstar.cpp \\\n\t\t\tai/weed/balrog_boss_flying.cpp \\\n\t\t\tai/weed/frenzied_mimiga.cpp \\\n\t\t\tai/weed/weed.cpp \\\n\t\t\tplatform/Linux/vbesync.c \n\t\t\t\nOBJECTS =\tcaret.o \\\n\t\t\tconsole.o \\\n\t\t\tdebug.o \\\n\t\t\tfloattext.o \\\n\t\t\tgame.o \\\n\t\t\tinput.o \\\n\t\t\tinventory.o \\\n\t\t\tmain.o \\\n\t\t\tmap.o \\\n\t\t\tmap_system.o \\\n\t\t\tniku.o \\\n\t\t\tobject.o \\\n\t\t\tObjManager.o \\\n\t\t\tp_arms.o \\\n\t\t\tplatform.o \\\n\t\t\tplayer.o \\\n\t\t\tplayerstats.o \\\n\t\t\tprofile.o \\\n\t\t\treplay.o \\\n\t\t\tscreeneffect.o \\\n\t\t\tsettings.o \\\n\t\t\tslope.o \\\n\t\t\tstageboss.o \\\n\t\t\tstagedata.o \\\n\t\t\tstatusbar.o \\\n\t\t\ttrig.o \\\n\t\t\ttsc.o \\\n\t\t\tai.o \\\n\t\t\tbalrog_common.o \\\n\t\t\tIrregularBBox.o \\\n\t\t\tAssignSprites.o \\\n\t\t\tobjnames.o \\\n\t\t\tBList.o \\\n\t\t\tbufio.o \\\n\t\t\tDBuffer.o \\\n\t\t\tDString.o \\\n\t\t\tFileBuffer.o \\\n\t\t\tInitList.o \\\n\t\t\tmisc_comm.o \\\n\t\t\tstat.o \\\n\t\t\tStringList.o \\\n\t\t\tcredits.o \\\n\t\t\tCredReader.o \\\n\t\t\tisland.o \\\n\t\t\tmisc_end.o \\\n\t\t\tcrc.o \\\n\t\t\textract.o \\\n\t\t\textractfiles.o \\\n\t\t\textractpxt.o \\\n\t\t\textractstages.o \\\n\t\t\tfont.o \\\n\t\t\tgraphics.o \\\n\t\t\tnxsurface.o \\\n\t\t\tpalette.o \\\n\t\t\tsafemode.o \\\n\t\t\tsprites.o \\\n\t\t\ttileset.o \\\n\t\t\tintro.o \\\n\t\t\ttitle.o \\\n\t\t\tdialog.o \\\n\t\t\tmessage.o \\\n\t\t\tobjects.o \\\n\t\t\toptions.o \\\n\t\t\tpause.o \\\n\t\t\tsectSprites.o \\\n\t\t\tsectStringArray.o \\\n\t\t\tsif.o \\\n\t\t\tsifloader.o \\\n\t\t\torg.o \\\n\t\t\tpxt.o \\\n\t\t\tsound.o \\\n\t\t\tsslib.o \\\n\t\t\tItemImage.o \\\n\t\t\tSaveSelect.o \\\n\t\t\tStageSelect.o \\\n\t\t\tTextBox.o \\\n\t\t\tYesNoPrompt.o \\\n\t\t\talmond.o \\\n\t\t\tbalfrog.o \\\n\t\t\tballos.o \\\n\t\t\tcore.o \\\n\t\t\theavypress.o \\\n\t\t\tironhead.o \\\n\t\t\tomega.o \\\n\t\t\tsisters.o \\\n\t\t\tundead_core.o \\\n\t\t\tx.o \\\n\t\t\tegg.o \\\n\t\t\tegg2.o \\\n\t\t\tigor.o \\\n\t\t\tbalcony.o \\\n\t\t\tdoctor.o \\\n\t\t\tdoctor_common.o \\\n\t\t\tdoctor_frenzied.o \\\n\t\t\tfinal_misc.o \\\n\t\t\tmisery_battle.o \\\n\t\t\tsidekicks.o \\\n\t\t\tfirst_cave.o \\\n\t\t\tballos_misc.o \\\n\t\t\tballos_priest.o \\\n\t\t\thell.o \\\n\t\t\tlast_cave.o \\\n\t\t\tbalrog_boss_missiles.o \\\n\t\t\tcritter_purple.o \\\n\t\t\tgaudi.o \\\n\t\t\tlabyrinth_m.o \\\n\t\t\tmaze.o \\\n\t\t\tpooh_black.o \\\n\t\t\tbalrog.o \\\n\t\t\tcurly.o \\\n\t\t\tcurly_ai.o \\\n\t\t\tmisery_ai.o \\\n\t\t\tnpcguest.o \\\n\t\t\tnpcplayer.o \\\n\t\t\tnpcregu.o \\\n\t\t\toside.o \\\n\t\t\tplantation.o \\\n\t\t\tcurly_boss.o \\\n\t\t\tpuppy.o \\\n\t\t\tsand.o \\\n\t\t\ttoroko_frenzied.o \\\n\t\t\tsmoke.o \\\n\t\t\tsym.o \\\n\t\t\tbalrog_boss_running.o \\\n\t\t\tma_pignon.o \\\n\t\t\tvillage.o \\\n\t\t\tblade.o \\\n\t\t\tbubbler.o \\\n\t\t\tfireball.o \\\n\t\t\tmissile.o \\\n\t\t\tnemesis.o \\\n\t\t\tpolar_mgun.o \\\n\t\t\tsnake.o \\\n\t\t\tspur.o \\\n\t\t\tweapons.o \\\n\t\t\twhimstar.o \\\n\t\t\tbalrog_boss_flying.o \\\n\t\t\tfrenzied_mimiga.o \\\n\t\t\tweed.o \\\n\t\t\tvbesync.o \n\t\t\t\nTARGET        = nx.dge\n\nfirst: all\n####### Implicit rules\n\n.SUFFIXES: .o .c .cpp .cc .cxx .C\n\n.cpp.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cc.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cxx.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.C.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.c.o:\n\t$(CC) -c $(CFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n####### Build rules\n\nall: $(TARGET)\n\n$(TARGET):  $(OBJECTS)  \n\t$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)\n\t$(STRIP) $(TARGET)\n\nclean: \n\t-$(DEL_FILE) $(OBJECTS)\n\t-$(DEL_FILE) *~ core *.core\n\n####### Sub-libraries\n\ndistclean: clean\n\t-$(DEL_FILE) $(TARGET) \n\n####### Compile\n\ncaret.o: caret.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tcaret.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp\n\nconsole.o: console.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tconsole.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp\n\ndebug.o: debug.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tdebug.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp\n\nfloattext.o: floattext.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tfloattext.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp\n\ngame.o: game.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tintro/intro.h \\\n\t\tintro/title.h \\\n\t\tpause/pause.h \\\n\t\tpause/options.h \\\n\t\tinventory.h \\\n\t\tmap_system.h \\\n\t\tprofile.h \\\n\t\tgame.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp\n\ninput.o: input.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinput.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp\n\ninventory.o: inventory.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinventory.h \\\n\t\tinventory.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp\n\nmain.o: main.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tmain.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp\n\nmap.o: map.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp\n\nmap_system.o: map_system.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap_system.h \\\n\t\tmap_system.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp\n\nniku.o: niku.cpp niku.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp\n\nobject.o: object.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tobject.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp\n\nObjManager.o: ObjManager.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tObjManager.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp\n\np_arms.o: p_arms.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tp_arms.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp\n\nplatform.o: platform.cpp config.h \\\n\t\tplatform.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp\n\nplayer.o: player.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp\n\nplayerstats.o: playerstats.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayerstats.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp\n\nprofile.o: profile.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tprofile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp\n\nreplay.o: replay.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\treplay.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp\n\nscreeneffect.o: screeneffect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tscreeneffect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp\n\nsettings.o: settings.cpp settings.h \\\n\t\tinput.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tsettings.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp\n\nslope.o: slope.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tslope.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp\n\nstageboss.o: stageboss.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstageboss.fdh \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/ballos.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp\n\nstagedata.o: stagedata.cpp stagedata.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp\n\nstatusbar.o: statusbar.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstatusbar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp\n\ntrig.o: trig.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\ttrig.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp\n\ntsc.o: tsc.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tvararray.h \\\n\t\ttsc.fdh \\\n\t\ttsc_cmdtbl.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp\n\nai.o: ai/ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp\n\nbalrog_common.o: ai/balrog_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp\n\nIrregularBBox.o: ai/IrregularBBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/IrregularBBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp\n\nAssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp\n\nobjnames.o: autogen/objnames.cpp \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp\n\nBList.o: common/BList.cpp common/BList.h \\\n\t\tcommon/SupportDefs.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp\n\nbufio.o: common/bufio.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp\n\nDBuffer.o: common/DBuffer.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp\n\nDString.o: common/DString.cpp common/DString.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp\n\nFileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp\n\nInitList.o: common/InitList.cpp common/InitList.h \\\n\t\tcommon/InitList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp\n\nmisc_comm.o: common/misc_comm.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp\n\nstat.o: common/stat.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp\n\nStringList.o: common/StringList.cpp common/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp\n\ncredits.o: endgame/credits.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/credits.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp\n\nCredReader.o: endgame/CredReader.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/CredReader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp\n\nisland.o: endgame/island.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp\n\nmisc_end.o: endgame/misc_end.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp\n\ncrc.o: extract/crc.cpp extract/crc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp\n\nextract.o: extract/extract.cpp graphics/safemode.h \\\n\t\textract/extract.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp\n\nextractfiles.o: extract/extractfiles.cpp common/basics.h \\\n\t\tgraphics/safemode.h \\\n\t\textract/extractfiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp\n\nextractpxt.o: extract/extractpxt.cpp graphics/safemode.h \\\n\t\tcommon/basics.h \\\n\t\textract/extractpxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp\n\nextractstages.o: extract/extractstages.cpp graphics/safemode.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/basics.h \\\n\t\tstagedata.h \\\n\t\tmaprecord.h \\\n\t\textract/extractstages.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp\n\nfont.o: graphics/font.cpp config.h \\\n\t\tnx.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/font.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp\n\ngraphics.o: graphics/graphics.cpp config.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tdirnames.h \\\n\t\tgraphics/graphics.fdh \\\n\t\tl10n_strings.h \\\n\t\tnx_icon.h \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp\n\nnxsurface.o: graphics/nxsurface.cpp settings.h \\\n\t\tinput.h \\\n\t\tconfig.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/nxsurface.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp\n\npalette.o: graphics/palette.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/palette.h \\\n\t\tgraphics/palette.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp\n\nsafemode.o: graphics/safemode.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tgraphics/safemode.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp\n\nsprites.o: graphics/sprites.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tautogen/sprites.h \\\n\t\tcommon/StringList.h \\\n\t\tdirnames.h \\\n\t\tsettings.h \\\n\t\tinput.h \\\n\t\tgraphics/sprites.h \\\n\t\tgraphics/sprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp\n\ntileset.o: graphics/tileset.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/tileset.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp\n\nintro.o: intro/intro.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/stdai.h \\\n\t\tintro/intro.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp\n\ntitle.o: intro/title.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tintro/title.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp\n\ndialog.o: pause/dialog.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/dialog.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp\n\nmessage.o: pause/message.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/message.h \\\n\t\tpause/options.h \\\n\t\tpause/message.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp\n\nobjects.o: pause/objects.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tpause/options.h \\\n\t\tpause/objects.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp\n\noptions.o: pause/options.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.h \\\n\t\tpause/message.h \\\n\t\tl10n_strings.h \\\n\t\tpause/options.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp\n\npause.o: pause/pause.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/pause.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp\n\nsectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sectSprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp\n\nsectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sectStringArray.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp\n\nsif.o: siflib/sif.cpp siflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sif.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp\n\nsifloader.o: siflib/sifloader.cpp siflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sifloader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp\n\norg.o: sound/org.cpp common/basics.h \\\n\t\tsound/org.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sslib.h \\\n\t\tsound/org.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp\n\npxt.o: sound/pxt.cpp sound/pxt.h \\\n\t\tcommon/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/pxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp\n\nsound.o: sound/sound.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp\n\nsslib.o: sound/sslib.cpp common/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/sslib.fdh \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp\n\nItemImage.o: TextBox/ItemImage.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/ItemImage.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp\n\nSaveSelect.o: TextBox/SaveSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tinventory.h \\\n\t\tTextBox/SaveSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp\n\nStageSelect.o: TextBox/StageSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/StageSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp\n\nTextBox.o: TextBox/TextBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/TextBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp\n\nYesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/YesNoPrompt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp\n\nalmond.o: ai/almond/almond.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/almond/almond.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp\n\nbalfrog.o: ai/boss/balfrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/balfrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp\n\nballos.o: ai/boss/ballos.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ballos.h \\\n\t\tai/boss/ballos.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp\n\ncore.o: ai/boss/core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp\n\nheavypress.o: ai/boss/heavypress.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/heavypress.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp\n\nironhead.o: ai/boss/ironhead.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/ironhead.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp\n\nomega.o: ai/boss/omega.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/omega.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp\n\nsisters.o: ai/boss/sisters.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/sisters.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp\n\nundead_core.o: ai/boss/undead_core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/undead_core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp\n\nx.o: ai/boss/x.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/x.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp\n\negg.o: ai/egg/egg.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp\n\negg2.o: ai/egg/egg2.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh \\\n\t\tai/egg/egg2.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp\n\nigor.o: ai/egg/igor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/igor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp\n\nbalcony.o: ai/final_battle/balcony.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/balcony.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp\n\ndoctor.o: ai/final_battle/doctor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp\n\ndoctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp\n\ndoctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp\n\nfinal_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/final_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp\n\nmisery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp\n\nsidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/sidekicks.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp\n\nfirst_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/first_cave/first_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp\n\nballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp\n\nballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_priest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp\n\nhell.o: ai/hell/hell.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/hell.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp\n\nlast_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/plantation/plantation.fdh \\\n\t\tai/sym/sym.fdh \\\n\t\tai/last_cave/last_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp\n\nbalrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/maze/balrog_boss_missiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp\n\ncritter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/critter_purple.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp\n\ngaudi.o: ai/maze/gaudi.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/gaudi.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp\n\nlabyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/labyrinth_m.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp\n\nmaze.o: ai/maze/maze.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/maze.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp\n\npooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/pooh_black.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp\n\nbalrog.o: ai/npc/balrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/balrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp\n\ncurly.o: ai/npc/curly.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp\n\ncurly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly_ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp\n\nmisery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp\n\nnpcguest.o: ai/npc/npcguest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcguest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp\n\nnpcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp\n\nnpcregu.o: ai/npc/npcregu.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/npc/npcregu.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp\n\noside.o: ai/oside/oside.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/sand.fdh \\\n\t\tai/oside/oside.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp\n\nplantation.o: ai/plantation/plantation.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh \\\n\t\tai/plantation/plantation.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp\n\ncurly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/curly_boss.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp\n\npuppy.o: ai/sand/puppy.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp\n\nsand.o: ai/sand/sand.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/egg.fdh \\\n\t\tai/sand/sand.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp\n\ntoroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/toroko_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp\n\nsmoke.o: ai/sym/smoke.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/smoke.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp\n\nsym.o: ai/sym/sym.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/sym.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp\n\nbalrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/village/balrog_boss_running.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp\n\nma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/village/ma_pignon.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp\n\nvillage.o: ai/village/village.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/village/village.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp\n\nblade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/blade.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp\n\nbubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/bubbler.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp\n\nfireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/fireball.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp\n\nmissile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/missile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp\n\nnemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/nemesis.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp\n\npolar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/polar_mgun.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp\n\nsnake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/snake.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp\n\nspur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/spur.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp\n\nweapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/weapons.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp\n\nwhimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/whimstar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp\n\nbalrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/balrog_boss_flying.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp\n\nfrenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/frenzied_mimiga.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp\n\nweed.o: ai/weed/weed.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp\n\nvbesync.o: platform/Linux/vbesync.c \n\t$(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c\n\n####### Install\n\ninstall:   FORCE\n\nuninstall:   FORCE\n\nFORCE:\n\n"
  },
  {
    "path": "Makefile.ezx",
    "content": "#############################################################################\n# Makefile for building: NXEngine (Motorola MotoEZX phones) \n# More build information can be found here: https://github.com/EXL/NXEngine.git\n# Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013\n# Fixed by EXL on: 11/9/2013\n#############################################################################\n\n####### Compiler, tools and options\n\n# Please uncomment \"-D_L10N_CP1251\" for Russian Localization\nCC            = arm-linux-gnu-gcc\nCXX           = arm-linux-gnu-g++\nDEFINES       = -D_320X240 -D_MOTOEZX -D_SDL_MIXER # -D_L10N_CP1251\nCFLAGS        = `sdl-config --cflags` -pipe -O2 -mcpu=iwmmxt -mtune=iwmmxt -march=iwmmxt -marm $(DEFINES)\nCXXFLAGS      = `sdl-config --cflags` -pipe -O2 -mcpu=iwmmxt -mtune=iwmmxt -march=iwmmxt -marm $(DEFINES)\nINCPATH       = -I/opt/toolchains/motoezx/include -I/opt/toolchains/motoezx/include/SDL -I.\nLINK          = arm-linux-gnu-g++\nLFLAGS        = -Wl,-O1 -Wl,-rpath,/opt/toolchains/motoezx/lib\nLIBS          = `sdl-config --libs` -lSDL_mixer -lSDL_ttf -lstdc++ -lm -lfreetype \nSTRIP         = arm-linux-gnu-strip\nDEL_FILE      = rm -f\n\n####### Output directory\n\nOBJECTS_DIR   = ./\n\n####### Files\n\nSOURCES = \tcaret.cpp \\\n\t\t\tconsole.cpp \\\n\t\t\tdebug.cpp \\\n\t\t\tfloattext.cpp \\\n\t\t\tgame.cpp \\\n\t\t\tinput.cpp \\\n\t\t\tinventory.cpp \\\n\t\t\tmain.cpp \\\n\t\t\tmap.cpp \\\n\t\t\tmap_system.cpp \\\n\t\t\tniku.cpp \\\n\t\t\tobject.cpp \\\n\t\t\tObjManager.cpp \\\n\t\t\tp_arms.cpp \\\n\t\t\tplatform.cpp \\\n\t\t\tplayer.cpp \\\n\t\t\tplayerstats.cpp \\\n\t\t\tprofile.cpp \\\n\t\t\treplay.cpp \\\n\t\t\tscreeneffect.cpp \\\n\t\t\tsettings.cpp \\\n\t\t\tslope.cpp \\\n\t\t\tstageboss.cpp \\\n\t\t\tstagedata.cpp \\\n\t\t\tstatusbar.cpp \\\n\t\t\ttrig.cpp \\\n\t\t\ttsc.cpp \\\n\t\t\tai/ai.cpp \\\n\t\t\tai/balrog_common.cpp \\\n\t\t\tai/IrregularBBox.cpp \\\n\t\t\tautogen/AssignSprites.cpp \\\n\t\t\tautogen/objnames.cpp \\\n\t\t\tcommon/BList.cpp \\\n\t\t\tcommon/bufio.cpp \\\n\t\t\tcommon/DBuffer.cpp \\\n\t\t\tcommon/DString.cpp \\\n\t\t\tcommon/FileBuffer.cpp \\\n\t\t\tcommon/InitList.cpp \\\n\t\t\tcommon/misc_comm.cpp \\\n\t\t\tcommon/stat.cpp \\\n\t\t\tcommon/StringList.cpp \\\n\t\t\tendgame/credits.cpp \\\n\t\t\tendgame/CredReader.cpp \\\n\t\t\tendgame/island.cpp \\\n\t\t\tendgame/misc_end.cpp \\\n\t\t\textract/crc.cpp \\\n\t\t\textract/extract.cpp \\\n\t\t\textract/extractfiles.cpp \\\n\t\t\textract/extractpxt.cpp \\\n\t\t\textract/extractstages.cpp \\\n\t\t\tgraphics/font.cpp \\\n\t\t\tgraphics/graphics.cpp \\\n\t\t\tgraphics/nxsurface.cpp \\\n\t\t\tgraphics/palette.cpp \\\n\t\t\tgraphics/safemode.cpp \\\n\t\t\tgraphics/sprites.cpp \\\n\t\t\tgraphics/tileset.cpp \\\n\t\t\tintro/intro.cpp \\\n\t\t\tintro/title.cpp \\\n\t\t\tpause/dialog.cpp \\\n\t\t\tpause/message.cpp \\\n\t\t\tpause/objects.cpp \\\n\t\t\tpause/options.cpp \\\n\t\t\tpause/pause.cpp \\\n\t\t\tsiflib/sectSprites.cpp \\\n\t\t\tsiflib/sectStringArray.cpp \\\n\t\t\tsiflib/sif.cpp \\\n\t\t\tsiflib/sifloader.cpp \\\n\t\t\tsound/org.cpp \\\n\t\t\tsound/pxt.cpp \\\n\t\t\tsound/sound.cpp \\\n\t\t\tsound/sslib.cpp \\\n\t\t\tTextBox/ItemImage.cpp \\\n\t\t\tTextBox/SaveSelect.cpp \\\n\t\t\tTextBox/StageSelect.cpp \\\n\t\t\tTextBox/TextBox.cpp \\\n\t\t\tTextBox/YesNoPrompt.cpp \\\n\t\t\tai/almond/almond.cpp \\\n\t\t\tai/boss/balfrog.cpp \\\n\t\t\tai/boss/ballos.cpp \\\n\t\t\tai/boss/core.cpp \\\n\t\t\tai/boss/heavypress.cpp \\\n\t\t\tai/boss/ironhead.cpp \\\n\t\t\tai/boss/omega.cpp \\\n\t\t\tai/boss/sisters.cpp \\\n\t\t\tai/boss/undead_core.cpp \\\n\t\t\tai/boss/x.cpp \\\n\t\t\tai/egg/egg.cpp \\\n\t\t\tai/egg/egg2.cpp \\\n\t\t\tai/egg/igor.cpp \\\n\t\t\tai/final_battle/balcony.cpp \\\n\t\t\tai/final_battle/doctor.cpp \\\n\t\t\tai/final_battle/doctor_common.cpp \\\n\t\t\tai/final_battle/doctor_frenzied.cpp \\\n\t\t\tai/final_battle/final_misc.cpp \\\n\t\t\tai/final_battle/misery_battle.cpp \\\n\t\t\tai/final_battle/sidekicks.cpp \\\n\t\t\tai/first_cave/first_cave.cpp \\\n\t\t\tai/hell/ballos_misc.cpp \\\n\t\t\tai/hell/ballos_priest.cpp \\\n\t\t\tai/hell/hell.cpp \\\n\t\t\tai/last_cave/last_cave.cpp \\\n\t\t\tai/maze/balrog_boss_missiles.cpp \\\n\t\t\tai/maze/critter_purple.cpp \\\n\t\t\tai/maze/gaudi.cpp \\\n\t\t\tai/maze/labyrinth_m.cpp \\\n\t\t\tai/maze/maze.cpp \\\n\t\t\tai/maze/pooh_black.cpp \\\n\t\t\tai/npc/balrog.cpp \\\n\t\t\tai/npc/curly.cpp \\\n\t\t\tai/npc/curly_ai.cpp \\\n\t\t\tai/npc/misery_ai.cpp \\\n\t\t\tai/npc/npcguest.cpp \\\n\t\t\tai/npc/npcplayer.cpp \\\n\t\t\tai/npc/npcregu.cpp \\\n\t\t\tai/oside/oside.cpp \\\n\t\t\tai/plantation/plantation.cpp \\\n\t\t\tai/sand/curly_boss.cpp \\\n\t\t\tai/sand/puppy.cpp \\\n\t\t\tai/sand/sand.cpp \\\n\t\t\tai/sand/toroko_frenzied.cpp \\\n\t\t\tai/sym/smoke.cpp \\\n\t\t\tai/sym/sym.cpp \\\n\t\t\tai/village/balrog_boss_running.cpp \\\n\t\t\tai/village/ma_pignon.cpp \\\n\t\t\tai/village/village.cpp \\\n\t\t\tai/weapons/blade.cpp \\\n\t\t\tai/weapons/bubbler.cpp \\\n\t\t\tai/weapons/fireball.cpp \\\n\t\t\tai/weapons/missile.cpp \\\n\t\t\tai/weapons/nemesis.cpp \\\n\t\t\tai/weapons/polar_mgun.cpp \\\n\t\t\tai/weapons/snake.cpp \\\n\t\t\tai/weapons/spur.cpp \\\n\t\t\tai/weapons/weapons.cpp \\\n\t\t\tai/weapons/whimstar.cpp \\\n\t\t\tai/weed/balrog_boss_flying.cpp \\\n\t\t\tai/weed/frenzied_mimiga.cpp \\\n\t\t\tai/weed/weed.cpp \\\n\t\t\tplatform/Linux/vbesync.c \\\n\t\t\tplatform/EZX/EZX_SDL_PollEvent.cpp\n\t\t\t\nOBJECTS =\tcaret.o \\\n\t\t\tconsole.o \\\n\t\t\tdebug.o \\\n\t\t\tfloattext.o \\\n\t\t\tgame.o \\\n\t\t\tinput.o \\\n\t\t\tinventory.o \\\n\t\t\tmain.o \\\n\t\t\tmap.o \\\n\t\t\tmap_system.o \\\n\t\t\tniku.o \\\n\t\t\tobject.o \\\n\t\t\tObjManager.o \\\n\t\t\tp_arms.o \\\n\t\t\tplatform.o \\\n\t\t\tplayer.o \\\n\t\t\tplayerstats.o \\\n\t\t\tprofile.o \\\n\t\t\treplay.o \\\n\t\t\tscreeneffect.o \\\n\t\t\tsettings.o \\\n\t\t\tslope.o \\\n\t\t\tstageboss.o \\\n\t\t\tstagedata.o \\\n\t\t\tstatusbar.o \\\n\t\t\ttrig.o \\\n\t\t\ttsc.o \\\n\t\t\tai.o \\\n\t\t\tbalrog_common.o \\\n\t\t\tIrregularBBox.o \\\n\t\t\tAssignSprites.o \\\n\t\t\tobjnames.o \\\n\t\t\tBList.o \\\n\t\t\tbufio.o \\\n\t\t\tDBuffer.o \\\n\t\t\tDString.o \\\n\t\t\tFileBuffer.o \\\n\t\t\tInitList.o \\\n\t\t\tmisc_comm.o \\\n\t\t\tstat.o \\\n\t\t\tStringList.o \\\n\t\t\tcredits.o \\\n\t\t\tCredReader.o \\\n\t\t\tisland.o \\\n\t\t\tmisc_end.o \\\n\t\t\tcrc.o \\\n\t\t\textract.o \\\n\t\t\textractfiles.o \\\n\t\t\textractpxt.o \\\n\t\t\textractstages.o \\\n\t\t\tfont.o \\\n\t\t\tgraphics.o \\\n\t\t\tnxsurface.o \\\n\t\t\tpalette.o \\\n\t\t\tsafemode.o \\\n\t\t\tsprites.o \\\n\t\t\ttileset.o \\\n\t\t\tintro.o \\\n\t\t\ttitle.o \\\n\t\t\tdialog.o \\\n\t\t\tmessage.o \\\n\t\t\tobjects.o \\\n\t\t\toptions.o \\\n\t\t\tpause.o \\\n\t\t\tsectSprites.o \\\n\t\t\tsectStringArray.o \\\n\t\t\tsif.o \\\n\t\t\tsifloader.o \\\n\t\t\torg.o \\\n\t\t\tpxt.o \\\n\t\t\tsound.o \\\n\t\t\tsslib.o \\\n\t\t\tItemImage.o \\\n\t\t\tSaveSelect.o \\\n\t\t\tStageSelect.o \\\n\t\t\tTextBox.o \\\n\t\t\tYesNoPrompt.o \\\n\t\t\talmond.o \\\n\t\t\tbalfrog.o \\\n\t\t\tballos.o \\\n\t\t\tcore.o \\\n\t\t\theavypress.o \\\n\t\t\tironhead.o \\\n\t\t\tomega.o \\\n\t\t\tsisters.o \\\n\t\t\tundead_core.o \\\n\t\t\tx.o \\\n\t\t\tegg.o \\\n\t\t\tegg2.o \\\n\t\t\tigor.o \\\n\t\t\tbalcony.o \\\n\t\t\tdoctor.o \\\n\t\t\tdoctor_common.o \\\n\t\t\tdoctor_frenzied.o \\\n\t\t\tfinal_misc.o \\\n\t\t\tmisery_battle.o \\\n\t\t\tsidekicks.o \\\n\t\t\tfirst_cave.o \\\n\t\t\tballos_misc.o \\\n\t\t\tballos_priest.o \\\n\t\t\thell.o \\\n\t\t\tlast_cave.o \\\n\t\t\tbalrog_boss_missiles.o \\\n\t\t\tcritter_purple.o \\\n\t\t\tgaudi.o \\\n\t\t\tlabyrinth_m.o \\\n\t\t\tmaze.o \\\n\t\t\tpooh_black.o \\\n\t\t\tbalrog.o \\\n\t\t\tcurly.o \\\n\t\t\tcurly_ai.o \\\n\t\t\tmisery_ai.o \\\n\t\t\tnpcguest.o \\\n\t\t\tnpcplayer.o \\\n\t\t\tnpcregu.o \\\n\t\t\toside.o \\\n\t\t\tplantation.o \\\n\t\t\tcurly_boss.o \\\n\t\t\tpuppy.o \\\n\t\t\tsand.o \\\n\t\t\ttoroko_frenzied.o \\\n\t\t\tsmoke.o \\\n\t\t\tsym.o \\\n\t\t\tbalrog_boss_running.o \\\n\t\t\tma_pignon.o \\\n\t\t\tvillage.o \\\n\t\t\tblade.o \\\n\t\t\tbubbler.o \\\n\t\t\tfireball.o \\\n\t\t\tmissile.o \\\n\t\t\tnemesis.o \\\n\t\t\tpolar_mgun.o \\\n\t\t\tsnake.o \\\n\t\t\tspur.o \\\n\t\t\tweapons.o \\\n\t\t\twhimstar.o \\\n\t\t\tbalrog_boss_flying.o \\\n\t\t\tfrenzied_mimiga.o \\\n\t\t\tweed.o \\\n\t\t\tvbesync.o \\\n\t\t\tEZX_SDL_PollEvent.o\n\t\t\t\nTARGET        = nx.ezx\n\nfirst: all\n####### Implicit rules\n\n.SUFFIXES: .o .c .cpp .cc .cxx .C\n\n.cpp.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cc.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cxx.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.C.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.c.o:\n\t$(CC) -c $(CFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n####### Build rules\n\nall: $(TARGET)\n\n$(TARGET):  $(OBJECTS)  \n\t$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)\n\t$(STRIP) $(TARGET)\n\nclean:\n\t-$(DEL_FILE) $(OBJECTS)\n\t-$(DEL_FILE) *~ core *.core\n\n####### Sub-libraries\n\ndistclean: clean\n\t-$(DEL_FILE) $(TARGET) \n\n####### Compile\n\ncaret.o: caret.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tcaret.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp\n\nconsole.o: console.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tconsole.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp\n\ndebug.o: debug.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tdebug.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp\n\nfloattext.o: floattext.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tfloattext.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp\n\ngame.o: game.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tintro/intro.h \\\n\t\tintro/title.h \\\n\t\tpause/pause.h \\\n\t\tpause/options.h \\\n\t\tinventory.h \\\n\t\tmap_system.h \\\n\t\tprofile.h \\\n\t\tgame.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp\n\ninput.o: input.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinput.fdh \\\n\t\tplatform/EZX/EZX_SDL_PollEvent.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp\n\ninventory.o: inventory.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinventory.h \\\n\t\tinventory.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp\n\nmain.o: main.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tmain.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp\n\nmap.o: map.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp\n\nmap_system.o: map_system.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap_system.h \\\n\t\tmap_system.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp\n\nniku.o: niku.cpp niku.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp\n\nobject.o: object.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tobject.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp\n\nObjManager.o: ObjManager.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tObjManager.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp\n\np_arms.o: p_arms.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tp_arms.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp\n\nplatform.o: platform.cpp config.h \\\n\t\tplatform.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp\n\nplayer.o: player.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp\n\nplayerstats.o: playerstats.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayerstats.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp\n\nprofile.o: profile.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tprofile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp\n\nreplay.o: replay.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\treplay.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp\n\nscreeneffect.o: screeneffect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tscreeneffect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp\n\nsettings.o: settings.cpp settings.h \\\n\t\tinput.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tsettings.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp\n\nslope.o: slope.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tslope.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp\n\nstageboss.o: stageboss.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstageboss.fdh \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/ballos.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp\n\nstagedata.o: stagedata.cpp stagedata.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp\n\nstatusbar.o: statusbar.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstatusbar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp\n\ntrig.o: trig.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\ttrig.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp\n\ntsc.o: tsc.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tvararray.h \\\n\t\ttsc.fdh \\\n\t\ttsc_cmdtbl.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp\n\nai.o: ai/ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp\n\nbalrog_common.o: ai/balrog_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp\n\nIrregularBBox.o: ai/IrregularBBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/IrregularBBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp\n\nAssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp\n\nobjnames.o: autogen/objnames.cpp \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp\n\nBList.o: common/BList.cpp common/BList.h \\\n\t\tcommon/SupportDefs.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp\n\nbufio.o: common/bufio.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp\n\nDBuffer.o: common/DBuffer.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp\n\nDString.o: common/DString.cpp common/DString.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp\n\nFileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp\n\nInitList.o: common/InitList.cpp common/InitList.h \\\n\t\tcommon/InitList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp\n\nmisc_comm.o: common/misc_comm.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp\n\nstat.o: common/stat.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp\n\nStringList.o: common/StringList.cpp common/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp\n\ncredits.o: endgame/credits.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/credits.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp\n\nCredReader.o: endgame/CredReader.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/CredReader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp\n\nisland.o: endgame/island.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp\n\nmisc_end.o: endgame/misc_end.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp\n\ncrc.o: extract/crc.cpp extract/crc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp\n\nextract.o: extract/extract.cpp graphics/safemode.h \\\n\t\textract/extract.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp\n\nextractfiles.o: extract/extractfiles.cpp common/basics.h \\\n\t\tgraphics/safemode.h \\\n\t\textract/extractfiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp\n\nextractpxt.o: extract/extractpxt.cpp graphics/safemode.h \\\n\t\tcommon/basics.h \\\n\t\textract/extractpxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp\n\nextractstages.o: extract/extractstages.cpp graphics/safemode.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/basics.h \\\n\t\tstagedata.h \\\n\t\tmaprecord.h \\\n\t\textract/extractstages.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp\n\nfont.o: graphics/font.cpp config.h \\\n\t\tnx.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/font.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp\n\ngraphics.o: graphics/graphics.cpp config.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tdirnames.h \\\n\t\tgraphics/graphics.fdh \\\n\t\tl10n_strings.h \\\n\t\tnx_icon.h \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp\n\nnxsurface.o: graphics/nxsurface.cpp settings.h \\\n\t\tinput.h \\\n\t\tconfig.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/nxsurface.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp\n\npalette.o: graphics/palette.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/palette.h \\\n\t\tgraphics/palette.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp\n\nsafemode.o: graphics/safemode.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tgraphics/safemode.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp\n\nsprites.o: graphics/sprites.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tautogen/sprites.h \\\n\t\tcommon/StringList.h \\\n\t\tdirnames.h \\\n\t\tsettings.h \\\n\t\tinput.h \\\n\t\tgraphics/sprites.h \\\n\t\tgraphics/sprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp\n\ntileset.o: graphics/tileset.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/tileset.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp\n\nintro.o: intro/intro.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/stdai.h \\\n\t\tintro/intro.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp\n\ntitle.o: intro/title.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tintro/title.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp\n\ndialog.o: pause/dialog.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/dialog.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp\n\nmessage.o: pause/message.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/message.h \\\n\t\tpause/options.h \\\n\t\tpause/message.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp\n\nobjects.o: pause/objects.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tpause/options.h \\\n\t\tpause/objects.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp\n\noptions.o: pause/options.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.h \\\n\t\tpause/message.h \\\n\t\tl10n_strings.h \\\n\t\tpause/options.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp\n\npause.o: pause/pause.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/pause.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp\n\nsectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sectSprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp\n\nsectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sectStringArray.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp\n\nsif.o: siflib/sif.cpp siflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sif.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp\n\nsifloader.o: siflib/sifloader.cpp siflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sifloader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp\n\norg.o: sound/org.cpp common/basics.h \\\n\t\tsound/org.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sslib.h \\\n\t\tsound/org.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp\n\npxt.o: sound/pxt.cpp sound/pxt.h \\\n\t\tcommon/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/pxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp\n\nsound.o: sound/sound.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp\n\nsslib.o: sound/sslib.cpp common/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/sslib.fdh \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp\n\nItemImage.o: TextBox/ItemImage.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/ItemImage.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp\n\nSaveSelect.o: TextBox/SaveSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tinventory.h \\\n\t\tTextBox/SaveSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp\n\nStageSelect.o: TextBox/StageSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/StageSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp\n\nTextBox.o: TextBox/TextBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/TextBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp\n\nYesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/YesNoPrompt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp\n\nalmond.o: ai/almond/almond.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/almond/almond.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp\n\nbalfrog.o: ai/boss/balfrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/balfrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp\n\nballos.o: ai/boss/ballos.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ballos.h \\\n\t\tai/boss/ballos.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp\n\ncore.o: ai/boss/core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp\n\nheavypress.o: ai/boss/heavypress.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/heavypress.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp\n\nironhead.o: ai/boss/ironhead.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/ironhead.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp\n\nomega.o: ai/boss/omega.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/omega.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp\n\nsisters.o: ai/boss/sisters.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/sisters.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp\n\nundead_core.o: ai/boss/undead_core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/undead_core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp\n\nx.o: ai/boss/x.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/x.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp\n\negg.o: ai/egg/egg.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp\n\negg2.o: ai/egg/egg2.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh \\\n\t\tai/egg/egg2.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp\n\nigor.o: ai/egg/igor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/igor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp\n\nbalcony.o: ai/final_battle/balcony.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/balcony.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp\n\ndoctor.o: ai/final_battle/doctor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp\n\ndoctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp\n\ndoctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp\n\nfinal_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/final_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp\n\nmisery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp\n\nsidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/sidekicks.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp\n\nfirst_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/first_cave/first_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp\n\nballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp\n\nballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_priest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp\n\nhell.o: ai/hell/hell.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/hell.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp\n\nlast_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/plantation/plantation.fdh \\\n\t\tai/sym/sym.fdh \\\n\t\tai/last_cave/last_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp\n\nbalrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/maze/balrog_boss_missiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp\n\ncritter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/critter_purple.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp\n\ngaudi.o: ai/maze/gaudi.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/gaudi.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp\n\nlabyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/labyrinth_m.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp\n\nmaze.o: ai/maze/maze.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/maze.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp\n\npooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/pooh_black.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp\n\nbalrog.o: ai/npc/balrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/balrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp\n\ncurly.o: ai/npc/curly.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp\n\ncurly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly_ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp\n\nmisery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp\n\nnpcguest.o: ai/npc/npcguest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcguest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp\n\nnpcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp\n\nnpcregu.o: ai/npc/npcregu.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/npc/npcregu.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp\n\noside.o: ai/oside/oside.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/sand.fdh \\\n\t\tai/oside/oside.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp\n\nplantation.o: ai/plantation/plantation.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh \\\n\t\tai/plantation/plantation.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp\n\ncurly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/curly_boss.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp\n\npuppy.o: ai/sand/puppy.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp\n\nsand.o: ai/sand/sand.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/egg.fdh \\\n\t\tai/sand/sand.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp\n\ntoroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/toroko_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp\n\nsmoke.o: ai/sym/smoke.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/smoke.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp\n\nsym.o: ai/sym/sym.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/sym.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp\n\nbalrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/village/balrog_boss_running.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp\n\nma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/village/ma_pignon.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp\n\nvillage.o: ai/village/village.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/village/village.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp\n\nblade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/blade.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp\n\nbubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/bubbler.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp\n\nfireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/fireball.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp\n\nmissile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/missile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp\n\nnemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/nemesis.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp\n\npolar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/polar_mgun.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp\n\nsnake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/snake.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp\n\nspur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/spur.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp\n\nweapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/weapons.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp\n\nwhimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/whimstar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp\n\nbalrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/balrog_boss_flying.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp\n\nfrenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/frenzied_mimiga.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp\n\nweed.o: ai/weed/weed.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp\n\nvbesync.o: platform/Linux/vbesync.c \n\t$(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c\n\nEZX_SDL_PollEvent.o: platform/EZX/EZX_SDL_PollEvent.cpp platform/EZX/EZX_SDL_PollEvent.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o EZX_SDL_PollEvent.o platform/EZX/EZX_SDL_PollEvent.cpp\n\n####### Install\n\ninstall:   FORCE\n\nuninstall:   FORCE\n\nFORCE:\n\n"
  },
  {
    "path": "Makefile.haiku",
    "content": "#############################################################################\n# Makefile for building: NXEngine (32/64-bits Haiku OS)\n# More build information can be found here: https://github.com/EXL/NXEngine.git\n# Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013\n# Fixed by EXL on: 10/1/2018\n#############################################################################\n\n####### Compiler, tools and options\n\n# Use \"setarch x86\" command on Haiku OS 32 bit\n# Use make DEFINES=\"-D_L10N_CP1251\" -f Makefile.haiku for Russian Localization\nCC            = gcc\nCXX           = g++\nCFLAGS        = -pipe -O2 -D__GNUC_RH_RELEASE__ $(DEFINES)\nCXXFLAGS      = -pipe -O2 -D__GNUC_RH_RELEASE__ $(DEFINES)\nINCPATH       = $(shell sdl-config --cflags) -I.\nLINK          = g++\nLFLAGS        = -Wl,-O1\nLIBS_SHARED   = $(shell sdl-config --libs) -lSDL_ttf -lfreetype\nSTRIP         = strip -s\nDEL_FILE      = rm -f\n\n####### Output directory\n\nOBJECTS_DIR   = ./\n\n####### Files\n\nSOURCES =\tcaret.cpp \\\n\t\t\tconsole.cpp \\\n\t\t\tdebug.cpp \\\n\t\t\tfloattext.cpp \\\n\t\t\tgame.cpp \\\n\t\t\tinput.cpp \\\n\t\t\tinventory.cpp \\\n\t\t\tmain.cpp \\\n\t\t\tmap.cpp \\\n\t\t\tmap_system.cpp \\\n\t\t\tniku.cpp \\\n\t\t\tobject.cpp \\\n\t\t\tObjManager.cpp \\\n\t\t\tp_arms.cpp \\\n\t\t\tplatform.cpp \\\n\t\t\tplayer.cpp \\\n\t\t\tplayerstats.cpp \\\n\t\t\tprofile.cpp \\\n\t\t\treplay.cpp \\\n\t\t\tscreeneffect.cpp \\\n\t\t\tsettings.cpp \\\n\t\t\tslope.cpp \\\n\t\t\tstageboss.cpp \\\n\t\t\tstagedata.cpp \\\n\t\t\tstatusbar.cpp \\\n\t\t\ttrig.cpp \\\n\t\t\ttsc.cpp \\\n\t\t\tai/ai.cpp \\\n\t\t\tai/balrog_common.cpp \\\n\t\t\tai/IrregularBBox.cpp \\\n\t\t\tautogen/AssignSprites.cpp \\\n\t\t\tautogen/objnames.cpp \\\n\t\t\tcommon/BList.cpp \\\n\t\t\tcommon/bufio.cpp \\\n\t\t\tcommon/DBuffer.cpp \\\n\t\t\tcommon/DString.cpp \\\n\t\t\tcommon/FileBuffer.cpp \\\n\t\t\tcommon/InitList.cpp \\\n\t\t\tcommon/misc_comm.cpp \\\n\t\t\tcommon/stat.cpp \\\n\t\t\tcommon/StringList.cpp \\\n\t\t\tendgame/credits.cpp \\\n\t\t\tendgame/CredReader.cpp \\\n\t\t\tendgame/island.cpp \\\n\t\t\tendgame/misc_end.cpp \\\n\t\t\textract/crc.cpp \\\n\t\t\textract/extract.cpp \\\n\t\t\textract/extractfiles.cpp \\\n\t\t\textract/extractpxt.cpp \\\n\t\t\textract/extractstages.cpp \\\n\t\t\tgraphics/font.cpp \\\n\t\t\tgraphics/graphics.cpp \\\n\t\t\tgraphics/nxsurface.cpp \\\n\t\t\tgraphics/palette.cpp \\\n\t\t\tgraphics/safemode.cpp \\\n\t\t\tgraphics/sprites.cpp \\\n\t\t\tgraphics/tileset.cpp \\\n\t\t\tintro/intro.cpp \\\n\t\t\tintro/title.cpp \\\n\t\t\tpause/dialog.cpp \\\n\t\t\tpause/message.cpp \\\n\t\t\tpause/objects.cpp \\\n\t\t\tpause/options.cpp \\\n\t\t\tpause/pause.cpp \\\n\t\t\tsiflib/sectSprites.cpp \\\n\t\t\tsiflib/sectStringArray.cpp \\\n\t\t\tsiflib/sif.cpp \\\n\t\t\tsiflib/sifloader.cpp \\\n\t\t\tsound/org.cpp \\\n\t\t\tsound/pxt.cpp \\\n\t\t\tsound/sound.cpp \\\n\t\t\tsound/sslib.cpp \\\n\t\t\tTextBox/ItemImage.cpp \\\n\t\t\tTextBox/SaveSelect.cpp \\\n\t\t\tTextBox/StageSelect.cpp \\\n\t\t\tTextBox/TextBox.cpp \\\n\t\t\tTextBox/YesNoPrompt.cpp \\\n\t\t\tai/almond/almond.cpp \\\n\t\t\tai/boss/balfrog.cpp \\\n\t\t\tai/boss/ballos.cpp \\\n\t\t\tai/boss/core.cpp \\\n\t\t\tai/boss/heavypress.cpp \\\n\t\t\tai/boss/ironhead.cpp \\\n\t\t\tai/boss/omega.cpp \\\n\t\t\tai/boss/sisters.cpp \\\n\t\t\tai/boss/undead_core.cpp \\\n\t\t\tai/boss/x.cpp \\\n\t\t\tai/egg/egg.cpp \\\n\t\t\tai/egg/egg2.cpp \\\n\t\t\tai/egg/igor.cpp \\\n\t\t\tai/final_battle/balcony.cpp \\\n\t\t\tai/final_battle/doctor.cpp \\\n\t\t\tai/final_battle/doctor_common.cpp \\\n\t\t\tai/final_battle/doctor_frenzied.cpp \\\n\t\t\tai/final_battle/final_misc.cpp \\\n\t\t\tai/final_battle/misery_battle.cpp \\\n\t\t\tai/final_battle/sidekicks.cpp \\\n\t\t\tai/first_cave/first_cave.cpp \\\n\t\t\tai/hell/ballos_misc.cpp \\\n\t\t\tai/hell/ballos_priest.cpp \\\n\t\t\tai/hell/hell.cpp \\\n\t\t\tai/last_cave/last_cave.cpp \\\n\t\t\tai/maze/balrog_boss_missiles.cpp \\\n\t\t\tai/maze/critter_purple.cpp \\\n\t\t\tai/maze/gaudi.cpp \\\n\t\t\tai/maze/labyrinth_m.cpp \\\n\t\t\tai/maze/maze.cpp \\\n\t\t\tai/maze/pooh_black.cpp \\\n\t\t\tai/npc/balrog.cpp \\\n\t\t\tai/npc/curly.cpp \\\n\t\t\tai/npc/curly_ai.cpp \\\n\t\t\tai/npc/misery_ai.cpp \\\n\t\t\tai/npc/npcguest.cpp \\\n\t\t\tai/npc/npcplayer.cpp \\\n\t\t\tai/npc/npcregu.cpp \\\n\t\t\tai/oside/oside.cpp \\\n\t\t\tai/plantation/plantation.cpp \\\n\t\t\tai/sand/curly_boss.cpp \\\n\t\t\tai/sand/puppy.cpp \\\n\t\t\tai/sand/sand.cpp \\\n\t\t\tai/sand/toroko_frenzied.cpp \\\n\t\t\tai/sym/smoke.cpp \\\n\t\t\tai/sym/sym.cpp \\\n\t\t\tai/village/balrog_boss_running.cpp \\\n\t\t\tai/village/ma_pignon.cpp \\\n\t\t\tai/village/village.cpp \\\n\t\t\tai/weapons/blade.cpp \\\n\t\t\tai/weapons/bubbler.cpp \\\n\t\t\tai/weapons/fireball.cpp \\\n\t\t\tai/weapons/missile.cpp \\\n\t\t\tai/weapons/nemesis.cpp \\\n\t\t\tai/weapons/polar_mgun.cpp \\\n\t\t\tai/weapons/snake.cpp \\\n\t\t\tai/weapons/spur.cpp \\\n\t\t\tai/weapons/weapons.cpp \\\n\t\t\tai/weapons/whimstar.cpp \\\n\t\t\tai/weed/balrog_boss_flying.cpp \\\n\t\t\tai/weed/frenzied_mimiga.cpp \\\n\t\t\tai/weed/weed.cpp \\\n\t\t\tplatform/Linux/vbesync.c \n\nOBJECTS =\tcaret.o \\\n\t\t\tconsole.o \\\n\t\t\tdebug.o \\\n\t\t\tfloattext.o \\\n\t\t\tgame.o \\\n\t\t\tinput.o \\\n\t\t\tinventory.o \\\n\t\t\tmain.o \\\n\t\t\tmap.o \\\n\t\t\tmap_system.o \\\n\t\t\tniku.o \\\n\t\t\tobject.o \\\n\t\t\tObjManager.o \\\n\t\t\tp_arms.o \\\n\t\t\tplatform.o \\\n\t\t\tplayer.o \\\n\t\t\tplayerstats.o \\\n\t\t\tprofile.o \\\n\t\t\treplay.o \\\n\t\t\tscreeneffect.o \\\n\t\t\tsettings.o \\\n\t\t\tslope.o \\\n\t\t\tstageboss.o \\\n\t\t\tstagedata.o \\\n\t\t\tstatusbar.o \\\n\t\t\ttrig.o \\\n\t\t\ttsc.o \\\n\t\t\tai.o \\\n\t\t\tbalrog_common.o \\\n\t\t\tIrregularBBox.o \\\n\t\t\tAssignSprites.o \\\n\t\t\tobjnames.o \\\n\t\t\tBList.o \\\n\t\t\tbufio.o \\\n\t\t\tDBuffer.o \\\n\t\t\tDString.o \\\n\t\t\tFileBuffer.o \\\n\t\t\tInitList.o \\\n\t\t\tmisc_comm.o \\\n\t\t\tstat.o \\\n\t\t\tStringList.o \\\n\t\t\tcredits.o \\\n\t\t\tCredReader.o \\\n\t\t\tisland.o \\\n\t\t\tmisc_end.o \\\n\t\t\tcrc.o \\\n\t\t\textract.o \\\n\t\t\textractfiles.o \\\n\t\t\textractpxt.o \\\n\t\t\textractstages.o \\\n\t\t\tfont.o \\\n\t\t\tgraphics.o \\\n\t\t\tnxsurface.o \\\n\t\t\tpalette.o \\\n\t\t\tsafemode.o \\\n\t\t\tsprites.o \\\n\t\t\ttileset.o \\\n\t\t\tintro.o \\\n\t\t\ttitle.o \\\n\t\t\tdialog.o \\\n\t\t\tmessage.o \\\n\t\t\tobjects.o \\\n\t\t\toptions.o \\\n\t\t\tpause.o \\\n\t\t\tsectSprites.o \\\n\t\t\tsectStringArray.o \\\n\t\t\tsif.o \\\n\t\t\tsifloader.o \\\n\t\t\torg.o \\\n\t\t\tpxt.o \\\n\t\t\tsound.o \\\n\t\t\tsslib.o \\\n\t\t\tItemImage.o \\\n\t\t\tSaveSelect.o \\\n\t\t\tStageSelect.o \\\n\t\t\tTextBox.o \\\n\t\t\tYesNoPrompt.o \\\n\t\t\talmond.o \\\n\t\t\tbalfrog.o \\\n\t\t\tballos.o \\\n\t\t\tcore.o \\\n\t\t\theavypress.o \\\n\t\t\tironhead.o \\\n\t\t\tomega.o \\\n\t\t\tsisters.o \\\n\t\t\tundead_core.o \\\n\t\t\tx.o \\\n\t\t\tegg.o \\\n\t\t\tegg2.o \\\n\t\t\tigor.o \\\n\t\t\tbalcony.o \\\n\t\t\tdoctor.o \\\n\t\t\tdoctor_common.o \\\n\t\t\tdoctor_frenzied.o \\\n\t\t\tfinal_misc.o \\\n\t\t\tmisery_battle.o \\\n\t\t\tsidekicks.o \\\n\t\t\tfirst_cave.o \\\n\t\t\tballos_misc.o \\\n\t\t\tballos_priest.o \\\n\t\t\thell.o \\\n\t\t\tlast_cave.o \\\n\t\t\tbalrog_boss_missiles.o \\\n\t\t\tcritter_purple.o \\\n\t\t\tgaudi.o \\\n\t\t\tlabyrinth_m.o \\\n\t\t\tmaze.o \\\n\t\t\tpooh_black.o \\\n\t\t\tbalrog.o \\\n\t\t\tcurly.o \\\n\t\t\tcurly_ai.o \\\n\t\t\tmisery_ai.o \\\n\t\t\tnpcguest.o \\\n\t\t\tnpcplayer.o \\\n\t\t\tnpcregu.o \\\n\t\t\toside.o \\\n\t\t\tplantation.o \\\n\t\t\tcurly_boss.o \\\n\t\t\tpuppy.o \\\n\t\t\tsand.o \\\n\t\t\ttoroko_frenzied.o \\\n\t\t\tsmoke.o \\\n\t\t\tsym.o \\\n\t\t\tbalrog_boss_running.o \\\n\t\t\tma_pignon.o \\\n\t\t\tvillage.o \\\n\t\t\tblade.o \\\n\t\t\tbubbler.o \\\n\t\t\tfireball.o \\\n\t\t\tmissile.o \\\n\t\t\tnemesis.o \\\n\t\t\tpolar_mgun.o \\\n\t\t\tsnake.o \\\n\t\t\tspur.o \\\n\t\t\tweapons.o \\\n\t\t\twhimstar.o \\\n\t\t\tbalrog_boss_flying.o \\\n\t\t\tfrenzied_mimiga.o \\\n\t\t\tweed.o \\\n\t\t\tvbesync.o\n\nTARGET\t\t= nx\n\nfirst: all\n####### Implicit rules\n\n.SUFFIXES: .o .c .cpp .cc .cxx .C\n\n.cpp.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cc.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cxx.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.C.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.c.o:\n\t$(CC) -c $(CFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n####### Build rules\n\nall: $(TARGET)\n\n$(TARGET):  $(OBJECTS)\n\t$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS_SHARED)\n\t$(STRIP) $(TARGET)\n\nclean:\n\t-$(DEL_FILE) $(OBJECTS)\n\t-$(DEL_FILE) *~ core *.core\n\n####### Sub-libraries\n\ndistclean: clean\n\t-$(DEL_FILE) $(TARGET) \n\n####### Compile\n\ncaret.o: caret.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tcaret.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp\n\nconsole.o: console.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tconsole.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp\n\ndebug.o: debug.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tdebug.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp\n\nfloattext.o: floattext.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tfloattext.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp\n\ngame.o: game.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tintro/intro.h \\\n\t\tintro/title.h \\\n\t\tpause/pause.h \\\n\t\tpause/options.h \\\n\t\tinventory.h \\\n\t\tmap_system.h \\\n\t\tprofile.h \\\n\t\tgame.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp\n\ninput.o: input.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinput.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp\n\ninventory.o: inventory.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinventory.h \\\n\t\tinventory.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp\n\nmain.o: main.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tmain.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp\n\nmap.o: map.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp\n\nmap_system.o: map_system.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap_system.h \\\n\t\tmap_system.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp\n\nniku.o: niku.cpp niku.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp\n\nobject.o: object.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tobject.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp\n\nObjManager.o: ObjManager.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tObjManager.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp\n\np_arms.o: p_arms.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tp_arms.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp\n\nplatform.o: platform.cpp config.h \\\n\t\tplatform.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp\n\nplayer.o: player.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp\n\nplayerstats.o: playerstats.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayerstats.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp\n\nprofile.o: profile.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tprofile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp\n\nreplay.o: replay.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\treplay.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp\n\nscreeneffect.o: screeneffect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tscreeneffect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp\n\nsettings.o: settings.cpp settings.h \\\n\t\tinput.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tsettings.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp\n\nslope.o: slope.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tslope.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp\n\nstageboss.o: stageboss.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstageboss.fdh \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/ballos.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp\n\nstagedata.o: stagedata.cpp stagedata.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp\n\nstatusbar.o: statusbar.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstatusbar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp\n\ntrig.o: trig.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\ttrig.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp\n\ntsc.o: tsc.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tvararray.h \\\n\t\ttsc.fdh \\\n\t\ttsc_cmdtbl.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp\n\nai.o: ai/ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp\n\nbalrog_common.o: ai/balrog_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp\n\nIrregularBBox.o: ai/IrregularBBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/IrregularBBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp\n\nAssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp\n\nobjnames.o: autogen/objnames.cpp \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp\n\nBList.o: common/BList.cpp common/BList.h \\\n\t\tcommon/SupportDefs.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp\n\nbufio.o: common/bufio.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp\n\nDBuffer.o: common/DBuffer.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp\n\nDString.o: common/DString.cpp common/DString.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp\n\nFileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp\n\nInitList.o: common/InitList.cpp common/InitList.h \\\n\t\tcommon/InitList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp\n\nmisc_comm.o: common/misc_comm.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp\n\nstat.o: common/stat.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp\n\nStringList.o: common/StringList.cpp common/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp\n\ncredits.o: endgame/credits.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/credits.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp\n\nCredReader.o: endgame/CredReader.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/CredReader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp\n\nisland.o: endgame/island.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp\n\nmisc_end.o: endgame/misc_end.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp\n\ncrc.o: extract/crc.cpp extract/crc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp\n\nextract.o: extract/extract.cpp graphics/safemode.h \\\n\t\textract/extract.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp\n\nextractfiles.o: extract/extractfiles.cpp common/basics.h \\\n\t\tgraphics/safemode.h \\\n\t\textract/extractfiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp\n\nextractpxt.o: extract/extractpxt.cpp graphics/safemode.h \\\n\t\tcommon/basics.h \\\n\t\textract/extractpxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp\n\nextractstages.o: extract/extractstages.cpp graphics/safemode.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/basics.h \\\n\t\tstagedata.h \\\n\t\tmaprecord.h \\\n\t\textract/extractstages.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp\n\nfont.o: graphics/font.cpp config.h \\\n\t\tnx.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/font.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp\n\ngraphics.o: graphics/graphics.cpp config.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tdirnames.h \\\n\t\tgraphics/graphics.fdh \\\n\t\tl10n_strings.h \\\n\t\tnx_icon.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp\n\nnxsurface.o: graphics/nxsurface.cpp settings.h \\\n\t\tinput.h \\\n\t\tconfig.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/nxsurface.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp\n\npalette.o: graphics/palette.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/palette.h \\\n\t\tgraphics/palette.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp\n\nsafemode.o: graphics/safemode.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tgraphics/safemode.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp\n\nsprites.o: graphics/sprites.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tautogen/sprites.h \\\n\t\tcommon/StringList.h \\\n\t\tdirnames.h \\\n\t\tsettings.h \\\n\t\tinput.h \\\n\t\tgraphics/sprites.h \\\n\t\tgraphics/sprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp\n\ntileset.o: graphics/tileset.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/tileset.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp\n\nintro.o: intro/intro.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/stdai.h \\\n\t\tintro/intro.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp\n\ntitle.o: intro/title.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tintro/title.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp\n\ndialog.o: pause/dialog.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/dialog.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp\n\nmessage.o: pause/message.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/message.h \\\n\t\tpause/options.h \\\n\t\tpause/message.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp\n\nobjects.o: pause/objects.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tpause/options.h \\\n\t\tpause/objects.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp\n\noptions.o: pause/options.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.h \\\n\t\tpause/message.h \\\n\t\tl10n_strings.h \\\n\t\tpause/options.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp\n\npause.o: pause/pause.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/pause.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp\n\nsectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sectSprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp\n\nsectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sectStringArray.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp\n\nsif.o: siflib/sif.cpp siflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sif.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp\n\nsifloader.o: siflib/sifloader.cpp siflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sifloader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp\n\norg.o: sound/org.cpp common/basics.h \\\n\t\tsound/org.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sslib.h \\\n\t\tsound/org.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp\n\npxt.o: sound/pxt.cpp sound/pxt.h \\\n\t\tcommon/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/pxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp\n\nsound.o: sound/sound.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp\n\nsslib.o: sound/sslib.cpp common/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/sslib.fdh \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp\n\nItemImage.o: TextBox/ItemImage.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/ItemImage.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp\n\nSaveSelect.o: TextBox/SaveSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tinventory.h \\\n\t\tTextBox/SaveSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp\n\nStageSelect.o: TextBox/StageSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/StageSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp\n\nTextBox.o: TextBox/TextBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/TextBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp\n\nYesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/YesNoPrompt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp\n\nalmond.o: ai/almond/almond.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/almond/almond.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp\n\nbalfrog.o: ai/boss/balfrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/balfrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp\n\nballos.o: ai/boss/ballos.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ballos.h \\\n\t\tai/boss/ballos.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp\n\ncore.o: ai/boss/core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp\n\nheavypress.o: ai/boss/heavypress.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/heavypress.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp\n\nironhead.o: ai/boss/ironhead.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/ironhead.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp\n\nomega.o: ai/boss/omega.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/omega.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp\n\nsisters.o: ai/boss/sisters.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/sisters.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp\n\nundead_core.o: ai/boss/undead_core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/undead_core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp\n\nx.o: ai/boss/x.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/x.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp\n\negg.o: ai/egg/egg.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp\n\negg2.o: ai/egg/egg2.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh \\\n\t\tai/egg/egg2.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp\n\nigor.o: ai/egg/igor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/igor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp\n\nbalcony.o: ai/final_battle/balcony.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/balcony.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp\n\ndoctor.o: ai/final_battle/doctor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp\n\ndoctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp\n\ndoctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp\n\nfinal_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/final_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp\n\nmisery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp\n\nsidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/sidekicks.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp\n\nfirst_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/first_cave/first_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp\n\nballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp\n\nballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_priest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp\n\nhell.o: ai/hell/hell.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/hell.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp\n\nlast_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/plantation/plantation.fdh \\\n\t\tai/sym/sym.fdh \\\n\t\tai/last_cave/last_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp\n\nbalrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/maze/balrog_boss_missiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp\n\ncritter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/critter_purple.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp\n\ngaudi.o: ai/maze/gaudi.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/gaudi.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp\n\nlabyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/labyrinth_m.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp\n\nmaze.o: ai/maze/maze.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/maze.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp\n\npooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/pooh_black.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp\n\nbalrog.o: ai/npc/balrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/balrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp\n\ncurly.o: ai/npc/curly.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp\n\ncurly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly_ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp\n\nmisery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp\n\nnpcguest.o: ai/npc/npcguest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcguest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp\n\nnpcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp\n\nnpcregu.o: ai/npc/npcregu.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/npc/npcregu.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp\n\noside.o: ai/oside/oside.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/sand.fdh \\\n\t\tai/oside/oside.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp\n\nplantation.o: ai/plantation/plantation.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh \\\n\t\tai/plantation/plantation.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp\n\ncurly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/curly_boss.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp\n\npuppy.o: ai/sand/puppy.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp\n\nsand.o: ai/sand/sand.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/egg.fdh \\\n\t\tai/sand/sand.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp\n\ntoroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/toroko_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp\n\nsmoke.o: ai/sym/smoke.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/smoke.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp\n\nsym.o: ai/sym/sym.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/sym.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp\n\nbalrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/village/balrog_boss_running.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp\n\nma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/village/ma_pignon.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp\n\nvillage.o: ai/village/village.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/village/village.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp\n\nblade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/blade.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp\n\nbubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/bubbler.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp\n\nfireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/fireball.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp\n\nmissile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/missile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp\n\nnemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/nemesis.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp\n\npolar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/polar_mgun.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp\n\nsnake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/snake.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp\n\nspur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/spur.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp\n\nweapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/weapons.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp\n\nwhimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/whimstar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp\n\nbalrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/balrog_boss_flying.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp\n\nfrenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/frenzied_mimiga.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp\n\nweed.o: ai/weed/weed.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp\n\nvbesync.o: platform/Linux/vbesync.c \n\t$(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c\n\n####### Install\n\ninstall:   FORCE\n\nuninstall:   FORCE\n\nFORCE:\n\n"
  },
  {
    "path": "Makefile.linux",
    "content": "#############################################################################\n# Makefile for building: NXEngine (32/64-bits GNU/Linux distros) \n# More build information can be found here: https://github.com/EXL/NXEngine.git\n# Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013\n# Fixed by EXL on: 11/9/2013\n#############################################################################\n\n####### Compiler, tools and options\n\n# Please write \"static\" for static linking \"nx\" binary with SDL librares\n# Please uncomment \"-D_L10N_CP1251\" for Russian Localization\nBUILD         = shared\n\nCC            = gcc\nCXX           = g++\nDEFINES       = # -D_L10N_CP1251\nCFLAGS        = -pipe -O2 $(DEFINES)\nCXXFLAGS      = -pipe -O2 $(DEFINES)\nINCPATH       = -I/usr/include -I/usr/include/SDL -I/usr/local/include -I/usr/local/include/SDL -I.\nLINK          = g++\nLFLAGS        = -Wl,-O1 -Wl,-rpath,/usr/lib\nLIBS_SHARED   = -lSDL -lSDL_ttf\nLIBS_STATIC   = /usr/local/lib/libSDLmain.a /usr/local/lib/libSDL.a /usr/local/lib/libSDL_ttf.a -ldl -lpthread -lfreetype\nSTRIP         = strip\nDEL_FILE      = rm -f\n\n####### Output directory\n\nOBJECTS_DIR   = ./\n\n####### Files\n\nSOURCES =\tcaret.cpp \\\n\t\t\tconsole.cpp \\\n\t\t\tdebug.cpp \\\n\t\t\tfloattext.cpp \\\n\t\t\tgame.cpp \\\n\t\t\tinput.cpp \\\n\t\t\tinventory.cpp \\\n\t\t\tmain.cpp \\\n\t\t\tmap.cpp \\\n\t\t\tmap_system.cpp \\\n\t\t\tniku.cpp \\\n\t\t\tobject.cpp \\\n\t\t\tObjManager.cpp \\\n\t\t\tp_arms.cpp \\\n\t\t\tplatform.cpp \\\n\t\t\tplayer.cpp \\\n\t\t\tplayerstats.cpp \\\n\t\t\tprofile.cpp \\\n\t\t\treplay.cpp \\\n\t\t\tscreeneffect.cpp \\\n\t\t\tsettings.cpp \\\n\t\t\tslope.cpp \\\n\t\t\tstageboss.cpp \\\n\t\t\tstagedata.cpp \\\n\t\t\tstatusbar.cpp \\\n\t\t\ttrig.cpp \\\n\t\t\ttsc.cpp \\\n\t\t\tai/ai.cpp \\\n\t\t\tai/balrog_common.cpp \\\n\t\t\tai/IrregularBBox.cpp \\\n\t\t\tautogen/AssignSprites.cpp \\\n\t\t\tautogen/objnames.cpp \\\n\t\t\tcommon/BList.cpp \\\n\t\t\tcommon/bufio.cpp \\\n\t\t\tcommon/DBuffer.cpp \\\n\t\t\tcommon/DString.cpp \\\n\t\t\tcommon/FileBuffer.cpp \\\n\t\t\tcommon/InitList.cpp \\\n\t\t\tcommon/misc_comm.cpp \\\n\t\t\tcommon/stat.cpp \\\n\t\t\tcommon/StringList.cpp \\\n\t\t\tendgame/credits.cpp \\\n\t\t\tendgame/CredReader.cpp \\\n\t\t\tendgame/island.cpp \\\n\t\t\tendgame/misc_end.cpp \\\n\t\t\textract/crc.cpp \\\n\t\t\textract/extract.cpp \\\n\t\t\textract/extractfiles.cpp \\\n\t\t\textract/extractpxt.cpp \\\n\t\t\textract/extractstages.cpp \\\n\t\t\tgraphics/font.cpp \\\n\t\t\tgraphics/graphics.cpp \\\n\t\t\tgraphics/nxsurface.cpp \\\n\t\t\tgraphics/palette.cpp \\\n\t\t\tgraphics/safemode.cpp \\\n\t\t\tgraphics/sprites.cpp \\\n\t\t\tgraphics/tileset.cpp \\\n\t\t\tintro/intro.cpp \\\n\t\t\tintro/title.cpp \\\n\t\t\tpause/dialog.cpp \\\n\t\t\tpause/message.cpp \\\n\t\t\tpause/objects.cpp \\\n\t\t\tpause/options.cpp \\\n\t\t\tpause/pause.cpp \\\n\t\t\tsiflib/sectSprites.cpp \\\n\t\t\tsiflib/sectStringArray.cpp \\\n\t\t\tsiflib/sif.cpp \\\n\t\t\tsiflib/sifloader.cpp \\\n\t\t\tsound/org.cpp \\\n\t\t\tsound/pxt.cpp \\\n\t\t\tsound/sound.cpp \\\n\t\t\tsound/sslib.cpp \\\n\t\t\tTextBox/ItemImage.cpp \\\n\t\t\tTextBox/SaveSelect.cpp \\\n\t\t\tTextBox/StageSelect.cpp \\\n\t\t\tTextBox/TextBox.cpp \\\n\t\t\tTextBox/YesNoPrompt.cpp \\\n\t\t\tai/almond/almond.cpp \\\n\t\t\tai/boss/balfrog.cpp \\\n\t\t\tai/boss/ballos.cpp \\\n\t\t\tai/boss/core.cpp \\\n\t\t\tai/boss/heavypress.cpp \\\n\t\t\tai/boss/ironhead.cpp \\\n\t\t\tai/boss/omega.cpp \\\n\t\t\tai/boss/sisters.cpp \\\n\t\t\tai/boss/undead_core.cpp \\\n\t\t\tai/boss/x.cpp \\\n\t\t\tai/egg/egg.cpp \\\n\t\t\tai/egg/egg2.cpp \\\n\t\t\tai/egg/igor.cpp \\\n\t\t\tai/final_battle/balcony.cpp \\\n\t\t\tai/final_battle/doctor.cpp \\\n\t\t\tai/final_battle/doctor_common.cpp \\\n\t\t\tai/final_battle/doctor_frenzied.cpp \\\n\t\t\tai/final_battle/final_misc.cpp \\\n\t\t\tai/final_battle/misery_battle.cpp \\\n\t\t\tai/final_battle/sidekicks.cpp \\\n\t\t\tai/first_cave/first_cave.cpp \\\n\t\t\tai/hell/ballos_misc.cpp \\\n\t\t\tai/hell/ballos_priest.cpp \\\n\t\t\tai/hell/hell.cpp \\\n\t\t\tai/last_cave/last_cave.cpp \\\n\t\t\tai/maze/balrog_boss_missiles.cpp \\\n\t\t\tai/maze/critter_purple.cpp \\\n\t\t\tai/maze/gaudi.cpp \\\n\t\t\tai/maze/labyrinth_m.cpp \\\n\t\t\tai/maze/maze.cpp \\\n\t\t\tai/maze/pooh_black.cpp \\\n\t\t\tai/npc/balrog.cpp \\\n\t\t\tai/npc/curly.cpp \\\n\t\t\tai/npc/curly_ai.cpp \\\n\t\t\tai/npc/misery_ai.cpp \\\n\t\t\tai/npc/npcguest.cpp \\\n\t\t\tai/npc/npcplayer.cpp \\\n\t\t\tai/npc/npcregu.cpp \\\n\t\t\tai/oside/oside.cpp \\\n\t\t\tai/plantation/plantation.cpp \\\n\t\t\tai/sand/curly_boss.cpp \\\n\t\t\tai/sand/puppy.cpp \\\n\t\t\tai/sand/sand.cpp \\\n\t\t\tai/sand/toroko_frenzied.cpp \\\n\t\t\tai/sym/smoke.cpp \\\n\t\t\tai/sym/sym.cpp \\\n\t\t\tai/village/balrog_boss_running.cpp \\\n\t\t\tai/village/ma_pignon.cpp \\\n\t\t\tai/village/village.cpp \\\n\t\t\tai/weapons/blade.cpp \\\n\t\t\tai/weapons/bubbler.cpp \\\n\t\t\tai/weapons/fireball.cpp \\\n\t\t\tai/weapons/missile.cpp \\\n\t\t\tai/weapons/nemesis.cpp \\\n\t\t\tai/weapons/polar_mgun.cpp \\\n\t\t\tai/weapons/snake.cpp \\\n\t\t\tai/weapons/spur.cpp \\\n\t\t\tai/weapons/weapons.cpp \\\n\t\t\tai/weapons/whimstar.cpp \\\n\t\t\tai/weed/balrog_boss_flying.cpp \\\n\t\t\tai/weed/frenzied_mimiga.cpp \\\n\t\t\tai/weed/weed.cpp \\\n\t\t\tplatform/Linux/vbesync.c \n\nOBJECTS =\tcaret.o \\\n\t\t\tconsole.o \\\n\t\t\tdebug.o \\\n\t\t\tfloattext.o \\\n\t\t\tgame.o \\\n\t\t\tinput.o \\\n\t\t\tinventory.o \\\n\t\t\tmain.o \\\n\t\t\tmap.o \\\n\t\t\tmap_system.o \\\n\t\t\tniku.o \\\n\t\t\tobject.o \\\n\t\t\tObjManager.o \\\n\t\t\tp_arms.o \\\n\t\t\tplatform.o \\\n\t\t\tplayer.o \\\n\t\t\tplayerstats.o \\\n\t\t\tprofile.o \\\n\t\t\treplay.o \\\n\t\t\tscreeneffect.o \\\n\t\t\tsettings.o \\\n\t\t\tslope.o \\\n\t\t\tstageboss.o \\\n\t\t\tstagedata.o \\\n\t\t\tstatusbar.o \\\n\t\t\ttrig.o \\\n\t\t\ttsc.o \\\n\t\t\tai.o \\\n\t\t\tbalrog_common.o \\\n\t\t\tIrregularBBox.o \\\n\t\t\tAssignSprites.o \\\n\t\t\tobjnames.o \\\n\t\t\tBList.o \\\n\t\t\tbufio.o \\\n\t\t\tDBuffer.o \\\n\t\t\tDString.o \\\n\t\t\tFileBuffer.o \\\n\t\t\tInitList.o \\\n\t\t\tmisc_comm.o \\\n\t\t\tstat.o \\\n\t\t\tStringList.o \\\n\t\t\tcredits.o \\\n\t\t\tCredReader.o \\\n\t\t\tisland.o \\\n\t\t\tmisc_end.o \\\n\t\t\tcrc.o \\\n\t\t\textract.o \\\n\t\t\textractfiles.o \\\n\t\t\textractpxt.o \\\n\t\t\textractstages.o \\\n\t\t\tfont.o \\\n\t\t\tgraphics.o \\\n\t\t\tnxsurface.o \\\n\t\t\tpalette.o \\\n\t\t\tsafemode.o \\\n\t\t\tsprites.o \\\n\t\t\ttileset.o \\\n\t\t\tintro.o \\\n\t\t\ttitle.o \\\n\t\t\tdialog.o \\\n\t\t\tmessage.o \\\n\t\t\tobjects.o \\\n\t\t\toptions.o \\\n\t\t\tpause.o \\\n\t\t\tsectSprites.o \\\n\t\t\tsectStringArray.o \\\n\t\t\tsif.o \\\n\t\t\tsifloader.o \\\n\t\t\torg.o \\\n\t\t\tpxt.o \\\n\t\t\tsound.o \\\n\t\t\tsslib.o \\\n\t\t\tItemImage.o \\\n\t\t\tSaveSelect.o \\\n\t\t\tStageSelect.o \\\n\t\t\tTextBox.o \\\n\t\t\tYesNoPrompt.o \\\n\t\t\talmond.o \\\n\t\t\tbalfrog.o \\\n\t\t\tballos.o \\\n\t\t\tcore.o \\\n\t\t\theavypress.o \\\n\t\t\tironhead.o \\\n\t\t\tomega.o \\\n\t\t\tsisters.o \\\n\t\t\tundead_core.o \\\n\t\t\tx.o \\\n\t\t\tegg.o \\\n\t\t\tegg2.o \\\n\t\t\tigor.o \\\n\t\t\tbalcony.o \\\n\t\t\tdoctor.o \\\n\t\t\tdoctor_common.o \\\n\t\t\tdoctor_frenzied.o \\\n\t\t\tfinal_misc.o \\\n\t\t\tmisery_battle.o \\\n\t\t\tsidekicks.o \\\n\t\t\tfirst_cave.o \\\n\t\t\tballos_misc.o \\\n\t\t\tballos_priest.o \\\n\t\t\thell.o \\\n\t\t\tlast_cave.o \\\n\t\t\tbalrog_boss_missiles.o \\\n\t\t\tcritter_purple.o \\\n\t\t\tgaudi.o \\\n\t\t\tlabyrinth_m.o \\\n\t\t\tmaze.o \\\n\t\t\tpooh_black.o \\\n\t\t\tbalrog.o \\\n\t\t\tcurly.o \\\n\t\t\tcurly_ai.o \\\n\t\t\tmisery_ai.o \\\n\t\t\tnpcguest.o \\\n\t\t\tnpcplayer.o \\\n\t\t\tnpcregu.o \\\n\t\t\toside.o \\\n\t\t\tplantation.o \\\n\t\t\tcurly_boss.o \\\n\t\t\tpuppy.o \\\n\t\t\tsand.o \\\n\t\t\ttoroko_frenzied.o \\\n\t\t\tsmoke.o \\\n\t\t\tsym.o \\\n\t\t\tbalrog_boss_running.o \\\n\t\t\tma_pignon.o \\\n\t\t\tvillage.o \\\n\t\t\tblade.o \\\n\t\t\tbubbler.o \\\n\t\t\tfireball.o \\\n\t\t\tmissile.o \\\n\t\t\tnemesis.o \\\n\t\t\tpolar_mgun.o \\\n\t\t\tsnake.o \\\n\t\t\tspur.o \\\n\t\t\tweapons.o \\\n\t\t\twhimstar.o \\\n\t\t\tbalrog_boss_flying.o \\\n\t\t\tfrenzied_mimiga.o \\\n\t\t\tweed.o \\\n\t\t\tvbesync.o \n\nTARGET\t\t= nx\n\nfirst: all\n####### Implicit rules\n\n.SUFFIXES: .o .c .cpp .cc .cxx .C\n\n.cpp.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cc.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cxx.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.C.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.c.o:\n\t$(CC) -c $(CFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n####### Build rules\n\nall: $(TARGET)\n\n$(TARGET):  $(OBJECTS)  \nifeq ($(BUILD),shared)\n\t$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS_SHARED)\nendif\nifeq ($(BUILD),static)\n\t$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS_STATIC)\nendif\n\t$(STRIP) $(TARGET)\n\nclean:\n\t-$(DEL_FILE) $(OBJECTS)\n\t-$(DEL_FILE) *~ core *.core\n\n####### Sub-libraries\n\ndistclean: clean\n\t-$(DEL_FILE) $(TARGET) \n\n####### Compile\n\ncaret.o: caret.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tcaret.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp\n\nconsole.o: console.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tconsole.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp\n\ndebug.o: debug.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tdebug.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp\n\nfloattext.o: floattext.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tfloattext.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp\n\ngame.o: game.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tintro/intro.h \\\n\t\tintro/title.h \\\n\t\tpause/pause.h \\\n\t\tpause/options.h \\\n\t\tinventory.h \\\n\t\tmap_system.h \\\n\t\tprofile.h \\\n\t\tgame.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp\n\ninput.o: input.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinput.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp\n\ninventory.o: inventory.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinventory.h \\\n\t\tinventory.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp\n\nmain.o: main.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tmain.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp\n\nmap.o: map.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp\n\nmap_system.o: map_system.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap_system.h \\\n\t\tmap_system.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp\n\nniku.o: niku.cpp niku.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp\n\nobject.o: object.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tobject.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp\n\nObjManager.o: ObjManager.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tObjManager.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp\n\np_arms.o: p_arms.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tp_arms.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp\n\nplatform.o: platform.cpp config.h \\\n\t\tplatform.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp\n\nplayer.o: player.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp\n\nplayerstats.o: playerstats.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayerstats.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp\n\nprofile.o: profile.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tprofile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp\n\nreplay.o: replay.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\treplay.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp\n\nscreeneffect.o: screeneffect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tscreeneffect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp\n\nsettings.o: settings.cpp settings.h \\\n\t\tinput.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tsettings.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp\n\nslope.o: slope.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tslope.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp\n\nstageboss.o: stageboss.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstageboss.fdh \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/ballos.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp\n\nstagedata.o: stagedata.cpp stagedata.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp\n\nstatusbar.o: statusbar.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstatusbar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp\n\ntrig.o: trig.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\ttrig.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp\n\ntsc.o: tsc.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tvararray.h \\\n\t\ttsc.fdh \\\n\t\ttsc_cmdtbl.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp\n\nai.o: ai/ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp\n\nbalrog_common.o: ai/balrog_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp\n\nIrregularBBox.o: ai/IrregularBBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/IrregularBBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp\n\nAssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp\n\nobjnames.o: autogen/objnames.cpp \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp\n\nBList.o: common/BList.cpp common/BList.h \\\n\t\tcommon/SupportDefs.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp\n\nbufio.o: common/bufio.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp\n\nDBuffer.o: common/DBuffer.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp\n\nDString.o: common/DString.cpp common/DString.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp\n\nFileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp\n\nInitList.o: common/InitList.cpp common/InitList.h \\\n\t\tcommon/InitList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp\n\nmisc_comm.o: common/misc_comm.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp\n\nstat.o: common/stat.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp\n\nStringList.o: common/StringList.cpp common/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp\n\ncredits.o: endgame/credits.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/credits.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp\n\nCredReader.o: endgame/CredReader.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/CredReader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp\n\nisland.o: endgame/island.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp\n\nmisc_end.o: endgame/misc_end.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp\n\ncrc.o: extract/crc.cpp extract/crc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp\n\nextract.o: extract/extract.cpp graphics/safemode.h \\\n\t\textract/extract.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp\n\nextractfiles.o: extract/extractfiles.cpp common/basics.h \\\n\t\tgraphics/safemode.h \\\n\t\textract/extractfiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp\n\nextractpxt.o: extract/extractpxt.cpp graphics/safemode.h \\\n\t\tcommon/basics.h \\\n\t\textract/extractpxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp\n\nextractstages.o: extract/extractstages.cpp graphics/safemode.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/basics.h \\\n\t\tstagedata.h \\\n\t\tmaprecord.h \\\n\t\textract/extractstages.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp\n\nfont.o: graphics/font.cpp config.h \\\n\t\tnx.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/font.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp\n\ngraphics.o: graphics/graphics.cpp config.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tdirnames.h \\\n\t\tgraphics/graphics.fdh \\\n\t\tl10n_strings.h \\\n\t\tnx_icon.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp\n\nnxsurface.o: graphics/nxsurface.cpp settings.h \\\n\t\tinput.h \\\n\t\tconfig.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/nxsurface.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp\n\npalette.o: graphics/palette.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/palette.h \\\n\t\tgraphics/palette.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp\n\nsafemode.o: graphics/safemode.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tgraphics/safemode.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp\n\nsprites.o: graphics/sprites.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tautogen/sprites.h \\\n\t\tcommon/StringList.h \\\n\t\tdirnames.h \\\n\t\tsettings.h \\\n\t\tinput.h \\\n\t\tgraphics/sprites.h \\\n\t\tgraphics/sprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp\n\ntileset.o: graphics/tileset.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/tileset.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp\n\nintro.o: intro/intro.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/stdai.h \\\n\t\tintro/intro.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp\n\ntitle.o: intro/title.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tintro/title.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp\n\ndialog.o: pause/dialog.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/dialog.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp\n\nmessage.o: pause/message.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/message.h \\\n\t\tpause/options.h \\\n\t\tpause/message.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp\n\nobjects.o: pause/objects.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tpause/options.h \\\n\t\tpause/objects.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp\n\noptions.o: pause/options.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.h \\\n\t\tpause/message.h \\\n\t\tl10n_strings.h \\\n\t\tpause/options.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp\n\npause.o: pause/pause.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/pause.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp\n\nsectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sectSprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp\n\nsectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sectStringArray.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp\n\nsif.o: siflib/sif.cpp siflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sif.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp\n\nsifloader.o: siflib/sifloader.cpp siflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sifloader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp\n\norg.o: sound/org.cpp common/basics.h \\\n\t\tsound/org.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sslib.h \\\n\t\tsound/org.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp\n\npxt.o: sound/pxt.cpp sound/pxt.h \\\n\t\tcommon/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/pxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp\n\nsound.o: sound/sound.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp\n\nsslib.o: sound/sslib.cpp common/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/sslib.fdh \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp\n\nItemImage.o: TextBox/ItemImage.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/ItemImage.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp\n\nSaveSelect.o: TextBox/SaveSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tinventory.h \\\n\t\tTextBox/SaveSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp\n\nStageSelect.o: TextBox/StageSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/StageSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp\n\nTextBox.o: TextBox/TextBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/TextBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp\n\nYesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/YesNoPrompt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp\n\nalmond.o: ai/almond/almond.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/almond/almond.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp\n\nbalfrog.o: ai/boss/balfrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/balfrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp\n\nballos.o: ai/boss/ballos.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ballos.h \\\n\t\tai/boss/ballos.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp\n\ncore.o: ai/boss/core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp\n\nheavypress.o: ai/boss/heavypress.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/heavypress.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp\n\nironhead.o: ai/boss/ironhead.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/ironhead.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp\n\nomega.o: ai/boss/omega.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/omega.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp\n\nsisters.o: ai/boss/sisters.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/sisters.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp\n\nundead_core.o: ai/boss/undead_core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/undead_core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp\n\nx.o: ai/boss/x.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/x.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp\n\negg.o: ai/egg/egg.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp\n\negg2.o: ai/egg/egg2.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh \\\n\t\tai/egg/egg2.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp\n\nigor.o: ai/egg/igor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/igor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp\n\nbalcony.o: ai/final_battle/balcony.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/balcony.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp\n\ndoctor.o: ai/final_battle/doctor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp\n\ndoctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp\n\ndoctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp\n\nfinal_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/final_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp\n\nmisery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp\n\nsidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/sidekicks.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp\n\nfirst_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/first_cave/first_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp\n\nballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp\n\nballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_priest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp\n\nhell.o: ai/hell/hell.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/hell.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp\n\nlast_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/plantation/plantation.fdh \\\n\t\tai/sym/sym.fdh \\\n\t\tai/last_cave/last_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp\n\nbalrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/maze/balrog_boss_missiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp\n\ncritter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/critter_purple.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp\n\ngaudi.o: ai/maze/gaudi.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/gaudi.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp\n\nlabyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/labyrinth_m.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp\n\nmaze.o: ai/maze/maze.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/maze.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp\n\npooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/pooh_black.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp\n\nbalrog.o: ai/npc/balrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/balrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp\n\ncurly.o: ai/npc/curly.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp\n\ncurly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly_ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp\n\nmisery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp\n\nnpcguest.o: ai/npc/npcguest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcguest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp\n\nnpcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp\n\nnpcregu.o: ai/npc/npcregu.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/npc/npcregu.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp\n\noside.o: ai/oside/oside.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/sand.fdh \\\n\t\tai/oside/oside.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp\n\nplantation.o: ai/plantation/plantation.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh \\\n\t\tai/plantation/plantation.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp\n\ncurly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/curly_boss.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp\n\npuppy.o: ai/sand/puppy.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp\n\nsand.o: ai/sand/sand.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/egg.fdh \\\n\t\tai/sand/sand.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp\n\ntoroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/toroko_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp\n\nsmoke.o: ai/sym/smoke.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/smoke.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp\n\nsym.o: ai/sym/sym.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/sym.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp\n\nbalrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/village/balrog_boss_running.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp\n\nma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/village/ma_pignon.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp\n\nvillage.o: ai/village/village.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/village/village.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp\n\nblade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/blade.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp\n\nbubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/bubbler.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp\n\nfireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/fireball.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp\n\nmissile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/missile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp\n\nnemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/nemesis.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp\n\npolar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/polar_mgun.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp\n\nsnake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/snake.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp\n\nspur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/spur.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp\n\nweapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/weapons.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp\n\nwhimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/whimstar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp\n\nbalrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/balrog_boss_flying.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp\n\nfrenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/frenzied_mimiga.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp\n\nweed.o: ai/weed/weed.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp\n\nvbesync.o: platform/Linux/vbesync.c \n\t$(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c\n\n####### Install\n\ninstall:   FORCE\n\nuninstall:   FORCE\n\nFORCE:\n\n"
  },
  {
    "path": "Makefile.mingw32",
    "content": "#############################################################################\n# Makefile for building: NXEngine (MinGW/MSYS x86 Windows) \n# More build information can be found here: https://github.com/EXL/NXEngine.git\n# Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013\n# Fixed by EXL on: 11/9/2013\n#############################################################################\n\n####### Compiler, tools and options\n\n# Please uncomment \"-D_L10N_CP1251\" for Russian Localization\nCC            = gcc\nCXX           = g++\nDEFINES       = # -D_L10N_CP1251\nCFLAGS        = -pipe -O2 -w $(DEFINES)\nCXXFLAGS      = -pipe -O2 -w -frtti -fexceptions -mthreads $(DEFINES)\nINCPATH       = -I/mingw/include -I/mingw/include/SDL -I.\nLINK          = g++\nLFLAGS        = -static -static-libgcc -static-libstdc++ -Wl,-s -mthreads -Wl,-subsystem,windows\nLIBS          = nx_res.o -lmingw32 -lSDL_ttf -lfreetype -lpng -lz -lSDLmain -lSDL -lgdi32 -lwinmm\nSTRIP         = mipsel-linux-strip\nRES_FILE      = nx_res.o\nDEL_FILE      = rm -f\n\n####### Output directory\n\nOBJECTS_DIR   = ./\n\n####### Files\n\nSOURCES =\tcaret.cpp \\\n\t\t\tconsole.cpp \\\n\t\t\tdebug.cpp \\\n\t\t\tfloattext.cpp \\\n\t\t\tgame.cpp \\\n\t\t\tinput.cpp \\\n\t\t\tinventory.cpp \\\n\t\t\tmain.cpp \\\n\t\t\tmap.cpp \\\n\t\t\tmap_system.cpp \\\n\t\t\tniku.cpp \\\n\t\t\tobject.cpp \\\n\t\t\tObjManager.cpp \\\n\t\t\tp_arms.cpp \\\n\t\t\tplatform.cpp \\\n\t\t\tplayer.cpp \\\n\t\t\tplayerstats.cpp \\\n\t\t\tprofile.cpp \\\n\t\t\treplay.cpp \\\n\t\t\tscreeneffect.cpp \\\n\t\t\tsettings.cpp \\\n\t\t\tslope.cpp \\\n\t\t\tstageboss.cpp \\\n\t\t\tstagedata.cpp \\\n\t\t\tstatusbar.cpp \\\n\t\t\ttrig.cpp \\\n\t\t\ttsc.cpp \\\n\t\t\tai/ai.cpp \\\n\t\t\tai/balrog_common.cpp \\\n\t\t\tai/IrregularBBox.cpp \\\n\t\t\tautogen/AssignSprites.cpp \\\n\t\t\tautogen/objnames.cpp \\\n\t\t\tcommon/BList.cpp \\\n\t\t\tcommon/bufio.cpp \\\n\t\t\tcommon/DBuffer.cpp \\\n\t\t\tcommon/DString.cpp \\\n\t\t\tcommon/FileBuffer.cpp \\\n\t\t\tcommon/InitList.cpp \\\n\t\t\tcommon/misc_comm.cpp \\\n\t\t\tcommon/stat.cpp \\\n\t\t\tcommon/StringList.cpp \\\n\t\t\tendgame/credits.cpp \\\n\t\t\tendgame/CredReader.cpp \\\n\t\t\tendgame/island.cpp \\\n\t\t\tendgame/misc_end.cpp \\\n\t\t\textract/crc.cpp \\\n\t\t\textract/extract.cpp \\\n\t\t\textract/extractfiles.cpp \\\n\t\t\textract/extractpxt.cpp \\\n\t\t\textract/extractstages.cpp \\\n\t\t\tgraphics/font.cpp \\\n\t\t\tgraphics/graphics.cpp \\\n\t\t\tgraphics/nxsurface.cpp \\\n\t\t\tgraphics/palette.cpp \\\n\t\t\tgraphics/safemode.cpp \\\n\t\t\tgraphics/sprites.cpp \\\n\t\t\tgraphics/tileset.cpp \\\n\t\t\tintro/intro.cpp \\\n\t\t\tintro/title.cpp \\\n\t\t\tpause/dialog.cpp \\\n\t\t\tpause/message.cpp \\\n\t\t\tpause/objects.cpp \\\n\t\t\tpause/options.cpp \\\n\t\t\tpause/pause.cpp \\\n\t\t\tsiflib/sectSprites.cpp \\\n\t\t\tsiflib/sectStringArray.cpp \\\n\t\t\tsiflib/sif.cpp \\\n\t\t\tsiflib/sifloader.cpp \\\n\t\t\tsound/org.cpp \\\n\t\t\tsound/pxt.cpp \\\n\t\t\tsound/sound.cpp \\\n\t\t\tsound/sslib.cpp \\\n\t\t\tTextBox/ItemImage.cpp \\\n\t\t\tTextBox/SaveSelect.cpp \\\n\t\t\tTextBox/StageSelect.cpp \\\n\t\t\tTextBox/TextBox.cpp \\\n\t\t\tTextBox/YesNoPrompt.cpp \\\n\t\t\tai/almond/almond.cpp \\\n\t\t\tai/boss/balfrog.cpp \\\n\t\t\tai/boss/ballos.cpp \\\n\t\t\tai/boss/core.cpp \\\n\t\t\tai/boss/heavypress.cpp \\\n\t\t\tai/boss/ironhead.cpp \\\n\t\t\tai/boss/omega.cpp \\\n\t\t\tai/boss/sisters.cpp \\\n\t\t\tai/boss/undead_core.cpp \\\n\t\t\tai/boss/x.cpp \\\n\t\t\tai/egg/egg.cpp \\\n\t\t\tai/egg/egg2.cpp \\\n\t\t\tai/egg/igor.cpp \\\n\t\t\tai/final_battle/balcony.cpp \\\n\t\t\tai/final_battle/doctor.cpp \\\n\t\t\tai/final_battle/doctor_common.cpp \\\n\t\t\tai/final_battle/doctor_frenzied.cpp \\\n\t\t\tai/final_battle/final_misc.cpp \\\n\t\t\tai/final_battle/misery_battle.cpp \\\n\t\t\tai/final_battle/sidekicks.cpp \\\n\t\t\tai/first_cave/first_cave.cpp \\\n\t\t\tai/hell/ballos_misc.cpp \\\n\t\t\tai/hell/ballos_priest.cpp \\\n\t\t\tai/hell/hell.cpp \\\n\t\t\tai/last_cave/last_cave.cpp \\\n\t\t\tai/maze/balrog_boss_missiles.cpp \\\n\t\t\tai/maze/critter_purple.cpp \\\n\t\t\tai/maze/gaudi.cpp \\\n\t\t\tai/maze/labyrinth_m.cpp \\\n\t\t\tai/maze/maze.cpp \\\n\t\t\tai/maze/pooh_black.cpp \\\n\t\t\tai/npc/balrog.cpp \\\n\t\t\tai/npc/curly.cpp \\\n\t\t\tai/npc/curly_ai.cpp \\\n\t\t\tai/npc/misery_ai.cpp \\\n\t\t\tai/npc/npcguest.cpp \\\n\t\t\tai/npc/npcplayer.cpp \\\n\t\t\tai/npc/npcregu.cpp \\\n\t\t\tai/oside/oside.cpp \\\n\t\t\tai/plantation/plantation.cpp \\\n\t\t\tai/sand/curly_boss.cpp \\\n\t\t\tai/sand/puppy.cpp \\\n\t\t\tai/sand/sand.cpp \\\n\t\t\tai/sand/toroko_frenzied.cpp \\\n\t\t\tai/sym/smoke.cpp \\\n\t\t\tai/sym/sym.cpp \\\n\t\t\tai/village/balrog_boss_running.cpp \\\n\t\t\tai/village/ma_pignon.cpp \\\n\t\t\tai/village/village.cpp \\\n\t\t\tai/weapons/blade.cpp \\\n\t\t\tai/weapons/bubbler.cpp \\\n\t\t\tai/weapons/fireball.cpp \\\n\t\t\tai/weapons/missile.cpp \\\n\t\t\tai/weapons/nemesis.cpp \\\n\t\t\tai/weapons/polar_mgun.cpp \\\n\t\t\tai/weapons/snake.cpp \\\n\t\t\tai/weapons/spur.cpp \\\n\t\t\tai/weapons/weapons.cpp \\\n\t\t\tai/weapons/whimstar.cpp \\\n\t\t\tai/weed/balrog_boss_flying.cpp \\\n\t\t\tai/weed/frenzied_mimiga.cpp \\\n\t\t\tai/weed/weed.cpp \\\n\t\t\tplatform/Linux/vbesync.c \n\t\t\t\nOBJECTS =\tcaret.o \\\n\t\t\tconsole.o \\\n\t\t\tdebug.o \\\n\t\t\tfloattext.o \\\n\t\t\tgame.o \\\n\t\t\tinput.o \\\n\t\t\tinventory.o \\\n\t\t\tmain.o \\\n\t\t\tmap.o \\\n\t\t\tmap_system.o \\\n\t\t\tniku.o \\\n\t\t\tobject.o \\\n\t\t\tObjManager.o \\\n\t\t\tp_arms.o \\\n\t\t\tplatform.o \\\n\t\t\tplayer.o \\\n\t\t\tplayerstats.o \\\n\t\t\tprofile.o \\\n\t\t\treplay.o \\\n\t\t\tscreeneffect.o \\\n\t\t\tsettings.o \\\n\t\t\tslope.o \\\n\t\t\tstageboss.o \\\n\t\t\tstagedata.o \\\n\t\t\tstatusbar.o \\\n\t\t\ttrig.o \\\n\t\t\ttsc.o \\\n\t\t\tai.o \\\n\t\t\tbalrog_common.o \\\n\t\t\tIrregularBBox.o \\\n\t\t\tAssignSprites.o \\\n\t\t\tobjnames.o \\\n\t\t\tBList.o \\\n\t\t\tbufio.o \\\n\t\t\tDBuffer.o \\\n\t\t\tDString.o \\\n\t\t\tFileBuffer.o \\\n\t\t\tInitList.o \\\n\t\t\tmisc_comm.o \\\n\t\t\tstat.o \\\n\t\t\tStringList.o \\\n\t\t\tcredits.o \\\n\t\t\tCredReader.o \\\n\t\t\tisland.o \\\n\t\t\tmisc_end.o \\\n\t\t\tcrc.o \\\n\t\t\textract.o \\\n\t\t\textractfiles.o \\\n\t\t\textractpxt.o \\\n\t\t\textractstages.o \\\n\t\t\tfont.o \\\n\t\t\tgraphics.o \\\n\t\t\tnxsurface.o \\\n\t\t\tpalette.o \\\n\t\t\tsafemode.o \\\n\t\t\tsprites.o \\\n\t\t\ttileset.o \\\n\t\t\tintro.o \\\n\t\t\ttitle.o \\\n\t\t\tdialog.o \\\n\t\t\tmessage.o \\\n\t\t\tobjects.o \\\n\t\t\toptions.o \\\n\t\t\tpause.o \\\n\t\t\tsectSprites.o \\\n\t\t\tsectStringArray.o \\\n\t\t\tsif.o \\\n\t\t\tsifloader.o \\\n\t\t\torg.o \\\n\t\t\tpxt.o \\\n\t\t\tsound.o \\\n\t\t\tsslib.o \\\n\t\t\tItemImage.o \\\n\t\t\tSaveSelect.o \\\n\t\t\tStageSelect.o \\\n\t\t\tTextBox.o \\\n\t\t\tYesNoPrompt.o \\\n\t\t\talmond.o \\\n\t\t\tbalfrog.o \\\n\t\t\tballos.o \\\n\t\t\tcore.o \\\n\t\t\theavypress.o \\\n\t\t\tironhead.o \\\n\t\t\tomega.o \\\n\t\t\tsisters.o \\\n\t\t\tundead_core.o \\\n\t\t\tx.o \\\n\t\t\tegg.o \\\n\t\t\tegg2.o \\\n\t\t\tigor.o \\\n\t\t\tbalcony.o \\\n\t\t\tdoctor.o \\\n\t\t\tdoctor_common.o \\\n\t\t\tdoctor_frenzied.o \\\n\t\t\tfinal_misc.o \\\n\t\t\tmisery_battle.o \\\n\t\t\tsidekicks.o \\\n\t\t\tfirst_cave.o \\\n\t\t\tballos_misc.o \\\n\t\t\tballos_priest.o \\\n\t\t\thell.o \\\n\t\t\tlast_cave.o \\\n\t\t\tbalrog_boss_missiles.o \\\n\t\t\tcritter_purple.o \\\n\t\t\tgaudi.o \\\n\t\t\tlabyrinth_m.o \\\n\t\t\tmaze.o \\\n\t\t\tpooh_black.o \\\n\t\t\tbalrog.o \\\n\t\t\tcurly.o \\\n\t\t\tcurly_ai.o \\\n\t\t\tmisery_ai.o \\\n\t\t\tnpcguest.o \\\n\t\t\tnpcplayer.o \\\n\t\t\tnpcregu.o \\\n\t\t\toside.o \\\n\t\t\tplantation.o \\\n\t\t\tcurly_boss.o \\\n\t\t\tpuppy.o \\\n\t\t\tsand.o \\\n\t\t\ttoroko_frenzied.o \\\n\t\t\tsmoke.o \\\n\t\t\tsym.o \\\n\t\t\tbalrog_boss_running.o \\\n\t\t\tma_pignon.o \\\n\t\t\tvillage.o \\\n\t\t\tblade.o \\\n\t\t\tbubbler.o \\\n\t\t\tfireball.o \\\n\t\t\tmissile.o \\\n\t\t\tnemesis.o \\\n\t\t\tpolar_mgun.o \\\n\t\t\tsnake.o \\\n\t\t\tspur.o \\\n\t\t\tweapons.o \\\n\t\t\twhimstar.o \\\n\t\t\tbalrog_boss_flying.o \\\n\t\t\tfrenzied_mimiga.o \\\n\t\t\tweed.o \\\n\t\t\tvbesync.o \n\t\t\t\nTARGET        = nx.exe\n\nfirst: all\n####### Implicit rules\n\n.SUFFIXES: .o .c .cpp .cc .cxx .C\n\n.cpp.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cc.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cxx.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.C.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.c.o:\n\t$(CC) -c $(CFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n####### Build rules\n\nall: $(TARGET)\n\n$(TARGET):  $(OBJECTS) nx_res.o\n\t$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)\n\t\nnx_res.o: nx.rc\n\twindres -i nx.rc -o nx_res.o --include-dir=. $(DEFINES)\n\nclean: \n\t-$(DEL_FILE) $(OBJECTS) nx_res.o\n\t-$(DEL_FILE) *~ core *.core\n\n####### Sub-libraries\n\ndistclean: clean\n\t-$(DEL_FILE) $(TARGET) \n\n####### Compile\n\ncaret.o: caret.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tcaret.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp\n\nconsole.o: console.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tconsole.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp\n\ndebug.o: debug.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tdebug.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp\n\nfloattext.o: floattext.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tfloattext.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp\n\ngame.o: game.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tintro/intro.h \\\n\t\tintro/title.h \\\n\t\tpause/pause.h \\\n\t\tpause/options.h \\\n\t\tinventory.h \\\n\t\tmap_system.h \\\n\t\tprofile.h \\\n\t\tgame.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp\n\ninput.o: input.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinput.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp\n\ninventory.o: inventory.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinventory.h \\\n\t\tinventory.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp\n\nmain.o: main.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tmain.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp\n\nmap.o: map.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp\n\nmap_system.o: map_system.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap_system.h \\\n\t\tmap_system.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp\n\nniku.o: niku.cpp niku.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp\n\nobject.o: object.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tobject.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp\n\nObjManager.o: ObjManager.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tObjManager.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp\n\np_arms.o: p_arms.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tp_arms.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp\n\nplatform.o: platform.cpp config.h \\\n\t\tplatform.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp\n\nplayer.o: player.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp\n\nplayerstats.o: playerstats.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayerstats.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp\n\nprofile.o: profile.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tprofile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp\n\nreplay.o: replay.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\treplay.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp\n\nscreeneffect.o: screeneffect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tscreeneffect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp\n\nsettings.o: settings.cpp settings.h \\\n\t\tinput.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tsettings.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp\n\nslope.o: slope.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tslope.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp\n\nstageboss.o: stageboss.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstageboss.fdh \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/ballos.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp\n\nstagedata.o: stagedata.cpp stagedata.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp\n\nstatusbar.o: statusbar.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstatusbar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp\n\ntrig.o: trig.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\ttrig.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp\n\ntsc.o: tsc.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tvararray.h \\\n\t\ttsc.fdh \\\n\t\ttsc_cmdtbl.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp\n\nai.o: ai/ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp\n\nbalrog_common.o: ai/balrog_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp\n\nIrregularBBox.o: ai/IrregularBBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/IrregularBBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp\n\nAssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp\n\nobjnames.o: autogen/objnames.cpp \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp\n\nBList.o: common/BList.cpp common/BList.h \\\n\t\tcommon/SupportDefs.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp\n\nbufio.o: common/bufio.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp\n\nDBuffer.o: common/DBuffer.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp\n\nDString.o: common/DString.cpp common/DString.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp\n\nFileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp\n\nInitList.o: common/InitList.cpp common/InitList.h \\\n\t\tcommon/InitList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp\n\nmisc_comm.o: common/misc_comm.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp\n\nstat.o: common/stat.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp\n\nStringList.o: common/StringList.cpp common/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp\n\ncredits.o: endgame/credits.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/credits.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp\n\nCredReader.o: endgame/CredReader.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/CredReader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp\n\nisland.o: endgame/island.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp\n\nmisc_end.o: endgame/misc_end.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp\n\ncrc.o: extract/crc.cpp extract/crc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp\n\nextract.o: extract/extract.cpp graphics/safemode.h \\\n\t\textract/extract.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp\n\nextractfiles.o: extract/extractfiles.cpp common/basics.h \\\n\t\tgraphics/safemode.h \\\n\t\textract/extractfiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp\n\nextractpxt.o: extract/extractpxt.cpp graphics/safemode.h \\\n\t\tcommon/basics.h \\\n\t\textract/extractpxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp\n\nextractstages.o: extract/extractstages.cpp graphics/safemode.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/basics.h \\\n\t\tstagedata.h \\\n\t\tmaprecord.h \\\n\t\textract/extractstages.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp\n\nfont.o: graphics/font.cpp config.h \\\n\t\tnx.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/font.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp\n\ngraphics.o: graphics/graphics.cpp config.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tdirnames.h \\\n\t\tgraphics/graphics.fdh \\\n\t\tl10n_strings.h \\\n\t\tnx_icon.h \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp\n\nnxsurface.o: graphics/nxsurface.cpp settings.h \\\n\t\tinput.h \\\n\t\tconfig.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/nxsurface.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp\n\npalette.o: graphics/palette.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/palette.h \\\n\t\tgraphics/palette.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp\n\nsafemode.o: graphics/safemode.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tgraphics/safemode.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp\n\nsprites.o: graphics/sprites.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tautogen/sprites.h \\\n\t\tcommon/StringList.h \\\n\t\tdirnames.h \\\n\t\tsettings.h \\\n\t\tinput.h \\\n\t\tgraphics/sprites.h \\\n\t\tgraphics/sprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp\n\ntileset.o: graphics/tileset.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/tileset.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp\n\nintro.o: intro/intro.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/stdai.h \\\n\t\tintro/intro.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp\n\ntitle.o: intro/title.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tintro/title.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp\n\ndialog.o: pause/dialog.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/dialog.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp\n\nmessage.o: pause/message.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/message.h \\\n\t\tpause/options.h \\\n\t\tpause/message.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp\n\nobjects.o: pause/objects.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tpause/options.h \\\n\t\tpause/objects.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp\n\noptions.o: pause/options.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.h \\\n\t\tpause/message.h \\\n\t\tl10n_strings.h \\\n\t\tpause/options.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp\n\npause.o: pause/pause.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/pause.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp\n\nsectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sectSprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp\n\nsectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sectStringArray.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp\n\nsif.o: siflib/sif.cpp siflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sif.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp\n\nsifloader.o: siflib/sifloader.cpp siflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sifloader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp\n\norg.o: sound/org.cpp common/basics.h \\\n\t\tsound/org.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sslib.h \\\n\t\tsound/org.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp\n\npxt.o: sound/pxt.cpp sound/pxt.h \\\n\t\tcommon/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/pxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp\n\nsound.o: sound/sound.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp\n\nsslib.o: sound/sslib.cpp common/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/sslib.fdh \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp\n\nItemImage.o: TextBox/ItemImage.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/ItemImage.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp\n\nSaveSelect.o: TextBox/SaveSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tinventory.h \\\n\t\tTextBox/SaveSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp\n\nStageSelect.o: TextBox/StageSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/StageSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp\n\nTextBox.o: TextBox/TextBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/TextBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp\n\nYesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/YesNoPrompt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp\n\nalmond.o: ai/almond/almond.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/almond/almond.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp\n\nbalfrog.o: ai/boss/balfrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/balfrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp\n\nballos.o: ai/boss/ballos.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ballos.h \\\n\t\tai/boss/ballos.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp\n\ncore.o: ai/boss/core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp\n\nheavypress.o: ai/boss/heavypress.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/heavypress.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp\n\nironhead.o: ai/boss/ironhead.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/ironhead.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp\n\nomega.o: ai/boss/omega.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/omega.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp\n\nsisters.o: ai/boss/sisters.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/sisters.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp\n\nundead_core.o: ai/boss/undead_core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/undead_core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp\n\nx.o: ai/boss/x.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/x.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp\n\negg.o: ai/egg/egg.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp\n\negg2.o: ai/egg/egg2.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh \\\n\t\tai/egg/egg2.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp\n\nigor.o: ai/egg/igor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/igor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp\n\nbalcony.o: ai/final_battle/balcony.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/balcony.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp\n\ndoctor.o: ai/final_battle/doctor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp\n\ndoctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp\n\ndoctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp\n\nfinal_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/final_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp\n\nmisery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp\n\nsidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/sidekicks.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp\n\nfirst_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/first_cave/first_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp\n\nballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp\n\nballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_priest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp\n\nhell.o: ai/hell/hell.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/hell.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp\n\nlast_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/plantation/plantation.fdh \\\n\t\tai/sym/sym.fdh \\\n\t\tai/last_cave/last_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp\n\nbalrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/maze/balrog_boss_missiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp\n\ncritter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/critter_purple.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp\n\ngaudi.o: ai/maze/gaudi.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/gaudi.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp\n\nlabyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/labyrinth_m.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp\n\nmaze.o: ai/maze/maze.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/maze.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp\n\npooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/pooh_black.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp\n\nbalrog.o: ai/npc/balrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/balrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp\n\ncurly.o: ai/npc/curly.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp\n\ncurly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly_ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp\n\nmisery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp\n\nnpcguest.o: ai/npc/npcguest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcguest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp\n\nnpcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp\n\nnpcregu.o: ai/npc/npcregu.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/npc/npcregu.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp\n\noside.o: ai/oside/oside.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/sand.fdh \\\n\t\tai/oside/oside.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp\n\nplantation.o: ai/plantation/plantation.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh \\\n\t\tai/plantation/plantation.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp\n\ncurly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/curly_boss.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp\n\npuppy.o: ai/sand/puppy.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp\n\nsand.o: ai/sand/sand.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/egg.fdh \\\n\t\tai/sand/sand.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp\n\ntoroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/toroko_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp\n\nsmoke.o: ai/sym/smoke.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/smoke.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp\n\nsym.o: ai/sym/sym.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/sym.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp\n\nbalrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/village/balrog_boss_running.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp\n\nma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/village/ma_pignon.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp\n\nvillage.o: ai/village/village.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/village/village.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp\n\nblade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/blade.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp\n\nbubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/bubbler.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp\n\nfireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/fireball.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp\n\nmissile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/missile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp\n\nnemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/nemesis.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp\n\npolar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/polar_mgun.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp\n\nsnake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/snake.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp\n\nspur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/spur.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp\n\nweapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/weapons.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp\n\nwhimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/whimstar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp\n\nbalrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/balrog_boss_flying.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp\n\nfrenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/frenzied_mimiga.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp\n\nweed.o: ai/weed/weed.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp\n\nvbesync.o: platform/Linux/vbesync.c \n\t$(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c\n\n####### Install\n\ninstall:   FORCE\n\nuninstall:   FORCE\n\nFORCE:\n\n"
  },
  {
    "path": "Makefile.motomagx",
    "content": "#############################################################################\n# Makefile for building: NXEngine (Motorola MotoMAGX phones) \n# More build information can be found here: https://github.com/EXL/NXEngine.git\n# Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013\n# Fixed by EXL on: 11/9/2013\n#############################################################################\n\n####### Compiler, tools and options\n\n# Please uncomment \"-D_L10N_CP1251\" for Russian Localization\nCC            = arm-linux-gnueabi-gcc\nCXX           = arm-linux-gnueabi-g++\nDEFINES       = -D_320X240 -D_MOTOMAGX -D_SDL_MIXER # -D_L10N_CP1251\nCFLAGS        = `sdl-config --cflags` -pipe -O2 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp $(DEFINES)\nCXXFLAGS      = `sdl-config --cflags` -pipe -O2 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp $(DEFINES)\nINCPATH       = -I/opt/toolchains/motomagx/arm-eabi2/include -I/opt/toolchains/motomagx/arm-eabi2/include/SDL -I.\nLINK          = arm-linux-gnueabi-g++\nLFLAGS        = -Wl,-O1 -Wl,-rpath,/opt/toolchains/motomagx/arm-eabi2/lib\nLIBS          = `sdl-config --libs` -lSDL_mixer -lSDL_ttf -lstdc++ -lm -lfreetype \nSTRIP         = arm-linux-gnueabi-strip\nDEL_FILE      = rm -f\n\n####### Output directory\n\nOBJECTS_DIR   = ./\n\n####### Files\n\nSOURCES = \tcaret.cpp \\\n\t\t\tconsole.cpp \\\n\t\t\tdebug.cpp \\\n\t\t\tfloattext.cpp \\\n\t\t\tgame.cpp \\\n\t\t\tinput.cpp \\\n\t\t\tinventory.cpp \\\n\t\t\tmain.cpp \\\n\t\t\tmap.cpp \\\n\t\t\tmap_system.cpp \\\n\t\t\tniku.cpp \\\n\t\t\tobject.cpp \\\n\t\t\tObjManager.cpp \\\n\t\t\tp_arms.cpp \\\n\t\t\tplatform.cpp \\\n\t\t\tplayer.cpp \\\n\t\t\tplayerstats.cpp \\\n\t\t\tprofile.cpp \\\n\t\t\treplay.cpp \\\n\t\t\tscreeneffect.cpp \\\n\t\t\tsettings.cpp \\\n\t\t\tslope.cpp \\\n\t\t\tstageboss.cpp \\\n\t\t\tstagedata.cpp \\\n\t\t\tstatusbar.cpp \\\n\t\t\ttrig.cpp \\\n\t\t\ttsc.cpp \\\n\t\t\tai/ai.cpp \\\n\t\t\tai/balrog_common.cpp \\\n\t\t\tai/IrregularBBox.cpp \\\n\t\t\tautogen/AssignSprites.cpp \\\n\t\t\tautogen/objnames.cpp \\\n\t\t\tcommon/BList.cpp \\\n\t\t\tcommon/bufio.cpp \\\n\t\t\tcommon/DBuffer.cpp \\\n\t\t\tcommon/DString.cpp \\\n\t\t\tcommon/FileBuffer.cpp \\\n\t\t\tcommon/InitList.cpp \\\n\t\t\tcommon/misc_comm.cpp \\\n\t\t\tcommon/stat.cpp \\\n\t\t\tcommon/StringList.cpp \\\n\t\t\tendgame/credits.cpp \\\n\t\t\tendgame/CredReader.cpp \\\n\t\t\tendgame/island.cpp \\\n\t\t\tendgame/misc_end.cpp \\\n\t\t\textract/crc.cpp \\\n\t\t\textract/extract.cpp \\\n\t\t\textract/extractfiles.cpp \\\n\t\t\textract/extractpxt.cpp \\\n\t\t\textract/extractstages.cpp \\\n\t\t\tgraphics/font.cpp \\\n\t\t\tgraphics/graphics.cpp \\\n\t\t\tgraphics/nxsurface.cpp \\\n\t\t\tgraphics/palette.cpp \\\n\t\t\tgraphics/safemode.cpp \\\n\t\t\tgraphics/sprites.cpp \\\n\t\t\tgraphics/tileset.cpp \\\n\t\t\tintro/intro.cpp \\\n\t\t\tintro/title.cpp \\\n\t\t\tpause/dialog.cpp \\\n\t\t\tpause/message.cpp \\\n\t\t\tpause/objects.cpp \\\n\t\t\tpause/options.cpp \\\n\t\t\tpause/pause.cpp \\\n\t\t\tsiflib/sectSprites.cpp \\\n\t\t\tsiflib/sectStringArray.cpp \\\n\t\t\tsiflib/sif.cpp \\\n\t\t\tsiflib/sifloader.cpp \\\n\t\t\tsound/org.cpp \\\n\t\t\tsound/pxt.cpp \\\n\t\t\tsound/sound.cpp \\\n\t\t\tsound/sslib.cpp \\\n\t\t\tTextBox/ItemImage.cpp \\\n\t\t\tTextBox/SaveSelect.cpp \\\n\t\t\tTextBox/StageSelect.cpp \\\n\t\t\tTextBox/TextBox.cpp \\\n\t\t\tTextBox/YesNoPrompt.cpp \\\n\t\t\tai/almond/almond.cpp \\\n\t\t\tai/boss/balfrog.cpp \\\n\t\t\tai/boss/ballos.cpp \\\n\t\t\tai/boss/core.cpp \\\n\t\t\tai/boss/heavypress.cpp \\\n\t\t\tai/boss/ironhead.cpp \\\n\t\t\tai/boss/omega.cpp \\\n\t\t\tai/boss/sisters.cpp \\\n\t\t\tai/boss/undead_core.cpp \\\n\t\t\tai/boss/x.cpp \\\n\t\t\tai/egg/egg.cpp \\\n\t\t\tai/egg/egg2.cpp \\\n\t\t\tai/egg/igor.cpp \\\n\t\t\tai/final_battle/balcony.cpp \\\n\t\t\tai/final_battle/doctor.cpp \\\n\t\t\tai/final_battle/doctor_common.cpp \\\n\t\t\tai/final_battle/doctor_frenzied.cpp \\\n\t\t\tai/final_battle/final_misc.cpp \\\n\t\t\tai/final_battle/misery_battle.cpp \\\n\t\t\tai/final_battle/sidekicks.cpp \\\n\t\t\tai/first_cave/first_cave.cpp \\\n\t\t\tai/hell/ballos_misc.cpp \\\n\t\t\tai/hell/ballos_priest.cpp \\\n\t\t\tai/hell/hell.cpp \\\n\t\t\tai/last_cave/last_cave.cpp \\\n\t\t\tai/maze/balrog_boss_missiles.cpp \\\n\t\t\tai/maze/critter_purple.cpp \\\n\t\t\tai/maze/gaudi.cpp \\\n\t\t\tai/maze/labyrinth_m.cpp \\\n\t\t\tai/maze/maze.cpp \\\n\t\t\tai/maze/pooh_black.cpp \\\n\t\t\tai/npc/balrog.cpp \\\n\t\t\tai/npc/curly.cpp \\\n\t\t\tai/npc/curly_ai.cpp \\\n\t\t\tai/npc/misery_ai.cpp \\\n\t\t\tai/npc/npcguest.cpp \\\n\t\t\tai/npc/npcplayer.cpp \\\n\t\t\tai/npc/npcregu.cpp \\\n\t\t\tai/oside/oside.cpp \\\n\t\t\tai/plantation/plantation.cpp \\\n\t\t\tai/sand/curly_boss.cpp \\\n\t\t\tai/sand/puppy.cpp \\\n\t\t\tai/sand/sand.cpp \\\n\t\t\tai/sand/toroko_frenzied.cpp \\\n\t\t\tai/sym/smoke.cpp \\\n\t\t\tai/sym/sym.cpp \\\n\t\t\tai/village/balrog_boss_running.cpp \\\n\t\t\tai/village/ma_pignon.cpp \\\n\t\t\tai/village/village.cpp \\\n\t\t\tai/weapons/blade.cpp \\\n\t\t\tai/weapons/bubbler.cpp \\\n\t\t\tai/weapons/fireball.cpp \\\n\t\t\tai/weapons/missile.cpp \\\n\t\t\tai/weapons/nemesis.cpp \\\n\t\t\tai/weapons/polar_mgun.cpp \\\n\t\t\tai/weapons/snake.cpp \\\n\t\t\tai/weapons/spur.cpp \\\n\t\t\tai/weapons/weapons.cpp \\\n\t\t\tai/weapons/whimstar.cpp \\\n\t\t\tai/weed/balrog_boss_flying.cpp \\\n\t\t\tai/weed/frenzied_mimiga.cpp \\\n\t\t\tai/weed/weed.cpp \\\n\t\t\tplatform/Linux/vbesync.c \n\t\t\t\nOBJECTS =\tcaret.o \\\n\t\t\tconsole.o \\\n\t\t\tdebug.o \\\n\t\t\tfloattext.o \\\n\t\t\tgame.o \\\n\t\t\tinput.o \\\n\t\t\tinventory.o \\\n\t\t\tmain.o \\\n\t\t\tmap.o \\\n\t\t\tmap_system.o \\\n\t\t\tniku.o \\\n\t\t\tobject.o \\\n\t\t\tObjManager.o \\\n\t\t\tp_arms.o \\\n\t\t\tplatform.o \\\n\t\t\tplayer.o \\\n\t\t\tplayerstats.o \\\n\t\t\tprofile.o \\\n\t\t\treplay.o \\\n\t\t\tscreeneffect.o \\\n\t\t\tsettings.o \\\n\t\t\tslope.o \\\n\t\t\tstageboss.o \\\n\t\t\tstagedata.o \\\n\t\t\tstatusbar.o \\\n\t\t\ttrig.o \\\n\t\t\ttsc.o \\\n\t\t\tai.o \\\n\t\t\tbalrog_common.o \\\n\t\t\tIrregularBBox.o \\\n\t\t\tAssignSprites.o \\\n\t\t\tobjnames.o \\\n\t\t\tBList.o \\\n\t\t\tbufio.o \\\n\t\t\tDBuffer.o \\\n\t\t\tDString.o \\\n\t\t\tFileBuffer.o \\\n\t\t\tInitList.o \\\n\t\t\tmisc_comm.o \\\n\t\t\tstat.o \\\n\t\t\tStringList.o \\\n\t\t\tcredits.o \\\n\t\t\tCredReader.o \\\n\t\t\tisland.o \\\n\t\t\tmisc_end.o \\\n\t\t\tcrc.o \\\n\t\t\textract.o \\\n\t\t\textractfiles.o \\\n\t\t\textractpxt.o \\\n\t\t\textractstages.o \\\n\t\t\tfont.o \\\n\t\t\tgraphics.o \\\n\t\t\tnxsurface.o \\\n\t\t\tpalette.o \\\n\t\t\tsafemode.o \\\n\t\t\tsprites.o \\\n\t\t\ttileset.o \\\n\t\t\tintro.o \\\n\t\t\ttitle.o \\\n\t\t\tdialog.o \\\n\t\t\tmessage.o \\\n\t\t\tobjects.o \\\n\t\t\toptions.o \\\n\t\t\tpause.o \\\n\t\t\tsectSprites.o \\\n\t\t\tsectStringArray.o \\\n\t\t\tsif.o \\\n\t\t\tsifloader.o \\\n\t\t\torg.o \\\n\t\t\tpxt.o \\\n\t\t\tsound.o \\\n\t\t\tsslib.o \\\n\t\t\tItemImage.o \\\n\t\t\tSaveSelect.o \\\n\t\t\tStageSelect.o \\\n\t\t\tTextBox.o \\\n\t\t\tYesNoPrompt.o \\\n\t\t\talmond.o \\\n\t\t\tbalfrog.o \\\n\t\t\tballos.o \\\n\t\t\tcore.o \\\n\t\t\theavypress.o \\\n\t\t\tironhead.o \\\n\t\t\tomega.o \\\n\t\t\tsisters.o \\\n\t\t\tundead_core.o \\\n\t\t\tx.o \\\n\t\t\tegg.o \\\n\t\t\tegg2.o \\\n\t\t\tigor.o \\\n\t\t\tbalcony.o \\\n\t\t\tdoctor.o \\\n\t\t\tdoctor_common.o \\\n\t\t\tdoctor_frenzied.o \\\n\t\t\tfinal_misc.o \\\n\t\t\tmisery_battle.o \\\n\t\t\tsidekicks.o \\\n\t\t\tfirst_cave.o \\\n\t\t\tballos_misc.o \\\n\t\t\tballos_priest.o \\\n\t\t\thell.o \\\n\t\t\tlast_cave.o \\\n\t\t\tbalrog_boss_missiles.o \\\n\t\t\tcritter_purple.o \\\n\t\t\tgaudi.o \\\n\t\t\tlabyrinth_m.o \\\n\t\t\tmaze.o \\\n\t\t\tpooh_black.o \\\n\t\t\tbalrog.o \\\n\t\t\tcurly.o \\\n\t\t\tcurly_ai.o \\\n\t\t\tmisery_ai.o \\\n\t\t\tnpcguest.o \\\n\t\t\tnpcplayer.o \\\n\t\t\tnpcregu.o \\\n\t\t\toside.o \\\n\t\t\tplantation.o \\\n\t\t\tcurly_boss.o \\\n\t\t\tpuppy.o \\\n\t\t\tsand.o \\\n\t\t\ttoroko_frenzied.o \\\n\t\t\tsmoke.o \\\n\t\t\tsym.o \\\n\t\t\tbalrog_boss_running.o \\\n\t\t\tma_pignon.o \\\n\t\t\tvillage.o \\\n\t\t\tblade.o \\\n\t\t\tbubbler.o \\\n\t\t\tfireball.o \\\n\t\t\tmissile.o \\\n\t\t\tnemesis.o \\\n\t\t\tpolar_mgun.o \\\n\t\t\tsnake.o \\\n\t\t\tspur.o \\\n\t\t\tweapons.o \\\n\t\t\twhimstar.o \\\n\t\t\tbalrog_boss_flying.o \\\n\t\t\tfrenzied_mimiga.o \\\n\t\t\tweed.o \\\n\t\t\tvbesync.o \n\t\t\t\nTARGET        = nx.magx\n\nfirst: all\n####### Implicit rules\n\n.SUFFIXES: .o .c .cpp .cc .cxx .C\n\n.cpp.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cc.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.cxx.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.C.o:\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n.c.o:\n\t$(CC) -c $(CFLAGS) $(INCPATH) -o \"$@\" \"$<\"\n\n####### Build rules\n\nall: $(TARGET)\n\n$(TARGET):  $(OBJECTS)  \n\t$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)\n\t$(STRIP) $(TARGET)\n\nclean:\n\t-$(DEL_FILE) $(OBJECTS)\n\t-$(DEL_FILE) *~ core *.core\n\n####### Sub-libraries\n\ndistclean: clean\n\t-$(DEL_FILE) $(TARGET) \n\n####### Compile\n\ncaret.o: caret.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tcaret.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp\n\nconsole.o: console.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tconsole.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp\n\ndebug.o: debug.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tdebug.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp\n\nfloattext.o: floattext.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tfloattext.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp\n\ngame.o: game.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tintro/intro.h \\\n\t\tintro/title.h \\\n\t\tpause/pause.h \\\n\t\tpause/options.h \\\n\t\tinventory.h \\\n\t\tmap_system.h \\\n\t\tprofile.h \\\n\t\tgame.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp\n\ninput.o: input.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinput.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp\n\ninventory.o: inventory.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tinventory.h \\\n\t\tinventory.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp\n\nmain.o: main.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tmain.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp\n\nmap.o: map.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp\n\nmap_system.o: map_system.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tmap_system.h \\\n\t\tmap_system.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp\n\nniku.o: niku.cpp niku.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp\n\nobject.o: object.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tobject.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp\n\nObjManager.o: ObjManager.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tObjManager.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp\n\np_arms.o: p_arms.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tp_arms.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp\n\nplatform.o: platform.cpp config.h \\\n\t\tplatform.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp\n\nplayer.o: player.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp\n\nplayerstats.o: playerstats.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tplayerstats.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp\n\nprofile.o: profile.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tprofile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp\n\nreplay.o: replay.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\treplay.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp\n\nscreeneffect.o: screeneffect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tscreeneffect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp\n\nsettings.o: settings.cpp settings.h \\\n\t\tinput.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tsettings.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp\n\nslope.o: slope.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tslope.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp\n\nstageboss.o: stageboss.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstageboss.fdh \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/ballos.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp\n\nstagedata.o: stagedata.cpp stagedata.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp\n\nstatusbar.o: statusbar.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tstatusbar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp\n\ntrig.o: trig.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\ttrig.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp\n\ntsc.o: tsc.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tvararray.h \\\n\t\ttsc.fdh \\\n\t\ttsc_cmdtbl.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp\n\nai.o: ai/ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp\n\nbalrog_common.o: ai/balrog_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp\n\nIrregularBBox.o: ai/IrregularBBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/IrregularBBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp\n\nAssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp\n\nobjnames.o: autogen/objnames.cpp \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp\n\nBList.o: common/BList.cpp common/BList.h \\\n\t\tcommon/SupportDefs.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp\n\nbufio.o: common/bufio.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp\n\nDBuffer.o: common/DBuffer.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp\n\nDString.o: common/DString.cpp common/DString.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp\n\nFileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/basics.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp\n\nInitList.o: common/InitList.cpp common/InitList.h \\\n\t\tcommon/InitList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp\n\nmisc_comm.o: common/misc_comm.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp\n\nstat.o: common/stat.cpp common/basics.h \\\n\t\tcommon/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp\n\nStringList.o: common/StringList.cpp common/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp\n\ncredits.o: endgame/credits.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/credits.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/credits.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp\n\nCredReader.o: endgame/CredReader.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/CredReader.h \\\n\t\tendgame/CredReader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp\n\nisland.o: endgame/island.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/island.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp\n\nmisc_end.o: endgame/misc_end.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tendgame/misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp\n\ncrc.o: extract/crc.cpp extract/crc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp\n\nextract.o: extract/extract.cpp graphics/safemode.h \\\n\t\textract/extract.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp\n\nextractfiles.o: extract/extractfiles.cpp common/basics.h \\\n\t\tgraphics/safemode.h \\\n\t\textract/extractfiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp\n\nextractpxt.o: extract/extractpxt.cpp graphics/safemode.h \\\n\t\tcommon/basics.h \\\n\t\textract/extractpxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp\n\nextractstages.o: extract/extractstages.cpp graphics/safemode.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/basics.h \\\n\t\tstagedata.h \\\n\t\tmaprecord.h \\\n\t\textract/extractstages.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp\n\nfont.o: graphics/font.cpp config.h \\\n\t\tnx.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/font.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp\n\ngraphics.o: graphics/graphics.cpp config.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tdirnames.h \\\n\t\tgraphics/graphics.fdh \\\n\t\tl10n_strings.h \\\n\t\tnx_icon.h \n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp\n\nnxsurface.o: graphics/nxsurface.cpp settings.h \\\n\t\tinput.h \\\n\t\tconfig.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/nxsurface.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp\n\npalette.o: graphics/palette.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/palette.h \\\n\t\tgraphics/palette.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp\n\nsafemode.o: graphics/safemode.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tgraphics/safemode.h \\\n\t\tgraphics/safemode.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp\n\nsprites.o: graphics/sprites.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tautogen/sprites.h \\\n\t\tcommon/StringList.h \\\n\t\tdirnames.h \\\n\t\tsettings.h \\\n\t\tinput.h \\\n\t\tgraphics/sprites.h \\\n\t\tgraphics/sprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp\n\ntileset.o: graphics/tileset.cpp graphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tcommon/basics.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/tileset.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp\n\nintro.o: intro/intro.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/stdai.h \\\n\t\tintro/intro.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp\n\ntitle.o: intro/title.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tintro/title.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp\n\ndialog.o: pause/dialog.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/dialog.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp\n\nmessage.o: pause/message.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/message.h \\\n\t\tpause/options.h \\\n\t\tpause/message.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp\n\nobjects.o: pause/objects.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tcommon/llist.h \\\n\t\tpause/options.h \\\n\t\tpause/objects.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp\n\noptions.o: pause/options.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/options.h \\\n\t\tpause/dialog.h \\\n\t\tpause/message.h \\\n\t\tl10n_strings.h \\\n\t\tpause/options.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp\n\npause.o: pause/pause.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tpause/pause.fdh \\\n\t\tl10n_strings.h\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp\n\nsectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sectSprites.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp\n\nsectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/bufio.h \\\n\t\tcommon/bufio.fdh \\\n\t\tcommon/StringList.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sectStringArray.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp\n\nsif.o: siflib/sif.cpp siflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\tsiflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sectSprites.h \\\n\t\tsiflib/sectStringArray.h \\\n\t\tsiflib/sif.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp\n\nsifloader.o: siflib/sifloader.cpp siflib/sifloader.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tsiflib/sifloader.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp\n\norg.o: sound/org.cpp common/basics.h \\\n\t\tsound/org.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sslib.h \\\n\t\tsound/org.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp\n\npxt.o: sound/pxt.cpp sound/pxt.h \\\n\t\tcommon/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/pxt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp\n\nsound.o: sound/sound.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tsound/pxt.h \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp\n\nsslib.o: sound/sslib.cpp common/basics.h \\\n\t\tsound/sslib.h \\\n\t\tsound/sslib.fdh \\\n\t\tsound/sound.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp\n\nItemImage.o: TextBox/ItemImage.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/ItemImage.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp\n\nSaveSelect.o: TextBox/SaveSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tprofile.h \\\n\t\tinventory.h \\\n\t\tTextBox/SaveSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp\n\nStageSelect.o: TextBox/StageSelect.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/StageSelect.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp\n\nTextBox.o: TextBox/TextBox.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/TextBox.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp\n\nYesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tTextBox/YesNoPrompt.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp\n\nalmond.o: ai/almond/almond.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/almond/almond.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp\n\nbalfrog.o: ai/boss/balfrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/balfrog.h \\\n\t\tai/IrregularBBox.h \\\n\t\tai/boss/balfrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp\n\nballos.o: ai/boss/ballos.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ballos.h \\\n\t\tai/boss/ballos.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp\n\ncore.o: ai/boss/core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/almond/almond.h \\\n\t\tai/boss/core.h \\\n\t\tai/boss/core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp\n\nheavypress.o: ai/boss/heavypress.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/heavypress.h \\\n\t\tai/boss/heavypress.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp\n\nironhead.o: ai/boss/ironhead.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/ironhead.h \\\n\t\tai/boss/ironhead.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp\n\nomega.o: ai/boss/omega.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/omega.h \\\n\t\tai/boss/omega.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp\n\nsisters.o: ai/boss/sisters.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/sisters.h \\\n\t\tai/boss/sisters.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp\n\nundead_core.o: ai/boss/undead_core.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/undead_core.h \\\n\t\tai/boss/undead_core.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp\n\nx.o: ai/boss/x.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/boss/x.h \\\n\t\tai/boss/x.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp\n\negg.o: ai/egg/egg.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp\n\negg2.o: ai/egg/egg2.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/egg/egg.fdh \\\n\t\tai/egg/egg2.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp\n\nigor.o: ai/egg/igor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/igor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp\n\nbalcony.o: ai/final_battle/balcony.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/balcony.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp\n\ndoctor.o: ai/final_battle/doctor.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp\n\ndoctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor_common.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp\n\ndoctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/final_battle/doctor_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp\n\nfinal_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/final_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp\n\nmisery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp\n\nsidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/sidekicks.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp\n\nfirst_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/first_cave/first_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp\n\nballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_misc.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp\n\nballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/ballos_priest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp\n\nhell.o: ai/hell/hell.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/hell/hell.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp\n\nlast_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/plantation/plantation.fdh \\\n\t\tai/sym/sym.fdh \\\n\t\tai/last_cave/last_cave.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp\n\nbalrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/maze/balrog_boss_missiles.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp\n\ncritter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/critter_purple.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp\n\ngaudi.o: ai/maze/gaudi.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/gaudi.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp\n\nlabyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/labyrinth_m.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp\n\nmaze.o: ai/maze/maze.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/maze.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp\n\npooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/maze/pooh_black.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp\n\nbalrog.o: ai/npc/balrog.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/balrog.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp\n\ncurly.o: ai/npc/curly.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp\n\ncurly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/curly_ai.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp\n\nmisery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/misery.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp\n\nnpcguest.o: ai/npc/npcguest.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcguest.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp\n\nnpcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/npc/npcplayer.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp\n\nnpcregu.o: ai/npc/npcregu.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/final_battle/doctor.h \\\n\t\tai/npc/npcregu.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp\n\noside.o: ai/oside/oside.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/sand.fdh \\\n\t\tai/oside/oside.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp\n\nplantation.o: ai/plantation/plantation.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh \\\n\t\tai/plantation/plantation.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp\n\ncurly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/curly_boss.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp\n\npuppy.o: ai/sand/puppy.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/puppy.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp\n\nsand.o: ai/sand/sand.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/egg/egg.fdh \\\n\t\tai/sand/sand.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp\n\ntoroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sand/toroko_frenzied.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp\n\nsmoke.o: ai/sym/smoke.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/smoke.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp\n\nsym.o: ai/sym/sym.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/sym/sym.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp\n\nbalrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/balrog_common.h \\\n\t\tai/village/balrog_boss_running.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp\n\nma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/village/ma_pignon.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp\n\nvillage.o: ai/village/village.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh \\\n\t\tai/village/village.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp\n\nblade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/blade.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp\n\nbubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/bubbler.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp\n\nfireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/fireball.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp\n\nmissile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/missile.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp\n\nnemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/nemesis.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp\n\npolar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/polar_mgun.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp\n\nsnake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/snake.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp\n\nspur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/spur.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp\n\nweapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/weapons.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp\n\nwhimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \\\n\t\tai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weapons/whimstar.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp\n\nbalrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/balrog_boss_flying.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp\n\nfrenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/frenzied_mimiga.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp\n\nweed.o: ai/weed/weed.cpp ai/stdai.h \\\n\t\tnx.h \\\n\t\tconfig.h \\\n\t\tcommon/basics.h \\\n\t\tcommon/BList.h \\\n\t\tcommon/SupportDefs.h \\\n\t\tcommon/StringList.h \\\n\t\tcommon/DBuffer.h \\\n\t\tcommon/DString.h \\\n\t\tcommon/InitList.h \\\n\t\tgraphics/graphics.h \\\n\t\tgraphics/nxsurface.h \\\n\t\tgraphics/tileset.h \\\n\t\tgraphics/sprites.h \\\n\t\tsiflib/sif.h \\\n\t\tcommon/misc.fdh \\\n\t\ttrig.h \\\n\t\tautogen/sprites.h \\\n\t\tdirnames.h \\\n\t\tTextBox/TextBox.h \\\n\t\tTextBox/YesNoPrompt.h \\\n\t\tTextBox/ItemImage.h \\\n\t\tTextBox/StageSelect.h \\\n\t\tTextBox/SaveSelect.h \\\n\t\tgraphics/font.h \\\n\t\tinput.h \\\n\t\ttsc.h \\\n\t\tstageboss.h \\\n\t\tai/ai.h \\\n\t\tmap.h \\\n\t\tmaprecord.h \\\n\t\tstagedata.h \\\n\t\tstatusbar.h \\\n\t\tfloattext.h \\\n\t\tobject.h \\\n\t\tObjManager.h \\\n\t\tconsole.h \\\n\t\tdebug.h \\\n\t\tgame.h \\\n\t\tcaret.h \\\n\t\tscreeneffect.h \\\n\t\tsettings.h \\\n\t\tslope.h \\\n\t\tplayer.h \\\n\t\tp_arms.h \\\n\t\tai/weapons/whimstar.h \\\n\t\treplay.h \\\n\t\tcommon/FileBuffer.h \\\n\t\tplatform.h \\\n\t\tsound/sound.h \\\n\t\tai/weed/weed.fdh\n\t$(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp\n\nvbesync.o: platform/Linux/vbesync.c \n\t$(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c\n\n####### Install\n\ninstall:   FORCE\n\nuninstall:   FORCE\n\nFORCE:\n\n"
  },
  {
    "path": "NXEngine.pro",
    "content": "######################################################################\n# Written by EXL on Sun Sep 1 11:04:56 2013\n######################################################################\n\n# Platform Defines\n# -D_480X272        - Use widescreen 480x272 resolution.\n# -D_320X240        - Use normal 320x240 resolution.\n# -D_DINGUX         - Dingux platform and keyboard layout (Ritmix RZX-50, Dingoo A320, Dingoo A380, etc).\n# -D_MOTOMAGX       - MotoMAGX platform and keyboard layout (Motorola ZN5, Z6, E8, EM30, VE66, etc).\n# -D_MOTOEZX        - MotoEZX platform and keyboard layout (Motorola E2, E6, A1200, A1600).\n# -D_SDL_MIXER      - Don't use generatining music, *.xm and sounds playing via SDL_mixer.\n# -D_DEBUG          - Enable detailed debug output to the console.\n# -D_L10N_CP1251    - Enable russian localization (need a *.ttf font and russian data-files).\n\n# Global App Settings\nTEMPLATE = app\nCONFIG -= console\nCONFIG -= app_bundle\nCONFIG -= qt\nCONFIG += warn_off\nCONFIG -= l10n_rus\n\n# Platform section\n# Write here the necessary platform.\n# Available platforms (only for linux-mips-g++):\n######################\n# platform-rzx50 (default)\n# platform-a320\n######################\nlinux-mips-g++: CONFIG += platform-rzx50\n\n# Targets\nwin32-g++ | linux-g++ | linux-g++-64 { # Host\n    TARGET = nx\n} linux-mips-g++ {\n    TARGET = nx.dge\n} linux-arm-gnueabi-g++ { # MotoMAGX\n    TARGET = nx.magx\n} linux-arm-gnu-g++ | iwmmxt_le-g++ { # MotoEZX\n    TARGET = nx.ezx\n}\n\n# Strip release binary\nCONFIG(release, debug|release) {\n    !win32-g++: QMAKE_POST_LINK += $(STRIP) $(TARGET)\n}\n\n# Defines\nwin32-g++ | linux-g++ | linux-g++-64 { # Host\n    DEFINES +=\n} linux-mips-g++ { # Dingux\n    CONFIG(platform-rzx50, platform-rzx50 | platform-a320) { # RZX-50\n        DEFINES += _480X272 _DINGUX _SDL_MIXER\n    } CONFIG(platform-a320, platform-rzx50 | platform-a320) { # A320\n        DEFINES += _320X240 _DINGUX _SDL_MIXER\n    }\n} linux-arm-gnueabi-g++ { # MotoMAGX\n    DEFINES += _320X240 _MOTOMAGX _SDL_MIXER\n} linux-arm-gnu-g++ | iwmmxt_le-g++ { # MotoEZX\n    DEFINES += _320X240 _MOTOEZX _SDL_MIXER\n} linux-arm-gnueabi-g++ {\n    DEFINES += _BSD_SOURCE\n}\n\n# Debug\nCONFIG(debug, debug|release) {\n    DEFINES += DEBUG\n}\n\n# Localization\nl10n_rus {\n    DEFINES += _L10N_CP1251\n}\n\n# MotoEZX sdl-config\nEZX_SDL_CONFIG = /opt/toolchains/motoezx/bin/sdl-config\n\n# Platform C/C++ Flags, CPU Optimization\nlinux-mips-g++ { # Dingux\n    QMAKE_CFLAGS_RELEASE += -mabi=32 -msoft-float -ffast-math -G0\n    QMAKE_CXXFLAGS_RELEASE += $${QMAKE_CFLAGS_RELEASE}\n} linux-arm-gnueabi-g++ { # MotoMAGX\n    QMAKE_CFLAGS += $$system(sdl-config  --cflags)\n    QMAKE_CXXFLAGS += $${QMAKE_CFLAGS}\n    QMAKE_CFLAGS_RELEASE += -march=armv6j -mtune=arm1136jf-s -mfpu=vfp\n    QMAKE_CXXFLAGS_RELEASE += $${QMAKE_CFLAGS_RELEASE}\n} linux-arm-gnu-g++ | iwmmxt_le-g++ { # MotoEZX\n    QMAKE_CFLAGS += $$system($${EZX_SDL_CONFIG}  --cflags)\n    QMAKE_CXXFLAGS += $${QMAKE_CFLAGS}\n    QMAKE_CFLAGS_RELEASE += -mcpu=iwmmxt -mtune=iwmmxt -march=iwmmxt -marm\n    QMAKE_CXXFLAGS_RELEASE += $${QMAKE_CFLAGS_RELEASE}\n}\n\n# Headers\nINCLUDEPATH += .\n\nwin32-g++ { # Host MinGW Windows\n    INCLUDEPATH += C:/MinGW/include\n    INCLUDEPATH += C:/MinGW/include/SDL\n} linux-g++ | linux-g++-64 { # Host GCC Linux\n    INCLUDEPATH += /usr/include\n    INCLUDEPATH += /usr/include/SDL\n} linux-mips-g++ { # Dingux\n    INCLUDEPATH += /opt/mipsel-linux-uclibc/usr/include\n    INCLUDEPATH += /opt/mipsel-linux-uclibc/usr/include/SDL\n} linux-arm-gnueabi-g++ { # MotoMAGX\n    INCLUDEPATH += /opt/toolchains/motomagx/arm-eabi2/include\n    INCLUDEPATH += /opt/toolchains/motomagx/arm-eabi2/include/SDL\n} linux-arm-gnu-g++ { # MotoEZX\n    INCLUDEPATH += /opt/toolchains/motoezx/include/\n    INCLUDEPATH += /opt/toolchains/motoezx/include/SDL\n} haiku {\n    INCLUDEPATH += $$system(finddir B_SYSTEM_HEADERS_DIRECTORY)/SDL\n}\n\n# Librares\nwin32-g++ { # Host MinGW Windows\n    QMAKE_LFLAGS += -static -static-libgcc -static-libstdc++\n    LIBS += -lmingw32 -lSDL_ttf -lfreetype -lpng -lz -lSDLmain -lSDL -lgdi32 -lwinmm\n} linux-g++ | linux-g++-64 { # Host GCC Linux\n    LIBS += -lSDL -lSDL_ttf\n} linux-mips-g++ { # Dingux\n    LIBS += -lSDLmain -lSDL -lSDL_ttf -lSDL_mixer\n} linux-arm-gnueabi-g++ { # MotoMAGX\n    LIBS += $$system(sdl-config  --libs) -lSDL_mixer -lSDL_ttf -lstdc++ -lm -lfreetype\n} linux-arm-gnu-g++ { # MotoEZX\n    LIBS += $$system($${EZX_SDL_CONFIG}  --libs) -lSDL_mixer -lSDL_ttf -lstdc++ -lm -lfreetype\n} haiku {\n    LIBS += $$system(sdl-config  --libs) -lSDL_mixer -lSDL_ttf -lfreetype\n}\n\n# Additional MotoEZX files\nlinux-arm-gnu-g++ | iwmmxt_le-g++ {\n    DEPENDPATH += platform/EZX\n    HEADERS += platform/EZX/EZX_SDL_PollEvent.h\n    SOURCES += platform/EZX/EZX_SDL_PollEvent.cpp\n}\n\n# Win32 Icon\nwin32-g++: RC_FILE = nx.rc\n\nDEPENDPATH += . \\\n              ai \\\n              autogen \\\n              common \\\n              endgame \\\n              extract \\\n              graphics \\\n              intro \\\n              pause \\\n              siflib \\\n              sound \\\n              TextBox \\\n              ai/almond \\\n              ai/boss \\\n              ai/egg \\\n              ai/final_battle \\\n              ai/first_cave \\\n              ai/hell \\\n              ai/last_cave \\\n              ai/maze \\\n              ai/npc \\\n              ai/oside \\\n              ai/plantation \\\n              ai/sand \\\n              ai/sym \\\n              ai/village \\\n              ai/weapons \\\n              ai/weed \\\n              platform/Linux\n# Input\nHEADERS += caret.h \\\n           config.h \\\n           console.h \\\n           debug.h \\\n           dirnames.h \\\n           floattext.h \\\n           game.h \\\n           input.h \\\n           inventory.h \\\n           map.h \\\n           map_system.h \\\n           maprecord.h \\\n           nx.h \\\n           object.h \\\n           ObjManager.h \\\n           p_arms.h \\\n           platform.h \\\n           player.h \\\n           profile.h \\\n           replay.h \\\n           screeneffect.h \\\n           settings.h \\\n           slope.h \\\n           stageboss.h \\\n           stagedata.h \\\n           statusbar.h \\\n           trig.h \\\n           tsc.h \\\n           vararray.h \\\n           ai/ai.h \\\n           ai/balrog_common.h \\\n           ai/IrregularBBox.h \\\n           ai/stdai.h \\\n           autogen/asdefs.h \\\n           autogen/sprites.h \\\n           common/basics.h \\\n           common/BList.h \\\n           common/bufio.h \\\n           common/DBuffer.h \\\n           common/DString.h \\\n           common/FileBuffer.h \\\n           common/InitList.h \\\n           common/llist.h \\\n           common/StringList.h \\\n           common/SupportDefs.h \\\n           endgame/credits.h \\\n           endgame/CredReader.h \\\n           endgame/island.h \\\n           graphics/font.h \\\n           graphics/graphics.h \\\n           graphics/nxsurface.h \\\n           graphics/palette.h \\\n           graphics/safemode.h \\\n           graphics/sprites.h \\\n           graphics/tileset.h \\\n           intro/intro.h \\\n           intro/title.h \\\n           pause/dialog.h \\\n           pause/message.h \\\n           pause/options.h \\\n           pause/pause.h \\\n           siflib/sectSprites.h \\\n           siflib/sectStringArray.h \\\n           siflib/sif.h \\\n           siflib/sifloader.h \\\n           sound/org.h \\\n           sound/pxt.h \\\n           sound/sound.h \\\n           sound/sslib.h \\\n           TextBox/ItemImage.h \\\n           TextBox/SaveSelect.h \\\n           TextBox/StageSelect.h \\\n           TextBox/TextBox.h \\\n           TextBox/YesNoPrompt.h \\\n           ai/almond/almond.h \\\n           ai/boss/balfrog.h \\\n           ai/boss/ballos.h \\\n           ai/boss/core.h \\\n           ai/boss/heavypress.h \\\n           ai/boss/ironhead.h \\\n           ai/boss/omega.h \\\n           ai/boss/sisters.h \\\n           ai/boss/undead_core.h \\\n           ai/boss/x.h \\\n           ai/final_battle/doctor.h \\\n           ai/weapons/weapons.h \\\n           ai/weapons/whimstar.h \\\n           common/misc.fdh \\\n           caret.fdh \\\n           console.fdh \\\n           debug.fdh \\\n           floattext.fdh \\\n           game.fdh \\\n           input.fdh \\\n           inventory.fdh \\\n           main.fdh \\\n           map.fdh \\\n           map_system.fdh \\\n           niku.fdh \\\n           object.fdh \\\n           ObjManager.fdh \\\n           p_arms.fdh \\\n           platform.fdh \\\n           player.fdh \\\n           playerstats.fdh \\\n           profile.fdh \\\n           replay.fdh \\\n           screeneffect.fdh \\\n           settings.fdh \\\n           slope.fdh \\\n           stageboss.fdh \\\n           statusbar.fdh \\\n           trig.fdh \\\n           tsc.fdh \\\n           tsc_cmdtbl.h \\\n           ai/ai.fdh \\\n           ai/balrog_common.fdh \\\n           ai/IrregularBBox.fdh \\\n           common/bufio.fdh \\\n           common/DBuffer.fdh \\\n           common/DString.fdh \\\n           common/InitList.fdh \\\n           common/StringList.fdh \\\n           endgame/credits.fdh \\\n           endgame/CredReader.fdh \\\n           endgame/island.fdh \\\n           endgame/misc.fdh \\\n           extract/crc.fdh \\\n           extract/extract.fdh \\\n           extract/extractfiles.fdh \\\n           extract/extractpxt.fdh \\\n           extract/extractstages.fdh \\\n           graphics/font.fdh \\\n           graphics/graphics.fdh \\\n           graphics/nxsurface.fdh \\\n           graphics/palette.fdh \\\n           graphics/safemode.fdh \\\n           graphics/sprites.fdh \\\n           graphics/tileset.fdh \\\n           intro/intro.fdh \\\n           intro/title.fdh \\\n           pause/dialog.fdh \\\n           pause/message.fdh \\\n           pause/objects.fdh \\\n           pause/options.fdh \\\n           pause/pause.fdh \\\n           siflib/sectSprites.fdh \\\n           siflib/sectStringArray.fdh \\\n           siflib/sif.fdh \\\n           siflib/sifloader.fdh \\\n           sound/org.fdh \\\n           sound/pxt.fdh \\\n           sound/sound.fdh \\\n           sound/sslib.fdh \\\n           TextBox/ItemImage.fdh \\\n           TextBox/SaveSelect.fdh \\\n           TextBox/StageSelect.fdh \\\n           TextBox/TextBox.fdh \\\n           TextBox/YesNoPrompt.fdh \\\n           ai/almond/almond.fdh \\\n           ai/boss/balfrog.fdh \\\n           ai/boss/ballos.fdh \\\n           ai/boss/core.fdh \\\n           ai/boss/heavypress.fdh \\\n           ai/boss/ironhead.fdh \\\n           ai/boss/omega.fdh \\\n           ai/boss/sisters.fdh \\\n           ai/boss/undead_core.fdh \\\n           ai/boss/x.fdh \\\n           ai/weed/weed.fdh \\\n           ai/egg/egg.fdh \\\n           ai/egg/egg2.fdh \\\n           ai/egg/igor.fdh \\\n           ai/final_battle/balcony.fdh \\\n           ai/final_battle/doctor.fdh \\\n           ai/final_battle/doctor_common.fdh \\\n           ai/final_battle/doctor_frenzied.fdh \\\n           ai/final_battle/final_misc.fdh \\\n           ai/final_battle/misery.fdh \\\n           ai/final_battle/sidekicks.fdh \\\n           ai/first_cave/first_cave.fdh \\\n           ai/hell/ballos_misc.fdh \\\n           ai/hell/ballos_priest.fdh \\\n           ai/hell/hell.fdh \\\n           ai/plantation/plantation.fdh \\\n           ai/sym/sym.fdh \\\n           ai/last_cave/last_cave.fdh \\\n           ai/maze/balrog_boss_missiles.fdh \\\n           ai/maze/critter_purple.fdh \\\n           ai/maze/gaudi.fdh \\\n           ai/maze/labyrinth_m.fdh \\\n           ai/maze/maze.fdh \\\n           ai/maze/pooh_black.fdh \\\n           ai/npc/balrog.fdh \\\n           ai/npc/curly.fdh \\\n           ai/npc/curly_ai.fdh \\\n           ai/npc/npcguest.fdh \\\n           ai/npc/npcplayer.fdh \\\n           ai/npc/npcregu.fdh \\\n           ai/sand/sand.fdh \\\n           ai/oside/oside.fdh \\\n           ai/sand/puppy.fdh \\\n           ai/sand/curly_boss.fdh \\\n           ai/sand/toroko_frenzied.fdh \\\n           ai/sym/smoke.fdh \\\n           ai/village/balrog_boss_running.fdh \\\n           ai/village/ma_pignon.fdh \\\n           ai/village/village.fdh \\\n           ai/weapons/blade.fdh \\\n           ai/weapons/bubbler.fdh \\\n           ai/weapons/fireball.fdh \\\n           ai/weapons/missile.fdh \\\n           ai/weapons/nemesis.fdh \\\n           ai/weapons/polar_mgun.fdh \\\n           ai/weapons/snake.fdh \\\n           ai/weapons/spur.fdh \\\n           ai/weapons/weapons.fdh \\\n           ai/weapons/whimstar.fdh \\\n           ai/weed/balrog_boss_flying.fdh \\\n           ai/weed/frenzied_mimiga.fdh \\\n           l10n_strings.h \\\n           nx_icon.h\n\nSOURCES += caret.cpp \\\n           console.cpp \\\n           debug.cpp \\\n           floattext.cpp \\\n           game.cpp \\\n           input.cpp \\\n           inventory.cpp \\\n           main.cpp \\\n           map.cpp \\\n           map_system.cpp \\\n           niku.cpp \\\n           object.cpp \\\n           ObjManager.cpp \\\n           p_arms.cpp \\\n           platform.cpp \\\n           player.cpp \\\n           playerstats.cpp \\\n           profile.cpp \\\n           replay.cpp \\\n           screeneffect.cpp \\\n           settings.cpp \\\n           slope.cpp \\\n           stageboss.cpp \\\n           stagedata.cpp \\\n           statusbar.cpp \\\n           trig.cpp \\\n           tsc.cpp \\\n           ai/ai.cpp \\\n           ai/balrog_common.cpp \\\n           ai/IrregularBBox.cpp \\\n           autogen/AssignSprites.cpp \\\n           autogen/objnames.cpp \\\n           common/BList.cpp \\\n           common/bufio.cpp \\\n           common/DBuffer.cpp \\\n           common/DString.cpp \\\n           common/FileBuffer.cpp \\\n           common/InitList.cpp \\\n           common/misc_comm.cpp \\\n           common/stat.cpp \\\n           common/StringList.cpp \\\n           endgame/credits.cpp \\\n           endgame/CredReader.cpp \\\n           endgame/island.cpp \\\n           endgame/misc_end.cpp \\\n           extract/crc.cpp \\\n           extract/extract.cpp \\\n           extract/extractfiles.cpp \\\n           extract/extractpxt.cpp \\\n           extract/extractstages.cpp \\\n           graphics/font.cpp \\\n           graphics/graphics.cpp \\\n           graphics/nxsurface.cpp \\\n           graphics/palette.cpp \\\n           graphics/safemode.cpp \\\n           graphics/sprites.cpp \\\n           graphics/tileset.cpp \\\n           intro/intro.cpp \\\n           intro/title.cpp \\\n           pause/dialog.cpp \\\n           pause/message.cpp \\\n           pause/objects.cpp \\\n           pause/options.cpp \\\n           pause/pause.cpp \\\n           siflib/sectSprites.cpp \\\n           siflib/sectStringArray.cpp \\\n           siflib/sif.cpp \\\n           siflib/sifloader.cpp \\\n           sound/org.cpp \\\n           sound/pxt.cpp \\\n           sound/sound.cpp \\\n           sound/sslib.cpp \\\n           TextBox/ItemImage.cpp \\\n           TextBox/SaveSelect.cpp \\\n           TextBox/StageSelect.cpp \\\n           TextBox/TextBox.cpp \\\n           TextBox/YesNoPrompt.cpp \\\n           ai/almond/almond.cpp \\\n           ai/boss/balfrog.cpp \\\n           ai/boss/ballos.cpp \\\n           ai/boss/core.cpp \\\n           ai/boss/heavypress.cpp \\\n           ai/boss/ironhead.cpp \\\n           ai/boss/omega.cpp \\\n           ai/boss/sisters.cpp \\\n           ai/boss/undead_core.cpp \\\n           ai/boss/x.cpp \\\n           ai/egg/egg.cpp \\\n           ai/egg/egg2.cpp \\\n           ai/egg/igor.cpp \\\n           ai/final_battle/balcony.cpp \\\n           ai/final_battle/doctor.cpp \\\n           ai/final_battle/doctor_common.cpp \\\n           ai/final_battle/doctor_frenzied.cpp \\\n           ai/final_battle/final_misc.cpp \\\n           ai/final_battle/misery_battle.cpp \\\n           ai/final_battle/sidekicks.cpp \\\n           ai/first_cave/first_cave.cpp \\\n           ai/hell/ballos_misc.cpp \\\n           ai/hell/ballos_priest.cpp \\\n           ai/hell/hell.cpp \\\n           ai/last_cave/last_cave.cpp \\\n           ai/maze/balrog_boss_missiles.cpp \\\n           ai/maze/critter_purple.cpp \\\n           ai/maze/gaudi.cpp \\\n           ai/maze/labyrinth_m.cpp \\\n           ai/maze/maze.cpp \\\n           ai/maze/pooh_black.cpp \\\n           ai/npc/balrog.cpp \\\n           ai/npc/curly.cpp \\\n           ai/npc/curly_ai.cpp \\\n           ai/npc/misery_ai.cpp \\\n           ai/npc/npcguest.cpp \\\n           ai/npc/npcplayer.cpp \\\n           ai/npc/npcregu.cpp \\\n           ai/oside/oside.cpp \\\n           ai/plantation/plantation.cpp \\\n           ai/sand/curly_boss.cpp \\\n           ai/sand/puppy.cpp \\\n           ai/sand/sand.cpp \\\n           ai/sand/toroko_frenzied.cpp \\\n           ai/sym/smoke.cpp \\\n           ai/sym/sym.cpp \\\n           ai/village/balrog_boss_running.cpp \\\n           ai/village/ma_pignon.cpp \\\n           ai/village/village.cpp \\\n           ai/weapons/blade.cpp \\\n           ai/weapons/bubbler.cpp \\\n           ai/weapons/fireball.cpp \\\n           ai/weapons/missile.cpp \\\n           ai/weapons/nemesis.cpp \\\n           ai/weapons/polar_mgun.cpp \\\n           ai/weapons/snake.cpp \\\n           ai/weapons/spur.cpp \\\n           ai/weapons/weapons.cpp \\\n           ai/weapons/whimstar.cpp \\\n           ai/weed/balrog_boss_flying.cpp \\\n           ai/weed/frenzied_mimiga.cpp \\\n           ai/weed/weed.cpp \\\n           platform/Linux/vbesync.c\n\nOTHER_FILES += nx.rc \\\n               README.md\n"
  },
  {
    "path": "ObjManager.cpp",
    "content": "\n#include \"nx.h\"\n#include \"common/llist.h\"\n#include \"ObjManager.h\"\n#include \"ObjManager.fdh\"\n\nstatic Object ZERO_OBJECT;\nstatic Player ZERO_PLAYER;\n\nObject *firstobject = NULL, *lastobject = NULL;\nObject *lowestobject = NULL, *highestobject = NULL;\n\n/*\nvoid c------------------------------() {}\n*/\n\nObject *CreateObject(int x, int y, int type, int xinertia, int yinertia,\n\t\t\t\t\tint dir, Object *linkedobject, uint32_t createflags)\n{\nObject *o;\n\n\t// create the structure\n\tif (type != OBJ_PLAYER)\n\t{\n\t\to = new Object;\n\t\t*o = ZERO_OBJECT;\t// safely clears all members\n\t}\n\telse\n\t{\n\t\tPlayer *p = new Player;\n\t\t*p = ZERO_PLAYER;\n\t\to = (Object *)p;\n\t}\n\t\n\t// initialize\n\to->SetType(type);\n\to->flags = objprop[type].defaultflags;\n\to->DamageText = new FloatText(SPR_REDNUMBERS);\n\t\n\to->x = x - (sprites[o->sprite].spawn_point.x << CSF);\n\to->y = y - (sprites[o->sprite].spawn_point.y << CSF);\n\to->dir = dir;\n\to->xinertia = xinertia;\n\to->yinertia = yinertia;\n\to->linkedobject = linkedobject;\n\t\n\t// add into list\n\tLL_ADD_END(o, prev, next, firstobject, lastobject);\n\tLL_ADD_END(o, lower, higher, lowestobject, highestobject);\n\t\n\t// set it's initial blocked states, but do not update blockedstates on objects starting\n\t// with nullsprite-- the reason is for objects whose sprite is set after being spawned\n\tif (o->sprite != SPR_NULL)\n\t\to->UpdateBlockStates(ALLDIRMASK);\n\t\n\tif (!(createflags & CF_NO_SPAWN_EVENT))\n\t\to->OnSpawn();\n\t\n\treturn o;\n}\n\nObject *CreateObject(int x, int y, int type)\n{\n\treturn CreateObject(x, y, type, 0, 0, RIGHT, NULL, CF_DEFAULT);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// update the blocked states of all objects\nvoid Objects::UpdateBlockStates(void)\n{\n\tObject *o = firstobject;\n\twhile(o)\n\t{\n\t\to->lastblockl = o->blockl;\n\t\to->lastblockr = o->blockr;\n\t\to->lastblocku = o->blocku;\n\t\to->lastblockd = o->blockd;\n\t\t\n\t\to->UpdateBlockStates(ALLDIRMASK);\n\t\to = o->next;\n\t}\n}\n\n// returns true if the bounding boxes of the two given objects are touching\nbool hitdetect(Object *o1, Object *o2)\n{\nSIFSprite *s1, *s2;\nint32_t rect1x1, rect1y1, rect1x2, rect1y2;\nint32_t rect2x1, rect2y1, rect2x2, rect2y2;\n\t\n\t// get the sprites used by the two objects\n\ts1 = o1->Sprite();\n\ts2 = o2->Sprite();\n\t\n\t// get the bounding rectangle of the first object\n\trect1x1 = o1->x + (s1->bbox.x1 << CSF);\n\trect1x2 = o1->x + (s1->bbox.x2 << CSF);\n\trect1y1 = o1->y + (s1->bbox.y1 << CSF);\n\trect1y2 = o1->y + (s1->bbox.y2 << CSF);\n\t\n\t// get the bounding rectangle of the second object\n\trect2x1 = o2->x + (s2->bbox.x1 << CSF);\n\trect2x2 = o2->x + (s2->bbox.x2 << CSF);\n\trect2y1 = o2->y + (s2->bbox.y1 << CSF);\n\trect2y2 = o2->y + (s2->bbox.y2 << CSF);\n\t\n\t// find out if the rectangles overlap\n\tif ((rect1x1 < rect2x1) && (rect1x2 < rect2x1)) return false;\n\tif ((rect1x1 > rect2x2) && (rect1x2 > rect2x2)) return false;\n\tif ((rect1y1 < rect2y1) && (rect1y2 < rect2y1)) return false;\n\tif ((rect1y1 > rect2y2) && (rect1y2 > rect2y2)) return false;\n\t\n\treturn true;\n}\n\n// returns true if the solidity boxes of the two given objects are touching\nbool solidhitdetect(Object *o1, Object *o2)\n{\nSIFSprite *s1, *s2;\nint32_t rect1x1, rect1y1, rect1x2, rect1y2;\nint32_t rect2x1, rect2y1, rect2x2, rect2y2;\n\t\n\t// get the sprites used by the two objects\n\ts1 = o1->Sprite();\n\ts2 = o2->Sprite();\n\t\n\t// get the bounding rectangle of the first object\n\trect1x1 = o1->x + (s1->solidbox.x1 << CSF);\n\trect1x2 = o1->x + (s1->solidbox.x2 << CSF);\n\trect1y1 = o1->y + (s1->solidbox.y1 << CSF);\n\trect1y2 = o1->y + (s1->solidbox.y2 << CSF);\n\t\n\t// get the bounding rectangle of the second object\n\trect2x1 = o2->x + (s2->solidbox.x1 << CSF);\n\trect2x2 = o2->x + (s2->solidbox.x2 << CSF);\n\trect2y1 = o2->y + (s2->solidbox.y1 << CSF);\n\trect2y2 = o2->y + (s2->solidbox.y2 << CSF);\n\t\n\t// find out if the rectangles overlap\n\tif ((rect1x1 < rect2x1) && (rect1x2 < rect2x1)) return false;\n\tif ((rect1x1 > rect2x2) && (rect1x2 > rect2x2)) return false;\n\tif ((rect1y1 < rect2y1) && (rect1y2 < rect2y1)) return false;\n\tif ((rect1y1 > rect2y2) && (rect1y2 > rect2y2)) return false;\n\t\n\treturn true;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// runs all entity AI routines\nvoid Objects::RunAI(void)\n{\nObject *o;\n\n\t// because we handle objects in order of their creation and have a separate list\n\t// for display order, we can't ever run AI twice in a frame because of z-order\n\t// rearrangement, and 2) objects created by other objects are added to the end of\n\t// the list and given a chance to run their AI routine before being displayed.\n\tFOREACH_OBJECT(o)\n\t{\n\t\tif (!o->deleted)\n\t\t\to->RunAI();\n\t}\n}\n\n\n// the most important thing it does is apply x/y inertia to the objects.\nvoid Objects::PhysicsSim(void)\n{\nObject *o;\nint xinertia, yinertia;\n\n\tFOREACH_OBJECT(o)\n\t{\n\t\tif (o != player && !o->deleted)\t\t// player is moved in PDoPhysics\n\t\t{\n\t\t\tif (!(o->flags & FLAG_IGNORE_SOLID) && \\\n\t\t\t\t!(o->nxflags & NXFLAG_NO_RESET_YINERTIA))\n\t\t\t{\n\t\t\t\tif (o->blockd && o->yinertia > 0) o->yinertia = 0;\n\t\t\t\tif (o->blocku && o->yinertia < 0) o->yinertia = 0;\n\t\t\t}\n\t\t\t\n\t\t\t// apply inertia to X,Y position\n\t\t\txinertia = o->xinertia;\n\t\t\tyinertia = o->yinertia;\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\tif (o->nxflags & NXFLAG_SLOW_X_WHEN_HURT) xinertia >>= 1;\n\t\t\t\tif (o->nxflags & NXFLAG_SLOW_Y_WHEN_HURT) yinertia >>= 1;\n\t\t\t}\n\t\t\t\n\t\t\to->apply_xinertia(xinertia);\n\t\t\to->apply_yinertia(yinertia);\n\t\t\t\n\t\t\t// flag_solid_brick objects push player as they move\n\t\t\tif (o->flags & FLAG_SOLID_BRICK)\n\t\t\t{\n\t\t\t\to->PushPlayerOutOfWay(xinertia, yinertia);\n\t\t\t}\n\t\t\telse if (o->damage > 0)\n\t\t\t{\n\t\t\t\t// have enemies hurt you when you touch them\n\t\t\t\t// (solid-brick objects do this in PHandleSolidBrickObjects)\n\t\t\t\tif (hitdetect(o, player))\n\t\t\t\t\to->DealContactDamage();\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// returns how many objects exist of the given type\nint Objects::CountType(int objtype)\n{\n\tint count = 0;\n\tObject *o;\n\t\n\tFOREACH_OBJECT(o)\n\t{\n\t\tif (o->type == objtype)\n\t\t\tcount++;\n\t}\n\t\n\treturn count;\n}\n\n// returns the first object of type objtype or NULL\nObject *Objects::FindByType(int objtype)\n{\n\tObject *o;\n\tFOREACH_OBJECT(o)\n\t{\n\t\tif (o->type == objtype)\n\t\t\treturn o;\n\t}\n\t\n\treturn NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// free objects deleted earlier via ObjDel\nvoid Objects::CullDeleted(void)\n{\nObject *o, *next;\n\n\to = firstobject;\n\twhile(o)\n\t{\n\t\tnext = o->next;\n\t\t\n\t\tif (o->deleted)\n\t\t{\n\t\t\to->Destroy();\n\t\t}\n\t\t\n\t\to = next;\n\t}\n}\n\n// deletes all objects. if delete_player is true, also deletes the player.\n// used by load_pxe to reset the game in preperation for loading a new maplayer->\nvoid Objects::DestroyAll(bool delete_player)\n{\nObject *o, *next;\n\n\to = firstobject;\n\twhile(o)\n\t{\n\t\tnext = o->next;\n\t\t\n\t\tif (o != player)\n\t\t{\n\t\t\to->Destroy();\n\t\t}\n\t\t\n\t\to = next;\n\t}\n\t\n\t// must do this last to avoid crashes as player ptr gets invalidated\n\tif (delete_player)\n\t{\n\t\tplayer->Destroy();\n\t}\n\t\n\tmemset(ID2Lookup, 0, sizeof(ID2Lookup));\n}\n\n\n"
  },
  {
    "path": "ObjManager.fdh",
    "content": "//hash:3b98a341\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//------------------[referenced from ObjManager.cpp]-----------------//\nObject *CreateObject(int x, int y, int type);\nbool hitdetect(Object *o1, Object *o2);\nbool solidhitdetect(Object *o1, Object *o2);\n\n"
  },
  {
    "path": "ObjManager.h",
    "content": "\n#ifndef _OBJMANAGER_H\n#define _OBJMANAGER_H\n\nnamespace Objects\n{\n\tvoid UpdateBlockStates(void);\n\tint CountType(int objtype);\n\t\n\tvoid RunAI(void);\n\tvoid PhysicsSim(void);\n\t\n\tint IsRearTopAttack(Object *o);\n\t\n\tvoid CullDeleted(void);\n\tvoid DestroyAll(bool delete_player);\n\t\n\tObject *FindByType(int type);\n};\n\n// synonyms\n#define CountObjectsOfType\t\tObjects::CountType\n#define FOREACH_OBJECT(O)\t\tfor(O=firstobject; O; O=O->next)\n\n// max expected objects to exist at once (for buffer allocation)\n#define MAX_OBJECTS\t\t\t\t1024\n\nenum CreateObjectFlags\n{\n\tCF_NO_SPAWN_EVENT\t= 0x01,\t\t// inhibit calling OnSpawn\n\t\n\tCF_DEFAULT\t\t\t= 0x00\n};\n\nObject *CreateObject(int x, int y, int type);\nObject *CreateObject(int x, int y, int type, int xinertia, int yinertia, \\\n\t\t\t\t\tint dir=0, Object *linkedobject=NULL, uint32_t createflags=CF_DEFAULT);\n\n\n// ObjProp definitions\nstruct ObjProp\n{\n\t// NXEngine-specific\n\tint sprite;\n\tint shaketime;\t\t\t// how long it shakes for when hit\n\t\n\tuint32_t defaultnxflags;\n\t\n\t// from npc.tbl\n\tint initial_hp;\n\tint xponkill;\n\tint damage;\n\tint hurt_sound, death_sound;\n\tint death_smoke_amt;\n\t\n\tuint32_t defaultflags;\n\t\n\t// AI routines\n\tstruct\n\t{\n\t\t// executed every tick\n\t\tvoid (*ontick)(Object *o);\n\t\t// executed after physics sim has been done\n\t\tvoid (*aftermove)(Object *o);\n\t\t// if present, then when damage to the object causes it's hp to <= 0,\n\t\t// this is executed instead of destroying the object or following the\n\t\t// normal boom/spawn powerups routine.\n\t\tvoid (*ondeath)(Object *o);\n\t\t// executed when the object is first created or it's type is changed.\n\t\t// intended for static objects which only require a small amount of\n\t\t// initilization. This is NOT guaranteed to be only called exactly once\n\t\t// for a given object.\n\t\tvoid (*onspawn)(Object *o);\n\t} ai_routines;\n};\n\n\nextern ObjProp objprop[OBJ_LAST];\nextern Object *firstobject, *lastobject;\nextern Object *lowestobject, *highestobject;\n\n#endif\n"
  },
  {
    "path": "README.md",
    "content": "NXEngine\n========\n\nNXEngine is open-source rewrite engine of the [Cave Story](https://en.wikipedia.org/wiki/Cave_Story) game. Author - [Caitlin (rogueeve) Shaw](http://nxengine.sourceforge.net/).\n\n![Ritmix RZX-50](screens/Cave_Story_Ritmix_1.png)\n\nThis repository contains source code of my NXEngine fork for various weak devices. I have added some engine improvements:\n\n1. Sound through SDL_mixer.\n2. Support for widescreen displays (480x272).\n3. Ports to various platforms.\n4. Russification.\n\n## Download\n\nYou can download ready-to-run packages with NXEngine and Cave Story here:\n\n- [On the page of EXL's Developer Blog](http://exlmoto.ru/nxengine/#4).\n- [On the page of Cave Story Tribute Fan Site](https://www.cavestory.org/download/cave-story.php).\n- [On the page of GitHub Releases](https://github.com/EXL/NXEngine/releases).\n\nRussian and English versions of this game are available.\n\n## Build instructions\n\nBuilding requires some SDL libraries: SDL-1.2, SDL_ttf-2.0, SDL_mixer-1.2 (optional). Please install developer versions of these libraries before building the project. You can open \"nx.pro\" project file in the [Qt Creator](https://www.qt.io/download) IDE for easy code navigation.\n\nPlatform defines:\n\n| Define | Description |\n| --- | --- |\n| `-D_480X272` | Use widescreen 480x272 resolution. |\n| `-D_320X240` | Use normal 320x240 resolution. |\n| `-D_DINGUX` | Dingux platform and keyboard layout (Ritmix RZX-50, Dingoo A320, Dingoo A380, etc). |\n| `-D_MOTOMAGX` | MotoMAGX platform and keyboard layout (Motorola ZN5, Z6, E8, EM30, VE66, etc). |\n| `-D_MOTOEZX` | MotoEZX platform and keyboard layout (Motorola E2, E6, A1200, A1600). |\n| `-D_SDL_MIXER` | Don't use realtime music generation, `*.xm` tracks and sounds will be played via SDL_mixer. |\n| `-D_DEBUG` | Enable detailed debug output to the console. |\n| `-D_L10N_CP1251` | Enable Russian l10n (you need a `*.ttf` font and Russian version of data-files). |\n\nPlease read [addition building information (in Russian)](http://exlmoto.ru/nxengine/#3) in the EXL's Developer Blog.\n\n## Screens\n\nRitmix RZX-50:\n\n![Ritmix RZX-50](screens/Cave_Story_Ritmix_2.png)\n\nWindows 8.1:\n\n![Windows 8.1](screens/Cave_Story_Windows.png)\n\nHaiku OS:\n\n![Haiku OS](screens/Cave_Story_HaikuOS.png)\n\n## Photos\n\n![Motorola ROKR E6](platform/EZX/NXEngine-EZX-ROKR_E6.jpg)\n\n## Videos\n\nDemonstration [video on YouTube](https://youtu.be/aZPgX9Ismq4) which showing launch Cave Story game with this engine on the Ritmix RZX-50 device.\n\n## More information\n\nPlease read [Porting Guide (in Russian)](http://exlmoto.ru/nxengine) for more info about porting NXEngine to various platforms.\n"
  },
  {
    "path": "TextBox/ItemImage.cpp",
    "content": "\n/*\n\tThe powerup display for textboxes.\n\tE.g. when you get a life capsule or new weapon and\n\t\t it shows you a picture of it.\n*/\n\n#include \"../nx.h\"\n#include \"ItemImage.h\"\n#include \"ItemImage.fdh\"\n\n#define ITEMBOX_W\t\t\t76\n#define ITEMBOX_H\t\t\t32\n\n#define ITEMBOX_X\t\t\t128\n#define ITEMBOX_Y\t\t\t120\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TB_ItemImage::ResetState()\n{\n\tfVisible = false;\n}\n\nvoid TB_ItemImage::SetVisible(bool enable)\n{\n\tfVisible = enable;\n}\n\nvoid TB_ItemImage::SetSprite(int sprite, int frame)\n{\n\tfSprite = sprite;\n\tfFrame = frame;\n\tfYOffset = 1;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TB_ItemImage::Draw(void)\n{\n\tif (!fVisible)\n\t\treturn;\n\t\n\t// animate moving item downwards into box\n\tint desty = (ITEMBOX_H / 2) - (sprites[fSprite].h / 2);\n\tif (++fYOffset > desty) fYOffset = desty;\n\t\n\t// draw the box frame\n\tTextBox::DrawFrame(ITEMBOX_X, ITEMBOX_Y, ITEMBOX_W, ITEMBOX_H);\n\t\n\t// draw the item\n\tint x = ITEMBOX_X + ((ITEMBOX_W / 2) - (sprites[fSprite].w / 2));\n\tif (sprites[fSprite].w == 14) x--;\t\t// hack for ArmsIcons\n\t\n\tdraw_sprite(x, ITEMBOX_Y + fYOffset, fSprite, fFrame);\n}\n\n\n\n\n\n"
  },
  {
    "path": "TextBox/ItemImage.fdh",
    "content": "//hash:00000000\n//automatically generated by Makegen\n"
  },
  {
    "path": "TextBox/ItemImage.h",
    "content": "\n#ifndef _ITEMIMAGE_H\n#define _ITEMIMAGE_H\n\nclass TB_ItemImage\n{\npublic:\n\tvoid ResetState();\n\tvoid Draw();\n\t\n\tvoid SetVisible(bool enable);\n\tvoid SetSprite(int sprite, int frame);\n\t\nprivate:\n\tbool fVisible;\n\tint fSprite, fFrame;\n\tint fYOffset;\n};\n\n\n#endif\n"
  },
  {
    "path": "TextBox/SaveSelect.cpp",
    "content": "\n/*\n\tThe save select box (for multiple save files).\n*/\n\n#include \"../nx.h\"\n#include \"../profile.h\"\n#include \"../inventory.h\"\n#include \"../replay.h\"\n#include \"TextBox.h\"\t// for textbox coordinates; MSG_W etc\n#include \"SaveSelect.h\"\n#include \"SaveSelect.fdh\"\n\n// moved here as static data so that the compiler will shut up about a circular dependency\n// that happens if you try to include profile.h from SaveSelect.h.\nstatic Profile fProfiles[MAX_SAVE_SLOTS];\nstatic bool fHaveProfile[MAX_SAVE_SLOTS];\nint fPicXOffset;\n\nTB_SaveSelect::TB_SaveSelect()\n{\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TB_SaveSelect::ResetState()\n{\n\tfVisible = false;\n}\n\nvoid TB_SaveSelect::SetVisible(bool enable, bool saving)\n{\n\tfVisible = enable;\n\tif (!enable) return;\n    game.showmapnametime = 0;\n\n    fCoords.w = 244;\n    fCoords.h = 152;\n\n#ifdef _480X272 // 480x272 widescreen fix\n    fCoords.x = (SCREEN_WIDTH / 2) - (fCoords.w / 2);\n    fCoords.y = 30;\n#else\n    fCoords.x = 38;\n    fCoords.y = 8;\n#endif\n\n\tfNumFiles = MAX_SAVE_SLOTS;\n\tfSaving = saving;\n\t\n\tfCurSel = settings->last_save_slot;\n\tfPicXOffset = -24;\n\t\n\t// load all profiles\n\tmemset(fHaveProfile, 0, sizeof(fHaveProfile));\n\tfor(int i=0;i<fNumFiles;i++)\n\t{\n\t\tif (!profile_load(GetProfileName(i), &fProfiles[i]))\n\t\t\tfHaveProfile[i] = true;\n\t}\n\t\n\ttextbox.ClearText();\n}\n\nbool TB_SaveSelect::IsVisible()\n{\n\treturn fVisible;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TB_SaveSelect::Run_Input()\n{\nint start;\n\n\tif (justpushed(DOWNKEY))\n\t{\n\t\tstart = fCurSel;\n\t\tfor(;;)\n\t\t{\n\t\t\tfCurSel++;\n\t\t\tif (fCurSel >= fNumFiles) fCurSel = 0;\n\t\t\t\n\t\t\tif (fSaving) break;\n\t\t\tif (fHaveProfile[fCurSel]) break;\n\t\t\tif (fCurSel == start) break;\n\t\t}\n\t\t\n\t\tsound(SND_MENU_MOVE);\n\t\tfPicXOffset = -24;\n\t}\n\t\n\tif (justpushed(UPKEY))\n\t{\n\t\tstart = fCurSel;\n\t\tfor(;;)\n\t\t{\n\t\t\tfCurSel--;\n\t\t\tif (fCurSel < 0) fCurSel = fNumFiles - 1;\n\t\t\t\n\t\t\tif (fSaving) break;\n\t\t\tif (fHaveProfile[fCurSel]) break;\n\t\t\tif (fCurSel == start) break;\n\t\t}\n\t\t\n\t\tsound(SND_MENU_MOVE);\n\t\tfPicXOffset = -24;\n\t}\n\t\n\tif (buttonjustpushed())\n\t{\n\t\t// when shown in a replay, the box is shown and everything just like what was done\n\t\t// originally, but we won't actually overwrite any save files.\n\t\tif (!Replay::IsPlaying())\n\t\t{\n\t\t\tif (fSaving)\n\t\t\t\tgame_save(fCurSel);\n\t\t\t\n\t\t\tsettings->last_save_slot = fCurSel;\n\t\t\tsettings_save();\t\t// record new save/load slot\n\t\t}\n\t\t\n\t\tSetVisible(false);\n\t\t\n\t\t// when the script hit the <SVP, it froze itself in an artifical <WAI9999\n\t\t// waiting for us to complete. Now unfreeze it so can say \"Game saved.\",\n\t\t// or for loading, just end.\n\t\tScriptInstance *s = GetCurrentScriptInstance();\n\t\tif (s) s->delaytimer = 0;\n\t}\n}\n\n\nvoid TB_SaveSelect::DrawProfile(int x, int y, int index)\n{\nProfile *p = &fProfiles[index];\nconst int w = fCoords.w - 33;\n\n\tint sidewd = sprites[SPR_SAVESELECTOR_SIDES].w;\n\tint repeatwd = w - (sidewd * 2);\n\tint frame = (index == fCurSel) ? 0 : 1;\n\t\n\tdraw_sprite(x, y, SPR_SAVESELECTOR_SIDES, frame, LEFT);\n\tdraw_sprite_repeating_x(x+sidewd, y, SPR_SAVESELECTOR_MIDDLE, frame, repeatwd);\n\tdraw_sprite(x+sidewd+repeatwd, y, SPR_SAVESELECTOR_SIDES, frame, RIGHT);\n\t\n\ty += 4;\n\tconst int FONT_SPACING = 5;\n\t\n\tif (fHaveProfile[index])\n\t{\n\t\tconst char *stage = map_get_stage_name(p->stage);\n\t\tfont_draw(x+8, y-1, stage, FONT_SPACING);\n\t\t\n\t\t// draw health.\n\t\tDrawHealth(x+w, y, p);\n\t}\n\telse if (fCurSel == index)\n\t{\n\t\tconst char *str = \"available\";\n\t\tint fx = (w / 2) - (GetFontWidth(str, FONT_SPACING) / 2);\n\t\tfont_draw(x+fx, y-1, str, FONT_SPACING);\n\t}\n}\n\n\nvoid TB_SaveSelect::DrawExtendedInfo()\n{\nProfile *p = &fProfiles[fCurSel];\nint x, y, s;\n\t\n\tif (fPicXOffset < 0)\n\t{\n\t\tfPicXOffset += 8;\n\t\tset_clip_rect(MSG_X+4, 0, SCREEN_WIDTH, SCREEN_HEIGHT);\n\t}\n\t\n\t// player pic\n\tdraw_sprite((MSG_X+8) + fPicXOffset, MSG_NORMAL_Y+8, SPR_SELECTOR_ARMS);\n\t\n\tx = (MSG_X + 12) + fPicXOffset;\n\ty = MSG_NORMAL_Y + 12;\n\ts = (p->equipmask & EQUIP_MIMIGA_MASK) ? SPR_MYCHAR_MIMIGA : SPR_MYCHAR;\n\t\n\tdraw_sprite(x, y, s, 0, RIGHT);\n\t\n\t// player gun\n\tif (p->curWeapon != WPN_NONE && p->curWeapon != WPN_BLADE)\n\t{\n\t\tint spr, frame;\n\t\tGetSpriteForGun(p->curWeapon, 0, &spr, &frame);\n\t\t\n\t\tdraw_sprite_at_dp(x + sprites[s].frame[0].dir[RIGHT].actionpoint.x, \\\n\t\t\t\t\t\t  y + sprites[s].frame[0].dir[RIGHT].actionpoint.y, \\\n\t\t\t\t\t\t  spr, frame, RIGHT);\n\t}\n\t\n\tclear_clip_rect();\n\t\n\t// whimsical stars\n\tif (p->equipmask & EQUIP_WHIMSTAR)\n\t{\n\t\tx = MSG_X + 12;\n\t\t\n\t\tfor(int i=0;i<3;i++)\n\t\t{\n\t\t\tstatic int frames[] = { 1, 0, 2 };\n\t\t\tdraw_sprite(x, y+20, SPR_WHIMSICAL_STAR, frames[i]);\n\t\t\tx += 10;\n\t\t}\n\t}\n\t\n\t// WEAPONS:\n\tx = MSG_X + 64;\n\ty = MSG_NORMAL_Y + 8;\n\t\n\t// weapon list\n\tfor(int i=0;i<WPN_COUNT;i++)\n\t{\n\t\tif (p->weapons[i].hasWeapon)\n\t\t{\n\t\t\tdraw_sprite(x, y, SPR_ARMSICONS, i);\n\t\t\tx += 20;\n\t\t}\n\t}\n\t\n\t// xp of current weapon\n\tif (p->curWeapon != WPN_NONE)\n\t{\n\t\tint xb = MSG_X + 64;\n\t\tint yb = MSG_NORMAL_Y + 26;\n\t\t\n\t\tint level = p->weapons[p->curWeapon].level;\n\t\tint curxp = p->weapons[p->curWeapon].xp;\n\t\tint maxxp = player->weapons[p->curWeapon].max_xp[level];\n\t\t\n\t\tdraw_sprite(xb, yb, SPR_XPLEVELICON); xb += 16;\n\t\tdraw_sprite(xb, yb, SPR_WHITENUMBERS, level+1); xb += 8;\n\t\tdraw_sprite(xb, yb, SPR_XPBAR);\n\t\t\n\t\tif ((curxp == maxxp) && level == 2)\n\t\t\tdraw_sprite(xb, yb, SPR_XPBAR, 3);\t\t// MAX\n\t\telse\n\t\t\tDrawPercentage(xb, yb, SPR_XPBAR, 1, curxp, maxxp, sprites[SPR_XPBAR].w);\n\t}\n\t\n\t// ITEMS:\n\tx = (MSG_X + 64) - 10;\n\ty = MSG_NORMAL_Y + 40;\n\t\n\t// Booster\n\t// items list. I generally tried to put the ones that are temporary and indicate a\n\t// quantity of stage completion at the front so they'll be more likely to be visible.\n\tstatic int items[] = {\n\t\tITEM_BOOSTER08,\n\t\tITEM_BOOSTER20,\n\t\tITEM_LIFE_POT,\n\t\tITEM_PUPPY,\n\t\tITEM_JELLYFISH_JUICE,\n\t\tITEM_CHARCOAL,\n\t\tITEM_GUM_BASE,\n\t\tITEM_EXPLOSIVE,\n\t\tITEM_SPRINKLER,\n\t\tITEM_CONTROLLER,\n\t\tITEM_MA_PIGNON,\n\t\tITEM_LITTLE_MAN,\n\t\t-1\n\t};\n\tfor(int i=0;items[i] != -1;i++)\n\t{\n\t\tif (CheckInventoryList(items[i], p->inventory, p->ninventory) != -1)\n\t\t{\n\t\t\tdraw_sprite(x, y, SPR_ITEMIMAGE, items[i]);\n\t\t\tx += 28;\n\t\t\t\n\t\t\tif (x + sprites[SPR_ITEMIMAGE].w > (MSG_X + MSG_W) - 8)\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t// health\n\tDrawHealth((MSG_X+MSG_W) - 4, MSG_NORMAL_Y+8, p);\n\t\n}\n\n\n// I don't think it's possible to get 3-digit max life\n// without hacking, but I accounted for it anyway.\nstatic void DrawHealth(int xright, int y, Profile *p)\n{\nint hx, len;\n\t\n\thx = xright - 28 - 24;\n\tif (p->maxhp > 99) { hx -= 8; }\n\tlen = (p->hp > 99) ? 8 : 0;\n\tdraw_sprite(hx-len, y-1, SPR_SS_HEALTH_ICON, 0, 0);\n\tDrawNumberRAlign(hx+24, y, SPR_WHITENUMBERS, p->hp);\n\t\n\thx = xright - 4;\n\tlen = (p->maxhp > 99) ? 32 : 24;\n\tdraw_sprite(hx-len, y, SPR_WHITENUMBERS, 11);\t\t// '/' character\n\tDrawNumberRAlign(hx, y, SPR_WHITENUMBERS, p->maxhp);\n}\n\n\n\nvoid TB_SaveSelect::Draw(void)\n{\n\tif (!fVisible)\n\t\treturn;\n\t\n\t// handle user input\n\tRun_Input();\n\t\n\t// draw frame\n\tTextBox::DrawFrame(fCoords.x, fCoords.y, fCoords.w, fCoords.h);\n\t\n\t// draw selectors/options\n\tint x = fCoords.x + 16;\n\tint y = fCoords.y + 15;\n\t\n\tfor(int i=0;i<fNumFiles;i++)\n\t{\n\t\tDrawProfile(x, y, i);\n\t\ty += (sprites[SPR_SAVESELECTOR_MIDDLE].h + 10);\n\t}\n\t\n\t// draw extended info for current selection\n\tif (fHaveProfile[fCurSel])\n\t\tDrawExtendedInfo();\n}\n"
  },
  {
    "path": "TextBox/SaveSelect.fdh",
    "content": "//hash:13168562\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nbool game_save(Profile *p);\n\n\n/* located in map.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nconst char *map_get_stage_name(int mapno);\n\n\n/* located in TextBox/SaveSelect.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nstatic void DrawHealth(int xright, int y, Profile *p);\n\n\n/* located in profile.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nbool profile_load(const char *pfname, Profile *file);\nconst char *GetProfileName(int num);\n\n\n/* located in settings.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nbool settings_save(Settings *setfile);\n\n\n/* located in player.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nvoid GetSpriteForGun(int wpn, int look, int *spr, int *frame);\n\n\n/* located in playerstats.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nint CheckInventoryList(int item, int *list, int nitems);\n\n\n/* located in statusbar.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nvoid DrawPercentage(int x, int y, int fill_sprite, int fsframe, int curvalue, int maxvalue, int width_at_max);\nvoid DrawNumberRAlign(int x, int y, int s, int num);\n\n\n/* located in tsc.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nScriptInstance *GetCurrentScriptInstance();\n\n\n/* located in input.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nbool justpushed(int k);\nbool buttonjustpushed(void);\n\n\n/* located in graphics/font.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from TextBox/SaveSelect.cpp]-------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "TextBox/SaveSelect.h",
    "content": "\n#ifndef _SAVESELECT_H\n#define _SAVESELECT_H\n\n#define SS_LOADING\t\t0\n#define SS_SAVING\t\t1\n#define MAX_SAVE_SLOTS\t5\n\nclass TB_SaveSelect\n{\npublic:\n\tTB_SaveSelect();\n\t\n\tvoid ResetState();\n\tvoid SetVisible(bool enable, bool saving=SS_LOADING);\n\t\n\tbool IsVisible();\n\tvoid Draw();\n\t\nprivate:\n\tvoid Run_Input();\n\tvoid DrawProfile(int x, int y, int index);\n\tvoid DrawExtendedInfo();\n\t\n\tbool fVisible;\n\tbool fSaving;\n\tint fCurSel;\n\tint fNumFiles;\n\t\n\tstruct { int x, y, w, h; } fCoords;\n};\n\n\n#endif\n"
  },
  {
    "path": "TextBox/StageSelect.cpp",
    "content": "\n/*\n\tThe stage-select dialog when using the\n\tteleporter in Arthur's House.\n*/\n\n#include \"../nx.h\"\n#include \"StageSelect.h\"\n#include \"StageSelect.fdh\"\n\n#define WARP_X\t\t\t128\n#define WARP_Y\t\t\t46\n\n#define WARP_Y_START\t(WARP_Y + 8)\n#define WARP_Y_SPEED\t1\n\n#define LOCS_Y\t\t\t(WARP_Y + 16)\n#define LOCS_SPACING\t8\n\nTB_StageSelect::TB_StageSelect()\n{\n\tClearSlots();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TB_StageSelect::ResetState()\n{\n\tfVisible = false;\n}\n\nvoid TB_StageSelect::SetVisible(bool enable)\n{\n\tfVisible = enable;\n\tfWarpY = WARP_Y_START;\n\t\n\tgame.frozen = enable;\n\ttextbox.SetFlags(TB_CURSOR_NEVER_SHOWN, enable);\n\ttextbox.SetFlags(TB_LINE_AT_ONCE, enable);\n\ttextbox.SetFlags(TB_VARIABLE_WIDTH_CHARS, enable);\n\t\n\tfSelectionIndex = 0;\n\tfLastButtonDown = true;\n\t\n\tif (enable)\n\t{\n\t\tfMadeSelection = false;\n\t\ttextbox.ClearText();\n\t\tUpdateText();\n\t}\n}\n\nbool TB_StageSelect::IsVisible()\n{\n\treturn fVisible;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TB_StageSelect::Draw(void)\n{\n\tif (!fVisible)\n\t\treturn;\n\t\n\t// handle user input\n\tHandleInput();\n\t\n\t// draw \"- WARP -\" text\n\tfWarpY -= WARP_Y_SPEED;\n\tif (fWarpY < WARP_Y) fWarpY = WARP_Y;\n\t\n\tdraw_sprite(WARP_X, fWarpY, SPR_TEXT_WARP, 0);\n\t\n\t// draw teleporter locations\n\tint nslots = CountActiveSlots();\n\tint total_spacing = ((nslots - 1) * LOCS_SPACING);\n\tint total_width = total_spacing + (nslots * sprites[SPR_STAGEIMAGE].w);\n\tint x = (SCREEN_WIDTH / 2) - (total_width / 2);\n\t\n\tfor(int i=0;i<nslots;i++)\n\t{\n\t\tint sprite;\n\t\tGetSlotByIndex(i, &sprite, NULL);\n\t\t\n\t\tdraw_sprite(x, LOCS_Y, SPR_STAGEIMAGE, sprite);\n\t\t\n\t\tif (i == fSelectionIndex)\n\t\t{\n\t\t\tfSelectionFrame ^= 1;\n\t\t\tdraw_sprite(x, LOCS_Y, SPR_SELECTOR_ITEMS, fSelectionFrame);\n\t\t}\n\t\t\n\t\tx += (sprites[SPR_STAGEIMAGE].w + LOCS_SPACING);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TB_StageSelect::HandleInput()\n{\nbool button_down;\n\n\tif (textbox.YesNoPrompt.IsVisible() || fMadeSelection)\n\t\treturn;\n\t\n\tif (justpushed(LEFTKEY))\n\t{\n\t\tMoveSelection(LEFT);\n\t}\n\telse if (justpushed(RIGHTKEY))\n\t{\n\t\tMoveSelection(RIGHT);\n\t}\n\t\n\t// when user picks a location return the new script to execute\n\tbutton_down = buttondown();\n\tif (button_down && !fLastButtonDown)\n\t{\n\t\tint scriptno;\n\t\tif (!GetSlotByIndex(fSelectionIndex, NULL, &scriptno))\n\t\t{\n\t\t\tstat(\"StageSelect: starting activation script %d\", scriptno);\n\t\t\tJumpScript(scriptno, SP_MAP);\n\t\t}\n\t\telse\n\t\t{\t// dismiss \"no permission to teleport\"\n\t\t\tStopScripts();\n\t\t}\n\t\t\n\t\tfMadeSelection = true;\n\t}\n\t\n\tfLastButtonDown = button_down;\n}\n\nvoid TB_StageSelect::MoveSelection(int dir)\n{\n\tint numslots = CountActiveSlots();\n\tif (numslots == 0) return;\n\t\n\tif (dir == RIGHT)\n\t{\n\t\tif (++fSelectionIndex >= numslots)\n\t\t\tfSelectionIndex = 0;\n\t}\n\telse\n\t{\n\t\tif (--fSelectionIndex < 0)\n\t\t\tfSelectionIndex = (numslots - 1);\n\t}\n\t\n\tsound(SND_MENU_MOVE);\n\tUpdateText();\n}\n\n// updates the text by running the appropriate script\n// from StageSelect.tsc\nvoid TB_StageSelect::UpdateText()\n{\nint scriptno;\n\n\tif (GetSlotByIndex(fSelectionIndex, NULL, &scriptno))\n\t{\t// no permission to teleport\n\t\tscriptno = 0;\n\t}\n\telse\n\t{\n\t\tscriptno %= 1000;\n\t}\n\t\n\tJumpScript(scriptno + 1000, SP_STAGESELECT);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// set teleporter slot \"slotno\" to run script \"scriptno\" when selected.\n// this adds the slot to the menu if scriptno is nonzero and removes it if zero.\n// the parameters here map directory to the <PS+ in the script.\nvoid TB_StageSelect::SetSlot(int slotno, int scriptno)\n{\n\tif (slotno >= 0 && slotno < NUM_TELEPORTER_SLOTS)\n\t{\n\t\tfSlots[slotno] = scriptno;\n\t}\n\telse\n\t{\n\t\tstat(\"StageSelect::SetSlot: invalid slotno %d\", slotno);\n\t}\n}\n\nvoid TB_StageSelect::ClearSlots()\n{\n\tfor(int i=0;i<NUM_TELEPORTER_SLOTS;i++)\n\t\tfSlots[i] = -1;\n}\n\n// return the slotno and scriptno associated with the n'th enabled teleporter slot,\n// where n = index.\n// i.e. passing 1 for index returns the 2nd potential teleporter destination.\n// if index is higher than the number of active teleporter slots, returns nonzero.\nbool TB_StageSelect::GetSlotByIndex(int index, int *slotno_out, int *scriptno_out)\n{\n\tif (index >= 0)\n\t{\n\t\tint slots_found = 0;\n\t\t\n\t\tfor(int i=0;i<NUM_TELEPORTER_SLOTS;i++)\n\t\t{\n\t\t\tif (fSlots[i] != -1)\n\t\t\t{\n\t\t\t\tif (++slots_found > index)\n\t\t\t\t{\n\t\t\t\t\tif (slotno_out)\t  *slotno_out = i;\n\t\t\t\t\tif (scriptno_out) *scriptno_out = fSlots[i];\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (slotno_out)   *slotno_out = -1;\n\tif (scriptno_out) *scriptno_out = -1;\n\treturn 1;\n}\n\nint TB_StageSelect::CountActiveSlots()\n{\n\tint count = 0;\n\t\n\tfor(int i=0;i<NUM_TELEPORTER_SLOTS;i++)\n\t{\n\t\tif (fSlots[i] != -1)\n\t\t\tcount++;\n\t}\n\t\n\treturn count;\n}\n\n\n\n"
  },
  {
    "path": "TextBox/StageSelect.fdh",
    "content": "//hash:6474e2de\n//automatically generated by Makegen\n\n/* located in tsc.cpp */\n\n//--------------[referenced from TextBox/StageSelect.cpp]------------//\nbool JumpScript(int newscriptno, int pageno);\nvoid StopScripts(void);\n\n\n/* located in input.cpp */\n\n//--------------[referenced from TextBox/StageSelect.cpp]------------//\nbool justpushed(int k);\nbool buttondown(void);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from TextBox/StageSelect.cpp]------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//--------------[referenced from TextBox/StageSelect.cpp]------------//\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "TextBox/StageSelect.h",
    "content": "\n#ifndef _STAGESELECT_H\n#define _STAGESELECT_H\n\n#define NUM_TELEPORTER_SLOTS\t\t8\n\nstruct Teleporter_Slot\n{\n\tint slotno;\t\t// which slot # this is (first param to PS+)\n\tint scriptno;\t// which script is run when selected (2nd param to PS+)\n};\n\nclass TB_StageSelect\n{\npublic:\n\tTB_StageSelect();\n\t\n\tvoid ResetState();\n\tvoid SetVisible(bool enable);\n\t\n\tvoid SetSlot(int slotno, int scriptno);\n\tvoid ClearSlots();\n\tbool GetSlotByIndex(int index, int *slotno_out=NULL, int *scriptno_out=NULL);\n\tint CountActiveSlots();\n\t\n\tbool IsVisible();\n\tvoid Draw();\n\t\nprivate:\n\tvoid HandleInput();\n\tvoid MoveSelection(int dir);\n\tvoid UpdateText();\n\t\n\tbool fVisible;\n\tint fSlots[NUM_TELEPORTER_SLOTS];\t\t// scripts used for slots\n\t\n\tint fWarpY;\n\t\n\tint fSelectionIndex;\n\tint fSelectionFrame;\n\t\n\tbool fLastButtonDown;\n\tbool fMadeSelection;\n};\n\n\n#endif\n"
  },
  {
    "path": "TextBox/TextBox.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"TextBox.h\"\n#include \"TextBox.fdh\"\n\n#define MAXLINELEN_FACE\t\t26\n#define MAXLINELEN_NO_FACE\t35\n\n#define CONTENT_X\t\t\t(fCoords.x + 14)\n#define CONTENT_Y\t\t\t10\n#define FACE_W\t\t\t\t48\n\nbool TextBox::Init()\n{\n\tfCoords.w = MSG_W;\n\tfCoords.h = MSG_H;\n\tfCoords.x = MSG_X;\n\t\n\tSetFace(0);\n\tSetVisible(false);\n\tResetState();\n\t\n\treturn 0;\n}\n\nvoid TextBox::Deinit()\n{\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// reset the message box to it's starting parameters.\n// called at start and end of a script.\n//\n// note that this does NOT reset the Face parameter.\n// because some scripts (e.g., when balrog busts in the Shack),\n// call <FAC before running the <MSG, while the box is still\n// invisible.\nvoid TextBox::ResetState(void)\n{\n\t//stat(\"TextBox::ResetState()\");\n\t\n\tfVisible = false;\n\tfFlags = TB_DEFAULTS;\n\tfFace = 0;\n\t\n\tfScrolling = false;\n\tfTextYOffset = 0;\n\t\n\tfTextTimer = 0;\n\tfCanSpeedUp = false;\n\t\n\tfCursorVisible = false;\n\tfCursorTimer = 0;\n\t\n\tYesNoPrompt.ResetState();\n\tItemImage.ResetState();\n\tStageSelect.ResetState();\n\tSaveSelect.ResetState();\n\t\n\tClearText();\n}\n\n// set textbox visible (or not) and set the values\n// of the flags TB_DRAW_AT_TOP and TB_NO_BORDER.\nvoid TextBox::SetVisible(bool enable, uint8_t flags)\n{\n\t//stat(\"TextBox::SetVisible(%s)\", enable?\"true\":\"false\");\n\t\n\tif (enable && fVisible)\n\t\tClearText();\n\t\n\tfVisible = enable;\n\tflags |= (fFlags & ~(TB_DRAW_AT_TOP | TB_NO_BORDER));\n\tSetFlags(flags);\n}\n\nvoid TextBox::SetFlags(uint8_t flags)\n{\n\tfFlags = flags;\n\tfCoords.y = (fFlags & TB_DRAW_AT_TOP) ? MSG_UPPER_Y : MSG_NORMAL_Y;\n}\n\nvoid TextBox::SetFlags(uint8_t flags, bool enable)\n{\n\t//stat(\"TextBox::SetFlags(0x%x, %s)\", flags, enable?\"true\":\"false\");\n\t\n\tif (enable)\n\t\tSetFlags(fFlags | flags);\n\telse\n\t\tSetFlags(fFlags & ~flags);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// add the specified text into the message buffer\n// so it starts appearing.\nvoid TextBox::AddText(const char *str)\n{\n\tif (!fVisible)\n\t\treturn;\n\t\n\tfor(int i=0;str[i];i++)\n\t\tfCharsWaiting[fCWHead++] = str[i];\n}\n\n\n// clear all text in the message box\nvoid TextBox::ClearText()\n{\n\tfor(int i=0;i<MSG_NLINES;i++)\n\t\tfLines[i][0] = 0;\n\t\n\tfCurLine = 0;\n\tfCurLineLen = 0;\n\tfTextTimer = 0;\n\tfCWHead = fCWTail = 0;\n\t\n\tfTextYOffset = 0;\n\tfScrolling = false;\n\t\n\tShowCursor(false);\n}\n\n\nvoid TextBox::SetText(const char *str)\n{\n\tClearText();\n\tAddText(str);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TextBox::SetFace(int newface)\n{\n\t//stat(\"TextBox::SetFace(%d)\", newface);\n\tfFace = newface;\n\tfFaceXOffset = -FACE_W;\n}\n\nvoid TextBox::ShowCursor(bool enable)\n{\n\t//stat(\"TextBox::ShowCursor(%s)\", enable?\"true\":\"false\");\n\tfCursorVisible = enable;\n\tfCursorTimer = 8;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// returns true if a message box is up\nbool TextBox::IsVisible(void)\n{\n\treturn fVisible;\n}\n\n// returns true if a message box is up AND is still displaying letters\nbool TextBox::IsBusy(void)\n{\n\treturn (fVisible && (fCWHead != fCWTail));\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TextBox::Draw(void)\n{\n\tif (fVisible)\n\t{\n\t\tDrawTextBox();\n\t\t\n\t\t// draw all the extra prompts, boxes, etc if needed\n\t\tItemImage.Draw();\n\t\tYesNoPrompt.Draw();\n\t\tStageSelect.Draw();\n\t\tSaveSelect.Draw();\n\t}\n}\n\n\nvoid TextBox::DrawTextBox()\n{\n\tint text_top = (fCoords.y + 10);\n\tint text_x = CONTENT_X;\n\t\n\t// allow player to speed up text by holding the button\n\tif (buttondown())\n\t{\n\t\tif (fCanSpeedUp)\n\t\t\tfTextTimer = 9999;\n\t}\n\telse\n\t{\n\t\tfCanSpeedUp = true;\n\t}\n\t\n\t// in the middle of scrolling a line up?\n\tif (fScrolling)\n\t{\n\t\tfTextYOffset -= (MSG_LINE_SPACING / 4);\n\t\tif (fTextYOffset <= -MSG_LINE_SPACING)\n\t\t{\n\t\t\tfTextYOffset = 0;\n\t\t\tfTextTimer = 0;\n\t\t\tfScrolling = false;\n\t\t\t\n\t\t\tfor(int i=0;i<MSG_NLINES-1;i++)\n\t\t\t{\n\t\t\t\tstrcpy(fLines[i], fLines[i+1]);\n\t\t\t}\n\t\t\t\n\t\t\tfLines[MSG_NLINES-1][0] = 0;\n\t\t\tfCurLine = (MSG_NLINES - 2);\n\t\t\tfCurLineLen = 1;\n\t\t}\n\t}\n\telse\n\t{\t// add text into the box\n\t\tif (fCWHead != fCWTail)\n\t\t{\n\t\t\tif (++fTextTimer >= 4)\n\t\t\t{\n\t\t\t\tfTextTimer = 0;\n\t\t\t\tAddNextChar();\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// draw the frame\n\tif (!(fFlags & TB_NO_BORDER))\n\t{\n\t\tDrawFrame(fCoords.x, fCoords.y, fCoords.w, fCoords.h);\n\t}\n\t\n\t// set clipping region to inside of frame, so that text cannot\n\t// overflow during scrolling, etc.\n\tset_clip_rect(CONTENT_X, text_top, SCREEN_WIDTH, 48);\n\t\n\t//SDL_FillRect(screen, &cliprect, SDL_MapRGB(screen->format,0,0,255));\n\t\n\t// draw face\n\tif (fFace != 0)\n\t{\n\t\tdraw_sprite(CONTENT_X+fFaceXOffset, fCoords.y+CONTENT_Y-3, SPR_FACES, fFace);\n\t\ttext_x += (FACE_W + 8);\t\t// move text over by width of face\n\t\t\n\t\t// face slide-in animation\n\t\tif (fFaceXOffset < 0)\n\t\t{\n\t\t\tfFaceXOffset += (sprites[SPR_FACES].w / 6);\n\t\t\tif (fFaceXOffset > 0) fFaceXOffset = 0;\n\t\t}\n\t}\n\t\n\t// blink the cursor (it is visible when < 7)\n\tif (!fCursorVisible || (fFlags & TB_CURSOR_NEVER_SHOWN))\n\t{\n\t\tfCursorTimer = 9999;\n\t}\n\telse\n\t{\n\t\tif (++fCursorTimer >= 20)\n\t\t\tfCursorTimer = 0;\n\t}\n\t\n\t// draw text lines (the 4th line is for the first char shown on the new line during scrolling)\n\tint char_spacing = (fFlags & TB_VARIABLE_WIDTH_CHARS) ? 0 : 6;\n\tint y = (text_top + fTextYOffset);\n\t\n\tfor(int i=0;i<MSG_NLINES;i++)\n\t{\n\t\tint lineWidth = \\\n\t\t\tfont_draw(text_x, y, fLines[i], char_spacing);\n\t\t\n\t\t// draw the cursor\n\t\tif (i == fCurLine && fCursorTimer < 7)\n\t\t{\n\t\t\tint x = (text_x + lineWidth);\n\t\t\tFillRect(x, y, x+4, y+10,  255,255,255);\n\t\t}\n\t\t\n\t\ty += MSG_LINE_SPACING;\n\t}\n\t\n\t// release the clipping region clipping our drawing to the text box\n\tclear_clip_rect();\n}\n\n// adds the next char to the box, or, in TB_LINE_AT_ONCE mode,\n// the entire next line.\nvoid TextBox::AddNextChar(void)\n{\n\tbool line_at_once = (fFlags & TB_LINE_AT_ONCE);\n\tint maxlinelen = GetMaxLineLen();\n\t\n\twhile(fCWHead != fCWTail)\n\t{\n\t\tchar ch = fCharsWaiting[fCWTail++];\n\t\tif (ch == 10) continue;\t// ignore LF's, we look only for CR\n\t\t\n\t\t// go to next line on CR's, or wrap text if needed\n\t\tif ((fCurLineLen > maxlinelen) || ch == 13)\n\t\t{\t// went over end of line\n\t\t\tfCurLineLen = 0;\n\t\t\tfCurLine++;\n\t\t\t\n\t\t\t// - in line-at-once mode we stop once we hit a CR\n\t\t\t// - in char-at-once mode we don't count the CR as being the one char we added\n\t\t\tif (ch == 13)\n\t\t\t{\n\t\t\t\tif (line_at_once)\n\t\t\t\t\tbreak;\n\t\t\t\telse\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// CR's make no sound\n\t\tif (!line_at_once && ch != 13)\n\t\t\tsound(SND_MSG);\n\t\t\n\t\tfLines[fCurLine][fCurLineLen++] = ch;\n\t\tfLines[fCurLine][fCurLineLen] = 0;\n\t\t\n\t\tif (fCurLine >= MSG_NLINES - 1)\n\t\t{\t// went over bottom of box\n\t\t\tfScrolling = true;\n\t\t}\n\t\t\n\t\t// adding CR's takes no time\n\t\tif (line_at_once || ch == 13) continue;\n\t\telse break;\n\t}\n}\n\nint TextBox::GetMaxLineLen()\n{\n\tif (fFlags & TB_VARIABLE_WIDTH_CHARS)\n\t\treturn 9999;\n\t\n\treturn (fFace != 0) ? MAXLINELEN_FACE : MAXLINELEN_NO_FACE;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TextBox::SetCanSpeedUp(bool newstate)\n{\n\tfCanSpeedUp = newstate;\n\tif (!fCanSpeedUp)\n\t\tfTextTimer = 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// draws the frame of an empty text box spanning\n// the specified coordinates.\nvoid TextBox::DrawFrame(int x, int y, int w, int h)\n{\n\tdraw_sprite_chopped(x, y, SPR_TEXTBOX, 0, w, 8);\t\t// draw top\n\ty += 8;\n\t\n\tfor(int draw=0;draw<h-16;draw+=8)\n\t{\n\t\tdraw_sprite_chopped(x, y, SPR_TEXTBOX, 1, w, 8);\t// draw middle\n\t\ty += 8;\n\t}\n\t\n\tdraw_sprite_chopped(x, y, SPR_TEXTBOX, 2, w, 8);\t\t// draw bottom\n}\n\n\n\n\n"
  },
  {
    "path": "TextBox/TextBox.fdh",
    "content": "//hash:3d2d7914\n//automatically generated by Makegen\n\n/* located in input.cpp */\n\n//----------------[referenced from TextBox/TextBox.cpp]--------------//\nbool buttondown(void);\n\n\n/* located in graphics/font.cpp */\n\n//----------------[referenced from TextBox/TextBox.cpp]--------------//\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in sound/sound.cpp */\n\n//----------------[referenced from TextBox/TextBox.cpp]--------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "TextBox/TextBox.h",
    "content": "\n#ifndef _TEXTBOX_H\n#define _TEXTBOX_H\n\n#include \"YesNoPrompt.h\"\n#include \"ItemImage.h\"\n#include \"StageSelect.h\"\n#include \"SaveSelect.h\"\n\n#define MSG_W\t\t\t\t244\n#define MSG_H\t\t\t\t64\n#define MSG_X\t\t\t\t((SCREEN_WIDTH / 2) - (MSG_W / 2))\n#define MSG_NORMAL_Y\t\t((SCREEN_HEIGHT - MSG_H) - 2)\n#define MSG_UPPER_Y\t\t\t24\n\n#define MSG_NLINES\t\t\t4\n#define MSG_LINE_SPACING\t16\n\nenum TBFlags\n{\n\tTB_DEFAULTS\t\t\t\t\t= 0x00,\n\t\n\tTB_DRAW_AT_TOP\t\t\t\t= 0x01,\n\tTB_NO_BORDER\t\t\t\t= 0x02,\n\t\n\tTB_LINE_AT_ONCE\t\t\t\t= 0x04,\n\tTB_VARIABLE_WIDTH_CHARS\t\t= 0x08,\n\tTB_CURSOR_NEVER_SHOWN\t\t= 0x10\n};\n\nclass TextBox\n{\npublic:\n\tbool Init();\n\tvoid Deinit();\n\t\n\tvoid SetVisible(bool enable, uint8_t flags = TB_DEFAULTS);\n\tvoid ResetState();\n\t\n\tvoid AddText(const char *str);\n\tvoid SetText(const char *str);\n\tvoid ClearText();\n\t\n\tvoid SetFace(int newface);\n\t\n\tvoid SetFlags(uint8_t flags, bool enable);\n\tvoid SetFlags(uint8_t flags);\n\tvoid ShowCursor(bool enable);\n\t\n\tTB_YNJPrompt YesNoPrompt;\n\tTB_ItemImage ItemImage;\n\tTB_StageSelect StageSelect;\n\tTB_SaveSelect SaveSelect;\n\t\n\tbool IsVisible();\n\tbool IsBusy();\n\t\n\tvoid Draw();\n\tstatic void DrawFrame(int x, int y, int w, int h);\n\t\n\tuint8_t GetFlags() { return fFlags; }\n\tvoid SetCanSpeedUp(bool newstate);\n\t\nprivate:\n\tvoid DrawTextBox();\n\tint GetMaxLineLen();\n\tvoid AddNextChar();\n\t\n\tbool fVisible;\n\tuint8_t fFlags;\n\t\n\tuint8_t fFace;\t\t\t// current NPC face or 0 if none\n\tint fFaceXOffset;\t\t// for face slide-in animation\n\t\n\t// currently visible lines\n\tchar fLines[MSG_NLINES][80];\n\tint fCurLine;\n\tint fCurLineLen;\n\t\n\t// handles scrolling lines off\n\tbool fScrolling;\n\tint fTextYOffset;\n\t\n\t// chars waiting to be added\n\tchar fCharsWaiting[256];\n\tuint8_t fCWHead, fCWTail;\n\t\n\tint fTextTimer;\n\tbool fCanSpeedUp;\n\t\n\t// blinking cursor control\n\tbool fCursorVisible;\n\tint fCursorTimer;\n\t\n\tstruct\n\t{\n\t\tint x, y;\n\t\tint w, h;\n\t}\n\tfCoords;\n};\n\n/*\n#define MSG_NONE\t\t\t0\n#define MSG_NORMAL\t\t\t1\n#define MSG_UPPER_INVISIBLE\t2\n#define MSG_UPPER\t\t\t3\n\n#define MSG_NLINES\t\t\t4\n\n#define NOYESNO\t\t\t\t0\n#define YESNO_APPEAR\t\t1\n#define YESNO_WAIT\t\t\t2\n#define YESNO_YES\t\t\t3\n#define YESNO_NO\t\t\t4\n\nstruct MessageBox\n{\n\tint x, y, w, h;\n\t\n\t// 0 - no text box\n\t// 1 - normal text box\n\t// 2 - upper text box, box is invisible\n\t// 3 - upper text box, box is visible\n\tchar displaystate;\n\t\n\tint line_spacing;\n\tint maxlinelen;\n\tchar useautospacing;\n\t\n\tuchar face;\t\t\t\t// current face or 0 if none\n\tint face_xoff;\t\t\t// for face slide-in animation\n\t\n\tchar instantline;\t\t// instead of a char at a type, we do a line at a time\n\t\n\tchar line[MSG_NLINES][80];\n\tint curline;\n\tint curlinelen;\n\t\n\tchar scrolling;\n\tint text_yoffset;\n\t\n\tchar chars_waiting[256];\n\tuchar cwhead, cwtail;\n\tint texttimer;\n\tchar canspeedup;\n\t\n\tstruct\n\t{\n\t\tchar show;\n\t\tchar inhibit;\n\t\tint timer;\n\t} cursor;\n\t\n\tstruct\n\t{\n\t\tchar state;\n\t\tint y;\n\t\tint timer;\n\t\tchar answer;\n\t} yesno;\n\t\n\tstruct\n\t{\n\t\tint x, y;\n\t\tint sprite, frame;\n\t\tint yoff;\n\t} item;\n};\n\n*/\n\n\n\n#endif\n\n"
  },
  {
    "path": "TextBox/YesNoPrompt.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"YesNoPrompt.h\"\n#include \"YesNoPrompt.fdh\"\n\nenum\n{\n\tSTATE_APPEAR,\n\tSTATE_WAIT,\n\tSTATE_YES_SELECTED,\n\tSTATE_NO_SELECTED\n};\n\n#define YESNO_X\t\t\t\t216\n#define YESNO_Y\t\t\t\t144\n#define YESNO_POP_SPEED\t\t4\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TB_YNJPrompt::ResetState()\n{\n\tfVisible = false;\n\tfAnswer = -1;\n}\n\nvoid TB_YNJPrompt::SetVisible(bool enable)\n{\n\tfVisible = enable;\n\t\n\tif (fVisible)\n\t{\n\t\tfState = STATE_APPEAR;\n\t\tfCoords.y = YESNO_Y + (YESNO_POP_SPEED * 2);\n\t\tfAnswer = -1;\n\t\t\n\t\tsound(SND_MENU_PROMPT);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid TB_YNJPrompt::Draw()\n{\n\tif (!fVisible)\n\t\treturn;\n\t\n\tdraw_sprite(YESNO_X, fCoords.y, SPR_YESNO, 0, 0);\n\t\n\t// draw hand selector\n\tif (fState == STATE_YES_SELECTED || \\\n\t\tfState == STATE_NO_SELECTED)\n\t{\n\t\tint xoff = (fState == STATE_YES_SELECTED) ? -4 : 37;\n\t\tdraw_sprite(YESNO_X+xoff, fCoords.y+12, SPR_YESNOHAND, 0, 0);\n\t}\n\t\n\tswitch(fState)\n\t{\n\t\tcase STATE_APPEAR:\n\t\t{\n\t\t\tfCoords.y -= YESNO_POP_SPEED;\n\t\t\t\n\t\t\tif (fCoords.y <= YESNO_Y)\n\t\t\t{\n\t\t\t\tfCoords.y = YESNO_Y;\n\t\t\t\tfState = STATE_WAIT;\n\t\t\t\tfTimer = 15;\n\t\t\t}\n\t\t\telse break;\n\t\t}\n\t\tcase STATE_WAIT:\n\t\t{\n\t\t\tif (fTimer)\n\t\t\t{\n\t\t\t\tfTimer--;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tfState = STATE_YES_SELECTED;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_YES_SELECTED:\n\t\tcase STATE_NO_SELECTED:\n\t\t{\n\t\t\tif (justpushed(LEFTKEY) || justpushed(RIGHTKEY))\n\t\t\t{\n\t\t\t\tsound(SND_MENU_MOVE);\n\t\t\t\t\n\t\t\t\tfState = (fState == STATE_YES_SELECTED) ?\n\t\t\t\t\t\t\tSTATE_NO_SELECTED : STATE_YES_SELECTED;\n\t\t\t}\n\t\t\t\n\t\t\tif (justpushed(JUMPKEY))\n\t\t\t{\n\t\t\t\tsound(SND_MENU_SELECT);\n\t\t\t\tlastinputs[JUMPKEY] = true;\n\t\t\t\tlastpinputs[JUMPKEY] = true;\n\t\t\t\t\n\t\t\t\tfAnswer = (fState == STATE_YES_SELECTED) ? YES : NO;\n\t\t\t\tSetVisible(false);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool TB_YNJPrompt::ResultReady()\n{\n\treturn (fAnswer != -1);\n}\n\nint TB_YNJPrompt::GetResult()\n{\n\treturn fAnswer;\n}\n\n"
  },
  {
    "path": "TextBox/YesNoPrompt.fdh",
    "content": "//hash:70812d61\n//automatically generated by Makegen\n\n/* located in input.cpp */\n\n//--------------[referenced from TextBox/YesNoPrompt.cpp]------------//\nbool justpushed(int k);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from TextBox/YesNoPrompt.cpp]------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "TextBox/YesNoPrompt.h",
    "content": "\n#ifndef _YESNOPROMPT_H\n#define _YESNOPROMPT_H\n\nenum YNJResult\n{\n\tNO,\n\tYES\n};\n\nclass TB_YNJPrompt\n{\npublic:\n\tvoid SetVisible(bool enable);\n\tvoid ResetState();\n\t\n\tvoid Draw();\n\t\n\tbool IsVisible() { return fVisible; }\n\tbool ResultReady();\t\t// returns true if the user has selected a result\n\tint GetResult();\t\t// returns YES or NO\n\t\nprivate:\n\tbool fVisible;\n\tstruct { int y; } fCoords;\n\t\n\tint fState;\n\tint fTimer;\n\t\n\tint fAnswer;\n};\n\n\n#endif\n"
  },
  {
    "path": "ai/IrregularBBox.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"IrregularBBox.h\"\n#include \"IrregularBBox.fdh\"\n\nbool IrregularBBox::init(Object *associatedObject, int max_rectangles)\n{\n\tmemset(&bbox, 0, sizeof(bbox));\n\tthis->num_bboxes = max_rectangles;\n\tthis->assoc_object = associatedObject;\n\t\n\tif (num_bboxes >= IB_MAX_BBOXES)\n\t{\n\t\tnum_bboxes = IB_MAX_BBOXES;\n\t\tstaterr(\"IrregularBBox::Init(): too many rectangles (%d given): max is %d\", max_rectangles, IB_MAX_BBOXES);\n\t\treturn 1;\n\t}\n\t\n\tfor(int i=0;i<num_bboxes;i++)\n\t{\n\t\tbbox[i] = CreateObject(0, 0, OBJ_BBOX_PUPPET);\n\t\tbbox[i]->sprite = SPR_BBOX_PUPPET_1 + i;\n\t\tbbox[i]->hp = 1000;\n\t\tbbox[i]->damage = 0;\n\t\tbbox[i]->invisible = true;\n\t}\n\t\n\treturn 0;\n}\n\nvoid IrregularBBox::destroy()\n{\n\tfor(int i=0;i<num_bboxes;i++)\n\t{\n\t\tbbox[i]->Delete();\n\t\tbbox[i] = NULL;\n\t}\n\t\n\tnum_bboxes = 0;\n\tassoc_object = NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid IrregularBBox::set_damage(int dmg)\n{\n\tfor(int i=0;i<num_bboxes;i++)\n\t\tbbox[i]->damage = dmg;\n}\n\n// link damage hits on the bbox to damage on it's associated object, o\nvoid IrregularBBox::transmit_hits()\n{\n\tif (!assoc_object) return;\n\t\n\tfor(int i=0;i<num_bboxes;i++)\n\t{\n\t\tif (bbox[i]->hp < 1000)\n\t\t{\n\t\t\tassoc_object->DealDamage(1000 - bbox[i]->hp);\n\t\t\tbbox[i]->hp = 1000;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid IrregularBBox::place(void (*placefunc)(void *userparm), void *userparm)\n{\n\t// first assume all disabled\n\tfor(int i=0;i<num_bboxes;i++)\n\t{\n\t\tbbox[i]->y = -1024;\t\t// effectively disables it\n\t}\n\t\n\t// ask object to place it's bboxes as it wishes for this frame\n\t// by using set_bbox().\n\t(*placefunc)(userparm);\n}\n\n\nvoid IrregularBBox::set_bbox(int index, int x, int y, int w, int h, uint32_t flags)\n{\n\tif (index < 0 || index >= num_bboxes)\n\t{\n\t\tstaterr(\"IrregularBBox::set_bbox: index out of range: %d\", index);\n\t\treturn;\n\t}\n\t\n\tObject *box = bbox[index];\n\t\n\t// coordinates passed in here are for the right-facing frame,\n\t// if we are currently left-facing then flip them.\n\tif (assoc_object->dir == LEFT)\n\t\tx = sprites[assoc_object->sprite].w - x - w;\n\t\n\tbox->x = assoc_object->x + (x << CSF);\n\tbox->y = assoc_object->y + (y << CSF);\n\t\n\tsprites[box->sprite].bbox.x1 = 0;\n\tsprites[box->sprite].bbox.y1 = 0;\n\tsprites[box->sprite].bbox.x2 = (w - 1);\n\tsprites[box->sprite].bbox.y2 = (h - 1);\n\t\n\tbox->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\tbox->flags |= flags;\n\t\n\t// nitpicking perfect sync for this frame since we are not aftermove\n\tbox->x += assoc_object->xinertia;\n\tbox->y += assoc_object->yinertia;\n}\n\n\n\n\n\n"
  },
  {
    "path": "ai/IrregularBBox.fdh",
    "content": "//hash:401a9d0e\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//---------------[referenced from ai/IrregularBBox.cpp]--------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in common/stat.cpp */\n\n//---------------[referenced from ai/IrregularBBox.cpp]--------------//\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "ai/IrregularBBox.h",
    "content": "\n#ifndef _IRREGULARBBOX_H\n#define _IRREGULARBBOX_H\n\n\n#define IB_MAX_BBOXES\t\t4\n\n\nclass IrregularBBox\n{\npublic:\n\tbool init(Object *associatedObject, int max_rectangles);\n\tvoid destroy();\n\t\n\tvoid set_damage(int dmg);\n\tvoid transmit_hits();\n\t\n\tvoid place(void (*placefunc)(void *userparm), void *userparm);\n\tvoid set_bbox(int index, int x, int y, int w, int h, uint32_t flags);\n\nprivate:\n\tObject *bbox[IB_MAX_BBOXES];\n\tint num_bboxes;\n\tObject *assoc_object;\n\t\n};\n\n\n\n#endif\n"
  },
  {
    "path": "ai/ai.cpp",
    "content": "\n#include \"stdai.h\"\n#include \"ai.fdh\"\n\nInitList AIRoutines;\n\n\nbool ai_init(void)\n{\n\t// setup function pointers to AI routines\n\tfor(int i=0;i<OBJ_LAST;i++)\n\t\tmemset(&objprop[i].ai_routines, 0, sizeof(objprop[i].ai_routines));\n\t\n\tif (load_npc_tbl()) return 1;\n\t\n\t// OBJ_NULL has flags set in npc.tbl, but shouldn't be set in our engine\n\tobjprop[OBJ_NULL].defaultflags = 0;\n\tmemcpy(&objprop[OBJ_SKULLHEAD_CARRIED], &objprop[OBJ_SKULLHEAD], sizeof(ObjProp));\n\t\n\tobjprop[OBJ_POLISH].initial_hp = 24;\t// is the value of 120 in npc.tbl really wrong? if so why?\n\tobjprop[OBJ_POLISH].death_sound = 25;\t// not sure why this is apparently wrong in file\n\t\n\t// call all the INITFUNC() routines you find at the beginning\n\t// of every AI-related module which assign AI logic to objects.\n\tif (AIRoutines.CallFunctions())\n\t{\n\t\tstaterr(\"ai_init: failed to initialize AIRoutines function pointers\");\n\t\treturn 1;\n\t}\n\t\n\treturn 0;\n}\n\n\nbool load_npc_tbl(void)\n{\nconst int smoke_amounts[] = { 0, 3, 7, 12 };\nconst int nEntries = 361;\nint i;\n\n\tFILE *fp = fileopen(\"data/npc.tbl\", \"rb\");\n\tif (!fp) { staterr(\"load_npc_tbl: data/npc.tbl is missing\"); return 1; }\n\t\n\tstat(\"Reading npc.tbl...\");\n\t\n\tfor(i=0;i<nEntries;i++) objprop[i].defaultflags = fgeti(fp);\n\tfor(i=0;i<nEntries;i++) objprop[i].initial_hp = fgeti(fp);\n\t\n\t// next is a spritesheet # of something--but we don't use it, so skip\n\t//for(i=0;i<nEntries;i++) fgetc(fp);\t\t// spritesheet # or something--but we don't use it\n\tfseek(fp, (nEntries * 2 * 2) + nEntries, SEEK_SET);\n\t\n\tfor(i=0;i<nEntries;i++) objprop[i].death_sound = fgetc(fp);\n\tfor(i=0;i<nEntries;i++) objprop[i].hurt_sound = fgetc(fp);\n\tfor(i=0;i<nEntries;i++) objprop[i].death_smoke_amt = smoke_amounts[fgetc(fp)];\n\tfor(i=0;i<nEntries;i++) objprop[i].xponkill = fgetl(fp);\n\tfor(i=0;i<nEntries;i++) objprop[i].damage = fgetl(fp);\n\t\n\t/*for(i=0;i<nEntries;i++)\n\t{\n\t\tint left = fgetc(fp);\n\t\tint top = fgetc(fp);\n\t\tint right = fgetc(fp);\n\t\tint bottom = fgetc(fp);\n\t\t\n\t\tif (i == 59)\n\t\t{\n\t\t\tstat(\"%d %d %d %d\", left, top, right, bottom);\n\t\t\tstat(\"sprite %d\", objprop[i].sprite);\n\t\t}\n\t}*/\n\t\n\tfclose(fp);\n\treturn 0;//1;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// spawn an object at an enemies action point\nObject *SpawnObjectAtActionPoint(Object *o, int otype)\n{\nint x, y;\nObject *newObject;\n\n\tx = o->x + (sprites[o->sprite].frame[o->frame].dir[o->dir].actionpoint.x << CSF);\n\ty = o->y + (sprites[o->sprite].frame[o->frame].dir[o->dir].actionpoint.y << CSF);\n\tnewObject = CreateObject(x, y, otype);\n\tnewObject->dir = o->dir;\n\treturn newObject;\n}\n\n\n// destroys all objects of type \"otype\".\n// creates a BoomFlash and smoke, but no bonuses.\nvoid KillObjectsOfType(int type)\n{\n\tObject *o = firstobject;\n\twhile(o)\n\t{\n\t\tif (o->type == type)\n\t\t{\n\t\t\tSmokeClouds(o, 1, 0, 0);\n\t\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\t\t\n\t\t\to->Delete();\n\t\t}\n\t\t\n\t\to = o->next;\n\t}\n}\n\n// deletes all objects of type \"otype\" silently, without any smoke or other effects.\nvoid DeleteObjectsOfType(int type)\n{\n\tObject *o = firstobject;\n\twhile(o)\n\t{\n\t\tif (o->type == type)\n\t\t{\n\t\t\to->Delete();\n\t\t}\n\t\t\n\t\to = o->next;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// handles object blinking: at random intervals forces object o's frame to blinkframe\n// for blinktime frames.\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob)\n{\n\tif (o->blinktimer)\n\t{\n\t\to->blinktimer--;\n\t\to->frame = blinkframe;\n\t}\n\telse if (random(0, prob) == 0)\n\t{\n\t\to->frame = blinkframe;\n\t\to->blinktimer = 8;\n\t}\n}\n\n// call this in an object's aftermove routine if it's an object\n// which is being carried by the player like a puppy or curly.\n// x_left: offset from p's action point when he faces left\n// x_right: when he faces right\n// off_y: vertical offset from p's action point\nvoid StickToPlayer(Object *o, int x_left, int x_right, int off_y)\n{\nint x, y, frame;\n\n\t// needed for puppy in chest\n\to->flags &= ~FLAG_SCRIPTONACTIVATE;\n\t\n\t// by offsetting from the player's action point, where he holds his gun, we\n\t// already have set up for us a nice up-and-down 1 pixel as he walks\n\tframe = player->frame;\n\t// the p's \"up\" frames have unusually placed action points so we have to cancel those out\n\tif (frame >= 3 && frame <= 5) frame -= 3;\n\t\n\tx = (player->x >> CSF) + sprites[player->sprite].frame[frame].dir[player->dir].actionpoint.x;\n\ty = (player->y >> CSF) + sprites[player->sprite].frame[frame].dir[player->dir].actionpoint.y;\n\ty += off_y;\n\t\n\tif (player->dir == RIGHT)\n\t{\n\t\tx += x_right;\n\t\to->dir = RIGHT;\n\t}\n\telse\n\t{\n\t\tx += x_left;\n\t\to->dir = LEFT;\n\t}\n\t\n\to->x = (x << CSF);\n\to->y = (y << CSF);\n}\n\n\n// used for some bosses with subobjects\nvoid transfer_damage(Object *o, Object *target)\n{\n\tif (o->hp < 1000)\n\t{\n\t\t// if you forget to set hp to 1000 when creating the puppet object,\n\t\t// it can immediately destroy the main object, possibly leading to crashes.\n        #ifdef DEBUG\n\t\t\tASSERT(o->hp != 0);\n\t\t#endif\n\t\t\n\t\ttarget->DealDamage(1000 - o->hp);\n\t\to->hp = 1000;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// do the \"teleport in\" effect for object o.\n// when complete, returns true.\n// this function uses o->timer and assume o->timer starts at 0.\nbool DoTeleportIn(Object *o, int slowness)\n{\n\tif (teleffect(o, slowness, false))\n\t{\n\t\to->clip_enable = false;\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}\n\n// does a teleport out effect.\n// When complete, returns true.\n// this function uses o->timer and assume o->timer starts at 0.\nbool DoTeleportOut(Object *o, int slowness)\n{\n\treturn teleffect(o, slowness, true);\n}\n\n// common code for DoTeleportIn and DoTeleportOut\n// returns true when teleport is complete\nstatic bool teleffect(Object *o, int slowness, bool teleporting_out)\n{\n\to->display_xoff = random(-1, 1);\n\t\n\tif (!o->timer)\n\t{\n\t\tsound(SND_TELEPORT);\n\t\to->clip_enable = true;\n\t\to->clipy1 = 0;\n\t}\n\t\n\tif (++o->timer >= (sprites[o->sprite].h << slowness))\n\t{\n\t\to->clip_enable = false;\n\t\to->display_xoff = 0;\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\tint amt = (o->timer >> slowness);\n\t\t\n\t\tif (teleporting_out)\n\t\t\to->clipy2 = sprites[o->sprite].h - amt;\n\t\telse\n\t\t\to->clipy2 = amt;\n\t\t\n\t\treturn false;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_animate1(Object *o) { if (++o->frame >= sprites[o->sprite].nframes) o->frame = 0; }\nvoid ai_animate2(Object *o) { simpleanim(o, 2); }\nvoid ai_animate3(Object *o) { simpleanim(o, 3); }\nvoid ai_animate4(Object *o) { simpleanim(o, 4); }\nvoid ai_animate5(Object *o) { simpleanim(o, 5); }\n\nstatic void simpleanim(Object *o, int spd)\n{\n\tif (++o->animtimer >= spd)\n\t{\n\t\to->animtimer = 0;\n\t\tif (++o->frame >= sprites[o->sprite].nframes) o->frame = 0;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// aftermove routine which sticks the object to the action point of the NPC that's carrying it\nvoid aftermove_StickToLinkedActionPoint(Object *o)\n{\nObject *link = o->linkedobject;\nint dir;\n\n\tif (link)\n\t{\n\t\tdir = (link->dir ^ o->carry.flip);\n\t\t\n\t\to->x = ((link->x >> CSF) + sprites[link->sprite].frame[link->frame].dir[dir].actionpoint.x) << CSF;\n\t\to->y = ((link->y >> CSF) + sprites[link->sprite].frame[link->frame].dir[dir].actionpoint.y) << CSF;\n\t\to->dir = dir;\n\t}\n\telse\n\t{\n\t\to->Delete();\n\t}\n}\n\nvoid onspawn_snap_to_ground(Object *o)\n{\n\to->SnapToGround();\n}\n\nvoid onspawn_set_frame_from_id2(Object *o)\n{\n\to->frame = o->id2;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n"
  },
  {
    "path": "ai/ai.fdh",
    "content": "//hash:3644b038\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//---------------------[referenced from ai/ai.cpp]-------------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in platform.cpp */\n\n//---------------------[referenced from ai/ai.cpp]-------------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in caret.cpp */\n\n//---------------------[referenced from ai/ai.cpp]-------------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/ai.cpp */\n\n//---------------------[referenced from ai/ai.cpp]-------------------//\nbool ai_init(void);\nbool load_npc_tbl(void);\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\nvoid KillObjectsOfType(int type);\nvoid DeleteObjectsOfType(int type);\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\nvoid StickToPlayer(Object *o, int x_left, int x_right, int off_y);\nvoid transfer_damage(Object *o, Object *target);\nbool DoTeleportIn(Object *o, int slowness);\nbool DoTeleportOut(Object *o, int slowness);\nstatic bool teleffect(Object *o, int slowness, bool teleporting_out);\nvoid ai_animate1(Object *o);\nvoid ai_animate2(Object *o);\nvoid ai_animate3(Object *o);\nvoid ai_animate4(Object *o);\nvoid ai_animate5(Object *o);\nstatic void simpleanim(Object *o, int spd);\nvoid aftermove_StickToLinkedActionPoint(Object *o);\nvoid onspawn_snap_to_ground(Object *o);\nvoid onspawn_set_frame_from_id2(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//---------------------[referenced from ai/ai.cpp]-------------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//---------------------[referenced from ai/ai.cpp]-------------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//---------------------[referenced from ai/ai.cpp]-------------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//---------------------[referenced from ai/ai.cpp]-------------------//\nuint16_t fgeti(FILE *fp);\nuint32_t fgetl(FILE *fp);\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/ai.h",
    "content": "\n#ifndef _AI_H\n#define _AI_H\n\nvoid randblink(Object *o, int blinkframe = 1, int blinktime = 8, int prob = 120);\n\nvoid SmokeClouds(Object *o, int nclouds, int rangex=0, int rangey=0, Object *pushbehind=NULL);\nvoid SmokeXY(int x, int y, int nclouds, int rangex=0, int rangey=0, Object *pushbehind=NULL);\n\n\n#define ANIMATE(SPEED, FIRSTFRAME, LASTFRAME)\t\t\\\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\tif (++o->animtimer > SPEED)\t\t\t\t\t\t\\\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\to->animtimer = 0;\t\t\t\t\t\t\t\\\n\t\to->frame++;\t\t\t\t\t\t\t\t\t\\\n\t}\t\t\t\t\t\t\t\t\t\t\t\t\\\n\tif (o->frame > LASTFRAME) o->frame = FIRSTFRAME;\t\\\n}\n\n#define ANIMATE_FWD(SPEED)\t\t\\\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\\\n\tif (++o->animtimer > SPEED)\t\t\t\t\t\t\\\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\n\t\to->animtimer = 0;\t\t\t\t\t\t\t\\\n\t\to->frame++;\t\t\t\t\t\t\t\t\t\\\n\t}\t\\\n}\n\n#define FACEPLAYER\t\\\n{\t\\\n\to->dir = (o->CenterX() > player->CenterX()) ? LEFT:RIGHT;\t\\\n}\n\n#define FACEAWAYPLAYER\t\\\n{\t\\\n\to->dir = (o->CenterX() > player->CenterX()) ? RIGHT:LEFT;\t\\\n}\n\n#define LIMITX(K)\t\t\\\n{\t\t\t\t\t\t\\\n\tif (o->xinertia > K) o->xinertia = K;\t\t\\\n\tif (o->xinertia < -K) o->xinertia = -K;\t\t\\\n}\n#define LIMITY(K)\t\t\\\n{\t\t\t\t\t\t\\\n\tif (o->yinertia > K) o->yinertia = K;\t\t\\\n\tif (o->yinertia < -K) o->yinertia = -K;\t\t\\\n}\n\n#define pdistlx(K) ( abs(player->CenterX() - o->CenterX()) <= (K) )\n#define pdistly(K) ( abs(player->CenterY() - o->CenterY()) <= (K) )\n#define pdistly2(ABOVE,BELOW)\t(pdistly(((player->CenterY() > o->CenterY()) ? (BELOW):(ABOVE))))\n#define pdistl(K)  ( pdistlx((K)) && pdistly((K)) )\n\n#define XMOVE(SPD)  { o->xinertia = (o->dir == RIGHT) ? (SPD) : -(SPD); }\n#define XACCEL(SPD) { o->xinertia += (o->dir == RIGHT) ? (SPD) : -(SPD); }\n\n#define YMOVE(SPD)  { o->yinertia = (o->dir == DOWN) ? (SPD) : -(SPD); }\n#define YACCEL(SPD) { o->yinertia += (o->dir == DOWN) ? (SPD) : -(SPD); }\n\n#define COPY_PFBOX\t\\\n\t{ sprites[o->sprite].bbox = sprites[o->sprite].frame[o->frame].dir[o->dir].pf_bbox; }\n\n#define AIDEBUG\t\\\n{\t\\\n\tdebug(\"%s\", __FUNCTION__);\t\\\n\tdebug(\"state: %d\", o->state);\t\\\n\tdebug(\"timer: %d\", o->timer);\t\\\n\tdebug(\"timer2: %d\", o->timer2);\t\\\n}\n\n#endif\n"
  },
  {
    "path": "ai/almond/almond.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"almond.h\"\n#include \"almond.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_WATERLEVEL, ai_waterlevel);\n\t\n\tONTICK(OBJ_SHUTTER, ai_shutter);\n\tONTICK(OBJ_SHUTTER_BIG, ai_shutter);\n\tONTICK(OBJ_ALMOND_LIFT, ai_shutter);\n\t\n\tONTICK(OBJ_SHUTTER_STUCK, ai_shutter_stuck);\n\tONTICK(OBJ_ALMOND_ROBOT, ai_almond_robot);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_waterlevel(Object *o)\n{\n/*\tdebug(\"WL State: %d\", o->state);\n\tdebug(\"WL Y: %d\", o->y>>CSF);\n\tdebug(\"WL Timer: %d\", o->timer);\n\tdebug(\"WLForceUp: %d\", map.wlforceup);*/\n\t\n\tif (map.wlforcestate)\n\t{\n\t\tstat(\"Forced WL state to %d\", map.wlforcestate);\n\t\to->state = map.wlforcestate;\n\t\tmap.wlforcestate = 0;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\tmap.waterlevelobject = o;\n\t\t\to->state = WL_CALM;\n\t\t\to->y += (8<<CSF);\n\t\t\to->ymark = o->y;\n\t\t\to->yinertia = 0x200;\n\t\tcase WL_CALM:\t// calm waves around set point\n\t\t\to->yinertia += (o->y < o->ymark) ? 4 : -4;\n\t\t\tLIMITY(0x100);\n\t\tbreak;\n\t\t\n\t\tcase WL_CYCLE:\t\t\t// wait 1000 ticks, then rise all the way to top come down and repeat\n\t\t\to->state = WL_DOWN; o->timer = 0;\n\t\tcase WL_DOWN:\n\t\t\to->yinertia += (o->y < o->ymark) ? 4 : -4;\n\t\t\tLIMITY(0x200);\n\t\t\tif (++o->timer > 1000)\n\t\t\t{\n\t\t\t\to->state = WL_UP;\n\t\t\t}\n\t\tbreak;\n\t\tcase WL_UP:\t\t\t// rise all the way to top then come back down\n\t\t\to->yinertia += (o->y > 0) ? -4 : 4;\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\t// when we reach the top return to normal level\n\t\t\tif (o->y < (64<<CSF))\n\t\t\t{\n\t\t\t\to->state = WL_CYCLE;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase WL_STAY_UP:\t// rise quickly all the way to top and stay there\n\t\t\to->yinertia += (o->y > 0) ? -4 : 4;\n\t\t\tif (o->yinertia < -0x200) o->yinertia = -0x200;\n\t\t\tif (o->yinertia > 0x100) o->yinertia = 0x100;\n\t\tbreak;\n\t}\n\t\n\tmap.wlstate = o->state;\n}\n\n\n/// common code to both Shutter AND Lift\nvoid ai_shutter(Object *o)\n{\n\tif (o->state == 10)\n\t{\n\t\t// allow hitting the stuck shutter no. 4\n\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\t\t\n\t\tswitch(o->dir)\n\t\t{\n\t\t\tcase LEFT:  o->x -= 0x80; break;\n\t\t\tcase RIGHT: o->x += 0x80; break;\n\t\t\tcase UP:    o->y -= 0x80; break;\n\t\t\tcase DOWN:  o->y += 0x80; break;\n\t\t}\n\t\t\n\t\t// animate Almond_Lift\n\t\tif (o->type==OBJ_ALMOND_LIFT)\n\t\t{\n\t\t\tai_animate3(o);\n\t\t}\n\t\telse if (o->type==OBJ_SHUTTER_BIG)\n\t\t{\n\t\t\tif (!o->timer)\n\t\t\t{\n\t\t\t\tgame.quaketime = 20;\n\t\t\t\tsound(SND_QUAKE);\n\t\t\t\t\n\t\t\t\to->timer = 6;\n\t\t\t} else o->timer--;\n\t\t}\n\t}\n\telse if (o->state == 20)\t// tripped by script when Shutter_Big closes fully\n\t{\n\t\tSmokeSide(o, 4, DOWN);\n\t\to->state = 21;\n\t}\n\t\n\tif (o->type == OBJ_SHUTTER_BIG)\n\t{\n\t\tANIMATE(10, 0, 3);\n\t}\n}\n\nvoid ai_shutter_stuck(Object *o)\n{\n\t// when you shoot shutter 4, you're actually shooting us, but we want them\n\t// to think they're shooting the regular shutter object, so go invisible\n\to->invisible = 1;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// the damaged robot which wakes up right before the Almond battle\nvoid ai_almond_robot(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->frame = 0;\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// blows up\n\t\t\tsound(SND_BIG_CRASH);\n\t\t\tSmokeClouds(o, 8, 3, 3);\n\t\t\to->Delete();\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// flashes\n\t\t\tANIMATE(10, 0, 1);\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n"
  },
  {
    "path": "ai/almond/almond.fdh",
    "content": "//hash:e7887cd2\n//automatically generated by Makegen\n\n/* located in ai/ai.cpp */\n\n//---------------[referenced from ai/almond/almond.cpp]--------------//\nvoid ai_animate3(Object *o);\n\n\n/* located in ai/almond/almond.cpp */\n\n//---------------[referenced from ai/almond/almond.cpp]--------------//\nvoid ai_waterlevel(Object *o);\nvoid ai_shutter(Object *o);\nvoid ai_shutter_stuck(Object *o);\nvoid ai_almond_robot(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//---------------[referenced from ai/almond/almond.cpp]--------------//\nvoid SmokeSide(Object *o, int nclouds, int dir);\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//---------------[referenced from ai/almond/almond.cpp]--------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//---------------[referenced from ai/almond/almond.cpp]--------------//\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "ai/almond/almond.h",
    "content": "\n#ifndef _ALMOND_H\n#define _ALMOND_H\n\n// states to control the water-level object\n#define WL_CALM\t\t\t\t10\t\t\t// calm and slow at set point\n\n#define WL_CYCLE\t\t\t20\t\t\t// cycles between set point and top of screen\n#define WL_DOWN\t\t\t\t21\t\t\t// in cycle--currently down\n#define WL_UP\t\t\t\t22\t\t\t// in cycle--currently up\n\n#define WL_STAY_UP\t\t\t30\t\t\t// goes to top of screen and doesn't come back down\n\n#endif\n"
  },
  {
    "path": "ai/balrog_common.cpp",
    "content": "\n#include \"stdai.h\"\n#include \"balrog_common.fdh\"\n\n// some routines used by multiple Balrog boss fights or Balrog NPC's\n// ---------------------------------------\n\n\n\n// grab the player in preparation for running the toss_player_away animation.\nvoid balrog_grab_player(Object *o)\n{\n\tplayer->disabled = true;\n\to->frame = 8;\t// face away\n\to->substate = 0;\n}\n\n// shake and toss the player away. call balrog_grab_player first.\n// returns true when complete.\n// used in boss battles in Shack and at end of Labyrinth.\nbool balrog_toss_player_away(Object *o)\n{\n\t// keep player locked in position while balrog has him\n\tif (o->substate <= 1)\n\t{\n\t\tplayer->x = o->CenterX() - (player->Width() / 2);\n\t\tplayer->y = o->y + (4 << CSF);\n\t\tplayer->xinertia = player->yinertia = 0;\n\t}\n\t\n\tswitch(o->substate)\n\t{\n\t\tcase 0:\t\t// slowing to a stop\n\t\t{\n\t\t\to->xinertia *= 4;\n\t\t\to->xinertia /= 5;\n\t\t\t\n\t\t\tif (o->xinertia == 0)\n\t\t\t{\n\t\t\t\to->substate = 1;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->frame = 15;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// shaking with back turned\n\t\t{\n\t\t\tANIMATE(2, 15, 16);\t\t// shake\n\t\t\t\n\t\t\t// after a moment toss player away\n\t\t\t// I used 101 because that puts it one frame past the end of the\n\t\t\t// player's hurtflash timer; otherwise when you reappear only your\n\t\t\t// gun is visible for the first frame.\n\t\t\tif (++o->timer > 101)\n\t\t\t{\n\t\t\t\tplayer->disabled = false;\n\t\t\t\t\n\t\t\t\tif (o->dir == LEFT)\n\t\t\t\t{\n\t\t\t\t\tplayer->x += 0x800;\n\t\t\t\t\tplayer->xinertia = 0x5ff;\n\t\t\t\t\tplayer->dir = RIGHT;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tplayer->x -= 0x800;\n\t\t\t\t\tplayer->xinertia = -0x5ff;\n\t\t\t\t\tplayer->dir = LEFT;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tplayer->y -= 0x1000;\n\t\t\t\tplayer->yinertia = -0x200;\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\t\n\t\t\t\to->dir = player->dir;\n\t\t\t\t\n\t\t\t\to->substate = 2;\n\t\t\t\to->frame = 3;\t// arms up\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// arms up after throwing player\n\t\t{\n\t\t\tif (++o->timer > 50)\n\t\t\t\treturn true;\n\t\t}\n\t\tbreak;\n\t}\n\n\treturn false;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n"
  },
  {
    "path": "ai/balrog_common.fdh",
    "content": "//hash:0e6b9889\n//automatically generated by Makegen\n\n/* located in ai/balrog_common.cpp */\n\n//---------------[referenced from ai/balrog_common.cpp]--------------//\nvoid balrog_grab_player(Object *o);\nbool balrog_toss_player_away(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//---------------[referenced from ai/balrog_common.cpp]--------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/balrog_common.h",
    "content": "\n#ifndef _BALROG_COMMON_H\n#define _BALROG_COMMON_H\n\nvoid balrog_grab_player(Object *o);\nbool balrog_toss_player_away(Object *o);\n\n\n#endif\n"
  },
  {
    "path": "ai/boss/balfrog.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"balfrog.h\"\n#include \"balfrog.fdh\"\n\nenum Frames\n{\n\tFRAME_STAND\t\t\t\t= 0,\n\tFRAME_CROUCH\t\t\t= 1,\n\tFRAME_MOUTH_OPEN\t\t= 2,\n\tFRAME_MOUTH_OPEN_HURT\t= 3,\n\t\n\tFRAME_JUMPING\t\t\t= 0\t\t// on other sprite (SPR_BALFROG_JUMP)\n};\n\nenum States\n{\n\tSTATE_TRANSFORM\t\t\t= 20,\t\t\t// script-triggered: must stay at this value\n\tSTATE_READY\t\t\t\t= 10,\t\t\t// script-triggered: must stay at this value\n\tSTATE_DEATH\t\t\t\t= 130,\t\t\t// script-triggered: must stay at this value\n\tSTATE_FIGHTING\t\t\t= 100,\t\t\t// script-triggered: must stay at this value\n\t\n\tSTATE_JUMPING\t\t\t= 50,\n\t\n\tSTATE_OPEN_MOUTH\t\t= 60,\n\tSTATE_SHOOTING\t\t\t= 70,\n\tSTATE_CLOSE_MOUTH\t\t= 80,\n\t\n\tSTATE_BIG_JUMP\t\t\t= 90\n};\n\nenum BBox_States\n{\n\tBM_STAND,\n\tBM_JUMPING,\n\tBM_MOUTH_OPEN,\n\tBM_DISABLED\n};\n\n#define FROG_START_X\t\t\t((5 * TILE_W) << CSF)\n#define FROG_START_Y\t\t\t((10 * TILE_H) << CSF)\n\n#define LANDING_SMOKE_COUNT\t\t8\n#define LANDING_SMOKE_YTOP\t\t-4\n\n#define DEATH_SMOKE_COUNT\t\t8\n#define DEATH_SMOKE_YTOP\t\t-24\n\n// when he lands he spawns frogs from ceiling--\n// this is the range of where they should spawn at\n#define SPAWN_RANGE_LEFT\t\t4\n#define SPAWN_RANGE_RIGHT\t\t16\n#define SPAWN_RANGE_TOP\t\t\t0\n#define SPAWN_RANGE_BOTTOM\t\t4\n\n// offset from top and from left or right (depending on direction facing)\n// to spawn the balrog 'puppet' when we return to balrog form after being defeated.\n#define BALDEATH_X\t\t\t\t(12 << CSF)\n#define BALDEATH_Y\t\t\t\t(44 << CSF)\n\n// twiddle adjustment to get the proper Y coordinate when switching\n// between normal and jumping sprites.\n#define JUMP_SPRITE_ADJ\t\t\t(16 << CSF)\n\n\nINITFUNC(AIRoutines)\n{\n\tONDEATH(OBJ_BALFROG, ondeath_balfrog);\n\tONTICK(OBJ_BALFROG_SHOT, ai_generic_angled_shot);\n}\n\nvoid BalfrogBoss::OnMapEntry(void)\n{\n\tmemset(&frog, 0, sizeof(frog));\n\t\n\to = CreateObject(FROG_START_X, FROG_START_Y, OBJ_BALFROG);\n\tgame.stageboss.object = o;\n\t\n\to->hp = 300;\n\to->damage = 0;\t// damage comes from our bbox puppets, not our own bbox\n\to->flags |= FLAG_SHOW_FLOATTEXT;\n\t\n\to->sprite = SPR_BALFROG;\n\to->dir = RIGHT;\n\to->invisible = true;\n\t\n\t// setup the bounding box objects--this boss has an irregular bounding box\n\t// and so we simulate that by having three invisible objects which are wired\n\t// to transmit hits to the real Balfrog boss object.\n\tfrog.bboxes.init(o, 3);\n\tfrog.bboxes.set_damage(5);\n\tfrog.bbox_mode = BM_DISABLED;\n\t\n\t// now disable being able to hit the Balfrog boss object itself.\n\to->flags &= ~FLAG_SHOOTABLE;\n\t\n\tobjprop[OBJ_BALFROG].xponkill = 1;\n\tobjprop[OBJ_BALFROG].shaketime = 9;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid BalfrogBoss::Run()\n{\n\tif (!o) return;\n\t\n\t// each subroutine handles a subset of the frog's finite state machine\n\tRunFighting();\n\tRunJumping();\n\tRunShooting();\n\t\n\tRunEntryAnim();\n\tRunDeathAnim();\n\t\n\tif (o)\t// because RunDeathAnim destroys o at end of fight\n\t{\n\t\to->yinertia += 0x40;\n\t\t// don't limit upwards inertia or Big Jump will fail\n\t\tif (o->yinertia > 0x5FF) o->yinertia = 0x5FF;\n\t\t\n\t\t// link our \"irregular\" bbox (actually composed of multiple \"puppet\" bboxes)\n\t\t// to our real object.\n\t\tfrog.bboxes.transmit_hits();\n\t\tfrog.bboxes.place(&call_place_bboxes, this);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void call_place_bboxes(void *balfrog)\n{\n\t((BalfrogBoss *)balfrog)->place_bboxes();\n}\n\nvoid BalfrogBoss::place_bboxes()\n{\n\t#define set_bbox\tfrog.bboxes.set_bbox\n\t\n\t// I got these coordinates by drawing rectangles over the\n\t// sprites in Photoshop. These are for the right-facing frame\n\t// and are automatically flipped if the object is facing left.\n\tswitch(frog.bbox_mode)\n\t{\n\t\tcase BM_STAND:\n\t\t\tset_bbox(0,  5, 28, 50, 36,  FLAG_INVULNERABLE);\t// body\n\t\t\tset_bbox(1,  37, 4, 38, 36,  FLAG_INVULNERABLE);\t// head\n\t\tbreak;\n\t\t\n\t\tcase BM_JUMPING:\n\t\t\tset_bbox(0,  12, 29, 41, 47, FLAG_INVULNERABLE);\t// body\n\t\t\tset_bbox(1,  30, 3, 43, 35,  FLAG_INVULNERABLE);\t// head\n\t\tbreak;\n\t\t\n\t\tcase BM_MOUTH_OPEN:\n\t\t\tset_bbox(0,\t 8, 22, 38, 42,  FLAG_INVULNERABLE);\t// backside\n\t\t\tset_bbox(1,  46, 54, 13, 10, FLAG_INVULNERABLE);\t// feet below mouth\n\t\t\tset_bbox(2,  46, 15, 21, 39, FLAG_SHOOTABLE);\t\t// mouth target\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// the \"master\" start state, we can always return here eventually from\n// all the other states. The script also sets this state to start the fight.\nvoid BalfrogBoss::RunFighting()\n{\n\tswitch(o->state)\n\t{\n\t\tcase STATE_FIGHTING:\n\t\t{\n\t\t\to->frame = FRAME_STAND;\n\t\t\tfrog.bbox_mode = BM_STAND;\n\t\t\t\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->xinertia = 0;\n\t\t}\n\t\tcase STATE_FIGHTING+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// prepare to jump\n\t\t\tif (o->timer < 50)  o->frame = FRAME_STAND;\n\t\t\tif (o->timer == 50) o->frame = FRAME_CROUCH;\n\t\t\tif (o->timer == 60) o->frame = FRAME_STAND;\n\t\t\t\n\t\t\t// jump\n\t\t\tif (o->timer > 64)\n\t\t\t\to->state = STATE_JUMPING;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n// handles the hopping and the \"big jump\" attack\n// (a straight up/down jump after every 3rd attack that spawns tons of frogs).\nvoid BalfrogBoss::RunJumping()\n{\n\tswitch(o->state)\n\t{\n\t\tcase STATE_JUMPING:\n\t\t{\n\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\n\t\t\tSetJumpingSprite(true);\n\t\t\to->yinertia = -0x400;\n\t\t\t\n\t\t\tXMOVE(0x200);\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_JUMPING+1:\n\t\t{\n\t\t\t// turn around at walls\n\t\t\tif (o->dir == LEFT && o->blockl) o->dir = RIGHT;\n\t\t\tif (o->dir == RIGHT && o->blockr) o->dir = LEFT;\n\t\t\t\n\t\t\t// landed?\n\t\t\tif (++o->timer > 3 && o->blockd)\n\t\t\t{\n\t\t\t\tquake(30);\n\t\t\t\tSetJumpingSprite(false);\n\t\t\t\t\n\t\t\t\t// passed player? turn around and fire!\n\t\t\t\tif ((o->dir == RIGHT && o->x >= player->x) || \\\n\t\t\t\t\t(o->dir == LEFT && o->x <= player->x))\n\t\t\t\t{\n\t\t\t\t\to->dir ^= 1;\n\t\t\t\t\to->state = STATE_OPEN_MOUTH;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_FIGHTING;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// shake a small frog loose from the ceiling on every landing\n\t\t\t\tSpawnFrogs(OBJ_MINIFROG, 1);\n\t\t\t\tSpawnSmoke(LANDING_SMOKE_COUNT, LANDING_SMOKE_YTOP);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_BIG_JUMP:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->xinertia = 0;\n\t\t}\n\t\tcase STATE_BIG_JUMP+1:\t\t// animation of preparing to jump\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer < 50)  o->frame = FRAME_STAND;\n\t\t\tif (o->timer == 50) o->frame = FRAME_CROUCH;\n\t\t\tif (o->timer == 70) o->frame = FRAME_STAND;\n\t\t\t\n\t\t\tif (o->timer > 74)\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\t\n\t\t\t\tSetJumpingSprite(true);\n\t\t\t\to->yinertia = -0xA00;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_BIG_JUMP+2:\t\t// in air, waiting to hit ground\n\t\t{\n\t\t\t// pass through ceiling at edges\n\t\t\tif (o->y <= MAPY(8))\n\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\telse\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\n\t\t\tif (++o->timer > 3 && o->blockd)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\tSetJumpingSprite(false);\n\t\t\t\tquake(60);\n\t\t\t\t\n\t\t\t\tSpawnFrogs(OBJ_MINIFROG, 6);\n\t\t\t\tSpawnFrogs(OBJ_FROG, 2);\n\t\t\t\tSpawnSmoke(LANDING_SMOKE_COUNT, LANDING_SMOKE_YTOP);\n\t\t\t\t\n\t\t\t\t// player ran under us? turn around and fire!\n\t\t\t\tif ((o->dir == RIGHT && o->x >= player->x) || \\\n\t\t\t\t\t(o->dir == LEFT && o->x <= player->x))\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_OPEN_MOUTH;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_FIGHTING;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid BalfrogBoss::RunShooting()\n{\n\tswitch(o->state)\n\t{\n\t\tcase STATE_OPEN_MOUTH:\t\t// open mouth and fire shots\n\t\t{\n\t\t\to->frame = FRAME_STAND;\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_OPEN_MOUTH+1:\n\t\t{\n\t\t\to->xinertia *= 8;\n\t\t\to->xinertia /= 9;\n\t\t\t\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 50)\n\t\t\t\to->frame = FRAME_CROUCH;\n\t\t\t\n\t\t\tif (o->timer > 54)\n\t\t\t{\n\t\t\t\to->state = STATE_SHOOTING;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\to->frame = FRAME_MOUTH_OPEN;\n\t\t\t\tfrog.bbox_mode = BM_MOUTH_OPEN;\n\t\t\t\t\n\t\t\t\tfrog.orighp = o->hp;\n\t\t\t\tfrog.shots_fired = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_SHOOTING:\n\t\t{\n\t\t\tfrog.bbox_mode = BM_MOUTH_OPEN;\n\t\t\to->frame = FRAME_MOUTH_OPEN;\n\t\t\to->xinertia *= 10;\n\t\t\to->xinertia /= 11;\n\t\t\t\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\tif (++frog.shakeflash & 2)\n\t\t\t\t\to->frame = FRAME_MOUTH_OPEN_HURT;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfrog.shakeflash = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 16)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tEmFireAngledShot(o, OBJ_BALFROG_SHOT, 16, 0x200);\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t\n\t\t\t\tif (++frog.shots_fired > 10 || o->hp < (frog.orighp - 90))\n\t\t\t\t{\n\t\t\t\t\to->frame = FRAME_CROUCH;\n\t\t\t\t\to->state = STATE_CLOSE_MOUTH;\n\t\t\t\t\tfrog.bbox_mode = BM_STAND;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_CLOSE_MOUTH:\n\t\t{\n\t\t\to->frame = FRAME_CROUCH;\n\t\t\t\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = FRAME_STAND;\n\t\t\t\t\n\t\t\t\tif (++frog.attackcounter >= 3)\n\t\t\t\t{\t// big jump after every 3rd attack\n\t\t\t\t\tfrog.attackcounter = 0;\n\t\t\t\t\to->state = STATE_BIG_JUMP;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_FIGHTING;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// the animation where we first appear\n// both these states are triggered by the script\nvoid BalfrogBoss::RunEntryAnim()\n{\n\tswitch(o->state)\n\t{\n\t\t// transforming from Balrog\n\t\t// the flicker is calibrated to be interlaced exactly out-of-phase\n\t\t// with Balrog's flicker, which is entirely separate.\n\t\tcase STATE_TRANSFORM:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->frame = FRAME_MOUTH_OPEN;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_TRANSFORM+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\to->invisible = (o->timer & 2) ? true : false;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// transformation complete: puff away balrog, and appear solid now\n\t\tcase STATE_READY:\n\t\t{\n\t\t\tSmokeXY(o->x + ((sprites[SPR_BALROG_GREEN].w / 2) << CSF), \\\n\t\t\t\to->y + (48 << CSF),\n\t\t\t\t8, 16, 16);\n\t\t\t\n\t\t\to->state++;\n\t\t\to->frame = FRAME_MOUTH_OPEN;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid BalfrogBoss::RunDeathAnim()\n{\n\tswitch(o->state)\n\t{\n\t\tcase STATE_DEATH:\t\t\t// BOOM!\n\t\t{\n\t\t\tSetJumpingSprite(false);\n\t\t\to->frame = FRAME_MOUTH_OPEN;\n\t\t\t\n\t\t\tsound(SND_BIG_CRASH);\n\t\t\to->xinertia = 0;\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t\t\n\t\t\tSpawnSmoke(DEATH_SMOKE_COUNT, DEATH_SMOKE_YTOP);\n\t\t}\n\t\tcase STATE_DEATH+1:\t\t\t// shaking with mouth open\n\t\t{\n\t\t\to->timer++;\n\t\t\tif ((o->timer % 5) == 0)\n\t\t\t{\n\t\t\t\tSpawnSmoke(1, DEATH_SMOKE_YTOP);\n\t\t\t}\n\t\t\t\n\t\t\t// at a glance it might seem like this has it alternate\n\t\t\t// slowly between 2 X coordinates, but in fact, it\n\t\t\t// alternates quickly between 3.\n\t\t\to->x += (o->timer & 2) ? (1 << CSF) : (-1 << CSF);\n\t\t\t\n\t\t\tif (o->timer > 100)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_DEATH+2:\t\t\t// begin flashing back and forth between frog and balrog\n\t\t{\n\t\t\t// spawn balrog puppet\n\t\t\tfrog.balrog = CreateObject(0, o->y+BALDEATH_Y, OBJ_BALROG);\n\t\t\tfrog.balrog->state = 500;\t// tell him to give us complete control\n\t\t\tfrog.balrog->dir = o->dir;\n\t\t\tfrog.balrog->frame = 5;\n\t\t\t\n\t\t\tif (o->dir == RIGHT)\n\t\t\t{\n\t\t\t\tfrog.balrog->x = (o->x + BALDEATH_X);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfrog.balrog->x = o->x + o->Width();\t// not the same as o->Right()\n\t\t\t\tfrog.balrog->x -= frog.balrog->Width();\n\t\t\t\tfrog.balrog->x -= BALDEATH_X;\n\t\t\t}\n\t\t\t\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_DEATH+3:\t\t// flashing\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif ((o->timer % 9) == 0)\n\t\t\t\tSpawnSmoke(1, DEATH_SMOKE_YTOP);\n\t\t\t\n\t\t\tif (o->timer <= 150)\n\t\t\t{\n\t\t\t\to->invisible = (o->timer & 2);\n\t\t\t\tfrog.balrog->invisible = !(o->timer & 2);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 156)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_DEATH+4:\t\t// balrog falling to ground\n\t\t{\n\t\t\t// should start to move exactly when timer hits 160\n\t\t\t//\n\t\t\t// 10 frames until starts to fall\n\t\t\t// 14 frames until changes to landed frame\n\t\t\tfrog.balrog->yinertia += 0x40;\n\t\t\t\n\t\t\tif (frog.balrog->blockd)\n\t\t\t{\n\t\t\t\tfrog.balrog->frame = 2;\n\t\t\t\tif (++o->timer > 30)\n\t\t\t\t{\n\t\t\t\t\tfrog.balrog->frame = 3;\n\t\t\t\t\to->state++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_DEATH+5:\t\t// balrog flying away\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\t// it's all over, destroy ourselves and clean up\n\t\t\t\tfrog.balrog->yinertia = -0xA00;\n\t\t\t\tfrog.balrog->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\t\n\t\t\t\tif (frog.balrog->y < -(100 << CSF))\n\t\t\t\t{\n\t\t\t\t\tfrog.balrog->Delete();\n\t\t\t\t\tfrog.bboxes.destroy();\n\t\t\t\t\t\n\t\t\t\t\to->Delete();\n\t\t\t\t\to = game.stageboss.object = NULL;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ondeath_balfrog(Object *o)\n{\n\to->flags &= ~FLAG_SHOOTABLE;\n\tStartScript(1000);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// shake loose frogs from the ceiling\nvoid BalfrogBoss::SpawnFrogs(int objtype, int count)\n{\nObject *child;\n\n\tfor(int i=0;i<count;i++)\n\t{\n\t\tint x = random(SPAWN_RANGE_LEFT, SPAWN_RANGE_RIGHT);\n\t\tint y = random(SPAWN_RANGE_TOP, SPAWN_RANGE_BOTTOM);\n\t\t\n\t\tchild = CreateObject((x*TILE_W)<<CSF, (y*TILE_H)<<CSF, objtype);\n\t\tchild->dir = DOWN;\t// allow fall through ceiling\n\t}\n}\n\n// spawn the smoke clouds from landing after a jump\n// or during the death sequence.\nvoid BalfrogBoss::SpawnSmoke(int count, int ytop)\n{\nObject *smoke;\n\n\tfor(int i=0;i<count;i++)\n\t{\n\t\tint x = random(o->Left() + (4 << CSF), o->Right() - (4<<CSF));\n\t\tint y = o->Bottom() + random(ytop<<CSF, 4<<CSF);\n\t\t\n\t\tsmoke = CreateObject(x, y, OBJ_SMOKE_CLOUD);\n\t\tsmoke->xinertia = random(-0x155, 0x155);\n\t\tsmoke->yinertia = random(-0x600, 0);\n\t}\n}\n\n\n// switches on and off the jumping frame/sprite\nvoid BalfrogBoss::SetJumpingSprite(bool enable)\n{\n\tif (enable != (o->sprite == SPR_BALFROG_JUMP))\n\t{\n\t\tif (enable)\n\t\t{\n\t\t\to->sprite = SPR_BALFROG_JUMP;\n\t\t\to->frame = FRAME_JUMPING;\n\t\t\to->y -= JUMP_SPRITE_ADJ;\n\t\t\t\n\t\t\tfrog.bbox_mode = BM_JUMPING;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->sprite = SPR_BALFROG;\n\t\t\to->frame = FRAME_STAND;\n\t\t\to->y += JUMP_SPRITE_ADJ;\n\t\t\t\n\t\t\tfrog.bbox_mode = BM_STAND;\n\t\t}\n\t}\n}\n\n\n"
  },
  {
    "path": "ai/boss/balfrog.fdh",
    "content": "//hash:c7373ca9\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//----------------[referenced from ai/boss/balfrog.cpp]--------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//----------------[referenced from ai/boss/balfrog.cpp]--------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in tsc.cpp */\n\n//----------------[referenced from ai/boss/balfrog.cpp]--------------//\nScriptInstance *StartScript(int scriptno, int pageno);\n\n\n/* located in trig.cpp */\n\n//----------------[referenced from ai/boss/balfrog.cpp]--------------//\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//----------------[referenced from ai/boss/balfrog.cpp]--------------//\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in ai/boss/balfrog.cpp */\n\n//----------------[referenced from ai/boss/balfrog.cpp]--------------//\nstatic void call_place_bboxes(void *balfrog);\nvoid ondeath_balfrog(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//----------------[referenced from ai/boss/balfrog.cpp]--------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//----------------[referenced from ai/boss/balfrog.cpp]--------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/boss/balfrog.h",
    "content": "\n#ifndef _BALFROG_H\n#define _BALFROG_H\n\n#include \"../IrregularBBox.h\"\n\nclass BalfrogBoss : public StageBoss\n{\npublic:\n\tvoid OnMapEntry();\n\tvoid Run();\n\n\tvoid place_bboxes();\n\nprivate:\n\tvoid RunDeathAnim();\n\tvoid RunEntryAnim();\n\t\n\tvoid RunFighting();\n\tvoid RunJumping();\n\tvoid RunShooting();\n\n\tvoid SetJumpingSprite(bool enable);\n\tvoid SpawnFrogs(int objtype, int count);\n\tvoid SpawnSmoke(int count, int ytop);\n\n\tvoid set_bbox(int index, int x, int y, int w, int h, uint32_t flags);\n\tvoid transmit_bbox_hits(Object *box);\n\t\n\tObject *o;\n\n\tstruct\n\t{\n\t\tint shakeflash;\n\t\t\n\t\tint orighp;\n\t\tint shots_fired;\n\t\tint attackcounter;\n\t\t\n\t\tObject *balrog;\t\t// balrog puppet for death scene\n\t\t\n\t\t// our group of multiple bboxes to simulate our irregular bounding box.\n\t\tIrregularBBox bboxes;\n\t\tint bbox_mode;\n\t\t\n\t} frog;\n};\n\n\n#endif\n"
  },
  {
    "path": "ai/boss/ballos.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"ballos.h\"\n#include \"ballos.fdh\"\n\nstatic int platform_speed;\nstatic int rotators_left;\n#define FLOOR_Y\t\t\t0x26000\t\t\t\t\t\t// Y coord of floor\n#define CRASH_Y\t\t\t(FLOOR_Y - (40 << CSF))\t\t// Y coord of main when body hits floor\n\nenum EYE_STATES\n{\n\tEYE_OPENING\t\t= 10,\n\tEYE_CLOSING\t\t= 20,\n\tEYE_INVISIBLE\t= 30,\n\tEYE_EXPLODING\t= 40\n};\n\nenum BS_STATES\n{\n\t// Form 1 states\n\tAS_COME_DOWN\t= 100,\t\t// scripted\n\tAS_BEGIN_FIGHT\t= 200,\t\t// scripted\n\tAS_PREPARE_JUMP\t= 210,\n\tAS_JUMPING\t\t= 215,\n\tAS_DEFEATED\t\t= 220,\t\t// scripted\n\t\n\t// Form 2 states.\n\tBS_ENTER_FORM\t= 300,\t\t// scripted\n\tBS_FIGHT_BEGIN\t= 311,\t\t// scripted\n\tBS_LEFT\t\t\t= 320,\n\tBS_UP\t\t\t= 330,\n\tBS_RIGHT\t\t= 340,\n\tBS_DOWN\t\t\t= 350,\n\t\n\t// Form 3 states\n\tCS_ENTER_FORM\t\t= 400,\n\tCS_SPAWN_SPIKES \t= 410,\n\tCS_EXPLODE_BLOODY\t= 420,\n\tCS_SPIN_PLATFORMS\t= 430\n};\n\nINITFUNC(AIRoutines)\n{\n\tONDEATH(OBJ_BALLOS_MAIN, ondeath_ballos);\n\n\tONTICK(OBJ_BALLOS_ROTATOR, ai_ballos_rotator);\n\tAFTERMOVE(OBJ_BALLOS_ROTATOR, aftermove_ballos_rotator);\n\t\n\tONTICK(OBJ_BALLOS_PLATFORM, ai_ballos_platform);\n}\n\nvoid BallosBoss::OnMapEntry(void)\n{\n\t// create (invisible) main controller object\n\tmain = CreateObject(0, 0, OBJ_BALLOS_MAIN);\n\tgame.stageboss.object = main;\n\t\n\tmain->id2 = 1000;\t// defeated script (has a flagjump in it to handle each form)\n\tmain->flags = (FLAG_SHOW_FLOATTEXT | FLAG_SCRIPTONDEATH | \\\n\t\t\t\t   FLAG_SOLID_BRICK | FLAG_IGNORE_SOLID);\n\t\n\tmain->x = ((map.xsize / 2) * TILE_W) << CSF;\n\tmain->y = -(64 << CSF);\n\t\n\tmain->damage = 0;\n\tmain->hp = 800;\n\t\n\tobjprop[main->type].hurt_sound = SND_ENEMY_HURT_COOL;\n\tmain->invisible = true;\n\t\n\t// create body (the big rock)\n\tbody = CreateObject(0, 0, OBJ_BALLOS_BODY);\n\tbody->hp = 1000;\t// not his real HP, we're using damage transfer\n\tbody->flags = (FLAG_SOLID_MUSHY | FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_IGNORE_SOLID);\n\t\n\t// create eyes (open/close animations)\n\tfor(int i=0;i<NUM_EYES;i++)\n\t{\n\t\teye[i] = CreateObject(0, 0, OBJ_BALLOS_EYE);\n\t\teye[i]->dir = i;\n\t\teye[i]->hp = 1000;\n\t}\n\t\n\t// create a top shield to cover eyes from above\n\tshield = CreateObject(0, 0, OBJ_BBOX_PUPPET);\n\tshield->sprite = SPR_BBOX_PUPPET_1;\n\tshield->invisible = true;\n\tshield->hp = 1000;\n\tshield->flags = (FLAG_SOLID_MUSHY | FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_IGNORE_SOLID);\n\t\n\t// initilize bboxes\n\tsprites[body->sprite].bbox.set(-48, -24, 48, 32);\n\tsprites[shield->sprite].bbox.set(-32, -8, 32, 8);\n\tsprites[main->sprite].bbox.set(-32, -48, 32, 48);\n\t\n\tsprites[main->sprite].solidbox = sprites[main->sprite].bbox;\n\tsprites[body->sprite].solidbox = sprites[body->sprite].bbox;\n\tsprites[shield->sprite].solidbox = sprites[shield->sprite].bbox;\n\t\n\t// body and eyes are both directly shootable during one form or another\n\t// but should not shake as their damage is to be transferred to main object.\n\tobjprop[OBJ_BALLOS_MAIN].shaketime = 8;\n\tobjprop[OBJ_BALLOS_BODY].shaketime = 0;\n\tobjprop[OBJ_BALLOS_EYE].shaketime = 0;\n\t\n\t// initilize parameters\n\tstat(\"BallosBoss::OnMapEntry()\");\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid BallosBoss::Run()\n{\n\tif (!main) return;\n\t//AIDEBUG;\n\t\n\ttransfer_damage(body, main);\n\ttransfer_damage(eye[LEFT], main);\n\ttransfer_damage(eye[RIGHT], main);\n\ttransfer_damage(shield, main);\n\t\n\tRunForm1(main);\n\tRunForm2(main);\n\tRunForm3(main);\n\tRunDefeated(main);\n\t\n\trun_eye(LEFT);\n\trun_eye(RIGHT);\n\t\n\t// flash red when hurt\n\tif (main->shaketime & 2)\n\t\tbody->frame |= 1;\n\telse\n\t\tbody->frame &= ~1;\n}\n\n\nvoid BallosBoss::RunAftermove()\n{\n\tif (!main)\n\t\treturn;\n\t\n\t// place eyes\n\tplace_eye(LEFT);\n\tplace_eye(RIGHT);\n\t\n\t// place body\n\tbody->x = main->x;\n\tbody->y = main->y;\n\t\n\t// place shield\n\tshield->x = main->x;\n\tshield->y = main->y - (44 << CSF);\n\t\n\t// riding on platform by eye? Player can sort of stay on this platform\n\t// when he jumps. We don't do this for the shield up top though, in order that\n\t// he gets kind of slid off--what happens is he'll fall through the shield\n\t// onto the main body (a SOLID_BRICK), and then now that he's embedded in\n\t// the shield (a SOLID_MUSHY), it'll repel him to the side.\n\tif (player->riding == body)\n\t{\n\t\tplayer->apply_xinertia(main->xinertia);\n\t\tplayer->apply_yinertia(main->yinertia);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// left and right maximums during form 1\nstatic const int F1_LEFT = (88 << CSF);\nstatic const int F1_RIGHT = (552 << CSF);\n\n// runs arrival of first form as a stage-boss\nvoid BallosBoss::RunComeDown(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase AS_COME_DOWN:\n\t\t{\n\t\t\to->savedhp = o->hp;\n\t\t\t\n\t\t\to->x = player->CenterX();\n\t\t\to->y = -(64 << CSF);\n\t\t\to->frame = 0;\n\t\t\t\n\t\t\t// create the targeter\n\t\t\t// setting dir to right tells it don't spawn any lightning\n\t\t\tCreateObject(o->x, FLOOR_Y, OBJ_BALLOS_TARGET)->dir = RIGHT;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tif (o->x < F1_LEFT) o->x = F1_LEFT;\n\t\t\tif (o->x > F1_RIGHT) o->x = F1_RIGHT;\n\t\t\t\n\t\t\to->state++;\n\t\t}\n\t\tcase AS_COME_DOWN+1:\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t\to->state++;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// falling\n\t\tcase AS_COME_DOWN+2:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0xC00);\n\t\t\t\n\t\t\tif (passed_ycoord(GREATER_THAN, CRASH_Y))\n\t\t\t{\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->timer = 0;\n\t\t\t\to->state++;\n\t\t\t\t\n\t\t\t\tmegaquake(30, SND_MISSILE_HIT);\n\t\t\t\t\n\t\t\t\t// player smush damage\n\t\t\t\t// (he could only get that low if he had been pushed into the floor)\n\t\t\t\tif (player->y > (o->y + (48<<CSF)))\n\t\t\t\t\thurtplayer(16);\n\t\t\t\t\n\t\t\t\tSmokeXY(o->x, o->y + (40<<CSF), 16, 40, 0);\n\t\t\t\t\n\t\t\t\tif (player->blockd)\n\t\t\t\t\tplayer->yinertia = -0x200;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase AS_COME_DOWN+3:\n\t\t{\n\t\t\tif (++o->timer > 31)\n\t\t\t{\n\t\t\t\tSetEyeStates(EYE_OPENING);\n\t\t\t\to->state++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// 1st form as a stageboss.\n// the one where he jumps around as a rock.\nvoid BallosBoss::RunForm1(Object *o)\n{\n\tRunComeDown(o);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase AS_BEGIN_FIGHT:\n\t\t{\n\t\t\t// can be damaged between eyes opening and boss bar appearing,\n\t\t\t// but it is not counted.\n\t\t\to->hp = o->savedhp;\n\t\t\to->state = AS_PREPARE_JUMP;\n\t\t}\n\t\tcase AS_PREPARE_JUMP:\t// delay, then jump at player\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\to->damage = 0;\n\t\t\to->state++;\n\t\t\t\n\t\t\t// he makes two jumps then a pause,\n\t\t\t// after that it's three jumps before pausing.\n\t\t\t// this corresponds to:\n\t\t\tif ((++o->timer2 % 3) == 0)\n\t\t\t\to->timer = 150;\n\t\t\telse\n\t\t\t\to->timer = 50;\n\t\t}\n\t\tcase AS_PREPARE_JUMP+1:\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->yinertia = -0xC00;\n\t\t\t\to->xinertia = (o->x < player->x) ? 0x200 : -0x200;\n\t\t\t\to->state = AS_JUMPING;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase AS_JUMPING:\n\t\t{\n\t\t\to->yinertia += 0x55;\n\t\t\tLIMITY(0xC00);\n\t\t\t\n\t\t\tif (passed_xcoord(LESS_THAN, F1_LEFT)) o->xinertia = 0x200;\n\t\t\tif (passed_xcoord(GREATER_THAN, F1_RIGHT)) o->xinertia = -0x200;\n\t\t\t\n\t\t\tif (passed_ycoord(GREATER_THAN, CRASH_Y))\n\t\t\t{\n\t\t\t\t// player smush damage\n\t\t\t\tif (player->y > (o->y + (48<<CSF)))\n\t\t\t\t\thurtplayer(16);\n\t\t\t\t\n\t\t\t\t// player hopping from the vibration\n\t\t\t\tif (player->blockd)\n\t\t\t\t\tplayer->yinertia = -0x200;\n\t\t\t\t\n\t\t\t\tmegaquake(30, SND_MISSILE_HIT);\n\t\t\t\t\n\t\t\t\tCreateObject(o->x - (12<<CSF), o->y + (52<<CSF), OBJ_BALLOS_BONE_SPAWNER)->dir = LEFT;\n\t\t\t\tCreateObject(o->x + (12<<CSF), o->y + (52<<CSF), OBJ_BALLOS_BONE_SPAWNER)->dir = RIGHT;\n\t\t\t\t\n\t\t\t\tSmokeXY(o->x, o->y + (40<<CSF), 16, 40, 0);\n\t\t\t\t\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->state = AS_PREPARE_JUMP;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// 1st form defeated\n\t\tcase AS_DEFEATED:\n\t\t{\n\t\t\tSetEyeStates(EYE_CLOSING);\n\t\t\tgame.bossbar.defeated = true;\n\t\t\to->hp = 1200;\n\t\t\t\n\t\t\to->state++;\n\t\t\t\n\t\t\to->xinertia = 0;\n\t\t\to->shaketime = 0;\n\t\t}\n\t\tcase AS_DEFEATED+1:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0xC00);\n\t\t\t\n\t\t\tif (passed_ycoord(GREATER_THAN, CRASH_Y))\n\t\t\t{\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->state++;\n\t\t\t\t\n\t\t\t\tmegaquake(30, SND_MISSILE_HIT);\n\t\t\t\tSmokeXY(o->x, o->y + 0x5000, 16, 40, 0);\n\t\t\t\t\n\t\t\t\tif (player->blockd)\n\t\t\t\t\tplayer->yinertia = -0x200;\n\t\t\t\t\n\t\t\t\t// ... and wait for script to trigger form 2\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// 2nd form as a stageboss.\n// the one where he spawns spiky rotators and circles around the room.\nvoid BallosBoss::RunForm2(Object *o)\n{\n\tstatic const int BS_SPEED = 0x3AA;\n\tstatic const int ARENA_LEFT = (119 << CSF);\n\tstatic const int ARENA_TOP = (119 << CSF);\n\tstatic const int ARENA_RIGHT = (521 << CSF);\n\tstatic const int ARENA_BOTTOM = (233 << CSF);\n\t\n\tswitch(o->state)\n\t{\n\t\t// enter 2nd form (script-triggered)\n\t\tcase BS_ENTER_FORM:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t\t\n\t\t\trotators_left = 0;\n\t\t\tfor(int angle=0;angle<=0x100;angle+=0x20)\n\t\t\t{\n\t\t\t\tObject *r = CreateObject(o->x, o->y, OBJ_BALLOS_ROTATOR);\n\t\t\t\tr->angle = angle;\n\t\t\t\tr->dir = (rotators_left & 1) ? RIGHT : LEFT;\n\t\t\t\t\n\t\t\t\trotators_left++;\n\t\t\t}\n\t\t}\n\t\tcase BS_ENTER_FORM+1:\n\t\t{\n\t\t\to->y += (ARENA_BOTTOM - o->y) / 8;\n\t\t\t\n\t\t\tif (passed_xcoord(LESS_THAN, ARENA_LEFT, false))\n\t\t\t\to->x += (ARENA_LEFT - o->x) / 8;\n\t\t\t\n\t\t\tif (passed_xcoord(GREATER_THAN, ARENA_RIGHT, false))\n\t\t\t\to->x += (ARENA_RIGHT - o->x) / 8;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BS_FIGHT_BEGIN:\t// script-triggered\n\t\t{\n\t\t\tSetRotatorStates(10);\t// spin CCW, work as treads\n\t\t\to->state = BS_LEFT;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase BS_LEFT:\t\t// left on floor\n\t\t{\n\t\t\to->xinertia = -BS_SPEED;\n\t\t\to->yinertia = 0;\n\t\t\to->dirparam = LEFT;\n\t\t\t\n\t\t\tif (passed_xcoord(LESS_THAN, ARENA_LEFT))\n\t\t\t\to->state = BS_UP;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// up on wall\n\t\tcase BS_UP:\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = -BS_SPEED;\n\t\t\to->dirparam = UP;\n\t\t\t\n\t\t\tif (passed_ycoord(LESS_THAN, ARENA_TOP))\n\t\t\t\to->state = BS_RIGHT;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// right on ceiling\n\t\tcase BS_RIGHT:\n\t\t{\n\t\t\to->xinertia = BS_SPEED;\n\t\t\to->yinertia = 0;\n\t\t\to->dirparam = RIGHT;\n\t\t\t\n\t\t\t// all rotators destroyed?\n\t\t\tif (rotators_left <= 0 && ++o->timer > 3)\n\t\t\t{\n\t\t\t\t// center of room\n\t\t\t\tif (o->x >= (312<<CSF) && o->x <= (344<<CSF))\n\t\t\t\t{\n\t\t\t\t\to->state = CS_ENTER_FORM;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (passed_xcoord(GREATER_THAN, ARENA_RIGHT))\n\t\t\t\to->state = BS_DOWN;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// down on wall\n\t\tcase BS_DOWN:\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = BS_SPEED;\n\t\t\to->dirparam = DOWN;\n\t\t\t\n\t\t\tif (passed_ycoord(GREATER_THAN, ARENA_BOTTOM))\n\t\t\t{\n\t\t\t\to->state = BS_LEFT;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// form 3 as a stageboss, the final form.\n// he reaches the center of the room, platforms come out, spikes go up,\n// and he explodes into a really bloody version of himself.\n//\n// then the platforms spin in various speeds and directions while he\n// spawns red butes from the sides and his top.\nvoid BallosBoss::RunForm3(Object *o)\n{\n\tstatic const int YPOSITION = (167 << CSF);\n\t\n\t// platform spin speeds and how long they travel at each speed.\n\t// it's a repeating pattern.\n\tstatic const struct\n\t{\n\t\tint length, speed;\n\t}\n\tplatform_pattern[] =\n\t{\n\t\t500, 2,\n\t\t200, 1,\n\t\t20,  0,\n\t\t200, -1,\n\t\t500, -2,\n\t\t200, -1,\n\t\t20,  0,\n\t\t200, 1,\n\t\t0,   0\n\t};\n\t\n\tswitch(o->state)\n\t{\n\t\t// enter form 3\n\t\tcase CS_ENTER_FORM:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\to->state++;\n\t\t\t\n\t\t\tDeleteObjectsOfType(OBJ_GREEN_DEVIL_SPAWNER);\n\t\t\tSetRotatorStates(20);\t// fast spin CCW\n\t\t}\n\t\tcase CS_ENTER_FORM+1:\n\t\t{\n\t\t\t// come down into center of room\n\t\t\to->y += (YPOSITION - o->y) / 8;\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 50)\n\t\t\t{\n\t\t\t\t// create platforms\n\t\t\t\tplatform_speed = 0;\n\t\t\t\t\n\t\t\t\tfor(int angle=0;angle<0x100;angle+=0x20)\n\t\t\t\t{\n\t\t\t\t\tObject *p = CreateObject(o->x, o->y, OBJ_BALLOS_PLATFORM);\n\t\t\t\t\tp->dirparam = angle;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 100)\n\t\t\t{\n\t\t\t\tplatform_speed = -1;\n\t\t\t\t\n\t\t\t\to->state = CS_SPAWN_SPIKES;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase CS_SPAWN_SPIKES:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->xmark = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase CS_SPAWN_SPIKES+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif ((o->timer % 3) == 0)\n\t\t\t\tsound(SND_QUAKE);\n\t\t\t\n\t\t\tif ((o->timer % 30) == 1)\n\t\t\t{\n\t\t\t\to->xmark += 2;\n\t\t\t\tCreateObject((o->xmark * TILE_W) << CSF, \\\n\t\t\t\t\t\t\t FLOOR_Y + (48 << CSF), OBJ_BALLOS_SPIKES);\n\t\t\t\t\n\t\t\t\tif (o->xmark == 38)\n\t\t\t\t\to->state = CS_EXPLODE_BLOODY;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// explode into all bloody\n\t\tcase CS_EXPLODE_BLOODY:\n\t\t{\n\t\t\tSetEyeStates(EYE_INVISIBLE);\n\t\t\tSetRotatorStates(30);\t\t\t// slow spin CW, alternate open/closed\n\t\t\t\n\t\t\tSmokeClouds(o, 256, 60, 60);\t// ka boom!\n\t\t\tsound(SND_EXPLOSION1);\n\t\t\tmegaquake(30);\n\t\t\t\n\t\t\tbody->frame |= 2;\t\t// go all bloody\n\t\t\tbody->flags &= ~FLAG_INVULNERABLE;\n\t\t\tshield->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\n\t\t\to->state = CS_SPIN_PLATFORMS;\n\t\t}\n\t\t// fall-through\n\t\tcase CS_SPIN_PLATFORMS:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->timer2 = 0;\n\t\t\to->timer3 = 0;\n\t\t\t\n\t\t\tplatform_speed = platform_pattern[o->timer2].speed;\n\t\t}\n\t\tcase CS_SPIN_PLATFORMS+1:\n\t\t{\n\t\t\t// spin platforms\n\t\t\tif (++o->timer3 > platform_pattern[o->timer2].length)\n\t\t\t{\n\t\t\t\to->timer3 = 0;\n\t\t\t\to->timer2++;\n\t\t\t\t\n\t\t\t\tif (!platform_pattern[o->timer2].length)\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t\n\t\t\t\tplatform_speed = platform_pattern[o->timer2].speed;\n\t\t\t}\n\t\t\t\n\t\t\t// spawn butes\n\t\t\tswitch(++o->timer)\n\t\t\t{\n\t\t\t\tcase 270:\t// spawn swordsmen from face\n\t\t\t\tcase 280:\n\t\t\t\tcase 290:\n\t\t\t\t{\n\t\t\t\t\tSmokeXY(o->x, o->y - (52<<CSF), 4);\n\t\t\t\t\tCreateObject(o->x, o->y - (52<<CSF), OBJ_BUTE_SWORD_RED)->dir = UP;\n\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 300:\t// spawn archers on side\n\t\t\t\t{\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\t// direction butes will be facing, not side of screen\n\t\t\t\t\tint dir = (player->CenterX() > o->x) ? LEFT : RIGHT;\n\t\t\t\t\t\n\t\t\t\t\tfor(int i=0;i<8;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t// give some granularity to the coords,\n\t\t\t\t\t\t// so that they can't overlap too closely.\n\t\t\t\t\t\tint x = (random(-TILE_W, TILE_W) & ~3) << CSF;\n\t\t\t\t\t\tint y = (random(2 * TILE_H, 17 * TILE_H) & ~3) << CSF;\n\t\t\t\t\t\tif (dir == LEFT) x += MAPX(map.xsize - 1);\n\t\t\t\t\t\t\n\t\t\t\t\t\tCreateObject(x, y, OBJ_BUTE_ARCHER_RED)->dir = dir;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// spawn blood\n\t\t\tint prob = (o->hp <= 500) ? 4 : 10;\n\t\t\tif (!random(0, prob))\n\t\t\t{\n\t\t\t\tCreateObject(o->x + random(-40<<CSF, 40<<CSF), \\\n\t\t\t\t\t\t\t o->y + random(0, 40<<CSF),\n\t\t\t\t\t\t\t OBJ_RED_ENERGY)->angle = DOWN;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n\nvoid BallosBoss::RunDefeated(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 1000:\n\t\t{\n\t\t\to->state = 1001;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tSetEyeStates(EYE_EXPLODING);\t// blow out eyes\n\t\t\tSetRotatorStates(1000);\t\t\t// explode rotators\n\t\t\t\n\t\t\tuint32_t mask = ~(FLAG_SOLID_BRICK | FLAG_SOLID_MUSHY | \\\n\t\t\t\t\t\t\t  FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\t\t\tmain->flags &= mask;\n\t\t\tbody->flags &= mask;\n\t\t\tshield->flags &= mask;\n\t\t\teye[LEFT]->flags &= mask;\n\t\t\teye[RIGHT]->flags &= mask;\n\t\t}\n\t\tcase 1001:\n\t\t{\n\t\t\tint x = o->x + random(-60<<CSF, 60<<CSF);\n\t\t\tint y = o->y + random(-60<<CSF, 60<<CSF);\n\t\t\tSmokePuff(x, y);\n\t\t\teffect(x, y, EFFECT_BOOMFLASH);\n\t\t\t\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif ((o->timer % 12) == 0)\n\t\t\t\tsound(SND_MISSILE_HIT);\n\t\t\t\n\t\t\tif (o->timer > 150)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 1002;\n\t\t\t\t\n\t\t\t\tstarflash.Start(o->x, o->y);\n\t\t\t\tsound(SND_EXPLOSION1);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1002:\n\t\t{\n\t\t\tmegaquake(40);\n\t\t\t\n\t\t\tif (++o->timer >= 50)\n\t\t\t{\n\t\t\t\tKillObjectsOfType(OBJ_BUTE_ARCHER_RED);\n\t\t\t\tKillObjectsOfType(OBJ_BALLOS_SPIKES);\n\t\t\t\t\n\t\t\t\tbody->invisible = true;\n\t\t\t\teye[LEFT]->invisible = true;\n\t\t\t\teye[RIGHT]->invisible = true;\n\t\t\t\to->state = 1003;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ondeath_ballos(Object *o)\n{\n\t// as soon as one of his forms is defeated make him non-killable\n\t// until the init for the next form runs and makes him killable again.\n\t// intended to fix the extremely rare possibility of killing him completely\n\t// after his 1st form instead of moving on to the spiky rotators like he should.\n\to->hp = 999999;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// Handles his eyes.\n//\n// When closed, the eyes are like \"overlay\" objects that replace the open eyes\n// drawn on the body, and allow animating them seperately from the body.\n//\n// When open, the eyes turn invisible and are used as shoot-points to detect shots\n// hitting the eyes drawn on the body.\nvoid BallosBoss::run_eye(int index)\n{\n\tObject *o = eye[index];\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->flags = (FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// open eyes\n\t\tcase EYE_OPENING:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase EYE_OPENING+1:\n\t\t{\n\t\t\tif (++o->animtimer > 2)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\tif (++o->frame >= 3)\n\t\t\t\t{\n\t\t\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\t\to->invisible = true;\n\t\t\t\t\to->state++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// close eyes\n\t\tcase EYE_CLOSING:\n\t\t{\n\t\t\to->frame = 3;\n\t\t\to->invisible = false;\n\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\t\n\t\t\to->animtimer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase EYE_CLOSING+1:\n\t\t{\n\t\t\tif (++o->animtimer > 2)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\tif (--o->frame <= 0)\n\t\t\t\t{\n\t\t\t\t\to->frame = 0;\n\t\t\t\t\to->state++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// invisible (the underlying eyes drawn on the body are what are seen)\n\t\tcase EYE_INVISIBLE:\n\t\t{\n\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\to->invisible = true;\n\t\t\to->state++;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// explode eyes (final defeat sequence)\n\t\tcase EYE_EXPLODING:\n\t\t{\n\t\t\to->frame = 4;\t// empty eyes\n\t\t\to->invisible = false;\n\t\t\t\n\t\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\t\t\to->state++;\n\t\t\t\n\t\t\tif (o->dir == LEFT)\n\t\t\t\tSmokeXY(o->x - (4<<CSF), o->y, 10, 4, 4);\n\t\t\telse\n\t\t\t\tSmokeXY(o->x + (4<<CSF), o->y, 10, 4, 4);\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\nvoid BallosBoss::place_eye(int index)\n{\n\tObject *o = eye[index];\n\t\n\tif (o->dir == LEFT)\n\t\to->x = main->x - (24 << CSF);\n\telse\n\t\to->x = main->x + (24 << CSF);\n\t\n\to->y = main->y - (36 << CSF);\n}\n\nvoid BallosBoss::SetEyeStates(int newstate)\n{\n\teye[LEFT]->state = newstate;\n\teye[RIGHT]->state = newstate;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_ballos_rotator(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// just spawned\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->timer2 = o->angle * 2;\n\t\t\t\n\t\t\to->timer3 = 0xC0;\n\t\t\to->damage = 14;\n\t\t}\n\t\tcase 1:\t\t// expanding outward; overshoot a bit\n\t\t{\n\t\t\tif (o->timer3 < 0x140)\n\t\t\t\to->timer3 += 0x08;\n\t\t\telse\n\t\t\t\to->state = 2;\n\t\t}\n\t\tbreak;\n\t\tcase 2:\t\t// come back in to correct distance\n\t\t{\n\t\t\tif (o->timer3 > 0x130)\n\t\t\t\to->timer3 -= 0x04;\n\t\t\telse\n\t\t\t\to->state = 3;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// spinning CCW during form 2 (working like treads)\n\t\tcase 10:\n\t\t{\n\t\t\to->state = 11;\n\t\t\t\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\to->hp = 1000;\n\t\t}\n\t\tcase 11:\t\t// spinning during phase 2, alive\n\t\t{\n\t\t\to->timer2 -= 2;\n\t\t\tif (o->timer2 < 0) o->timer2 += 0x200;\n\t\t\t\n\t\t\tif (o->frame != 2)\t\t// still undestroyed?\n\t\t\t{\n\t\t\t\to->frame = (o->shaketime & 2) ? 1 : 0;\n\t\t\t\t\n\t\t\t\tif (o->hp <= (1000 - 100))\n\t\t\t\t{\n\t\t\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\t\to->frame = 2;\t// close eye\n\t\t\t\t\t\n\t\t\t\t\tSmokeClouds(o, 32, 16, 16);\n\t\t\t\t\tsound(SND_LITTLE_CRASH);\n\t\t\t\t\t\n\t\t\t\t\trotators_left--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tspawn_impact_puffs(o);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// spinning fast CCW while spikes come up\n\t\t{\n\t\t\to->frame = 2;\n\t\t\t\n\t\t\to->timer2 -= 4;\n\t\t\tif (o->timer2 < 0) o->timer2 += 0x200;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// beginning form 3\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->hp = 1000;\n\t\t\to->damage = 10;\n\t\t\t\n\t\t\t// this dir was set when they were created and\n\t\t\t// alternates left/right around the circle\n\t\t\tif (o->dir == LEFT)\n\t\t\t{\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\t\to->frame = 2;\n\t\t\t}\n\t\t}\n\t\tcase 31:\t\t// form 3 CW slow spin\n\t\t{\n\t\t\t// come in closer to main object\n\t\t\tif (o->timer3 > 0x100)\n\t\t\t\to->timer3--;\n\t\t\t\n\t\t\t// spin CW\n\t\t\tif (++o->timer2 > 0x200)\n\t\t\t\to->timer2 -= 0x200;\n\t\t\t\n\t\t\tif (o->flags & FLAG_SHOOTABLE)\n\t\t\t{\n\t\t\t\to->frame = (o->shaketime & 2) ? 1 : 0;\n\t\t\t\t\n\t\t\t\tif (o->hp < (1000 - 100))\n\t\t\t\t{\n\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\to->yinertia = 0;\n\t\t\t\t\t\n\t\t\t\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_IGNORE_SOLID);\n\t\t\t\t\tSmokeClouds(o, 32, 16, 16);\n\t\t\t\t\tsound(SND_LITTLE_CRASH);\n\t\t\t\t\t\n\t\t\t\t\to->frame = 2;\n\t\t\t\t\to->state = 40;\n\t\t\t\t\to->damage = 5;\n\t\t\t\t\t\n\t\t\t\t\t// blow up immediately if Ballos is defeated\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// destroyed during phase 3, bouncing\n\t\t{\n\t\t\to->yinertia += 0x20;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (o->blockl) o->xinertia = 0x100;\n\t\t\tif (o->blockr) o->xinertia = -0x100;\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\t// first time they hit they head toward player, after that\n\t\t\t\t// they keep going in same direction until hit wall\n\t\t\t\tif (o->xinertia == 0)\n\t\t\t\t\to->xinertia = (o->CenterX() < player->CenterX()) ? 0x100 : -0x100;\n\t\t\t\t\n\t\t\t\to->yinertia = -0x800;\n\t\t\t\tsound(SND_QUAKE);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1000:\t\t// Ballos was defeated\n\t\t{\n\t\t\to->state = 1001;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\t\n\t\t\to->frame = 2;\n\t\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_IGNORE_SOLID);\n\t\t\to->damage = 0;\n\t\t\t\n\t\t\to->timer2 /= 4;\n\t\t}\n\t\tcase 1001:\n\t\t{\n\t\t\t// explode one by one going clockwise\n\t\t\tif (o->timer2 <= 0)\n\t\t\t{\n\t\t\t\tSmokeClouds(o, 32, 16, 16);\n\t\t\t\tsound(SND_LITTLE_CRASH);\n\t\t\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->timer2--;\n\t\t\t\to->frame = (o->timer2 & 2) ? 1 : 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid aftermove_ballos_rotator(Object *o)\n{\n\tif (o->state < 40)\n\t{\n\t\tObject *ballos = game.stageboss.object;\n\t\tif (!ballos) return;\n\t\t\n\t\tuint8_t angle = (o->timer2 / 2);\n\t\tint dist = (o->timer3 / 4) << CSF;\n\t\t\n\t\to->x = ballos->x + (xinertia_from_angle(angle, dist));\n\t\to->y = ballos->y + (yinertia_from_angle(angle, dist));\n\t}\n}\n\n\nstatic void SetRotatorStates(int newstate)\n{\n\tObject *o;\n\tFOREACH_OBJECT(o)\n\t{\n\t\tif (o->type == OBJ_BALLOS_ROTATOR)\n\t\t\to->state = newstate;\n\t}\n}\n\n\n// spawns impact smokeclouds/skulls as the rotators hit the ground/walls\nstatic void spawn_impact_puffs(Object *o)\n{\n\tObject *ballos = game.stageboss.object;\n\t\n\t#define SHORT\t\t(8<<CSF)\n\t#define LONG\t\t(12<<CSF)\n\t#define HITANGLE\t12\n\tstatic const struct\n\t{\n\t\tint wallangle;\n\t\tint xoffs1, xoffs2;\n\t\tint yoffs1, yoffs2;\n\t}\n\thitdata[] =\n\t{\n\t\t0x180, SHORT, -SHORT, -LONG, -LONG,\t\t// RIGHT on ceiling\n\t\t0x80,  SHORT, -SHORT, LONG, LONG,\t\t// LEFT on floor\n\t\t0x100, -LONG, -LONG, SHORT, -SHORT,\t\t// UP left wall\n\t\t0x00,  LONG, LONG,   SHORT, -SHORT\t\t// DOWN right wall\n\t};\n\t\n\tint bd = ballos->dirparam;\n\tif (o->timer2 == hitdata[bd].wallangle + HITANGLE)\n\t{\n\t\tmake_puff(o->x + hitdata[bd].xoffs1, o->y + hitdata[bd].yoffs1, bd);\n\t\tmake_puff(o->x + hitdata[bd].xoffs2, o->y + hitdata[bd].yoffs2, bd);\n\t\tsound(SND_QUAKE);\n\t\t\n\t\tif (bd == RIGHT)\t\t// on ceiling\n\t\t{\n\t\t\tCreateObject(o->x - SHORT, o->y - LONG, OBJ_BALLOS_SKULL);\n\t\t}\n\t}\n}\n\nstatic void make_puff(int x, int y, int bd)\n{\n\tObject *o = SmokePuff(x, y);\n\t\n\t// make sure the smoke puff is traveling away from floor/wall\n\tswitch(bd)\n\t{\n\t\tcase LEFT:\to->yinertia = -abs(o->yinertia); break;\n\t\tcase UP:\to->xinertia = abs(o->xinertia); break;\n\t\tcase RIGHT: o->yinertia = abs(o->yinertia); break;\n\t\tcase DOWN:\to->xinertia = -abs(o->xinertia); break;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_ballos_platform(Object *o)\n{\n\tObject *ballos = game.stageboss.object;\n\tif (!ballos) return;\n\t\n\tif (ballos->state >= 1000)\t\t// defeated\n\t{\n\t\tif (o->state < 1000)\n\t\t\to->state = 1000;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// just spawned\n\t\t{\n\t\t\to->timer2 = (o->dirparam * 4);\n\t\t\to->timer3 = 0xC0;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\t\t// expanding outward\n\t\t{\n\t\t\tif (o->timer3 < 0x1C0)\n\t\t\t\to->timer3 += 8;\n\t\t\telse\n\t\t\t\to->state = 2;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// running - the direction/speed is set by the global variable,\n\t\t// controlled by Ballos.\n\t\tcase 2:\n\t\t{\n\t\t\to->timer2 += platform_speed;\n\t\t\tif (o->timer2 < 0) o->timer2 += 0x400;\n\t\t\tif (o->timer2 >= 0x400) o->timer2 -= 0x400;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1000:\t// ballos defeated!\n\t\t{\n\t\t\to->state = 1001;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\to->flags &= ~FLAG_SOLID_BRICK;\n\t\t}\n\t\tcase 1001:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\t\n\t\t\tif (o->Top() > (map.ysize * TILE_H) << CSF)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state >= 1000)\n\t\treturn;\n\t\n\t// let player jump up through platforms, but be solid when he is standing on them\n\tif (player->yinertia < 0 || player->CenterY() > o->Top())\n\t{\n\t\to->flags &= ~FLAG_SOLID_BRICK;\n\t}\n\telse\n\t{\n\t\to->flags |= FLAG_SOLID_BRICK;\n\t}\n\t\n\t// spin\n\tuint8_t angle = o->timer2 / 4;\n\tint xoff, yoff;\n\t\n\txoff = xinertia_from_angle(angle, o->timer3 << CSF);\n\tyoff = yinertia_from_angle(angle, o->timer3 << CSF);\n\t\n\to->xmark = (xoff / 4) + ballos->x;\n\to->ymark = ((yoff / 4) + (16 << CSF)) + ballos->y;\n\t\n\tswitch(abs(platform_speed))\n\t{\n\t\tcase 1:\n\t\t\tif ((o->timer2 % 4) == 0)\n\t\t\t{\n\t\t\t\to->speed = (o->ymark - o->y) / 4;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t\tif ((o->timer2 & 2) == 0)\n\t\t\t{\n\t\t\t\to->speed = (o->ymark - o->y) / 2;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\to->speed = (o->ymark - o->y);\n\t\tbreak;\n\t}\n\t\n\to->xinertia = (o->xmark - o->x);\n\to->yinertia = o->speed;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool BallosBoss::passed_xcoord(bool ltgt, int xcoord, bool reset)\n{\n\tint next_x = main->x + main->xinertia;\n\tbool result;\n\t\n\tif (ltgt == LESS_THAN)\n\t\tresult = (next_x <= xcoord);\n\telse\n\t\tresult = (next_x >= xcoord);\n\t\n\tif (result && reset)\n\t{\n\t\tmain->x = xcoord;\n\t\tmain->xinertia = 0;\n\t}\n\t\n\treturn result;\n}\n\n\nbool BallosBoss::passed_ycoord(bool ltgt, int ycoord, bool reset)\n{\n\tint next_y = main->y + main->yinertia;\n\tbool result;\n\t\n\tif (ltgt == LESS_THAN)\n\t\tresult = (next_y <= ycoord);\n\telse\n\t\tresult = (next_y >= ycoord);\n\t\n\tif (result && reset)\n\t{\n\t\tmain->y = ycoord;\n\t\tmain->yinertia = 0;\n\t}\n\t\n\treturn result;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/boss/ballos.fdh",
    "content": "//hash:4fc91ee5\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nvoid megaquake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in player.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nvoid hurtplayer(int damage);\n\n\n/* located in trig.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nint xinertia_from_angle(uint8_t angle, int speed);\nint yinertia_from_angle(uint8_t angle, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nvoid transfer_damage(Object *o, Object *target);\nvoid DeleteObjectsOfType(int type);\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nObject *SmokePuff(int x, int y);\n\n\n/* located in ai/boss/ballos.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nvoid ondeath_ballos(Object *o);\nvoid ai_ballos_rotator(Object *o);\nvoid aftermove_ballos_rotator(Object *o);\nstatic void SetRotatorStates(int newstate);\nstatic void spawn_impact_puffs(Object *o);\nstatic void make_puff(int x, int y, int bd);\nvoid ai_ballos_platform(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//----------------[referenced from ai/boss/ballos.cpp]---------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/boss/ballos.h",
    "content": "\n#ifndef _BALLOS_H\n#define _BALLOS_H\n\n#define NUM_EYES\t\t2\nenum TRIGDIR { LESS_THAN=0, GREATER_THAN=1 };\n\nclass BallosBoss : public StageBoss\n{\npublic:\n\tvoid OnMapEntry();\n\tvoid Run();\n\tvoid RunAftermove();\n\nprivate:\n\tvoid RunForm1(Object *o);\n\tvoid RunForm2(Object *o);\n\tvoid RunForm3(Object *o);\n\tvoid RunComeDown(Object *o);\n\tvoid RunDefeated(Object *o);\n\t\n\tvoid run_eye(int index);\n\tvoid place_eye(int index);\n\tvoid SetEyeStates(int newstate);\n\t\n\tbool passed_xcoord(bool ltgt, int xcoord, bool reset=false);\n\tbool passed_ycoord(bool ltgt, int ycoord, bool reset=false);\n\t\n\tObject *main;\n\tObject *body;\n\tObject *eye[NUM_EYES];\n\tObject *shield;\t\t// top shield to cover eyes from above\n};\n\n\n#endif\n"
  },
  {
    "path": "ai/boss/core.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../almond/almond.h\"\n#include \"core.h\"\n#include \"core.fdh\"\n\n/* ------------------------------------------------------------------------------------------ */\n/*        CODE FOR THE CORE BOSS (ALMOND)\t\t\t\t\t\t\t\t\t\t\t\t\t  */\n/* ------------------------------------------------------------------------------------------ */\n \n// these are the meanings of the various pieces inside pieces[] array\n#define MC1\t\t\t\t0\t\t\t// minicores 1 through 5\n#define MC2\t\t\t\t1\n#define MC3\t\t\t\t2\n#define MC4\t\t\t\t3\n#define MC5\t\t\t\t4\n#define CFRONT\t\t\t5\t\t\t// front half of the core body\n#define CBACK\t\t\t6\t\t\t// back half of the core body\n\n// states for the core\n#define CORE_SLEEP\t\t\t10\n#define CORE_CLOSED\t\t\t200\n#define CORE_OPEN\t\t\t210\n#define CORE_GUST\t\t\t220\n\n// and the states for the minicores\n#define MC_SLEEP\t\t\t0\n#define MC_THRUST\t\t\t10\n#define MC_CHARGE_FIRE\t\t20\n#define MC_FIRE\t\t\t\t30\n#define MC_FIRED\t\t\t40\n#define MC_RETREAT\t\t\t50\n\n// makes the core open his mouth and handles flashing red when hit\n#define OPEN_MOUTH\t\t\\\n{\t\t\t\t\t\t\\\n\tRunOpenMouth();\t\\\n}\n\n// makes the core close his mouth\n#define CLOSE_MOUTH\t\t\\\n{\t\t\\\n\tpieces[CFRONT]->frame = 2;\t\t\\\n\tpieces[CBACK]->frame = 0;\t\t\\\n}\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_MINICORE, ai_minicore);\n\tONTICK(OBJ_MINICORE_SHOT, ai_minicore_shot);\n\t\n\tAFTERMOVE(OBJ_CORE_BACK, ai_core_back);\n\tAFTERMOVE(OBJ_CORE_FRONT, ai_core_front);\n\t\n\tONTICK(OBJ_CORE_GHOSTIE, ai_core_ghostie);\n\tONTICK(OBJ_CORE_BLAST, ai_core_blast);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// called at the entry to the Core room.\n// initilize all the pieces of the Core boss.\nvoid CoreBoss::OnMapEntry(void)\n{\n\tstat(\"CoreBoss::OnMapEntry\");\n\t\n\to = CreateObject(0, 0, OBJ_CORE_CONTROLLER);\n\tgame.stageboss.object = o;\n\t\n\to->state = 10;\n\t\n\to->flags = (FLAG_SHOW_FLOATTEXT | FLAG_IGNORE_SOLID | FLAG_SCRIPTONDEATH);\n\to->id2 = 1000;\n\t\n\to->x = (1207 << CSF);\n\to->y = (212 << CSF);\n\to->xinertia = o->yinertia = 0;\n\to->hp = 650;\n\t\n\to->sprite = SPR_CORESHOOTMARKER;\n\t\n\t// spawn all the pieces in the correct z-order\n\tpieces[3] = CreateMinicore(o);\n\tpieces[4] = CreateMinicore(o);\n\tpieces[CFRONT] = CreateObject(0, 0, OBJ_CORE_FRONT);\n\tpieces[CBACK] = CreateObject(0, 0, OBJ_CORE_BACK);\n\tpieces[0] = CreateMinicore(o);\n\tpieces[1] = CreateMinicore(o);\n\tpieces[2] = CreateMinicore(o);\n\t\n\t// set up the front piece\n\tpieces[CFRONT]->sprite = SPR_CORE_FRONT;\n\tpieces[CFRONT]->state = CORE_SLEEP;\n\tpieces[CFRONT]->linkedobject = o;\n\tpieces[CFRONT]->flags |= (FLAG_IGNORE_SOLID | FLAG_INVULNERABLE);\n\tpieces[CFRONT]->frame = 2;\t\t\t// mouth closed\n\t\n\t// set up our back piece\n\tpieces[CBACK]->sprite = SPR_CORE_BACK;\n\tpieces[CBACK]->state = CORE_SLEEP;\n\tpieces[CBACK]->linkedobject = o;\n\tpieces[CBACK]->flags |= (FLAG_IGNORE_SOLID | FLAG_INVULNERABLE);\n\tpieces[CBACK]->frame = 0;\n\t\n\t// set the positions of all the minicores\n\tpieces[0]->x = (o->x - 0x1000);\n\tpieces[0]->y = (o->y - 0x8000);\n\t\n\tpieces[1]->x = (o->x + 0x2000);\n\tpieces[1]->y = o->y;\n\t\n\tpieces[2]->x = (o->x - 0x1000);\n\tpieces[2]->y = (o->y + 0x8000);\n\t\n\tpieces[3]->x = (o->x - 0x6000);\n\tpieces[3]->y = (o->y + 0x4000);\n\t\n\tpieces[4]->x = (o->x - 0x6000);\n\tpieces[4]->y = (o->y - 0x4000);\n\t\n\tthis->hittimer = 0;\n}\n\nvoid CoreBoss::OnMapExit()\n{\n\t// ensure we are called no longer\n\tgame.stageboss.object = NULL;\n\to = NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid CoreBoss::Run()\n{\nbool do_thrust = false;\nint i;\n\n\tif (!o) return;\n\t//stat(\"state = %d\", o->state);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase CORE_SLEEP:\tbreak;\t\t\t// core is asleep\n\t\t\n\t\t// Core's mouth is closed.\n\t\t// Core targets player point but does not update it during the state.\n\t\t// This is also the state set via BOA to awaken the core.\n\t\tcase CORE_CLOSED:\n\t\t{\n\t\t\to->state = CORE_CLOSED+1;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tStopWaterStream();\n\t\t\to->xmark = player->x;\n\t\t\to->ymark = player->y;\n\t\t}\n\t\tcase CORE_CLOSED+1:\n\t\t{\n\t\t\t// open mouth after 400 ticks\n\t\t\tif (o->timer > 400)\n\t\t\t{\n\t\t\t\tif (++o->timer2 > 3)\n\t\t\t\t{\t// every 3rd time do gusting left and big core blasts\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t\to->state = CORE_GUST;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = CORE_OPEN;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdo_thrust = true;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// Core's mouth is open.\n\t\t// Core moves towards player, and updates the position throughout\n\t\t// the state (is \"aggressive\" about seeking him).\n\t\t// Core fires ghosties, and curly targets it.\n\t\tcase CORE_OPEN:\n\t\t{\n\t\t\to->state = CORE_OPEN+1;\n\t\t\to->timer = 0;\n\t\t\t// gonna open mouth, so save the current HP so we'll\n\t\t\t// know how much damage we've taken this time.\n\t\t\to->savedhp = o->hp;\n\t\t}\n\t\tcase CORE_OPEN+1:\n\t\t{\n\t\t\to->xmark = player->x;\n\t\t\to->ymark = player->y;\n\t\t\t\n\t\t\t// must call constantly for red-flashing when hit\n\t\t\tOPEN_MOUTH;\n\t\t\t\n\t\t\t// hint curly to target us\n\t\t\tif ((o->timer % 64) == 1)\n\t\t\t{\n\t\t\t\to->CurlyTargetHere();\n\t\t\t}\n\t\t\t\n\t\t\t// spawn ghosties\n\t\t\tif (o->timer < 200)\n\t\t\t{\n\t\t\t\tif ((o->timer % 20)==0)\n\t\t\t\t{\n\t\t\t\t\tCreateObject(o->x + (random(-48, -16) << CSF), \\\n\t\t\t\t\t\t     \t o->y + (random(-64, 64) << CSF), \\\n\t\t\t\t\t\t\t \t OBJ_CORE_GHOSTIE);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// close mouth when 400 ticks have passed or we've taken more than 200 damage\n\t\t\tif (o->timer > 400 || (o->savedhp - o->hp) >= 200)\n\t\t\t{\n\t\t\t\to->state = CORE_CLOSED;\n\t\t\t\tCLOSE_MOUTH;\n\t\t\t\tdo_thrust = true;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase CORE_GUST:\n\t\t{\n\t\t\to->state = CORE_GUST+1;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tStartWaterStream();\n\t\t}\n\t\tcase CORE_GUST+1:\n\t\t{\n\t\t\t// spawn water droplet effects and push player\n\t\t\tObject *droplet = CreateObject(player->x + ((random(-50, 150)<<CSF)*2), \\\n\t\t\t\t\t\t\t\t   \t\t   player->y + (random(-160, 160)<<CSF),\n\t\t\t\t\t\t\t\t   \t\t   OBJ_FAN_DROPLET);\n\t\t\tdroplet->dir = LEFT;\n\t\t\tplayer->xinertia -= 0x20;\n\t\t\t\n\t\t\tOPEN_MOUTH;\n\t\t\t\n\t\t\t// spawn the big white blasts\n\t\t\tif (o->timer==300 || o->timer==350 || o->timer==400)\n\t\t\t{\n\t\t\t\tEmFireAngledShot(pieces[CFRONT], OBJ_CORE_BLAST, 0, 3<<CSF);\n\t\t\t\tsound(SND_LIGHTNING_STRIKE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 400)\n\t\t\t{\n\t\t\t\to->state = CORE_CLOSED;\n\t\t\t\tCLOSE_MOUTH;\n\t\t\t\tdo_thrust = true;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase 500:\t\t// defeated!!\n\t\t{\n\t\t\tStopWaterStream();\n\t\t\tmap.wlforcestate = WL_CALM;\n\t\t\t\n\t\t\to->state = 501;\n\t\t\to->timer = 0;\n\t\t\to->xinertia = o->yinertia = 0;\n\t\t\tgame.curlytarget.timeleft = 0;\n\t\t\t\n\t\t\tCLOSE_MOUTH;\n\t\t\t\n\t\t\tgame.quaketime = 20;\n\t\t\tSmokeXY(pieces[CBACK]->x, pieces[CBACK]->CenterY(), 20, 128, 64);\n\t\t\t\n\t\t\t// tell all the MC's to retreat\n\t\t\tfor(i=0;i<5;i++)\n\t\t\t{\n\t\t\t\tpieces[i]->flags &= ~(FLAG_SHOOTABLE & FLAG_INVULNERABLE);\n\t\t\t\tpieces[i]->state = MC_RETREAT;\n\t\t\t}\n\t\t}\n\t\tcase 501:\n\t\t{\n\t\t\to->timer++;\n\t\t\tif ((o->timer & 0x0f) != 0)\n\t\t\t{\n\t\t\t\tSmokeXY(pieces[CBACK]->x, pieces[CBACK]->CenterY(), 1, 64, 32);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer & 2)\n\t\t\t\to->x -= (1 << CSF);\n\t\t\telse\n\t\t\t\to->x += (1 << CSF);\n\t\t\t\n\t\t\t#define CORE_DEATH_TARGET_X\t\t0x7a000\n\t\t\t#define CORE_DEATH_TARGET_Y\t\t0x16000\n\t\t\to->xinertia += (o->x > CORE_DEATH_TARGET_X) ? -0x80 : 0x80;\n\t\t\to->yinertia += (o->y > CORE_DEATH_TARGET_Y) ? -0x80 : 0x80;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 600:\t\t\t// teleported away by Misery\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\to->state++;\n\t\t\t//sound(SND_TELEPORT);\n\t\t\t\n\t\t\tpieces[CFRONT]->clip_enable = pieces[CBACK]->clip_enable = 1;\n\t\t\to->timer = sprites[pieces[CFRONT]->sprite].h;\n\t\t}\n\t\tcase 601:\n\t\t{\n\t\t\tpieces[CFRONT]->display_xoff = pieces[CBACK]->display_xoff = random(-8, 8);\n\t\t\t\n\t\t\tpieces[CFRONT]->clipy2 = o->timer;\n\t\t\tpieces[CBACK]->clipy2 = o->timer;\n\t\t\t\n\t\t\tif (--o->timer < 0)\n\t\t\t{\n\t\t\t\tpieces[CFRONT]->invisible = true;\n\t\t\t\tpieces[CBACK]->invisible = true;\n\t\t\t\t\n\t\t\t\t// restore status bars\n\t\t\t\tgame.stageboss.object = NULL;\n\t\t\t\tgame.bossbar.object = NULL;\n\t\t\t\to->Delete(); o = NULL;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t\n\tif (do_thrust)\n\t{\n\t\t// tell all the minicores to jump to a new position\n\t\tfor(i=0;i<5;i++)\n\t\t{\n\t\t\tpieces[i]->state = MC_THRUST;\n\t\t}\n\t\t\n\t\tquake(20);\n\t\tsound(SND_CORE_THRUST);\n\t}\n\t\n\t\n\t// fire the minicores in any awake non-dead state\n\tif (o->state >= CORE_CLOSED && o->state < 500)\n\t{\n\t\to->timer++;\n\t\t\n\t\t// fire off each minicore sequentially...\n\t\tswitch(o->timer)\n\t\t{\n\t\t\tcase 80+0:   pieces[0]->state = MC_CHARGE_FIRE; break;\n\t\t\tcase 80+30:  pieces[1]->state = MC_CHARGE_FIRE; break;\n\t\t\tcase 80+60:  pieces[2]->state = MC_CHARGE_FIRE; break;\n\t\t\tcase 80+90:  pieces[3]->state = MC_CHARGE_FIRE; break;\n\t\t\tcase 80+120: pieces[4]->state = MC_CHARGE_FIRE; break;\n\t\t}\n\t\t\n\t\t// move main core towards a spot in front of target\n\t\to->xinertia += (o->x > (o->xmark + (160<<CSF))) ? -4 : 4;\n\t\to->yinertia += (o->y > o->ymark - (o->Height() / 2)) ? -4 : 4;\n\t}\n\t\n\t// set up our shootable status--you never actually hit the core (CFRONT),\n\t// but if it's mouth is open, make us, the invisible controller object, shootable.\n\tif (pieces[CFRONT]->frame==2)\n\t{\n\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\tpieces[CFRONT]->flags |= FLAG_INVULNERABLE;\n\t}\n\telse\n\t{\n\t\to->flags |= FLAG_SHOOTABLE;\n\t\tpieces[CFRONT]->flags &= ~FLAG_INVULNERABLE;\n\t}\n\t\n\tLIMITX(0x80);\n\tLIMITY(0x80);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid CoreBoss::RunOpenMouth()\n{\n\t// flash red when struck, else stay in Mouth Open frame\n\tpieces[CFRONT]->frame = 0;\n\tpieces[CBACK]->frame = 0;\n\t\n\tif (o->shaketime)\n\t{\n\t\tthis->hittimer++;\n\t\tif (this->hittimer & 2)\n\t\t{\n\t\t\tpieces[CFRONT]->frame = 1;\n\t\t\tpieces[CBACK]->frame = 1;\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis->hittimer = 0;\n\t}\n}\n\nvoid CoreBoss::StartWaterStream(void)\n{\n\t// bring the water up if it's not already up, but don't keep it up\n\t// if it's already been up on it's own because that's not fair\n\tif (map.wlstate == WL_DOWN)\n\t\tmap.wlforcestate = WL_UP;\n\t\n\tgame.quaketime = 100;\n\tStartStreamSound(400);\n}\n\nvoid CoreBoss::StopWaterStream(void)\n{\n\t// bring the water down again if it's not already\n\tif (map.wlstate == WL_UP)\n\t\tmap.wlforcestate = WL_CYCLE;\n\t\n\tStopLoopSounds();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// the front (mouth) piece of the main core\nvoid ai_core_front(Object *o)\n{\n\tObject *core = o->linkedobject;\n\tif (!core) { o->Delete(); return; }\n\t\n\to->x = core->x - 0x4800;\n\to->y = core->y - 0x5e00;\n}\n\n// the back (unanimated) piece of the main core\nvoid ai_core_back(Object *o)\n{\n\tObject *core = o->linkedobject;\n\tif (!core) { o->Delete(); return; }\n\t\n\to->x = core->x + (0x5800 - (8 << CSF));\n\to->y = core->y - 0x5e00;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic Object *CreateMinicore(Object *core)\n{\nObject *o;\n\n\to = CreateObject(0, 0, OBJ_MINICORE);\n\to->linkedobject = core;\n\to->flags = (FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_IGNORE_SOLID);\n\to->hp = 1000;\n\to->state = MC_SLEEP;\n\t\n\treturn o;\n}\n\nvoid ai_minicore(Object *o)\n{\n\tObject *core = o->linkedobject;\n\tif (!core) { o->Delete(); return; }\n\t\n\tswitch(o->state)\n\t{\n\t\tcase MC_SLEEP:\t\t// idle & mouth closed\n\t\t\to->frame = 2;\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\tbreak;\n\t\t\n\t\tcase MC_THRUST:\t\t\t// thrust (move to random new pos)\n\t\t\to->state = MC_THRUST+1;\n\t\t\to->frame = 2;\n\t\t\to->timer = 0;\n\t\t\to->xmark = core->x + (random(-128, 32) << CSF);\n\t\t\to->ymark = core->y + (random(-64, 64) << CSF);\n\t\tcase MC_THRUST+1:\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MC_CHARGE_FIRE:\t\t\t// charging for fire\n\t\t\to->state = MC_CHARGE_FIRE+1;\n\t\t\to->timer = 0;\n\t\tcase MC_CHARGE_FIRE+1:\t\t\t// flash blue\n\t\t\to->timer++;\n\t\t\to->frame = ((o->timer >> 1) & 1);\n\t\t\tif (o->timer > 20)\n\t\t\t{\n\t\t\t\to->state = MC_FIRE;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MC_FIRE:\t\t\t// firing\n\t\t\to->state = MC_FIRE+1;\n\t\t\to->frame = 2;\t// close mouth again\n\t\t\to->timer = 0;\n\t\t\to->xmark = o->x + (random(24, 48) << CSF);\n\t\t\to->ymark = o->y + (random(-4, 4) << CSF);\n\t\tcase MC_FIRE+1:\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = MC_FIRED;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t\telse if (o->timer==1 || o->timer==3)\n\t\t\t{\n\t\t\t\t// fire at player at speed (2<<CSF) with 2 degrees of variance\n\t\t\t\tEmFireAngledShot(o, OBJ_MINICORE_SHOT, 2, 2<<CSF);\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase MC_RETREAT:\t\t// defeated!\n\t\t\to->state = MC_RETREAT+1;\n\t\t\to->frame = 2;\n\t\t\to->xinertia = o->yinertia = 0;\n\t\tcase MC_RETREAT+1:\t\t// retreat back into the abyss\n\t\t\to->xinertia += 0x20;\n\t\t\tif (o->x > ((map.xsize*TILE_W)<<CSF) + 0x4000)\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state < MC_RETREAT)\n\t{\n\t\t// jump back when shot\n\t\tif (o->shaketime)\n\t\t{\n\t\t\to->xmark += 0x400;\n\t\t}\n\t\t\n\t\to->x += (o->xmark - o->x) / 16;\n\t\to->y += (o->ymark - o->y) / 16;\n\t}\n\t\n\t// don't let them kill us\n\to->hp = 1000;\n\t\n\t// invincible when mouth is closed\n\tif (o->frame != 2)\n\t\to->flags &= ~FLAG_INVULNERABLE;\n\telse\n\t\to->flags |= FLAG_INVULNERABLE;\n}\n\nvoid ai_minicore_shot(Object *o)\n{\n\tif (++o->timer2 > 150)\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_FISHY);\n\t\to->Delete();\n\t}\n\t\n\tai_animate2(o);\n}\n// shutter made noise when opening\n// curly looks up at no 4\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_core_ghostie(Object *o)\n{\nchar hit = 0;\n\n\tif (o->xinertia > 0 && o->blockr) hit = 1;\n\tif (o->xinertia < 0 && o->blockl) hit = 1;\n\tif (o->yinertia > 0 && o->blockd) hit = 1;\n\tif (o->yinertia < 0 && o->blocku) hit = 1;\n\t\n\to->xinertia -= 0x20;\n\tLIMITX(0x400);\n\t\n\tif (hit)\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_FISHY);\n\t\to->Delete();\n\t}\n\t\n\tai_animate2(o);\n}\n\nvoid ai_core_blast(Object *o)\n{\n\tif (++o->timer > 200) o->Delete();\n\tANIMATE(2, 0, 1);\n}\n\n\n"
  },
  {
    "path": "ai/boss/core.fdh",
    "content": "//hash:90a7f1af\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nvoid ai_animate2(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in ai/boss/core.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nvoid ai_core_front(Object *o);\nvoid ai_core_back(Object *o);\nstatic Object *CreateMinicore(Object *core);\nvoid ai_minicore(Object *o);\nvoid ai_minicore_shot(Object *o);\nvoid ai_core_ghostie(Object *o);\nvoid ai_core_blast(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nvoid sound(int snd);\nvoid StartStreamSound(int freq);\nvoid StopLoopSounds(void);\n\n\n/* located in common/stat.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/boss/core.cpp]----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/boss/core.h",
    "content": "\n#ifndef _COREBOSS_H\n#define _COREBOSS_H\n\nclass CoreBoss : public StageBoss\n{\npublic:\n\tvoid OnMapEntry();\n\tvoid OnMapExit();\n\tvoid Run();\n\nprivate:\n\tvoid RunOpenMouth();\n\t\n\tvoid StartWaterStream(void);\n\tvoid StopWaterStream(void);\n\t\n\tObject *o;\n\tObject *pieces[8];\n\tint hittimer;\n};\n\n\n#endif\n"
  },
  {
    "path": "ai/boss/heavypress.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"heavypress.h\"\n#include \"heavypress.fdh\"\n\n// position in Hell (note this is the center position, because there is a draw point)\n#define HELL_X\t\t\t(160<<CSF)\n#define HELL_Y\t\t\t(74<<CSF)\n#define HELL_FLOOR\t\t(160<<CSF)\n#define HELL_BOTTOM\t\t(480<<CSF)\n\n// positions of stuff for Passageway scene\n#define PWAY_X\t\t\t(160<<CSF)\t\t// X position of corridor\n#define PWAY_TOP\t\t(64<<CSF)\t\t// starting position for falling scene\n#define PWAY_BOTTOM\t\t(413<<CSF)\t\t// resting position after fall\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_HP_LIGHTNING, ai_hp_lightning);\n}\n\nvoid HeavyPress::OnMapEntry(void)\n{\n\to = CreateObject(HELL_X, HELL_Y, OBJ_HEAVY_PRESS);\n\tgame.stageboss.object = o;\n\tshield_left = shield_right = NULL;\n\t\n\tobjprop[o->type].hurt_sound = SND_ENEMY_HURT_COOL;\n\tobjprop[o->type].shaketime = 8;\n\t\n\to->flags = (FLAG_SHOW_FLOATTEXT | FLAG_SCRIPTONDEATH | \\\n\t\t\t    FLAG_SOLID_BRICK | FLAG_IGNORE_SOLID);\n\t\n\to->damage = 10;\n\to->hp = 700;\n\to->id2 = 1000;\t// defeated script\n\t\n\t// setup bboxes\n\tcenter_bbox = sprites[o->sprite].frame[0].dir[0].pf_bbox;\n\tfullwidth_bbox = sprites[o->sprite].frame[2].dir[0].pf_bbox;\n\t\n\tsprites[o->sprite].bbox = fullwidth_bbox;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid HeavyPress::Run()\n{\n\tif (!o) return;\n\t//AIDEBUG;\n\t\n\trun_defeated();\n\trun_passageway();\n\t\n\tswitch(o->state)\n\t{\n\t\t// fight begin (script-triggered)\n\t\tcase 100:\n\t\t{\n\t\t\t// get coordinates of the blocks to destroy as it's uncovered\n\t\t\tuncover_left = (o->Left() >> CSF) / TILE_W;\n\t\t\tuncover_right = (o->Right() >> CSF) / TILE_W;\n\t\t\tuncover_y = ((o->Bottom() >> CSF) / TILE_H) + 1;\n\t\t\t\n\t\t\t// create shielding objects for invincibility on either side\n\t\t\t// don't use puppet 1 because Deleet's use that when they explode.\n\t\t\tshield_left = CreateObject(o->x, o->y, OBJ_HEAVY_PRESS_SHIELD);\n\t\t\tshield_left->sprite = SPR_BBOX_PUPPET_2;\n\t\t\tsprites[shield_left->sprite].bbox = fullwidth_bbox;\n\t\t\tsprites[shield_left->sprite].bbox.x2 = center_bbox.x1 - 1;\n\t\t\t\n\t\t\tshield_right = CreateObject(o->x, o->y, OBJ_HEAVY_PRESS_SHIELD);\n\t\t\tshield_right->sprite = SPR_BBOX_PUPPET_3;\n\t\t\tsprites[shield_right->sprite].bbox = fullwidth_bbox;\n\t\t\tsprites[shield_right->sprite].bbox.x1 = center_bbox.x2 + 1;\n\t\t\t\n\t\t\t// then switch to small pfbox where we're only hittable in the center\n\t\t\to->frame = 0;\n\t\t\tsprites[o->sprite].bbox = center_bbox;\n\t\t\t\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\n\t\t\to->state = 101;\n\t\t\to->timer = -100;\t// pause a moment before Butes come\n\t\t}\n\t\tcase 101:\n\t\t{\t// fire lightning\n\t\t\tCreateObject(o->x, o->y+0x7800, OBJ_HP_LIGHTNING);\n\t\t\to->state = 102;\n\t\t}\n\t\tcase 102:\n\t\t{\n\t\t\t// spawn butes on alternating sides\n\t\t\tswitch(o->timer++)\n\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\tcase 160:\n\t\t\t\t\tCreateObject(MAPX(17), MAPY(15), OBJ_BUTE_FALLING)->dir = UP;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 80:\n\t\t\t\tcase 240:\n\t\t\t\t\tCreateObject(MAPX(3), MAPY(15), OBJ_BUTE_FALLING)->dir = UP;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 298:\n\t\t\t\t\t// fire lightning next frame\n\t\t\t\t\to->state = 101;\n\t\t\t\t\to->timer = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// uncover as it's damaged\n\t\t\tif (o->hp < (uncover_y * 70) && uncover_y > 1)\n\t\t\t{\n\t\t\t\tuncover_y--;\n\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\t\n\t\t\t\tfor(int x=uncover_left;x<=uncover_right;x++)\n\t\t\t\t\tmap_ChangeTileWithSmoke(x, uncover_y, 0, 4);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// flashing when hit. note, setting frame to 0 would mess up the\n\t// defeated sequence, except that shaketime is always expired by the time\n\t// the eye is opened, and this way we can still flash on the last shot.\n\tif (o->shaketime)\n\t\to->frame = (o->shaketime & 2) ? 3 : 0;\n}\n\n\nvoid HeavyPress::run_defeated()\n{\n\tswitch(o->state)\n\t{\n\t\t// defeated (set by ondeath script, after a brief pause)\n\t\tcase 500:\n\t\t{\n\t\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\t\t\to->state = 501;\n\t\t\to->timer = 0;\n\t\t\to->frame = 0;\n\t\t\t\n\t\t\tif (shield_left) { shield_left->Delete(); shield_left = NULL; }\n\t\t\tif (shield_right) { shield_right->Delete(); shield_right = NULL; }\n\t\t\tsprites[o->sprite].bbox = fullwidth_bbox;\n\t\t\t\n\t\t\t// get rid of enemies--the butes can stay, though.\n\t\t\tKillObjectsOfType(OBJ_HP_LIGHTNING);\n\t\t\tKillObjectsOfType(OBJ_ROLLING);\n\t\t}\n\t\tcase 501:\n\t\t{\n\t\t\to->timer++;\n\t\t\tif ((o->timer % 16) == 0)\n\t\t\t{\n\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\tSmokePuff(o->x + random(-60<<CSF, 60<<CSF),\n\t\t\t\t\t\t  o->y + random(-40<<CSF, 40<<CSF));\n\t\t\t}\n\t\t\t\n\t\t\t// eye opens\n\t\t\tswitch(o->timer)\n\t\t\t{\n\t\t\t\tcase 95: o->frame = 1; break;\t// partially open\n\t\t\t\tcase 98: o->frame = 2; break;\t// fully open\n\t\t\t\tcase 101:\n\t\t\t\t{\n\t\t\t\t\to->state = 502;\t\t// fall\n\t\t\t\t\to->damage = 127;\n\t\t\t\t\to->flags &= ~FLAG_SOLID_BRICK;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// falling (haven't hit floor yet)\n\t\tcase 502:\n\t\t{\n\t\t\t// hit floor: bounce. The floor tiles are not\n\t\t\t// solid to NPC's so we can't use blockd.\n\t\t\tif (o->y > HELL_FLOOR)\n\t\t\t{\n\t\t\t\to->state = 503;\n\t\t\t\to->yinertia = -0x200;\n\t\t\t\t\n\t\t\t\t// kill floor\n\t\t\t\tint y = (o->Bottom() >> CSF) / TILE_H;\n\t\t\t\tfor(int x=uncover_left-1;x<=uncover_right+1;x++)\n\t\t\t\t{\n\t\t\t\t\tmap_ChangeTileWithSmoke(x, y, 0, 1, true);\n\t\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (o->y > HELL_BOTTOM)\n\t\t\t\t\to->state = 0;\n\t\t\t}\n\t\t}\n\t\tcase 503:\t// falling, and hit floor already\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// states for when it's in the Passageway\nvoid HeavyPress::run_passageway()\n{\n\tswitch(o->state)\n\t{\n\t\t// \"dead\"/smoking on Passageway floor\n\t\t// note they may also be coming back from Statue Room.\n\t\t// script-triggered.\n\t\tcase 20:\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->x = PWAY_X;\n\t\t\to->y = PWAY_BOTTOM;\n\t\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_SOLID_BRICK);\n\t\t\to->damage = 0;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tif ((++o->timer % 16) == 0)\n\t\t\t{\n\t\t\t\tint x = random(o->Left(), o->Right());\n\t\t\t\tint y = random(o->Top(), o->Bottom());\n\t\t\t\tSmokePuff(x, y);\n\t\t\t\teffect(x, y, EFFECT_BOOMFLASH);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// falling through Passageway when you jump down hole in post-defeat scene.\n\t\t// script-triggered.\n\t\tcase 30:\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->frame = 2;\t// eye open\n\t\t\tCOPY_PFBOX;\t\t// ensure that we are using the full-width bbox\n\t\t\t\n\t\t\to->x = PWAY_X;\n\t\t\to->y = PWAY_TOP;\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\to->y += (4 << CSF);\n\t\t\t\n\t\t\tif (o->y >= PWAY_BOTTOM)\n\t\t\t{\n\t\t\t\to->y = PWAY_BOTTOM;\n\t\t\t\tsound(SND_MISSILE_HIT);\n\t\t\t\t\n\t\t\t\to->frame = 0;\n\t\t\t\tfor(int i=0;i<5;i++)\n\t\t\t\t\tSmokePuff(random(o->Left(), o->Right()), o->Bottom());\n\t\t\t\t\n\t\t\t\to->state = 20;\t// continue smoking\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_hp_lightning(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tsound(SND_TELEPORT);\n\t\t\to->sprite = SPR_HP_CHARGE;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(0, 0, 2);\n\t\t\t\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->frame = 3;\n\t\t\t\to->damage = 10;\n\t\t\t\to->sprite = SPR_HP_LIGHTNING;\n\t\t\t\tsound(SND_LIGHTNING_STRIKE);\n\t\t\t\t\n\t\t\t\t// smoke on floor where it struck\n\t\t\t\tSmokeXY(o->CenterX(), o->Bottom() - (7<<CSF), 3, 0, 0);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\tANIMATE_FWD(2);\n\t\t\tif (o->frame > 6)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/boss/heavypress.fdh",
    "content": "//hash:e63ba074\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/boss/heavypress.cpp]-------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//--------------[referenced from ai/boss/heavypress.cpp]-------------//\nvoid map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind);\n\n\n/* located in caret.cpp */\n\n//--------------[referenced from ai/boss/heavypress.cpp]-------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/ai.cpp */\n\n//--------------[referenced from ai/boss/heavypress.cpp]-------------//\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/hell/ballos_priest.cpp */\n\n//--------------[referenced from ai/boss/heavypress.cpp]-------------//\nstatic void run_defeated(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//--------------[referenced from ai/boss/heavypress.cpp]-------------//\nObject *SmokePuff(int x, int y);\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in ai/boss/heavypress.cpp */\n\n//--------------[referenced from ai/boss/heavypress.cpp]-------------//\nvoid ai_hp_lightning(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/boss/heavypress.cpp]-------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/boss/heavypress.cpp]-------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/boss/heavypress.h",
    "content": "\n#ifndef _HEAVYPRESS_H\n#define _HEAVYPRESS_H\n\n\nclass HeavyPress : public StageBoss\n{\npublic:\n\tvoid OnMapEntry();\n\tvoid Run();\n\nprivate:\n\tvoid run_defeated();\n\tvoid run_passageway();\n\n\tObject *o;\n\tObject *shield_left, *shield_right;\n\t\n\tint uncover_left, uncover_right;\n\tint uncover_y;\n\t\n\tSIFRect fullwidth_bbox;\n\tSIFRect center_bbox;\n};\n\n\n#endif\n"
  },
  {
    "path": "ai/boss/ironhead.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"ironhead.h\"\n#include \"ironhead.fdh\"\n\n#define ARENA_TOP\t\t\t\t2\n#define ARENA_BOTTOM\t\t\t13\n\n#define IRONH_SPAWN_FISHIES\t\t100\n#define IRONH_SWIM\t\t\t\t250\n#define IRONH_DEFEATED\t\t\t1000\n\nINITFUNC(AIRoutines)\n{\n\tONDEATH(OBJ_IRONH, ondeath_ironhead);\n\t\n\tONTICK(OBJ_IRONH_FISHY, ai_ironh_fishy);\n\tONTICK(OBJ_IRONH_SHOT, ai_ironh_shot);\n\t\n\tONTICK(OBJ_BRICK_SPAWNER, ai_brick_spawner);\n\tONTICK(OBJ_IRONH_BRICK, ai_ironh_brick);\n\t\n\tONTICK(OBJ_IKACHAN_SPAWNER, ai_ikachan_spawner);\n\tONTICK(OBJ_IKACHAN, ai_ikachan);\n\t\n\tONTICK(OBJ_MOTION_WALL, ai_motion_wall);\n\t\n\tobjprop[OBJ_IRONH].hurt_sound = SND_ENEMY_HURT_COOL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid IronheadBoss::OnMapEntry()\n{\n\to = CreateObject(0, 0, OBJ_IRONH);\n\to->damage = 10;\n\to->hp = 400;\n\to->state = IRONH_SPAWN_FISHIES;\n\t\n\tgame.stageboss.object = o;\n\tthis->hittimer = 0;\n}\n\nvoid IronheadBoss::OnMapExit()\n{\n\to = NULL;\n\tgame.stageboss.object = NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid IronheadBoss::Run(void)\n{\n\tif (!o) return;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase IRONH_SPAWN_FISHIES:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase IRONH_SPAWN_FISHIES+1:\t\t// wave of fishies comes in\n\t\t{\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = IRONH_SWIM;\n\t\t\t}\n\t\t\t\n\t\t\tif ((o->timer & 3)==0)\n\t\t\t{\n\t\t\t\tCreateObject((random(15, 18) * TILE_W) << CSF, \\\n\t\t\t\t\t\t  \t(random(ARENA_TOP, ARENA_BOTTOM) * TILE_H) << CSF, \\\n\t\t\t\t\t\t  \tOBJ_IRONH_FISHY);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase IRONH_SWIM:\t\t// swimming attack\n\t\t{\n\t\t\to->state++;\n\t\t\t\n\t\t\tif (o->dir==RIGHT)\n\t\t\t{\t// coming up on player from left\n\t\t\t\to->x = 0x1e000;\n\t\t\t\to->y = player->y;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// returning from right side of screen\n\t\t\t\to->x = 0x5a000;\n\t\t\t\to->y = (random(ARENA_TOP, ARENA_BOTTOM) * TILE_H) << CSF;\n\t\t\t}\n\t\t\t\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t\t\n\t\t\to->yinertia = random(-0x200, 0x200);\n\t\t\to->xinertia = random(-0x200, 0x200);\n\t\t\t\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t}\n\t\tcase IRONH_SWIM+1:\n\t\t{\n\t\t\tANIMATE(2, 0, 7);\n\t\t\t\n\t\t\tif (o->dir==RIGHT)\n\t\t\t{\n\t\t\t\to->xmark += 0x400;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->xmark -= 0x200;\n\t\t\t\to->ymark += (o->ymark < player->y) ? 0x200: -0x200;\n\t\t\t}\n\t\t\t\n\t\t\t//debugXline(o->xmark, 255,0,0);\n\t\t\t//debugYline(o->ymark, 0,255,0);\n\t\t\to->xinertia += (o->x > o->xmark) ? -8 : 8;\n\t\t\to->yinertia += (o->y > o->ymark) ? -8 : 8;\n\t\t\t\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\tif (o->dir==RIGHT)\n\t\t\t{\n\t\t\t\tif (o->x > 0x5a000)\n\t\t\t\t{\n\t\t\t\t\to->dir = LEFT;\n\t\t\t\t\to->state = IRONH_SPAWN_FISHIES;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->x < 0x22000)\n\t\t\t\t{\n\t\t\t\t\to->dir = RIGHT;\n\t\t\t\t\to->state = IRONH_SPAWN_FISHIES;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (o->dir==LEFT)\n\t\t\t{\n\t\t\t\t// fire bullets at player when retreating\n\t\t\t\tswitch(++o->timer)\n\t\t\t\t{\n\t\t\t\t\tcase 300:\n\t\t\t\t\tcase 310:\n\t\t\t\t\tcase 320:\n\t\t\t\t\t{\n\t\t\t\t\t\tObject *shot = SpawnObjectAtActionPoint(o, OBJ_IRONH_SHOT);\n\t\t\t\t\t\tshot->xinertia = (random(-3, 0) << CSF);\n\t\t\t\t\t\tshot->yinertia = (random(-3, 3) << CSF);\n\t\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase IRONH_DEFEATED:\n\t\t{\n\t\t\tsound(SND_EXPL_SMALL);\n\t\t\to->state = IRONH_DEFEATED+1;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->frame = 8;\n\t\t\to->damage = 0;\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t\to->xinertia = o->yinertia = 0;\n\t\t\to->timer = 0;\n\t\t\tKillObjectsOfType(OBJ_IRONH_FISHY);\n\t\t\tKillObjectsOfType(OBJ_IRONH_BRICK);\n\t\t\tKillObjectsOfType(OBJ_BRICK_SPAWNER);\n\t\t\tgame.quaketime = 20;\n\t\t\t\n\t\t\tfor(int i=0;i<32;i++)\n\t\t\t\tironh_smokecloud(o);\n\t\t}\n\t\tcase IRONH_DEFEATED+1:\t\t\t// retreat back to left...\n\t\t{\n\t\t\to->xmark -= (1<<CSF);\n\t\t\t\n\t\t\to->x = o->xmark + (random(-1, 1) << CSF);\n\t\t\to->y = o->ymark + (random(-1, 1) << CSF);\n\t\t\t\n\t\t\to->timer++;\n\t\t\tif ((o->timer & 3)==0) ironh_smokecloud(o);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// show pink \"hit\" frame when he's taking damage\n\to->sprite = SPR_IRONH;\n\tif (o->shaketime)\n\t{\n\t\tthis->hittimer++;\n\t\tif (this->hittimer & 2)\n\t\t{\n\t\t\to->sprite = SPR_IRONH_HURT;\n\t\t}\n\t}\n\telse\n\t{\n\t\tthis->hittimer = 0;\n\t}\n}\n\nstatic void ironh_smokecloud(Object *o)\n{\nObject *smoke;\n\n\tsmoke = CreateObject(o->CenterX() + (random(-128, 128)<<CSF), \\\n\t\t\t\t\t\t o->CenterY() + (random(-64, 64)<<CSF),\n\t\t\t\t\t\t OBJ_SMOKE_CLOUD);\n\t\n\tsmoke->xinertia = random(-128, 128);\n\tsmoke->yinertia = random(-128, 128);\n}\n\nvoid ondeath_ironhead(Object *o)\n{\n\tStartScript(1000);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_ironh_fishy(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 10;\n\t\t\to->animtimer = 0;\n\t\t\to->yinertia = random(-0x200, 0x200);\n\t\t\to->xinertia = 0x800;\n\t\t}\n\t\tcase 10:\t\t\t// harmless fishy\n\t\t{\n\t\t\tANIMATE(2, 0, 1);\n\t\t\tif (o->xinertia < 0)\n\t\t\t{\n\t\t\t\to->damage = 3;\n\t\t\t\to->state = 20;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t\t\t// puffer fish\n\t\t{\n\t\t\tANIMATE(2, 2, 3);\n\t\t\t\n\t\t\tif (o->x < (48<<CSF))\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->blocku) o->yinertia = 0x200;\n\tif (o->blockd) o->yinertia = -0x200;\n\to->xinertia -= 0x0c;\n}\n\nvoid ai_ironh_shot(Object *o)\n{\n\tif (!o->state)\n\t{\n\t\tif (++o->timer > 20)\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->xinertia = o->yinertia = 0;\n\t\t\to->timer2 = 0;\n\t\t}\n\t}\n\telse\n\t{\n\t\to->xinertia += 0x20;\n\t}\n\t\n\tANIMATE(0, 0, 2);\n\t\n\tif (++o->timer2 > 100 && !o->onscreen)\n\t{\n\t\to->Delete();\n\t}\n\t\n\tif ((o->timer2 & 3)==1) sound(SND_IRONH_SHOT_FLY);\n}\n\n\nvoid ai_brick_spawner(Object *o)\n{\nObject *brick;\n\n\tif (!o->state)\n\t{\n\t\to->state = 1;\n\t\to->timer = random(0, 200);\n\t}\n\t\n\tif (!o->timer)\n\t{\t// time to spawn a block\n\t\to->state = 0;\n\t\tbrick = CreateObject(o->x, o->y + (random(-20, 20) << CSF), OBJ_IRONH_BRICK);\n\t\tbrick->dir = o->dir;\n\t}\n\telse o->timer--;\n}\n\nvoid ai_ironh_brick(Object *o)\n{\n\tif (!o->state)\n\t{\n\t\tint r = random(0, 9);\n\t\tif (r == 9)\n\t\t{\n\t\t\to->sprite = SPR_IRONH_BIGBRICK;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->sprite = SPR_IRONH_BRICK;\n\t\t\to->frame = r;\n\t\t}\n\t\t\n\t\to->xinertia = random(0x100, 0x200);\n\t\to->xinertia *= (o->dir == LEFT) ? -2 : 2;\n\t\t\n\t\to->yinertia = random(-0x200, 0x200);\n\t\to->state = 1;\n\t}\n\t\n\t// bounce off the walls\n\tif (o->yinertia < 0 && o->y <= (16<<CSF))\n\t{\n\t\teffect(o->CenterX(), o->y, EFFECT_BONKPLUS);\n\t\to->yinertia = -o->yinertia;\n\t}\n\t\n\tif (o->yinertia > 0 && (o->Bottom() >= (239<<CSF)))\n\t{\n\t\teffect(o->CenterX(), o->Bottom(), EFFECT_BONKPLUS);\n\t\to->yinertia = -o->yinertia;\n\t}\n\t\n\t\n\tif ((o->xinertia < 0 && (o->x < -0x2000)) ||\\\n\t\t(o->x > (map.xsize * TILE_W) << CSF))\n\t{\n\t\to->Delete();\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_ikachan_spawner(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// oops player got hurt--no ikachans for you!\n\t\t\t// the deletion of the object causes the flag matching it's id2 to be set,\n\t\t\t// which is how the scripts know not to give the alien medal.\n\t\t\tif (player->hurt_time != 0)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// yay spawn ikachans!\n\t\t{\n\t\t\to->timer++;\n\t\t\tif ((o->timer & 3) == 1)\n\t\t\t{\n\t\t\t\tCreateObject(o->x, o->y + ((random(0, 13) * TILE_H) << CSF), OBJ_IKACHAN);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_ikachan(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->timer = random(3, 20);\n\t\t}\n\t\tcase 1:\t\t// he pushes ahead\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = random(10, 50);\n\t\t\t\to->frame = 1;\n\t\t\t\to->xinertia = 0x600;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// after a short time his tentacles look less whooshed-back\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = random(40, 50);\n\t\t\t\to->frame = 2;\n\t\t\t\to->yinertia = random(-0x100, 0x100);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// gliding\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t\t\n\t\t\to->xinertia -= 0x10;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->x > 720<<CSF) o->Delete();\n}\n\nvoid ai_motion_wall(Object *o)\t\t// the walls at the top and bottom of the arena\n{\n\to->x -= (6 << CSF);\n\t\n\tif (o->x < (((19 * TILE_W) - 8) << CSF))\n\t\to->x += (SCREEN_WIDTH + 32) << CSF;\n}\n\n"
  },
  {
    "path": "ai/boss/ironhead.fdh",
    "content": "//hash:c8dc1e1c\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//---------------[referenced from ai/boss/ironhead.cpp]--------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//---------------[referenced from ai/boss/ironhead.cpp]--------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in tsc.cpp */\n\n//---------------[referenced from ai/boss/ironhead.cpp]--------------//\nScriptInstance *StartScript(int scriptno, int pageno);\n\n\n/* located in ai/ai.cpp */\n\n//---------------[referenced from ai/boss/ironhead.cpp]--------------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/boss/ironhead.cpp */\n\n//---------------[referenced from ai/boss/ironhead.cpp]--------------//\nstatic void ironh_smokecloud(Object *o);\nvoid ondeath_ironhead(Object *o);\nvoid ai_ironh_fishy(Object *o);\nvoid ai_ironh_shot(Object *o);\nvoid ai_brick_spawner(Object *o);\nvoid ai_ironh_brick(Object *o);\nvoid ai_ikachan_spawner(Object *o);\nvoid ai_ikachan(Object *o);\nvoid ai_motion_wall(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//---------------[referenced from ai/boss/ironhead.cpp]--------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//---------------[referenced from ai/boss/ironhead.cpp]--------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/boss/ironhead.h",
    "content": "\n#ifndef _IRONHEAD_H\n#define _IRONHEAD_H\n\nclass IronheadBoss : public StageBoss\n{\npublic:\n\tvoid OnMapEntry();\n\tvoid OnMapExit();\n\tvoid Run();\n\nprivate:\n\tObject *o;\n\tint hittimer;\n};\n\n\n#endif\n"
  },
  {
    "path": "ai/boss/omega.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"omega.h\"\n#include \"omega.fdh\"\n\n#define OMEGA_RISE_HEIGHT\t\t\t48\n#define OMEGA_SINK_DEPTH\t\t\t60\n#define OMEGA_WAIT_TIME\t\t\t\t7\n#define OMEGA_SPEED\t\t\t\t\t(1<<CSF)\n\n#define OMG_APPEAR\t\t\t\t\t20  // this MUST be 20 because misery sets this to begin the battle\n#define OMG_WAIT\t\t\t\t\t30\n#define OMG_MOVE\t\t\t\t\t40\n#define OMG_JAWS_OPEN\t\t\t\t50\n#define OMG_FIRE\t\t\t\t\t60\n#define OMG_JAWS_CLOSE\t\t\t\t70\n#define OMG_UNDERGROUND\t\t\t\t80\n#define OMG_JUMP\t\t\t\t\t90\n#define OMG_EXPLODING\t\t\t\t100\t// start fancy victory animation\n#define OMG_EXPLODED\t\t\t\t110 // full-screen flash in progress\n\n#define LEGD_MIN\t\t\t\t(25<<CSF)\n#define LEGD_MAX\t\t\t\t(46<<CSF)\n\n#define OMEGA_DAMAGE\t\t\t20\n#define HP_TRIGGER_POINT\t\t280\n\nenum Pieces\n{\n\tLEFTLEG, RIGHTLEG,\n\tLEFTSTRUT, RIGHTSTRUT,\n\t\n\tNUM_PIECES\n};\n\nINITFUNC(AIRoutines)\n{\n\tONDEATH(OBJ_OMEGA_BODY, ondeath_omega_body);\n\tONTICK(OBJ_OMEGA_SHOT, ai_omega_shot);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid OmegaBoss::OnMapEntry(void)\n{\n\tmemset(&omg, 0, sizeof(omg));\n\tmemset(pieces, 0, sizeof(pieces));\n\t\n\tomg.form = 1;\n\tomg.firefreq = 3;\n\tomg.shotxspd = 0x100;\n\tomg.startfiring = 20;\n\tomg.stopfiring = 80;\n\tomg.endfirestate = 200;\n\tomg.movetime = OMEGA_RISE_HEIGHT;\n\t\n\t// *MUST* create in this order so that the z-order is correct\n\tpieces[LEFTLEG] = CreateObject(0, 0, OBJ_OMEGA_LEG);\n\tpieces[RIGHTLEG] = CreateObject(0, 0, OBJ_OMEGA_LEG);\n\tpieces[LEFTSTRUT] = CreateObject(0, 0, OBJ_OMEGA_STRUT);\n\tpieces[RIGHTSTRUT] = CreateObject(0, 0, OBJ_OMEGA_STRUT);\n\t\n\tgame.stageboss.object = CreateObject(0, 0, OBJ_OMEGA_BODY);\n\tgame.stageboss.object->hp = omg.lasthp = 400;\n\t\n\tgame.stageboss.object->flags |= FLAG_SHOW_FLOATTEXT;\n\tgame.stageboss.object->flags &= ~FLAG_SOLID_MUSHY;\n\tgame.stageboss.object->sprite = SPR_OMG_CLOSED;\n\t\n\tobjprop[OBJ_OMEGA_BODY].shaketime = 0;\t\t// we do our own shaketime\n\t\n\tpieces[LEFTLEG]->dir = LEFT;\n\tpieces[RIGHTLEG]->dir = RIGHT;\n\tpieces[LEFTSTRUT]->dir = LEFT;\n\tpieces[RIGHTSTRUT]->dir = RIGHT;\n\t\n\tomg.leg_descend = LEGD_MIN;\n\tpieces[LEFTLEG]->sprite = pieces[RIGHTLEG]->sprite = SPR_OMG_LEG_INAIR;\n\t\n\tgame.stageboss.object->x = ((217 * TILE_W) + 5) << CSF;\n\tgame.stageboss.object->y = ((14 * TILE_H) - 5) << CSF;\n\tomg.orgx = game.stageboss.object->x;\n\tomg.orgy = game.stageboss.object->y;\n\t\n\tomg.shaketimer = 0;\n}\n\nvoid OmegaBoss::OnMapExit(void)\n{\n\tif (game.stageboss.object)\n\t\tgame.stageboss.object->Delete();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid OmegaBoss::Run(void)\n{\n\tObject *&o = game.stageboss.object;\n\t\n\tif (omg.defeated)\n\t\treturn;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\tbreak;\t// waiting for trigger by script\n\t\t\n\t\tcase OMG_WAIT:\t// waits for a moment then go to omg.nextstate\n\t\t{\n\t\t\to->state++;\n\t\t\tomg.timer = 0;\n\t\t}\n\t\tcase OMG_WAIT+1:\n\t\t{\n\t\t\tif (++omg.timer >= OMEGA_WAIT_TIME)\n\t\t\t{\n\t\t\t\tomg.timer = 0;\n\t\t\t\to->state = omg.nextstate;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase OMG_APPEAR:\n\t\t{\n\t\t\tomg.timer = 0;\n\t\t\to->frame = 0;\n\t\t\to->state = OMG_MOVE;\n\t\t\tomg.movedir = -OMEGA_SPEED;\n\t\t\to->flags |= FLAG_SOLID_MUSHY;\n\t\t}\n\t\tcase OMG_MOVE:\t// rising up/going back into ground\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->y += omg.movedir;\n\t\t\t\n\t\t\tgame.quaketime = 2;\n\t\t\t\n\t\t\tomg.timer++;\n\t\t\tif ((omg.timer & 3) == 0) sound(SND_QUAKE);\n\t\t\t\n\t\t\tif (omg.timer >= omg.movetime)\n\t\t\t{\n\t\t\t\tif (omg.movedir < 0)\n\t\t\t\t{\t// was rising out of ground\n\t\t\t\t\tomg.nextstate = OMG_JAWS_OPEN;\n\t\t\t\t\to->state = OMG_WAIT;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t// was going back into ground\n\t\t\t\t\tomg.timer = 0;\n\t\t\t\t\to->state = OMG_UNDERGROUND;\n\t\t\t\t\to->flags &= ~(FLAG_SOLID_MUSHY | FLAG_SOLID_BRICK);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase OMG_JAWS_OPEN:\t\t\t// jaws opening\n\t\t{\n\t\t\to->state++;\n\t\t\tomg.animtimer = 0;\n\t\t\tsound(SND_JAWS);\n\t\t\to->sprite = SPR_OMG_OPENED;\t\t\t// select \"open\" bounding box\n\t\t}\n\t\tcase OMG_JAWS_OPEN+1:\n\t\t{\n\t\t\tomg.animtimer++;\n\t\t\tif (omg.animtimer > 2)\n\t\t\t{\n\t\t\t\tomg.animtimer = 0;\n\t\t\t\to->frame++;\n\t\t\t\tif (o->frame==3)\n\t\t\t\t{\n\t\t\t\t\to->state = OMG_FIRE;\n\t\t\t\t\tomg.firecounter = 0;\n\t\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase OMG_FIRE:\t// throwing out red stuff\n\t\t{\n\t\t\tomg.firecounter++;\n\t\t\t\n\t\t\tif (omg.firecounter > omg.startfiring && omg.firecounter < omg.stopfiring)\n\t\t\t{\n\t\t\t\tif ((omg.firecounter % omg.firefreq)==0)\n\t\t\t\t{\n\t\t\t\t\tObject *shot;\n\t\t\t\t\t\n\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t\t\n\t\t\t\t\tshot = SpawnObjectAtActionPoint(o, OBJ_OMEGA_SHOT);\n\t\t\t\t\tshot->xinertia = random(-omg.shotxspd, omg.shotxspd);\n\t\t\t\t\tshot->yinertia = -0x333;\n\t\t\t\t\tif (omg.form==2 || random(0, 9) < 8)\n\t\t\t\t\t{\n\t\t\t\t\t\tshot->sprite = SPR_OMG_BULLET_NORMAL;\n\t\t\t\t\t\tshot->flags = FLAG_SHOOTABLE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tshot->sprite = SPR_OMG_BULLET_HARD;\n\t\t\t\t\t\tshot->flags = (FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tshot->timer = (random(0, 7) >= 4) ? random(300, 400):0;\n\t\t\t\t\tshot->damage = 4;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (omg.firecounter >= omg.endfirestate || sound_is_playing(SND_MISSILE_HIT))\n\t\t\t{\t// snap jaws shut\n\t\t\t\tomg.animtimer = 0;\n\t\t\t\to->state = OMG_JAWS_CLOSE;\n\t\t\t\tsound(SND_JAWS);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase OMG_JAWS_CLOSE:\t// jaws closing\n\t\t{\n\t\t\tomg.animtimer++;\n\t\t\tif (omg.animtimer > 2)\n\t\t\t{\n\t\t\t\tomg.animtimer = 0;\n\t\t\t\t\n\t\t\t\to->frame--;\n\t\t\t\tif (o->frame == 0)\n\t\t\t\t{\n\t\t\t\t\tsound_stop(SND_JAWS);\n\t\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\t\t\n\t\t\t\t\to->sprite = SPR_OMG_CLOSED;\t\t// select \"closed\" bounding box\n\t\t\t\t\t\n\t\t\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\t\to->damage = 0;\n\t\t\t\t\t\n\t\t\t\t\tif (omg.form == 1)\n\t\t\t\t\t{\t// form 1: return to sand\n\t\t\t\t\t\to->state = OMG_WAIT;\n\t\t\t\t\t\tomg.nextstate = OMG_MOVE;\n\t\t\t\t\t\tomg.movedir = OMEGA_SPEED;\n\t\t\t\t\t\tomg.movetime = OMEGA_SINK_DEPTH;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t// form 2: jump\n\t\t\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\t\t\tif (o->x < player->x) o->xinertia = 0xC0;\n\t\t\t\t\t\t\t\t\t\t else o->xinertia = -0xC0;\n\t\t\t\t\t\to->state = OMG_JUMP;\n\t\t\t\t\t\to->yinertia = -0x5FF;\n\t\t\t\t\t\tomg.orgy = o->y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// hurt player if he was standing in the middle when the jaws shut\n\t\t\tif (player->riding == o)\n\t\t\t{\n\t\t\t\thurtplayer(OMEGA_DAMAGE);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase OMG_UNDERGROUND:\t\t// underground waiting to reappear\n\t\t{\n\t\t\tif (++omg.timer >= 120)\n\t\t\t{\n\t\t\t\tomg.timer = 0;\n\t\t\t\to->state = OMG_APPEAR;\n\t\t\t\t\n\t\t\t\to->x = omg.orgx + (random(-64, 64) << CSF);\n\t\t\t\to->y = omg.orgy;\n\t\t\t\tomg.movetime = OMEGA_RISE_HEIGHT;\n\t\t\t\t\n\t\t\t\t// switch to jumping out of ground when we get low on life\n\t\t\t\tif (omg.form==1 && o->hp <= HP_TRIGGER_POINT)\n\t\t\t\t{\n\t\t\t\t\to->flags |= FLAG_SOLID_MUSHY;\n\t\t\t\t\t\n\t\t\t\t\tomg.form = 2;\n\t\t\t\t\tomg.firefreq = 5;\n\t\t\t\t\tomg.shotxspd = 0x155;\n\t\t\t\t\tomg.startfiring = 0;\n\t\t\t\t\tomg.stopfiring = 30;\n\t\t\t\t\tomg.endfirestate = 50;\n\t\t\t\t\tomg.movetime = OMEGA_RISE_HEIGHT+3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase OMG_JUMP:\t// init for jump\n\t\t{\n\t\t\tomg.orgy = o->y;\n\t\t\to->state++;\n\t\t\tomg.timer = 0;\n\t\t}\n\t\tcase OMG_JUMP+1:\t// jumping\n\t\t{\n\t\t\to->yinertia += 0x24;\n\t\t\tif (o->yinertia > 0x5ff) o->yinertia = 0x5ff;\n\t\t\t\n\t\t\tif (o->yinertia > 0)\n\t\t\t{\t// coming down\n\t\t\t\t\n\t\t\t\tpieces[LEFTLEG]->sprite = pieces[RIGHTLEG]->sprite = SPR_OMG_LEG_ONGROUND;\n\t\t\t\t\n\t\t\t\t// retract legs a little when we hit the ground\n\t\t\t\tif (pieces[LEFTLEG]->blockd || pieces[RIGHTLEG]->blockd)\n\t\t\t\t{\n\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\tomg.leg_descend -= o->yinertia;\n\t\t\t\t\tif (++omg.timer >= 3)\n\t\t\t\t\t{\n\t\t\t\t\t\to->yinertia = 0;\n\t\t\t\t\t\to->state = OMG_JAWS_OPEN;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// --- squash player if we land on him -------------\n\t\t\t\t// if top of player is higher than bottom of our bounding box\n\t\t\t\t// but bottom of player's bounding box is not...\n\t\t\t\tif (player->blockd)\n\t\t\t\t{\n\t\t\t\t\tint omg_bottom = o->y + (sprites[o->sprite].solidbox.y2 << CSF);\n\t\t\t\t\tif (player->y <= omg_bottom)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (player->y + (sprites[player->sprite].solidbox.y2 << CSF) >= omg_bottom)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (hitdetect(o, player))\t// easy way to verify the X's are lined up\n\t\t\t\t\t\t\t{\t// SQUISH!\n\t\t\t\t\t\t\t\thurtplayer(OMEGA_DAMAGE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// jumping up; extend legs\n\t\t\t\tomg.leg_descend = (omg.orgy - o->y) + LEGD_MIN;\n\t\t\t\tif (omg.leg_descend > LEGD_MAX) omg.leg_descend = LEGD_MAX;\n\t\t\t\tpieces[LEFTLEG]->sprite = pieces[RIGHTLEG]->sprite = SPR_OMG_LEG_INAIR;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t/// victory\n\t\tcase OMG_EXPLODING:\n\t\t{\n\t\t\tomg.timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase OMG_EXPLODING+1:\n\t\t{\n\t\t\tint x, y;\n\t\t\t\n\t\t\to->xinertia = o->yinertia = 0;\n\t\t\t\n\t\t\tx = o->CenterX() + (random(-48, 48)<<CSF);\n\t\t\ty = o->CenterY() + (random(-48, 24)<<CSF);\n\t\t\tSmokePuff(x, y);\n\t\t\teffect(x, y, EFFECT_BOOMFLASH);\n\t\t\t\n\t\t\tgame.quaketime = 2;\n\t\t\t\n\t\t\tif ((omg.timer % 12)==0) sound(SND_ENEMY_HURT_BIG);\n\t\t\t\n\t\t\tif (++omg.timer > 100)\n\t\t\t{\n\t\t\t\tomg.timer = 0;\n\t\t\t\tstarflash.Start(o->CenterX(), o->CenterY());\n\t\t\t\to->state = OMG_EXPLODED;\n\t\t\t}\n\t\t\telse if (omg.timer==24)\n\t\t\t{\n\t\t\t\tStartScript(210);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase OMG_EXPLODED:\n\t\t{\n\t\t\tgame.quaketime = 40;\n\t\t\t\n\t\t\tif (++omg.timer > 50)\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t\tfor(int i=0;i<NUM_PIECES;i++)\n\t\t\t\t\tpieces[i]->Delete();\n\t\t\t\t\n\t\t\t\tomg.defeated = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// implement shaking when shot\n\t// we do it manually instead of used the usual shared code\n\t// because we want all the pieces to shake at once\n\tif (o->hp != omg.lasthp && !omg.shaketimer)\n\t{\n\t\tomg.shaketimer = 3;\n\t\t// why did I write this? anyway, I'm sure it's important\n\t\tif (o->x > player->x) o->display_xoff = -1;\n\t\t\t\t\t\t else o->display_xoff = 1;\n\t\t\n\t\tomg.lasthp = o->hp;\n\t}\n\tif (omg.shaketimer)\n\t{\n\t\tint xoff = -o->display_xoff;\n\t\t\n\t\tif (!--omg.shaketimer) xoff = 0;\n\t\t\n\t\to->display_xoff = xoff;\n\t\tpieces[LEFTLEG]->display_xoff = xoff;\n\t\tpieces[RIGHTLEG]->display_xoff = xoff;\n\t\tpieces[LEFTSTRUT]->display_xoff = xoff;\n\t\tpieces[RIGHTSTRUT]->display_xoff = xoff;\n\t}\n\t\n\tif (o->state)\n\t{\n\t\to->blockl |= pieces[LEFTLEG]->blockl;\n\t\to->blockr |= pieces[RIGHTLEG]->blockr;\n\t\t\n\t\tpieces[LEFTLEG]->x = o->x - (4 << CSF); pieces[LEFTLEG]->y = o->y + omg.leg_descend;\n\t\tpieces[RIGHTLEG]->x = o->x + (38 << CSF); pieces[RIGHTLEG]->y = o->y + omg.leg_descend;\n\t\tpieces[LEFTSTRUT]->x = o->x + (9 << CSF); pieces[LEFTSTRUT]->y = o->y + (27 << CSF);\n\t\tpieces[RIGHTSTRUT]->x = o->x + (43 << CSF); pieces[RIGHTSTRUT]->y = o->y + (27 << CSF);\n\t}\n}\n\nvoid ondeath_omega_body(Object *o)\n{\n\to->flags &= ~FLAG_SHOOTABLE;\n\tKillObjectsOfType(OBJ_OMEGA_SHOT);\n\t\n\tgame.stageboss.SetState(OMG_EXPLODING);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_omega_shot(Object *o)\n{\n\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\n\to->yinertia += 5;\n\tif (o->blockd) o->yinertia = -0x100;\n\t\n\tif (o->blockl || o->blockr) o->xinertia = -o->xinertia;\n\tif (o->blocku) o->yinertia = -o->yinertia;\n\t\n\tif (++o->animtimer > 2) { o->frame ^= 1; o->animtimer = 0; }\n\t\n\tif (++o->timer > 750)\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_FISHY);\n\t\to->Delete();\n\t}\n}\n\n"
  },
  {
    "path": "ai/boss/omega.fdh",
    "content": "//hash:9b689842\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-----------------[referenced from ai/boss/omega.cpp]---------------//\nObject *CreateObject(int x, int y, int type);\nbool hitdetect(Object *o1, Object *o2);\n\n\n/* located in caret.cpp */\n\n//-----------------[referenced from ai/boss/omega.cpp]---------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in player.cpp */\n\n//-----------------[referenced from ai/boss/omega.cpp]---------------//\nvoid hurtplayer(int damage);\n\n\n/* located in tsc.cpp */\n\n//-----------------[referenced from ai/boss/omega.cpp]---------------//\nScriptInstance *StartScript(int scriptno, int pageno);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from ai/boss/omega.cpp]---------------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------------[referenced from ai/boss/omega.cpp]---------------//\nObject *SmokePuff(int x, int y);\n\n\n/* located in ai/boss/omega.cpp */\n\n//-----------------[referenced from ai/boss/omega.cpp]---------------//\nvoid ondeath_omega_body(Object *o);\nvoid ai_omega_shot(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/boss/omega.cpp]---------------//\nvoid sound(int snd);\nbool sound_is_playing(int snd);\nvoid sound_stop(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/boss/omega.cpp]---------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/boss/omega.h",
    "content": "\n#ifndef _OMEGA_H\n#define _OMEGA_H\n\n\nclass OmegaBoss : public StageBoss\n{\npublic:\n\tvoid OnMapEntry();\n\tvoid OnMapExit();\n\t\n\tvoid Run();\n\nprivate:\n\n\tObject *pieces[4];\n\t\n\tstruct\n\t{\n\t\tint timer;\n\t\tint animtimer;\n\t\t\n\t\tint movedir, movetime;\n\t\tint nextstate;\n\t\t\n\t\tint form;\n\t\t\n\t\tint firefreq, startfiring, stopfiring, endfirestate, shotxspd;\n\t\tint firecounter;\n\t\t\n\t\tint leg_descend;\n\t\t\n\t\tint orgx, orgy;\n\t\t\n\t\tint shaketimer;\n\t\tint lasthp;\n\t\t\n\t\tbool defeated;\n\t} omg;\n\n};\n\n\n#endif\n"
  },
  {
    "path": "ai/boss/sisters.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"sisters.h\"\n#include \"sisters.fdh\"\n\n// mainstates\n#define STATE_CIRCLE_RIGHT\t\t100\t\t// circling right\n#define STATE_CIRCLE_LEFT\t\t110\t\t// circling left\n#define STATE_MEGAFIRING\t\t120\t\t// runs pause and circling during low-hp megafire\n#define STATE_DEFEATED\t\t\t1000\t// script-triggered; must be constant\n#define STATE_DEFEATED_CRASH\t1010\n#define STATE_STARFLASH\t\t\t1020\n\n// head states\n#define STATE_HEAD_CLOSED\t\t10\t\t// closed, but periodically opens by itself and fires\n#define STATE_HEAD_OPEN\t\t\t20\t\t// mouth open, can be shot\n#define STATE_HEAD_FIRE\t\t\t30\t\t// actually firing\n#define STATE_HEAD_MEGAFIRE\t\t40\t\t// firing a whole lot during low-hp\n#define STATE_HEAD_BIT_TONGUE\t50\t\t// bit tongue after got shot\n#define STATE_HEAD_DEFEATED\t\t100\t\t// defeated, eyes closed\n\n// body states\n#define STATE_BODY_NOMOVE\t\t10\t\t// do nothing but animate\n#define STATE_BODY_FACE_PLAYER\t20\t\t// follow angle set by main and face player\n#define STATE_BODY_FACE_CENTER\t30\t\t// follow angle set by main and face center\n#define STATE_BODY_LOCK_DIR\t\t40\t\t// follow angle set by main but don't change direction\n\n#define SISTERS_HP\t\t\t\t500\t\t// total HP\n#define SISTERS_ATTACK2_HP\t\t300\t\t// HP below which we can do the lots-of-fire attack\n#define SISTERS_DAMAGE\t\t\t10\t\t// how much damage you can take if you run into one\n\n// coordinates of per-frame bboxes for each frame of the head object.\n// these are all for the right-facing frame and are automatically flipped-over\n// at runtime if the dragon is facing left.\n// I would like to make this a feature of the .sif at a later date that could be\n// enabled on a per-sprite basis via a checkbox in sprprop.\nstatic struct\n{\n\tint x1, y1, x2, y2;\n\tuint32_t flags;\n}\nhead_bboxes[] =\n{\n\t{ 15, 1, 38, 26,  FLAG_INVULNERABLE },\t// closed\n\t{ 15, 4, 36, 28,  FLAG_INVULNERABLE },\t// partway open\n\t{ 14, 6, 31, 27,  FLAG_SHOOTABLE },\t\t// open (shootable)\n\t{ 16, 6, 37, 26,  FLAG_SHOOTABLE },\t\t// bit tongue (shootable)\n\t{ 17, 6, 38, 25,  0 }\t\t\t\t\t// eyes closed (shots pass through)\n};\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SistersBoss::OnMapEntry()\n{\nint i;\n\n/*stat(\"%d %d %d %d\",\n\tsprites[SPR_SISTERS_HEAD].bbox.x1,\n\tsprites[SPR_SISTERS_HEAD].bbox.y1,\n\tsprites[SPR_SISTERS_HEAD].bbox.x2,\n\tsprites[SPR_SISTERS_HEAD].bbox.y2\n\t); exit(1);*/\n\t\n    main = CreateObject(((10*TILE_W))<<CSF, ((8*TILE_H)-4)<<CSF, OBJ_SISTERS_MAIN);\n\tmain->invisible = true;\n\t\n\tfor(i=0;i<NUM_SISTERS;i++)\n\t{\n        body[i] = CreateObject((64<<CSF) + (50<<CSF)*i, 80<<CSF, OBJ_SISTERS_BODY);\n\t\tbody[i]->sprite = SPR_SISTERS_BODY;\n\t\tbody[i]->damage = SISTERS_DAMAGE;\n\t}\n\t\n\tfor(i=0;i<NUM_SISTERS;i++)\n\t{\n        head[i] = CreateObject((64<<CSF) + (50<<CSF)*i, 64<<CSF, OBJ_SISTERS_HEAD);\n\t\thead[i]->hp = 1000;\n        head[i]->damage = SISTERS_DAMAGE;\n\t\t\n\t\t// we give each dragon a different but identical-looking head sprite\n\t\t// so that we can hack their bboxes individually.\n\t\thead[i]->sprite = SPR_SISTERS_HEAD_1 + i;\n\t}\n\t\n\tobjprop[OBJ_SISTERS_HEAD].shaketime = 8;\n\tobjprop[OBJ_SISTERS_HEAD].hurt_sound = SND_ENEMY_HURT_COOL;\n\t\n\tmainangle = 0;\n\n#ifdef _480X272\n    main->xmark = 180 * 2;\n    main->ymark = 61 * 2;\n#else\n    main->xmark = 180;\n    main->ymark = 61;\n#endif\n\tmain->timer2 = random(700, 1200);\n\tmain->hp = 500;\n\t\n\tmain->id2 = 1000;\n\tmain->flags |= FLAG_SCRIPTONDEATH;\n\t\n\tgame.stageboss.object = main;\n}\n\nvoid SistersBoss::OnMapExit()\n{\n\tmain = NULL;\n\tgame.stageboss.object = NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SistersBoss::Run(void)\n{\n    int i;\n\n\tObject *o = main;\n\tif (!o) return;\n\t\n\t//debug(\"main->state: %d\", o->state);\n\t//debug(\"main->timer: %d\", o->timer);\n\t//DebugCrosshair(o->xmark, o->ymark, 255,255,255);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 20:\t// fight begin (script-triggered)\n\t\t{\n#ifdef _480X272\n            main->xmark = 180;\n            main->ymark = 61;\n#endif\n\t\t\tif (++o->timer > 68)\n\t\t\t{\n\t\t\t\to->xmark = 112;\t\t// bodies zoom onto screen via force of their interpolation\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\to->state = STATE_CIRCLE_RIGHT;\t\t\t// main begins turning angle\n\t\t\t\tSetHeadStates(STATE_HEAD_CLOSED);\t\t// periodically opens/fires by itself\n\t\t\t\tSetBodyStates(STATE_BODY_FACE_PLAYER);\t// enable body movement\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_CIRCLE_RIGHT:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer < 100)\t\t\t\t\tmainangle += 1;\n\t\t\telse if (o->timer < 120)\t\t\tmainangle += 2;\n\t\t\telse if (o->timer < o->timer2)\t\tmainangle += 4;\n\t\t\telse if (o->timer < o->timer2 + 40)\tmainangle += 2;\n\t\t\telse if (o->timer < o->timer2 + 60)\tmainangle += 1;\n\t\t\telse\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = STATE_CIRCLE_LEFT;\n\t\t\t\to->timer2 = random(400, 700);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_CIRCLE_LEFT:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer < 20)\t\t\t\t\tmainangle -= 1;\n\t\t\telse if (o->timer < 60)\t\t\t\tmainangle -= 2;\n\t\t\telse if (o->timer < o->timer2)\t\tmainangle -= 4;\n\t\t\telse if (o->timer < o->timer2 + 40)\tmainangle -= 2;\n\t\t\telse if (o->timer < o->timer2 + 60)\tmainangle -= 1;\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->hp < SISTERS_ATTACK2_HP)\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_MEGAFIRING;\n\t\t\t\t\tSetHeadStates(STATE_HEAD_MEGAFIRE);\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_CIRCLE_RIGHT;\n\t\t\t\t\to->timer2 = random(400, 700);\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// runs the circling while the heads are doing their low-hp \"megafire\" state.\n\t\t// first they stop completely, then spin around and around clockwise for a while.\n\t\tcase STATE_MEGAFIRING:\n\t\t{\n\t\t\tif (++o->timer > 100)\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase STATE_MEGAFIRING+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer < 100)\t\t mainangle += 1;\n\t\t\telse if (o->timer < 120) mainangle += 2;\n\t\t\telse if (o->timer < 500) mainangle += 4;\n\t\t\telse if (o->timer < 540) mainangle += 2;\n\t\t\telse if (o->timer < 560) mainangle += 1;\n\t\t\telse\n\t\t\t{\n\t\t\t\to->state = STATE_CIRCLE_LEFT;\n\t\t\t\tSetHeadStates(STATE_HEAD_CLOSED);\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// defeated!! make big smoke and pause a second\n\t\t// this state is entered via a <BOA in the ondeath script.\n\t\tcase STATE_DEFEATED:\n\t\t{\n\t\t\tSpawnScreenSmoke(40);\n\t\t\t\n\t\t\tfor(i=0;i<NUM_SISTERS;i++)\n\t\t\t{\n\t\t\t\thead[i]->damage = 0;\n\t\t\t\tbody[i]->damage = 0;\n\t\t\t}\n\t\t\t\n\t\t\tSetHeadStates(STATE_HEAD_DEFEATED);\n\t\t\tSetBodyStates(STATE_BODY_FACE_CENTER);\n\t\t\t\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase STATE_DEFEATED+1:\n\t\t{\n\t\t\tif (++o->timer > 100)\n\t\t\t{\n\t\t\t\to->state = STATE_DEFEATED_CRASH;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t\t\n\t\t\tSpawnScreenSmoke(1);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// the two dragons crash into each other\n\t\tcase STATE_DEFEATED_CRASH:\n\t\t{\n\t\t\tmainangle += 4;\n\t\t\t\n\t\t\tif (o->xmark > 8) o->xmark--;\n\t\t\tif (o->ymark > 0) o->ymark--;\n\t\t\t\n\t\t\tif (++o->timer == 40)\n\t\t\t\tSetBodyStates(STATE_BODY_LOCK_DIR);\n\t\t\t\n\t\t\tif (o->ymark == 0)\n\t\t\t{\n\t\t\t\tif (hitdetect(head[0], head[1]) || \\\n\t\t\t\t\thitdetect(head[0], body[1]) || \\\n\t\t\t\t\thitdetect(head[1], body[0]))\n\t\t\t\t{\n\t\t\t\t\tstarflash.Start(o->CenterX(), o->CenterY());\n\t\t\t\t\tsound(SND_EXPLOSION1);\n\t\t\t\t\t\n\t\t\t\t\to->state = STATE_STARFLASH;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->xmark -= 2;\n\t\t\t\t\tSetBodyStates(STATE_BODY_LOCK_DIR);\t// lock direction facing\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// big starflash after dragons hit each other\n\t\tcase STATE_STARFLASH:\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\tKillObjectsOfType(OBJ_DRAGON_ZOMBIE_SHOT);\n\t\t\t\tKillObjectsOfType(OBJ_SPIKE_SMALL);\n\t\t\t\t\n\t\t\t\tfor(i=0;i<NUM_SISTERS;i++)\n\t\t\t\t{\n\t\t\t\t\thead[i]->Delete();\n\t\t\t\t\tbody[i]->Delete();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmain->Delete();\n\t\t\t\tmain = NULL;\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\twhile(mainangle >= 256*4)  mainangle -= 256*4;\n\twhile(mainangle <= -256*4) mainangle += 256*4;\n\t\n\tfor(i=0;i<NUM_SISTERS;i++)\n\t{\n\t\trun_body(i);\n\t\trun_head(i);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SistersBoss::run_body(int index)\n{\n\tObject *o = body[index];\n\t\n\tuint8_t angle = (mainangle / 4);\n\tangle += (256 / NUM_SISTERS) * index;\n\t\n\t// main's xmark and ymark tell us how far from the center to circle\n\tint xoff = xinertia_from_angle(angle, main->xmark << CSF);\n\tint yoff = yinertia_from_angle(angle, main->ymark << CSF);\n\t\n\t// figure out where we are supposed to be\n\tint desired_x = (main->x + xoff) - (main->Width() / 2);\n\tint desired_y = (main->y + yoff) - (main->Height() / 2);\n\t\n\t// motion\n\tif (o->state == 0)\n\t{\t// this places them offscreen before the fight\n\t\to->x = desired_x;\n\t\to->y = desired_y;\n\t\to->state = STATE_BODY_NOMOVE;\n\t}\n\telse if (o->state != STATE_BODY_NOMOVE)\n\t{\t// smooth interpolation, they stay in this state throughout the fight\n\t\to->x += (desired_x - o->x) / 8;\n\t\to->y += (desired_y - o->y) / 8;\n\t}\n\t\n\t// set direction facing\n\tif (o->state != STATE_BODY_LOCK_DIR)\n\t{\n\t\tif (o->state == STATE_BODY_FACE_CENTER)\n\t\t{\n\t\t\tif (o->CenterX() > main->CenterX()) o->dir = LEFT;\n\t\t\telse o->dir = RIGHT;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t}\n\t}\n\t\n\tANIMATE(2, 0, 2);\n}\n\nvoid SistersBoss::run_head(int index)\n{\n\tObject *o = head[index];\n\t\n\t// stay connected to body\n\to->dir = body[index]->dir;\n\to->x = body[index]->x + ((o->dir==RIGHT) ? (4 << CSF) : -(4 << CSF));\n\to->y = body[index]->y - (4 << CSF);\n\t\n\t// link hp to main object\n\tif (o->hp < 1000)\n\t{\n\t\tmain->DealDamage(1000 - o->hp);\n\t\to->hp = 1000;\n\t}\n\t\n\t// FSM\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->flags |= (FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_HEAD_CLOSED:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->timer = random(100, 200);\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_HEAD_CLOSED+1:\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = STATE_HEAD_OPEN;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// open mouth and prepare to fire\n\t\tcase STATE_HEAD_OPEN:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->timer2 = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_HEAD_OPEN+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\tif (o->timer == 3) o->frame = 1;\t// mouth partially open--about to fire!!\n\t\t\tif (o->timer == 6) o->frame = 2;\t// mouth fully open\n\t\t\t\n\t\t\tif (o->timer > 150)\n\t\t\t{\t// begin firing if they haven't hit us by now\n\t\t\t\to->state = STATE_HEAD_FIRE;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t\t\n\t\t\t// need at least 2 hits to get her to close mouth\n\t\t\tif (o->shaketime) o->timer2++;\n\t\t\tif (o->timer2 > 10)\n\t\t\t{\n\t\t\t\tsound(SND_ENEMY_HURT);\n\t\t\t\tSmokeClouds(o, 4, 2, 2);\n\t\t\t\t\n\t\t\t\to->state = STATE_HEAD_BIT_TONGUE;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 3;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// firing (normal)\n\t\tcase STATE_HEAD_FIRE:\n\t\t{\n\t\t\tif ((++o->timer % 8) == 1)\n\t\t\t{\n\t\t\t\tEmFireAngledShot(o, OBJ_DRAGON_ZOMBIE_SHOT, 6, 0x200);\n\t\t\t\tsound(SND_SNAKE_FIRE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t\to->state = STATE_HEAD_CLOSED;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// firing a WHOLE LOT during low-hp status\n\t\tcase STATE_HEAD_MEGAFIRE:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->frame = 0;\n\t\t}\n\t\tcase STATE_HEAD_MEGAFIRE+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\tif (o->timer == 3) o->frame = 1;\n\t\t\tif (o->timer == 6) o->frame = 2;\n\t\t\t\n\t\t\tif (o->timer > 20)\n\t\t\t{\n\t\t\t\tif ((o->timer % 32) == 1)\n\t\t\t\t{\n\t\t\t\t\tEmFireAngledShot(o, OBJ_DRAGON_ZOMBIE_SHOT, 6, 0x200);\n\t\t\t\t\tsound(SND_SNAKE_FIRE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// mouth closed bit tongue after got shot\n\t\tcase STATE_HEAD_BIT_TONGUE:\n\t\t{\n\t\t\tif (++o->timer > 100)\n\t\t\t{\n\t\t\t\to->state = STATE_HEAD_CLOSED;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_HEAD_DEFEATED:\n\t\t\to->frame = 4;\t// eyes closed\n\t\tbreak;\n\t}\n\t\n\thead_set_bbox(index);\n}\n\n// select an appropriate bbox for the current frame and hack it onto our sprite.\n// I did this because the heads move around quite a bit in the different frames.\nvoid SistersBoss::head_set_bbox(int index)\n{\n\tSIFSprite *sprite = &sprites[SPR_SISTERS_HEAD_1 + index];\n\tObject *o = head[index];\n\tint frame = o->frame;\n\t\n\tif (o->dir == LEFT)\n\t{\t// use mirror image if dragon facing left\n\t\tint wd = (head_bboxes[frame].x2 - head_bboxes[frame].x1);\n\t\t\n\t\tsprite->bbox.x1 = sprite->w - head_bboxes[frame].x1 - wd;\n\t\tsprite->bbox.x2 = sprite->bbox.x1 + (wd - 1);\n\t}\n\telse\n\t{\n\t\tsprite->bbox.x1 = head_bboxes[frame].x1;\n\t\tsprite->bbox.x2 = head_bboxes[frame].x2;\n\t}\n\t\n\tsprite->bbox.y1 = head_bboxes[frame].y1;\n\tsprite->bbox.y2 = head_bboxes[frame].y2;\n\t\n\to->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\to->flags |= head_bboxes[frame].flags;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SistersBoss::SpawnScreenSmoke(int count)\n{\n\tfor(int i=0;i<count;i++)\n\t{\n\t\tint x = random(1*TILE_W, 20*TILE_W) << CSF;\n\t\tint y = random(2*TILE_H, 14*TILE_H) << CSF;\n\t\tSmokePuff(x, y);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SistersBoss::SetHeadStates(int newstate)\n{\n\tfor(int i=0;i<NUM_SISTERS;i++)\n\t\thead[i]->state = newstate;\n}\n\nvoid SistersBoss::SetBodyStates(int newstate)\n{\n\tfor(int i=0;i<NUM_SISTERS;i++)\n\t\tbody[i]->state = newstate;\n}\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/boss/sisters.fdh",
    "content": "//hash:90d72648\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//----------------[referenced from ai/boss/sisters.cpp]--------------//\nObject *CreateObject(int x, int y, int type);\nbool hitdetect(Object *o1, Object *o2);\n\n\n/* located in trig.cpp */\n\n//----------------[referenced from ai/boss/sisters.cpp]--------------//\nint xinertia_from_angle(uint8_t angle, int speed);\nint yinertia_from_angle(uint8_t angle, int speed);\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//----------------[referenced from ai/boss/sisters.cpp]--------------//\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//----------------[referenced from ai/boss/sisters.cpp]--------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nObject *SmokePuff(int x, int y);\n\n\n/* located in sound/sound.cpp */\n\n//----------------[referenced from ai/boss/sisters.cpp]--------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//----------------[referenced from ai/boss/sisters.cpp]--------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/boss/sisters.h",
    "content": "\n#ifndef _SISTERS_H\n#define _SISTERS_H\n\n// although you will need to add additional copies of the head sprites\n// for it to work properly, just try setting this number to something\n// like 10 and running the fight!\n#define NUM_SISTERS\t\t\t2\n\nclass SistersBoss : public StageBoss\n{\npublic:\n\tvoid OnMapEntry();\n\tvoid OnMapExit();\n\tvoid Run();\n\nprivate:\n\tvoid run_head(int index);\n\tvoid head_set_bbox(int index);\n\tvoid run_body(int index);\n\t\n\tvoid SetHeadStates(int newstate);\n\tvoid SetBodyStates(int newstate);\n\t\n\tvoid SpawnScreenSmoke(int count);\n\t\n\tint mainangle;\n\t\n\tObject *main;\n\tObject *head[NUM_SISTERS];\n\tObject *body[NUM_SISTERS];\n};\n\n\n#endif\n"
  },
  {
    "path": "ai/boss/undead_core.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"undead_core.h\"\n#include \"undead_core.fdh\"\n\nstatic struct\n{\n\tSIFPoint offset;\t// offset from main object\n\tSIFRect rect;\t\t// actual bbox rect\n}\ncore_bboxes[] =\n{\n\t{  { 0, -32 },  { -40, -16, 40, 16 }  },\t// upper\n\t{  { 28, 0 },   { -36, -24, 36, 24 }  },\t// back/main body\n\t{  { 4, 32 },   { -44, -8, 44, 8 }    },\t// lower\n\t{  { -28, 4 },  { -20, -20, 20, 20 }  }\t\t// shoot target\n};\n\nenum CORE_STATES\n{\n\tCR_FightBegin\t\t= 20,\t\t// scripted\n\tCR_FaceClosed\t\t= 200,\n\tCR_FaceSkull\t\t= 210,\n\tCR_FaceTeeth\t\t= 220,\n\tCR_FaceDoom\t\t\t= 230,\n\t\n\tCR_Defeated\t\t\t= 500,\t\t// scripted\n\tCR_Exploding\t\t= 1000\n};\n\nenum FACE_STATES\n{\n\tFC_Closed\t\t= 0,\n\tFC_Skull\t\t= 1,\n\tFC_Teeth\t\t= 2,\n\tFC_Mouth\t\t= 3\n};\n\nenum ROTR_STATES\n{\n\tRT_Spin_Closed\t\t\t= 10,\n\tRT_Spin_Open\t\t\t= 20,\n\tRT_Spin_Slow_Closed\t\t= 30,\n\tRT_Spin_Fast_Closed\t\t= 40\n};\n\n/*\nvoid c------------------------------() {}\n*/\n\nINITFUNC(AIRoutines)\n{\n\tONSPAWN(OBJ_UD_MINICORE_IDLE, onspawn_ud_minicore_idle);\n\tONTICK(OBJ_UDMINI_PLATFORM, ai_udmini_platform);\n\t\n\tONTICK(OBJ_UD_PELLET, ai_ud_pellet);\n\tONTICK(OBJ_UD_SMOKE, ai_ud_smoke);\n\t\n\tONTICK(OBJ_UD_SPINNER, ai_ud_spinner);\n\tONTICK(OBJ_UD_SPINNER_TRAIL, ai_ud_spinner_trail);\n\t\n\tONTICK(OBJ_UD_BLAST, ai_ud_blast);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n/*\n\tMain core body:\n\t\tnon-shootable when closed\n\t\tinvulnerable when open\n\t\tstarsolid's appear just behind the little dots\n\t\t\n\t\twhen you shoot the face the starsolid hits at just past his nose.\n\t\t\n\t\twhen face is open it does block the face from shooting below,\n\t\tbut there is still a spot that you can hurt it from below.\n\t\t\n\t\tfour always-dark minicores that spin around it, they also seem\n\t\tto be switching their z-order.\n*/\n\nvoid UDCoreBoss::OnMapEntry()\n{\nObject *o;\n\n\t// main object\n\to = CreateObject(0, 0, OBJ_UDCORE_MAIN);\n\tmain = o;\n\tgame.stageboss.object = o;\n\t\n\to->sprite = SPR_NULL;//SPR_MARKER;\n\tobjprop[o->type].hurt_sound = SND_CORE_HURT;\n\t\n\to->hp = 700;\n\to->x = (592 << CSF);\n\to->y = (120 << CSF);\n\to->id2 = 1000;\t// defeated script\n\to->flags = (FLAG_SHOW_FLOATTEXT | FLAG_IGNORE_SOLID | FLAG_SCRIPTONDEATH);\n\t\n\t// create rear rotators\n\trotator[2] = create_rotator(0, 1);\n\trotator[3] = create_rotator(0x80, 1);\n\t\n\t// create front & back\n\tfront = CreateObject(0, 0, OBJ_UDCORE_FRONT);\n\tback = CreateObject(0, 0, OBJ_UDCORE_BACK);\n\t\n\t// create face\n\tface = CreateObject(0, 0, OBJ_UDCORE_FACE);\n\tface->state = FC_Closed;\n\n\t// create front rotators\n\trotator[0] = create_rotator(0, 0);\n\trotator[1] = create_rotator(0x80, 0);\n\t\n\t// initilize bboxes\n\tfor(int i=0;i<NUM_BBOXES;i++)\n\t{\n\t\tbbox[i] = CreateObject(0, 0, OBJ_UDMINI_BBOX);\n\t\tbbox[i]->sprite = SPR_BBOX_PUPPET_1 + i;\n\t\tbbox[i]->hp = 1000;\n\t\t\n\t\tsprites[bbox[i]->sprite].bbox = core_bboxes[i].rect;\n\t}\n\t\n\t//o->BringToFront();\n}\n\nvoid UDCoreBoss::OnMapExit()\n{\n\tmain = NULL;\n\tgame.stageboss.object = NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid UDCoreBoss::Run(void)\n{\n\tObject *o = main;\n\tif (!o) return;\n\n\tif (RunDefeated())\n\t\treturn;\n\t\n\tswitch(o->state)\n\t{\n\t\t// fight begin (scripted)\n\t\tcase CR_FightBegin:\n\t\t{\n\t\t\to->state = CR_FaceSkull;\n\t\t\to->dir = LEFT;\n\t\t\t\n\t\t\tSetRotatorStates(RT_Spin_Slow_Closed);\n\t\t\tSpawnFaceSmoke();\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// face closed\n\t\tcase CR_FaceClosed:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tface->state = FC_Closed;\n\t\t\tfront->frame = 2;\t\t// closed\n\t\t\tback->frame = 0;\t\t// not orange\n\t\t\t\n\t\t\tset_bbox_shootable(false);\n\t\t\tSetRotatorStates(RT_Spin_Closed);\n\t\t\tSpawnFaceSmoke();\n\t\t}\n\t\tcase CR_FaceClosed+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->dir == RIGHT || o->frame > 0 || o->hp < 200)\n\t\t\t{\n\t\t\t\tif (o->timer > 200)\n\t\t\t\t{\n\t\t\t\t\to->timer2++;\n\t\t\t\t\tsound(SND_CORE_THRUST);\n\t\t\t\t\t\n\t\t\t\t\t// select attack mode\n\t\t\t\t\tif (o->hp < 200)\n\t\t\t\t\t{\n\t\t\t\t\t\to->state = CR_FaceDoom;\n\t\t\t\t\t}\n\t\t\t\t\telse if (o->timer2 > 2)\n\t\t\t\t\t{\n\t\t\t\t\t\to->state = CR_FaceTeeth;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\to->state = CR_FaceSkull;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// face open/skull\n\t\tcase CR_FaceSkull:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tface->state = FC_Skull;\n\t\t\tSpawnFaceSmoke();\n\t\t\t\n\t\t\to->savedhp = o->hp;\n\t\t\tset_bbox_shootable(true);\n\t\t}\n\t\tcase CR_FaceSkull+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\tRunHurtFlash(o->timer);\n\t\t\t\n\t\t\tif (o->timer < 300)\n\t\t\t{\n\t\t\t\tif ((o->timer % 120) == 1)\n\t\t\t\t{\n\t\t\t\t\tSpawnPellet(UP);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((o->timer % 120) == 61)\n\t\t\t\t{\n\t\t\t\t\tSpawnPellet(DOWN);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 400 || (o->savedhp - o->hp) > 50)\n\t\t\t{\n\t\t\t\to->state = CR_FaceClosed;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// face open/teeth\n\t\tcase CR_FaceTeeth:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tface->state = FC_Teeth;\n\t\t\tSpawnFaceSmoke();\n\t\t\t\n\t\t\tSetRotatorStates(RT_Spin_Open);\n\t\t\tgame.quaketime = 100;\n\t\t\t\n\t\t\to->savedhp = o->hp;\n\t\t\tset_bbox_shootable(true);\n\t\t}\n\t\tcase CR_FaceTeeth+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\tRunHurtFlash(o->timer);\n\t\t\t\n\t\t\t// fire rotators\n\t\t\tif ((o->timer % 40) == 1)\n\t\t\t{\n\t\t\t\tint i = random(0, 3);\n\t\t\t\tint x = rotator[i]->x - (16<<CSF);\n\t\t\t\tint y = rotator[i]->y;\n\t\t\t\t\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\tCreateSpinner(x, y);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 400 || (o->savedhp - o->hp) > 150 || o->hp < 200)\n\t\t\t{\n\t\t\t\to->state = CR_FaceClosed;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// face open/mouth: blasts of doom\n\t\tcase CR_FaceDoom:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tface->state = FC_Mouth;\n\t\t\tSpawnFaceSmoke();\n\t\t\tSetRotatorStates(RT_Spin_Fast_Closed);\n\t\t\t\n\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\n\t\t\t// spawn a whole bunch of crazy spinners from the face\n\t\t\tCreateSpinner(face->x - (16<<CSF), face->y);\n\t\t\tCreateSpinner(face->x, face->y - (16<<CSF));\n\t\t\tCreateSpinner(face->x, face->y + (16<<CSF));\n\t\t\t\n\t\t\to->savedhp = o->hp;\n\t\t\tset_bbox_shootable(true);\n\t\t}\n\t\tcase CR_FaceDoom+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\tRunHurtFlash(o->timer);\n\t\t\t\n\t\t\tif ((o->timer % 120) == 1)\n\t\t\t\tSpawnPellet(UP);\n\t\t\t\n\t\t\tif ((o->timer % 120) == 61)\n\t\t\t\tSpawnPellet(DOWN);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// move back and forth\n\tif (o->state >= CR_FightBegin && o->state < CR_Defeated)\n\t{\n\t\tif (o->x < MAPX(12))\n\t\t\to->dir = RIGHT;\n\t\t\n\t\tif (o->x > MAPX(map.xsize - 4))\n\t\t\to->dir = LEFT;\n\t\t\n\t\tXACCEL(4);\n\t}\n\t\n\t// spawn minicore platforms\n\tswitch(o->state)\n\t{\n\t\tcase CR_FaceClosed+1:\n\t\tcase CR_FaceTeeth+1:\n\t\tcase CR_FaceSkull+1:\n\t\tcase CR_FaceDoom+1:\n\t\t{\n\t\t\t// while I don't think there's any way to get her there without\n\t\t\t// a map editor, if you put Curly in the Black Space core room,\n\t\t\t// she WILL fight the core, just as she did the first time.\n\t\t\tif (o->state != 221 && (o->timer % 100) == 1)\n\t\t\t\tbbox[BB_TARGET]->CurlyTargetHere();\n\t\t\t\n\t\t\to->timer3++;\n\t\t\t\n\t\t\t// upper platforms\n\t\t\tif (o->timer3 == 75)\n\t\t\t{\n\t\t\t\tCreateObject(MAPX(map.xsize) + 40, \\\n\t\t\t\t\t\t\t MAPY(3 + random(-3, 0)), OBJ_UDMINI_PLATFORM);\n\t\t\t}\n\t\t\t\n\t\t\t// lower platforms\n\t\t\tif (o->timer3 == 150)\n\t\t\t{\n\t\t\t\to->timer3 = 0;\n\t\t\t\tCreateObject(MAPX(map.xsize) + 40, \\\n\t\t\t\t\t\t\t MAPY(10 + random(-1, 3)), OBJ_UDMINI_PLATFORM);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tLIMITX(0x80);\n\tLIMITY(0x80);\n}\n\n\nvoid UDCoreBoss::RunAftermove()\n{\nint i;\n\n\tObject *o = main;\n\tif (!o) return;\n\t\n\trun_face(face);\n\trun_front(front);\n\trun_back(back);\n\t\n\tfor(i=0;i<4;i++)\n\t\trun_rotator(rotator[i]);\n\t\n\tmove_bboxes();\n}\n\n\n// spawn smoke puffs from face that come when face opens/closes\nvoid UDCoreBoss::SpawnFaceSmoke()\n{\n\tquake(20);\n\t\n\tfor(int i=0;i<8;i++)\n\t{\n\t\tint x = face->x + random(-16<<CSF, 32<<CSF);\n\t\tint y = main->CenterY();\n\t\tObject *s = SmokePuff(x, y);\n\t\ts->xinertia = random(-0x200, 0x200);\n\t\ts->yinertia = random(-0x100, 0x100);\n\t}\n}\n\n// spit a \"pellet\" shot out of the face. That's what I'm calling the flaming lava-rock\n// type things that are thrown out and trail along the ceiling or floor.\nvoid UDCoreBoss::SpawnPellet(int dir)\n{\n\tint y = main->y;\n\t\n\tif (dir == UP)\n\t\ty -= (16 << CSF);\n\telse\n\t\ty += (16 << CSF);\n\t\n\tCreateObject(main->x - (32<<CSF), y, OBJ_UD_PELLET)->dir = dir;\n}\n\n\nvoid UDCoreBoss::RunHurtFlash(int timer)\n{\n\tif (main->shaketime && (timer & 2))\n\t{\n\t\tfront->frame = 1;\n\t\tback->frame = 1;\n\t}\n\telse\n\t{\n\t\tfront->frame = 0;\n\t\tback->frame = 0;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool UDCoreBoss::RunDefeated()\n{\n\tObject *o = main;\n\t\n\tswitch(o->state)\n\t{\n\t\t// defeated (descending)\n\t\tcase CR_Defeated:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\t\n\t\t\tface->state = FC_Closed;\n\t\t\tfront->frame = 0;\t\t// front closed\n\t\t\tback->frame = 0;\t\t// not flashing\n\t\t\tSetRotatorStates(RT_Spin_Slow_Closed);\n\t\t\t\n\t\t\tgame.quaketime = 20;\n\t\t\tSmokeXY(o->x, o->y, 100, 128, 64);\n\t\t\t\n\t\t\tKillObjectsOfType(OBJ_UDMINI_PLATFORM);\n\t\t\tset_bbox_shootable(false);\n\t\t}\n\t\tcase CR_Defeated+1:\n\t\t{\n\t\t\tSmokeXY(o->x, o->y, 1, 64, 32);\n\t\t\t\n\t\t\to->xinertia = 0x40;\n\t\t\to->yinertia = 0x80;\n\t\t\t\n\t\t\tif (++o->timer > 200)\n\t\t\t{\n\t\t\t\to->state = CR_Exploding;\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// defeated (exploding)\n\t\tcase CR_Exploding:\n\t\t{\n\t\t\tquake(100, 0);\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif ((o->timer % 8) == 0)\n\t\t\t\tsound(SND_MISSILE_HIT);\n\t\t\t\n\t\t\tint x = o->x + random(-72<<CSF, 72<<CSF);\n\t\t\tint y = o->y + random(-64<<CSF, 64<<CSF);\n\t\t\tSmokePuff(x, y);\n\t\t\teffect(x, y, EFFECT_BOOMFLASH);\n\t\t\t\n\t\t\tif (o->timer > 100)\n\t\t\t{\n\t\t\t\tsound(SND_EXPLOSION1);\n\t\t\t\tstarflash.Start(o->x, o->y);\n\t\t\t\t\n\t\t\t\to->state++;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase CR_Exploding+1:\n\t\t{\n\t\t\tgame.quaketime = 40;\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\tKillObjectsOfType(OBJ_MISERY_MISSILE);\n\t\t\t\t\n\t\t\t\tfront->Delete();\n\t\t\t\tback->Delete();\n\t\t\t\tface->Delete();\n\t\t\t\tfor(int i=0;i<NUM_ROTATORS;i++) rotator[i]->Delete();\n\t\t\t\tfor(int i=0;i<NUM_BBOXES;i++) bbox[i]->Delete();\n\t\t\t\tmain->Delete();\n\t\t\t\tmain = NULL;\n\t\t\t\t\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\treturn 0;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid UDCoreBoss::run_face(Object *o)\n{\n\to->sprite = SPR_UD_FACES;\n\to->invisible = false;\n\t\n\tswitch(o->state)\n\t{\n\t\t// to \"show\" the closed face, we go invisible and the\n\t\t// face area of the main core shows through.\n\t\tcase FC_Closed: o->invisible = true; break;\n\t\tcase FC_Skull: o->frame = 0; break;\n\t\tcase FC_Teeth: o->frame = 1; break;\n\t\t\n\t\t// mouth blasts of doom. Once started, it's perpetual blasting\n\t\t// until told otherwise.\n\t\tcase FC_Mouth:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 100;\n\t\t}\n\t\tcase FC_Mouth+1:\n\t\t{\n\t\t\tif (++o->timer > 300)\n\t\t\t\to->timer = 0;\n\t\t\t\n\t\t\tif (o->timer > 250)\n\t\t\t{\n\t\t\t\tif ((o->timer % 16) == 1)\n\t\t\t\t\tsound(SND_QUAKE);\n\t\t\t\t\n\t\t\t\tif ((o->timer % 16) == 7)\n\t\t\t\t{\n\t\t\t\t\tCreateObject(o->x, o->y, OBJ_UD_BLAST);\n\t\t\t\t\tsound(SND_LIGHTNING_STRIKE);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer == 200)\n\t\t\t\tsound(SND_CORE_CHARGE);\n\t\t\t\n\t\t\tif (o->timer >= 200 && (o->timer & 1))\n\t\t\t\to->frame = 3;\t// mouth lit\n\t\t\telse\n\t\t\t\to->frame = 2;\t// mouth norm\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->x = main->x - (36 << CSF);\n\to->y = main->y - (4 << CSF);\n}\n\n\nvoid UDCoreBoss::run_front(Object *o)\n{\n\t// 0 open (should make a face visible at the same time to go into the gap)\n\t// 1 open/hurt\n\t// 2 closed\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->sprite = SPR_UD_FRONT;\n\t\t\to->state = 1;\n\t\t\to->frame = 2;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->x = main->x - (36<<CSF);\n\t\t\to->y = main->y;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid UDCoreBoss::run_back(Object *o)\n{\n\t// 0 normal\n\t// 1 hurt\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->sprite = SPR_UD_BACK;\n\t\t\to->state = 1;\n\t\t\to->frame = 0;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->x = main->x + (44<<CSF);\n\t\t\to->y = main->y;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// \"front\" refers to whether they are doing the front (left) or rear (right)\n// half of the arc; the ones marked \"front\" are actually BEHIND the core.\nObject *UDCoreBoss::create_rotator(int angle, int front)\n{\n\tObject *o = CreateObject(0, 0, OBJ_UDMINI_ROTATOR);\n\to->angle = angle;\n\to->substate = front;\n\t\n\treturn o;\n}\n\n// the rotators are 4 minicores that spin around the main core during the battle\n// and have pseudo-3D effects. They also shoot the spinners during the teeth-face phase.\n//\n// instead of having the cores constantly rearranging their Z-Order as they pass\n// in front and behind the core, an optical illusion is used. 2 cores are always\n// in front and 2 are always behind. Each set of two cores covers only half the full\n// circle. When a core in the front set reaches the top, it warps back to the bottom\n// just as a core in the back set reaches the bottom and warps back to the top.\n// Thus, they swap places and the core appears to continue around the circle using\n// the different z-order of the one that was just swapped-in.\nvoid UDCoreBoss::run_rotator(Object *o)\n{\n\t//debug(\"rotr s%d\", o->state);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->sprite = SPR_UD_ROTATOR;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->hp = 1000;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase RT_Spin_Closed:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->angle += 2;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// used when firing spinners in Teeth face\n\t\t// (it's easier to coordinate if spinners are actually spawned by core\n\t\t// and just positioned next to us)\n\t\tcase RT_Spin_Open:\n\t\t{\n\t\t\to->frame = 1;\n\t\t\to->angle += 2;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase RT_Spin_Slow_Closed:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->angle++;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase RT_Spin_Fast_Closed:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->angle += 4;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// each \"side\" covers half the rotation angle\n\tint angle = (o->angle / 2);\n\t\n\tif (o->substate)\n\t{\t// front (left) half of arc\n\t\tangle += 0x40;\n\t}\n\telse\n\t{\t// back (right) half of arc\n\t\tangle += 0xC0;\n\t}\n\t\n\to->x = (main->x - (8<<CSF)) + xinertia_from_angle(angle, (48<<CSF));\n\to->y = main->y + yinertia_from_angle(angle, (80<<CSF));\n}\n\nvoid UDCoreBoss::SetRotatorStates(int newstate)\n{\n\tfor(int i=0;i<NUM_ROTATORS;i++)\n\t\trotator[i]->state = newstate;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// extra bbox puppets/shoot targets\n// only one, located at the face, is shootable, the other 3 are invulnerable shields.\nvoid UDCoreBoss::move_bboxes()\n{\n\tfor(int i=0;i<NUM_BBOXES;i++)\n\t{\n\t\tbbox[i]->x = main->x + (core_bboxes[i].offset.x << CSF);\n\t\tbbox[i]->y = main->y + (core_bboxes[i].offset.y << CSF);\n\t}\n\t\n\ttransfer_damage(bbox[BB_TARGET], main);\n}\n\n// sets up bboxes for the Core entering shootable or non-shootable mode.\nvoid UDCoreBoss::set_bbox_shootable(bool enable)\n{\nuint32_t body_flags, target_flags;\nint i;\n\n\t// in shootable mode target can be hit and shields are up.\n\t// in non-shootable mode (when face is closed) nothing can be hit.\n\tif (enable)\n\t{\n\t\tbody_flags = FLAG_INVULNERABLE;\n\t\ttarget_flags = FLAG_SHOOTABLE;\n\t}\n\telse\n\t{\n\t\tbody_flags = 0;\n\t\ttarget_flags = 0;\n\t}\n\t\n\tfor(i=0;i<NUM_BBOXES;i++)\n\t{\n\t\tbbox[i]->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\t\t\n\t\tif (i == BB_TARGET)\n\t\t\tbbox[i]->flags |= target_flags;\n\t\telse\n\t\t\tbbox[i]->flags |= body_flags;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// minicores by entrance seen before fight\nvoid onspawn_ud_minicore_idle(Object *o)\n{\n\tif (o->dir == RIGHT)\n\t\to->flags &= ~FLAG_SOLID_BRICK;\n}\n\n// these are the ones you can ride\nvoid ai_udmini_platform(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->ymark = o->y;\n\t\t\t\n\t\t\to->xinertia = -0x200;\n\t\t\to->yinertia = 0x100;\n\t\t\tif (random(0, 1)) o->yinertia = -o->yinertia;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (o->x < -(64 << CSF))\n\t\t\t\to->Delete();\n\t\t\t\n\t\t\tif (o->y > o->ymark) o->yinertia -= 0x10;\n\t\t\tif (o->y < o->ymark) o->yinertia += 0x10;\n\t\t\tLIMITY(0x100);\n\t\t\t\n\t\t\t// when player jumps on them, they open up and start\n\t\t\t// moving their Y to align with the core.\n\t\t\tif (player->riding == o)\n\t\t\t{\n\t\t\t\to->ymark = MAPY(9);\n\t\t\t\to->frame = 2;\n\t\t\t}\n\t\t\telse if (o->flags & FLAG_SOLID_BRICK)\t// don't reset frame if dimmed\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t\t\n\t\t\t// don't try to squish the player into anything, rather, dim and go non-solid.\n\t\t\t// our bbox is set slightly larger than our solidbox so that we can detect if\n\t\t\t// the player is near.\n\t\t\tif (hitdetect(o, player))\n\t\t\t{\n\t\t\t\tif ((player->blockl && player->Right() < o->CenterX()) || \\\n\t\t\t\t\t(o->yinertia > 0 && player->blockd && player->Top() >= o->CenterY() - (1<<CSF)) || \\\n\t\t\t\t\t(o->yinertia < 0 && player->blocku && player->Bottom() < o->CenterY()))\n\t\t\t\t{\n\t\t\t\t\to->flags &= ~FLAG_SOLID_BRICK;\n\t\t\t\t\to->frame = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// falling lava-rock thing from Skull face\nvoid ai_ud_pellet(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->sprite = SPR_UD_PELLET;\n\t\t\to->xinertia = -0x200;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\t\t// falling\n\t\t{\n\t\t\tif (o->dir == UP)\n\t\t\t{\n\t\t\t\to->yinertia -= 0x20;\n\t\t\t\tLIMITY(0x5ff);\n\t\t\t\t\n\t\t\t\tif (o->blocku)\n\t\t\t\t\to->state = 2;\n\t\t\t}\n\t\t\telse if (o->dir == DOWN)\n\t\t\t{\n\t\t\t\to->yinertia += 0x20;\n\t\t\t\tLIMITY(0x5ff);\n\t\t\t\t\n\t\t\t\tif (o->blockd)\n\t\t\t\t\to->state = 2;\n\t\t\t}\n\t\t\t\n\t\t\tANIMATE(3, 0, 1);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// hit ground/ceiling\n\t\t{\n\t\t\tsound(SND_MISSILE_HIT);\n\t\t\to->xinertia = (o->x > player->x) ? -0x400 : 0x400;\n\t\t\to->yinertia = 0;\n\t\t\t\n\t\t\to->state = 3;\n\t\t\to->timer = 0;\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\n\t\t\to->sprite = SPR_UD_BANG;\n\t\t\to->x -= (4 << CSF);\n\t\t\to->y -= (4 << CSF);\n\t\t}\n\t\tcase 3:\n\t\t{\n\t\t\tANIMATE(0, 0, 2);\n\t\t\t\n\t\t\tif ((++o->timer % 3) == 1)\n\t\t\t{\n\t\t\t\tObject *smoke = CreateObject(o->CenterX(), o->CenterY(), OBJ_UD_SMOKE);\n\t\t\t\t\n\t\t\t\tif (o->dir == UP)\n\t\t\t\t\tsmoke->yinertia = 0x400;\n\t\t\t\telse\n\t\t\t\t\tsmoke->yinertia = -0x400;\n\t\t\t\t\n\t\t\t\tsmoke->x += o->xinertia;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->CenterX() < (16<<CSF) || \\\n\t\t\t\to->CenterX() > (MAPX(map.xsize) - (16<<CSF)))\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_ud_smoke(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xinertia = random(-4, 4) << CSF;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->xinertia *= 20; o->xinertia /= 21;\n\t\t\to->yinertia *= 20; o->yinertia /= 21;\n\t\t\t\n\t\t\tANIMATE_FWD(1);\n\t\t\tif (o->frame > sprites[o->sprite].nframes)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void CreateSpinner(int x, int y)\n{\n\tCreateObject(x, y, OBJ_UD_SPINNER);\n\tCreateObject(x, y, OBJ_UD_SPINNER)->angle = 0x80;\n}\n\n// spinny thing shot by rotators during Teeth phase.\n// they come in pairs.\nvoid ai_ud_spinner(Object *o)\n{\n\tif (o->x < 0 || o->x > MAPX(map.xsize))\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->angle += 24;\n\t\t\t\n\t\t\to->speed -= 0x15;\n\t\t\to->xmark += o->speed;\n\t\t\t\n\t\t\to->x = o->xmark + xinertia_from_angle(o->angle, (4<<CSF));\n\t\t\to->y = o->ymark + yinertia_from_angle(o->angle, (6<<CSF));\n\t\t\t\n\t\t\tCreateObject(o->x, o->y, OBJ_UD_SPINNER_TRAIL);\n\t\t\to->BringToFront();\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_ud_spinner_trail(Object *o)\n{\n\to->frame++;\n\tif (o->frame > 2)\n\t\to->Delete();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_ud_blast(Object *o)\n{\n\to->xinertia = -0x1000;\n\to->frame ^= 1;\n\n\tSmokePuff(o->CenterX() + (random(0, 16) << CSF), \\\n\t\t\t  o->CenterY() + (random(-16, 16) << CSF));\n\t\n\tif (o->x < -0x4000)\n\t\to->Delete();\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/boss/undead_core.fdh",
    "content": "//hash:446a3fc0\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nObject *CreateObject(int x, int y, int type);\nbool hitdetect(Object *o1, Object *o2);\n\n\n/* located in caret.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nint xinertia_from_angle(uint8_t angle, int speed);\nint yinertia_from_angle(uint8_t angle, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nvoid KillObjectsOfType(int type);\nvoid transfer_damage(Object *o, Object *target);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nObject *SmokePuff(int x, int y);\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in ai/boss/undead_core.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nvoid onspawn_ud_minicore_idle(Object *o);\nvoid ai_udmini_platform(Object *o);\nvoid ai_ud_pellet(Object *o);\nvoid ai_ud_smoke(Object *o);\nstatic void CreateSpinner(int x, int y);\nvoid ai_ud_spinner(Object *o);\nvoid ai_ud_spinner_trail(Object *o);\nvoid ai_ud_blast(Object *o);\n\n\n/* located in ai/boss/ballos.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nstatic void SetRotatorStates(int newstate);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/boss/undead_core.cpp]------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/boss/undead_core.h",
    "content": "\n#ifndef _UNDEADCORE_BOSS_H\n#define _UNDEADCORE_BOSS_H\n\n#define NUM_ROTATORS\t\t4\nenum BBoxes { BB_UPPER, BB_BACK, BB_LOWER, BB_TARGET, NUM_BBOXES };\n\nenum UD_Faces\n{\n\tFACE_SKULL,\n\tFACE_TEETH,\n\tFACE_MOUTH,\n\tFACE_MOUTH_LIT,\n\tFACE_NONE\n};\n\nclass UDCoreBoss : public StageBoss\n{\npublic:\n\tvoid OnMapEntry();\n\tvoid OnMapExit();\n\tvoid Run();\n\tvoid RunAftermove();\n\nprivate:\n\tbool RunDefeated();\n\tvoid SpawnFaceSmoke();\n\tvoid SpawnPellet(int dir);\n\tvoid RunHurtFlash(int timer);\n\n\tvoid run_front(Object *o);\n\tvoid run_face(Object *o);\n\tvoid run_back(Object *o);\n\t\n\tvoid move_bboxes();\n\tvoid set_bbox_shootable(bool enable);\n\t\n\tObject *create_rotator(int angle, int front);\n\tvoid run_rotator(Object *o);\n\tvoid SetRotatorStates(int newstate);\n\t\n\tObject *main;\n\tObject *front, *back;\n\tObject *face;\n\t\n\tObject *rotator[NUM_ROTATORS];\n\tObject *bbox[NUM_BBOXES];\n\t\n};\n\n\n\n#endif\n"
  },
  {
    "path": "ai/boss/x.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"x.h\"\n#include \"x.fdh\"\n\n#define STATE_X_APPEAR\t\t\t\t1\t\t// script-triggered: must stay constant\n#define STATE_X_FIGHT_BEGIN\t\t\t10\t\t// script-triggered: must stay constant\n#define STATE_X_TRAVEL\t\t\t\t20\n#define STATE_X_BRAKE\t\t\t\t30\n#define STATE_X_OPEN_DOORS\t\t\t40\n#define STATE_X_FIRE_TARGETS\t\t50\n#define STATE_X_FIRE_FISHIES\t\t60\n#define STATE_X_CLOSE_DOORS\t\t\t70\n#define STATE_X_EXPLODING\t\t\t80\n\n#define STATE_DOOR_OPENING\t\t\t10\t\t// makes the doors open\n#define STATE_DOOR_OPENING_PARTIAL\t20\t\t// makes the doors open part-way\n#define STATE_DOOR_CLOSING\t\t\t30\t\t// closes the doors\n#define STATE_DOOR_FINISHED\t\t\t40\t\t// doors are finished moving\n\n#define STATE_TREAD_STOPPED\t\t\t20\n#define STATE_TREAD_RUN\t\t\t\t30\n#define STATE_TREAD_BRAKE\t\t\t40\n\n#define STATE_FISHSPAWNER_FIRE\t\t10\n#define STATE_TARGET_FIRE\t\t\t10\n\n#define DOORS_OPEN_DIST\t\t\t(32 << CSF)\t\t// how far the doors open\n#define DOORS_OPEN_FISHY_DIST\t(20 << CSF)\t\t// how far the doors open during fish-missile phase\n\n// the treads start moving at slightly different times\n// which we change direction, etc.\nstatic const int tread_turnon_times[] = { 4, 8, 10, 12 };\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_X_FISHY_MISSILE, ai_x_fishy_missile);\n\tONTICK(OBJ_X_DEFEATED, ai_x_defeated);\n\t\n\tONDEATH(OBJ_X_TARGET, ondeath_x_target);\n\tONDEATH(OBJ_X_MAINOBJECT, ondeath_x_mainobject);\n}\n\nvoid XBoss::OnMapEntry(void)\n{\n\tstat(\"XBoss::OnMapEntry()\");\n\t\n\tmemset(&X, 0, sizeof(X));\n\tmemset(&body, 0, sizeof(body));\n\tmemset(&treads, 0, sizeof(treads));\n\tmemset(&internals, 0, sizeof(internals));\n\tmemset(&doors, 0, sizeof(doors));\n\tmemset(&targets, 0, sizeof(targets));\n\tmemset(&fishspawners, 0, sizeof(fishspawners));\n\tnpieces = 0;\n\t\n\tmainobject = CreateObject(0, 0, OBJ_X_MAINOBJECT);\n\tmainobject->sprite = SPR_NULL;\n\t\n\t\n\tgame.stageboss.object = mainobject;\n}\n\nvoid XBoss::OnMapExit()\n{\n\t// we'll let the map loader code handle deleting all our pieces.\n\t// here's just a good-form failsafe to ensure XBoss::Run() runs no more.\n\tmainobject = NULL;\n\tgame.stageboss.object = NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid XBoss::Run()\n{\nObject *o = mainobject;\nint i;\n\n\tif (!mainobject) return;\n\tif (o->state == 0 || (!X.initilized && o->state != STATE_X_APPEAR))\n\t{\n\t\to->hp = 1;\n\t\to->x = -(SCREEN_WIDTH << CSF);\n\t\treturn;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\t// script triggered us to initilize/appear\n\t\t// (there is a hvtrigger, right before player first walks by us\n\t\t// and sees us inactive, which sends us this ANP).\n\t\tcase STATE_X_APPEAR:\n\t\t{\n\t\t\tif (!X.initilized)\n\t\t\t{\n\t\t\t\tInit();\n\t\t\t\tX.initilized = true;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// script has triggered the fight to begin\n\t\tcase STATE_X_FIGHT_BEGIN:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_X_FIGHT_BEGIN+1:\n\t\t{\n\t\t\tif (++o->timer > 100)\n\t\t\t{\n\t\t\t\tFACEPLAYER;\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = STATE_X_TRAVEL;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// starts the treads and moves us in the currently-facing direction\n\t\tcase STATE_X_TRAVEL:\n\t\t{\n\t\t\t// count number of times we've traveled, we brake\n\t\t\t// and attack every third time.\n\t\t\to->timer2++;\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_X_TRAVEL+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// trigger the treads to start moving,\n\t\t\t// and put them slightly out of sync with each-other.\n\t\t\tfor(int i=0;i<4;i++)\n\t\t\t{\n\t\t\t\tif (o->timer == tread_turnon_times[i])\n\t\t\t\t{\n\t\t\t\t\ttreads[i]->state = STATE_TREAD_RUN;\n\t\t\t\t\ttreads[i]->dir = o->dir;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 120)\n\t\t\t{\n\t\t\t\t// time to attack? we attack every 3rd travel\n\t\t\t\t// if so skid to a stop, that's the first step.\n\t\t\t\tif (o->timer2 >= 3)\n\t\t\t\t{\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t\t\n\t\t\t\t\to->dir ^= 1;\n\t\t\t\t\to->state = STATE_X_BRAKE;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// passed player? skid and turn around.\n\t\t\t\t\tif ((o->dir == RIGHT && o->x > player->x) || \\\n\t\t\t\t\t \t(o->dir == LEFT  && o->x < player->x))\n\t\t\t\t\t{\n\t\t\t\t\t\to->dir ^= 1;\n\t\t\t\t\t\to->state = STATE_X_TRAVEL;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// skidding to a stop in preparation to attack\n\t\tcase STATE_X_BRAKE:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_X_BRAKE+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// trigger the treads to start braking,\n\t\t\t// and put them slightly out of sync with each-other.\n\t\t\tfor(int i=0;i<4;i++)\n\t\t\t{\n\t\t\t\tif (o->timer == tread_turnon_times[i])\n\t\t\t\t{\n\t\t\t\t\ttreads[i]->state = STATE_TREAD_BRAKE;\n\t\t\t\t\ttreads[i]->dir = o->dir;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = STATE_X_OPEN_DOORS;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// doors opening to attack\n\t\tcase STATE_X_OPEN_DOORS:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->savedhp = o->hp;\n\t\t\t\n\t\t\t// select type of attack depending on where we are in the battle\n\t\t\tif (!AllTargetsDestroyed())\n\t\t\t{\n\t\t\t\tSetStates(doors, 2, STATE_DOOR_OPENING);\n\t\t\t\to->state = STATE_X_FIRE_TARGETS;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSetStates(doors, 2, STATE_DOOR_OPENING_PARTIAL);\n\t\t\t\to->state = STATE_X_FIRE_FISHIES;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// firing targets (early battle)\n\t\tcase STATE_X_FIRE_TARGETS:\n\t\t{\n\t\t\tif (doors[0]->state == STATE_DOOR_FINISHED)\n\t\t\t{\n\t\t\t\tdoors[0]->state = 0;\n\t\t\t\tSetStates(targets, 4, STATE_TARGET_FIRE);\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 300 || AllTargetsDestroyed())\n\t\t\t{\n\t\t\t\to->state = STATE_X_CLOSE_DOORS;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// firing fishy missiles (late battle)\n\t\tcase STATE_X_FIRE_FISHIES:\n\t\t{\n\t\t\tif (doors[0]->state == STATE_DOOR_FINISHED)\n\t\t\t{\n\t\t\t\tdoors[0]->state = 0;\n\t\t\t\t\n\t\t\t\tSetStates(fishspawners, 4, STATE_FISHSPAWNER_FIRE);\n\t\t\t\tinternals->flags |= FLAG_SHOOTABLE;\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 300 || (o->savedhp - o->hp) > 200)\n\t\t\t{\n\t\t\t\to->state = STATE_X_CLOSE_DOORS;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// doors closing after attack\n\t\tcase STATE_X_CLOSE_DOORS:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t\t\n\t\t\tSetStates(doors, 2, STATE_DOOR_CLOSING);\n\t\t}\n\t\tcase STATE_X_CLOSE_DOORS+1:\n\t\t{\n\t\t\tif (doors[0]->state == STATE_DOOR_FINISHED)\n\t\t\t{\n\t\t\t\tdoors[0]->state = 0;\n\t\t\t\t\n\t\t\t\t// just turn off everything for both types of attacks;\n\t\t\t\t// turning off the attack type that wasn't enabled isn't harmful.\n\t\t\t\tSetStates(targets, 4, 0);\n\t\t\t\tSetStates(fishspawners, 4, 0);\n\t\t\t\tinternals->flags &= ~FLAG_SHOOTABLE;\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\tFACEPLAYER;\n\t\t\t\to->state = STATE_X_TRAVEL;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// exploding\n\t\tcase STATE_X_EXPLODING:\n\t\t{\n\t\t\tSetStates(fishspawners, 4, 0);\n\t\t\tKillObjectsOfType(OBJ_X_FISHY_MISSILE);\n\t\t\t\n\t\t\tStartScript(1000);\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_X_EXPLODING+1:\n\t\t{\n\t\t\tgame.quaketime = 2;\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif ((o->timer % 8) == 0)\n\t\t\t\tsound(SND_ENEMY_HURT_BIG);\n\t\t\t\n\t\t\tSmokePuff(o->CenterX() + (random(-72, 72) << CSF),\n\t\t\t\t\t  o->CenterY() + (random(-64, 64) << CSF));\n\t\t\t\n\t\t\tif (o->timer > 100)\n\t\t\t{\n\t\t\t\tstarflash.Start(o->CenterX(), o->CenterY());\n\t\t\t\tsound(SND_EXPLOSION1);\n\t\t\t\to->timer = 0;\n\t\t\t\to->state++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase STATE_X_EXPLODING+2:\n\t\t{\n\t\t\tgame.quaketime = 40;\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\tCreateObject(o->x, o->y - (24 << CSF), OBJ_X_DEFEATED);\n\t\t\t\tDeleteMonster();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// call AI for all tread pieces\n\tfor(i=0;i<4;i++)\n\t{\n\t\trun_tread(i);\n\t\trun_fishy_spawner(i);\n\t}\n}\n\n// moved this to aftermove so xinertia on treads is already applied\n// when we calculate the main object position.\nvoid XBoss::RunAftermove()\n{\nObject *o = mainobject;\nint i;\n\n\tif (!mainobject || mainobject->state == 0 || !X.initilized)\n\t\treturn;\n\t\n\t// main object pulled along as treads move\n\tint tread_center = (treads[UL]->x + treads[UR]->x + \\\n\t\t\t\t\t \ttreads[LL]->x + treads[LR]->x) / 4;\n\to->x += (tread_center - o->x) / 16;\n\t\n\trun_internals();\n\t\n\tfor(i=0;i<4;i++)\n\t{\n\t\trun_body(i);\n\t\trun_target(i);\n\t}\n\t\n\tfor(i=0;i<2;i++)\n\t{\n\t\trun_door(i);\n\t}\n}\n\nvoid ondeath_x_mainobject(Object *internals)\n{\n\t// do nothing really, this function is just there to override\n\t// the default so we are not destroyed--our 0 HP level will\n\t// be noticed in run_internals() and trigger the defeat sequence.\n\tinternals->flags &= ~FLAG_SHOOTABLE;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid XBoss::run_tread(int index)\n{\n\tObject *o = treads[index];\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->flags |= (FLAG_SOLID_BRICK | FLAG_INVULNERABLE | FLAG_NOREARTOPATTACK);\n\t\t\to->state = STATE_TREAD_STOPPED;\n\t\t}\n\t\tcase STATE_TREAD_STOPPED:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->damage = 0;\n\t\t\to->flags &= ~FLAG_BOUNCY;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_TREAD_RUN:\n\t\t{\n\t\t\to->flags |= FLAG_BOUNCY;\n\t\t\to->timer = 0;\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_TREAD_RUN+1:\n\t\t{\n\t\t\tANIMATE(0, 2, 3);\n\t\t\tXACCEL(0x20);\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_BOUNCY;\n\t\t\t\to->frame = 0;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->state++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase STATE_TREAD_RUN+2:\n\t\t{\n\t\t\tANIMATE(1, 0, 1);\n\t\t\tXACCEL(0x20);\n\t\t\t\n\t\t\to->timer++;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_TREAD_BRAKE:\n\t\t{\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->flags |= FLAG_BOUNCY;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_TREAD_BRAKE+1:\n\t\t{\n\t\t\tANIMATE(0, 2, 3);\n\t\t\tXACCEL(0x20);\n\t\t\t\n\t\t\tif ((o->dir == RIGHT && o->xinertia > 0) || \\\n\t\t\t\t(o->dir == LEFT && o->xinertia < 0))\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = STATE_TREAD_STOPPED;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// make motor noise\n\tswitch(o->state)\n\t{\n\t\tcase STATE_TREAD_RUN+1:\n\t\tcase STATE_TREAD_BRAKE+1:\n\t\t{\n\t\t\tif (o->timer & 1)\n\t\t\t\tsound(SND_MOTOR_SKIP);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_TREAD_RUN+2:\n\t\t{\n\t\t\tif ((o->timer % 4) == 1)\n\t\t\t\tsound(SND_MOTOR_RUN);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// determine if player is in a position where he could get run over.\n\tif (o->state > STATE_TREAD_STOPPED && o->xinertia != 0)\n\t{\n\t\tif (abs(player->y - o->CenterY()) <= (5 << CSF))\n\t\t\to->damage = 10;\n\t\telse\n\t\t\to->damage = 0;\n\t}\n\telse\n\t{\n\t\to->damage = 0;\n\t}\n\t\n\tLIMITX(0x400);\n}\n\nvoid XBoss::run_body(int i)\n{\n\t// set body position based on main object position and\n\t// our linked tread position. first get the center point we should be at...\n\tbody[i]->x = (mainobject->x + treads[i]->x) / 2;\n\tbody[i]->y = (mainobject->y + treads[i]->y) / 2;\n\t\n\t// ...and place our center pixel at those coordinates.\n\tint dx = (sprites[body[i]->sprite].w / 2) - 8;\n\tint dy = (sprites[body[i]->sprite].h / 2) - 8;\n\tbody[i]->x -= dx << CSF;\n\tbody[i]->y -= dy << CSF;\n\t\n\t// tweaks\n\tif (i == UL || i == LL)\n\t{\n\t\tbody[i]->x -= (6 << CSF);\n\t}\n\telse\n\t{\n\t\tbody[i]->x += (7 << CSF);\n\t}\n\t\n\tif (i == LL || i == LR)\n\t{\n\t\tbody[i]->y += (8 << CSF);\n\t}\n\n}\n\nvoid XBoss::run_internals()\n{\n\tinternals->x = mainobject->x;\n\tinternals->y = mainobject->y;\n\t\n\t// select frame\n\tif (internals->shaketime & 2)\n\t{\n\t\tinternals->frame = 1;\n\t}\n\telse\n\t{\n\t\tinternals->frame = (mainobject->state < 10) ? 2 : 0;\n\t}\n\t\n\t// link damage to main object\n\tif (internals->hp < 1000)\n\t{\n\t\tmainobject->DealDamage(1000 - internals->hp);\n\t\tinternals->hp = 1000;\n\t}\n\t\n\t// trigger explosion sequence when monster defeated\n\tif (mainobject->hp <= 0 && mainobject->state < STATE_X_EXPLODING)\n\t{\n\t\tmainobject->shaketime = 150;\n\t\tmainobject->state = STATE_X_EXPLODING;\n\t}\n}\n\nvoid XBoss::run_door(int index)\n{\n\tObject *o = doors[index];\n\t\n\tswitch(o->state)\n\t{\n\t\t// doors opening all the way\n\t\tcase STATE_DOOR_OPENING:\n\t\t{\n\t\t\to->xmark += (1 << CSF);\n\t\t\t\n\t\t\tif (o->xmark >= DOORS_OPEN_DIST)\n\t\t\t{\n\t\t\t\to->xmark = DOORS_OPEN_DIST;\n\t\t\t\to->state = STATE_DOOR_FINISHED;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// doors opening partially for fish-missile launchers to fire\n\t\tcase STATE_DOOR_OPENING_PARTIAL:\n\t\t{\n\t\t\to->xmark += (1 << CSF);\n\t\t\t\n\t\t\tif (o->xmark >= DOORS_OPEN_FISHY_DIST)\n\t\t\t{\n\t\t\t\to->xmark = DOORS_OPEN_FISHY_DIST;\n\t\t\t\to->state = STATE_DOOR_FINISHED;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// doors closing\n\t\tcase STATE_DOOR_CLOSING:\n\t\t{\n\t\t\to->xmark -= (1 << CSF);\n\t\t\tif (o->xmark <= 0)\n\t\t\t{\n\t\t\t\to->xmark = 0;\n\t\t\t\to->state = STATE_DOOR_FINISHED;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// this is a signal to the main object that the doors\n\t\t// are finished with the last command.\n\t\tcase STATE_DOOR_FINISHED:\n\t\tbreak;\n\t}\n\t\n\t// set position relative to main object.\n\t// doors open in opposite directions.\n\tif (o->dir == LEFT) o->x = (mainobject->x - o->xmark);\n\t\t\t\t   else o->x = (mainobject->x + o->xmark);\n\t\n\to->y = mainobject->y;\n}\n\nvoid XBoss::run_fishy_spawner(int index)\n{\n\tObject *o = fishspawners[index];\n\t\n\tswitch(o->state)\n\t{\n\t\tcase STATE_FISHSPAWNER_FIRE:\n\t\t{\n\t\t\to->timer = 20 + (index * 20);\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_FISHSPAWNER_FIRE+1:\n\t\t{\n\t\t\tif (o->timer)\n\t\t\t{\n\t\t\t\to->timer--;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// keep appropriate position relative to main object\n\t\t\t//                               UL          UR         LL         LR\n\t\t\tstatic const int xoffs[]   = { -64 <<CSF,  76 <<CSF, -64 <<CSF,  76 <<CSF };\n\t\t\tstatic const int yoffs[]   = {  27 <<CSF,  27 <<CSF, -16 <<CSF, -16 <<CSF };\n\t\t\to->x = (mainobject->x + xoffs[index]);\n\t\t\to->y = (mainobject->y + yoffs[index]);\n\t\t\t\n\t\t\tObject *missile = CreateObject(o->x, o->y, OBJ_X_FISHY_MISSILE);\n\t\t\tmissile->dir = index;\n\t\t\t\n\t\t\tsound(SND_EM_FIRE);\n\t\t\to->timer = 120;\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid XBoss::run_target(int index)\n{\n\tObject *o = targets[index];\n\t\n\t// has this target been destroyed?\n\t// (we don't really kill the object until the battle is over,\n\t// to avoid having to deal with dangling pointers).\n\tif (o->invisible)\n\t\treturn;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->frame &= 3;\n\t\t\to->state = 1;\n\t\tbreak;\n\t\t\n\t\tcase STATE_TARGET_FIRE:\n\t\t{\n\t\t\to->timer = 40 + (index * 10);\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_TARGET_FIRE+1:\n\t\t{\n\t\t\tif (--o->timer <= 16)\n\t\t\t{\n\t\t\t\t// flash shortly before firing\n\t\t\t\tif (o->timer & 2) o->frame |= 4;\n\t\t\t\t\t\t\t else o->frame &= 3;\n\t\t\t\t\n\t\t\t\tif (o->timer <= 0)\n\t\t\t\t{\n\t\t\t\t\to->timer = 40;\n\t\t\t\t\tEmFireAngledShot(o, OBJ_GAUDI_FLYING_SHOT, 2, 0x500);\n\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// keep appropriate position on internals\n\t//                               UL          UR         LL         LR\n\tstatic const int xoffs[] = { -22 <<CSF,  28 <<CSF, -15 <<CSF,  17 <<CSF };\n\tstatic const int yoffs[] = { -16 <<CSF, -16 <<CSF,  14 <<CSF,  14 <<CSF };\n\t\n\to->x = internals->x + xoffs[index];\n\to->y = internals->y + yoffs[index];\n}\n\nvoid ondeath_x_target(Object *o)\n{\n\tSmokeClouds(o, 8, 8, 8);\n\tsound(SND_LITTLE_CRASH);\n\t\n\to->flags &= ~FLAG_SHOOTABLE;\n\to->invisible = true;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid XBoss::Init()\n{\nint i;\n\n\tmainobject->hp = 700;\n\tmainobject->state = 1;\n\tmainobject->x = (128 * TILE_W) << CSF;\n\tmainobject->y = (200 << CSF);\n\tmainobject->flags = FLAG_IGNORE_SOLID;\n\t\n\t// put X behind the flying gaudis\n\tmainobject->PushBehind(lowestobject);\n\t\n\t// create body pieces\n\tfor(i=3;i>=0;i--)\n\t{\n\t\tbody[i] = CreatePiece(0, 0, OBJ_X_BODY);\n\t\tbody[i]->dir   = (i == UL || i == LL) ? LEFT : RIGHT;\n\t\tbody[i]->frame = (i == LL || i == LR) ? 1 : 0;\n\t}\n\t\n\t// create treads\n\tfor(i=0;i<4;i++)\n\t{\n\t\tint x = (i == UL || i == LL) ? 0xf8000 : 0x108000;\n\t\tint y = (i == UL || i == UR) ? 0x12000 : (0x20000 - (16 << CSF));\n\t\tint sprite = (i == UL || i == UR) ? SPR_X_TREAD_UPPER : SPR_X_TREAD_LOWER;\n\t\t\n\t\ttreads[i] = CreateTread(x, y, sprite);\n\t\ttreads[i]->smushdamage = 10;\n\t}\n\t\n\t// create internals\n\tinternals = CreatePiece(0, 0, OBJ_X_INTERNALS);\n\tinternals->hp = 1000;\n\tinternals->flags &= ~FLAG_SHOW_FLOATTEXT;\n\t\n\t// create targets\n\tfor(i=0;i<4;i++)\n\t{\n\t\ttargets[i] = CreatePiece(0, 0, OBJ_X_TARGET);\n\t\ttargets[i]->sprite = SPR_X_TARGETS;\n\t\ttargets[i]->frame = i;\n\t\ttargets[i]->hp = 60;\n\t\ttargets[i]->flags &= ~FLAG_SHOW_FLOATTEXT;\n\t}\n\t\n\t// create fishy-missile shooters\n\tfor(i=0;i<4;i++)\n\t{\n\t\tfishspawners[i] = CreatePiece(0, 0, OBJ_X_FISHY_SPAWNER);\n\t\tfishspawners[i]->sprite = SPR_NULL;\n\t\tfishspawners[i]->invisible = true;\n\t\tfishspawners[i]->flags = 0;\n\t}\n\t\n\t// create doors\n\tfor(i=0;i<2;i++)\n\t{\n\t\tdoors[i] = CreatePiece(0, 0, OBJ_X_DOOR);\n\t\tdoors[i]->sprite = SPR_X_DOOR;\n\t\tdoors[i]->dir = i;\n\t}\n\t\n\tsprites[SPR_X_DOOR].frame[0].dir[LEFT].drawpoint.x = 40;\n\tsprites[SPR_X_DOOR].frame[0].dir[LEFT].drawpoint.y = 16;\n\tsprites[SPR_X_DOOR].frame[0].dir[RIGHT].drawpoint.x = -9;\n\tsprites[SPR_X_DOOR].frame[0].dir[RIGHT].drawpoint.y = 16;\n}\n\n// create an object and record it as a piece of the monster\n// so we can delete all the pieces later via DeleteMonster().\nObject *XBoss::CreatePiece(int x, int y, int object)\n{\n\tObject *piece = CreateObject(x, y, object);\n\tpiecelist[npieces++] = piece;\n\tpiece->PushBehind(mainobject);\n\treturn piece;\n}\n\n// create an object of type OBJ_X_TREAD and give it the specified sprite.\nObject *XBoss::CreateTread(int x, int y, int sprite)\n{\n\tObject *tread = CreatePiece(x, y, OBJ_X_TREAD);\n\ttread->sprite = sprite;\n\treturn tread;\n}\n\n// delete all pieces of the monster\nvoid XBoss::DeleteMonster()\n{\n\tfor(int i=0;i<npieces;i++)\n\t\tpiecelist[i]->Delete();\n\t\n\tmainobject->Delete();\n\tmainobject = NULL;\n\tgame.stageboss.object = NULL;\n}\n\n// return true if all the targets behind the doors have been destroyed.\nbool XBoss::AllTargetsDestroyed()\n{\n\tfor(int i=0;i<4;i++)\n\t{\n\t\tif (!targets[i]->invisible)\n\t\t\treturn false;\n\t}\n\t\n\treturn true;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// sets state on an array on objects\nvoid XBoss::SetStates(Object *objects[], int nobjects, int state)\n{\n\tfor(int i=0;i<nobjects;i++)\n\t\tobjects[i]->state = state;\n}\n\n// sets direction on an array on objects\nvoid XBoss::SetDirs(Object *objects[], int nobjects, int dir)\n{\n\tfor(int i=0;i<nobjects;i++)\n\t\tobjects[i]->dir = dir;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_x_fishy_missile(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\tstatic const int angle_for_dirs[] = { 160, 224, 96, 32 };\n\t\t\n\t\to->angle = angle_for_dirs[o->dir];\n\t\to->dir = RIGHT;\n\t\t\n\t\to->state = 1;\n\t}\n\t\n\tvector_from_angle(o->angle, 0x400, &o->xinertia, &o->yinertia);\n\tint desired_angle = GetAngle(o->x, o->y, player->x, player->y);\n\t\n\tif (o->angle >= desired_angle)\n\t{\n\t\tif ((o->angle - desired_angle) < 128)\n\t\t{\n\t\t\to->angle--;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->angle++;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif ((o->angle - desired_angle) < 128)\n\t\t{\n\t\t\to->angle++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->angle--;\n\t\t}\n\t}\n\t\n\t// smoke trails\n\tif (++o->timer2 > 2)\n\t{\n\t\to->timer2 = 0;\n\t\tCaret *c = effect(o->ActionPointX(), o->ActionPointY(), EFFECT_SMOKETRAIL_SLOW);\n\t\tc->xinertia = -o->xinertia >> 2;\n\t\tc->yinertia = -o->yinertia >> 2;\n\t}\n\t\n\to->frame = (o->angle + 16) / 32;\n\tif (o->frame > 7) o->frame = 7;\n}\n\n\n// this is the cat that falls out after you defeat him\nvoid ai_x_defeated(Object *o)\n{\n\to->timer++;\n\tif ((o->timer % 4) == 0)\n\t{\n\t\tSmokeClouds(o, 1, 16, 16);\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tSmokeClouds(o, 8, 16, 16);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->xinertia = -0x100;\n\t\t\t}\n\t\t\t\n\t\t\t// three-position shake\n\t\t\to->x += (o->timer & 2) ? (1 << CSF) : -(1 << CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tif (o->y > (map.ysize * TILE_H) << CSF) o->Delete();\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n"
  },
  {
    "path": "ai/boss/x.fdh",
    "content": "//hash:b9080605\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in tsc.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nScriptInstance *StartScript(int scriptno, int pageno);\n\n\n/* located in trig.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys);\nuint8_t GetAngle(int curx, int cury, int tgtx, int tgty);\n\n\n/* located in ai/ai.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nObject *SmokePuff(int x, int y);\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in ai/boss/x.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nvoid ondeath_x_mainobject(Object *internals);\nvoid ondeath_x_target(Object *o);\nvoid ai_x_fishy_missile(Object *o);\nvoid ai_x_defeated(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//-------------------[referenced from ai/boss/x.cpp]-----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/boss/x.h",
    "content": "\n#ifndef _XBOSS_H\n#define _XBOSS_H\n\nenum XBDir\n{\n\tUL, UR, LL, LR\n};\n\nclass XBoss : public StageBoss\n{\npublic:\n\tvoid OnMapEntry();\n\tvoid OnMapExit();\n\tvoid Run();\n\tvoid RunAftermove();\n\t\nprivate:\n\tvoid run_tread(int index);\n\tvoid run_body(int index);\n\tvoid run_door(int index);\n\tvoid run_target(int index);\n\tvoid run_fishy_spawner(int index);\n\tvoid run_internals();\n\t\n\tbool AllTargetsDestroyed();\n\tvoid Init();\n\tObject *CreateTread(int x, int y, int sprite);\n\tObject *CreatePiece(int x, int y, int type);\n\t\n\tvoid SetStates(Object *objects[], int nobjects, int state);\n\tvoid SetDirs(Object *objects[], int nobjects, int dir);\n\t\n\tvoid DeleteMonster();\n\t\n\tObject *mainobject;\n\tObject *body[4];\n\tObject *treads[4];\n\tObject *internals;\n\tObject *doors[2];\n\tObject *targets[4];\n\tObject *fishspawners[4];\n\t\n\tObject *piecelist[24];\n\tint npieces;\n\t\n\tstruct\n\t{\n\t\tbool initilized;\n\t} X;\n};\n\n\n#endif\n"
  },
  {
    "path": "ai/egg/egg.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../weed/weed.fdh\"\n#include \"egg.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_CRITTER_HOPPING_GREEN, ai_critter);\n\t\n\tONTICK(OBJ_BASIL, ai_basil);\n\tONTICK(OBJ_BEHEMOTH, ai_behemoth);\n\t\n\tONTICK(OBJ_BEETLE_GREEN, ai_beetle_horiz);\n\tONTICK(OBJ_BEETLE_FREEFLY, ai_beetle_freefly);\n\t\n\tONTICK(OBJ_GIANT_BEETLE, ai_giant_beetle);\n\tONTICK(OBJ_GIANT_BEETLE_SHOT, ai_generic_angled_shot);\n\t\n\tONTICK(OBJ_FORCEFIELD, ai_forcefield);\n\tONTICK(OBJ_EGG_ELEVATOR, ai_egg_elevator);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_basil(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->x = player->x;\n\t\t\to->state = (o->dir == LEFT) ? 1 : 2;\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\t{\n\t\t\to->xinertia -= 0x40;\n\t\t\t\n\t\t\tif (o->blockl || ((player->x - o->x) >= (192 << CSF)))\n\t\t\t{\n\t\t\t\tif (o->blockl) o->xinertia = 0;\n\t\t\t\to->state = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\to->xinertia += 0x40;\n\t\t\t\n\t\t\tif (o->blockr || ((o->x - player->x) >= (192 << CSF)))\n\t\t\t{\n\t\t\t\tif (o->blockr) o->xinertia = 0;\n\t\t\t\to->state = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->xinertia > 0x80) o->dir = RIGHT;\n\tif (o->xinertia < -0x80) o->dir = LEFT;\n\tANIMATE(1, 0, 2);\n\tLIMITX(0x5ff);\n}\n\n\nvoid ai_behemoth(Object *o)\n{\n\tif (o->blockl) o->dir = RIGHT;\n\tif (o->blockr) o->dir = LEFT;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->nxflags |= NXFLAG_THUD_ON_RIDING;\n\t\t\to->damage = 1;\n\t\t}\n\t\tcase 1:\t\t// walking happily\n\t\t{\n\t\t\tXMOVE(0x100);\n\t\t\tANIMATE(8, 0, 3);\n\t\t\t\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\to->frame = 4;\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// grimace/hit\n\t\t{\n\t\t\to->xinertia *= 7;\n\t\t\to->xinertia /= 8;\n\t\t\t\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\t// player still picking on him?\n\t\t\t\tif (o->shaketime)\n\t\t\t\t{\n\t\t\t\t\to->state = 3;\n\t\t\t\t\to->frame = 6;\n\t\t\t\t\to->animtimer = 0;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\t\n\t\t\t\t\to->damage = 5;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = 1;\n\t\t\t\t\to->animtimer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// charge!\n\t\t{\n\t\t\tXMOVE(0x400);\n\t\t\tANIMATE(5, 5, 6);\n\t\t\t\n\t\t\tif (++o->timer > 200)\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_beetle_horiz(Object *o)\n{\n\tenum { FLYING = 0, ON_WALL = 1 };\n\t\n\tif (o->state == FLYING)\n\t{\n\t\tif (++o->animtimer == 2)\n\t\t{\n\t\t\to->animtimer = 0;\n\t\t\to->animframe ^= 1;\n\t\t}\n\t\t\n\t\to->frame = (o->animframe + 1);\n\t\t\n\t\tif (o->dir == RIGHT)\n\t\t{\n\t\t\to->xinertia += 0x50;\n\t\t\tif (o->xinertia > 0x32c) o->xinertia = 0x32c;\n\t\t\t\n\t\t\tif (o->blockr)\n\t\t\t{\n\t\t\t\to->dir = LEFT;\n\t\t\t\to->state = ON_WALL;\n\t\t\t\to->frame = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->xinertia -= 0x50;\n\t\t\tif (o->xinertia < -0x32c) o->xinertia = -0x32c;\n\t\t\t\n\t\t\tif (o->blockl)\n\t\t\t{\n\t\t\t\to->dir = RIGHT;\n\t\t\t\to->state = ON_WALL;\n\t\t\t\to->frame = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\t// waiting on wall\n\t\tif (abs(o->y - player->y) < (12<<CSF))\n\t\t{\n\t\t\tif ((o->dir == RIGHT && (player->x > o->x)) || \\\n\t\t\t\t(o->dir == LEFT && (player->x < o->x)))\n\t\t\t{\n\t\t\t\to->animframe = 0;\n\t\t\t\to->state = FLYING;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid ai_beetle_freefly(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->invisible = true;\n\t\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_SOLID_MUSHY);\n\t\t\to->damage = 0;\n\t\t\t\n\t\t\to->nxflags |= NXFLAG_SLOW_WHEN_HURT;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\t// has player made it to our position yet?\n\t\t\t// (we are invisible right now, our position on the map\n\t\t\t//  is a marker for when we should fly onto the screen)\n\t\t\tif (pdistlx(TILE_W << CSF))\n\t\t\t{\n\t\t\t\to->flags |= (FLAG_SHOOTABLE | FLAG_SOLID_MUSHY);\n\t\t\t\to->damage = 2;\n\t\t\t\to->invisible = false;\n\t\t\t\t\n\t\t\t\to->ymark = o->y;\n\t\t\t\to->yinertia = -0x100;\n\t\t\t\t\n\t\t\t\to->state = 2;\n\t\t\t\t\n\t\t\t\t// come on screen\n\t\t\t\tif (o->dir == LEFT)\n\t\t\t\t{\n\t\t\t\t\to->x = player->x + (256 << CSF);\n\t\t\t\t\to->xinertia = -0x2FF;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->x = player->x - (256 << CSF);\n\t\t\t\t\to->xinertia = 0x2FF;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\tANIMATE(1, 0, 1);\n\t\t\tXACCEL(0x10);\n\t\t\t\n\t\t\t// sinusoidal flight\n\t\t\tif (o->y > o->ymark)\n\t\t\t\to->yinertia -= 0x10;\n\t\t\telse\n\t\t\t\to->yinertia += 0x10;\n\t\t\t\n\t\t\tLIMITX(0x2FF);\n\t\t\tLIMITY(0x100);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_giant_beetle(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->invisible = true;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->damage = 0;\n\t\t\t\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t\to->timer2 = o->dir;\n\t\t\t\n\t\t\to->nxflags |= NXFLAG_SLOW_WHEN_HURT;\n\t\t\to->state = 1;\n\t\tcase 1:\n\t\t{\n\t\t\tif (pdistlx(TILE_W << CSF))\n\t\t\t{\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->damage = 6;\n\t\t\t\to->invisible = false;\n\t\t\t\t\n\t\t\t\to->yinertia = -0x100;\n\t\t\t\t\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tif (o->dir == LEFT)\n\t\t\t\t{\n\t\t\t\t\to->x = player->x + (256 << CSF);\n\t\t\t\t\to->xinertia = -0x2FF;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->x = player->x - (256 << CSF);\n\t\t\t\t\to->xinertia = 0x2FF;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\tXACCEL(0x10);\n\t\t\t\n\t\t\tif (o->blockl) o->xinertia = 0x200;\n\t\t\tif (o->blockr) o->xinertia = -0x200;\n\t\t\t\n\t\t\t// sinusoidal flight\n\t\t\tif (o->y > o->ymark)\n\t\t\t\to->yinertia -= 0x08;\n\t\t\telse\n\t\t\t\to->yinertia += 0x08;\n\t\t\t\n\t\t\tLIMITX(0x2FF);\n\t\t\tLIMITY(0x100);\n\t\t\t\n\t\t\t// if player runs too far away from us reset to our\n\t\t\t// waiting state and original position.\n\t\t\tif (!pdistlx((SCREEN_WIDTH + 80) << CSF))\n\t\t\t{\n\t\t\t\to->state = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t\t\n\t\t\t\to->x = o->xmark;\n\t\t\t\t//o->y = o->ymark;\n\t\t\t\to->dir = o->timer2;\n\t\t\t}\n\t\t\t\n\t\t\t// animate wings. must do it this way instead of\n\t\t\t// using ANIMATE(), so that the frame>1 is only checked\n\t\t\t// when animtimer overflows, else flashing-before-fire\n\t\t\t// will get messed up.\n\t\t\tif (++o->animtimer > 1)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\tif (++o->frame > 1)\n\t\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer >= 150)\n\t\t\t{\n\t\t\t\t// flashing before fire\n\t\t\t\tif (o->frame == 1)\n\t\t\t\t\to->frame = 2;\n\t\t\t\t\n\t\t\t\t// after a bit of flashing, fire\n\t\t\t\tif (o->timer >= 158)\n\t\t\t\t{\n\t\t\t\t\tif (pdistlx(0x14000))\n\t\t\t\t\t{\n\t\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t\t\tEmFireAngledShot(o, OBJ_GIANT_BEETLE_SHOT, 2, 0x400);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// lift in Egg Observation Room\nvoid ai_egg_elevator(Object *o)\n{\n\t// assume not moving\n\to->yinertia = 0;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// set wrong in npc.tbl, at least for our engine\n\t\t\to->flags &= ~FLAG_SOLID_MUSHY;\n\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t\t\n\t\t\to->state = 1;\n\t\t}\t// fall thru\n\t\tcase 1:\n\t\tcase 3:\n\t\tcase 5:\n\t\tcase 7:\n\t\t{\n\t\t\tif (++o->timer > 150)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\tcase 4:\n\t\tcase 6:\n\t\tcase 8:\n\t\t{\n\t\t\tif (++o->timer > (TILE_H * 4))\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tif (++o->state > 8)\n\t\t\t\t\to->state = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->yinertia = \\\n\t\t\t\t\t(o->state > 5) ? 0x200 : -0x200;\n\t\t\t\t\n\t\t\t\tANIMATE(1, 0, 1);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n\nvoid ai_forcefield(Object *o)\n{\n\t// need to reinforce these or you can walk through the\n\t// spawned forcefield that blocks exit from Igor battle\n\to->flags |= (FLAG_SOLID_BRICK | FLAG_INVULNERABLE);\n\t\n\tai_animate1(o);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/egg/egg.fdh",
    "content": "//hash:b9ee0abd\n//automatically generated by Makegen\n\n/* located in trig.cpp */\n\n//------------------[referenced from ai/egg/egg.cpp]-----------------//\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//------------------[referenced from ai/egg/egg.cpp]-----------------//\nvoid ai_animate1(Object *o);\n\n\n/* located in ai/egg/egg.cpp */\n\n//------------------[referenced from ai/egg/egg.cpp]-----------------//\nvoid ai_basil(Object *o);\nvoid ai_behemoth(Object *o);\nvoid ai_beetle_horiz(Object *o);\nvoid ai_beetle_freefly(Object *o);\nvoid ai_giant_beetle(Object *o);\nvoid ai_egg_elevator(Object *o);\nvoid ai_forcefield(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//------------------[referenced from ai/egg/egg.cpp]-----------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/egg/egg2.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../weed/weed.fdh\"\n#include \"egg.fdh\"\n#include \"egg2.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_CRITTER_HOPPING_AQUA, ai_critter);\n\t\n\tONTICK(OBJ_BEETLE_FREEFLY_2, ai_beetle_freefly);\n\tONTICK(OBJ_GIANT_BEETLE_2, ai_giant_beetle);\n\t\n\tONTICK(OBJ_DRAGON_ZOMBIE, ai_dragon_zombie);\n\tONTICK(OBJ_DRAGON_ZOMBIE_SHOT, ai_generic_angled_shot);\n\t\n\tONTICK(OBJ_FALLING_SPIKE_SMALL, ai_falling_spike_small);\n\tONTICK(OBJ_FALLING_SPIKE_LARGE, ai_falling_spike_large);\n\t\n\tONTICK(OBJ_COUNTER_BOMB, ai_counter_bomb);\n\tONTICK(OBJ_COUNTER_BOMB_NUMBER, ai_counter_bomb_number);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_dragon_zombie(Object *o)\n{\n\tif (o->hp < 950 && o->state < 50)\n\t{\n\t\tsound(SND_BIG_CRASH);\n\t\tSmokeClouds(o, 8, 4, 4);\n\t\to->SpawnPowerups();\n\t\t\n\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\to->damage = 0;\n\t\t\n\t\to->frame = 5;\t// dead\n\t\to->state = 50;\t// dead\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\tcase 1:\t\t// ready\n\t\t{\n\t\t\tANIMATE(30, 0, 1);\n\t\t\t\n\t\t\tif (--o->timer < 0)\t\t// can fire again yet?\n\t\t\t{\n\t\t\t\tif (pdistlx(112 << CSF))\t// player in range?\n\t\t\t\t{\n\t\t\t\t\to->state = 2;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// flashing, prepare to fire\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\to->timer++;\n\t\t\to->frame = (o->timer & 2) ? 2 : 3;\n\t\t\t\n\t\t\tif (o->timer > 30)\n\t\t\t\to->state = 3;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\n\t\t{\n\t\t\to->state = 4;\n\t\t\to->timer = 0;\n\t\t\to->frame = 4;\n\t\t\t\n\t\t\t// save point we'll fire at--these enemies don't update\n\t\t\t// the position of their target for each shot\n\t\t\to->xmark = player->x;\n\t\t\to->ymark = player->y;\n\t\t}\n\t\tcase 4:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer < 40 && (o->timer % 8) == 1)\n\t\t\t{\n\t\t\t\tObject *fire = SpawnObjectAtActionPoint(o, OBJ_DRAGON_ZOMBIE_SHOT);\n\t\t\t\tThrowObject(fire, o->xmark, o->ymark, 6, 0x600);\n\t\t\t\t\n\t\t\t\tsound(SND_SNAKE_FIRE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 60)\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = random(100, 200);\t// random time till can fire again\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_falling_spike_small(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xmark = o->x;\n\t\t\t\n\t\t\tif (pdistlx(12 << CSF))\n\t\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// shaking\n\t\t{\n\t\t\tif (++o->animtimer >= 12)\n\t\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->x = o->xmark;\n\t\t\tif (o->animtimer >= 6) o->x += (1 << CSF);\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = 2;\t// fall\n\t\t\t\to->frame = 1;\t// slightly brighter frame at top\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// falling\n\t\t{\n\t\t\to->yinertia += 0x20;\n\t\t\tLIMITY(0xC00);\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\tif (!player->inputs_locked)\t// no sound in ending cutscene\n\t\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\t\n\t\t\t\tSmokeClouds(o, 4, 2, 2);\n\t\t\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_falling_spike_large(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xmark = o->x;\n\t\t\t\n\t\t\tif (pdistlx(12 << CSF))\n\t\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// shaking\n\t\t{\n\t\t\tif (++o->animtimer >= 12)\n\t\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->x = o->xmark;\n\t\t\tif (o->animtimer >= 6)\t// scuttle:: big spikes shake in the other direction\n\t\t\t\to->x -= (1 << CSF);\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = 2;\t// fall\n\t\t\t\to->frame = 1;\t// slightly brighter frame at top\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// falling\n\t\t{\n\t\t\to->yinertia += 0x20;\n\t\t\tLIMITY(0xC00);\n\t\t\t\n\t\t\tif (o->Bottom() < player->Bottom())\n\t\t\t{\t// could fall on player\n\t\t\t\to->flags &= ~FLAG_SOLID_BRICK;\n\t\t\t\to->damage = 127;\t// ouch!\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// player could only touch side from this position\n\t\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t\t\to->damage = 0;\n\t\t\t}\n\t\t\t\n\t\t\t// damage NPC's as well (it kills that one Dragon Zombie)\n\t\t\tObject *enemy;\n\t\t\tFOREACH_OBJECT(enemy)\n\t\t\t{\n\t\t\t\tif ((enemy->flags & FLAG_SHOOTABLE) && \\\n\t\t\t\t\to->Bottom() >= enemy->CenterY() && hitdetect(o, enemy))\n\t\t\t\t{\n\t\t\t\t\tif (!(enemy->flags & FLAG_INVULNERABLE))\n\t\t\t\t\t\tenemy->DealDamage(127);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 8 && o->blockd)\n\t\t\t{\n\t\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t\t\to->damage = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t\t\n\t\t\t\to->state = 3;\t// fall complete\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\tSmokeClouds(o, 4, 2, 2);\n\t\t\t\t\n\t\t\t\teffect(o->CenterX(), o->y + (sprites[o->sprite].block_d[0].y << CSF),\n\t\t\t\t\tEFFECT_STARSOLID);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// hit ground\n\t\t{\n\t\t\tif (++o->timer > 4)\n\t\t\t{\t// make it destroyable\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\to->state = 4;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_counter_bomb(Object *o)\n{\n\t/*debug(\"state: %d\", o->state);\n\tdebug(\"timer: %d\", o->timer);\n\tdebug(\"timer2: %d\", o->timer2);*/\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->ymark = o->y;\n\t\t\t\n\t\t\to->timer = random(0, 50);\n\t\t\to->timer2 = 0;\n\t\t}\n\t\tcase 1:\n\t\t{\t// desync if multiple enemies\n\t\t\tif (--o->timer < 0)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 2;\n\t\t\t\to->yinertia = 0x300;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// ready\n\t\t{\n\t\t\tif (pdistlx(80 << CSF) || o->shaketime)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// counting down...\n\t\t{\n\t\t\tif (--o->timer < 0)\n\t\t\t{\n\t\t\t\tif (o->timer2 < 5)\n\t\t\t\t{\n\t\t\t\t\tObject *number = CreateObject(o->CenterX() + (8 << CSF), \\\n\t\t\t\t\t\t\t\t\t\t\t\t  o->y + (16 << CSF), \\\n\t\t\t\t\t\t\t\t\t\t\t\t  OBJ_COUNTER_BOMB_NUMBER);\n\t\t\t\t\t\n\t\t\t\t\tnumber->frame = o->timer2++;\n\t\t\t\t\to->timer = 60;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// expand bounding box to cover explosion area\n\t\t\t\t\to->x = o->CenterX();\n\t\t\t\t\to->y = o->CenterY();\n\t\t\t\t\to->invisible = true;\n\t\t\t\t\to->sprite = SPR_BBOX_PUPPET_1;\n\t\t\t\t\tsprites[o->sprite].bbox.x1 = -128;\n\t\t\t\t\tsprites[o->sprite].bbox.y1 = -100;\n\t\t\t\t\tsprites[o->sprite].bbox.x2 = 128;\n\t\t\t\t\tsprites[o->sprite].bbox.y2 = 100;\n\t\t\t\t\to->damage = 30;\n\t\t\t\t\t\n\t\t\t\t\to->yinertia = 0;\n\t\t\t\t\to->state = 4;\n\t\t\t\t\t\n\t\t\t\t\t// make kaboom\n\t\t\t\t\tsound(SND_EXPLOSION1);\n\t\t\t\t\tquake(20);\n\t\t\t\t\tSmokeXY(o->CenterX(), o->CenterY(), 100, 128, 100);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\t\t// exploding (one frame only to give time for bbox to damage player)\n\t\t\to->Delete();\n\t\t\treturn;\n\t}\n\t\n\tANIMATE(4, 0, 2);\n\t\n\tif (o->state == 2 || o->state == 3)\n\t{\n\t\to->yinertia += (o->y > o->ymark) ? -0x10 : 0x10;\n\t\tLIMITY(0x100);\n\t}\n}\n\nvoid ai_counter_bomb_number(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tsound(SND_COMPUTER_BEEP);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->x += (1 << CSF);\n\t\t\tif (++o->timer > 8)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/egg/egg2.fdh",
    "content": "//hash:88c9cad7\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//------------------[referenced from ai/egg/egg2.cpp]----------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//------------------[referenced from ai/egg/egg2.cpp]----------------//\nbool hitdetect(Object *o1, Object *o2);\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//------------------[referenced from ai/egg/egg2.cpp]----------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//------------------[referenced from ai/egg/egg2.cpp]----------------//\nvoid ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//------------------[referenced from ai/egg/egg2.cpp]----------------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\n\n\n/* located in ai/egg/egg2.cpp */\n\n//------------------[referenced from ai/egg/egg2.cpp]----------------//\nvoid ai_dragon_zombie(Object *o);\nvoid ai_falling_spike_small(Object *o);\nvoid ai_falling_spike_large(Object *o);\nvoid ai_counter_bomb(Object *o);\nvoid ai_counter_bomb_number(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//------------------[referenced from ai/egg/egg2.cpp]----------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//------------------[referenced from ai/egg/egg2.cpp]----------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//------------------[referenced from ai/egg/egg2.cpp]----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/egg/igor.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"igor.fdh\"\n\n#define IGOR_DEFEAT_FRAME\t\t12\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_NPC_IGOR, ai_npc_igor);\n\t\n\tONTICK(OBJ_BOSS_IGOR, ai_boss_igor);\n\tONTICK(OBJ_IGOR_SHOT, ai_generic_angled_shot);\n\t\n\tONTICK(OBJ_BOSS_IGOR_DEFEATED, ai_boss_igor_defeated);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// cutscene igor\nvoid ai_npc_igor(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// init, standing/panting\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->state = 1;\n\t\tcase 1:\n\t\t\tANIMATE(5, 0, 1);\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// walking\n\t\t\to->state = 3;\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\tcase 3:\n\t\t\tANIMATE(3, 2, 5);\n\t\t\tXMOVE(0x200);\n\t\tbreak;\n\t\t\n\t\tcase 4:\t\t// punch\n\t\t\to->xinertia = 0;\n\t\t\to->state = 5;\n\t\t\to->timer = 0;\n\t\tcase 5:\n\t\t\to->frame = 6;\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 6;\n\t\t\t\tsound(SND_EXPL_SMALL);\n\t\t\t}\n\t\tbreak;\n\t\tcase 6:\n\t\t\to->frame = 7;\n\t\t\tif (++o->timer > 8)\n\t\t\t{\n\t\t\t\to->state = 0;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 7:\n\t\t\to->state = 1;\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5FF);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// boss-fight igor\nvoid ai_boss_igor(Object *o)\n{\n\tenum\n\t{\n\t\tSTATE_INIT = 0,\n\t\tSTATE_STAND,\n\t\t\n\t\tSTATE_BEGIN_ATTACK,\n\t\tSTATE_WALK,\n\t\t\n\t\tSTATE_JUMPING,\n\t\tSTATE_LANDED,\n\t\t\n\t\tSTATE_PUNCH,\n\t\tSTATE_PUNCH_2,\n\t\tSTATE_PUNCH_3,\n\t\t\n\t\tSTATE_MOUTH_BLAST,\n\t\tSTATE_MOUTH_BLAST_2\n\t};\n\t\n\tswitch(o->state)\n\t{\n\t\tcase STATE_INIT:\n\t\t{\n\t\t\to->damage = 0;\n\t\t\to->xinertia = 0;\n\t\t\t\n\t\t\to->state = STATE_STAND;\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase STATE_STAND:\n\t\t{\n\t\t\tANIMATE(5, 0, 1);\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = STATE_BEGIN_ATTACK;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_BEGIN_ATTACK:\n\t\t{\n\t\t\to->state = STATE_WALK;\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\to->igor.fireattack = false;\n\t\t\t\n\t\t\t// when health is less than halfway, then use\n\t\t\t// the mouth blast attack every third time.\n\t\t\tif (++o->timer2 >= 3 && \\\n\t\t\t\to->hp <= (objprop[o->type].initial_hp / 2))\n\t\t\t{\n\t\t\t\to->timer2 = 0;\n\t\t\t\to->igor.fireattack = true;\n\t\t\t\to->dir ^= 1;\t// walk away from player\n\t\t\t}\n\t\t\t\n\t\t}\t// fall thru\n\t\tcase STATE_WALK:\n\t\t{\n\t\t\tANIMATE(3, 2, 5);\n\t\t\tXMOVE(0x200);\n\t\t\t\n\t\t\tif (o->igor.fireattack)\n\t\t\t{\t// begin mouth-blast attack\n\t\t\t\tif (++o->timer > 16)\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_MOUTH_BLAST;\n\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\to->frame = 10;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->dir == LEFT)\n\t\t\t\t{\n\t\t\t\t\tif (o->x <= player->x + player->Width())\n\t\t\t\t\t\to->state = STATE_PUNCH;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (o->x + o->Width() >= player->x)\n\t\t\t\t\t\to->state = STATE_PUNCH;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if we don't reach him after a while, do a jump\n\t\t\t\tif (++o->timer > 50)\n\t\t\t\t{\n\t\t\t\t\to->frame = 10;\n\t\t\t\t\to->yinertia = -0x400;\n\t\t\t\t\to->state = STATE_JUMPING;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\t\n\t\t\t\t\to->xinertia *= 2;\n\t\t\t\t\to->xinertia /= 3;\n\t\t\t\t\t\n\t\t\t\t\to->damage = 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_PUNCH:\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\t\n\t\t\to->state = STATE_PUNCH_2;\n\t\t\to->frame = 6;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase STATE_PUNCH_2:\n\t\t{\n\t\t\tif (++o->timer > 12)\n\t\t\t{\n\t\t\t\tsound(SND_EXPL_SMALL);\n\t\t\t\t\n\t\t\t\t// sprite appears identical, but has a wider bounding box.\n\t\t\t\to->sprite = SPR_IGOR_PUNCHING;\n\t\t\t\to->damage = 5;\n\t\t\t\t\n\t\t\t\to->state = STATE_PUNCH_3;\n\t\t\t\to->frame = 7;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase STATE_PUNCH_3:\n\t\t{\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->state = STATE_INIT;\n\t\t\t\to->frame = 0;\n\t\t\t\to->damage = 0;\n\t\t\t\t\n\t\t\t\t// return to normal-size bounding box\n\t\t\t\to->sprite = SPR_IGOR;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_JUMPING:\n\t\t{\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\tsound(SND_QUAKE);\n\t\t\t\tSmokeSide(o, 4, DOWN);\n\t\t\t\t\n\t\t\t\to->state = STATE_LANDED;\n\t\t\t\to->frame = 11;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_LANDED:\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->state = STATE_INIT;\n\t\t\t\to->frame = 0;\n\t\t\t\to->damage = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_MOUTH_BLAST:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_MOUTH_BLAST_2:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// flash mouth\n\t\t\to->frame = 8;\n\t\t\tif (o->timer > 50 && (o->timer & 2))\n\t\t\t\to->frame = 9;\n\t\t\t\n\t\t\t// fire shots\n\t\t\tif (o->timer > 100)\n\t\t\t{\n\t\t\t\tif ((o->timer % 6) == 1)\n\t\t\t\t{\n\t\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\t\tObject *shot = SpawnObjectAtActionPoint(o, OBJ_IGOR_SHOT);\n\t\t\t\t\t\n\t\t\t\t\tint angle = (o->dir == LEFT) ? 136 : 248;\n\t\t\t\t\tangle += random(-16, 16);\n\t\t\t\t\tThrowObjectAtAngle(shot, angle, 0x580);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (o->timer > 132)\t\t// fires 6 shots\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_INIT;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\nvoid ai_boss_igor_defeated(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->frame = IGOR_DEFEAT_FRAME;\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\tsound(SND_BIG_CRASH);\n\t\t\t\n\t\t\tSmokeBoomUp(o);\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\t{\n\t\t\tif ((++o->timer % 5) == 0)\n\t\t\t\tsmoke_puff(o, false);\n\t\t\t\n\t\t\to->display_xoff = 0;\n\t\t\tif (o->timer & 2)\n\t\t\t\to->display_xoff = -1;\n\t\t\t\n\t\t\tif (o->timer > 100)\n\t\t\t{\n\t\t\t\to->xmark = o->x;\n\t\t\t\to->ymark = o->y;\n\t\t\t\t\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tif ((++o->timer % 9) == 0)\n\t\t\t\tsmoke_puff(o, false);\n\t\t\t\n\t\t\t// alternate between big and small sprites\n\t\t\t// (frenzied/not-frenzied forms)\n\t\t\tif (o->timer & 2)\n\t\t\t{\n\t\t\t\to->sprite = SPR_IGOR_DEFEATED;\n\t\t\t\to->frame = 0;\n\t\t\t\t\n\t\t\t\tif (o->dir == LEFT)\n\t\t\t\t\to->x = o->xmark + (12 << CSF);\n\t\t\t\telse\n\t\t\t\t\to->x = o->xmark + (2 << CSF);\n\t\t\t\t\n\t\t\t\to->y = o->ymark + (12 << CSF);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->sprite = SPR_IGOR;\n\t\t\t\to->frame = IGOR_DEFEAT_FRAME;\n\t\t\t\t\n\t\t\t\to->x = o->xmark;\n\t\t\t\to->y = o->ymark;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 150)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\n\t\t{\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame++;\n\t\t\t\t\n\t\t\t\tif (o->frame >= 2)\n\t\t\t\t\to->state = 4;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->frame == 0 && (o->timer % 16) == 0)\n\t\t\t\tsmoke_puff(o, false);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4: break;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\nstatic void smoke_puff(Object *o, bool initial)\n{\nObject *smoke;\n\n\tsmoke = CreateObject(o->CenterX() + random(-16<<CSF, 16<<CSF),\n\t\t\t\t\t\t o->CenterY() + random(-16<<CSF, 16<<CSF),\n\t\t\t\t\t\t OBJ_SMOKE_CLOUD);\n\t\n\tif (initial)\n\t{\n\t\tsmoke->xinertia = random(-0x155, 0x155);\n\t\tsmoke->yinertia = random(-0x600, 0);\n\t}\n\telse\n\t{\n\t\tsmoke->xinertia = random(-0x600, 0x600);\n\t\tsmoke->yinertia = random(-0x600, 0x600);\n\t}\n}\n"
  },
  {
    "path": "ai/egg/igor.fdh",
    "content": "//hash:2a6475dd\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//------------------[referenced from ai/egg/igor.cpp]----------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in trig.cpp */\n\n//------------------[referenced from ai/egg/igor.cpp]----------------//\nvoid ThrowObjectAtAngle(Object *o, uint8_t angle, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//------------------[referenced from ai/egg/igor.cpp]----------------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\n\n\n/* located in ai/egg/igor.cpp */\n\n//------------------[referenced from ai/egg/igor.cpp]----------------//\nvoid ai_npc_igor(Object *o);\nvoid ai_boss_igor(Object *o);\nvoid ai_boss_igor_defeated(Object *o);\nstatic void smoke_puff(Object *o, bool initial);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//------------------[referenced from ai/egg/igor.cpp]----------------//\nvoid SmokeSide(Object *o, int nclouds, int dir);\nvoid SmokeBoomUp(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//------------------[referenced from ai/egg/igor.cpp]----------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//------------------[referenced from ai/egg/igor.cpp]----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/final_battle/balcony.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"balcony.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_HELICOPTER, ai_helicopter);\n\tONTICK(OBJ_HELICOPTER_BLADE, ai_helicopter_blade);\n\t\n\tONTICK(OBJ_IGOR_BALCONY, ai_igor_balcony);\n\t\n\tONTICK(OBJ_FALLING_BLOCK, ai_falling_block);\n\tONTICK(OBJ_FALLING_BLOCK_SPAWNER, ai_falling_block_spawner);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_helicopter(Object *o)\n{\nObject *b;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// stopped\n\t\t{\n\t\t\tb = CreateObject(o->x + (26<<CSF) - (56<<CSF), o->y - (9<<CSF) - (48<<CSF), OBJ_HELICOPTER_BLADE);\n\t\t\tb->sprite = SPR_HELICOPTER_BLADE_1;\n\t\t\tb->linkedobject = o;\n\t\t\t\n\t\t\tb = CreateObject(o->x - (4<<CSF) - (56<<CSF), o->y - (4<<CSF) - (48<<CSF), OBJ_HELICOPTER_BLADE);\n\t\t\tb->sprite = SPR_HELICOPTER_BLADE_2;\n\t\t\tb->linkedobject = o;\n\t\t\t\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// blades running\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// blades running, spawn momorin\n\t\t{\n\t\t\tCreateObject(o->x + (45<<CSF) - (56<<CSF), o->y + (34<<CSF) - (48<<CSF), OBJ_MOMORIN)->dir = LEFT;\n\t\t\t\n\t\t\to->dir = RIGHT;\t\t// open hatch\n\t\t\to->state = 31;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// blades running, spawn momorin, santa, and chako (from credits)\n\t\t{\n\t\t\tCreateObject(o->x + (47<<CSF) - (56<<CSF), o->y + (34<<CSF) - (48<<CSF), OBJ_MOMORIN)->dir = LEFT;\n\t\t\tCreateObject(o->x + (34<<CSF) - (56<<CSF), o->y + (34<<CSF) - (48<<CSF), OBJ_SANTA)->dir = LEFT;\n\t\t\tCreateObject(o->x + (21<<CSF) - (56<<CSF), o->y + (34<<CSF) - (48<<CSF), OBJ_CHACO)->dir = LEFT;\n\t\t\t\n\t\t\to->dir = RIGHT;\t\t// open hatch\n\t\t\to->state = 41;\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_helicopter_blade(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\tcase 1:\n\t\t{\n\t\t\tif (o->linkedobject && o->linkedobject->state >= 20)\n\t\t\t\to->state = 10;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\tANIMATE(0, 0, 3);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_igor_balcony(Object *o)\n{\n\tif (!pdistlx(SCREEN_WIDTH<<CSF) && !pdistly(SCREEN_HEIGHT<<CSF))\n\t{\n\t\to->state = 1;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(20, 0, 1);\n\t\t\t\n\t\t\tif ((pdistlx(112<<CSF) && pdistly2(48<<CSF, 112<<CSF)) || o->shaketime)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t\t// walking towards player\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tANIMATE(4, 2, 5);\n\t\t\tXMOVE(0x200);\n\t\t\t\n\t\t\tif ((o->dir == RIGHT && o->blockr) || \\\n\t\t\t\t(o->dir == LEFT && o->blockl) || \\\n\t\t\t\tpdistlx(64<<CSF))\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = 20;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// prepare to jump...\n\t\t{\n\t\t\to->frame = 11;\t// jump-prepare frame\n\t\t\t\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->state = 21;\n\t\t\t\to->yinertia = -0x5ff;\n\t\t\t\tXMOVE(0x200);\n\t\t\t\tsound(SND_IGOR_JUMP);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 21:\t// jumping\n\t\t{\n\t\t\to->frame = 10;\t// in-air frame\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\tquake(20);\n\t\t\t\to->xinertia = 0;\n\t\t\t\t\n\t\t\t\to->state = 22;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 11;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 22:\t// landed\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t\to->state = 30;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// mouth-blast attack\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->timer = 0;\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// flash mouth\n\t\t\to->frame = 8;\n\t\t\tif (o->timer < 50 && (o->timer & 2))\n\t\t\t\to->frame = 9;\n\t\t\t\n\t\t\t// fire shots\n\t\t\tif (o->timer > 30)\n\t\t\t{\n\t\t\t\tif ((o->timer % 4) == 1)\n\t\t\t\t{\n\t\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\t\tObject *shot = SpawnObjectAtActionPoint(o, OBJ_IGOR_SHOT);\n\t\t\t\t\t\n\t\t\t\t\tint angle = (o->dir == LEFT) ? 136 : 248;\n\t\t\t\t\tangle += random(-16, 16);\n\t\t\t\t\tThrowObjectAtAngle(shot, angle, 0x580);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 82)\n\t\t\t{\n\t\t\t\tFACEPLAYER;\n\t\t\t\to->state = 10;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x33;\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_falling_block_spawner(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// wait till player leaves \"safe zone\" at start of Balcony\n\t\t// does nothing in Hell--you enter from the left.\n\t\tcase 0:\n\t\t{\n\t\t\tif (player->x < MAPX(map.xsize - 6))\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = 24;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\t{\n\t\t\tif (--o->timer < 0)\n\t\t\t{\n\t\t\t\tObject *block;\n\t\t\t\tint x;\n\t\t\t\t\n\t\t\t\t// blocks tend to follow behind the player--this goes along\n\t\t\t\t// with the text that tells you to run so as not to get squashed.\n\t\t\t\tif (player->equipmask & EQUIP_BOOSTER20)\n\t\t\t\t{\n\t\t\t\t\tx = (player->x + MAPX(4));\n\t\t\t\t\tif (x < MAPX(26)) x = MAPX(26);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = (player->x + MAPX(6));\n\t\t\t\t\tif (x < MAPX(23)) x = MAPX(23);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (x > MAPX(map.xsize - 10))\n\t\t\t\t\tx = MAPX(map.xsize - 10);\n\t\t\t\t\n\t\t\t\tif (player->equipmask & EQUIP_BOOSTER20)\n\t\t\t\t{\n\t\t\t\t\tx += ((random(-14, 14) * TILE_W) << CSF);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx += ((random(-11, 11) * TILE_H) << CSF);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tblock = CreateObject(x, (player->y - MAPY(14)), OBJ_FALLING_BLOCK);\n\t\t\t\tblock->dir = random(0, 1) ? LEFT : RIGHT;\t// small/big blocks\n\t\t\t\t\n\t\t\t\to->timer = random(9, 24);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_falling_block(Object *o)\n{\n\to->damage = (player->Top() > o->CenterY()) ? 10 : 0;\n\t//debug(\"Falling Block State %d\", o->state);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tbool in_hell = (game.curmap == STAGE_HELL2);\n\t\t\t\n\t\t\tswitch(o->dir)\n\t\t\t{\n\t\t\t\tcase LEFT:\t\t\t\t// large Hell or Balcony block\n\t\t\t\t{\n\t\t\t\t\to->sprite = (in_hell) ? SPR_HELL_BLOCK_LARGE : SPR_BALCONY_BLOCK_LARGE;\n\t\t\t\t\to->flags |= (FLAG_INVULNERABLE | FLAG_IGNORE_SOLID);\n\t\t\t\t\to->state = 10;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase RIGHT:\t\t\t\t// small Hell or Balcony block\n\t\t\t\t{\n\t\t\t\t\to->sprite = (in_hell) ? SPR_HELL_BLOCK_SMALL : SPR_BALCONY_BLOCK_SMALL;\n\t\t\t\t\to->flags |= (FLAG_INVULNERABLE | FLAG_IGNORE_SOLID);\n\t\t\t\t\to->state = 10;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase DOWN:\t\t\t\t// Misery-spawned block\n\t\t\t\t{\n\t\t\t\t\to->state = 1;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\to->dir = 0;\t\t// there is actually only one dir on sprite\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t// just spawned by Misery--pause a moment\n\t\t{\n\t\t\tif (++o->timer > 3)\n\t\t\t{\n\t\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\t\to->state = 10;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// falling\n\t\t{\t// allow to pass thru Hell/Balcony ceiling\n\t\t\tif (o->y > 128<<CSF)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\to->state = 11;\n\t\t\t}\n\t\t}\n\t\tcase 11:\t// passed thru ceiling in Hell B2\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x700);\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->yinertia = -0x200;\n\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\to->state = 20;\n\t\t\t\t\n\t\t\t\tSmokeSide(o, 4, DOWN);\n\t\t\t\tquake(10);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// already bounced on ground, falling offscreen\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x700);\n\t\t\t\n\t\t\tif (o->y > ((map.ysize * TILE_H) << CSF))\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/final_battle/balcony.fdh",
    "content": "//hash:3e8a2223\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//------------[referenced from ai/final_battle/balcony.cpp]----------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//------------[referenced from ai/final_battle/balcony.cpp]----------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in trig.cpp */\n\n//------------[referenced from ai/final_battle/balcony.cpp]----------//\nvoid ThrowObjectAtAngle(Object *o, uint8_t angle, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//------------[referenced from ai/final_battle/balcony.cpp]----------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\n\n\n/* located in ai/final_battle/balcony.cpp */\n\n//------------[referenced from ai/final_battle/balcony.cpp]----------//\nvoid ai_helicopter(Object *o);\nvoid ai_helicopter_blade(Object *o);\nvoid ai_igor_balcony(Object *o);\nvoid ai_falling_block_spawner(Object *o);\nvoid ai_falling_block(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//------------[referenced from ai/final_battle/balcony.cpp]----------//\nvoid SmokeSide(Object *o, int nclouds, int dir);\n\n\n/* located in sound/sound.cpp */\n\n//------------[referenced from ai/final_battle/balcony.cpp]----------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//------------[referenced from ai/final_battle/balcony.cpp]----------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/final_battle/doctor.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"doctor.h\"\n#include \"doctor.fdh\"\n\n/*\n\tFrom King's Table, here's the Doctor's first form.\n\tHe teleports around the room firing red wave shots at you with\n\tthe Red Crystal following him. After every fourth teleport, he\n\tsubstitutes the wave attack for a aerial \"explosion\" of bouncy\n\tred shots (OBJ_DOCTOR_BLAST).\n*/\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BOSS_DOCTOR, ai_boss_doctor);\n\tAFTERMOVE(OBJ_RED_CRYSTAL, aftermove_red_crystal);\n\t\n\tONTICK(OBJ_DOCTOR_SHOT, ai_doctor_shot);\n\tONTICK(OBJ_DOCTOR_SHOT_TRAIL, ai_doctor_shot_trail);\n\t\n\tONTICK(OBJ_DOCTOR_BLAST, ai_doctor_blast);\n\t\n\tONTICK(OBJ_DOCTOR_CROWNED, ai_doctor_crowned);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_boss_doctor(Object *o)\n{\n\t//AIDEBUG;\n\t\n\t/*if (o->state > 2 && o->state < 500)\n\t{\n\t\to->state = 937;\n\t\tStartScript(410);\n\t\treturn;\n\t}*/\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->y += (8 << CSF);\n\t\t\to->frame = 3;\n\t\t\to->state = 1;\n\t\t\to->BringToFront();\t\t// make sure in front of doctor_crowned\n\t\t\tcrystal_tofront = true;\t// make sure front crystal is in front of us\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// transforming (script)\n\t\t{\n\t\t\to->timer++;\n\t\t\to->frame = (o->timer & 2) ? 0 : 3;\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t\to->state = 10;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// base state/falling (script)\n\t\t{\n\t\t\to->yinertia += 0x80;\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->damage = 3;\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 0;\n\t\t\t\t\n\t\t\t\to->savedhp = o->hp;\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// fire wave shot\n\t\tcase 20:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer < 50)\n\t\t\t{\n\t\t\t\tif ((o->hp - o->savedhp) > 20)\n\t\t\t\t\to->timer = 50;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer == 50)\n\t\t\t{\t// arm across chest\n\t\t\t\tFACEPLAYER;\n\t\t\t\to->frame = 4;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer == 80)\n\t\t\t{\n\t\t\t\tObject *shot;\n\t\t\t\to->frame = 5;\t// arm cast out\n\t\t\t\t\n\t\t\t\tshot = SpawnObjectAtActionPoint(o, OBJ_DOCTOR_SHOT);\n\t\t\t\tshot->dir = o->dir;\n\t\t\t\tshot->angle = 0;\n\t\t\t\t\n\t\t\t\tshot = SpawnObjectAtActionPoint(o, OBJ_DOCTOR_SHOT);\n\t\t\t\tshot->dir = o->dir;\n\t\t\t\tshot->angle = 0x80;\n\t\t\t\t\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer == 120)\n\t\t\t\to->frame = 0;\t// arm down\n\t\t\t\n\t\t\tif (o->timer > 130)\n\t\t\t{\n\t\t\t\tif ((o->hp - o->savedhp) > 50)\n\t\t\t\t{\n\t\t\t\t\to->state = 100;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (o->timer > 160)\n\t\t\t\t{\n\t\t\t\t\to->state = 100;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// big \"explosion\" blast\n\t\tcase 30:\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->timer = 0;\n\t\t\to->frame = 6;\n\t\t\to->xmark = o->x;\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\to->x = o->xmark;\n\t\t\tif (++o->timer & 2) o->x += (1 << CSF);\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 32;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 7;\n\t\t\t\t\n\t\t\t\tsound(SND_LIGHTNING_STRIKE);\n\t\t\t\t\n\t\t\t\tfor(int angle=8;angle<256;angle+=16)\n\t\t\t\t{\n\t\t\t\t\tObject *shot = SpawnObjectAtActionPoint(o, OBJ_DOCTOR_BLAST);\n\t\t\t\t\tThrowObjectAtAngle(shot, angle, 0x400);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase 32:\t// after blast\n\t\t{\n\t\t\tif (++o->timer > 50)\n\t\t\t\to->state = 100;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// teleport away\n\t\tcase 100:\n\t\t{\n\t\t\to->state = 101;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->damage = 0;\n\t\t\t\n\t\t\tdr_tp_out_init(o);\n\t\t}\n\t\tcase 101:\n\t\t{\n\t\t\tif (dr_tp_out(o))\n\t\t\t{\n\t\t\t\to->state = 102;\n\t\t\t\to->timer = 0;\n\t\t\t\to->invisible = true;\n\t\t\t\t\n\t\t\t\t// decide where we're going to go now, so the red crystal\n\t\t\t\t// can start moving towards it. But, it's important not to\n\t\t\t\t// actually move until the last possible second, or we could\n\t\t\t\t// drag our floattext along with us (and give away our position).\n\t\t\t\to->xmark = (random(5, 35) * TILE_W) << CSF;\n\t\t\t\to->ymark = (random(5, 7) * TILE_H) << CSF;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 102:\t// invisible: waiting to reappear\n\t\t{\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\to->state = 103;\n\t\t\t\to->timer = 16;\n\t\t\t\to->frame = 2;\n\t\t\t\to->yinertia = 0;\n\t\t\t\t\n\t\t\t\to->x = o->xmark;\n\t\t\t\to->y = o->ymark;\n\t\t\t\t\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// tp back in\n\t\tcase 103:\n\t\t{\n\t\t\to->state++;\n\t\t\tdr_tp_in_init(o);\n\t\t}\n\t\tcase 104:\n\t\t{\n\t\t\tif (dr_tp_in(o))\n\t\t\t{\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->damage = 3;\n\t\t\t\t\n\t\t\t\tif (++o->timer2 >= 4)\n\t\t\t\t{\t// big explode\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t\to->state = 30;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t// another wave shot\n\t\t\t\t\to->state = 10;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// defeated!\n\t\tcase 500:\n\t\t{\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->frame = 6;\n\t\t\t\n\t\t\t// fall to earth\n\t\t\to->yinertia += 0x10;\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->state = 501;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\to->xmark = o->x;\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 501:\t// flashing (transforming into Doctor 2)\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->frame = 8;\n\t\t\t\n\t\t\to->x = o->xmark;\n\t\t\tif (!(++o->timer & 2))\n\t\t\t\to->x += (1 << CSF);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// enable per-frame bbox\n\tCOPY_PFBOX;\n\t\n\t// set crystal follow position\n\tif (o->state >= 10)\n\t{\n\t\tif (o->invisible)\t// teleporting\n\t\t{\n\t\t\tcrystal_xmark = o->xmark;\n\t\t\tcrystal_ymark = o->ymark;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcrystal_xmark = o->x;\n\t\t\tcrystal_ymark = o->y;\n\t\t}\n\t}\n\t\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// wave shot\nvoid ai_doctor_shot(Object *o)\n{\n\tif (o->x < 0 || o->x > ((map.xsize * TILE_W) << CSF))\n\t{\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\t// distance apart from each other\n\t\t\tif (o->timer2 < 128)\n\t\t\t\to->timer2++;\n\t\t\t\n\t\t\t// spin\n\t\t\to->angle += 6;\n\t\t\t\n\t\t\t// travel\n\t\t\to->speed += (o->dir == LEFT) ? -0x15 : 0x15;\n\t\t\to->xmark += o->speed;\n\t\t\t\n\t\t\to->x = o->xmark + (xinertia_from_angle(o->angle, o->timer2<<CSF) / 8);\n\t\t\to->y = o->ymark + (yinertia_from_angle(o->angle, o->timer2<<CSF) / 2);\n\t\t\t\n\t\t\tObject *trail = CreateObject(o->x, o->y, OBJ_DOCTOR_SHOT_TRAIL);\n\t\t\ttrail->sprite = SPR_DOCTOR_SHOT;\n\t\t\ttrail->frame = 1;\n\t\t\ttrail->PushBehind(o);\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_doctor_shot_trail(Object *o)\n{\n\tANIMATE_FWD(3);\n\tif (o->frame > 3)\n\t\to->Delete();\n}\n\n// from his \"explosion\" attack\nvoid ai_doctor_blast(Object *o)\n{\n\t// they're bouncy\n\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t(o->blockr && o->xinertia > 0))\n\t{\n\t\to->xinertia = -o->xinertia;\n\t}\n\t\n\tif (o->blockd && o->yinertia > 0)\n\t\to->yinertia = -0x200;\n\t\n\tif (o->blocku && o->yinertia < 0)\n\t\to->yinertia = 0x200;\n\t\n\tANIMATE(0, 0, 1);\n\t\n\tif ((++o->timer % 4) == 1)\n\t\tCreateObject(o->x, o->y, OBJ_DOCTOR_SHOT_TRAIL)->PushBehind(o);\n\t\n\tif (o->timer > 250)\n\t\to->Delete();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// The Doctor's red crystal.\n// There are actually two, one is behind him and one is in front\n// and they alternate visibility as they spin around him so it looks 3D.\n//\n// This function has to be an aftermove, otherwise, because one is in front\n// and the other behind, one will be checking crystal_xmark before the Doctor\n// updates it, and the other afterwards, and they will get out of sync.\nvoid aftermove_red_crystal(Object *o)\n{\n\tANIMATE(3, 0, 1);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tif (crystal_xmark != 0)\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\tcrystal_tofront = true;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\t{\n\t\t\to->xinertia += (o->x < crystal_xmark) ? 0x55 : -0x55;\n\t\t\to->yinertia += (o->y < crystal_ymark) ? 0x55 : -0x55;\n\t\t\tLIMITX(0x400);\n\t\t\tLIMITY(0x400);\n\t\t\t\n\t\t\tif ((o->dir == LEFT && o->xinertia > 0) || \\\n\t\t\t\t(o->dir == RIGHT && o->xinertia < 0))\n\t\t\t{\n\t\t\t\to->invisible = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->invisible = false;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (crystal_tofront && o->dir == LEFT)\n\t{\n\t\to->BringToFront();\n\t\tcrystal_tofront = false;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// doctor as npc before fight\nvoid ai_doctor_crowned(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// do this manually instead of a spawn point,\n\t\t\t// cause he's gonna transform.\n\t\t\to->x -= (8 << CSF);\n\t\t\to->y -= (16 << CSF);\n\t\t\t\n\t\t\to->state = 1;\n\t\t\tcrystal_xmark = crystal_ymark = 0;\n\t\t\tcrystal_tofront = true;\n\t\t}\n\t\tcase 1:\t\t// faces away\n\t\t{\n\t\t\to->frame = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// goes \"ho ho ho\" (while still facing away)\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->timer = 0;\n\t\t\to->state = 11;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tANIMATE(5, 0, 1);\n\t\t\t// he has to show shrug frame exactly 6 times.\n\t\t\t// ANIMATE(5) changes frame on every 6th tick\n\t\t\t// so this is 6*6*nframes(2) = 72\n\t\t\tif (++o->timer >= 72)\n\t\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// turns around (faces screen instead of away)\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->frame = 2;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// arm up--presents red crystal\n\t\t{\n\t\t\to->state = 41;\n\t\t\t\n\t\t\t// spawn the red crystal\n\t\t\t// one is for when it's behind him, the other is in front.\n\t\t\tint x = o->x - (6 << CSF);\n\t\t\tint y = o->y - (8 << CSF);\n\t\t\t\n\t\t\tdr_create_red_crystal(x, y);\n\t\t}\n\t\tcase 41:\n\t\t{\n\t\t\to->frame = 4;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 50:\t// \"ho ho ho\" (while facing player)\n\t\t{\n\t\t\to->frame = 4;\n\t\t\to->animtimer = 0;\n\t\t\to->timer = 0;\n\t\t\to->state = 51;\n\t\t}\n\t\tcase 51:\n\t\t{\n\t\t\tANIMATE(5, 4, 5);\n\t\t\tif (++o->timer >= 72)\n\t\t\t\to->state = 41;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n"
  },
  {
    "path": "ai/final_battle/doctor.fdh",
    "content": "//hash:40ec33bf\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//------------[referenced from ai/final_battle/doctor.cpp]-----------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in trig.cpp */\n\n//------------[referenced from ai/final_battle/doctor.cpp]-----------//\nvoid ThrowObjectAtAngle(Object *o, uint8_t angle, int speed);\nint xinertia_from_angle(uint8_t angle, int speed);\nint yinertia_from_angle(uint8_t angle, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//------------[referenced from ai/final_battle/doctor.cpp]-----------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\n\n\n/* located in ai/final_battle/doctor.cpp */\n\n//------------[referenced from ai/final_battle/doctor.cpp]-----------//\nvoid ai_boss_doctor(Object *o);\nvoid ai_doctor_shot(Object *o);\nvoid ai_doctor_shot_trail(Object *o);\nvoid ai_doctor_blast(Object *o);\nvoid aftermove_red_crystal(Object *o);\nvoid ai_doctor_crowned(Object *o);\n\n\n/* located in ai/final_battle/doctor_common.cpp */\n\n//------------[referenced from ai/final_battle/doctor.cpp]-----------//\nvoid dr_tp_out_init(Object *o);\nbool dr_tp_out(Object *o);\nvoid dr_tp_in_init(Object *o);\nbool dr_tp_in(Object *o);\nObject *dr_create_red_crystal(int x, int y);\n\n\n/* located in sound/sound.cpp */\n\n//------------[referenced from ai/final_battle/doctor.cpp]-----------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//------------[referenced from ai/final_battle/doctor.cpp]-----------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/final_battle/doctor.h",
    "content": "\n#ifndef _DOCTOR_H\n#define _DOCTOR_H\n\nextern int crystal_xmark, crystal_ymark;\nextern bool crystal_tofront;\n\n\n#endif\n"
  },
  {
    "path": "ai/final_battle/doctor_common.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"doctor_common.fdh\"\n\nint crystal_xmark, crystal_ymark;\nbool crystal_tofront;\n\n\nObject *dr_create_red_crystal(int x, int y)\n{\nObject *upper_xtal;\n\n\t// we have to create these with the one which will bring itself to front\n\t// already having higher zorder (create it 2nd), because the code to\n\t// run aftermoves currently doesn't create a list first and so running\n\t// BringToFront from an aftermove can cause it's AI to be executed twice.\n\t\t\t\t  CreateObject(x, y, OBJ_RED_CRYSTAL)->dir = RIGHT;\n\t(upper_xtal = CreateObject(x, y, OBJ_RED_CRYSTAL))->dir = LEFT;\n\t\n\treturn upper_xtal;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid dr_tp_out_init(Object *o)\n{\n\to->ResetClip();\n\to->clip_enable = true;\n\t\n\tsound(SND_TELEPORT);\n\to->shaketime = 0;\t// show any waiting damage numbers NOW\n}\n\nbool dr_tp_out(Object *o)\n{\n\to->clipy1 += 2;\n\to->clipy2 -= 2;\n\t\n\tif (o->clipy1 >= o->clipy2)\n\t{\n\t\to->clip_enable = false;\n\t\to->invisible = true;\n\t\t\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid dr_tp_in_init(Object *o)\n{\n\to->clipy1 = o->clipy2 = (sprites[o->sprite].h / 2);\n\to->clip_enable = true;\n\to->invisible = false;\n}\n\nbool dr_tp_in(Object *o)\n{\n\to->clipy1 -= 2;\n\to->clipy2 += 2;\n\t\n\tif (o->clipy1 <= 0 || o->clipy2 >= sprites[o->sprite].h)\n\t{\n\t\to->clip_enable = false;\n\t\to->ResetClip();\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}\n\n\n"
  },
  {
    "path": "ai/final_battle/doctor_common.fdh",
    "content": "//hash:aec4f409\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//---------[referenced from ai/final_battle/doctor_common.cpp]-------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in ai/final_battle/doctor_common.cpp */\n\n//---------[referenced from ai/final_battle/doctor_common.cpp]-------//\nObject *dr_create_red_crystal(int x, int y);\nvoid dr_tp_out_init(Object *o);\nbool dr_tp_out(Object *o);\nvoid dr_tp_in_init(Object *o);\nbool dr_tp_in(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//---------[referenced from ai/final_battle/doctor_common.cpp]-------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/final_battle/doctor_frenzied.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"doctor.h\"\n#include \"doctor_frenzied.fdh\"\n\nenum STATES\n{\n\t// 0-9 are used by in-game scripts during intro\n\t// 500+ is triggered for defeat sequence\n\t\n\tSTATE_BASE\t\t\t\t= 10,\t\t// fall; once on ground for a moment pick next attack\n\t\n\tSTATE_JUMP\t\t\t\t= 20,\t\t// jumps at player\n\tSTATE_JUMP_WITH_GP\t\t= 30,\t\t// taller jump and enable \"ground pound\"\n\tSTATE_IN_AIR\t\t\t= 40,\t\t// in air\n\tSTATE_IN_AIR_WITH_GP\t= 50,\t\t// in air and will \"ground pound\" if passes over player\n\tSTATE_LANDED\t\t\t= 60,\t\t// landed from a jump\n\t\n\tSTATE_RED_DASH\t\t\t= 70,\t\t// red dash; try to hit player with elbow\n\tSTATE_MEGA_BATS\t\t\t= 80,\t\t// arms out & spawn mega bats\n\t\n\tSTATE_TELEPORT\t\t\t= 90,\t\t// teleport away and reappear over players head\n\t\n\tSTATE_DEFEATED\t\t\t= 500,\t\t// script constant\n\tSTATE_DISSOLVE\t\t\t= 510\t\t// also scripted\n};\n\n#define DAMAGE_NORMAL\t\t5\n#define DAMAGE_RED_DASH\t\t10\n\n// the Doctor repeats this series of attacks over and over,\n// when he reaches the -1, it starts over at the beginning.\nstatic const int attack_pattern[] =\n{\n\tSTATE_JUMP_WITH_GP,\n\tSTATE_TELEPORT,\n\tSTATE_RED_DASH,\n\tSTATE_JUMP,\n\tSTATE_JUMP,\n\tSTATE_RED_DASH,\n\tSTATE_TELEPORT,\n\tSTATE_MEGA_BATS,\n\tSTATE_JUMP_WITH_GP,\n\tSTATE_JUMP,\n\tSTATE_JUMP,\n\t-1\n};\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BOSS_DOCTOR_FRENZIED, ai_boss_doctor_frenzied);\n\tONTICK(OBJ_DOCTOR_BAT, ai_doctor_bat);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_boss_doctor_frenzied(Object *o)\n{\n\t//AIDEBUG;\n\t\n\tswitch(o->state)\n\t{\n\t\t// fight begin/base state\n\t\tcase STATE_BASE:\n\t\t{\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 1;\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->savedhp = o->hp;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_BASE+1:\n\t\t{\n\t\t\to->yinertia += 0x80;\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\t// select frame\n\t\t\tif (o->frame == 6)\t// arms out\n\t\t\t{\n\t\t\t\t// must have done \"redsplode\" attack; leave alone for the duration\n\t\t\t}\n\t\t\telse if (!o->blockd)\n\t\t\t{\t// falling\n\t\t\t\to->frame = 4;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// panting animation\n\t\t\t\tANIMATE(10, 1, 2);\n\t\t\t\t\n\t\t\t\t// \"redsplode\" attack if possible\n\t\t\t\tif ((o->savedhp - o->hp) > 20)\n\t\t\t\t{\n\t\t\t\t\tif (pdistlx(48<<CSF) && player->blockd)\n\t\t\t\t\t\tdo_redsplode(o);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// after a moment select next attack in the loop\n\t\t\tif (++o->timer > 30 || (o->savedhp - o->hp) > 20)\n\t\t\t{\n\t\t\t\to->state = attack_pattern[o->timer2];\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\t// move to next state\n\t\t\t\tif (attack_pattern[++o->timer2] == -1)\n\t\t\t\t\to->timer2 = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\trun_jumps(o);\n\t\n\trun_red_dash(o);\n\trun_mega_bats(o);\n\trun_teleport(o);\n\trun_init(o);\n\trun_defeat(o);\n\t\n\tif (o->state < STATE_DISSOLVE)\n\t\trun_red_drip(o);\n\t\n\t// set crystal follow position\n\t// still set it on first 2 DEFEATED states (falling to ground)\n\t// but not after that (alert: this seems pretty damn bug prone, fixme)\n\tif (o->state >= STATE_BASE && o->state <= STATE_DEFEATED+1)\n\t{\n\t\tif (o->invisible)\t// in middle of teleport: after tp out, before tp in\n\t\t{\n\t\t\tcrystal_xmark = o->xmark;\n\t\t\tcrystal_ymark = o->ymark;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcrystal_xmark = o->x;\n\t\t\tcrystal_ymark = o->y;\n\t\t}\n\t}\n\t\n\tif (o->yinertia > 0x5ff)\n\t\to->yinertia = 0x5ff;\n}\n\n\nstatic void run_jumps(Object *o)\n{\n\t\n\tswitch(o->state)\n\t{\n\t\t// jump at player\n\t\tcase STATE_JUMP:\n\t\t{\n\t\t\to->frame = 3;\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->state = STATE_IN_AIR;\n\t\t\t\to->frame = 4;\n\t\t\t\to->animtimer = 0;\n\t\t\t\t\n\t\t\t\to->yinertia = -0x600;\n\t\t\t\tXMOVE(0x400);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// slight taller jump with no delay, and can \"ground pound\"\n\t\tcase STATE_JUMP_WITH_GP:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\to->state = STATE_IN_AIR_WITH_GP;\n\t\t\to->frame = 4;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->yinertia = -0x800;\n\t\t\tXMOVE(0x400);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase STATE_IN_AIR:\t\t\t// in air (normal)\n\t\tcase STATE_IN_AIR_WITH_GP:\t// in air; can \"ground pound\" if we pass over player\n\t\t{\n\t\t\tANIMATE(1, 4, 5);\n\t\t\to->yinertia += 0x40;\n\t\t\t\n\t\t\tif (o->state == STATE_IN_AIR_WITH_GP)\n\t\t\t{\n\t\t\t\tif (pdistlx(8<<CSF) && player->y >= o->y)\n\t\t\t\t{\n\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\to->yinertia = 0x5ff;\n\t\t\t\t\to->state = STATE_IN_AIR;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia > 0)\n\t\t\t\to->state = STATE_LANDED;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\t// landed from jump\n\t\tcase STATE_LANDED:\n\t\t{\n\t\t\to->frame = 3;\n\t\t\tquake(10);\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_LANDED+1:\n\t\t{\n\t\t\to->yinertia += 0x80;\n\t\t\t\n\t\t\to->xinertia *= 7;\n\t\t\to->xinertia /= 8;\n\t\t\t\n\t\t\tif (++o->timer > 10)\n\t\t\t\to->state = STATE_BASE;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// flashing red elbow dash\nstatic void run_red_dash(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// prepare to dash\n\t\tcase STATE_RED_DASH:\n\t\t{\n\t\t\to->frame = 3;\t// crouch down; look mean\n\t\t\to->flags |= (FLAG_SOLID_MUSHY | FLAG_INVULNERABLE);\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_RED_DASH+1:\n\t\t{\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->frame = 7;\t\t// elbow-out dash frame\n\t\t\t\to->timer = 0;\n\t\t\t\to->state++;\n\t\t\t\t\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\tXMOVE(0x5ff);\n\t\t\t\t\n\t\t\t\to->damage = DAMAGE_RED_DASH;\n\t\t\t\to->flags |= FLAG_NOREARTOPATTACK;\n\t\t\t\to->yinertia = 0;\t// he does not fall during dash\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// doing red dash\n\t\tcase STATE_RED_DASH+2:\n\t\t{\n\t\t\t// flash red\n\t\t\to->timer++;\n\t\t\to->frame = (o->timer & 2) ? 7 : 8;\n\t\t\t\n\t\t\t// time to stop?\n\t\t\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t\t\t(o->blockr && o->xinertia > 0) || \\\n\t\t\t\to->timer > 30)\n\t\t\t{\n\t\t\t\tif (o->timer > 30)\t\t// stopped because timeout\n\t\t\t\t\to->state++;\n\t\t\t\telse\t\t\t\t\t// stopped because hit a wall\n\t\t\t\t\to->state = STATE_JUMP;\n\t\t\t\t\n\t\t\t\to->flags &= ~(FLAG_SOLID_MUSHY | FLAG_NOREARTOPATTACK | FLAG_INVULNERABLE);\n\t\t\t\to->damage = DAMAGE_NORMAL;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// dash ending due to timeout\n\t\tcase STATE_RED_DASH+3:\n\t\t{\n\t\t\to->yinertia += 0x80;\n\t\t\to->frame = 3;\n\t\t\t\n\t\t\to->xinertia *= 7;\n\t\t\to->xinertia /= 8;\n\t\t\t\n\t\t\tif (++o->timer > 10)\n\t\t\t\to->state = STATE_BASE;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// arms thrust out, spawn oodles of bouncing bats\nstatic void run_mega_bats(Object *o)\n{\n\n\tswitch(o->state)\n\t{\n\t\tcase STATE_MEGA_BATS:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase STATE_MEGA_BATS+1:\n\t\t{\n\t\t\to->frame = 6;\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer > 20 && (o->timer % 3) == 1)\n\t\t\t{\n\t\t\t\tObject *bat = CreateObject(o->x + (8<<CSF), \\\n\t\t\t\t\t\t\t\t\t\t   o->y - (4<<CSF), OBJ_DOCTOR_BAT);\n\t\t\t\t\n\t\t\t\tbat->xinertia = random(0x400, 0x800);\n\t\t\t\tbat->yinertia = random(-0x200, 0x200);\n\t\t\t\tbat->dir = o->dir;\n\t\t\t\t\n\t\t\t\tif (o->dir == LEFT)\n\t\t\t\t{\n\t\t\t\t\tbat->x -= (16 << CSF);\n\t\t\t\t\tbat->xinertia = -bat->xinertia;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 90)\n\t\t\t\to->state = STATE_BASE;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// teleport away and return\nstatic void run_teleport(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase STATE_TELEPORT:\n\t\t{\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->damage = 0;\n\t\t\t\n\t\t\to->state++;\n\t\t\tdr_tp_out_init(o);\n\t\t}\n\t\tcase STATE_TELEPORT+1:\n\t\t{\n\t\t\tif (dr_tp_out(o))\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\t// mark the location above player's head where we'll reappear\n\t\t\t\to->xmark = player->x;\n\t\t\t\to->ymark = player->y - (32<<CSF);\n\t\t\t\t\n\t\t\t\t// don't be fooled into going off bounds of map\n\t\t\t\t#define TP_X_MIN\t((4 * TILE_W) << CSF)\n\t\t\t\t#define TP_X_MAX\t((36 * TILE_W) << CSF)\n\t\t\t\t#define TP_Y_MIN\t((4 * TILE_W) << CSF)\n\t\t\t\t\n\t\t\t\tif (o->xmark < TP_X_MIN) o->xmark = TP_X_MIN;\n\t\t\t\tif (o->xmark > TP_X_MAX) o->xmark = TP_X_MAX;\n\t\t\t\tif (o->ymark < TP_Y_MIN) o->ymark = TP_Y_MIN;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// invisible...waiting to reappear\n\t\tcase STATE_TELEPORT+2:\n\t\t{\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\to->x = o->xmark;\n\t\t\t\to->y = o->ymark;\n\t\t\t\to->frame = 4;\n\t\t\t\t\n\t\t\t\tFACEPLAYER;\n\t\t\t\t\n\t\t\t\to->state++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// reappear\n\t\tcase STATE_TELEPORT+3:\n\t\t{\n\t\t\tdr_tp_in_init(o);\n\t\t\to->yinertia = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_TELEPORT+4:\n\t\t{\n\t\t\tif (dr_tp_in(o))\n\t\t\t{\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->damage = DAMAGE_NORMAL;\n\t\t\t\t\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = -0x200;\n\t\t\t\to->state = STATE_IN_AIR;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// initilization/transformation animation and \"prepare to fight\" states.\n// this are of course all script-triggered and need to stay constant.\nstatic void run_init(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// put ourselves at correct position over the other doctor\n\t\t\to->dir = (crystal_xmark > player->x) ? LEFT : RIGHT;\n\t\t\t\n\t\t\to->x = crystal_xmark + ((o->dir == RIGHT) ? (6<<CSF) : -(6<<CSF));\n\t\t\to->y = crystal_ymark;\n\t\t\t\n\t\t\t// make sure we're front of other doctor\n\t\t\to->BringToFront();\n\t\t\t// make sure front crystal is in front of us\n\t\t\tcrystal_tofront = true;\n\t\t\t\n\t\t\t// because we moved our x/y directly\n\t\t\to->UpdateBlockStates(ALLDIRMASK);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\t\t// appearing/transforming\n\t\t{\n\t\t\to->yinertia += 0x80;\n\t\t\t\n\t\t\to->timer++;\n\t\t\to->frame = (o->timer & 2) ? 0 : 3;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// standing idle & panting\n\t\t// this state doesn't seem to ever be used;\n\t\t// AFAIK can only be triggered by modifying the script.\n\t\tcase 5:\n\t\t{\n\t\t\to->frame = 1;\n\t\t\to->animtimer = 0;\n\t\t\to->state = 6;\n\t\t}\n\t\tcase 6:\n\t\t{\n\t\t\to->yinertia += 0x80;\n\t\t\tANIMATE(30, 1, 2);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 7: \t// prepare-to-fight pause\n\t\t{\n\t\t\to->state = 8;\n\t\t\to->timer = 0;\n\t\t\to->frame = 3;\n\t\t}\n\t\tcase 8:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\t\n\t\t\tif (++o->timer > 40)\n\t\t\t\to->state = STATE_BASE;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// defeated states and animation\nstatic void run_defeat(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// Defeated!\n\t\tcase STATE_DEFEATED:\n\t\t{\n\t\t\tKillObjectsOfType(OBJ_DOCTOR_BAT);\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->damage = 0;\n\t\t\to->frame = 4;\n\t\t\to->xinertia = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_DEFEATED+1:\t\t// wait till we hit ground\n\t\t{\n\t\t\to->yinertia += 0x20;\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia > 0)\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->timer = 0;\n\t\t\t\to->xmark = o->x;\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// shaking (script tells us when to stop)\n\t\tcase STATE_DEFEATED+2:\n\t\t{\n\t\t\to->frame = 9;\n\t\t\to->timer++;\n\t\t\t\n\t\t\to->x = o->xmark;\n\t\t\tif (!(o->timer & 2)) o->x += (1 << CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\t// dissolve into red energy\n\t\t// we already did this once before; think Pooh Black.\n\t\tcase STATE_DISSOLVE:\n\t\t{\n\t\t\to->frame = 9;\n\t\t\to->x = o->xmark;\n\t\t\t\n\t\t\to->ResetClip();\n\t\t\to->clip_enable = true;\n\t\t\t\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase STATE_DISSOLVE+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// shaking\n\t\t\to->x = o->xmark;\n\t\t\tif (!(o->timer & 2)) o->x += (1 << CSF);\n\t\t\t\n\t\t\tgame.quaketime = 2;\n\t\t\t\n\t\t\t// sound\n\t\t\tif ((o->timer % 6) == 3)\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\n\t\t\t// move energy spawn point\n\t\t\tif (++o->timer2 >= 8)\n\t\t\t{\n\t\t\t\to->timer2 = 0;\n\t\t\t\t\n\t\t\t\to->clipy1++;\n\t\t\t\tif (o->clipy1 >= sprites[o->sprite].h)\n\t\t\t\t\to->invisible = true;\n\t\t\t}\n\t\t\t\n\t\t\t// spawn copious amount of energy\n\t\t\tfor(int i=0;i<3;i++)\n\t\t\t{\n\t\t\t\tint x, y;\n\t\t\t\t\n\t\t\t\tx = o->x + (random(-16, 16) << CSF);\n\t\t\t\ty = (o->y - o->DrawPointY()) + (o->clipy1 << CSF);\n\t\t\t\t\n\t\t\t\tObject *drip = CreateObject(x, y, OBJ_RED_ENERGY);\n\t\t\t\t\n\t\t\t\tdrip->xinertia = random(-0x200, 0x200);\n\t\t\t\tdrip->yinertia = random(-0x400, 0);\n\t\t\t\tdrip->angle = DOWN;\n\t\t\t\t// otherwise during the last few frames they'll get stuck in the floor\n\t\t\t\t// (they still delete themselves once they hit the floor, just are\n\t\t\t\t// able to come up out of it then back down during last few moments).\n\t\t\t\tdrip->flags |= FLAG_IGNORE_SOLID;\n\t\t\t}\n\t\t\t\n\t\t\t// he doesn't take up the entire height of the sprite,\n\t\t\t// so we stop a little bit early.\n\t\t\tif (o->clipy1 >= 44)\n\t\t\t{\n\t\t\t\to->invisible = true;\n\t\t\t\to->frame = 0;\n\t\t\t\to->state++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// script: crystal up and away\n\t\tcase 520:\n\t\t{\n\t\t\tcrystal_ymark = -(32 << CSF);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// this is a lesser-seen attack in which he pushes you away amongst\n// a shower of red sparks. To trigger it, immediately after he lands\n// you must walk directly up to him and deal more than 20 damage.\nstatic void do_redsplode(Object *o)\n{\n\t// arms out full\n\to->frame = 6;\n\tFACEPLAYER;\n\t\n\tplayer->yinertia = -0x400;\n\tplayer->xinertia = (o->x > player->x) ? -0x5ff : 0x5ff;\n\t\n\thurtplayer(5);\n\tquake(10);\n\t\n\t// big shower of red energy\n\tfor(int i=0;i<100;i++)\n\t{\n\t\tint x = o->x + (random(-16, 16) << CSF);\n\t\tint y = o->y + (random(-16, 16) << CSF);\n\t\t\n\t\tObject *spark = CreateObject(x, y, OBJ_RED_ENERGY);\n\t\t\n\t\tspark->xinertia = random(-0x600, 0x600);\n\t\tspark->yinertia = random(-0x600, 0x600);\n\t\tspark->angle = DOWN;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// the red energy that oozes off of him during most of the battle\nstatic void run_red_drip(Object *o)\n{\n\tif (random(0, 3) == 2)\n\t{\n\t\tint x = o->x + (random(-16, 16) << CSF);\n\t\tint y = o->y + (random(-8, 4) << CSF);\n\t\t\n\t\tObject *drip = CreateObject(x, y, OBJ_RED_ENERGY);\n\t\tdrip->xinertia = o->xinertia;\n\t\tdrip->angle = DOWN;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_doctor_bat(Object *o)\n{\n\tANIMATE(2, 0, 2);\n\t\n\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t(o->blockr && o->xinertia > 0))\n\t{\n\t\to->dir ^= 1;\n\t\to->xinertia = -o->xinertia;\n\t}\n\telse if ((o->blocku && o->yinertia < 0) || \\\n\t\t(o->blockd && o->yinertia > 0))\n\t{\n\t\to->yinertia = -o->yinertia;\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/final_battle/doctor_frenzied.fdh",
    "content": "//hash:2211b55e\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//--------[referenced from ai/final_battle/doctor_frenzied.cpp]------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//--------[referenced from ai/final_battle/doctor_frenzied.cpp]------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in player.cpp */\n\n//--------[referenced from ai/final_battle/doctor_frenzied.cpp]------//\nvoid hurtplayer(int damage);\n\n\n/* located in ai/ai.cpp */\n\n//--------[referenced from ai/final_battle/doctor_frenzied.cpp]------//\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/final_battle/doctor_frenzied.cpp */\n\n//--------[referenced from ai/final_battle/doctor_frenzied.cpp]------//\nvoid ai_boss_doctor_frenzied(Object *o);\nstatic void run_jumps(Object *o);\nstatic void run_red_dash(Object *o);\nstatic void run_mega_bats(Object *o);\nstatic void run_teleport(Object *o);\nstatic void run_init(Object *o);\nstatic void run_defeat(Object *o);\nstatic void do_redsplode(Object *o);\nstatic void run_red_drip(Object *o);\nvoid ai_doctor_bat(Object *o);\n\n\n/* located in ai/final_battle/doctor_common.cpp */\n\n//--------[referenced from ai/final_battle/doctor_frenzied.cpp]------//\nvoid dr_tp_out_init(Object *o);\nbool dr_tp_out(Object *o);\nvoid dr_tp_in_init(Object *o);\nbool dr_tp_in(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//--------[referenced from ai/final_battle/doctor_frenzied.cpp]------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------[referenced from ai/final_battle/doctor_frenzied.cpp]------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/final_battle/final_misc.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"final_misc.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_MIMIGA_CAGED, ai_mimiga_caged);\n\tONTICK(OBJ_CHIE_CAGED, ai_mimiga_caged);\n\tONTICK(OBJ_CHACO_CAGED, ai_mimiga_caged);\n\tONTICK(OBJ_SANTA_CAGED, ai_mimiga_caged);\n\t\n\tONTICK(OBJ_DOCTOR_GHOST, ai_doctor_ghost);\n\tONTICK(OBJ_RED_ENERGY, ai_red_energy);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// The Doctor in his red energy form.\n// there is no \"move\" state, when he takes over Misery,\n// the object is moved kind of unconventionally, using an <MNP.\nvoid ai_doctor_ghost(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 10:\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tObject *r = CreateObject(o->x, o->y+(128<<CSF), OBJ_RED_ENERGY);\n\t\t\tr->angle = RIGHT;\n\t\t\tr->linkedobject = o;\n\t\t\t\n\t\t\tif (++o->timer > 150)\n\t\t\t\to->state++;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tif (++o->timer > 250)\n\t\t\t\tDeleteObjectsOfType(OBJ_RED_ENERGY);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n// red energy for doctor. In a completely different role,\n// it's also used for the dripping blood from Ballos's final form.\nvoid ai_red_energy(Object *o)\n{\n\n\tswitch(o->angle)\n\t{\n\t\tcase UP:\n\t\t{\n\t\t\to->yinertia -= 0x40;\n\t\t\tif (o->blocku && o->yinertia < 0) o->Delete();\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase DOWN:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tif (o->blockd && o->yinertia > 0) o->Delete();\n\t\t\t\n\t\t\tif (++o->timer > 50)\n\t\t\t\to->Delete();\n\t\t\t\n\t\t\tif (o->yinertia > 0x5ff)\n\t\t\t\to->yinertia = 0x5ff;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase RIGHT:\n\t\t{\n\t\t\tif (!o->linkedobject) { o->Delete(); return; }\n\t\t\t\n\t\t\tif (o->state == 0)\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\t\n\t\t\t\to->xinertia = random(-0x600, 0x600);\n\t\t\t\to->yinertia = random(-0x600, 0x600);\n\t\t\t\t\n\t\t\t\t// accel speed\n\t\t\t\to->speed = (512 / random(16, 51));\n\t\t\t\t\n\t\t\t\t// x/y limit\n\t\t\t\tint limit = random(0x80, 0x100);\n\t\t\t\t\n\t\t\t\to->timer2 = (limit * 2);\t// x limit\n\t\t\t\to->timer3 = (limit * 3);\t// y limit (form elongated sphere)\n\t\t\t}\n\t\t\t\n\t\t\tint tgtx = o->linkedobject->x + (4<<CSF);\n\t\t\tif (o->x < tgtx) \t\to->xinertia += o->speed;\n\t\t\telse if (o->x > tgtx)\to->xinertia -= o->speed;\n\t\t\t\n\t\t\tif (o->y < o->linkedobject->y) \t\to->yinertia += o->speed;\n\t\t\telse if (o->y > o->linkedobject->y) o->yinertia -= o->speed;\n\t\t\t\n\t\t\tLIMITX(o->timer2);\n\t\t\tLIMITY(o->timer3);\n\t\t}\n\t}\n\t\n\to->frame = random(0, 1);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid ai_mimiga_caged(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->x -= (1 << CSF);\n\t\t\to->y -= (2 << CSF);\n\t\t\t\n\t\t\tswitch(o->type)\n\t\t\t{\n\t\t\t\tcase OBJ_CHIE_CAGED: o->sprite = SPR_CHIE; break;\n\t\t\t\tcase OBJ_CHACO_CAGED: o->sprite = SPR_CHACO; break;\n\t\t\t\t\n\t\t\t\tcase OBJ_SANTA_CAGED:\n\t\t\t\t\to->sprite = SPR_SANTA;\n\t\t\t\t\to->x += (2 << CSF);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\to->sprite = SPR_MIMIGA_CAGED;\n\t\t\t\t\to->x += (2 << CSF);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\trandblink(o, 1, 12, 160);\n\t\t\t\n\t\t\tif (o->frame == 0)\n\t\t\t\tFACEPLAYER;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase 10:\t// blush and spawn heart\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->frame = 2;\n\t\t\t\n\t\t\tObject *h = CreateObject(o->x, o->y-(16<<CSF), OBJ_HEART);\n\t\t\th->state = 1;\t// not map-spawned (disappear after a moment)\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/final_battle/final_misc.fdh",
    "content": "//hash:1c3a2075\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//----------[referenced from ai/final_battle/final_misc.cpp]---------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in ai/ai.cpp */\n\n//----------[referenced from ai/final_battle/final_misc.cpp]---------//\nvoid DeleteObjectsOfType(int type);\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in ai/final_battle/final_misc.cpp */\n\n//----------[referenced from ai/final_battle/final_misc.cpp]---------//\nvoid ai_doctor_ghost(Object *o);\nvoid ai_red_energy(Object *o);\nvoid ai_mimiga_caged(Object *o);\n\n\n/* located in common/misc.cpp */\n\n//----------[referenced from ai/final_battle/final_misc.cpp]---------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/final_battle/misery.fdh",
    "content": "//hash:4f319d7c\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\nvoid ThrowObjectAtPlayer(Object *o, int rand_variance, int speed);\nint xinertia_from_angle(uint8_t angle, int speed);\nint yinertia_from_angle(uint8_t angle, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/final_battle/misery.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nvoid ai_boss_misery(Object *o);\nstatic void run_spells(Object *o);\nstatic void run_teleport(Object *o);\nstatic void run_intro(Object *o);\nstatic void run_defeated(Object *o);\nstatic Object *CreateRing(Object *o, uint8_t angle);\nvoid ai_misery_ring(Object *o);\nvoid aftermove_misery_ring(Object *o);\nvoid ai_misery_phase(Object *o);\nvoid ai_misery_ball(Object *o);\nvoid ai_black_lightning(Object *o);\n\n\n/* located in ai/final_battle/doctor_frenzied.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nstatic void run_teleport(Object *o);\n\n\n/* located in ai/hell/ballos_priest.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nstatic void run_intro(Object *o);\nstatic void run_defeated(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//------------[referenced from ai/final_battle/misery.cpp]-----------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/final_battle/misery_battle.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"misery.fdh\"\n\n#define STATE_FIGHTING\t\t\t100\t\t// script-triggered, must be constant\n\n#define STATE_FLASH_FOR_SPELL\t200\t\t// flashes then casts either FIRE_SHOTS or SUMMON_BLOCk\n#define STATE_FIRE_SHOTS\t\t210\t\t// fires black shots at player\n#define STATE_SUMMON_BLOCK\t\t220\t\t// summons falling block over player's head\n#define STATE_SUMMON_BALLS\t\t230\t\t// summons black-lightning balls\n#define STATE_TP_AWAY\t\t\t240\t\t// teleports away then reappears\n\n#define STATE_DEFEATED\t\t\t1000\t// script-triggered, must be constant\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BOSS_MISERY, ai_boss_misery);\n\tONTICK(OBJ_MISERY_PHASE, ai_misery_phase);\n\tONTICK(OBJ_MISERY_SHOT, ai_generic_angled_shot);\n\t\n\tONTICK(OBJ_MISERY_RING, ai_misery_ring);\n\tAFTERMOVE(OBJ_MISERY_RING, aftermove_misery_ring);\n\t\n\tONTICK(OBJ_MISERY_BALL, ai_misery_ball);\n\tONTICK(OBJ_BLACK_LIGHTNING, ai_black_lightning);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_boss_misery(Object *o)\n{\n\t/*debug(\"state: %d\", o->state);\n\tdebug(\"timer: %d\", o->timer);\n\tdebug(\"timer2: %d\", o->timer2);*/\n\t\n\tswitch(o->state)\n\t{\n\t\t// fight begin and default/base state\n\t\tcase STATE_FIGHTING:\n\t\t{\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->savedhp = o->hp;\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_FIGHTING+1:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x20 : -0x20;\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\tif (++o->timer > 200 || (o->hp - o->savedhp) >= 80)\n\t\t\t{\n\t\t\t\to->state = STATE_FLASH_FOR_SPELL;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\trun_spells(o);\n\trun_teleport(o);\n\t\n\trun_intro(o);\n\trun_defeated(o);\n\t\n\tLIMITX(0x200);\n\tLIMITY(0x400);\n}\n\n\n// her 3 attacks: black shots, black balls, and summon falling block.\nstatic void run_spells(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// flashes for spell...\n\t\t// then either fires shots or casts the falling-block spell\n\t\tcase STATE_FLASH_FOR_SPELL:\n\t\t{\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_FLASH_FOR_SPELL+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\to->frame = 5 + (o->timer & 1);\n\t\t\t\n\t\t\tif (o->timer > 30)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 4;\n\t\t\t\t\n\t\t\t\tif (++o->timer2 >= 3)\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_SUMMON_BLOCK;\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_FIRE_SHOTS;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// fire black shots at player\n\t\tcase STATE_FIRE_SHOTS:\n\t\t{\n\t\t\tif ((++o->timer % 6) == 0)\n\t\t\t{\n\t\t\t\tEmFireAngledShot(o, OBJ_MISERY_SHOT, 4, 0x800);\n\t\t\t\tsound(SND_FIREBALL);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 30)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = STATE_TP_AWAY;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// summon falling block\n\t\tcase STATE_SUMMON_BLOCK:\n\t\t{\n\t\t\tif (++o->timer == 10)\n\t\t\t{\n\t\t\t\tint x = player->x - (8 << CSF);\n\t\t\t\tint y = player->y - (64 << CSF);\n\t\t\t\tObject *block = CreateObject(x, y, OBJ_FALLING_BLOCK);\n\t\t\t\tblock->sprite = SPR_BALCONY_BLOCK_LARGE;\n\t\t\t\tblock->dir = DOWN; // tell block it was spawned by Misery\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = STATE_TP_AWAY;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// summon black balls\n\t\tcase STATE_SUMMON_BALLS:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->frame = 4;\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_SUMMON_BALLS+1:\n\t\t{\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x20 : -0x20;\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\tif ((++o->timer % 24) == 0)\n\t\t\t{\n\t\t\t\tCreateObject(o->x, o->y+(4<<CSF), OBJ_MISERY_BALL);\n\t\t\t\tsound(SND_FIREBALL);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 72)\n\t\t\t{\n\t\t\t\to->state = 100;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// runs her teleport-away and reappear states.\nstatic void run_teleport(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// teleport away, then reappear someplace else\n\t\tcase STATE_TP_AWAY:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->invisible = true;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\n\t\t\tCreateObject(o->x, o->y, OBJ_MISERY_PHASE)->dir = LEFT;\n\t\t\tCreateObject(o->x, o->y, OBJ_MISERY_PHASE)->dir = RIGHT;\n\t\t\t\n\t\t\tsound(SND_TELEPORT);\n\t\t}\n\t\tcase STATE_TP_AWAY+1:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// it takes exactly 8 frames for the phase-in animation to complete\n\t\t\tif (o->timer == 42)\n\t\t\t{\n\t\t\t\t// we don't actually move until the last possible second\n\t\t\t\t// in order not to bring the floattext/damage numbers with us,\n\t\t\t\t// which gives away our position.\n\t\t\t\to->xmark = (random(9, 31) * TILE_W) << CSF;\n\t\t\t\to->ymark = (random(5, 7) * TILE_H) << CSF;\n\t\t\t\t\n\t\t\t\tCreateObject(o->xmark + 0x2000, o->ymark, OBJ_MISERY_PHASE)->dir = LEFT;\n\t\t\t\tCreateObject(o->xmark - 0x2000, o->ymark, OBJ_MISERY_PHASE)->dir = RIGHT;\n\t\t\t}\n\t\t\telse if (o->timer == 50)\n\t\t\t{\n\t\t\t\t// switch back to showing real misery instead of the phase-in effect\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->invisible = false;\n\t\t\t\to->frame = 0;\n\t\t\t\to->dir = LEFT;\n\t\t\t\t\n\t\t\t\to->x = o->xmark;\n\t\t\t\to->y = o->ymark;\n\t\t\t\t\n\t\t\t\t// spawn rings\n\t\t\t\tif (o->hp < 340)\n\t\t\t\t{\n\t\t\t\t\tCreateRing(o, 0x00);\n\t\t\t\t\tCreateRing(o, 0x80);\n\t\t\t\t\t\n\t\t\t\t\tif (o->hp < 180)\n\t\t\t\t\t{\n\t\t\t\t\t\tCreateRing(o, 0x40);\n\t\t\t\t\t\tCreateRing(o, 0xC0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// after tp we can summon the black balls if the player\n\t\t\t\t// is far enough away from us that they won't immediately trigger\n\t\t\t\tif (abs(player->x - o->x) > 112<<CSF)\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_SUMMON_BALLS;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = STATE_FIGHTING;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// setup sinusoidal hover, both of those possible states\n\t\t\t\t// are in-air states that do it.\n\t\t\t\to->timer = 0;\n\t\t\t\to->yinertia = -0x200;\n\t\t\t\t// counteracts yinertia of first visible frame, so it's a\n\t\t\t\t// seamless transition from the phase-in effect.\n\t\t\t\to->y += 0x220;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// intro states: stuff that happens before the fight actually starts.\nstatic void run_intro(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// fixes her position on throne; don't use a spawn point or it'll\n\t\t\t// glitch when she turns to misery_stand in defeated cinematic\n\t\t\to->y += (6 << CSF);\n\t\t\t\n\t\t\t// her initial target height when fight begins\n\t\t\to->ymark = (64 << CSF);\n\t\t\t\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\trandblink(o);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t\t// fall from throne (script-triggered)\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 21;\n\t\t\t\to->frame = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase 21:\t\t// standing/talking after fall from throne\n\t\t{\n\t\t\to->frame = 2;\n\t\t\trandblink(o, 3);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// defeated states--they're all run by the ondeath script.\nstatic void run_defeated(Object *o)\n{\n\t// these states are all script-triggered and must be constant.\n\tswitch(o->state)\n\t{\n\t\t// defeated! \"gaah\" in air\n\t\tcase 1000:\n\t\t{\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\tKillObjectsOfType(OBJ_MISERY_RING);\n\t\t\tSmokeClouds(o, 3, 2, 2);\n\t\t\t\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\t\n\t\t\to->state = 1001;\n\t\t\to->timer = 0;\n\t\t\to->frame = 4;\n\t\t\to->xmark = o->x;\n\t\t}\n\t\tcase 1001:\t\t// shake until script tells us otherwise\n\t\t{\n\t\t\to->x = o->xmark;\n\t\t\tif (++o->timer & 2)\n\t\t\t\to->x += (1 << CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1010:\t\t// fall to ground and do defeated frame: \"ergh\"\n\t\t{\n\t\t\to->yinertia += 10;\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->frame = 7;\n\t\t\t\to->state = 1011;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic Object *CreateRing(Object *o, uint8_t angle)\n{\nObject *ring;\n\n\tring = CreateObject(0, 0, OBJ_MISERY_RING);\n\tring->angle = angle;\n\tring->linkedobject = o;\n\t\n\treturn ring;\n}\n\nvoid ai_misery_ring(Object *o)\n{\n\tif (!o->linkedobject)\n\t{\n\t\tSmokeClouds(o, 3, 2, 2);\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\t// distance from misery\n\t\t\tif (o->timer < 192)\n\t\t\t\to->timer++;\n\t\t\t\n\t\t\t// turn to bats when misery teleports\n\t\t\tif (o->linkedobject->state >= STATE_TP_AWAY && \\\n\t\t\t\to->linkedobject->state < STATE_TP_AWAY+10)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// transform to bat\n\t\t{\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\n\t\t\tThrowObjectAtPlayer(o, 3, 0x200);\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\to->sprite = SPR_ORANGE_BAT_FINAL;\n\t\t\to->state = 11;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tANIMATE(4, 0, 2);\n\t\t\t\n\t\t\tif ((o->dir == LEFT && o->blockl) || \\\n\t\t\t\t(o->dir == RIGHT && o->blockr) || \\\n\t\t\t\to->blocku || o->blockd)\n\t\t\t{\n\t\t\t\tSmokeClouds(o, 3, 2, 2);\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid aftermove_misery_ring(Object *o)\n{\n\tif (o->state == 1 && o->linkedobject)\n\t{\n\t\to->angle += 2;\n\t\t\n\t\tint dist = (o->timer << CSF) / 4;\n\t\to->x = o->linkedobject->x + xinertia_from_angle(o->angle, dist);\n\t\to->y = o->linkedobject->y + yinertia_from_angle(o->angle, dist);\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// this is her phasy teleport out/teleport in effect\n// it's a 2-dir interlaced picture of her with each dir\n// containing only half the lines. We spawn two objects\n// in opposite dirs and then separate them.\nvoid ai_misery_phase(Object *o)\n{\n\tXMOVE(0x400);\n\tif (++o->timer >= 8) o->Delete();\n}\n\n\nvoid ai_misery_ball(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->ymark = o->y;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = -0x200;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(2, 0, 1);\n\t\t\t\n\t\t\to->xinertia += (o->x < player->x) ? 0x10 : -0x10;\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x20 : -0x20;\n\t\t\tLIMITX(0x200);\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\tif (pdistlx(8<<CSF) && player->y > o->y)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// black lightning\n\t\t{\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\tsound(SND_LIGHTNING_STRIKE);\n\t\t\t\tCreateObject(o->x, o->y, OBJ_BLACK_LIGHTNING);\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t\t\n\t\t\to->frame = (o->timer & 2) ? 2 : 1;\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_black_lightning(Object *o)\n{\n\tANIMATE(0, 0, 1);\n\to->yinertia = 0x1000;\n\t\n\tif (o->blockd)\n\t{\n\t\teffect(o->CenterX(), o->Bottom(), EFFECT_BOOMFLASH);\n\t\tSmokeXY(o->CenterX(), o->Bottom(), 3, o->Width()>>CSF, 4);\n\t\to->Delete();\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/final_battle/sidekicks.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"sidekicks.fdh\"\n\n#define SUE_BASE\t\t\t\t20\n#define SUE_PREPARE_ATTACK\t\t30\n#define SUE_SOMERSAULT\t\t\t40\n#define SUE_DASH\t\t\t\t50\n#define SUE_SOMERSAULT_HIT\t\t60\n\n// both sue and misery\n#define SIDEKICK_CORE_DEFEATED\t\t99\t\t// core defeated (script-triggered)\n#define SIDEKICK_DEFEATED\t\t\t100\t\t// sidekick defeated\n#define SIDEKICK_CORE_DEFEATED_2\t110\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_SUE_FRENZIED, ai_sue_frenzied);\n\tONTICK(OBJ_MISERY_FRENZIED, ai_misery_frenzied);\n\t\n\tONTICK(OBJ_MISERY_CRITTER, ai_misery_critter);\n\tONTICK(OBJ_MISERY_BAT, ai_misery_bat);\n\tONTICK(OBJ_MISERY_MISSILE, ai_misery_missile);\n}\n\nbool sue_being_hurt;\nbool sue_was_killed;\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_misery_frenzied(Object *o)\n{\n\t//AIDEBUG;\n\tsidekick_run_defeated(o, 600);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\tsue_being_hurt = sue_was_killed = false;\n\t\t\t\n\t\t\to->savedhp = o->hp;\n\t\t\to->nxflags |= NXFLAG_SLOW_X_WHEN_HURT;\n\t\t\t\n\t\t\tsound(SND_TELEPORT);\n\t\t\to->timer = 1;\n\t\t}\n\t\tcase 1:\t\t// transforming\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 2)\n\t\t\t{\t// frenzied\n\t\t\t\to->sprite = SPR_MISERY_FRENZIED;\n\t\t\t\to->frame = 9;\n\t\t\t\to->x -= 0x1000;\n\t\t\t\to->y -= 0x2000;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer == 4)\n\t\t\t{\t// normal\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\to->sprite = SPR_MISERY;\n\t\t\t\to->frame = 2;\n\t\t\t\to->x += 0x1000;\n\t\t\t\to->y += 0x2000;\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer2 >= 50)\n\t\t\t{\n\t\t\t\to->timer2 = 0;\n\t\t\t\to->state = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// hold at \"being transformed\" frame\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->frame = 9;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// fight begin / base state\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->timer = 0;\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\to->xinertia *= 7; o->xinertia /= 8;\n\t\t\to->yinertia *= 7; o->yinertia /= 8;\n\t\t\t\n\t\t\tANIMATE(20, 0, 1);\n\t\t\t\n\t\t\tif (++o->timer > 100)\n\t\t\t\to->state = 30;\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->timer = 0;\n\t\t\to->frame = 2;\n\t\t\to->savedhp = o->hp;\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\tANIMATE(1, 2, 3);\n\t\t\t\n\t\t\tif (o->blockd) o->yinertia = -0x200;\n\t\t\t\n\t\t\tint core_x = game.stageboss.object ? game.stageboss.object->x : 0;\n\t\t\t\n\t\t\to->xinertia += (o->x > core_x) ? -0x20 : 0x20;\n\t\t\to->yinertia += (o->y > player->y) ? -0x10 : 0x10;\n\t\t\tLIMITX(0x200);\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tif (++o->timer > 150)\n\t\t\t{\n\t\t\t\t// she attacks with normal critters if you attack either her or Sue.\n\t\t\t\tif ((o->savedhp - o->hp) > 20 || sue_being_hurt)\n\t\t\t\t{\n\t\t\t\t\tsue_being_hurt = false;\n\t\t\t\t\to->state = 40;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// she attacks periodically with fishy missiles if you killed Sue.\n\t\t\tif (o->timer > 250 && sue_was_killed)\n\t\t\t\to->state = 50;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// spawn bats/critters\n\t\t{\n\t\t\to->state = 41;\n\t\t\to->timer = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\tFACEPLAYER;\n\t\t\tsound(SND_CHARGE_GUN);\n\t\t\t\n\t\t\t// if you are below the 2nd little platform on the left,\n\t\t\t// she spawns critters, else bats.\n\t\t\to->timer3 = (player->y >= MAPY(10)) ? OBJ_MISERY_CRITTER : OBJ_MISERY_BAT;\n\t\t}\n\t\tcase 41:\n\t\t{\n\t\t\to->timer++;\n\t\t\to->frame = (o->timer & 2) ? 4 : 5;\n\t\t\t\n\t\t\tif ((o->timer % 6) == 1)\n\t\t\t{\n\t\t\t\tint x, y;\n\t\t\t\t\n\t\t\t\tif (o->timer3 == OBJ_MISERY_CRITTER)\n\t\t\t\t{\n\t\t\t\t\tx = o->x + (random(-64, 64) << CSF);\n\t\t\t\t\ty = o->y + (random(-32, 32) << CSF);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = o->x + (random(-32, 32) << CSF);\n\t\t\t\t\ty = o->y + (random(-64, 64) << CSF);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (x < MAPX(2)) x = MAPX(2);\n\t\t\t\tif (x > MAPX(map.xsize - 3)) x = MAPX(map.xsize - 3);\n\t\t\t\t\n\t\t\t\tif (y < MAPY(2)) y = MAPY(2);\n\t\t\t\tif (y > MAPY(map.ysize - 3)) y = MAPY(map.ysize - 3);\n\t\t\t\t\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\tCreateObject(x, y, o->timer3)->invisible = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 42;\n\t\t\t\to->timer = 0;\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 42:\n\t\t{\n\t\t\to->frame = 6;\n\t\t\t\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->yinertia = -0x200;\n\t\t\t\tXMOVE(-0x200);\n\t\t\t\t\n\t\t\t\to->state = 30;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 50:\t// spawn fishy missiles\n\t\t{\n\t\t\to->state = 51;\n\t\t\to->timer = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\tFACEPLAYER;\n\t\t\tsound(SND_CHARGE_GUN);\n\t\t}\n\t\tcase 51:\n\t\t{\n\t\t\to->timer++;\n\t\t\to->frame = (o->timer & 2) ? 4 : 5;\n\t\t\t\n\t\t\tint rate = (player->equipmask & EQUIP_BOOSTER20) ? 10 : 24;\n\t\t\t\n\t\t\tif ((o->timer % rate) == 1)\n\t\t\t{\n\t\t\t\t// pattern: booster=[0,1,3,1,2,0], no-booster=[0,0,0]:\n\t\t\t\tint angindex = (o->timer / 6) & 3;\n\t\t\t\tfm_spawn_missile(o, angindex);\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 42;\n\t\t\t\to->timer = 0;\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// spawn a fishy missile in the given direction\nstatic Object *fm_spawn_missile(Object *o, int angindex)\n{\nstatic const int ang_table_left[]  = { 0xD8, 0xEC, 0x14, 0x28 };\nstatic const int ang_table_right[] = { 0x58, 0x6C, 0x94, 0xA8 };\n\n\tObject *shot = CreateObject(o->x, o->y, OBJ_MISERY_MISSILE);\n\tsound(SND_EM_FIRE);\n\t\n\tif (o->dir == LEFT)\n\t{\n\t\tshot->x += (10 << CSF);\n\t\tshot->angle = ang_table_left[angindex];\n\t}\n\telse\n\t{\n\t\tshot->x -= (10 << CSF);\n\t\tshot->angle = ang_table_right[angindex];\n\t}\n\t\n\treturn shot;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_misery_critter(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tif (++o->timer > 16)\n\t\t\t{\n\t\t\t\to->frame = 2;\n\t\t\t\to->invisible = false;\n\t\t\t\tFACEPLAYER;\n\t\t\t\t\n\t\t\t\to->state = 10;\n\t\t\t\to->damage = 2;\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->state = 11;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\t\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 11:\n\t\t{\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\tif (++o->timer2 > 4)\n\t\t\t\t\to->state = 12;\n\t\t\t\telse\n\t\t\t\t\to->state = 10;\n\t\t\t\t\n\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t\t\n\t\t\t\to->yinertia = -0x600;\n\t\t\t\tXMOVE(0x200);\n\t\t\t\t\n\t\t\t\to->frame = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 12:\n\t\t{\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\tif (o->y > MAPY(map.ysize))\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state >= 10)\n\t{\n\t\to->yinertia += 0x40;\n\t\tif (o->yinertia > 0x5ff) o->yinertia = 0x5ff;\n\t}\n}\n\nvoid ai_misery_bat(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tif (++o->timer > 16)\n\t\t\t{\n\t\t\t\to->frame = 2;\n\t\t\t\to->invisible = false;\n\t\t\t\tFACEPLAYER;\n\t\t\t\t\n\t\t\t\to->state = 1;\n\t\t\t\to->damage = 2;\n\t\t\t\to->flags |= (FLAG_SHOOTABLE | FLAG_IGNORE_SOLID);\n\t\t\t\t\n\t\t\t\to->ymark = o->y;\n\t\t\t\to->yinertia = 0x400;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(2, 0, 2);\n\t\t\t\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x40 : -0x40;\n\t\t\tXACCEL(0x10);\n\t\t\t\n\t\t\tif (o->x < 0 || o->x > MAPX(map.xsize) || \\\n\t\t\t\to->y < 0 || o->y > MAPY(map.ysize))\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_misery_missile(Object *o)\n{\n\t// cut & pasted from ai_x_fishy_missile\n\tvector_from_angle(o->angle, 0x400, &o->xinertia, &o->yinertia);\n\tint desired_angle = GetAngle(o->x, o->y, player->x, player->y);\n\t\n\tif (o->angle >= desired_angle)\n\t{\n\t\tif ((o->angle - desired_angle) < 128)\n\t\t{\n\t\t\to->angle--;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->angle++;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif ((o->angle - desired_angle) < 128)\n\t\t{\n\t\t\to->angle++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->angle--;\n\t\t}\n\t}\n\t\n\t// smoke trails\n\tif (++o->timer2 > 2)\n\t{\n\t\to->timer2 = 0;\n\t\tCaret *c = effect(o->ActionPointX(), o->ActionPointY(), EFFECT_SMOKETRAIL_SLOW);\n\t\tc->xinertia = -o->xinertia >> 2;\n\t\tc->yinertia = -o->yinertia >> 2;\n\t}\n\t\n\to->frame = (o->angle + 16) / 32;\n\tif (o->frame > 7) o->frame = 7;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_sue_frenzied(Object *o)\n{\n\t//AIDEBUG;\n\tsidekick_run_defeated(o, 500);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\tsue_being_hurt = sue_was_killed = false;\n\t\t\t\n\t\t\to->savedhp = o->hp;\n\t\t\to->nxflags |= NXFLAG_SLOW_X_WHEN_HURT;\n\t\t\t\n\t\t\tsound(SND_TELEPORT);\n\t\t\to->timer = 1;\n\t\t}\n\t\tcase 1:\t\t// transforming\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 2)\n\t\t\t{\t// frenzied sue\n\t\t\t\to->sprite = SPR_SUE_FRENZIED;\n\t\t\t\to->frame = 11;\n\t\t\t\to->x -= 0x1000;\n\t\t\t\to->y -= 0x1800;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer == 4)\n\t\t\t{\t// normal sue\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\to->sprite = SPR_SUE;\n\t\t\t\to->frame = 12;\n\t\t\t\to->x += 0x1000;\n\t\t\t\to->y += 0x1800;\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer2 >= 50)\n\t\t\t{\n\t\t\t\tKillObjectsOfType(OBJ_RED_CRYSTAL);\n\t\t\t\to->timer2 = 0;\n\t\t\t\to->state = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// fight begin/base state (script-triggered)\n\t\tcase SUE_BASE:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->damage = 0;\n\t\t\t\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t}\n\t\tcase SUE_BASE+1:\n\t\t{\n\t\t\tANIMATE(20, 0, 1);\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\to->xinertia *= 7; o->xinertia /= 8;\n\t\t\to->yinertia *= 7; o->yinertia /= 8;\n\t\t\t\n\t\t\tif ((o->savedhp - o->hp) > 50)\n\t\t\t{\n\t\t\t\to->savedhp = o->hp;\n\t\t\t\tsue_being_hurt = true;\t// trigger Misery to spawn monsters\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 80)\n\t\t\t\to->state = SUE_PREPARE_ATTACK;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// prepare to attack\n\t\tcase SUE_PREPARE_ATTACK:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->frame = 2;\n\t\t\t\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t}\n\t\tcase SUE_PREPARE_ATTACK+1:\n\t\t{\n\t\t\tif (++o->timer > 16)\n\t\t\t{\n\t\t\t\to->state = (o->timer2 ^= 1) ? SUE_SOMERSAULT : SUE_DASH;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tsue_somersault(o);\n\tsue_dash(o);\n}\n\n// somersault attack. this is the only time she can actually hurt you.\nstatic void sue_somersault(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase SUE_SOMERSAULT:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->damage = 4;\n\t\t\to->frame = 2;\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\tThrowObjectAtPlayer(o, 0, 0x600);\n\t\t\tset_ignore_solid(o);\n\t\t}\n\t\tcase SUE_SOMERSAULT+1:\n\t\t{\n\t\t\t// passes through frame 3 (prepare/dash) before entering anim loop\n\t\t\tANIMATE(1, 4, 7);\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->shaketime && o->timer > 20)\n\t\t\t{\t// hurt fall\n\t\t\t\to->state = SUE_SOMERSAULT_HIT;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// hit wall or timeout?\n\t\t\tif (o->timer > 50 || \\\n\t\t\t\t(o->blockr && o->xinertia > 0) || \\\n\t\t\t\t(o->blockl && o->xinertia < 0))\n\t\t\t{\t// back to base state\n\t\t\t\to->state = SUE_BASE;\n\t\t\t}\n\t\t\t\n\t\t\tif ((o->timer % 5) == 1)\n\t\t\t\tsound(SND_CRITTER_FLY);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// hit during somersault\n\t\tcase SUE_SOMERSAULT_HIT:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->frame = 2;\t// stop somersault; back to normal stand frame\n\t\t\to->damage = 0;\n\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t}\n\t\tcase SUE_SOMERSAULT_HIT+1:\t// slowing down\n\t\t{\n\t\t\to->xinertia *= 7; o->xinertia /= 8;\n\t\t\to->yinertia *= 7; o->yinertia /= 8;\n\t\t\t\n\t\t\tif (++o->timer > 6)\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->timer = 0;\n\t\t\t\to->yinertia = -0x200;\n\t\t\t\tXMOVE(-0x200);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// falling/egads\n\t\tcase SUE_SOMERSAULT_HIT+2:\n\t\t{\n\t\t\to->frame = 9;\t// egads!\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia > 0)\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 2;\t// standing\n\t\t\t\t\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t\t\n\t\t\to->yinertia += 0x20;\n\t\t\tLIMITY(0x5ff);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// hit ground: slide a bit then recover\n\t\tcase SUE_SOMERSAULT_HIT+3:\n\t\t{\n\t\t\tif (++o->timer > 16)\n\t\t\t\to->state = 20;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n// non-harmful dash. she cannot be hurt, but cannot hurt you, either.\nstatic void sue_dash(Object *o)\n{\nint x;\n\n\tswitch(o->state)\n\t{\n\t\tcase SUE_DASH:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\n\t\t\tif (player->x < o->x) x = player->x - (160<<CSF);\n\t\t\t\t\t\t\t else x = player->x + (160<<CSF);\n\t\t\t\n\t\t\tThrowObject(o, x, player->y, 0, 0x600);\n\t\t\tset_ignore_solid(o);\n\t\t}\n\t\tcase SUE_DASH+1:\n\t\t{\n\t\t\t// flash\n\t\t\to->frame = (++o->timer & 2) ? 8 : 3;\t// frame 8 is invisible\n\t\t\t\n\t\t\tif (o->shaketime < 8)\n\t\t\t\to->nxflags &= ~NXFLAG_SLOW_X_WHEN_HURT;\n\t\t\t\n\t\t\tif (o->timer > 50 || \\\n\t\t\t\t(o->blockr && o->xinertia > 0) || \\\n\t\t\t\t(o->blockl && o->xinertia < 0))\n\t\t\t{\n\t\t\t\to->invisible = false;\n\t\t\t\to->state = SUE_BASE;\n\t\t\t\to->nxflags |= NXFLAG_SLOW_X_WHEN_HURT;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// sets FLAG_IGNORE_SOLID if the object is heading towards the center\n// of the room, clears it otherwise.\nstatic void set_ignore_solid(Object *o)\n{\n\tint map_right_half = ((map.xsize * TILE_W) << CSF) / 2;\n\tint map_bottom_half = ((map.ysize * TILE_H) << CSF) / 2;\n\t\n\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\n\tif ((o->x < map_right_half && o->xinertia > 0) || \\\n\t\t(o->x > map_right_half && o->xinertia < 0))\n\t{\n\t\tif ((o->y < map_bottom_half && o->yinertia > 0) || \\\n\t\t\t(o->y > map_bottom_half && o->yinertia < 0))\n\t\t{\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// shared between both Sue and Misery.\nstatic void sidekick_run_defeated(Object *o, int health)\n{\n\t// die if still around when core explodes\n\tif (o->state == SIDEKICK_CORE_DEFEATED_2)\n\t{\n\t\tif (!game.stageboss.object)\n\t\t\to->hp = 0;\n\t}\n\t\n\t// trigger die\n\tif (o->hp < (1000 - health))\n\t{\n\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\to->hp = 9999;\t// don't re-trigger\n\t\to->state = SIDEKICK_DEFEATED;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\t// the script triggers this if you defeat the core\n\t\t// without killing one or both sidekicks.\n\t\t//\n\t\t// once the core explodes and game.stageboss.object becomes NULL,\n\t\t// the sidekicks then enter the full defeated state and collapse.\n\t\tcase SIDEKICK_CORE_DEFEATED:\n\t\t{\n\t\t\tif (o->hp == 9999)\n\t\t\t{\t// we were already dead when core was killed--ignore.\n\t\t\t\to->state = SIDEKICK_DEFEATED+1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\to->hp = 9999;\n\t\t\t\t\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->frame = 9;\n\t\t\t\t\n\t\t\t\to->state = SIDEKICK_CORE_DEFEATED_2; // cannot \"state++\"; that is SIDEKICK_DEFEATED\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase SIDEKICK_DEFEATED:\n\t\t{\n\t\t\to->state++;\n\t\t\to->frame = 9;\n\t\t\to->damage = 0;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\n\t\t\to->yinertia = -0x200;\n\t\t\to->shaketime += 50;\n\t\t\t\n\t\t\tif (o->type == OBJ_SUE_FRENZIED)\n\t\t\t\tsue_was_killed = true;\t// trigger Misery to start spawning missiles\n\t\t}\n\t\tcase SIDEKICK_DEFEATED+1:\n\t\t{\n\t\t\to->yinertia += 0x20;\n\t\t\t\n\t\t\t#define FLOOR\t(((13 * TILE_H) - 13) << CSF)\n\t\t\tif (o->yinertia > 0 && o->y > FLOOR)\n\t\t\t{\n\t\t\t\to->y = FLOOR;\n\t\t\t\to->state++;\n\t\t\t\to->frame = 10;\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase SIDEKICK_CORE_DEFEATED_2: break;\n\t}\n}\n\n\n\n"
  },
  {
    "path": "ai/final_battle/sidekicks.fdh",
    "content": "//hash:afaf6e59\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-----------[referenced from ai/final_battle/sidekicks.cpp]---------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//-----------[referenced from ai/final_battle/sidekicks.cpp]---------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//-----------[referenced from ai/final_battle/sidekicks.cpp]---------//\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys);\nuint8_t GetAngle(int curx, int cury, int tgtx, int tgty);\nvoid ThrowObjectAtPlayer(Object *o, int rand_variance, int speed);\nvoid ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//-----------[referenced from ai/final_battle/sidekicks.cpp]---------//\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/final_battle/sidekicks.cpp */\n\n//-----------[referenced from ai/final_battle/sidekicks.cpp]---------//\nvoid ai_misery_frenzied(Object *o);\nstatic Object *fm_spawn_missile(Object *o, int angindex);\nvoid ai_misery_critter(Object *o);\nvoid ai_misery_bat(Object *o);\nvoid ai_misery_missile(Object *o);\nvoid ai_sue_frenzied(Object *o);\nstatic void sue_somersault(Object *o);\nstatic void sue_dash(Object *o);\nstatic void set_ignore_solid(Object *o);\nstatic void sidekick_run_defeated(Object *o, int health);\n\n\n/* located in sound/sound.cpp */\n\n//-----------[referenced from ai/final_battle/sidekicks.cpp]---------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-----------[referenced from ai/final_battle/sidekicks.cpp]---------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/first_cave/first_cave.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../weed/weed.fdh\"\t// for ai_critter\n#include \"first_cave.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BAT_BLUE, ai_bat_up_down);\n\tONTICK(OBJ_CRITTER_HOPPING_BLUE, ai_critter);\n\t\n\tONTICK(OBJ_HERMIT_GUNSMITH, ai_hermit_gunsmith);\n\tONTICK(OBJ_DOOR_ENEMY, ai_door_enemy);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_bat_up_down(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->ymark = o->y;\n\t\t\to->timer = random(0, 50);\n\t\t\to->state = 1;\n\t\tcase 1:\n\t\t\tif (!o->timer--)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->yinertia = 0x300;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tif (o->y >= o->ymark)\n\t\t\t\to->yinertia -= 0x10;\n\t\t\telse\n\t\t\t\to->yinertia += 0x10;\n\t\t\t\n\t\t\tLIMITY(0x300);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tFACEPLAYER;\n\tANIMATE(1, 2, 4);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_hermit_gunsmith(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\to->SnapToGround();\n\t\to->state = 1;\n\t}\n\t\n\tif (o->dir == RIGHT)\n\t{\n\t\tai_zzzz_spawner(o);\n\t}\n\telse\n\t{\n\t\to->frame = 0;\n\t\trandblink(o, 1, 8);\n\t}\n}\n\n\n\nvoid ai_door_enemy(Object *o)\n{\n\tenum { INIT = 0, WAIT, OPENEYE, CLOSEEYE };\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = WAIT;\n\t\t\n\t\tcase WAIT:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\tif (pdistlx(0x8000) && pdistly(0x8000))\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->state = OPENEYE;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase OPENEYE:\n\t\t{\n\t\t\tif (++o->animtimer > 2)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->frame++;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->frame > 2)\n\t\t\t{\n\t\t\t\to->frame = 2;\n\t\t\t\t\n\t\t\t\tif (!pdistlx(0x8000) || !pdistly(0x8000))\n\t\t\t\t{\n\t\t\t\t\to->state = CLOSEEYE;\n\t\t\t\t\to->animtimer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase CLOSEEYE:\n\t\t{\n\t\t\tif (++o->animtimer > 2)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\tif (--o->frame <= 0)\n\t\t\t\t{\n\t\t\t\t\to->frame = 0;\n\t\t\t\t\to->state = WAIT;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n"
  },
  {
    "path": "ai/first_cave/first_cave.fdh",
    "content": "//hash:3c4c85d2\n//automatically generated by Makegen\n\n/* located in ai/ai.cpp */\n\n//-----------[referenced from ai/first_cave/first_cave.cpp]----------//\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in ai/first_cave/first_cave.cpp */\n\n//-----------[referenced from ai/first_cave/first_cave.cpp]----------//\nvoid ai_bat_up_down(Object *o);\nvoid ai_hermit_gunsmith(Object *o);\nvoid ai_door_enemy(Object *o);\n\n\n/* located in ai/sand/puppy.cpp */\n\n//-----------[referenced from ai/first_cave/first_cave.cpp]----------//\nvoid ai_zzzz_spawner(Object *o);\n\n\n/* located in common/misc.cpp */\n\n//-----------[referenced from ai/first_cave/first_cave.cpp]----------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/hell/ballos_misc.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"ballos_misc.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BALLOS_SKULL, ai_ballos_skull);\n\tONTICK(OBJ_BALLOS_SPIKES, ai_ballos_spikes);\n\t\n\tONTICK(OBJ_GREEN_DEVIL, ai_green_devil);\n\tONTICK(OBJ_GREEN_DEVIL_SPAWNER, ai_green_devil_spawner);\n\t\n\tONTICK(OBJ_BUTE_SWORD_RED, ai_bute_sword_red);\n\tONTICK(OBJ_BUTE_ARCHER_RED, ai_bute_archer_red);\n\t\n\tONTICK(OBJ_WALL_COLLAPSER, ai_wall_collapser);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid ai_ballos_skull(Object *o)\n{\n\tANIMATE(8, 0, 3);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 100;\n\t\t\to->frame = random(0, 16) & 3;\n\t\t}\n\t\tcase 100:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x700);\n\t\t\t\n\t\t\tif (o->timer++ & 2)\n\t\t\t{\n\t\t\t\t(SmokePuff(o->x, o->y))->PushBehind(o);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->y > 0x10000)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\t\n\t\t\t\tif (o->blockd)\n\t\t\t\t{\n\t\t\t\t\to->yinertia = -0x200;\n\t\t\t\t\to->state = 110;\n\t\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\t\t\n\t\t\t\t\tquake(10, SND_BLOCK_DESTROY);\n\t\t\t\t\t\n\t\t\t\t\tfor(int i=0;i<4;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tObject *s = SmokePuff(o->x + random(-12<<CSF, 12<<CSF), \\\n\t\t\t\t\t\t\t\t\t\t\t  o->y + 0x2000);\n\t\t\t\t\t\t\n\t\t\t\t\t\ts->xinertia = random(-0x155, 0x155);\n\t\t\t\t\t\ts->yinertia = random(-0x600, 0);\n\t\t\t\t\t\ts->PushBehind(o);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 110:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\t\n\t\t\tif (o->Top() >= (map.ysize * TILE_H) << CSF)\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_ballos_spikes(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tif (++o->timer < 128)\n\t\t\t{\n\t\t\t\to->y -= 0x80;\n\t\t\t\to->frame = (o->timer & 2) ? 0 : 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\to->damage = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_green_devil_spawner(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->timer = random(0, 40);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (--o->timer < 0)\n\t\t\t{\n\t\t\t\tObject *dv = CreateObject(o->x, o->y, OBJ_GREEN_DEVIL, 0, 0, o->dir);\n\t\t\t\tdv->xinertia = random(-16<<CSF, 16<<CSF);\n\t\t\t\t\n\t\t\t\to->state = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\nvoid ai_green_devil(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->ymark = o->y;\n\t\t\to->yinertia = random(-5<<CSF, 5<<CSF);\n\t\t\to->damage = 3;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(2, 0, 1);\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x80 : -0x80;\n\t\t\t\n\t\t\tXACCEL(0x20);\n\t\t\tLIMITX(0x400);\n\t\t\t\n\t\t\tif (o->dir == LEFT)\n\t\t\t{\n\t\t\t\tif (o->x < -o->Width())\n\t\t\t\t\to->Delete();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->x > ((map.xsize * TILE_W) << CSF) + o->Width())\n\t\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_bute_sword_red(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->sprite = SPR_BUTE_SWORD_RED_FALLING;\n\t\t\to->MoveAtDir(o->dir, 0x600);\n\t\t\to->dir = 0;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(2, 0, 3);\n\t\t\t\n\t\t\tif (++o->timer == 8)\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\n\t\t\tif (o->timer >= 16)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->sprite = SPR_BUTE_SWORD_RED;\n\t\t\t\to->frame = 0;\n\t\t\t\t\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->damage = 5;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\tANIMATE(1, 0, 1);\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\t// when player is below them, they come towards him,\n\t\t\t// when player is above, they sweep away.\n\t\t\tif (player->CenterY() > (o->y + (24 << CSF)))\n\t\t\t{\n\t\t\t\tXACCEL(0x10);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tXACCEL(-0x10);\n\t\t\t}\n\t\t\t\n\t\t\to->yinertia += (o->y <= player->y) ? 0x10 : -0x10;\n\t\t\t\n\t\t\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t\t\t(o->blockr && o->xinertia > 0))\n\t\t\t{\n\t\t\t\to->xinertia = -o->xinertia;\n\t\t\t}\n\t\t\t\n\t\t\tif ((o->blocku && o->yinertia <= 0) || \\\n\t\t\t\t(o->blockd && o->yinertia >= 0))\n\t\t\t{\n\t\t\t\to->yinertia = -o->yinertia;\n\t\t\t}\n\t\t\t\n\t\t\tLIMITX(0x5ff);\n\t\t\tLIMITY(0x5ff);\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_bute_archer_red(Object *o)\n{\n\t//DebugCrosshair(o->x, o->y, 0, 255, 255);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\t\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t\t\n\t\t\tif (o->dir == LEFT)\n\t\t\t\to->xmark -= (128<<CSF);\n\t\t\telse\n\t\t\t\to->xmark += (128<<CSF);\n\t\t\t\n\t\t\to->xinertia = random(-0x400, 0x400);\n\t\t\to->yinertia = random(-0x400, 0x400);\n\t\t}\n\t\tcase 1:\t\t// come on screen\n\t\t{\n\t\t\tANIMATE(1, 0, 1);\n\t\t\t\n\t\t\tif ((o->dir == LEFT && o->x < o->xmark) || \\\n\t\t\t\t(o->dir == RIGHT && o->x > o->xmark))\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// aiming\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->timer = random(0, 150);\n\t\t\t\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tANIMATE(2, 2, 3);\n\t\t\t\n\t\t\tif (++o->timer > 300 || \\\n\t\t\t\t(pdistlx(112<<CSF) && pdistly(16<<CSF)))\n\t\t\t{\n\t\t\t\to->state = 30;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// flashing to fire\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->timer = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->frame = 3;\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\tANIMATE(1, 3, 4);\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = 40;\n\t\t\t\to->frame = 5;\n\t\t\t\t\n\t\t\t\tObject *arrow = CreateObject(o->x, o->y, OBJ_BUTE_ARROW);\n\t\t\t\tarrow->dir = o->dir;\n\t\t\t\tarrow->xinertia = (o->dir == RIGHT) ? 0x800 : -0x800;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// fired\n\t\t{\n\t\t\to->state = 41;\n\t\t\to->timer = 0;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 41:\n\t\t{\n\t\t\tANIMATE(2, 5, 6);\n\t\t\t\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\to->state = 50;\n\t\t\t\to->timer = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 50:\t// retreat offscreen\n\t\t{\n\t\t\tANIMATE(1, 0, 1);\n\t\t\tXACCEL(-0x20);\n\t\t\t\n\t\t\tif (o->Right() < 0 || o->Left() > ((map.xsize * TILE_W) << CSF))\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// sinusoidal hover around set point\n\tif (o->state != 50)\n\t{\n\t\to->xinertia += (o->x < o->xmark) ? 0x2A : -0x2A;\n\t\to->yinertia += (o->y < o->ymark) ? 0x2A : -0x2A;\n\t\tLIMITX(0x400);\n\t\tLIMITY(0x400);\n\t}\n\t\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// This object is responsible for collapsing the walls in the final best-ending sequence.\n// All the original object does is collapse one tile further every 101 frames.\n// However, since it's triggered at the beginning of the cinematic and then is let to run\n// through almost the entire thing it needs to be sync'd really-really perfect with a\n// number of other systems; the textboxes, etc.\n//\n// I spent several hours trying to get my events to run in perfect frame-by-frame\n// exactness with the original engine, and found several things that were slightly off.\n// However, I've decided that even if I got it absolutely perfect, it's too liable to\n// get broken by some minor innocent change in the future, and requires too much of\n// the engine to be tuned just so.\n//\n// So, I've added some event-based triggers to the object, that are NOT technically supposed\n// to be there. These will make extra sure that nothing embarrassing happens during this great\n// finale, such as the walls being one tile too far at one point, or even worse, having\n// them collapse onto Balrog before he makes it to the exit. Because there are no triggers\n// in the script and I can't change the script, I had to do a bit of sneaky spying on program\n// state to implement them.\nvoid ai_wall_collapser(Object *o)\n{\nint y;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->invisible = true;\n\t\t\to->timer = 0;\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// trigger\n\t\t{\n\t\t\tif (++o->timer > 100)\n\t\t\t{\n\t\t\t\to->timer2++;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tint xa = (o->x >> CSF) / TILE_W;\n\t\t\t\tint ya = (o->y >> CSF) / TILE_H;\n\t\t\t\tfor(y=0;y<20;y++)\n\t\t\t\t{\n\t\t\t\t\t// pushing the smoke behind all objects prevents it from covering\n\t\t\t\t\t// up the NPC's on the collapse just before takeoff.\n\t\t\t\t\tmap_ChangeTileWithSmoke(xa, ya+y, 109, 4, false, lowestobject);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\tquake(20);\n\t\t\t\t\n\t\t\t\tif (o->dir == LEFT) o->x -= (TILE_W << CSF);\n\t\t\t\t\t\t\t   else o->x += (TILE_W << CSF);\n\t\t\t\t\n\t\t\t\t// reached the solid tile in the center of the throne.\n\t\t\t\t// it isn't supposed to cover this tile until after Curly\n\t\t\t\t// says we're gonna get crushed.\n\t\t\t\tif (o->timer2 == 6)\n\t\t\t\t\to->state = 20;\n\t\t\t\t\n\t\t\t\t// balrog is about to take off/rescue you.\n\t\t\t\tif (o->timer2 == 9)\n\t\t\t\t\to->state = 30;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// \"gonna get crushed\" event\n\t\tcase 20:\n\t\t{\n\t\t\t// wait for text to come up\n\t\t\tif (textbox.IsVisible())\n\t\t\t\to->state = 21;\n\t\t}\n\t\tbreak;\n\t\tcase 21:\n\t\t{\n\t\t\t// wait for text to dismiss, then tile immediately collapses\n\t\t\tif (!textbox.IsVisible())\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->timer = 1000;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// balrog is about to take off. the video I took shows that\n\t\t// the walls are supposed to collapse into your space on the\n\t\t// exact same frame that he breaks the first ceiling tile.\n\t\tcase 30:\n\t\t{\n\t\t\to->linkedobject = Objects::FindByType(OBJ_BALROG_DROP_IN);\n\t\t\tif (o->linkedobject)\n\t\t\t\to->state = 31;\n\t\t}\n\t\tbreak;\n\t\tcase 31:\n\t\t{\n\t\t\t//debug(\"%x\", o->linkedobject->y);\n\t\t\tif (o->linkedobject && o->linkedobject->y <= 0x45800)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->timer = 1000;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n"
  },
  {
    "path": "ai/hell/ballos_misc.fdh",
    "content": "//hash:5423cebb\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//--------------[referenced from ai/hell/ballos_misc.cpp]------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/hell/ballos_misc.cpp]------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//--------------[referenced from ai/hell/ballos_misc.cpp]------------//\nvoid map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind);\n\n\n/* located in ai/hell/ballos_misc.cpp */\n\n//--------------[referenced from ai/hell/ballos_misc.cpp]------------//\nvoid ai_ballos_skull(Object *o);\nvoid ai_ballos_spikes(Object *o);\nvoid ai_green_devil_spawner(Object *o);\nvoid ai_green_devil(Object *o);\nvoid ai_bute_sword_red(Object *o);\nvoid ai_bute_archer_red(Object *o);\nvoid ai_wall_collapser(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//--------------[referenced from ai/hell/ballos_misc.cpp]------------//\nObject *SmokePuff(int x, int y);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/hell/ballos_misc.cpp]------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/hell/ballos_misc.cpp]------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/hell/ballos_priest.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"ballos_priest.fdh\"\n\nenum STATES\n{\n\tBP_FIGHTING_STANCE\t\t= 100,\t\t// show fighting stance, then prepare to fly lr\n\t\n\tBP_PREPARE_FLY_LR\t\t= 110,\t\t// duck a moment, then fly horizontally at player\n\tBP_PREPARE_FLY_UD\t\t= 120,\t\t// duck a moment, then fly vertically at player\n\t\n\tBP_FLY_LR\t\t\t\t= 130,\t\t// flying horizontally\n\tBP_FLY_UP\t\t\t\t= 140,\t\t// flying up\n\tBP_FLY_DOWN\t\t\t\t= 150,\t\t// flying down\n\t\n\tBP_HIT_WALL\t\t\t\t= 160,\t\t// hit wall while flying horizontally\n\tBP_HIT_CEILING\t\t\t= 170,\t\t// hit ceiling while flying up\n\tBP_HIT_FLOOR\t\t\t= 180,\t\t// hit floor while flying down\n\t\n\tBP_RETURN_TO_GROUND\t\t= 190,\t\t// faces screen and floats down to ground\n\tBP_LIGHTNING_STRIKE\t\t= 200,\t\t// lightning attack\n\t\n\tBP_DEFEATED\t\t\t\t= 1000\t\t// defeated (script-triggered)\n};\n\n#define DMG_NORMAL\t\t3\t\t// normal damage for touching him\n#define DMG_RUSH\t\t10\t\t// damage when he is rushing/flying at you\n\n#define RUSH_SPEED\t\t0x800\t\t// how fast he flies\n#define RUSH_DIST\t\t(16<<CSF)\t// how close he gets to you before changing direction\n\n#define FLOAT_Y\t\t\tMAPY(11)\t// Y position to rise to during lightning attack\n#define LIGHTNING_Y\t\tMAPY(19)\t// Y position lightning strikes hit (i.e., the floor)\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BALLOS_PRIEST, ai_ballos_priest);\n\t\n\tONTICK(OBJ_BALLOS_TARGET, ai_ballos_target);\n\tONTICK(OBJ_BALLOS_BONE_SPAWNER, ai_ballos_bone_spawner);\n\tONTICK(OBJ_BALLOS_BONE, ai_ballos_bone);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_ballos_priest(Object *o)\n{\n\t//AIDEBUG;\n\t//debug(\"timer3: %d\", o->timer3);\n\t\n\t/*if (o->state < 1000)\n\t{\n\t\tFindObjectByID2(500)->Delete();\n\t\tStartScript(900);\n\t\treturn;\n\t}*/\n\t\n\trun_intro(o);\n\trun_defeated(o);\n\t\n\trun_flight(o);\n\trun_lightning(o);\n\t\n\tswitch(o->state)\n\t{\n\t\t// show \"ninja\" stance for \"timer\" ticks,\n\t\t// then prepare to fly horizontally\n\t\tcase BP_FIGHTING_STANCE:\n\t\t{\n\t\t\to->frame = 1;\n\t\t\to->animtimer = 0;\n\t\t\to->state++;\n\t\t\t\n\t\t\to->damage = DMG_NORMAL;\n\t\t\to->savedhp = o->hp;\n\t\t}\n\t\tcase BP_FIGHTING_STANCE+1:\n\t\t{\n\t\t\tANIMATE(10, 1, 2);\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tif (--o->timer < 0 || (o->savedhp - o->hp) > 50)\n\t\t\t{\n\t\t\t\tif (++o->timer3 > 4)\n\t\t\t\t{\n\t\t\t\t\to->state = BP_LIGHTNING_STRIKE;\n\t\t\t\t\to->timer3 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = BP_PREPARE_FLY_LR;\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// prepare for flight attack\n\t\tcase BP_PREPARE_FLY_LR:\n\t\tcase BP_PREPARE_FLY_UD:\n\t\t{\n\t\t\to->timer2++;\n\t\t\to->state++;\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->frame = 3;\t// fists in\n\t\t\to->damage = DMG_NORMAL;\n\t\t\t\n\t\t\t// Fly/UD faces player only once, at start\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tcase BP_PREPARE_FLY_LR+1:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tcase BP_PREPARE_FLY_UD+1:\n\t\t{\n\t\t\t// braking, if we came here out of another fly state\n\t\t\to->xinertia *= 8; o->xinertia /= 9;\n\t\t\to->yinertia *= 8; o->yinertia /= 9;\n\t\t\t\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\t\n\t\t\t\tif (o->state == BP_PREPARE_FLY_LR+1)\n\t\t\t\t{\n\t\t\t\t\to->state = BP_FLY_LR;\t\t// flying left/right\n\t\t\t\t}\n\t\t\t\telse if (player->y < (o->y + (12 << CSF)))\n\t\t\t\t{\n\t\t\t\t\to->state = BP_FLY_UP;\t\t// flying up\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = BP_FLY_DOWN;\t\t// flying down\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// his bounding box is in a slightly different place on L/R frames\n\tif (o->dirparam != o->dir)\n\t{\n\t\tsprites[o->sprite].bbox = sprites[o->sprite].frame[0].dir[o->dir].pf_bbox;\n\t\to->dirparam = o->dir;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// handles his \"looping\" flight/rush attacks\nstatic void run_flight(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// flying left or right\n\t\tcase BP_FLY_LR:\n\t\t{\n\t\t\to->state++;\n\t\t\to->animtimer = 0;\n\t\t\to->frame = 6;\t\t// flying horizontally\n\t\t\t\n\t\t\to->yinertia = 0;\n\t\t\to->damage = DMG_RUSH;\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\tXMOVE(RUSH_SPEED);\n\t\t}\n\t\tcase BP_FLY_LR+1:\n\t\t{\n\t\t\tANIMATE(1, 6, 7);\n\t\t\t\n\t\t\t// smacked into wall?\n\t\t\tif ((o->blockl && o->dir == LEFT) || \\\n\t\t\t\t(o->blockr && o->dir == RIGHT))\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = BP_HIT_WALL;\n\t\t\t\to->damage = DMG_NORMAL;\n\t\t\t\to->timer = 0;\n\t\t\t\tmegaquake(10);\n\t\t\t}\n\t\t\t\n\t\t\t// reached player?\n\t\t\t// this has to be AFTER smacked-into-wall check for proper behavior\n\t\t\t// if player stands in spikes at far left/right of arena.\n\t\t\tif (pdistlx(RUSH_DIST))\n\t\t\t\to->state = BP_PREPARE_FLY_UD;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// smacked into wall while flying L/R\n\t\tcase BP_HIT_WALL:\n\t\t{\n\t\t\to->frame = 6;\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\tif (o->timer2 <= 3)\n\t\t\t\t\to->state = BP_PREPARE_FLY_LR;\n\t\t\t\telse\n\t\t\t\t\to->state = BP_RETURN_TO_GROUND;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\t// flying up\n\t\tcase BP_FLY_UP:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->frame = 8;\t\t// vertical flight\n\t\t\to->dir = LEFT;\t\t// up-facing frame\n\t\t\t\n\t\t\to->yinertia = -RUSH_SPEED;\n\t\t\to->xinertia = 0;\n\t\t\to->damage = DMG_RUSH;\n\t\t}\n\t\tcase BP_FLY_UP+1:\n\t\t{\n\t\t\tANIMATE(1, 8, 9);\n\t\t\t\n\t\t\t// hit ceiling? (to make this happen, break his loop and jump ABOVE him\n\t\t\t// while he is in the air, at the part where he would normally be\n\t\t\t// coming back down at you).\n\t\t\tif (o->blocku)\n\t\t\t{\n\t\t\t\to->state = BP_HIT_CEILING;\n\t\t\t\to->damage = DMG_NORMAL;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tSmokeXY(o->CenterX(), o->Top(), 8);\n\t\t\t\tmegaquake(10);\n\t\t\t\t\n\t\t\t\tspawn_bones(o, UP);\n\t\t\t}\n\t\t\t\n\t\t\t// reached player? (this check here isn't exactly the same as pdistly;\n\t\t\t// it's important that it checks the player's top and not his center).\n\t\t\tif ((abs(player->y - o->y) < RUSH_DIST) && o->timer2 < 4)\n\t\t\t\to->state = BP_PREPARE_FLY_LR;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BP_HIT_CEILING:\t// hit ceiling\n\t\t{\n\t\t\to->frame = 8;\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\tif (o->timer2 <= 3)\n\t\t\t\t\to->state = BP_PREPARE_FLY_LR;\n\t\t\t\telse\n\t\t\t\t\to->state = BP_RETURN_TO_GROUND;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\t// flying down\n\t\tcase BP_FLY_DOWN:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->frame = 8;\t\t// vertical flight\n\t\t\to->dir = RIGHT;\t\t// down-facing frame\n\t\t\t\n\t\t\to->yinertia = RUSH_SPEED;\n\t\t\to->xinertia = 0;\n\t\t\to->damage = DMG_RUSH;\n\t\t}\n\t\tcase BP_FLY_DOWN+1:\n\t\t{\n\t\t\tANIMATE(1, 8, 9);\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = BP_HIT_FLOOR;\n\t\t\t\to->damage = DMG_NORMAL;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tSmokeXY(o->CenterX(), o->Bottom(), 8);\n\t\t\t\tmegaquake(10);\n\t\t\t\t\n\t\t\t\tspawn_bones(o, DOWN);\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t\t\n\t\t\tif (pdistly(RUSH_DIST) && o->timer2 < 4)\n\t\t\t\to->state = BP_PREPARE_FLY_LR;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BP_HIT_FLOOR:\t// hit floor\n\t\t{\n\t\t\to->frame = 3;\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = BP_FIGHTING_STANCE;\n\t\t\t\to->timer = 120;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\t// come back to ground while facing head on\n\t\tcase BP_RETURN_TO_GROUND:\n\t\t{\n\t\t\to->frame = 4;\t\t// face screen frame\n\t\t\to->dir = LEFT;\t\t// non-flashing version\n\t\t\t\n\t\t\to->state++;\n\t\t}\n\t\tcase BP_RETURN_TO_GROUND+1:\n\t\t{\n\t\t\tANIMATE(1, 4, 5);\n\t\t\t\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 3; \t// landed\n\t\t\t\t\n\t\t\t\tFACEPLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BP_RETURN_TO_GROUND+2:\n\t\t{\n\t\t\to->xinertia *= 3;\n\t\t\to->xinertia /= 4;\n\t\t\t\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->state = BP_FIGHTING_STANCE;\n\t\t\t\to->timer = 140;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// creates the two bone spawners which appear when he crashes into the floor or ceiling.\n// pass UP if he has hit the ceiling, DOWN if he has hit the floor.\nstatic void spawn_bones(Object *o, int dir)\n{\nint y;\n\n\tif (dir == UP)\n\t\ty = (o->y - (12 << CSF));\n\telse\n\t\ty = (o->y + (12 << CSF));\n\t\n\tCreateObject(o->x - (12<<CSF), y, OBJ_BALLOS_BONE_SPAWNER)->dir = LEFT;\n\tCreateObject(o->x + (12<<CSF), y, OBJ_BALLOS_BONE_SPAWNER)->dir = RIGHT;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// his lightning-strike attack\nstatic void run_lightning(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// lightning strikes (targeting player)\n\t\tcase BP_LIGHTNING_STRIKE:\n\t\t{\n\t\t\to->xmark = player->x;\n\t\t\to->yinertia = -0x600;\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->timer2 = 0;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->frame = 4;\t\t// facing screen\n\t\t\to->dir = LEFT;\t\t// not flashing\n\t\t\t\n\t\t\to->state++;\n\t\t}\n\t\tcase BP_LIGHTNING_STRIKE+1:\n\t\t{\n\t\t\tANIMATE(1, 4, 5);\n\t\t\t\n\t\t\to->xinertia += (o->x < o->xmark) ? 0x40 : -0x40;\n\t\t\to->yinertia += (o->y < FLOAT_Y) ? 0x40 : -0x40;\n\t\t\tLIMITX(0x400);\n\t\t\tLIMITY(0x400);\n\t\t\t\n\t\t\t// run firing\n\t\t\tif (++o->timer > 200)\n\t\t\t{\n\t\t\t\tint pos = (o->timer % 40);\n\t\t\t\t\n\t\t\t\tif (pos == 1)\n\t\t\t\t{\n\t\t\t\t\t// spawn lightning target\n\t\t\t\t\tCreateObject(player->CenterX(), LIGHTNING_Y, OBJ_BALLOS_TARGET)->dir = LEFT;\n\t\t\t\t\to->dir = RIGHT;\t\t// switch to flashing frames\n\t\t\t\t\to->animtimer = 0;\n\t\t\t\t\t\n\t\t\t\t\t// after 8 attacks, switch to even-spaced strikes\n\t\t\t\t\tif (++o->timer2 >= 8)\n\t\t\t\t\t{\n\t\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\t\to->yinertia = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\to->dir = RIGHT;\t\t// flashing\n\t\t\t\t\t\to->frame = 5;\t\t// flash red then white during screen flash\n\t\t\t\t\t\to->animtimer = 1;\t// desync animation from screen flashes so it's visible\n\t\t\t\t\t\t\n\t\t\t\t\t\to->state++;\n\t\t\t\t\t\to->timer = 0;\n\t\t\t\t\t\to->timer2 = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (pos == 20)\n\t\t\t\t{\n\t\t\t\t\to->dir = LEFT;\t\t// stop flashing\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// lightning strikes (evenly-spaced everywhere)\n\t\tcase BP_LIGHTNING_STRIKE+2:\n\t\t{\n\t\t\tANIMATE(1, 4, 5);\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 40)\n\t\t\t\tflashscreen.Start();\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t{\n\t\t\t\tif ((o->timer % 10) == 1)\n\t\t\t\t{\n\t\t\t\t\tCreateObject((o->timer2 * TILE_W) << CSF, \\\n\t\t\t\t\t\t\t\t LIGHTNING_Y, OBJ_BALLOS_TARGET)->dir = LEFT;\n\t\t\t\t\to->timer2 += 4;\n\t\t\t\t\t\n\t\t\t\t\tif (o->timer2 >= 40)\n\t\t\t\t\t\to->state = BP_RETURN_TO_GROUND;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// intro cinematic sequence\nstatic void run_intro(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// idle/talking to player\n\t\tcase 0:\n\t\t{\n\t\t\t// setup\n\t\t\to->y -= (6<<CSF);\n\t\t\to->dir = LEFT;\n\t\t\to->damage = 0;\n\t\t\t\n\t\t\t// ensure copy pfbox first time\n\t\t\to->dirparam = -1;\n\t\t\t\n\t\t\t// closed eyes/mouth\n\t\t\to->linkedobject = CreateObject(o->x, o->y - (16 << CSF), OBJ_BALLOS_SMILE);\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// fight begin\n\t\t// he smiles, then enters base attack state\n\t\tcase 10:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// animate smile/open eyes\n\t\t\tif (o->timer > 50)\n\t\t\t{\n\t\t\t\tObject *smile = o->linkedobject;\n\t\t\t\tif (smile)\n\t\t\t\t{\n\t\t\t\t\tif (++smile->animtimer > 4)\n\t\t\t\t\t{\n\t\t\t\t\t\tsmile->animtimer = 0;\n\t\t\t\t\t\tsmile->frame++;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (smile->frame > 2)\n\t\t\t\t\t\t\tsmile->Delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (o->timer > 100)\n\t\t\t\t{\n\t\t\t\t\to->state = BP_FIGHTING_STANCE;\n\t\t\t\t\to->timer = 150;\n\t\t\t\t\t\n\t\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n// defeat sequence\n// he flies away, then the script triggers the next form\nstatic void run_defeated(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// defeated (script triggered; constant value 1000)\n\t\tcase BP_DEFEATED:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->frame = 10;\n\t\t\t\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\t\tSmokeClouds(o, 16, 16, 16);\n\t\t\tsound(SND_BIG_CRASH);\n\t\t\t\n\t\t\to->xmark = o->x;\n\t\t\to->xinertia = 0;\n\t\t}\n\t\tcase BP_DEFEATED+1:\t\t// fall to ground, shaking\n\t\t{\n\t\t\to->yinertia += 0x20;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\to->x = o->xmark;\n\t\t\tif (++o->timer & 2) o->x += (1 << CSF);\n\t\t\t\t\t\t   else o->x -= (1 << CSF);\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\tif (++o->timer > 150)\n\t\t\t\t{\n\t\t\t\t\to->state++;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\to->frame = 3;\n\t\t\t\t\tFACEPLAYER;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BP_DEFEATED+2:\t\t// prepare to jump\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->yinertia = -0xA00;\n\t\t\t\t\n\t\t\t\to->state++;\n\t\t\t\to->frame = 8;\n\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BP_DEFEATED+3:\t\t// jumping\n\t\t{\n\t\t\tANIMATE(1, 8, 9);\n\t\t\to->dir = LEFT;\t\t// up frame\n\t\t\t\n\t\t\tif (o->y < 0)\n\t\t\t{\n\t\t\t\tflashscreen.Start();\n\t\t\t\tsound(SND_TELEPORT);\n\t\t\t\t\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->state++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// targeter for lightning strikes\nvoid ai_ballos_target(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// position to shoot lightning at passed as x,y\n\t\t\to->xmark = o->CenterX() - ((sprites[SPR_LIGHTNING].w / 2) << CSF);\n\t\t\to->ymark = o->CenterY();\n\t\t\t\n\t\t\t// adjust our Y coordinate to match player's\n\t\t\to->y = player->CenterY();\n\t\t\t\n\t\t\tsound(SND_CHARGE_GUN);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(1, 0, 1);\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 20 && o->dir == LEFT)\n\t\t\t{\t// lightning attack\n\t\t\t\t// setting lightning dir=left: tells it do not flash screen\n\t\t\t\tCreateObject(o->xmark, o->ymark, OBJ_LIGHTNING)->dir = LEFT;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 40)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n\n// white sparky thing that moves along floor throwing out bones,\n// spawned he hits the ground.\n// similar to the red smoke-spawning ones from Undead Core.\nvoid ai_ballos_bone_spawner(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tsound(SND_MISSILE_HIT);\n\t\t\to->state = 1;\n\t\t\t\n\t\t\tXMOVE(0x400);\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(1, 0, 2);\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif ((o->timer % 6) == 1)\n\t\t\t{\n\t\t\t\tint xi = (random(4, 16) << CSF) / 8;\n\t\t\t\t\n\t\t\t\tif (o->dir == LEFT)\n\t\t\t\t\txi = -xi;\n\t\t\t\t\n\t\t\t\tCreateObject(o->x, o->y, OBJ_BALLOS_BONE, xi, -0x400);\n\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t}\n\t\t\t\n\t\t\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t\t\t(o->blockr && o->xinertia > 0))\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n\n// bones emitted by bone spawner\nvoid ai_ballos_bone(Object *o)\n{\n\tANIMATE(3, 0, 2);\n\t\n\tif (o->blockd && o->yinertia >= 0)\n\t{\n\t\tif (o->state == 0)\n\t\t{\n\t\t\to->yinertia = -0x200;\n\t\t\to->state = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\teffect(o->CenterX(), o->CenterY(), EFFECT_FISHY);\n\t\t\to->Delete();\n\t\t}\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\n\n\n"
  },
  {
    "path": "ai/hell/ballos_priest.fdh",
    "content": "//hash:23301a33\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//-------------[referenced from ai/hell/ballos_priest.cpp]-----------//\nvoid megaquake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//-------------[referenced from ai/hell/ballos_priest.cpp]-----------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//-------------[referenced from ai/hell/ballos_priest.cpp]-----------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/hell/ballos_priest.cpp */\n\n//-------------[referenced from ai/hell/ballos_priest.cpp]-----------//\nvoid ai_ballos_priest(Object *o);\nstatic void run_flight(Object *o);\nstatic void spawn_bones(Object *o, int dir);\nstatic void run_lightning(Object *o);\nstatic void run_intro(Object *o);\nstatic void run_defeated(Object *o);\nvoid ai_ballos_target(Object *o);\nvoid ai_ballos_bone_spawner(Object *o);\nvoid ai_ballos_bone(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-------------[referenced from ai/hell/ballos_priest.cpp]-----------//\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//-------------[referenced from ai/hell/ballos_priest.cpp]-----------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-------------[referenced from ai/hell/ballos_priest.cpp]-----------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/hell/hell.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"hell.fdh\"\n\n#define BUTE_HP\t\t\t4\n#define MESA_HP\t\t\t64\n#define DELEET_HP\t\t32\n#define STATUE_HP\t\t100\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BUTE_FLYING, ai_bute_flying);\n\tONTICK(OBJ_BUTE_DYING, ai_bute_dying);\n\t\n\tONTICK(OBJ_BUTE_SPAWNER, ai_bute_spawner);\n\tONTICK(OBJ_BUTE_FALLING, ai_bute_falling);\n\t\n\tONTICK(OBJ_BUTE_SWORD, ai_bute_sword);\n\tONTICK(OBJ_BUTE_ARCHER, ai_bute_archer);\n\tONTICK(OBJ_BUTE_ARROW, ai_bute_arrow);\n\t\n\tONTICK(OBJ_MESA, ai_mesa);\n\tONTICK(OBJ_MESA_BLOCK, ai_mesa_block);\n\tONTICK(OBJ_MESA_DYING, ai_bute_dying);\n\t\n\tONTICK(OBJ_DELEET, ai_deleet);\n\tONTICK(OBJ_ROLLING, ai_rolling);\n\t\n\tONTICK(OBJ_STATUE, ai_statue);\n\tONTICK(OBJ_STATUE_BASE, ai_statue_base);\n\t\n\tONTICK(OBJ_PUPPY_GHOST, ai_puppy_ghost);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_bute_flying(Object *o)\n{\n\t//AIDEBUG;\n\tif (run_bute_defeated(o, BUTE_HP))\n\t\treturn;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->invisible = true;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (o->dir == LEFT)\n\t\t\t{\n\t\t\t\tif (player->x > (o->x - (288<<CSF)) && \\\n\t\t\t\t\tplayer->x < (o->x - (272<<CSF)))\n\t\t\t\t{\n\t\t\t\t\to->state = 10;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (player->x < (o->x + (288<<CSF)) && \\\n\t\t\t\t\tplayer->x > (o->x + (272<<CSF)))\n\t\t\t\t{\n\t\t\t\t\to->state = 10;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->invisible = false;\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->damage = 5;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\tANIMATE(1, 0, 1);\n\t\t\t\n\t\t\tXACCEL(0x10);\n\t\t\to->yinertia += (o->y > player->y) ? -0x10 : 0x10;\n\t\t\t\n\t\t\tLIMITX(0x5ff);\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t\t\t(o->blockr && o->xinertia > 0))\n\t\t\t{\n\t\t\t\to->xinertia = -o->xinertia;\n\t\t\t}\n\t\t\t\n\t\t\tif ((o->blockd && o->yinertia > 0) || \\\n\t\t\t\t(o->blocku && o->yinertia < 0))\n\t\t\t{\n\t\t\t\to->yinertia = -o->yinertia;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// Butes that come down from ceiling\nvoid ai_bute_spawner(Object *o)\n{\nstatic const int NUM_BUTES = 8;\n\n\tswitch(o->state)\n\t{\n\t\tcase 10:\t// script trigger (dir set by script at same time)\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif ((o->timer % 50) == 1)\n\t\t\t{\n\t\t\t\tCreateObject(o->x, o->y, OBJ_BUTE_FALLING, 0, 0, o->dir);\n\t\t\t\t\n\t\t\t\tif (o->timer == ((NUM_BUTES - 1) * 50) + 1)\n\t\t\t\t\to->state = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_bute_falling(Object *o)\n{\n\tANIMATE(3, 0, 3);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->MoveAtDir(o->dir, 0x600);\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 16)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t}\n\t\t\telse if (o->timer > 16 && o->block[o->dir])\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 20)\n\t\t\t{\n\t\t\t\tswitch(o->dir)\n\t\t\t\t{\n\t\t\t\t\tcase LEFT:\n\t\t\t\t\t\tif (o->CenterX() <= player->CenterX() + (32<<CSF))\n\t\t\t\t\t\t\to->state = 10;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase RIGHT:\n\t\t\t\t\t\tif (o->CenterX() >= player->CenterX() - (32<<CSF))\n\t\t\t\t\t\t\to->state = 10;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase UP:\n\t\t\t\t\t\tif (o->CenterY() <= player->CenterY() + (32<<CSF))\n\t\t\t\t\t\t\to->state = 10;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase DOWN:\n\t\t\t\t\t\tif (o->CenterY() >= player->CenterY() - (32<<CSF))\n\t\t\t\t\t\t\to->state = 10;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\to->y += (4 << CSF);\n\t\t\to->ChangeType(OBJ_BUTE_FLYING);\n\t\t\to->state = 10;\t// trigger flight immediately\n\t\t\t\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_bute_sword(Object *o)\n{\n\tif (run_bute_defeated(o, BUTE_HP))\n\t\treturn;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->flags |= (FLAG_SHOOTABLE | FLAG_INVULNERABLE);\n\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t\to->damage = 0;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\t\t// lying in wait\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tif (pdistlx(128<<CSF) && \\\n\t\t\t\tpdistly2(128<<CSF, 16<<CSF))\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// wait a moment, then start running at player\n\t\tcase 10:\n\t\t{\n\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\to->damage = 0;\n\t\t\to->frame = 0;\n\t\t\t\n\t\t\to->state = 11;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// run at player and jump\n\t\tcase 20:\n\t\t{\n\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\to->state = 21;\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tANIMATE(3, 0, 1);\n\t\t\tXMOVE(0x400);\n\t\t\t\n\t\t\tif (pdistlx(40<<CSF))\n\t\t\t{\n\t\t\t\to->xinertia /= 2;\n\t\t\t\to->yinertia = -0x300;\n\t\t\t\t\n\t\t\t\to->state = 30;\n\t\t\t\to->frame = 2;\t// sword back, jumping\n\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t}\n\t\t\telse if (++o->timer > 50)\n\t\t\t{\t// timeout, p got away\n\t\t\t\to->state = 10;\n\t\t\t\to->xinertia = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// jumping up\n\t\tcase 30:\n\t\t{\n\t\t\tif (o->yinertia > -0x80)\n\t\t\t{\n\t\t\t\to->frame = 3;\t// sword swipe fwd\n\t\t\t\to->damage = 9;\n\t\t\t\t\n\t\t\t\to->state = 31;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// swiping sword, in air\n\t\tcase 31:\n\t\t{\n\t\t\tif (++o->timer > 2)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 4;\t// sword down, in front\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia > 0)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->damage = 3;\n\t\t\t\t\n\t\t\t\to->state = 32;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 32:\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n}\n\n\nvoid ai_bute_archer(Object *o)\n{\n\tif (run_bute_defeated(o, BUTE_HP))\n\t\treturn;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// waiting for player (when haven't seen him yet)\n\t\t{\n\t\t\tif ((o->dir == LEFT  && player->CenterX() < o->CenterX()) || \\\n\t\t\t\t(o->dir == RIGHT && player->CenterX() > o->CenterX()))\n\t\t\t{\n\t\t\t\tif (pdistlx(320<<CSF) && pdistly(160<<CSF))\n\t\t\t\t{\n\t\t\t\t\to->state = 10;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// aiming--can track player here for a brief period\n\t\tcase 10:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tif (!pdistlx(224<<CSF) || player->y <= (o->y - (8<<CSF)))\n\t\t\t{\n\t\t\t\to->frame = 4;\t// shooting up\n\t\t\t\to->timer2 = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->frame = 1;\t// shooting straight\n\t\t\t\to->timer2 = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// flashing to fire\n\t\tcase 20:\n\t\t{\n\t\t\tif (o->timer2 == 0)\n\t\t\t\tANIMATE(0, 1, 2)\n\t\t\telse\n\t\t\t\tANIMATE(0, 4, 5)\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t\to->state = 30;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// fire\n\t\tcase 30:\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tObject *arrow = CreateObject(o->CenterX(), o->CenterY(), OBJ_BUTE_ARROW);\n\t\t\tarrow->xinertia = (o->dir == RIGHT) ? 0x600 : -0x600;\n\t\t\t\n\t\t\tif (o->timer2 == 1)\t\t// shooting up\n\t\t\t\tarrow->yinertia = -0x600;\n\t\t\t\n\t\t\t// frame: arrow away\n\t\t\to->frame = (o->timer2 == 1) ? 6 : 3;\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = 40;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = random(50, 150);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// after fire, and the \"woken up\" waiting-for-player state\n\t\tcase 40:\n\t\t{\n\t\t\tif (pdistlx(352<<CSF) && pdistly(240<<CSF))\n\t\t\t{\n\t\t\t\tif (--o->timer < 0)\n\t\t\t\t\to->state = 10;\t// fire again\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// player got away, do nothing until he returns\n\t\t\t\to->timer = 150;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_bute_arrow(Object *o)\n{\n\t// check for hit wall/floor etc\n\tif (o->state < 20)\n\t{\n\t\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t\t(o->blockr && o->xinertia > 0) || \\\n\t\t\t(o->blocku && o->yinertia <= 0) || \\\n\t\t\t(o->blockd && o->yinertia >= 0))\n\t\t{\n\t\t\tif (!(o->flags & FLAG_IGNORE_SOLID))\n\t\t\t\to->state = 20;\n\t\t}\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// set appropriate frame for initial direction\n\t\t\to->sprite = (o->xinertia < 0) ? SPR_BUTE_ARROW_LEFT : SPR_BUTE_ARROW_RIGHT;\n\t\t\to->frame = (o->yinertia < 0) ? 0 : 2;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (++o->timer == 4)\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\n\t\t\tif (o->timer > 10)\n\t\t\t\to->state = 10;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\to->state = 11;\n\t\t\t\n\t\t\t// slow down a bit (was going real fast from bow)\n\t\t\to->xinertia *= 3;\n\t\t\to->xinertia /= 4;\n\t\t\t\n\t\t\to->yinertia *= 3;\n\t\t\to->yinertia /= 4;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\to->yinertia += 0x20;\n\t\t\t\n\t\t\tANIMATE_FWD(10);\n\t\t\tif (o->frame > 4) o->frame = 4;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// hit something\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->timer = 0;\n\t\t\to->damage = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer > 30)\n\t\t\t\to->invisible = (o->timer & 2);\n\t\t\t\t\n\t\t\tif (o->timer > 61)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tLIMITY(0x5ff);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid ai_bute_dying(Object *o)\n{\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_IGNORE_SOLID | FLAG_SHOW_FLOATTEXT);\n\t\t\to->damage = 0;\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->state = 1;\n\t\t\t\n\t\t\to->yinertia = -0x200;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\to->xinertia *= 8;\n\t\t\to->xinertia /= 9;\n\t\t\t\n\t\t\tANIMATE(3, 1, 2);\n\t\t\t\n\t\t\tif (++o->timer > 50)\n\t\t\t\to->DealDamage(10000);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n}\n\nstatic bool run_bute_defeated(Object *o, int hp)\n{\n\tif (o->hp <= (1000 - hp))\n\t{\n\t\tif (o->type == OBJ_MESA)\n\t\t{\n\t\t\to->ChangeType(OBJ_MESA_DYING);\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->x -= (4 << CSF);\n\t\t\to->y -= (4 << CSF);\n\t\t\to->ChangeType(OBJ_BUTE_DYING);\n\t\t\t\n\t\t\tsound(SND_ENEMY_SQUEAK);\n\t\t\tXMOVE(-0x100);\n\t\t}\n\t\t\n\t\tai_bute_dying(o);\n\t\treturn 1;\n\t}\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_mesa(Object *o)\n{\n\tif (run_bute_defeated(o, MESA_HP))\n\t\treturn;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->y += (4<<CSF);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(40, 0, 1);\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tif (pdistlx(320<<CSF) && pdistly(160<<CSF))\n\t\t\t{\n\t\t\t\tif (++o->timer > 50)\n\t\t\t\t\to->state = 10;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->timer = 0;\n\t\t\to->frame = 2;\t// hand down\n\t\t\t\n\t\t\tint x = o->x + ((o->dir == LEFT) ? (7<<CSF) : -(7<<CSF));\n\t\t\tint y = o->y + (10<<CSF);\n\t\t\t\n\t\t\to->linkedobject = CreateObject(x, y, OBJ_MESA_BLOCK);\n\t\t\to->linkedobject->linkedobject = o;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 3;\t// hand up, throwing\n\t\t\t\t\n\t\t\t\tif (o->linkedobject)\n\t\t\t\t{\n\t\t\t\t\tObject *&block = o->linkedobject;\n\t\t\t\t\t\n\t\t\t\t\tblock->y = (o->y - (4<<CSF));\n\t\t\t\t\tblock->xinertia = (o->dir == RIGHT) ? 0x400 : -0x400;\n\t\t\t\t\tblock->yinertia = -0x400;\n\t\t\t\t\tblock->state = 1;\n\t\t\t\t\t\n\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t\tblock->linkedobject = NULL;\n\t\t\t\t\to->linkedobject = NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\n\t\t{\n\t\t\tif (++o->timer > 20)\n\t\t\t{\t// throw again, if player still near\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x55;\n\tLIMITY(0x5ff);\n}\n\nvoid ai_mesa_block(Object *o)\n{\n\tANIMATE(0, 0, 1);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// being held\n\t\t{\n\t\t\tif (!o->linkedobject || o->linkedobject->type == OBJ_MESA_DYING)\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// launched\n\t\t{\n\t\t\tif (++o->timer == 4)\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\n\t\t\to->yinertia += 0x2A;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->deleted)\n\t{\n\t\tSmokeClouds(o, 3, 0, 0);\n\t\teffect(o->x, o->y, EFFECT_BOOMFLASH);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_deleet(Object *o)\n{\n\t// trigger counter\n\tif (o->hp < (1000 - DELEET_HP) && o->state < 2)\n\t{\n\t\to->state = 2;\n\t\to->timer = 0;\n\t\to->frame = 2;\n\t\t\n\t\to->flags |= FLAG_INVULNERABLE;\n\t\tsound(SND_CHEST_OPEN);\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->x += (TILE_W / 2) << CSF;\n\t\t\to->y += (TILE_H / 2) << CSF;\n\t\t\t\n\t\t\tif (o->dir == LEFT)\n\t\t\t\to->y += (8<<CSF);\n\t\t\telse\n\t\t\t\to->x += (8<<CSF);\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (o->shaketime)\n\t\t\t\to->timer2++;\n\t\t\telse\n\t\t\t\to->timer2 = 0;\n\t\t\t\n\t\t\to->frame = (o->timer2 & 2) ? 1 : 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tint counter = -1;\n\t\t\t\n\t\t\tswitch(o->timer)\n\t\t\t{\n\t\t\t\tcase 0:\t\tcounter = 0; break;\t// 5\n\t\t\t\tcase 50:\tcounter = 1; break;\t// 4\n\t\t\t\tcase 100:\tcounter = 2; break;\t// 3\n\t\t\t\tcase 150:\tcounter = 3; break;\t// 2\n\t\t\t\tcase 200:\tcounter = 4; break;\t// 1\n\t\t\t\t\n\t\t\t\tcase 250:\n\t\t\t\t{\n\t\t\t\t\to->state = 3;\n\t\t\t\t\to->sprite = SPR_BBOX_PUPPET_1;\n\t\t\t\t\to->invisible = true;\n\t\t\t\t\t\n\t\t\t\t\tsprites[o->sprite].bbox.x1 = -48;\n\t\t\t\t\tsprites[o->sprite].bbox.x2 = 48;\n\t\t\t\t\tsprites[o->sprite].bbox.y1 = -48;\n\t\t\t\t\tsprites[o->sprite].bbox.y2 = 48;\n\t\t\t\t\to->damage = 12;\n\t\t\t\t\t\n\t\t\t\t\tquake(10);\n\t\t\t\t\tSmokeXY(o->x, o->y, 40, 48, 48);\n\t\t\t\t\t\n\t\t\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\t\t\n\t\t\t\t\tif (o->dir == LEFT)\n\t\t\t\t\t{\n\t\t\t\t\t\tint x = (o->x >> CSF) / TILE_W;\n\t\t\t\t\t\tint y = ((o->y >> CSF) - 8) / TILE_H;\n\t\t\t\t\t\t\n\t\t\t\t\t\tmap.tiles[x][y] = 0;\n\t\t\t\t\t\tmap.tiles[x][y+1] = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tint x = ((o->x >> CSF) - 8) / TILE_W;\n\t\t\t\t\t\tint y = (o->y >> CSF) / TILE_H;\n\t\t\t\t\t\t\n\t\t\t\t\t\tmap.tiles[x][y] = 0;\n\t\t\t\t\t\tmap.tiles[x+1][y] = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (counter != -1)\n\t\t\t{\n\t\t\t\tCreateObject(o->x, o->y - (8<<CSF), \\\n\t\t\t\t\t\tOBJ_COUNTER_BOMB_NUMBER)->frame = counter;\n\t\t\t}\n\t\t\t\n\t\t\to->timer++;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\n\t\t{\n\t\t\t// make the explosion sound and drop powerups\n\t\t\to->Kill();\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_rolling(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\t// exploding out of blocks (Rollings in Heavy Press area)\n\t\tint mx = (o->CenterX() >> CSF) / TILE_W;\n\t\tint my = (o->CenterY() >> CSF) / TILE_H;\n\t\t\n\t\tif (map.tiles[mx][my])\n\t\t\tmap_ChangeTileWithSmoke(mx, my, 0, 8);\n\t\t\n\t\to->state = 1;\n\t}\n\t\n\tswitch(o->dir)\n\t{\n\t\tcase LEFT:\n\t\t{\n\t\t\to->xinertia -= 0x40;\n\t\t\to->yinertia = 0;\n\t\t\tif (o->blockl) o->dir = UP;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase UP:\n\t\t{\n\t\t\to->yinertia -= 0x40;\n\t\t\to->xinertia = 0;\n\t\t\tif (o->blocku) o->dir = RIGHT;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase RIGHT:\n\t\t{\n\t\t\to->xinertia += 0x40;\n\t\t\to->yinertia = 0;\n\t\t\tif (o->blockr) o->dir = DOWN;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase DOWN:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\to->xinertia = 0;\n\t\t\tif (o->blockd) o->dir = LEFT;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tANIMATE(1, 0, 2);\n\tLIMITX(0x400);\n\tLIMITY(0x400);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// I don't think it does anything, it seems to be just an invisible marker\n// used to bring up the signs when you press DOWN in front of the statues.\n// But unlike OBJ_NULL, it can be positioned in-between a tile boundary.\n// There's also one on top of the clockroom sign on the Outer Wall.\nvoid ai_statue_base(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\to->state = 1;\n\t\to->sprite = SPR_NULL;\n\t\t\n\t\tif (o->dir == LEFT)\n\t\t{\n\t\t\to->x += (8 << CSF);\n\t\t}\n\t\telse if (o->dir == RIGHT)\n\t\t{\n\t\t\to->y += (16 << CSF);\n\t\t}\n\t}\n}\n\n// frame is passed in the ANP as if it were a dir, and all of these state numbers can\n// also be set by the scripts, so they really shouldn't be messed with.\nvoid ai_statue(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->frame = (o->dirparam / 10);\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\tif (game.flags[o->id1])\n\t\t\t{\t// already been destroyed\n\t\t\t\to->state = 20;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->state = 11;\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t}\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tif (o->hp < (1000 - STATUE_HP))\n\t\t\t{\n\t\t\t\tObject *ns = CreateObject(o->x, o->y, o->type);\n\t\t\t\tns->dirparam = (o->frame + 4) * 10;\n\t\t\t\to->Kill();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\n\t\t{\n\t\t\to->frame += 4;\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_puppy_ghost(Object *o)\n{\n\to->timer++;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 10:\t// disappear after talking\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->timer = 2;\n\t\t\tsound(SND_TELEPORT);\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\to->invisible = (o->timer & 2);\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif ((o->timer % 8) == 1)\n\t{\n\t\teffect(random(o->Left(), o->Right()), o->Bottom(), EFFECT_GHOST_SPARKLE);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/hell/hell.fdh",
    "content": "//hash:513da2f0\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//-----------------[referenced from ai/hell/hell.cpp]----------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//-----------------[referenced from ai/hell/hell.cpp]----------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//-----------------[referenced from ai/hell/hell.cpp]----------------//\nvoid map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind);\n\n\n/* located in caret.cpp */\n\n//-----------------[referenced from ai/hell/hell.cpp]----------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/hell/hell.cpp */\n\n//-----------------[referenced from ai/hell/hell.cpp]----------------//\nvoid ai_bute_flying(Object *o);\nvoid ai_bute_spawner(Object *o);\nvoid ai_bute_falling(Object *o);\nvoid ai_bute_sword(Object *o);\nvoid ai_bute_archer(Object *o);\nvoid ai_bute_arrow(Object *o);\nvoid ai_bute_dying(Object *o);\nstatic bool run_bute_defeated(Object *o, int hp);\nvoid ai_mesa(Object *o);\nvoid ai_mesa_block(Object *o);\nvoid ai_deleet(Object *o);\nvoid ai_rolling(Object *o);\nvoid ai_statue_base(Object *o);\nvoid ai_statue(Object *o);\nvoid ai_puppy_ghost(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------------[referenced from ai/hell/hell.cpp]----------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/hell/hell.cpp]----------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/hell/hell.cpp]----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/last_cave/last_cave.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../plantation/plantation.fdh\"\t// ai_droll_shot\n#include \"../sym/sym.fdh\"\t\t\t\t// ai_press\n#include \"last_cave.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_CRITTER_HOPPING_RED, ai_critter_hopping_red);\n\t\n\tONTICK(OBJ_LAVA_DRIP_SPAWNER, ai_lava_drip_spawner);\n\tONTICK(OBJ_LAVA_DRIP, ai_lava_drip);\n\t\n\tONTICK(OBJ_RED_BAT_SPAWNER, ai_red_bat_spawner);\n\tONTICK(OBJ_RED_BAT, ai_red_bat);\n\t\n\tONTICK(OBJ_RED_DEMON, ai_red_demon);\n\tONTICK(OBJ_RED_DEMON_SHOT, ai_droll_shot);\n\t\n\tONTICK(OBJ_PROXIMITY_PRESS_VERT, ai_proximity_press_vert);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_proximity_press_vert(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tif (pdistlx(8<<CSF) && pdistly2(8<<CSF, 128<<CSF) && \\\n\t\t\t\t!o->blockd)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\tif (o->frame < 2)\n\t\t\t\tANIMATE_FWD(2);\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\tif (o->frame >= 2)\t// make sure eye fully open\n\t\t\t\t{\n\t\t\t\t\tSmokeSide(o, 4, DOWN);\n\t\t\t\t\tquake(10);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t\t\to->damage = 0;\n\t\t\t\t\n\t\t\t\to->state = 11;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (player->Top() > o->CenterY())\n\t\t\t\t{\n\t\t\t\t\to->flags &= ~FLAG_SOLID_BRICK;\n\t\t\t\t\to->damage = 127;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t\t\t\to->damage = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state >= 5)\n\t{\n\t\to->yinertia += 0x80;\n\t\tLIMITY(0x5ff);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_critter_hopping_red(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->frame = 0;\n\t\t\t\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t\telse if (++o->timer >= 8)\n\t\t\t{\n\t\t\t\tif (pdistly((5 * TILE_H) << CSF))\n\t\t\t\t{\n\t\t\t\t\tif (pdistlx((6 * TILE_W) << CSF))\n\t\t\t\t\t{\n\t\t\t\t\t\to->state = 1;\n\t\t\t\t\t\to->timer = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse if (pdistlx((9 * TILE_W) << CSF))\n\t\t\t\t\t{\n\t\t\t\t\t\to->frame = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// prepare to jump\n\t\t{\n\t\t\tif (++o->timer > 8)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->frame = 2;\n\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t\t\n\t\t\t\to->yinertia = -0x5ff;\n\t\t\t\to->xinertia = (o->dir == RIGHT) ? 0x200 : -0x200;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// in air\n\t\t{\n\t\t\tif (o->blockd && o->yinertia > 0)\n\t\t\t{\n\t\t\t\tsound(SND_THUD);\n\t\t\t\to->xinertia = 0;\n\t\t\t\t\n\t\t\t\to->state = 0;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x55;\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// lava drip spawner in Last Cave (hidden) and used extensively in Final Cave.\n// the id1 tag sets the frequency of the drip, the id2 tag sets an amount to\n// delay the first drip in order to desync a group of drips.\nvoid ai_lava_drip_spawner(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->sprite = SPR_LAVA_DRIP;\n\t\t\to->x += (4 << CSF);\n\t\t\to->timer = (o->id2 - o->id1);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (--o->timer < 0)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->timer2 = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\to->display_xoff = (++o->timer2 & 2) ? 0 : 1;\n\t\t\t\n\t\t\tANIMATE_FWD(10);\n\t\t\tif (o->frame > 3)\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = o->id1;\n\t\t\t\t\n\t\t\t\tai_lava_drip(CreateObject(o->x, o->y, OBJ_LAVA_DRIP));\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_lava_drip(Object *o)\n{\n\to->frame = 4;\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n\t\n\tif (o->blockd || \\\n\t\t(++o->timer > 10 && o->CheckAttribute(&sprites[o->sprite].block_u, TA_WATER)))\n\t{\n\t\tfor(int i=0;i<3;i++)\n\t\t{\n\t\t\tCaret *c = effect(o->CenterX(), o->Bottom(), EFFECT_LAVA_SPLASH);\n\t\t\tc->xinertia = random(-0x400, 0x400);\n\t\t\tc->yinertia = random(-0x400, 0);\n\t\t}\n\t\t\n\t\tif (o->onscreen)\n\t\t\tsound(SND_BUBBLE);\n\t\t\n\t\to->Delete();\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_red_bat_spawner(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->timer = random(0, 500);\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (--o->timer < 0)\n\t\t\t{\n\t\t\t\tObject *bat = CreateObject(o->CenterX(), \\\n\t\t\t\t\t\t\t\t\t\t   o->CenterY() + random(-32<<CSF, 32<<CSF), \\\n\t\t\t\t\t\t\t\t\t\t   OBJ_RED_BAT);\n\t\t\t\tbat->x -= (bat->Width() / 2);\n\t\t\t\tbat->y -= (bat->Height() / 2);\n\t\t\t\tbat->dir = o->dir;\n\t\t\t\to->state = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid ai_red_bat(Object *o)\n{\n\tANIMATE(1, 0, 2);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->ymark = o->y;\n\t\t\to->timer = random(0, 50);\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (--o->timer < 0)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->yinertia = 0x400;\n\t\t\t}\n\t\t\telse break;\n\t\t}\n\t\tcase 2:\n\t\t{\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x10 : -0x10;\n\t\t\tLIMITY(0x300);\n\t\t\tXMOVE(0x100);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->x < 0 || o->x > (map.xsize * TILE_W) << CSF)\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\to->Delete();\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_red_demon(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xmark = o->x;\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 0;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(20, 0, 1);\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// prepare to jump\n\t\t{\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->state = 11;\n\t\t\to->frame = 3;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tswitch(++o->timer)\n\t\t\t{\n\t\t\t\tcase 30:\n\t\t\t\tcase 40:\n\t\t\t\tcase 50:\n\t\t\t\t{\n\t\t\t\t\to->frame = 4;\n\t\t\t\t\tEmFireAngledShot(o, OBJ_RED_DEMON_SHOT, 0, 0x800);\n\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 34:\n\t\t\t\tcase 44:\n\t\t\t\tcase 54:\n\t\t\t\t{\n\t\t\t\t\to->frame = 3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 61:\n\t\t\t\t{\n\t\t\t\t\to->state = 20;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\to->frame = 2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// pause before jump\n\t\t{\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->state = 21;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 5;\n\t\t\t\t\n\t\t\t\to->yinertia = -0x5ff;\n\t\t\t\to->xinertia = (o->CenterX() < player->CenterX()) ? 0x100 : -0x100;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 21:\t// in air\n\t\t{\n\t\t\tswitch(++o->timer)\n\t\t\t{\n\t\t\t\tcase 30:\n\t\t\t\tcase 40:\n\t\t\t\tcase 50:\n\t\t\t\t{\n\t\t\t\t\to->frame = 6;\n\t\t\t\t\tEmFireAngledShot(o, OBJ_RED_DEMON_SHOT, 0, 0x800);\n\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 34:\n\t\t\t\tcase 44:\n\t\t\t\t{\n\t\t\t\t\to->frame = 5;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 54:\n\t\t\t\t{\n\t\t\t\t\to->frame = 7;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\tquake(10);\n\t\t\t\to->state = 22;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 22:\t// landed\n\t\t{\n\t\t\to->xinertia /= 2;\n\t\t\t\n\t\t\tif (++o->timer > 22)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// defeated/turned to stone (set by script)\n\t\tcase 50:\n\t\t{\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->damage = 0;\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 51;\n\t\t\t\to->frame = 2;\n\t\t\t\t\n\t\t\t\tgame.quaketime = 10;\n\t\t\t\tSmokeClouds(o, 12, 4, 4);\n\t\t\t\to->SpawnXP(19);\n\t\t\t\t\n\t\t\t\tsound(SND_BIG_CRASH);\n\t\t\t\t\n\t\t\t\t// needed to prevent status bars from not disappearing\n\t\t\t\tgame.bossbar.object = NULL;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 51:\n\t\t{\n\t\t\to->xinertia *= 7;\n\t\t\to->xinertia /= 8;\n\t\t\t\n\t\t\to->frame = 8;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state < 50)\n\t{\n\t\tFACEPLAYER;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_press_vert(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->y -= (4 << CSF);\n\t\t\t\n\t\t\tif (pdistlx((8<<CSF)) && pdistly2((8<<CSF), (128<<CSF)))\n\t\t\t{\n\t\t\t\to->state = 5;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 5:\n\t\t{\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\tANIMATE_FWD(2);\n\t\t\tif (o->frame > 2)\n\t\t\t\to->frame = 2;\n\t\t\t\n\t\t\tif (player->y > o->y)\n\t\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n"
  },
  {
    "path": "ai/last_cave/last_cave.fdh",
    "content": "//hash:6dac387f\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//------------[referenced from ai/last_cave/last_cave.cpp]-----------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//------------[referenced from ai/last_cave/last_cave.cpp]-----------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//------------[referenced from ai/last_cave/last_cave.cpp]-----------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//------------[referenced from ai/last_cave/last_cave.cpp]-----------//\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/last_cave/last_cave.cpp */\n\n//------------[referenced from ai/last_cave/last_cave.cpp]-----------//\nvoid ai_proximity_press_vert(Object *o);\nvoid ai_critter_hopping_red(Object *o);\nvoid ai_lava_drip_spawner(Object *o);\nvoid ai_lava_drip(Object *o);\nvoid ai_red_bat_spawner(Object *o);\nvoid ai_red_bat(Object *o);\nvoid ai_red_demon(Object *o);\nvoid ai_press_vert(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//------------[referenced from ai/last_cave/last_cave.cpp]-----------//\nvoid SmokeSide(Object *o, int nclouds, int dir);\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//------------[referenced from ai/last_cave/last_cave.cpp]-----------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//------------[referenced from ai/last_cave/last_cave.cpp]-----------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/maze/balrog_boss_missiles.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../balrog_common.h\"\n#include \"balrog_boss_missiles.fdh\"\n\n#define STATE_CHARGE\t\t\t10\n#define STATE_JUMP_FIRE\t\t\t20\n#define STATE_PAUSE\t\t\t\t30\n#define STATE_CAUGHT_PLAYER\t\t40\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BALROG_BOSS_MISSILES, ai_balrog_boss_missiles);\n\tONDEATH(OBJ_BALROG_BOSS_MISSILES, ondeath_balrog_boss_missiles);\n\t\n\tONTICK(OBJ_BALROG_MISSILE, ai_balrog_missile);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_balrog_boss_missiles(Object *o)\n{\n\t// try to catch player\n\tswitch(o->state)\n\t{\n\t\tcase STATE_CHARGE+1:\n\t\tcase STATE_JUMP_FIRE+1:\n\t\t{\n\t\t\tif (pdistlx(12<<CSF) && pdistly2(12<<CSF, 8<<CSF))\n\t\t\t{\n\t\t\t\tbalrog_grab_player(o);\n\t\t\t\thurtplayer(5);\n\t\t\t\to->state = STATE_CAUGHT_PLAYER;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// main state engine\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\to->state = 1;\n\t\t\to->frame = 0;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = STATE_CHARGE;\n\t\t\t\to->timer2 ^= 1;\t// affects how we react if we miss the player\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// charge the player\n\t\tcase STATE_CHARGE:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->frame = 9;\n\t\t\to->animtimer = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase STATE_CHARGE+1:\n\t\t{\n\t\t\tXACCEL(0x20);\n\t\t\twalking_animation(o);\n\t\t\t\n\t\t\t// stuck against the wall?\n\t\t\tif ((o->dir == LEFT && o->blockl) || \\\n\t\t\t\t(o->dir == RIGHT && o->blockr))\n\t\t\t{\n\t\t\t\tif (++o->timer3 > 5)\n\t\t\t\t\to->state = STATE_JUMP_FIRE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->timer3 = 0;\n\t\t\t}\n\t\t\t\n\t\t\t// he behaves differently after every other time he pauses\n\t\t\tif (o->timer2)\n\t\t\t{\n\t\t\t\tif (++o->timer > 75)\n\t\t\t\t{\n\t\t\t\t\to->frame = 0;\n\t\t\t\t\to->state = STATE_PAUSE;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (++o->timer > 24)\n\t\t\t\t\to->state = STATE_JUMP_FIRE;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// jump and fire missiles\n\t\tcase STATE_JUMP_FIRE:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->frame = 3;\n\t\t\to->yinertia = -0x5ff;\n\t\t}\n\t\tcase STATE_JUMP_FIRE+1:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\t// fire missiles\n\t\t\tif (++o->timer < 30)\n\t\t\t{\n\t\t\t\tif ((o->timer % 6) == 1)\n\t\t\t\t{\n\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t\t\n\t\t\t\t\tObject *shot = SpawnObjectAtActionPoint(o, OBJ_BALROG_MISSILE);\n\t\t\t\t\tshot->dir = o->dir;\n\t\t\t\t\tshot->xinertia = 0x100;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// landed?\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->frame = 2;\n\t\t\t\to->state = STATE_PAUSE;\n\t\t\t\tquake(30);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// stop for a moment\n\t\tcase STATE_PAUSE:\n\t\t{\n\t\t\to->xinertia *= 4;\n\t\t\to->xinertia /= 5;\n\t\t\tif (o->xinertia != 0) break;\n\t\t\t\n\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_CAUGHT_PLAYER:\t// caught player\n\t\t{\n\t\t\tif (balrog_toss_player_away(o))\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITX(0x300);\n\tLIMITY(0x5ff);\n}\n\nvoid ondeath_balrog_boss_missiles(Object *o)\n{\n\to->xinertia = 0;\n}\n\nstatic void walking_animation(Object *o)\n{\n\tif (++o->animtimer > 3)\n\t{\n\t\to->animtimer = 0;\n\t\to->frame++;\n\t\t\n\t\tif (o->frame == 12)\n\t\t{\n\t\t\tsound(SND_THUD);\n\t\t}\n\t\telse if (o->frame > 12)\n\t\t{\n\t\t\to->frame = 9;\n\t\t}\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_balrog_missile(Object *o)\n{\n\tif ((o->dir == RIGHT && o->blockr) || \\\n\t\t(o->dir == LEFT && o->blockl))\n\t{\n\t\tSmokeClouds(o, 3, 0, 0);\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\tsound(SND_MISSILE_HIT);\n\t\t\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tif (o->state == 0)\n\t{\n\t\t// recoil in oppisite direction\n\t\to->xinertia = random(-2, -1) << CSF;\n\t\tif (o->dir == LEFT) o->xinertia = -o->xinertia;\n\t\t\n\t\to->yinertia = random(-2, 0) << CSF;\n\t\t\n\t\to->state = 1;\n\t}\n\t\n\tXACCEL(0x20);\n\t\n\tif ((++o->timer2 % 4) == 1)\n\t{\n\t\teffect(o->CenterX() - o->xinertia, o->CenterY(), EFFECT_SMOKETRAIL_SLOW);\n\t}\n\t\n\t// heat-seeking at start, then level out straight\n\tif (o->timer2 < 50)\n\t{\n\t\tif (o->y < player->y)\n\t\t\to->yinertia += 0x20;\n\t\telse\n\t\t\to->yinertia -= 0x20;\n\t}\n\telse\n\t{\n\t\to->yinertia = 0;\n\t}\n\t\n\t// flash\n\to->frame ^= 1;\n\t\n\tif (o->xinertia < -0x400)\n\t\to->xinertia = -0x600;\n\t\n\tif (o->xinertia > 0x400)\n\t\to->xinertia = 0x600;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/maze/balrog_boss_missiles.fdh",
    "content": "//hash:ce2d6225\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in caret.cpp */\n\n//---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in player.cpp */\n\n//---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------//\nvoid hurtplayer(int damage);\n\n\n/* located in ai/ai.cpp */\n\n//---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\n\n\n/* located in ai/maze/balrog_boss_missiles.cpp */\n\n//---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------//\nvoid ai_balrog_boss_missiles(Object *o);\nvoid ondeath_balrog_boss_missiles(Object *o);\nstatic void walking_animation(Object *o);\nvoid ai_balrog_missile(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in ai/balrog_common.cpp */\n\n//---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------//\nvoid balrog_grab_player(Object *o);\nbool balrog_toss_player_away(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/maze/critter_purple.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"critter_purple.fdh\"\n\n#define STATE_IDLE\t\t\t1\t\t// waiting for player to come near\n#define STATE_PREPARE_JUMP\t2\t\t// on ground, prepare to jump\n#define STATE_JUMP\t\t\t3\t\t// jumping up\n#define STATE_HOVER\t\t\t4\t\t// hovering and firing\n#define STATE_END_JUMP\t\t5\t\t// falling back down\n\n#define CRITTER_DAMAGE\t\t2\t\t// normal damage\n#define CRITTER_FALL_DAMAGE\t3\t\t// damage if it falls on you\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_CRITTER_SHOOTING_PURPLE, ai_critter_shooting_purple);\n\tONTICK(OBJ_CRITTER_SHOT, ai_generic_angled_shot);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// used only for purple ones in maze\nvoid ai_critter_shooting_purple(Object *o)\n{\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = STATE_IDLE;\n\t\t\to->damage = CRITTER_DAMAGE;\n\t\tcase STATE_IDLE:\n\t\t{\n\t\t\to->frame = 0;\t\t// assume not at attention\n\t\t\tif (o->timer >= 8)\n\t\t\t{\n\t\t\t\tif (pdistlx(96<<CSF) && pdistly2(96<<CSF, 32<<CSF))\n\t\t\t\t{\n\t\t\t\t\tFACEPLAYER;\n\t\t\t\t\t\n\t\t\t\t\t// close enough to attack?\n\t\t\t\t\tif (pdistlx(48<<CSF))\n\t\t\t\t\t{\n\t\t\t\t\t\to->state = STATE_PREPARE_JUMP;\n\t\t\t\t\t\to->frame = 0;\n\t\t\t\t\t\to->timer = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t// no, but stand at \"attention\"\n\t\t\t\t\t\to->frame = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->timer++;\n\t\t\t}\n\t\t\t\n\t\t\t// also attack if shot\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\to->state = STATE_PREPARE_JUMP;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_PREPARE_JUMP:\n\t\t{\n\t\t\to->frame = 1;\n\t\t\tif (++o->timer > 8)\n\t\t\t{\n\t\t\t\tFACEPLAYER;\n\t\t\t\t\n\t\t\t\to->state = STATE_JUMP;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 2;\n\t\t\t\t\n\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t\to->yinertia = -0x5ff;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_JUMP:\n\t\t{\n\t\t\tif (o->yinertia > 0x100 || \\\n\t\t\t\t(o->blockd && ++o->timer > 16))\t\t// failsafe\n\t\t\t{\n\t\t\t\to->ymark = o->y;\n\t\t\t\t\n\t\t\t\to->state = STATE_HOVER;\n\t\t\t\to->frame = 3;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\to->CurlyTargetHere(60, 100);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_HOVER:\n\t\t{\t// sinusoidal hover\n\t\t\to->yinertia += (o->y > o->ymark) ? -0x10 : 0x10;\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\tANIMATE(0, 3, 5);\n\t\t\t\n\t\t\t// time to end flight?\n\t\t\tif (++o->timer > 60 || o->blocku)\n\t\t\t{\n\t\t\t\to->damage = CRITTER_FALL_DAMAGE;\n\t\t\t\to->state = STATE_END_JUMP;\n\t\t\t\to->frame = 2;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif ((o->timer % 4) == 1)\n\t\t\t\tsound(SND_CRITTER_FLY);\n\t\t\t\n\t\t\tif ((o->timer % 30) == 6)\n\t\t\t{\n\t\t\t\tEmFireAngledShot(o, OBJ_CRITTER_SHOT, 6, 0x600);\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t\to->yinertia = -0x200;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_END_JUMP:\n\t\t{\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->damage = 2;\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = 0;\n\t\t\t\tsound(SND_THUD);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state != STATE_HOVER)\n\t{\n\t\to->yinertia += 0x20;\n\t\tLIMITY(0x5ff);\n\t}\n}\n\n\n\n"
  },
  {
    "path": "ai/maze/critter_purple.fdh",
    "content": "//hash:ef256ea0\n//automatically generated by Makegen\n\n/* located in trig.cpp */\n\n//------------[referenced from ai/maze/critter_purple.cpp]-----------//\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/maze/critter_purple.cpp */\n\n//------------[referenced from ai/maze/critter_purple.cpp]-----------//\nvoid ai_critter_shooting_purple(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//------------[referenced from ai/maze/critter_purple.cpp]-----------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/maze/gaudi.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"gaudi.fdh\"\n\n#define GAUDI_HP\t\t\t15\n#define GAUDI_FLYING_HP\t\t15\n#define GAUDI_ARMORED_HP\t15\n\n#define PLAYER_NEAR_ENOUGH()\t(pdistlx(SCREEN_WIDTH << CSF) && pdistly(SCREEN_HEIGHT << CSF))\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_GAUDI, ai_gaudi);\n\t\n\tONTICK(OBJ_GAUDI_ARMORED, ai_gaudi_armored);\n\tONTICK(OBJ_GAUDI_ARMORED_SHOT, ai_gaudi_armored_shot);\n\t\n\tONTICK(OBJ_GAUDI_FLYING, ai_gaudi_flying);\n\tONTICK(OBJ_GAUDI_FLYING_SHOT, ai_generic_angled_shot);\n\t\n\tONTICK(OBJ_GAUDI_DYING, ai_gaudi_dying);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_gaudi(Object *o)\n{\n\tif (o->hp <= (1000 - GAUDI_HP))\n\t{\n\t\to->ChangeType(OBJ_GAUDI_DYING);\n\t\tai_gaudi_dying(o);\n\t\treturn;\n\t}\n\t\n\tif (!PLAYER_NEAR_ENOUGH())\n\t\treturn;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// Gaudi's in shop\n\t\t\tif (o->flags & FLAG_SCRIPTONACTIVATE)\n\t\t\t{\n\t\t\t\to->damage = 0;\n\t\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t}\n\t\t\t\n\t\t\to->xinertia = 0;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\trandblink(o, 1, 20, 100);\n\t\t\t\n\t\t\tif (!random(0, 100))\n\t\t\t{\n\t\t\t\tif (random(0, 1))\n\t\t\t\t{\n\t\t\t\t\to->dir ^= 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = 10;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t\t// walking\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->timer = random(25, 100);\t\t// how long to walk for\n\t\t\t\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tANIMATE(3, 2, 5);\n\t\t\tXMOVE(0x200);\n\t\t\t\n\t\t\t// time to stop walking?\n\t\t\tif (--o->timer <= 0)\n\t\t\t\to->state = 0;\n\t\t\t\n\t\t\t// try to jump over any walls we come to\n\t\t\tif ((o->xinertia < 0 && o->blockl) || \\\n\t\t\t\t(o->xinertia > 0 && o->blockr))\n\t\t\t{\n\t\t\t\to->yinertia = -0x5ff;\n\t\t\t\to->frame = 2;\n\t\t\t\to->state = 20;\n\t\t\t\t\n\t\t\t\tif (!player->inputs_locked)\t// no sound during ending cutscene\n\t\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t\t// jumping\n\t\t{\n\t\t\t// landed?\n\t\t\tif (o->yinertia >= 0 && o->blockd)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = 21;\n\t\t\t\to->frame = 12;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tif (!player->inputs_locked)\t// no sound during ending cutscene\n\t\t\t\t\tsound(SND_THUD);\n\t\t\t}\n\t\t\t\n\t\t\t// count how long we've been touching the wall\n\t\t\t// we're trying to jump over..if it's not working\n\t\t\t// go the other way.\n\t\t\tif ((o->dir == LEFT && o->blockl) || \\\n\t\t\t\t(o->dir == RIGHT && o->blockr))\n\t\t\t{\n\t\t\t\tif (++o->timer2 > 10)\n\t\t\t\t{\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t\to->dir ^= 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->timer2 = 0;\n\t\t\t}\n\t\t\t\n\t\t\tXMOVE(0x100);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 21:\t// landed from jump\n\t\t{\n\t\t\tif (++o->timer > 10)\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\nvoid ai_gaudi_dying(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// just died (initilizing)\n\t\t{\n\t\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_IGNORE_SOLID | FLAG_SHOW_FLOATTEXT);\n\t\t\to->damage = 0;\n\t\t\t\n\t\t\to->sprite = SPR_GAUDI;\n\t\t\to->frame = 9;\n\t\t\t\n\t\t\to->yinertia = -0x200;\n\t\t\tXMOVE(-0x100);\n\t\t\tsound(SND_ENEMY_HURT_SMALL);\n\t\t\t\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// flying backwards through air\n\t\t{\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->frame = 10;\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// landed, shake\n\t\t{\n\t\t\to->xinertia *= 8;\n\t\t\to->xinertia /= 9;\n\t\t\tANIMATE(3, 10, 11);\n\t\t\t\n\t\t\tif (++o->timer > 50)\n\t\t\t{\t// this deletes object while generating smoke effects and boom\n\t\t\t\to->DealDamage(10000);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_gaudi_flying(Object *o)\n{\n\tif (o->hp <= (1000 - GAUDI_FLYING_HP))\n\t{\n\t\tif (o->dir == LEFT)\n\t\t\to->x -= (2 << CSF);\n\t\telse\n\t\t\to->x += (2 << CSF);\n\t\t\n\t\to->ChangeType(OBJ_GAUDI_DYING);\n\t\tai_gaudi_dying(o);\n\t\treturn;\n\t}\n\t\n\tif (!PLAYER_NEAR_ENOUGH())\n\t\treturn;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tvector_from_angle(random(0, 255), (1 << CSF), &o->xinertia, &o->yinertia);\n\t\t\to->xmark = o->x + (o->xinertia * 8);\n\t\t\to->ymark = o->y + (o->yinertia * 8);\n\t\t\t\n\t\t\to->timer2 = 120;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->timer = random(70, 150);\n\t\t\to->state = 2;\n\t\t}\n\t\tcase 2:\n\t\t{\n\t\t\tif (!--o->timer)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->frame |= 0x02;\t// switch us into using flashing purple animation\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// preparing to fire\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\tEmFireAngledShot(o, OBJ_GAUDI_FLYING_SHOT, 6, 0x500);\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t\n\t\t\t\to->state = 1;\n\t\t\t\to->frame &= 1;\t\t// stop flashing purple\n\t\t\t}\n\t\t}\n\t}\n\t\n\to->frame ^= 1;\t\t// animate wings\n\tFACEPLAYER;\n\t\n\t// sinusoidal circling pattern\n\to->xinertia += (o->x > o->xmark) ? -0x10 : 0x10;\n\to->yinertia += (o->y > o->ymark) ? -0x10 : 0x10;\n\tLIMITX(0x200);\n\tLIMITY(0x200);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_gaudi_armored(Object *o)\n{\n\tif (o->hp <= (1000 - GAUDI_ARMORED_HP))\n\t{\n\t\to->ChangeType(OBJ_GAUDI_DYING);\n\t\tai_gaudi_dying(o);\n\t\treturn;\n\t}\n\t\n\tif (!PLAYER_NEAR_ENOUGH())\n\t\treturn;\n\t\n\tFACEPLAYER;\n\t\n\t//debug(\"%d\", o->state);\n\t//debugVline(o->x, 0, 0, 255);\n\t//debugVline(o->xmark, 0, 255, 0);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xmark = o->x;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t\t\n\t\t\tif (++o->timer >= 5)\n\t\t\t{\n\t\t\t\tif (pdistlx(192 << CSF) && pdistly(160 << CSF))\n\t\t\t\t{\t// begin hopping\n\t\t\t\t\to->state = 10;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\to->frame = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// on ground inbetween hops\n\t\t{\n\t\t\tif (++o->timer > 3)\n\t\t\t{\n\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t\to->frame = 2;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tif (++o->timer2 < 3)\n\t\t\t\t{\t// hopping back and forth\n\t\t\t\t\to->state = 20;\n\t\t\t\t\to->yinertia = -0x200;\n\t\t\t\t\to->xinertia = (o->x < o->xmark) ? 0x200 : -0x200;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t// big jump and attack\n\t\t\t\t\to->state = 30;\n\t\t\t\t\to->yinertia = -0x600;\n\t\t\t\t\to->xinertia = (o->x < o->xmark) ? 0x80 : -0x80;\n\t\t\t\t\t\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// jumping (small hop)\n\t\t{\n\t\t\t// landed?\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\t// drop sub-pixel precision\n\t\t\t\t// (required to maintain stability of back-and-forth sequence).\n\t\t\t\to->y >>= CSF; o->y <<= CSF;\n\t\t\t\t\n\t\t\t\tsound(SND_THUD);\n\t\t\t\to->state = 40;\n\t\t\t\to->frame = 1;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// jumping (big jump + attack)\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// throw attacks at player\n\t\t\tif (o->timer == 30 || o->timer == 40)\n\t\t\t{\n\t\t\t\tEmFireAngledShot(o, OBJ_GAUDI_ARMORED_SHOT, 6, 0x600);\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t\n\t\t\t\to->frame = 3;\n\t\t\t\to->CurlyTargetHere();\n\t\t\t}\n\t\t\t\n\t\t\t// stop throwing animation\n\t\t\tif (o->timer == 35 || o->timer == 45)\n\t\t\t\to->frame = 2;\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia > 0)\n\t\t\t{\n\t\t\t\tsound(SND_THUD);\n\t\t\t\to->state = 40;\n\t\t\t\to->frame = 1;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t\t// landed\n\t\t{\n\t\t\to->xinertia *= 7;\n\t\t\to->xinertia /= 8;\n\t\t\t\n\t\t\tif (++o->timer >= 2)\n\t\t\t{\n\t\t\t\t//stat(\"dtt= %d\", abs(o->xmark - o->x)>>CSF);\n\t\t\t\to->frame = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\t\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x33;\n\tLIMITY(0x5ff);\n}\n\n\nvoid ai_gaudi_armored_shot(Object *o)\n{\n\tANIMATE(0, 0, 2);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tbool bounced = false;\n\t\t\tif (o->blockl && o->xinertia <= 0) { o->xinertia = 0x200; bounced = true; }\n\t\t\tif (o->blockr && o->xinertia >= 0) { o->xinertia = -0x200; bounced = true; }\n\t\t\tif (o->blockd && o->yinertia >= 0) { o->yinertia = -0x200; bounced = true; }\n\t\t\tif (o->blocku && o->yinertia <= 0) { o->yinertia = 0x200; bounced = true; }\n\t\t\t\n\t\t\tif (bounced)\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\tsound(SND_TINK);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\teffect(o->CenterX(), o->CenterY(), EFFECT_STARPOOF);\n\t\t\t\to->Delete();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/maze/gaudi.fdh",
    "content": "//hash:f9425f6f\n//automatically generated by Makegen\n\n/* located in caret.cpp */\n\n//-----------------[referenced from ai/maze/gaudi.cpp]---------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//-----------------[referenced from ai/maze/gaudi.cpp]---------------//\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys);\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from ai/maze/gaudi.cpp]---------------//\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in ai/maze/gaudi.cpp */\n\n//-----------------[referenced from ai/maze/gaudi.cpp]---------------//\nvoid ai_gaudi(Object *o);\nvoid ai_gaudi_dying(Object *o);\nvoid ai_gaudi_flying(Object *o);\nvoid ai_gaudi_armored(Object *o);\nvoid ai_gaudi_armored_shot(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/maze/gaudi.cpp]---------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/maze/gaudi.cpp]---------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/maze/labyrinth_m.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"labyrinth_m.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_FIREWHIRR, ai_firewhirr);\n\tONTICK(OBJ_FIREWHIRR_SHOT, ai_firewhirr_shot);\n\t\n\tONTICK(OBJ_GAUDI_EGG, ai_gaudi_egg);\n\t\n\tONTICK(OBJ_FUZZ_CORE, ai_fuzz_core);\n\tONTICK(OBJ_FUZZ, ai_fuzz);\n\tAFTERMOVE(OBJ_FUZZ, aftermove_fuzz);\n\t\n\tONTICK(OBJ_BUYOBUYO_BASE, ai_buyobuyo_base);\n\tONTICK(OBJ_BUYOBUYO, ai_buyobuyo);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_firewhirr(Object *o)\n{\nObject *shot;\n\n\tFACEPLAYER;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\t\to->timer = random(0, 50);\n\t\t\to->ymark = o->y;\n\t\t\t//o->yinertia = -0x200;\n\t\tcase 1:\n\t\t\t\n\t\t\tif (!o->timer)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->yinertia = -0x200;\n\t\t\t}\n\t\t\telse o->timer--;\n\t\t\t\n\t\tcase 10:\n\t\t\to->frame ^= 1;\n\t\t\t\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x10 : -0x10;\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\t// inc time-to-fire while player near\n\t\t\tif (pdistly(80 << CSF))\n\t\t\t{\n\t\t\t\tif (o->dir==LEFT && player->x < o->x && pdistlx(160 << CSF)) o->timer2++;\n\t\t\t\tif (o->dir==RIGHT && player->x > o->x && pdistlx(160 << CSF)) o->timer2++;\n\t\t\t}\n\t\t\t\n\t\t\t// if time to fire, spawn a shot\n\t\t\tif (o->timer2 > 20)\n\t\t\t{\n\t\t\t\tshot = SpawnObjectAtActionPoint(o, OBJ_FIREWHIRR_SHOT);\n\t\t\t\to->timer2 = -100 + random(0, 20);\n\t\t\t\t// tell Curly to acquire us as a target\n\t\t\t\tif (o->onscreen)\n\t\t\t\t{\n\t\t\t\t\to->CurlyTargetHere();\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_firewhirr_shot(Object *o)\n{\n\tANIMATE(1, 0, 2);\n\to->x += (o->dir==LEFT) ? -0x200 : 0x200;\n\t\n\tif ((o->dir==LEFT && o->blockl) || (o->dir==RIGHT && o->blockr))\n\t{\n\t\tif (o->dir == RIGHT) o->x += o->Width();\n\t\teffect(o->x, o->CenterY(), EFFECT_FISHY);\n\t\to->Delete();\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_gaudi_egg(Object *o)\n{\n\tif (!o->state)\n\t{\n\t\tif (o->dir==LEFT)\n\t\t{\t// on floor\n\t\t\t// align properly with ground\n\t\t\to->y -= (4<<CSF);\n\t\t\to->x -= (4<<CSF);\n\t\t}\n\t\telse\n\t\t{\t// on ceiling\n\t\t\t// for the egg @ entrance point that is on a ceiling slope\n\t\t\tif (!o->blocku)\n\t\t\t{\n\t\t\t\to->y -= (14 << CSF);\n\t\t\t}\n\t\t}\n\t\to->state = 1;\n\t}\n\telse if (o->state == 1)\n\t{\n\t\tif (o->hp < 90)\n\t\t{\n\t\t\to->frame = 1;\n\t\t\to->damage = 0;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\tSmokeSide(o, 6, (o->dir==LEFT)?DOWN:UP);\n\t\t\to->SpawnPowerups();\n\t\t\tsound(objprop[o->type].death_sound);\n\t\t\to->state = 2;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_fuzz_core(Object *o)\n{\n\tANIMATE(2, 0, 1);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// spawn mini-fuzzes\n\t\t\tint angle = 120;\n\t\t\tfor(int i=0;i<5;i++)\n\t\t\t{\n\t\t\t\tObject *f = CreateObject(o->CenterX(), o->CenterY(), OBJ_FUZZ);\n\t\t\t\tf->linkedobject = o;\n\t\t\t\tf->angle = angle;\n\t\t\t\tangle += (256 / 5);\n\t\t\t}\n\t\t\t\n\t\t\to->timer = random(1, 50);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\t\t// de-syncs the Y positions when multiple cores are present at once\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->yinertia = 0x300;\n\t\t\t\to->ymark = o->y;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tif (o->y > o->ymark) o->yinertia -= 0x10;\n\t\t\tif (o->y < o->ymark) o->yinertia += 0x10;\n\t\t\tLIMITY(0x355);\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_fuzz(Object *o)\n{\n\tFACEPLAYER;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->angle += 4;\n\t\t\t\n\t\t\tif (!o->linkedobject)\n\t\t\t{\n\t\t\t\to->xinertia = random(-0x200, 0x200);\n\t\t\t\to->yinertia = random(-0x200, 0x200);\n\t\t\t\to->state = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// base destroyed, simple sinusoidal player-seek\n\t\tcase 1:\n\t\t{\n\t\t\to->xinertia += (o->x > player->x) ? -0x20 : 0x20;\n\t\t\to->yinertia += (o->y > player->y) ? -0x20 : 0x20;\n\t\t\t\n\t\t\tLIMITX(0x800);\n\t\t\tLIMITY(0x200);\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid aftermove_fuzz(Object *o)\n{\n\tif (o->state == 0 && o->linkedobject)\n\t{\n\t\tvector_from_angle(o->angle, (20 << CSF), &o->x, NULL);\n\t\tvector_from_angle(o->angle, (32 << CSF), NULL, &o->y);\n\t\t\n\t\to->x += o->linkedobject->CenterX() - (o->Width() / 2);\n\t\to->y += o->linkedobject->CenterY() - (o->Height() / 2);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n#define BUYOBUYO_BASE_HP\t\t60\n\nvoid ai_buyobuyo_base(Object *o)\n{\n/*if (o->onscreen) {\n\tdebug(\"state: %d\", o->state);\n\tdebug(\"timer: %d\", o->timer);\n\tdebug(\"timer2: %d\", o->timer2);\n}*/\n\t\n\tif (o->state < 3 && o->hp < (1000 - BUYOBUYO_BASE_HP))\n\t{\n\t\tSmokeClouds(o, objprop[o->type].death_smoke_amt, 8, 8);\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\to->SpawnPowerups();\n\t\t\n\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\to->damage = 0;\n\t\t\n\t\to->state = 10;\n\t\to->frame = 2;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// ceiling has different bounding box and action point\n\t\t\tif (o->dir == RIGHT)\n\t\t\t\to->sprite = SPR_BUYOBUYO_BASE_CEILING;\n\t\t\t\n\t\t\to->state = 1;\n\t\t\to->timer = 10;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (pdistlx(0x14000))\n\t\t\t{\n\t\t\t\tif ((o->dir == LEFT && pdistly2(0x14000, 0x2000)) || \\\n\t\t\t\t\t(o->dir == RIGHT && pdistly2(0x2000, 0x14000)))\n\t\t\t\t{\n\t\t\t\t\tif (--o->timer < 0)\n\t\t\t\t\t{\n\t\t\t\t\t\to->state = 2;\n\t\t\t\t\t\to->timer = 0;\n\t\t\t\t\t\to->animtimer = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tANIMATE(3, 0, 1);\n\t\t\t\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\tObject *buyo = SpawnObjectAtActionPoint(o, OBJ_BUYOBUYO);\n\t\t\t\tbuyo->dir = o->dir;\n\t\t\t\t\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\to->frame = 0;\n\t\t\t\to->CurlyTargetHere();\n\t\t\t\t\n\t\t\t\t// cyclic: three firings then pause\n\t\t\t\to->state = 1;\n\t\t\t\tif (++o->timer2 > 2)\n\t\t\t\t{\n\t\t\t\t\to->timer = 100;\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->timer = 20;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_buyobuyo(Object *o)\n{\n\tbool deleteme = false;\n\tANIMATE(6, 0, 1);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// shoot up down at player...\n\t\t\to->yinertia = (o->dir == LEFT) ? -0x600 : 0x600;\n\t\t\to->state = 1;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->timer++;\t\t// inc fly time\n\t\t\t// reached height of player yet?\n\t\t\tif (pdistly(0x2000))\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\tai_buyobuyo(o);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\t// this slight \"minimum fly time\" keeps the underwater ones from\n\t\t\t// smacking into the floor if the player is underwater with them\n\t\t\tif (++o->timer > 3)\n\t\t\t{\n\t\t\t\tFACEPLAYER;\n\t\t\t\to->xmark = o->x;\n\t\t\t\to->ymark = o->y;\n\t\t\t\t\n\t\t\t\to->xinertia = random(0, 1) ? 0x200 : -0x200;\n\t\t\t\to->yinertia = random(0, 1) ? 0x200 : -0x200;\n\t\t\t\t\n\t\t\t\to->state = 3;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\n\t\t{\n\t\t\tif (o->x > o->xmark) o->xinertia -= 0x20;\n\t\t\tif (o->x < o->xmark) o->xinertia += 0x20;\n\t\t\tif (o->y > o->ymark) o->yinertia -= 0x20;\n\t\t\tif (o->y < o->ymark) o->yinertia += 0x20;\n\t\t\tLIMITX(0x400);\n\t\t\tLIMITY(0x400);\n\t\t\t\n\t\t\t// move the point we are bobbling around\n\t\t\to->xmark += (o->dir == LEFT) ? -(1 << CSF) : (1 << CSF);\n\t\t\t//debugVline(o->xmark, 0, 0xff, 0);\n\t\t\t\n\t\t\tif (++o->timer > 300)\n\t\t\t\tdeleteme = true;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t(o->blockr && o->xinertia > 0) || \\\n\t\t(o->blocku && o->yinertia < 0) || \\\n\t\t(o->blockd && o->yinertia > 0))\n\t{\n\t\tdeleteme = true;\n\t}\n\n\tif (deleteme)\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_STARPOOF);\n\t\to->Delete();\n\t\treturn;\n\t}\n}\n\n\n\n\n"
  },
  {
    "path": "ai/maze/labyrinth_m.fdh",
    "content": "//hash:00879ec8\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/maze/labyrinth_m.cpp]------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//--------------[referenced from ai/maze/labyrinth_m.cpp]------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//--------------[referenced from ai/maze/labyrinth_m.cpp]------------//\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys);\n\n\n/* located in ai/ai.cpp */\n\n//--------------[referenced from ai/maze/labyrinth_m.cpp]------------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\n\n\n/* located in ai/maze/labyrinth_m.cpp */\n\n//--------------[referenced from ai/maze/labyrinth_m.cpp]------------//\nvoid ai_firewhirr(Object *o);\nvoid ai_firewhirr_shot(Object *o);\nvoid ai_gaudi_egg(Object *o);\nvoid ai_fuzz_core(Object *o);\nvoid ai_fuzz(Object *o);\nvoid aftermove_fuzz(Object *o);\nvoid ai_buyobuyo_base(Object *o);\nvoid ai_buyobuyo(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//--------------[referenced from ai/maze/labyrinth_m.cpp]------------//\nvoid SmokeSide(Object *o, int nclouds, int dir);\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/maze/labyrinth_m.cpp]------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/maze/labyrinth_m.cpp]------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/maze/maze.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"maze.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BLOCK_MOVEH, ai_block_moveh);\n\tONTICK(OBJ_BLOCK_MOVEV, ai_block_movev);\n\t\n\tONTICK(OBJ_BOULDER, ai_boulder);\n\t\n\tGENERIC_NPC_NOFACEPLAYER(OBJ_GAUDI_SHOPKEEP);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_block_moveh(Object *o)\n{\n\tint px = player->CenterX();\n\tint objx = o->CenterX();\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t\to->smushdamage = 100;\n\t\t\to->state = (o->dir == LEFT) ? 10:20;\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// at right edge, ready to travel left\n\t\t\tif (((px > objx) && (px - objx) < 0x3200) || \\\n\t\t\t\t((px < objx) && (objx - px) < 0x32000))\n\t\t\t{\n\t\t\t\tif (pdistly(0x3200))\n\t\t\t\t{\n\t\t\t\t\to->state = 30;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// at left edge, ready to travel right\n\t\t\tif (((px > objx) && (px - objx) < 0x32000) || \\\n\t\t\t\t((px < objx) && (objx - px) < 0x3200))\n\t\t\t{\n\t\t\t\tif (pdistly(0x3200))\n\t\t\t\t{\n\t\t\t\t\to->state = 30;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// traveling\n\t\t{\n\t\t\tXACCEL(0x20);\n\t\t\tLIMITX(0x200);\n\t\t\t\n\t\t\t// hit edge\n\t\t\tif ((o->dir == RIGHT && o->blockr) || (o->dir == LEFT && o->blockl))\n\t\t\t{\n\t\t\t\tSmokeSide(o, 4, o->dir);\n\t\t\t\tquake(10);\n\t\t\t\t\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->dir ^= 1;\n\t\t\t\to->state = (o->dir==LEFT) ? 10 : 20;\n\t\t\t}\n\t\t\t\n\t\t\tif ((++o->timer % 10) == 6)\n\t\t\t\tsound(SND_BLOCK_MOVE);\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_block_movev(Object *o)\n{\n\tint py = player->CenterY();\n\tint objy = o->CenterY();\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t\to->smushdamage = 100;\n\t\t\to->dir = (o->dir == LEFT) ? UP : DOWN;\n\t\t\to->state = (o->dir == DOWN) ? 10 : 20;\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// at top edge, ready to travel down\n\t\t\tif (((py > objy) && (py - objy) < 0x32000) || \\\n\t\t\t\t((py < objy) && (objy - py) < 0x3200))\n\t\t\t{\n\t\t\t\tif (pdistlx(0x3200))\n\t\t\t\t{\n\t\t\t\t\to->state = 30;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// at bottom edge, ready to travel up\n\t\t\tif (((py > objy) && (py - objy) < 0x3200) || \\\n\t\t\t\t((py < objy) && (objy - py) < 0x32000))\n\t\t\t{\n\t\t\t\tif (pdistlx(0x3200))\n\t\t\t\t{\n\t\t\t\t\to->state = 30;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// traveling\n\t\t{\n\t\t\tYACCEL(0x20);\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\t// hit edge\n\t\t\tif ((o->dir == DOWN && o->blockd) || (o->dir == UP && o->blocku))\n\t\t\t{\n\t\t\t\tSmokeSide(o, 4, o->dir);\n\t\t\t\tquake(10);\n\t\t\t\t\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->dir ^= 1;\n\t\t\t\to->state = (o->dir==DOWN) ? 10 : 20;\n\t\t\t}\n\t\t\t\n\t\t\tif ((++o->timer % 10) == 6)\n\t\t\t\tsound(SND_BLOCK_MOVE);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_boulder(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\t// shaking\n\t\tcase 10:\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->timer = 0;\n\t\t\to->xmark = o->x;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tif ((++o->timer % 3) != 0)\n\t\t\t\to->x = o->xmark + (1 << CSF);\n\t\t\telse\n\t\t\t\to->x = o->xmark;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// thrown away by Balrog\n\t\tcase 20:\n\t\t{\n\t\t\to->yinertia = -0x400;\n\t\t\to->xinertia = 0x100;\n\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\n\t\t\to->state = 21;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\to->yinertia += 0x10;\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\tsound(SND_EXPLOSION1);\n\t\t\t\tgame.quaketime = 40;\n\t\t\t\t\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->state = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/maze/maze.fdh",
    "content": "//hash:c7e432c2\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//-----------------[referenced from ai/maze/maze.cpp]----------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ai/maze/maze.cpp */\n\n//-----------------[referenced from ai/maze/maze.cpp]----------------//\nvoid ai_block_moveh(Object *o);\nvoid ai_block_movev(Object *o);\nvoid ai_boulder(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------------[referenced from ai/maze/maze.cpp]----------------//\nvoid SmokeSide(Object *o, int nclouds, int dir);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/maze/maze.cpp]----------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/maze/pooh_black.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"pooh_black.fdh\"\n\n#define FRAME_STAND\t\t\t0\n#define FRAME_DYING\t\t\t1\n#define FRAME_LANDED\t\t2\n#define FRAME_FLYING\t\t3\n\nstatic int bubble_xmark = 0, bubble_ymark = 0;\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_POOH_BLACK, ai_pooh_black);\n\tONTICK(OBJ_POOH_BLACK_BUBBLE, ai_pooh_black_bubble);\n\n\tONTICK(OBJ_POOH_BLACK_DYING, ai_pooh_black_dying);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_pooh_black(Object *o)\n{\n\t// assume flying frame as it's the one used in most of the states\n\to->frame = FRAME_FLYING;\n\t\n\t//debugVline(o->CenterX(), 255,192,192);\n\t//debugVline(bubble_xmark, 0,0,255);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->yinertia = 0xA00;\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\n\t\t\tif (o->y >= (8 * TILE_H) << CSF)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\to->state = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\t{\n\t\t\to->yinertia = 0xA00;\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\tSmokeSide(o, 8, DOWN);\n\t\t\t\tsound(SND_BIG_CRASH);\n\t\t\t\tquake(30);\n\t\t\t\t\n\t\t\t\tKillObjectsOfType(OBJ_POOH_BLACK_BUBBLE);\n\t\t\t\to->state = 2;\n\t\t\t}\n\t\t\t\n\t\t\t// damage player if he falls on him\n\t\t\to->damage = (o->y < player->y && player->blockd) ? 20 : 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// landed, showing landed frame\n\t\t{\n\t\t\to->frame = FRAME_LANDED;\n\t\t\to->damage = 0;\n\t\t\tif (++o->timer > 24)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// standing, stare at player till he shoots us.\n\t\t{\n\t\t\to->frame = FRAME_STAND;\n\t\t\tbubble_xmark = o->CenterX();\n\t\t\tbubble_ymark = o->CenterY();\n\t\t\t\n\t\t\t// spawn bubbles when hit\n\t\t\tif (o->shaketime && (o->shaketime & 1))\n\t\t\t{\n\t\t\t\tint x = o->CenterX() + random(-12<<CSF, 12<<CSF);\n\t\t\t\tint y = o->CenterY() + random(-12<<CSF, 12<<CSF);\n\t\t\t\t\n\t\t\t\tObject *bubble = CreateObject(x, y, OBJ_POOH_BLACK_BUBBLE);\n\t\t\t\t\n\t\t\t\tbubble->xinertia = random(-0x600, 0x600);\n\t\t\t\tbubble->yinertia = random(-0x600, 0x600);\n\t\t\t\t\n\t\t\t\t// fly away after hit enough times\n\t\t\t\tif (++o->timer > 30)\n\t\t\t\t{\n\t\t\t\t\to->state = 4;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\t\n\t\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\t\to->yinertia = -0xC00;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\t\t// flying away off-screen\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// bubbles shoot down past player just before\n\t\t\t// he falls.\n\t\t\tif (o->timer == 60)\n\t\t\t{\n\t\t\t\tbubble_xmark = player->CenterX();\n\t\t\t\tbubble_ymark = (10000 << CSF);\n\t\t\t}\n\t\t\telse if (o->timer < 60)\n\t\t\t{\n\t\t\t\tbubble_xmark = o->CenterX();\n\t\t\t\tbubble_ymark = o->CenterY();\n\t\t\t}\n\t\t\t\n\t\t\t// fall on player\n\t\t\tif (o->timer >= 170)\n\t\t\t{\n\t\t\t\to->x = player->CenterX() - (o->Width() / 2);\n\t\t\t\to->y = 0;\n\t\t\t\to->yinertia = 0x5ff;\n\t\t\t\t\n\t\t\t\to->state = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tstatic const int frames[] = { 3, 3, 2, 0, 3 };\n\to->frame = frames[o->state];\n}\n\n\nvoid ai_pooh_black_bubble(Object *o)\n{\n\tif (o->hp < 100)\n\t{\n\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\to->damage = 0;\n\t\to->frame = 2;\n\t}\n\telse if (!random(0, 10))\n\t{\n\t\to->frame = 0;\n\t}\n\telse\n\t{\n\t\to->frame = 1;\n\t}\n\t\n\t// adjust bubble target position so that they try to align\n\t// their centers with the mark instead of their upper-left corners.\n\tint xmark = bubble_xmark - ((sprites[SPR_POOH_BLACK_BUBBLE].w / 2) << CSF);\n\tint ymark = bubble_ymark - ((sprites[SPR_POOH_BLACK_BUBBLE].h / 2) << CSF);\n\n\to->xinertia += (o->x > xmark) ? -0x40 : 0x40;\n\to->yinertia += (o->y > ymark) ? -0x40 : 0x40;\n\t\n\tLIMITX(0x11FD);\n\tLIMITY(0x11FD);\n}\n\n\nvoid ai_pooh_black_dying(Object *o)\n{\n\tbubble_xmark = o->CenterX();\n\tbubble_ymark = -(10000 << CSF);\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->frame = FRAME_DYING;\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tsound(SND_BIG_CRASH);\n\t\t\tSmokeClouds(o, 10, 12, 12);\n\t\t\tKillObjectsOfType(OBJ_POOH_BLACK_BUBBLE);\n\t\t\t\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\tcase 2:\n\t\t{\n\t\t\tgame.quaketime = 2;\n\t\t\t\n\t\t\tif (++o->timer > 200)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer2++;\n\t\t\t\t\n\t\t\t\to->clip_enable = true;\n\t\t\t\to->clipy1 = (o->timer2 / 8);\n\t\t\t\to->display_xoff = (o->timer2 & 1);\n\t\t\t\t\n\t\t\t\tif ((o->timer2 % 4) == 2)\n\t\t\t\t\tsound(SND_BUBBLE);\n\t\t\t\t\n\t\t\t\tif (o->clipy1 >= o->clipy2)\n\t\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t\n\tif (o->timer & 1)\n\t{\n\t\tint x = o->CenterX() + random(-12<<CSF, 12<<CSF);\n\t\tint y;\n\t\t\n\t\tif (o->state == 2)\n\t\t\ty = o->y + (o->clipy1 << CSF) + random(-4<<CSF, 4<<CSF);\n\t\telse\n\t\t\ty = o->CenterY() + random(-12<<CSF, 12<<CSF);\n\t\t\n\t\tObject *bubble = CreateObject(x, y, OBJ_POOH_BLACK_BUBBLE);\n\t\tbubble->xinertia = random(-0x200, 0x200);\n\t\tbubble->yinertia = -0x100;\n\t}\n\n}\n\n\n\n\n"
  },
  {
    "path": "ai/maze/pooh_black.fdh",
    "content": "//hash:cf376552\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//--------------[referenced from ai/maze/pooh_black.cpp]-------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/maze/pooh_black.cpp]-------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in ai/ai.cpp */\n\n//--------------[referenced from ai/maze/pooh_black.cpp]-------------//\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/maze/pooh_black.cpp */\n\n//--------------[referenced from ai/maze/pooh_black.cpp]-------------//\nvoid ai_pooh_black(Object *o);\nvoid ai_pooh_black_bubble(Object *o);\nvoid ai_pooh_black_dying(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//--------------[referenced from ai/maze/pooh_black.cpp]-------------//\nvoid SmokeSide(Object *o, int nclouds, int dir);\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/maze/pooh_black.cpp]-------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/maze/pooh_black.cpp]-------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/npc/balrog.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"balrog.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONSPAWN(OBJ_BALROG, onspawn_balrog);\n\tONTICK(OBJ_BALROG, ai_balrog);\n\t\n\tONTICK(OBJ_BALROG_DROP_IN, ai_balrog_drop_in);\n\tONTICK(OBJ_BALROG_BUST_IN, ai_balrog_bust_in);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid onspawn_balrog(Object *o)\n{\n\t// in the Boulder Chamber boss fight, Balrog is supposed to go BEHIND Curly.\n\tif (game.curmap == STAGE_BOULDER_CHAMBER)\n\t{\n\t\tObject *curly = Objects::FindByType(OBJ_CURLY);\n\t\tif (curly)\n\t\t{\n\t\t\to->PushBehind(curly);\n\t\t\t\n\t\t\t// nasty hack to adjust his starting position in the post-fight cutscene.\n\t\t\t// I'm not sure why this is otherwise wrong.\n\t\t\tif (GetCurrentScript() == 600)\n\t\t\t{\n\t\t\t\to->x -= (6 << CSF);\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nvoid ai_balrog(Object *o)\n{\nbool fall = true;\n\n\t// he is greenish when he first appears in Gum Room\n\tif (DoesCurrentStageUseSpriteset(NPCSET_FROG))\n\t\to->sprite = SPR_BALROG_GREEN;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\to->xinertia = 0;\n\t\t\to->balrog.smoking = false;\n\t\t\t\n\t\t\to->frame = 0;\n\t\t\trandblink(o, 4, 8);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t\t// he jumps and flys away\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 2;\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\tcase 11:\n\t\t{\n\t\t\tif (++o->timer <= 20) break;\n\t\t\t\n\t\t\to->state++;\n\t\t\to->yinertia = -0x800;\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t}\n\t\tcase 12:\n\t\t{\n\t\t\tfall = false;\n\t\t\to->frame = 3;\n\t\t\to->yinertia -= 0x10;\n\t\t\tif (o->y < 0)\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t\tsound(SND_QUAKE);\n\t\t\t\tgame.quaketime = 30;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// he looks shocked and shakes, then flys away\n\t\t// used when he is \"hit by something\"\n\t\tcase 20:\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->frame = 5;\n\t\t\to->xinertia = 0;\n\t\t\to->timer = o->timer2 = 0;\n\t\t\tSmokeClouds(o, 4, 8, 8);\n\t\t\tsound(SND_BIG_CRASH);\n\t\t\to->balrog.smoking = 1;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\to->timer2++;\n\t\t\to->x += ((o->timer2 >> 1) & 1) ? (1<<CSF) : -(1<<CSF);\n\t\t\t\n\t\t\tif (++o->timer > 100)\n\t\t\t\to->state = 10;\n\t\t\t\n\t\t\to->yinertia += 0x20;\n\t\t\tLIMITY(0x5ff);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// he smiles for a moment\n\t\t\to->frame = 6;\n\t\t\to->timer = 0;\n\t\t\to->state = 31;\n\t\tcase 31: if (++o->timer > 100) o->state = o->frame = 0;\n\t\tbreak;\n\t\t\n\t\t// flashing white (spell casted on him)\n\t\t// this only works in Gum Room before balfrog fight, as the normal\n\t\t// non-greenish spritesheet doesn't include the required frame.\n\t\tcase 40:\n\t\t\to->state = 41;\n\t\t\to->animtimer = 0;\n\t\t\to->animframe = 0;\n\t\tcase 41:\n\t\t{\n\t\t\tstatic const int flash_seq[] = { 5, 7 };\n\t\t\to->animate_seq(1, flash_seq, 2);\n\t\t}\n\t\tbreak;\n\t\tcase 42:\n\t\t\to->timer = 0;\n\t\t\to->state = 43;\n\t\tcase 43:\n\t\t\t// flashing visibility\n\t\t\t// (transforming into Balfrog stage boss;\n\t\t\t//\tour flashing is interlaced with his)\n\t\t\to->timer++;\n\t\t\to->invisible = (o->timer & 2) ? false : true;\n\t\tbreak;\n\t\t\n\t\tcase 50:\t// he faces away\n\t\t\to->frame = 8;\n\t\t\to->xinertia = 0;\n\t\tbreak;\n\t\t\n\t\tcase 60:\t// he walks\n\t\t\to->state = 61;\n\t\t\tbalrog_walk_init(o);\n\t\tcase 61:\n\t\t{\n\t\t\tbalrog_walk_animation(o);\n\t\t\tXMOVE(0x200);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// he is teleported away (looking distressed)\n\t\t// this is when he is sent to Labyrinth at end of Sand Zone\n\t\tcase 70:\n\t\t\to->xinertia = 0;\n\t\t\to->timer = 0;\n\t\t\to->frame = 7;\n\t\t\to->state++;\n\t\tcase 71:\n\t\t\tif (DoTeleportOut(o, 2))\n\t\t\t\to->Delete();\n\t\tbreak;\n\t\t\n\t\tcase 80:\t// hands up and shakes\n\t\t\to->frame = 5;\n\t\t\to->state = 81;\n\t\tcase 81:\n\t\t{\n\t\t\tif (++o->timer & 2)\n\t\t\t\to->x += (1 << CSF);\n\t\t\telse\n\t\t\t\to->x -= (1 << CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// fly up and lift Curly & PNPC\n\t\t// (post-Ballos ending scene)\n\t\tcase 100:\n\t\t{\n\t\t\to->state = 101;\n\t\t\to->timer = 0;\n\t\t\to->frame = 2;\t// prepare for jump\n\t\t}\n\t\tcase 101:\n\t\t{\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->state = 102;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 3;\t// fly up\n\t\t\t\t\n\t\t\t\tDeleteObjectsOfType(OBJ_NPC_PLAYER);\n\t\t\t\tDeleteObjectsOfType(OBJ_CURLY);\n\t\t\t\t\n\t\t\t\tCreateObject(0, 0, OBJ_BALROG_PASSENGER, 0, 0, LEFT)->linkedobject = o;\n\t\t\t\tCreateObject(0, 0, OBJ_BALROG_PASSENGER, 0, 0, RIGHT)->linkedobject = o;\n\t\t\t\t\n\t\t\t\to->yinertia = -0x800;\n\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\t// so can fly through ceiling\n\t\t\t\tfall = false;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase 102:\t// flying up during escape seq\n\t\t{\n\t\t\tfall = false;\n\t\t\t\n\t\t\t// bust through ceiling\n\t\t\tint y = ((o->y + (4<<CSF)) >> CSF) / TILE_H;\n\t\t\tif (y < 35 && y >= 0)\n\t\t\t{\n\t\t\t\tint x = (o->CenterX() >> CSF) / TILE_W;\n\t\t\t\t\n\t\t\t\tif (map.tiles[x][y] != 0)\n\t\t\t\t{\n\t\t\t\t\t// smoke needs to go at the bottom of z-order or you can't\n\t\t\t\t\t// see any of the characters through all the smoke.\n\t\t\t\t\tmap_ChangeTileWithSmoke(x, y, 0, 4, false, lowestobject);\n\t\t\t\t\tmap_ChangeTileWithSmoke(x-1, y, 0, 4, false, lowestobject);\n\t\t\t\t\tmap_ChangeTileWithSmoke(x+1, y, 0, 4, false, lowestobject);\n\t\t\t\t\t\n\t\t\t\t\tmegaquake(10, 0);\n\t\t\t\t\tsound(SND_MISSILE_HIT);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (o->Bottom() < -(20<<CSF))\n\t\t\t{\n\t\t\t\tquake(30, 0);\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 500:\t// used during Balfrog death scene\n\t\t{\n\t\t\tfall = false;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->balrog.smoking)\n\t{\n\t\tif (++o->balrog.smoketimer > 20 || !random(0, 16))\n\t\t{\n\t\t\tSmokeClouds(o, 1, 4, 4);\n\t\t\to->balrog.smoketimer = 0;\n\t\t}\n\t}\n\t\n\tif (fall)\n\t{\n\t\to->yinertia += 0x20;\n\t\tif (o->yinertia >= 0x5ff)\n\t\t\to->yinertia = 0x5ff;\n\t}\n}\n\nvoid ai_balrog_drop_in(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// he is greenish when he first appears in Gum Room\n\t\t\tif (DoesCurrentStageUseSpriteset(NPCSET_FROG))\n\t\t\t\to->sprite = SPR_BALROG_GREEN;\n\t\t\t\n\t\t\t// z-order hacking\n\t\t\tif (game.curmap == STAGE_SEAL_CHAMBER_2)\n\t\t\t\to->PushBehind(lowestobject);\n\t\t\t\n\t\t\to->state = 1;\n\t\t\to->frame = 3;\t// falling\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\t// since balrog often falls through the ceiling we must wait until he is free-falling\n\t\t\t// before we start checking to see if he hit the floor\n\t\t\tif (!o->blockd && !o->blocku)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t// free-falling\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->frame = 2;\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tSmokeSide(o, 4, DOWN);\n\t\t\t\tquake(30);\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t// landed\n\t\t\tif (++o->timer > 20) { o->state = 4; o->frame = 0; }\n\t\tbreak;\n\t}\n\t\n\tif (o->state == 1 || o->state == 2)\n\t\to->yinertia += 0x20;\n}\n\n\n\n// Balrog busting in the door of the Shack.\n// he exists like this for only a moment, then the script\n// changes him to a standard OBJ_BALROG.\nvoid ai_balrog_bust_in(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\tSmokeClouds(o, 10, 8, 8);\n\t\t\to->y += (10 << CSF);\n\t\t\to->yinertia = -0x100;\n\t\t\t\n\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\tquake(30);\n\t\t\t\n\t\t\to->state = 1;\n\t\t\to->frame = 3;\n\t\tcase 1:\t\t// falling the short distance to ground\n\t\t{\n\t\t\to->yinertia += 0x10;\n\t\t\tif (o->yinertia > 0 && o->blockd)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->frame = 2;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tquake(30);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// landing animation\n\t\tcase 2:\n\t\t{\n\t\t\tif (++o->timer > 16)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->frame = 0;\n\t\t\t\to->animtimer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// standing and blinking\n\t\tcase 3:\n\t\tcase 4:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\trandblink(o, 4, 16, 100);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tLIMITY(0x5FF);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid balrog_walk_init(Object *o)\n{\n\to->frame = 9;\n\to->animtimer = 0;\n}\n\nvoid balrog_walk_animation(Object *o)\n{\n\tif (++o->animtimer > 3)\n\t{\n\t\to->animtimer = 0;\n\t\to->frame++;\n\t\t\n\t\tif (o->frame == 10 || o->frame == 11)\n\t\t\tsound(SND_THUD);\n\t\t\n\t\tif (o->frame > 12)\n\t\t\to->frame = 9;\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/npc/balrog.fdh",
    "content": "//hash:f6097911\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//-----------------[referenced from ai/npc/balrog.cpp]---------------//\nvoid megaquake(int quaketime, int snd);\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//-----------------[referenced from ai/npc/balrog.cpp]---------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//-----------------[referenced from ai/npc/balrog.cpp]---------------//\nvoid map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind);\n\n\n/* located in tsc.cpp */\n\n//-----------------[referenced from ai/npc/balrog.cpp]---------------//\nint GetCurrentScript(void);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from ai/npc/balrog.cpp]---------------//\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\nbool DoTeleportOut(Object *o, int slowness);\nvoid DeleteObjectsOfType(int type);\n\n\n/* located in ai/npc/balrog.cpp */\n\n//-----------------[referenced from ai/npc/balrog.cpp]---------------//\nvoid onspawn_balrog(Object *o);\nvoid ai_balrog(Object *o);\nvoid ai_balrog_drop_in(Object *o);\nvoid ai_balrog_bust_in(Object *o);\nvoid balrog_walk_init(Object *o);\nvoid balrog_walk_animation(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------------[referenced from ai/npc/balrog.cpp]---------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nvoid SmokeSide(Object *o, int nclouds, int dir);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/npc/balrog.cpp]---------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/npc/balrog.cpp]---------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/npc/curly.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"curly.fdh\"\n\n#define CURLY_STAND\t\t\t\t0\n#define CURLY_WALK\t\t\t\t3\n#define CURLY_WALKING\t\t\t4\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_CURLY, ai_curly);\n\t\n\tAFTERMOVE(OBJ_CURLY_CARRIED, aftermove_curly_carried);\n\t\n\tONTICK(OBJ_CURLY_CARRIED_SHOOTING, ai_curly_carried_shooting);\n\tONTICK(OBJ_CCS_GUN, ai_ccs_gun);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// regular NPC curly\nvoid ai_curly(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t\t\t\t\t\t// state 0: stand and do nothing\n\t\t\to->frame = 0;\n\t\t\to->flags |= FLAG_SCRIPTONACTIVATE;\t// needed for after Almond battle\n\t\tcase 1:\n\t\t\t// important that state 1 does not change look-away frame for Drain cutscene\n\t\t\tif (o->frame != 12) o->frame = 0;\n\t\t\to->xinertia = 0;\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t\t\t\t\t\t// state 3: walk forward\n\t\tcase 10:\t\t\t\t\t\t// state 10: walk to player and stop\n\t\t{\n\t\t\tif (o->state == 10) FACEPLAYER;\n\t\t\to->state++;\n\t\t\to->animtimer = 0;\n\t\t\to->frame = 0;\n\t\t}\n\t\tcase 4:\n\t\tcase 11:\n\t\t{\n\t\t\tif (o->state == 11 && pdistlx(20<<CSF))\n\t\t\t{\n\t\t\t\to->state = 0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tANIMATE(5, 0, 3);\n\t\t\tif (!o->blockd) o->frame = 3;\n\t\t\t\n\t\t\tXMOVE(0x200);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// state 5: curly makes a \"kaboom\", then looks sad.\n\t\tcase 5:\n\t\t\to->state = 6;\n\t\t\tSmokeClouds(o, 8, 0, 0);\n\t\tcase 6:\n\t\t\to->frame = 16;\n\t\tbreak;\n\t\t\n\t\tcase 20:\t\t\t// face away\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 12;\n\t\tbreak;\n\t\t\n\t\tcase 21:\t\t\t// look up\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 4;\n\t\tbreak;\n\t\t\n\t\tcase 30:\t\t\t// state 30: curly goes flying through the air and is knocked out\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->frame = 14;\n\t\t\to->timer2 = 0;\n\t\t\to->yinertia = -0x400;\n\t\t\tXMOVE(-0x200);\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t\to->state = 32;\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\tcase 32:\t\t\t// state 32: curly is laying knocked out\n\t\t{\n\t\t\to->frame = 15;\n\t\t\to->xinertia = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// walk backwards from collapsing wall during final cutscene\n\t\tcase 70:\n\t\t{\n\t\t\to->state = 71;\n\t\t\to->timer = 0;\n\t\t\to->frame = 1;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 71:\n\t\t{\n\t\t\tXMOVE(-0x100);\n\t\t\tANIMATE(8, 0, 3);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\n// curly being carried by Tow Rope\nvoid aftermove_curly_carried(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->frame = 17;\n\t\t\to->flags &= ~FLAG_SCRIPTONACTIVATE;\n\t\t\t\n\t\t\t// turn on the HVTrigger in Waterway that kills Curly if you haven't\n\t\t\t// drained the water out of her\n\t\t\tif (game.curmap == STAGE_WATERWAY)\n\t\t\t{\n\t\t\t\tObject *t = FindObjectByID2(220);\n\t\t\t\tif (t) t->ChangeType(OBJ_HVTRIGGER);\n\t\t\t}\n\t\t}\n\t\tcase 1:\n\t\t{\t// carried by player\n\t\t\tStickToPlayer(o, -2, -13, -18);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// floating away after Ironhead battle\n\t\tcase 10:\n\t\t{\n\t\t\to->xinertia = 0x40;\n\t\t\to->yinertia = -0x20;\n\t\t\to->state = 11;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tif (o->y < MAPY(4))\t// if in top part of screen, reverse before hitting wall\n\t\t\t\to->yinertia = 0x20;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\n\t\t{\n\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_curly_carried_shooting(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\to->x = player->CenterX();\n\t\to->y = player->CenterY();\n\t\to->state = 1;\n\t\t\n\t\to->BringToFront();\n\t\t\n\t\tObject *gun;\n\t\tgun = CreateObject(0, 0, OBJ_CCS_GUN);\n\t\tgun->linkedobject = o;\n\t\tgun->PushBehind(o);\n\t}\n\t\n\t// get player center position--\n\t// coordinates make more sense when figured this way\n\tint px = player->x + (8 << CSF);\n\tint py = player->y + (8 << CSF);\n\t\n\to->dir = player->dir ^ 1;\n\t\n\tif (player->look)\n\t{\n\t\to->xmark = px;\n\t\t\n\t\tif (player->look == UP)\n\t\t{\n\t\t\tif (player->blockd)\n\t\t\t{\n\t\t\t\to->ymark = py - (12 << CSF);\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->ymark = py + (8 << CSF);\n\t\t\t\to->frame = 2;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t// player looking down (and implicitly, not blockd)\n\t\t\to->ymark = py - (8 << CSF);\n\t\t\to->frame = 1;\n\t\t}\n\t}\n\telse\t// normal/horizontal\n\t{\n\t\tif (player->dir == LEFT)\n\t\t\to->xmark = px + (7 << CSF);\n\t\telse\n\t\t\to->xmark = px - (7 << CSF);\n\t\t\n\t\to->ymark = py - (3 << CSF);\n\t\to->frame = 0;\n\t}\n\t\n\to->x += (o->xmark - o->x) / 2;\n\to->y += (o->ymark - o->y) / 2;\n\t\n\t// bounce as player walks\n\tif (player->walking && (player->walkanimframe & 1))\n\t\to->y -= (1 << CSF);\n}\n\n\nvoid ai_ccs_gun(Object *o)\n{\n\tObject *curly = o->linkedobject;\n\tif (!curly) return;\n\t\n\to->dir = curly->dir;\n\to->frame = curly->frame;\n\t\n\tswitch(o->frame)\n\t{\n\t\tcase 0:\t\t// horizontal/normal\n\t\t{\n\t\t\tif (curly->dir == RIGHT)\n\t\t\t\to->x = curly->x + (8 << CSF);\n\t\t\telse\n\t\t\t\to->x = curly->x - (8 << CSF);\n\t\t\t\n\t\t\to->y = curly->y;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// looking up\n\t\t{\n\t\t\to->x = curly->x;\n\t\t\to->y = curly->y - (10 << CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// looking down\n\t\t{\n\t\t\to->x = curly->x;\n\t\t\to->y = curly->y + (10 << CSF);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (pinputs[FIREKEY] != o->timer2)\n\t{\n\t\to->timer2 = pinputs[FIREKEY];\n\t\tif (pinputs[FIREKEY])\n\t\t{\n\t\t\tif (CountObjectsOfType(OBJ_NEMESIS_SHOT_CURLY) < 2)\n\t\t\t{\n\t\t\t\tint shotdir = curly->dir;\n\t\t\t\tif (curly->frame == 1) shotdir = UP;\n\t\t\t\tif (curly->frame == 2) shotdir = DOWN;\n\t\t\t\t\n\t\t\t\tObject *shot = CreateObject(0, 0, OBJ_NEMESIS_SHOT_CURLY);\n\t\t\t\tSetupBullet(shot, curly->x, curly->y, B_CURLYS_NEMESIS, shotdir);\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n\n\n"
  },
  {
    "path": "ai/npc/curly.fdh",
    "content": "//hash:d9c51670\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-----------------[referenced from ai/npc/curly.cpp]----------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//-----------------[referenced from ai/npc/curly.cpp]----------------//\nObject *FindObjectByID2(int id2);\n\n\n/* located in p_arms.cpp */\n\n//-----------------[referenced from ai/npc/curly.cpp]----------------//\nvoid SetupBullet(Object *shot, int x, int y, int btype, int dir);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from ai/npc/curly.cpp]----------------//\nvoid StickToPlayer(Object *o, int x_left, int x_right, int off_y);\n\n\n/* located in ai/npc/curly.cpp */\n\n//-----------------[referenced from ai/npc/curly.cpp]----------------//\nvoid ai_curly(Object *o);\nvoid aftermove_curly_carried(Object *o);\nvoid ai_curly_carried_shooting(Object *o);\nvoid ai_ccs_gun(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------------[referenced from ai/npc/curly.cpp]----------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n"
  },
  {
    "path": "ai/npc/curly_ai.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"curly_ai.fdh\"\n\n#define CAI_INIT\t\t\t20\t\t\t// ANP'd to this by the entry script in Lab M\n#define CAI_START\t\t\t21\t\t\t// ANP'd to this by Almond script\n#define CAI_RUNNING\t\t\t22\n#define CAI_KNOCKEDOUT\t\t40\t\t\t// knocked out at beginning of Almond battle\n#define CAI_ACTIVE\t\t\t99\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_CURLY_AI, ai_curly_ai);\n\t\n\tONTICK(OBJ_CAI_GUN, ai_cai_gun);\n\tAFTERMOVE(OBJ_CAI_GUN, aftermove_cai_gun);\n\tAFTERMOVE(OBJ_CAI_WATERSHIELD, aftermove_cai_watershield);\n}\n\n// curly that fights beside you\nvoid ai_curly_ai(Object *o)\n{\nint xdist, ydist;\nint xlimit;\nchar reached_p;\nint otiley;\nchar seeking_player = 0;\nchar wantdir;\n\n/*\n\tdebug(\"Curly Console\");\n\tdebug(\"TGT: [%d,%d] %d\", o->xmark>>CSF, o->ymark>>CSF, game.curlytarget.timeleft);\n\tdebug(\"State: %d\", o->state);\n\tdebug(\"\");\n\tdebug(\"RPT %d\", o->curly.reachptimer);\n\tdebug(\"TJT %d\", o->curly.tryjumptime);\n\tdebug(\"IJT %d:%d\", o->curly.impjumptime, o->curly.impjump);\n\tgame.debug.god = 1;\nif (inputs[DEBUGKEY7]) o->state=999;\n*/\n\t\n\t// put these here so she'll spawn the shield immediately, even while she's still\n\t// knocked out. otherwise she wouldn't have it turned on in the cutscene if the\n\t// player defeats the core before she gets up. I know that's unlikely but still.\n\tif (!o->curly.spawned_watershield)\n\t{\n\t\tObject *shield = CreateObject(0, 0, OBJ_CAI_WATERSHIELD);\n\t\tshield->sprite = SPR_WATER_SHIELD;\n\t\tshield->linkedobject = o;\n\t\t\n\t\to->BringToFront();\t\t\t\t// curly in front of monsters,\n\t\tshield->BringToFront();\t\t\t// and shield in front of curly\n\t\t\n\t\to->curly.spawned_watershield = 1;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia += 0x20;\n\t\tbreak;\n\t\t\n\t\tcase CAI_INIT:\t\t\t// set to this by an ANP in Maze M\n\t\t\to->x = player->x;\n\t\t\to->y = player->y;\n\t\tcase CAI_START:\t\t\t// set here after she stops being knocked out in Almond\n\t\t{\n\t\t\to->invisible = 0;\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t\to->dir = player->dir;\n\t\t\to->state = CAI_ACTIVE;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\t// spawn her gun\n\t\t\tObject *gun = CreateObject(0, 0, OBJ_CAI_GUN);\n\t\t\tgun->linkedobject = o;\n\t\t\tgun->PushBehind(o);\n\t\t\t\n\t\t\tif (player->weapons[WPN_MGUN].hasWeapon)\n\t\t\t\to->curly.gunsprite = SPR_PSTAR;\n\t\t\telse\n\t\t\t\to->curly.gunsprite = SPR_MGUN;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase CAI_KNOCKEDOUT:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->state = CAI_KNOCKEDOUT+1;\n\t\t\to->frame = 15;\n\t\t}\n\t\tcase CAI_KNOCKEDOUT+1:\n\t\t{\n\t\t\tif (++o->timer > 1000)\n\t\t\t{\t// start fighting\n\t\t\t\to->state = CAI_START;\n\t\t\t}\n\t\t\telse if (o->timer > 750)\n\t\t\t{\t// stand up\n\t\t\t\to->flags &= ~FLAG_SCRIPTONACTIVATE;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state != CAI_ACTIVE) return;\n\t\n\t// first figure out where our target is\n\t\n\t// hack in case player REALLY leaves her behind. this works because of the way\n\t// the level is in a Z shape. first we check to see if the player is on the level below ours.\n\tif ((player->y > o->y && ((player->y - o->y) > 160<<CSF)) || o->state==999)\n\t{\n\t\t// if we're on the top section, head all the way to right, else if we're on the\n\t\t// middle section, head for the trap door that was destroyed by the button\n\t\totiley = (o->y >> CSF) / TILE_H;\n\t\t\n\t\tgame.curlytarget.timeleft = 0;\n\t\t\n\t\tif (otiley < 22)\n\t\t{\n\t\t\to->xmark = ((126 * TILE_W) + 8) << CSF;\t\t// center of big chute on right top\n\t\t}\n\t\telse if (otiley > 36 && otiley < 47)\n\t\t{\t// fell down chute in center of middle section\n\t\t\t// continue down chute, don't get hung up on sides\n\t\t\to->xmark = (26 * TILE_W) << CSF;\n\t\t}\n\t\telse if (otiley >= 47)\n\t\t{\t// bottom section - head for exit door\n\t\t\t// (this shouldn't ever execute, though, because player can't be lower than this)\n\t\t\to->xmark = (81 * TILE_W) << CSF;\n\t\t\tseeking_player = 1;\t\t// stop when reach exit door\n\t\t}\n\t\telse\n\t\t{\t// on middle section\n\t\t\to->xmark = ((7 * TILE_W) + 8) << CSF;\t\t// trap door which was destroyed by switch\n\t\t}\n\t\t\n\t\to->ymark = o->y;\n\t}\n\telse\n\t{\n\t\t// if we get real far away from the player leave the enemies alone and come find him\n\t\tif (!pdistlx(160<<CSF)) game.curlytarget.timeleft = 0;\n\t\t\n\t\t// if we're attacking an enemy head towards the enemy else return to the player\n\t\tif (game.curlytarget.timeleft)\n\t\t{\n\t\t\to->xmark = game.curlytarget.x;\n\t\t\to->ymark = game.curlytarget.y;\n\t\t\t\n\t\t\tgame.curlytarget.timeleft--;\n\t\t\tif (game.curlytarget.timeleft==60 && random(0, 2)==0) CaiJUMP(o);\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->xmark = player->x;\n\t\t\to->ymark = player->y;\n\t\t\tseeking_player = 1;\n\t\t}\n\t}\n\t\n\t// do not fall off the middle railing in Almond\n\tif (game.curmap == STAGE_ALMOND)\n\t{\n\t\t#define END_OF_RAILING\t\t(((72*TILE_W)-8)<<CSF)\n\t\tif (o->xmark > END_OF_RAILING)\n\t\t{\n\t\t\to->xmark = END_OF_RAILING;\n\t\t}\n\t}\n\t\n\t// calculate distance to target\n\txdist = abs(o->x - o->xmark);\n\tydist = abs(o->y - o->ymark);\n\t\n\t// face target. I used two seperate IF statements so she doesn't freak out at start point\n\t// when her x == xmark.\n\tif (o->x < o->xmark) wantdir = RIGHT;\n\tif (o->x > o->xmark) wantdir = LEFT;\n\tif (wantdir != o->dir)\n\t{\n\t\tif (++o->curly.changedirtimer > 4)\n\t\t{\n\t\t\to->curly.changedirtimer = 0;\n\t\t\to->dir = wantdir;\n\t\t}\n\t}\n\telse o->curly.changedirtimer = 0;\n\t\n\t// if trying to return to the player then go into a rest state when we've reached him\n\treached_p = 0;\n\tif (seeking_player && xdist < (32<<CSF) && ydist < (64<<CSF))\n\t{\n\t\tif (++o->curly.reachptimer > 80)\n\t\t{\n\t\t\to->xinertia *= 7;\n\t\t\to->xinertia /= 8;\n\t\t\to->frame = 0;\n\t\t\treached_p = 1;\n\t\t}\n\t}\n\telse o->curly.reachptimer = 0;\n\t\n\tif (!reached_p)\t\t// if not at rest walk towards target\n\t{\n\t\t// walking animation\n\t\tif (++o->animtimer > 4)\n\t\t{\n\t\t\to->animtimer = 0;\n\t\t\tif (++o->animframe > 3) o->animframe = 0;\n\t\t}\n\t\t\n\t\t// walk towards target\n\t\tif (o->x > o->xmark) o->xinertia -= 0x20;\n\t\tif (o->x < o->xmark) o->xinertia += 0x20;\n\t\to->frame = o->animframe;\n\t\t\n\t\t// jump if we hit a wall\n\t\tif ((o->blockr && o->xinertia > 0) || (o->blockl && o->xinertia < 0))\n\t\t{\n\t\t\tif (++o->curly.blockedtime > 8)\n\t\t\t{\n\t\t\t\tCaiJUMP(o);\n\t\t\t}\n\t\t}\n\t\telse o->curly.blockedtime = 0;\n\t\t\n\t\t// if our target gets really far away (like p is leaving us behind) and\n\t\t// the above jumping isn't getting us anywhere, activate the Improbable Jump\n\t\tif ((o->blockl || o->blockr) && xdist > (80<<CSF))\n\t\t{\n\t\t\tif (++o->curly.impjumptime > 60)\n\t\t\t{\n\t\t\t\tif (o->blockd)\n\t\t\t\t{\n\t\t\t\t\tCaiJUMP(o);\n\t\t\t\t\to->curly.impjumptime = -100;\n\t\t\t\t\to->curly.impjump = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse o->curly.impjumptime = 0;\n\t\t\n\t\t// if we're below the target try jumping around randomly\n\t\tif (o->y > o->ymark && (o->y - o->ymark) > (16<<CSF))\n\t\t{\n\t\t\tif (++o->curly.tryjumptime > 20)\n\t\t\t{\n\t\t\t\to->curly.tryjumptime = 0;\n\t\t\t\tif (random(0, 1)) CaiJUMP(o);\n\t\t\t}\n\t\t}\n\t\telse o->curly.tryjumptime = 0;\n\t}\n\telse o->animtimer = o->animframe = 0;\t\t// reset walk anim\n\t\n\t// force jump/fall frames\n\tif (o->yinertia < 0) o->frame = 3;\n\telse if (!o->blockd) o->frame = 1;\n\telse if (o->x==o->xmark) o->frame = 0;\n\t\n\t// the improbable jump - when AI gets confused, just cheat!\n\t// jump REALLY high by reducing gravity until we clear the wall\n\tif (o->curly.impjump > 0)\n\t{\n\t\to->yinertia += 0x10;\n\t\t// deactivate Improbable Jump once we clear the wall or hit the ground\n\t\tif (o->dir==LEFT && !o->blockl) o->curly.impjump--;\n\t\tif (o->dir==RIGHT && !o->blockr) o->curly.impjump--;\n\t\tif (o->yinertia > 0 && o->blockd) o->curly.impjump--;\n\t}\n\telse o->yinertia += 0x33;\n\t\n\t// slow down when we hit bricks\n\tif (o->blockl || o->blockr)\n\t{\n\t\t// full stop if on ground, partial stop if in air\n\t\txlimit = o->blockd ? 0x000:0x180;\n\t\t\n\t\tif (o->blockl)\n\t\t{\n\t\t\tif (o->xinertia < -xlimit) o->xinertia = -xlimit;\n\t\t}\n\t\telse if (o->xinertia > xlimit)\t\t// we don't have to test blockr because we already know one or the other is set and that it's not blockl\n\t\t{\n\t\t\to->xinertia = xlimit;\n\t\t}\n\t}\n\t\n\t// look up/down at target\n\to->curly.look = 0;\n\tif (!reached_p || abs(o->y - player->y) > (48<<CSF))\n\t{\n\t\tif (o->y > o->ymark && ydist >= (12<<CSF) && (!seeking_player || ydist >= (80<<CSF))) o->curly.look = UP;\n\t\telse if (o->y < o->ymark && !o->blockd && ydist >= (80<<CSF)) o->curly.look = DOWN;\n\t}\n\t\n\tif (o->curly.look == UP) o->frame += 4;\n\telse if (o->curly.look == DOWN) o->frame += 8;\n\t\n\tLIMITX(0x300);\n\tLIMITY(0x5ff);\n}\n\nstatic void CaiJUMP(Object *o)\n{\n\tif (o->blockd && !o->blocku)\n\t{\n\t\to->yinertia = random(-0x600, -0x300);\n\t\to->frame = 3;\n\t\tsound(SND_PLAYER_JUMP);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_cai_gun(Object *o)\n{\nObject *curly = o->linkedobject;\nObject *shot;\nuchar fire;\nint x, y, dir;\n#define SMALLDIST\t\t(32 << CSF)\n#define BIGDIST\t\t\t(160 << CSF)\n\n\tif (!curly) { o->Delete(); return; }\n\t\n\to->frame = 0;\n\tif (curly->curly.look)\n\t{\n\t\to->sprite = (curly->curly.gunsprite + 1);\n\t\tif (curly->curly.look==DOWN) o->frame = 1;\n\t}\n\telse\n\t{\n\t\to->sprite = curly->curly.gunsprite;\n\t}\n\t\n\tif (game.curlytarget.timeleft)\n\t{\n\t\t// fire when we get close to the target\n\t\tif (!curly->curly.look)\n\t\t{\t// firing LR-- fire when lined up vertically and close by horizontally\n\t\t\tfire = ((abs(o->x - game.curlytarget.x) <= BIGDIST) && (abs(o->y - game.curlytarget.y) <= SMALLDIST));\n\t\t}\n\t\telse\n\t\t{\t// firing vertically-- fire when lined up horizontally and close by vertically\n\t\t\tfire = ((abs(o->x - game.curlytarget.x) <= SMALLDIST) && (abs(o->y - game.curlytarget.y) <= BIGDIST));\n\t\t}\n\t\t\n\t\tif (fire)\n\t\t{\n\t\t\t// get coordinate of our action point\n\t\t\tx = (o->ActionPointX() - o->DrawPointX());\n\t\t\ty = (o->ActionPointY() - o->DrawPointY());\n\t\t\tdir = curly->curly.look ? curly->curly.look : o->dir;\n\t\t\t\n\t\t\tif (curly->curly.gunsprite==SPR_MGUN)\n\t\t\t{\t// she has the Machine Gun\n\t\t\t\tif (!o->timer)\n\t\t\t\t{\n\t\t\t\t\to->timer2 = random(2, 6);\t\t// no. shots to fire\n\t\t\t\t\to->timer = random(40, 50);\n\t\t\t\t\to->animtimer = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (o->timer2)\n\t\t\t\t{\t// create the MGun blast\n\t\t\t\t\tif (!o->animtimer)\n\t\t\t\t\t{\n\t\t\t\t\t\tFireLevel23MGun(x, y, 2, dir);\n\t\t\t\t\t\t\n\t\t\t\t\t\to->animtimer = 5;\n\t\t\t\t\t\to->timer2--;\n\t\t\t\t\t}\n\t\t\t\t\telse o->animtimer--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// she has the Polar Star\n\t\t\t\tif (!o->timer)\n\t\t\t\t{\n\t\t\t\t\to->timer = random(4, 16);\n\t\t\t\t\tif (random(0, 10)==0) o->timer += random(20, 30);\n\t\t\t\t\t\n\t\t\t\t\t// create the shot\n\t\t\t\t\tshot = CreateObject(x, y, OBJ_POLAR_SHOT);\n\t\t\t\t\tSetupBullet(shot, x, y, B_PSTAR_L3, dir);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (o->timer) o->timer--;\n}\n\nvoid aftermove_cai_gun(Object *o)\n{\n\tObject *curly = o->linkedobject;\n\tif (curly)\n\t{\n\t\to->x = curly->ActionPointX();\n\t\to->y = curly->ActionPointY();\n\t\to->dir = curly->dir;\n\t}\n}\n\n\n// curly's air bubble when she goes underwater\nvoid aftermove_cai_watershield(Object *o)\n{\n\tObject *curly = o->linkedobject;\n\tif (!curly)\n\t{\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tstatic const Point cwp = { 8, 5 };\n\tif (curly->GetAttributes(&cwp, 1, NULL) & TA_WATER)\n\t{\n\t\to->invisible = false;\n\t\to->x = curly->x;\n\t\to->y = curly->y;\n\t\t\n\t\to->frame = (++o->timer & 2) ? 1 : 0;\n\t}\n\telse\n\t{\n\t\to->invisible = true;\n\t\to->timer = o->frame = 0;\n\t}\n}\n\n\n"
  },
  {
    "path": "ai/npc/curly_ai.fdh",
    "content": "//hash:c172b805\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//----------------[referenced from ai/npc/curly_ai.cpp]--------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in p_arms.cpp */\n\n//----------------[referenced from ai/npc/curly_ai.cpp]--------------//\nvoid FireLevel23MGun(int x, int y, int level, int dir);\nvoid SetupBullet(Object *shot, int x, int y, int btype, int dir);\n\n\n/* located in ai/npc/curly_ai.cpp */\n\n//----------------[referenced from ai/npc/curly_ai.cpp]--------------//\nvoid ai_curly_ai(Object *o);\nstatic void CaiJUMP(Object *o);\nvoid ai_cai_gun(Object *o);\nvoid aftermove_cai_gun(Object *o);\nvoid aftermove_cai_watershield(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//----------------[referenced from ai/npc/curly_ai.cpp]--------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//----------------[referenced from ai/npc/curly_ai.cpp]--------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/npc/misery.fdh",
    "content": "//hash:1c683b9c\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-----------------[referenced from ai/npc/misery.cpp]---------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//-----------------[referenced from ai/npc/misery.cpp]---------------//\nObject *FindObjectByID2(int id2);\n\n\n/* located in trig.cpp */\n\n//-----------------[referenced from ai/npc/misery.cpp]---------------//\nvoid ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from ai/npc/misery.cpp]---------------//\nbool DoTeleportIn(Object *o, int slowness);\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in ai/npc/misery.cpp */\n\n//-----------------[referenced from ai/npc/misery.cpp]---------------//\nvoid ai_misery_float(Object *o);\nvoid ai_miserys_bubble(Object *o);\nstatic Object *mbubble_find_target(void);\nvoid ai_misery_stand(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/npc/misery.cpp]---------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//-----------------[referenced from ai/npc/misery.cpp]---------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/npc/misery.cpp]---------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/npc/misery_ai.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"misery.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_MISERY_FLOAT, ai_misery_float);\n\tONTICK(OBJ_MISERY_STAND, ai_misery_stand);\n\tONTICK(OBJ_MISERYS_BUBBLE, ai_miserys_bubble);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// teleport in and float\nvoid ai_misery_float(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\t\to->x += (1 << CSF);\t// check Undead Core intro to prove this is correct\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t\to->frame = 0;\n\t\t\to->timer = 0;\n\t\tcase 1:\n\t\t\tif (DoTeleportIn(o, 1))\n\t\t\t\to->state = 10;\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// floating\n\t\t\to->state = 11;\n\t\t\to->timer = 0;\n\t\t\to->animframe = 0;\n\t\t\to->yinertia = (1<<CSF);\n\t\tcase 11:\n\t\t\tif (o->y > o->ymark) o->yinertia -= 16;\n\t\t\tif (o->y < o->ymark) o->yinertia += 16;\n\t\t\tif (o->yinertia > 0x100) o->yinertia = 0x100;\n\t\t\tif (o->yinertia < -0x100) o->yinertia = -0x100;\n\t\tbreak;\n\t\t\n\t\tcase 13:\t// fall from floaty\n\t\t\to->frame = 1;\n\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\n\t\t\to->yinertia += 0x40;\n\t\t\tif (o->yinertia > 0x5ff) o->yinertia = 0x5ff;\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\tsound(SND_THUD);\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->state = 14;\n\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\to->animframe = 2;\n\t\t\t\to->animtimer = 30;\t\t// blink as soon as hit ground\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 14: break;\t\t\t// standing\n\t\t\n\t\t// spawn the bubble which picks up Toroko in Shack\n\t\tcase 15:\n\t\t\to->frame = 4;\n\t\t\to->timer = 0;\n\t\t\to->state = 16;\n\t\tcase 16:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 30)\n\t\t\t{\n\t\t\t\tsound(SND_BUBBLE);\n\t\t\t\tCreateObject(o->x, o->y - (16 << CSF), OBJ_MISERYS_BUBBLE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer >= 50)\n\t\t\t\to->state = 14;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20: \t// fly away\n\t\t\to->state = 21;\n\t\t\to->frame = 0;\n\t\t\to->yinertia = 0;\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\tcase 21:\n\t\t\to->yinertia -= 0x20;\n\t\t\tif (o->y < -0x1000) o->Delete();\n\t\tbreak;\n\t\t\n\t\tcase 25:\t// big spell\n\t\tcase 26:\t// she flashes, then a clap of thunder\n\t\t\tai_misery_stand(o);\n\t\tbreak;\n\t\tcase 27:\t// return to standing after lightning strike\n\t\t\tif (++o->timer > 16)\n\t\t\t\to->state = 14;\n\t\tbreak;\n\t}\n\t\n\tif (o->state==11 || o->state==14)\n\t{\n\t\t// blink\n\t\tif (o->animtimer)\n\t\t{\n\t\t\to->animtimer--;\n\t\t\to->frame = 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->frame = 0;\n\t\t\tif (random(0, 100) == 1)\n\t\t\t{\n\t\t\t\to->animtimer = 30;\n\t\t\t}\n\t\t}\n\t\t\n\t\to->frame += o->animframe;\n\t}\n}\n\nvoid ai_miserys_bubble(Object *o)\n{\nObject *target;\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// find the Toroko object we are to home in on\n\t\t\ttarget = mbubble_find_target();\n\t\t\tif (!target)\n\t\t\t{\n\t\t\t\to->state = 9999;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\to->xmark = target->x - (6 << CSF);\n\t\t\to->ymark = target->y - (6 << CSF);\n\t\t\t\n\t\t\tThrowObject(o, o->xmark, o->ymark, 0, (2 << CSF));\n\t\t\to->state = 1;\n\t\t\t\n\t\t\t// correct values: 0x3F0, 0xAE\n\t\t\tstat(\"Computed toss values xi: 0x%x, 0x%x\", o->xinertia, o->yinertia);\n\t\t\tstat(\"Target x/y: 0x%x, 0x%x\", target->x, target->y);\n\t\t}\n\t\tcase 1:\n\t\t\tANIMATE(1, 0, 1);\n\t\t\t\n\t\t\tif (abs(o->x - o->xmark) <= (3 << CSF) && \\\n\t\t\t\tabs(o->y - o->ymark) <= (3 << CSF))\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->frame = 2;\n\t\t\t\tsound(SND_BUBBLE);\n\t\t\t\t\n\t\t\t\tif ((target = mbubble_find_target()))\n\t\t\t\t\ttarget->invisible = true;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tANIMATE(1, 2, 3);\n\t\t\t\n\t\t\to->xinertia -= 0x20;\n\t\t\to->yinertia -= 0x20;\n\t\t\tLIMITX(0x5FF);\n\t\t\tLIMITY(0x5FF);\n\t\t\t\n\t\t\tif (o->y < -1000)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n}\n\nstatic Object *mbubble_find_target(void)\n{\n\tObject *target = FindObjectByID2(1000);\n\tif (!target)\n\t{\n\t\tstaterr(\"ai_miserys_bubble: failed to find a target object with ID2=1000\");\n\t\treturn NULL;\n\t}\n\t\n\treturn target;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_misery_stand(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\tcase 1:\n\t\t\to->frame = 2;\n\t\t\trandblink(o, 3, 4);\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// she flys away\n\t\t\to->state = 21;\n\t\t\to->frame = 0;\n\t\t\to->yinertia = 0;\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\tcase 21:\n\t\t\to->yinertia -= 0x20;\n\t\t\tif (o->y < -0x1000) o->Delete();\n\t\tbreak;\n\t\t\n\t\t// big spell\n\t\t// she flashes, then a clap of thunder,\n\t\t// and she teleports away.\n\t\tcase 25:\n\t\t\to->state = 26;\n\t\t\to->timer = 0;\n\t\t\to->frame = 5;\n\t\t\to->animtimer = 0;\n\t\tcase 26:\n\t\t\tANIMATE(0, 5, 7);\n\t\t\tif (++o->timer == 20)\n\t\t\t{\n\t\t\t\tsound(SND_LIGHTNING_STRIKE);\n\t\t\t\tflashscreen.Start();\n\t\t\t\to->state = 27;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 4;\n\t\t\t}\n\t\tbreak;\n\t\tcase 27:\n\t\t{\n\t\t\tif (++o->timer > 50)\n\t\t\t{\t// return to standing\n\t\t\t\to->state = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// she throws up her staff like she's summoning something\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\t\to->frame = 2;\n\t\tcase 31:\n\t\t\tif (o->timer==10) o->frame = 4;\n\t\t\tif (o->timer==130) o->state = 1;\n\t\t\to->timer++;\n\t\tbreak;\n\t\t\n\t\t// fire at DOCTOR_GHOST\n\t\tcase 40:\n\t\t{\n\t\t\to->state = 41;\n\t\t\to->timer = 0;\n\t\t\to->frame = 4;\n\t\t}\n\t\tcase 41:\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 30 || \\\n\t\t\t\to->timer == 40 || \\\n\t\t\t\to->timer == 50)\n\t\t\t{\n\t\t\t\tObject *shot = CreateObject(o->x+(16<<CSF), o->y, OBJ_IGOR_SHOT);\n\t\t\t\tshot->xinertia = 0x600;\n\t\t\t\tshot->yinertia = random(-0x200, 0);\n\t\t\t\t\n\t\t\t\tsound(SND_SNAKE_FIRE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/npc/npcguest.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"npcguest.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_MAHIN, ai_npc_mahin);\n\t\n\tONSPAWN(OBJ_YAMASHITA_FLOWERS, onspawn_set_frame_from_id2);\n\tONTICK(OBJ_YAMASHITA_PAVILION, ai_yamashita_pavilion);\n\t\n\tONTICK(OBJ_CHTHULU, ai_chthulu);\n\t\n\tGENERIC_NPC_NOFACEPLAYER(OBJ_DR_GERO);\n\tGENERIC_NPC_NOFACEPLAYER(OBJ_NURSE_HASUMI);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_chthulu(Object *o)\n{\n\tif (!o->state)\n\t{\n\t\to->SnapToGround();\n\t\to->state = 1;\n\t}\n\t\n\t// open eyes when player comes near\n\to->frame = (pdistlx((48<<CSF)) && pdistly2((48<<CSF), (16<<CSF))) ? 1 : 0;\n}\n\n\n// fat mimiga from village\nvoid ai_npc_mahin(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->SnapToGround();\n\t\t\to->state = 1;\n\t\t\to->frame = 2;\n\t\t\n\t\tcase 1:\t// facing away\n\t\tbreak;\n\t\t\n\t\tcase 2:\t// talking to player\n\t\t\to->frame = 0;\n\t\t\trandblink(o);\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// Sandaime's Pavilion from Yamashita Farm\nvoid ai_yamashita_pavilion(Object *o)\n{\n\tif (!o->state)\n\t{\n\t\tif (o->dir == LEFT)\n\t\t{\t// Sandaime present\n\t\t\to->state = 1;\n\t\t}\n\t\telse\n\t\t{\t// Sandaime gone\n\t\t\to->x -= (TILE_W << CSF);\n\t\t\to->state = 2;\n\t\t\to->frame = 2;\n\t\t}\n\t}\n\t\n\tif (o->state == 1)\n\t{\n\t\to->frame = 0;\n\t\trandblink(o);\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/npc/npcguest.fdh",
    "content": "//hash:156aa096\n//automatically generated by Makegen\n\n/* located in ai/ai.cpp */\n\n//----------------[referenced from ai/npc/npcguest.cpp]--------------//\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in ai/npc/npcguest.cpp */\n\n//----------------[referenced from ai/npc/npcguest.cpp]--------------//\nvoid ai_chthulu(Object *o);\nvoid ai_npc_mahin(Object *o);\nvoid ai_yamashita_pavilion(Object *o);\n\n"
  },
  {
    "path": "ai/npc/npcplayer.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"npcplayer.fdh\"\n\n/*\n\tThis is an object which looks exactly like the player,\n\tbut is controlled as if he is an NPC. Used during cutscenes.\n*/\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_NPC_PLAYER, ai_npc_player);\n\tONTICK(OBJ_PTELIN, ai_ptelin);\n\tONTICK(OBJ_PTELOUT, ai_ptelout);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_npc_player(Object *o)\n{\nstatic const int pwalkanimframes[] = { 0, 1, 0, 2 };\n#define NUM_PWALK_FRAMES\t\t4\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t\t\n\t\t\t// used during Hermit Gunsmith scene when he is awake\n\t\t\tif (o->dirparam >= 10)\n\t\t\t{\n\t\t\t\to->x = player->x;\n\t\t\t\to->y = player->y;\n\t\t\t\to->dir = CVTDir(o->dirparam - 10);\n\t\t\t\to->dirparam = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// looking up\n\t\t{\n\t\t\to->frame = 3;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// he gets flattened\n\t\t{\n\t\t\tsound(SND_LITTLE_CRASH);\n\t\t\tSmokeClouds(o, 6, 8, 8);\n\t\t\to->state++;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\to->frame = 9;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// he teleports away\n\t\t{\n\t\t\tif (DoTeleportOut(o, 2))\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 50:\t// walking\n\t\t{\n\t\t\t// z-order tweaking for oside bad-ending\n\t\t\tObject *dragon = Objects::FindByType(OBJ_SKY_DRAGON);\n\t\t\tif (dragon) o->PushBehind(dragon);\n\t\t\t\n\t\t\to->state = 51;\n\t\t\to->animframe = 0;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 51:\n\t\t{\n\t\t\to->animate_seq(4, pwalkanimframes, NUM_PWALK_FRAMES);\n\t\t\tXMOVE(0x200);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// falling, upside-down (from good ending; Fall stage)\n\t\tcase 60:\n\t\t{\n\t\t\to->state = 61;\n\t\t\to->frame = 10;\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t}\n\t\tcase 61:\n\t\t{\n\t\t\to->ymark += 0x100;\n\t\t\to->x = o->xmark + (random(-1, 1) << CSF);\n\t\t\to->y = o->ymark + (random(-1, 1) << CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 80:\t// face away\n\t\t\to->frame = 11;\n\t\tbreak;\n\t\t\n\t\t// walking in place during credits\n\t\tcase 99:\n\t\tcase 100:\n\t\t{\n\t\t\to->state = 101;\n\t\t\to->frame = 1;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\tif ((player->equipmask & EQUIP_MIMIGA_MASK) || game.flags[1020])\n\t\t\t\to->sprite = SPR_MYCHAR_MIMIGA;\n\t\t}\n\t\tcase 101:\t// falling a short dist\n\t\tcase 102:\t// walk in place\n\t\t{\n\t\t\tif (!o->blockd)\n\t\t\t{\n\t\t\t\to->yinertia += 0x40;\n\t\t\t\tLIMITY(0x5ff);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->animate_seq(8, pwalkanimframes, NUM_PWALK_FRAMES);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// player (teleporting in)\nvoid ai_ptelin(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\to->frame = 0;\n\t\t\to->timer = 0;\n\t\t\to->x += (TILE_W << CSF);\n\t\t\to->y += (TILE_H / 2) << CSF;\n\t\t\to->state++;\n\t\t\t\n\t\t\t// note, it looks sort of like we might be supposed to face left when\n\t\t\t// appearing at the Labyrinth teleporter as well, but the original engine\n\t\t\t// does not do this, so I'm following what it does.\n\t\t\tif (game.curmap == STAGE_SAND)\n\t\t\t\to->dir = LEFT;\t// for Sand Zone, hackety\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (DoTeleportIn(o, 2))\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->yinertia += 0x40;\n\t\t\t\to->frame = 1;\n\t\t\t\to->state = 3;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = 4;\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// player (teleporting out)\nvoid ai_ptelout(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->y -= (TILE_H << CSF);\n\t\t\to->ymark = o->y - (8 << CSF);\n\t\t\t\n\t\t\to->frame = 0;\n\t\t\to->timer = 0;\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\t{\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->frame = 1;\n\t\t\t\to->timer = 0;\n\t\t\t\to->yinertia = -0x2FF;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tif (o->yinertia >= 0 && o->y >= o->ymark)\n\t\t\t{\n\t\t\t\to->y = o->ymark;\n\t\t\t\to->yinertia = 0;\n\t\t\t\t\n\t\t\t\to->state = 3;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\n\t\t{\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\to->state = 4;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\n\t\t{\n\t\t\tif (DoTeleportOut(o, 2))\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state < 3)\n\t\to->yinertia += 50;\n\t\n\tLIMITY(0x5ff);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/npc/npcplayer.fdh",
    "content": "//hash:6572894a\n//automatically generated by Makegen\n\n/* located in tsc.cpp */\n\n//---------------[referenced from ai/npc/npcplayer.cpp]--------------//\nint CVTDir(int csdir);\n\n\n/* located in ai/ai.cpp */\n\n//---------------[referenced from ai/npc/npcplayer.cpp]--------------//\nbool DoTeleportOut(Object *o, int slowness);\nbool DoTeleportIn(Object *o, int slowness);\n\n\n/* located in ai/npc/npcplayer.cpp */\n\n//---------------[referenced from ai/npc/npcplayer.cpp]--------------//\nvoid ai_npc_player(Object *o);\nvoid ai_ptelin(Object *o);\nvoid ai_ptelout(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//---------------[referenced from ai/npc/npcplayer.cpp]--------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//---------------[referenced from ai/npc/npcplayer.cpp]--------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//---------------[referenced from ai/npc/npcplayer.cpp]--------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/npc/npcregu.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../final_battle/doctor.h\"\t\t// for Red Crystal variables (Sue)\n#include \"npcregu.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_KAZUMA_AT_COMPUTER, ai_npc_at_computer);\n\tONTICK(OBJ_SUE_AT_COMPUTER, ai_npc_at_computer);\n\t\n\tONTICK(OBJ_JENKA, ai_jenka);\n\tONTICK(OBJ_BLUE_ROBOT, ai_blue_robot);\n\t\n\tONTICK(OBJ_DOCTOR, ai_doctor);\n\t\n\tONTICK(OBJ_TOROKO, ai_toroko);\n\tONTICK(OBJ_TOROKO_TELEPORT_IN, ai_toroko_teleport_in);\n\t\n\tONTICK(OBJ_SUE, ai_npc_sue);\n\tAFTERMOVE(OBJ_SUE, aftermove_npc_sue);\n\tONSPAWN(OBJ_SUE, onspawn_npc_sue);\n\tONTICK(OBJ_SUE_TELEPORT_IN, ai_sue_teleport_in);\n\t\n\tONTICK(OBJ_KING, ai_king);\n\tAFTERMOVE(OBJ_KINGS_SWORD, aftermove_StickToLinkedActionPoint);\n\t\n\tONTICK(OBJ_KANPACHI_FISHING, ai_kanpachi_fishing);\n\t\n\tONTICK(OBJ_PROFESSOR_BOOSTER, ai_professor_booster);\n\tONTICK(OBJ_BOOSTER_FALLING, ai_booster_falling);\n\t\n\tGENERIC_NPC(OBJ_SANTA);\n\tGENERIC_NPC(OBJ_CHACO);\n\tGENERIC_NPC(OBJ_JACK);\n\tGENERIC_NPC_NOFACEPLAYER(OBJ_KAZUMA);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_jenka(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0: o->state = 1; o->frame = 0;\n\t\tcase 1: if (random(0, 120) < 10) { o->state = 2; o->timer = 0; o->frame = 1; } break;\n\t\tcase 2: if (++o->timer > 8) { o->state = 1; o->frame = 0; } break;\n\t}\n}\n\n\nvoid ai_doctor(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 10:\t// he chuckles\n\t\t\to->state = 11;\n\t\t\to->timer2 = 0;\n\t\t\to->frame = 1;\n\t\t\to->animtimer = 0;\n\t\tcase 11:\n\t\t\tANIMATE(6, 0, 1);\n\t\t\tif (++o->timer2 > 8*6) { o->frame = 0; o->state = 1; }\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// he rises up and hovers\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->timer = 0;\n\t\t\to->frame = 2;\n\t\t\to->ymark = o->y - (32 << CSF);\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\to->yinertia += (o->y > o->ymark) ? -0x20 : 0x20;\n\t\t\tLIMITY(0x200);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// he teleports away\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->frame = 2;\n\t\t\to->yinertia = 0;\n\t\t\to->state++;\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\tif (DoTeleportOut(o, 1))\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// he teleports in and hovers\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->state = 41;\n\t\t\to->frame = 2;\n\t\t}\n\t\tcase 41:\n\t\t{\n\t\t\tif (DoTeleportIn(o, 1))\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t\to->yinertia = -0x200;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_toroko(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// stand and blink\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t\trandblink(o, 1, 4);\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// run away!!\n\t\t\to->state = 4;\n\t\t\to->frame = 1;\n\t\t\to->animtimer = 0;\n\t\tcase 4:\n\t\t\tANIMATE(2, 1, 4);\n\t\t\t\n\t\t\tif (o->blockl) { o->dir = RIGHT; o->xinertia = 0x200; }\n\t\t\tif (o->blockr) { o->dir = LEFT; o->xinertia = -0x200; }\n\t\t\t\n\t\t\tXMOVE(0x400);\n\t\tbreak;\n\t\t\n\t\tcase 6:\t\t// hop and run away!!\n\t\t\to->state = 7;\n\t\t\to->frame = 1;\n\t\t\to->animtimer = 0;\n\t\t\to->yinertia = -0x400;\n\t\t\to->toro.left_ground = false;\n\t\tcase 7:\n\t\t\tANIMATE(2, 1, 4);\n\t\t\tXMOVE(0x100);\n\t\t\t\n\t\t\tif (!o->toro.left_ground)\n\t\t\t{\n\t\t\t\tif (!o->blockd)\n\t\t\t\t\to->toro.left_ground = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->blockd)\n\t\t\t\t{\n\t\t\t\t\to->toro.left_ground = false;\n\t\t\t\t\to->state = 3;\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t// small hop straight up/down from Balrog\n\t\t// shaking the ground, used in Shack\n\t\tcase 8:\n\t\t\to->frame = 1;\n\t\t\to->timer = 0;\n\t\t\to->state = 9;\n\t\t\to->yinertia = -0x200;\n\t\t\to->toro.left_ground = false;\n\t\tcase 9:\n\t\t{\n\t\t\tif (!o->toro.left_ground)\n\t\t\t{\n\t\t\t\tif (!o->blockd)\n\t\t\t\t\to->toro.left_ground = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->blockd)\n\t\t\t\t{\n\t\t\t\t\to->toro.left_ground = false;\n\t\t\t\t\to->state = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// eeks and falls down\n\t\t\to->state = 11;\n\t\t\to->frame = 5;\n\t\t\to->yinertia = -(2 << CSF);\n\t\t\tsound(SND_ENEMY_SQUEAK);\n\t\t\tXMOVE(0x100);\n\t\tbreak;\n\t\tcase 11:\t// falling down\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 12;\n\t\t\t\to->frame = 6;\n\t\t\t\to->flags |= FLAG_SCRIPTONACTIVATE;\n\t\t\t\to->xinertia = 0;\n\t\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITX(0x400);\n\tLIMITY(0x5ff);\n}\n\n\nvoid ai_toroko_teleport_in(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->timer = 0;\n\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\t\t// this is set in npc.tbl, but uh, why?\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (DoTeleportIn(o, 2))\n\t\t\t{\n\t\t\t\to->frame = 1;\n\t\t\t\to->state = 2;\n\t\t\t\to->animtimer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t\tANIMATE(2, 1, 4);\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 4;\n\t\t\t\to->frame = 6;\t\t// tripping frame\n\t\t\t\tsound(SND_THUD);\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4: break;\t\t\t// knocked out\n\t}\n\t\n\t// fall unless teleporting\n\tif (o->state >= 2)\n\t{\n\t\to->yinertia += 0x20;\n\t\tLIMITY(0x5ff);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_npc_sue(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// stand and blink\n\t\t\to->timer = 0;\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->sue.carried_by = NULL;\n\t\t\trandblink(o, 1, 4);\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// walking\n\t\tcase 4:\t\t// walking\n\t\tcase 5:\t\t// face away\n\t\t\tai_generic_npc(o);\n\t\tbreak;\n\t\t\n\t\t// got punched by Igor\n\t\tcase 6:\n\t\t\to->state = 7;\n\t\t\to->frame = 7;\n\t\t\to->timer = 0;\n\t\t\tsound(SND_ENEMY_SQUEAK);\n\t\tcase 7:\n\t\t\tif (++o->timer > 10)\n\t\t\t\to->state = 0;\n\t\tbreak;\n\t\t\n\t\t// got punched extra hard by Igor\n\t\t// flys through air backwards and crashes\n\t\tcase 8:\n\t\t\to->state = 9;\n\t\t\to->frame = 7;\n\t\t\to->timer = 0;\n\t\t\tsound(SND_ENEMY_SQUEAK);\n\t\t\t\n\t\t\to->yinertia = -0x200;\n\t\t\tXMOVE(-0x400);\n\t\tcase 9:\n\t\t\tif (++o->timer > 3 && o->blockd)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->dir ^= 1;\n\t\t\t}\n\t\tbreak;\n\t\tcase 10:\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 8;\n\t\tbreak;\n\t\t\n\t\t// punching the air (when she tells Igor \"I'm not afraid of you!\")\n\t\tcase 11:\n\t\t\to->state = 12;\n\t\t\to->timer = 0;\n\t\t\to->animframe = 0;\n\t\t\to->animtimer = 0;\n\t\tcase 12:\n\t\t{\n\t\t\tconst static int punchframes[] = { 10, 0 };\n\t\t\to->animate_seq(8, punchframes, 2);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// picked up & carried away by Igor\n\t\tcase 13:\n\t\t\to->frame = 11;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\to->state = 14;\n\t\t\t\n\t\t\t// find Igor\n\t\t\to->sue.carried_by = FindObjectByID2(501);\n\t\t\tif (!o->sue.carried_by)\n\t\t\t\tstaterr(\"-- Could not find entity carrying Sue (ID 501)\");\n\t\tcase 14:\t// being carried--see aftermove routine\n\t\t\to->frame = 9;\n\t\tbreak;\n\t\t\n\t\t// spawn red crystal and call it to us (Undead Core intro)\n\t\tcase 15:\n\t\t{\n\t\t\to->PushBehind(dr_create_red_crystal(o->x+(128<<CSF), o->y));\n\t\t\t\n\t\t\to->state = 16;\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 0;\n\t\t}\n\t\tcase 16:\n\t\t{\n\t\t\tcrystal_xmark = o->x - (18<<CSF);\n\t\t\tcrystal_ymark = o->y - (8<<CSF);\n\t\t}\n\t\tbreak;\n\t\tcase 17:\t// look up (still followed by red crystal)\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 12;\n\t\t\t\n\t\t\tcrystal_xmark = o->x;\n\t\t\tcrystal_ymark = o->y - (8<<CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// run away from DOCTOR_GHOST and hide behind player\n\t\tcase 20:\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tANIMATE(2, 2, 5);\n\t\t\tXMOVE(0x400);\n\t\t\t\n\t\t\tif (o->x < player->x - (8<<CSF))\n\t\t\t{\n\t\t\t\to->dir = RIGHT;\n\t\t\t\to->state = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// run, during \"we've got to get out of here\" post-undead core cutscene.\n\t\tcase 30:\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\tANIMATE(2, 2, 5);\n\t\t\tXMOVE(0x400);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// she jumps off the island\n\t\t{\n\t\t\to->state = 41;\n\t\t\to->frame = 9;\n\t\t\to->yinertia = -0x400;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t/*default:\n\t\t\tstaterr(\"-- Sue entered unhandled state %d (0x%02x)\", o->state, o->state);\n\t\t\texit(1);*/\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITX(0x400);\n\tLIMITY(0x5ff);\n}\n\nvoid aftermove_npc_sue(Object *o)\n{\n\t// for being carried by igor\n\tif (o->sue.carried_by)\n\t{\n\t\tObject *link = o->sue.carried_by;\n\t\t\n\t\to->x = ((link->x >> CSF) + sprites[link->sprite].frame[link->frame].dir[link->dir].actionpoint2.x) << CSF;\n\t\to->y = ((link->y >> CSF) + sprites[link->sprite].frame[link->frame].dir[link->dir].actionpoint2.y) << CSF;\n\t\t\n\t\to->dir = (link->dir ^ 1);\n\t}\n}\n\nvoid onspawn_npc_sue(Object *o)\n{\n\t// fix a short falling glitch in Arthur's House cutscene\n\t// after Egg Corridor.\n\t// when we are <CNP'd to regular Sue from SUE_AT_COMPUTER,\n\t// as SUE_AT_COMPUTER is a taller sprite than regular Sue.\n\to->SnapToGround();\n}\n\nvoid ai_sue_teleport_in(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->x += (6 << CSF);\n\t\t\t//o->PushBehind(OBJ_MISERY_STAND);\n\t\t\t\n\t\t\to->timer = 0;\n\t\t\to->state = 1;\n\t\t\to->frame = 9;\t// her \"hanging on a hook\" frame\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (DoTeleportIn(o, 2))\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->frame = 13;\t// crumpled\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = 0;\n\t\t\t\tsound(SND_THUD);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// fall unless teleporting\n\tif (o->state >= 2)\n\t{\n\t\to->yinertia += 0x20;\n\t\tLIMITY(0x5ff);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_king(Object *o)\n{\nObject *sword = o->linkedobject;\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->frame = 0; randblink(o, 1, 8);\n\t\t\to->xinertia = o->yinertia = 0;\n\t\tbreak;\n\t\t\n\t\tcase 5:\t\t\t// he is knocked out\n\t\t\to->frame = 3;\n\t\t\to->xinertia = 0;\n\t\tbreak;\n\t\t\n\t\tcase 6:\t\t\t// hop in air then fall and knocked out\n\t\t\to->state = 7;\n\t\t\to->timer = 0;\n\t\t\to->yinertia = -0x400;\n\t\tcase 7:\t\t\t// he falls and is knocked out\n\t\t\to->frame = 2;\n\t\t\tXMOVE(0x200);\n\t\t\to->yinertia += 0x40;\n\t\t\tif (o->timer++)\n\t\t\t{\n\t\t\t\tif (o->blockd)\n\t\t\t\t{\n\t\t\t\t\to->state = 5;\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 8:\t\t// walking\n\t\t\to->state = 9;\n\t\t\to->frame = 4;\n\t\t\to->animtimer = 0;\n\t\tcase 9:\n\t\t\tANIMATE(3, 4, 7);\n\t\t\tXMOVE(0x200);\n\t\tbreak;\n\t\t\n\t\tcase 10:\t\t// run\n\t\t\to->state = 11;\n\t\t\to->frame = 4;\n\t\t\to->animtimer = 0;\n\t\tcase 11:\n\t\t\tANIMATE(2, 4, 7);\n\t\t\tXMOVE(0x400);\n\t\tbreak;\n\t\t\n\t\tcase 20:\t\t// pull out sword\n\t\t\tif (!sword)\n\t\t\t{\n\t\t\t\tsword = CreateObject(0, 0, OBJ_KINGS_SWORD);\n\t\t\t\tsword->linkedobject = o;\n\t\t\t\to->linkedobject = sword;\n\t\t\t}\n\t\t\t\n\t\t\to->frame = 0;\n\t\t\to->state = 0;\n\t\tbreak;\n\t\t\n\t\tcase 30:\t\t// he goes flying in spec'd direction and smacks wall\n\t\t\to->state = 31;\n\t\t\to->timer = 0;\n\t\t\to->frame = 2;\n\t\t\tXMOVE(0x600);\n\t\t\to->yinertia = 0;\n\t\t\to->nxflags &= ~NXFLAG_FOLLOW_SLOPE;\t\t// necessary to keep him from going down slope...\n\t\tcase 31:\n\t\t\tif (o->blockl)\n\t\t\t{\n\t\t\t\to->dir = RIGHT;\n\t\t\t\to->state = 7;\n\t\t\t\to->timer = 0;\n\t\t\t\to->yinertia = -0x400;\n\t\t\t\to->xinertia = 0x200;\n\t\t\t\tsound(SND_LITTLE_CRASH);\n\t\t\t\tSmokeClouds(o, 4, 8, 8);\n\t\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t\t// he flickers away and is replaced by the Blade\n\t\t\to->state = 41;\n\t\t\to->timer = 0;\n\t\tcase 41:\n\t\t\to->invisible ^= 1;\n\t\t\tif (++o->timer > 100)\n\t\t\t{\n\t\t\t\tSmokeClouds(o, 4, 8, 8);\n\t\t\t\to->state = 42;\n\t\t\t\to->sprite = SPR_BLADE;\n\t\t\t\to->frame = o->yinertia = o->invisible = 0;\n\t\t\t}\n\t\tbreak;\n\t\tcase 42: break;\n\t\t\n\t\tcase 60:\t\t// jump (used when he lunges with sword)\n\t\t\to->frame = 6;\n\t\t\to->state = 61;\n\t\t\to->yinertia = -0x5FF;\n\t\t\to->xinertia = 0x400;\n\t\t\tif (sword) sword->carry.flip = 1;\n\t\tbreak;\n\t\tcase 61:\t\t// jumping\n\t\t\to->yinertia += 0x80;\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\tif (sword) sword->carry.flip = 0;\n\t\t\t}\n\t\tbreak;\n\t}\n\t\n\tLIMITX(0x400);\n\tLIMITY(0x5FF);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_blue_robot(Object *o)\n{\n\to->frame = 0;\n\trandblink(o, 1, 4);\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\nvoid ai_kanpachi_fishing(Object *o)\n{\n\tif (!o->state)\n\t{\n\t\to->SnapToGround();\n\t\to->state = 1;\n\t}\n\t\n\t// open eyes when player comes near\n\to->frame = (pdistlx((64<<CSF)) && pdistly2((64<<CSF), (16<<CSF))) ? 1 : 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_professor_booster(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\t\to->timer = 0;\n\t\t\to->xinertia = o->yinertia = 0;\n\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\tcase 1:\n\t\t\to->frame = 0;\n\t\t\trandblink(o, 1, 8, 120);\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// teleporting in at Shelter\n\t\t{\n\t\t\to->frame = 0;\n\t\t\tsound(SND_TELEPORT);\n\t\t\t\n\t\t\t// move into middle of teleporter\n\t\t\to->x -= (TILE_W << CSF);\n\t\t\to->y += (TILE_H / 2) << CSF;\n\t\t\t\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 31:\t// teleporting-in animation\n\t\t{\n\t\t\tif (DoTeleportIn(o, 2))\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase 32:\t// wait before hop out of teleporter\n\t\t{\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase 33:\t// hopping out of teleporter\n\t\t{\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\tai_generic_npc(o);\n\t\tbreak;\n\t}\n\t\n\t// no fall when teleporting in\n\tif (o->state != 31 && o->state != 32)\n\t\to->yinertia += 0x40;\n}\n\nvoid ai_booster_falling(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t\t// sitting on ground after fall\n\t\t\to->frame = 7;\n\t\tbreak;\n\t\t\n\t\tcase 10:\t\t// falling\n\t\t{\n\t\t\to->frame = 8;\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x5ff);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t\t// dying (flickering away)\n\t\t{\n\t\t\tsound(SND_TELEPORT);\n\t\t\to->state = 21;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\to->invisible ^= 1;\n\t\t\tif (++o->timer > 100)\n\t\t\t{\n\t\t\t\tSmokeClouds(o, 4, 16, 16);\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// shared between OBJ_KAZUMA_AT_COMPUTER and OBJ_SUE_AT_COMPUTER\nvoid ai_npc_at_computer(Object *o)\n{\n\tenum { INIT=0, TYPING, PAUSE_SLOUCH, PAUSE_UPRIGHT };\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->SnapToGround();\n\t\t\t\n\t\t\to->state = TYPING;\n\t\t\to->frame = 0;\n\t\t\n\t\tcase TYPING:\n\t\t{\n\t\t\tANIMATE(2, 0, 1);\n\t\t\t\n\t\t\tif (!random(0, 80))\n\t\t\t{\n\t\t\t\to->state = PAUSE_SLOUCH;\n\t\t\t\to->frame = 1;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t\telse if (!random(0, 120))\n\t\t\t{\n\t\t\t\to->state = PAUSE_UPRIGHT;\n\t\t\t\to->frame = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase PAUSE_SLOUCH:\n\t\t{\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\to->state = PAUSE_UPRIGHT;\n\t\t\t\to->frame = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase PAUSE_UPRIGHT:\n\t\t{\n\t\t\tif (++o->timer > 80)\n\t\t\t{\n\t\t\t\to->state = TYPING;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid onspawn_generic_npc(Object *o)\n{\n\t// these exceptions are because the Balcony helicopter has a state\n\t// which lets them ride in it and executing this messes it up.\n\tif (o->type != OBJ_SANTA && o->type != OBJ_CHACO)\n\t{\n\t\to->SnapToGround();\n\t}\n}\n\nvoid ai_generic_npc(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\tFACEPLAYER;\n\t}\n\t\n\tai_generic_npc_nofaceplayer(o);\n}\n\nvoid ai_generic_npc_nofaceplayer(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// stand\n\t\t{\n\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\trandblink(o, 1, 8, 100);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// walking\n\t\tcase 4:\n\t\t\tnpc_generic_walk(o, 3);\n\t\tbreak;\n\t\t\n\t\tcase 5:\t\t// face away\n\t\t\to->frame = 6;\n\t\t\to->xinertia = 0;\n\t\tbreak;\n\t\t\n\t\tcase 8:\t\t// walk (alternate state used by OBJ_NPC_JACK)\n\t\t\tif (o->type == OBJ_JACK)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\tai_generic_npc(o);\n\t\t\t\treturn;\n\t\t\t}\n\t\tbreak;\n\t}\n\t\n}\n\nvoid npc_generic_walk(Object *o, int basestate)\n{\n\tif (o->state == basestate)\n\t{\n\t\to->frame = 2;\n\t\to->animtimer = 0;\n\t\to->state++;\n\t}\n\t\n\tANIMATE(3, 2, 5);\n\tXMOVE(0x200);\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/npc/npcregu.fdh",
    "content": "//hash:37dc1b77\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//----------------[referenced from ai/npc/npcregu.cpp]---------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//----------------[referenced from ai/npc/npcregu.cpp]---------------//\nObject *FindObjectByID2(int id2);\n\n\n/* located in ai/ai.cpp */\n\n//----------------[referenced from ai/npc/npcregu.cpp]---------------//\nbool DoTeleportOut(Object *o, int slowness);\nbool DoTeleportIn(Object *o, int slowness);\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in ai/final_battle/doctor_common.cpp */\n\n//----------------[referenced from ai/npc/npcregu.cpp]---------------//\nObject *dr_create_red_crystal(int x, int y);\n\n\n/* located in ai/npc/npcregu.cpp */\n\n//----------------[referenced from ai/npc/npcregu.cpp]---------------//\nvoid ai_jenka(Object *o);\nvoid ai_doctor(Object *o);\nvoid ai_toroko(Object *o);\nvoid ai_toroko_teleport_in(Object *o);\nvoid ai_npc_sue(Object *o);\nvoid aftermove_npc_sue(Object *o);\nvoid onspawn_npc_sue(Object *o);\nvoid ai_sue_teleport_in(Object *o);\nvoid ai_king(Object *o);\nvoid ai_blue_robot(Object *o);\nvoid ai_kanpachi_fishing(Object *o);\nvoid ai_professor_booster(Object *o);\nvoid ai_booster_falling(Object *o);\nvoid ai_npc_at_computer(Object *o);\nvoid onspawn_generic_npc(Object *o);\nvoid ai_generic_npc(Object *o);\nvoid ai_generic_npc_nofaceplayer(Object *o);\nvoid npc_generic_walk(Object *o, int basestate);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//----------------[referenced from ai/npc/npcregu.cpp]---------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//----------------[referenced from ai/npc/npcregu.cpp]---------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//----------------[referenced from ai/npc/npcregu.cpp]---------------//\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//----------------[referenced from ai/npc/npcregu.cpp]---------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/oside/oside.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../sand/sand.fdh\"\n#include \"oside.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_SKY_DRAGON, ai_sky_dragon);\n\tONTICK(OBJ_SANDCROC_OSIDE, ai_sandcroc);\n\t\n\tONTICK(OBJ_NIGHT_SPIRIT, ai_night_spirit);\n\tONTICK(OBJ_NIGHT_SPIRIT_SHOT, ai_night_spirit_shot);\n\t\n\tONTICK(OBJ_HOPPY, ai_hoppy);\n\t\n\tONTICK(OBJ_PIXEL_CAT, ai_pixel_cat);\n\tONTICK(OBJ_LITTLE_FAMILY, ai_little_family);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n#define NS_WAIT\t\t\t\t\t1\n#define NS_SEEK_PLAYER\t\t\t2\n#define NS_PREPARE_FIRE\t\t\t3\n#define NS_FIRING\t\t\t\t4\n#define NS_RETURN_TO_SET_POINT\t5\n#define NS_GUARD_SET_POINT\t\t6\nvoid ai_night_spirit(Object *o)\n{\n\t//debug(\"ns state: %d\", o->state);\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = NS_WAIT;\n\t\t\to->nxflags |= NXFLAG_SLOW_WHEN_HURT;\n\t\t\to->invisible = true;\n\t\t\to->ymark = o->y + (12 << CSF);\n\t\t}\n\t\tcase NS_WAIT:\n\t\t{\n\t\t\tif (pdistly((TILE_H / 2) << CSF))\n\t\t\t{\n\t\t\t\tstatic const int distance = (SCREEN_HEIGHT << CSF);\n\t\t\t\to->y += (o->dir == RIGHT) ? distance : -distance;\n\t\t\t\t\n\t\t\t\to->state = NS_SEEK_PLAYER;\n\t\t\t\to->timer = 0;\n\t\t\t\to->invisible = false;\n\t\t\t\t\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase NS_SEEK_PLAYER:\n\t\t{\n\t\t\tANIMATE(2, 0, 2);\n\t\t\t\n\t\t\tif (++o->timer > 200)\n\t\t\t{\n\t\t\t\to->state = NS_PREPARE_FIRE;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame += 3;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase NS_PREPARE_FIRE:\n\t\t{\n\t\t\tANIMATE(2, 3, 5);\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = NS_FIRING;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame += 3;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase NS_FIRING:\n\t\t{\n\t\t\tANIMATE(2, 6, 8);\n\t\t\t\n\t\t\tif ((++o->timer % 5) == 1)\n\t\t\t{\n\t\t\t\tObject *shot = SpawnObjectAtActionPoint(o, OBJ_NIGHT_SPIRIT_SHOT);\n\t\t\t\tshot->xinertia = random(0x100, 0x600);\n\t\t\t\tshot->yinertia = random(-0x200, 0x200);\n\t\t\t\t\n\t\t\t\tsound(SND_BUBBLE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = NS_SEEK_PLAYER;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame -= 6;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase NS_RETURN_TO_SET_POINT:\n\t\t{\n\t\t\tANIMATE(2, 3, 5);\n\t\t\t\n\t\t\t// lie in wait at original set point\n\t\t\to->yinertia += (o->y > o->ymark) ? -0x40 : 0x40;\n\t\t\tLIMITY(0x400);\n\t\t\t\n\t\t\tif (abs(o->y - o->ymark) < (SCREEN_HEIGHT/2)<<CSF)\n\t\t\t{\n\t\t\t\to->state = NS_GUARD_SET_POINT;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase NS_GUARD_SET_POINT:\n\t\t{\n\t\t\tANIMATE(2, 3, 5);\n\t\t\t\n\t\t\t// lie in wait at original set point\n\t\t\to->yinertia += (o->y > o->ymark) ? -0x40 : 0x40;\n\t\t\tLIMITY(0x400);\n\t\t\t\n\t\t\t// and if player appears again...\n\t\t\tif (pdistly(SCREEN_HEIGHT << CSF))\n\t\t\t{\t// ..jump out and fire immediately\n\t\t\t\to->state = NS_PREPARE_FIRE;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state >= NS_SEEK_PLAYER && o->state < NS_GUARD_SET_POINT)\n\t{\n\t\t// sinusoidal player seek\n\t\to->yinertia += (o->y < player->y) ? 0x19 : -0x19;\n\t\t\n\t\t// rarely seen, but they do bounce off walls\n\t\tif (o->blocku) o->yinertia = 0x200;\n\t\tif (o->blockd) o->yinertia = -0x200;\n\t\t\n\t\t//debugHline(o->ymark - (SCREEN_HEIGHT<<CSF), 0, 255, 0);\n\t\t\n\t\t// avoid leaving designated area\n\t\tif (abs(o->y - o->ymark) > SCREEN_HEIGHT<<CSF)\n\t\t{\n\t\t\tif (o->state != NS_FIRING)\n\t\t\t{\n\t\t\t\to->state = NS_RETURN_TO_SET_POINT;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tLIMITY(0x400);\n}\n\nvoid ai_night_spirit_shot(Object *o)\n{\n\tANIMATE(2, 0, 2);\n\to->xinertia -= 0x19;\n\t\n\tif (o->xinertia >= 0)\n\t{\n\t\to->flags |= FLAG_IGNORE_SOLID;\n\t}\n\telse\n\t{\n\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\tif (o->blockl)\n\t\t{\n\t\t\tSmokeClouds(o, 4, 3, 3);\n\t\t\tsound(SND_SHOT_HIT);\n\t\t\to->Delete();\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_hoppy(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t}\n\t\tcase 1:\t\t// wait for player...\n\t\t{\n\t\t\to->frame = 0;\n\t\t\tif (pdistly(0x10000))\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t// jump\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 4)\n\t\t\t\to->frame = 2;\n\t\t\t\n\t\t\tif (o->timer > 12)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->frame = 3;\n\t\t\t\t\n\t\t\t\tsound(SND_HOPPY_JUMP);\n\t\t\t\to->xinertia = 0x700;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t// in air...\n\t\t{\n\t\t\tif (o->y < player->y)\t   o->yinertia = 0xAA;\n\t\t\telse if (o->y > player->y) o->yinertia = -0xAA;\n\t\t\t\n\t\t\tif (o->blockl)\n\t\t\t{\n\t\t\t\t// don't stop if all of the blockl's are just touching slope\n\t\t\t\tbool stop = false;\n\t\t\t\tfor(int i=0;i<sprites[o->sprite].block_l.count;i++)\n\t\t\t\t{\n\t\t\t\t\tuint32_t attr = o->GetAttributes(&sprites[o->sprite].block_l[i], 1, NULL);\n\t\t\t\t\tif (!(attr & TA_SLOPE))\n\t\t\t\t\t{\n\t\t\t\t\t\tstop = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (stop)\n\t\t\t\t{\n\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\to->yinertia = 0;\n\t\t\t\t\t\n\t\t\t\t\to->state = 4;\n\t\t\t\t\to->frame = 2;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\n\t\t{\n\t\t\to->timer++;\n\t\t\tif (o->timer == 2) o->frame = 1;\n\t\t\tif (o->timer == 6) o->frame = 0;\n\t\t\t\n\t\t\tif (o->timer > 16)\n\t\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->xinertia -= 0x2A;\n\tLIMITX(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_sky_dragon(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// standing\n\t\t{\n\t\t\tANIMATE(30, 0, 1);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// player and kazuma gets on, dragon floats up\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->xmark = o->x - (6 << CSF);\n\t\t\to->ymark = o->y - (16 << CSF);\n\t\t\t\n\t\t\to->yinertia = 0;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tANIMATE(5, 2, 3);\n\t\t\to->xinertia += (o->x < o->xmark) ? 0x08 : -0x08;\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x08 : -0x08;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// fly away\n\t\t{\n\t\t\tANIMATE(2, 2, 3);\n\t\t\t\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x08 : -0x08;\n\t\t\to->xinertia += 0x20;\n\t\t\tLIMITX(0x600);\n\t\t\t\n\t\t\t/*player->x = o->x;\n\t\t\tplayer->y = o->y;\n\t\t\trun_phase_compensator();*/\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// spawn a Sue hanging from mouth\n\t\t{\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid ai_pixel_cat(Object *o)\n{\n\t#ifdef SHOW_DEBUG_KITTY\n\tif (o->state == 0)\n\t{\n\t\to->y -= (32 << CSF);\n\t\to->state = 1;\n\t}\n\t#endif\n}\n\n\nvoid ai_little_family(Object *o)\n{\n\to->frame &= 1;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (!random(0, 60))\n\t\t\t{\n\t\t\t\to->state = random(0, 1) ? 2 : 10;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tif (++o->timer > 8)\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->dir = random(0, 1) ? LEFT : RIGHT;\n\t\t\to->timer = random(16, 32);\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tif ((o->blockl && o->dir == LEFT) || \\\n\t\t\t\t(o->blockr && o->dir == RIGHT))\n\t\t\t{\n\t\t\t\to->dir ^= 1;\n\t\t\t}\n\t\t\t\n\t\t\tXMOVE(0x100);\n\t\t\tANIMATE(4, 0, 1);\n\t\t\t\n\t\t\tif (--o->timer < 0)\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tswitch(o->id2)\n\t{\n\t\tcase 210: o->frame += 2; break;\t\t// red mom\n\t\tcase 220: o->frame += 4; break;\t\t// little son\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/oside/oside.fdh",
    "content": "//hash:10bf31fc\n//automatically generated by Makegen\n\n/* located in ai/ai.cpp */\n\n//----------------[referenced from ai/oside/oside.cpp]---------------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\n\n\n/* located in ai/oside/oside.cpp */\n\n//----------------[referenced from ai/oside/oside.cpp]---------------//\nvoid ai_night_spirit(Object *o);\nvoid ai_night_spirit_shot(Object *o);\nvoid ai_hoppy(Object *o);\nvoid ai_sky_dragon(Object *o);\nvoid ai_pixel_cat(Object *o);\nvoid ai_little_family(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//----------------[referenced from ai/oside/oside.cpp]---------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//----------------[referenced from ai/oside/oside.cpp]---------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//----------------[referenced from ai/oside/oside.cpp]---------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/plantation/plantation.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../sand/puppy.fdh\"\n#include \"plantation.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_ORANGEBELL, ai_orangebell);\n\tONTICK(OBJ_ORANGEBELL_BABY, ai_orangebell_baby);\n\t\n\tONTICK(OBJ_STUMPY, ai_stumpy);\n\tONTICK(OBJ_MIDORIN, ai_midorin);\n\t\n\tONTICK(OBJ_GUNFISH, ai_gunfish);\n\tONTICK(OBJ_GUNFISH_SHOT, ai_gunfish_shot);\n\t\n\tONTICK(OBJ_DROLL, ai_droll);\n\tONTICK(OBJ_DROLL_SHOT, ai_droll_shot);\n\tONTICK(OBJ_DROLL_GUARD, ai_droll_guard);\n\t\n\tONTICK(OBJ_MIMIGA_FARMER_STANDING, ai_mimiga_farmer);\n\tONTICK(OBJ_MIMIGA_FARMER_WALKING, ai_mimiga_farmer);\n\t\n\tONTICK(OBJ_ROCKET, ai_rocket);\n\tONTICK(OBJ_PROXIMITY_PRESS_HOZ, ai_proximity_press_hoz);\n\t\n\tONTICK(OBJ_PUPPY_ITEMS, ai_puppy_wag);\n\tONTICK(OBJ_NUMAHACHI, ai_numahachi);\n\n\t// nothing special is needed to keep them from leaving their cages\n\t// because the regular background tiles are set to be solid to NPC's.\n\t// Thus, they are no different from the mimiga farmer object.\n\tONTICK(OBJ_MIMIGA_JAILED, ai_mimiga_farmer);\n\tONSPAWN(OBJ_MIMIGA_CAGE, onspawn_mimiga_cage);\n\t\n\tGENERIC_NPC_NOFACEPLAYER(OBJ_MEGANE);\n\tGENERIC_NPC_NOFACEPLAYER(OBJ_CHIE);\n\tONTICK(OBJ_ITOH, ai_npc_itoh);\n\tONTICK(OBJ_KANPACHI_STANDING, ai_kanpachi_standing);\n\tONTICK(OBJ_MOMORIN, ai_npc_momorin);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// dragonfly creature\nvoid ai_stumpy(Object *o)\n{\n\t//debug(\"state: %d\",o->state);\n\t//debug(\"timer: %d\",o->timer);\n\to->frame ^= 1;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->flags |= NXFLAG_FOLLOW_SLOPE;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (pdistlx(240 << CSF) && pdistly(192 << CSF))\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\to->state = 3;\n\t\t\to->timer = 0;\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tcase 3:\n\t\t{\n\t\t\tif (++o->timer > 50)\n\t\t\t\to->state = 4;\n\t\t\t\n\t\t\tif (!pdistlx(SCREEN_WIDTH<<CSF) || !pdistly(SCREEN_HEIGHT<<CSF))\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\n\t\t{\n\t\t\to->state = 5;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\t// throw ourselves at player\n\t\t\tThrowObjectAtPlayer(o, 3, 0x400);\n\t\t\to->dir = (o->xinertia >= 0) ? RIGHT : LEFT;\n\t\t}\n\t\tcase 5:\n\t\t{\n\t\t\tSIFSprite *sprite = &sprites[o->sprite];\n\t\t\t\n\t\t\t// don't bounce off slopes--some crap in here that should probably\n\t\t\t// be handled by the main engine somehow, maybe not setting blockl/r\n\t\t\t// for contact with slopes.\n\t\t\tif (o->xinertia < 0 && o->blockl)\n\t\t\t{\n\t\t\t\tif (++o->timer > 2 && !IsSlopeAtPointList(o, &sprite->block_l))\n\t\t\t\t{\n\t\t\t\t\to->xinertia = -o->xinertia;\n\t\t\t\t\to->dir ^= 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (o->xinertia > 0 && o->blockr)\n\t\t\t{\n\t\t\t\tif (++o->timer > 2 && !IsSlopeAtPointList(o, &sprite->block_r))\n\t\t\t\t{\n\t\t\t\t\to->xinertia = -o->xinertia;\n\t\t\t\t\to->dir ^= 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (CheckStandOnSlope(o))\n\t\t\t{\n\t\t\t\to->yinertia = -0x100;\n\t\t\t}\n\t\t\telse if (o->CheckAttribute(&sprite->block_d, TA_WATER))\n\t\t\t{\n\t\t\t\to->yinertia = -0x200;\n\t\t\t}\n\t\t\telse if ((o->yinertia < 0 && o->blocku) || \\\n\t\t\t\t\t(o->yinertia >= 0 && o->blockd))\n\t\t\t{\n\t\t\t\to->yinertia = -o->yinertia;\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n// very happy green guy who runs back and forth\nvoid ai_midorin(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->timer = 0;\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (!random(0, 30))\n\t\t\t{\n\t\t\t\to->state = 2 + random(0, 1);\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// blinking\n\t\t{\n\t\t\tif (++o->timer > 8)\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// running\n\t\t{\n\t\t\to->state = 4;\n\t\t\to->frame = 0;\t// this will be toggled into frame 2 just below\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->timer = random(48, 64);\t\t// how long to run\n\t\t\to->dir = random(0, 1) ? LEFT : RIGHT;\n\t\t}\n\t\tcase 4:\n\t\t{\n\t\t\tif (o->animtimer ^= 1)\n\t\t\t\to->frame ^= 2;\n\t\t\t\n\t\t\tif ((o->dir==LEFT && o->blockl) || \\\n\t\t\t\t(o->dir==RIGHT && o->blockr))\n\t\t\t{\n\t\t\t\to->dir ^= 1;\n\t\t\t}\n\t\t\t\n\t\t\tXMOVE(0x400);\n\t\t\t\n\t\t\tif (--o->timer <= 0)\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// large bat with many baby bats\nvoid ai_orangebell(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->ymark = o->y;\n\t\t\to->yinertia = 0x200;\n\t\t\t\n\t\t\t// create baby bats\n\t\t\tfor(int i=0;i<8;i++)\n\t\t\t{\n\t\t\t\tObject *bat = CreateObject(o->CenterX() + random(-0x1000, 0x1000), \\\n\t\t\t\t\t\t\t\t\t\t   o->CenterY() + random(-0x1000, 0x1000), \\\n\t\t\t\t\t\t\t\t\t\t   OBJ_ORANGEBELL_BABY);\n\t\t\t\tbat->linkedobject = o;\n\t\t\t}\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(5, 0, 2);\n\t\t\t\n\t\t\tif ((o->dir==LEFT && o->blockl) || \\\n\t\t\t\t(o->dir==RIGHT && o->blockr))\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->dir ^= 1;\n\t\t\t}\n\t\t\t\n\t\t\tXMOVE(0x100);\n\t\t\t\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x08 : -0x08;\n\t\t\tLIMITY(0x200);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_orangebell_baby(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xinertia = xinertia_from_angle(random(0, 255), 0x200);\n\t\t\to->yinertia = yinertia_from_angle(random(0, 255), 0x200);\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\n\t\t\to->timer = 0;\t\t\t\t\t\t\t// time until can dive-bomb\n\t\t\to->ymark2 = random(-32<<CSF, 32<<CSF);\t// unique target point on main bat\n\t\t\t\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(1, 0, 2);\n\t\t\t\n\t\t\tif (o->linkedobject)\n\t\t\t{\n\t\t\t\to->xmark = o->linkedobject->CenterX();\n\t\t\t\to->ymark = o->linkedobject->CenterY() + o->ymark2;\n\t\t\t\to->dir = o->linkedobject->dir;\n\t\t\t}\n\t\t\t\n\t\t\t//DebugCrosshair(o->xmark, o->ymark, random(0,255),random(128,255),random(128,255));\n\t\t\t\n\t\t\to->xinertia += (o->x < o->xmark) ? 0x08 : -0x08;\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x20 : -0x20;\n\t\t\tLIMITX(0x400);\n\t\t\tLIMITY(0x400);\n\t\t\t\n\t\t\t// dive-bomb\n\t\t\tif (o->timer) o->timer--;\n\t\t\tif (pdistlx(8 << CSF) && !o->timer)\n\t\t\t{\n\t\t\t\tif (player->y > o->y && ((player->y - o->y) < 175<<CSF))\n\t\t\t\t{\n\t\t\t\t\to->xinertia /= 4;\n\t\t\t\t\to->yinertia = 0;\n\t\t\t\t\to->state = 2;\n\t\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// dive-bombing\n\t\t{\n\t\t\to->frame = 3;\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->xinertia *= 2;\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->timer = 120;\n\t\t\t\t\n\t\t\t\to->state = 1;\n\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_gunfish(Object *o)\n{\n\tif (player->Bottom() > o->y && \\\n\t\tplayer->Bottom() < o->Top() + (2<<CSF))\n\t{\t// make sure platform is real solid for him\n\t\to->flags &= ~FLAG_SOLID_MUSHY;\n\t\to->flags |= FLAG_SOLID_BRICK;\n\t}\n\telse\n\t{\t// nice repel effects if he hits sides\n\t\to->flags &= ~FLAG_SOLID_BRICK;\n\t\to->flags |= FLAG_SOLID_MUSHY;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->yinertia = 0;\n\t\t\to->ymark = o->y;\n\t\t\t\n\t\t\to->state = 1;\n\t\t\to->timer = random(1, 50);\n\t\t}\n\t\tcase 1:\t\t// desync\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->yinertia = 0x200;\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tANIMATE(1, 0, 1);\n\t\t\t\n\t\t\t// this variation on FACEPLAYER helps keep them from turning\n\t\t\t// around so much when you are on standing on their platform.\n\t\t\tif (player->Right() < o->Left()) o->dir = LEFT;\n\t\t\tif (player->Left() > o->Right()) o->dir = RIGHT;\n\t\t\t\n\t\t\tif (pdistlx(128<<CSF) && pdistly2(160<<CSF, 20<<CSF))\n\t\t\t{\n\t\t\t\tif (++o->timer > 80)\n\t\t\t\t{\n\t\t\t\t\to->state = 10;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\to->frame += 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\tANIMATE(1, 2, 3);\n\t\t\t\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame += 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\n\t\t{\n\t\t\tANIMATE(1, 4, 5);\n\t\t\t\n\t\t\tif ((++o->timer % 10) == 3)\n\t\t\t{\n\t\t\t\tObject *shot = SpawnObjectAtActionPoint(o, OBJ_GUNFISH_SHOT);\n\t\t\t\t\n\t\t\t\tshot->xinertia = (o->dir == LEFT) ? -0x400 : 0x400;\n\t\t\t\tshot->yinertia = -0x400;\n\t\t\t\t\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 60)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame -= 4;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += (o->y < o->ymark) ? 0x10 : -0x10;\n\tLIMITY(0x100);\n}\n\nvoid ai_gunfish_shot(Object *o)\n{\n\tbool hit_something = false;\n\t\n\tif (o->xinertia <= 0 && o->blockl) hit_something = true;\n\tif (o->xinertia >= 0 && o->blockr) hit_something = true;\n\tif (o->yinertia <= 0 && o->blocku) hit_something = true;\n\tif (o->yinertia >= 0 && o->blockd) hit_something = true;\n\t\n\tif (++o->timer > 10)\n\t{\n\t\tSIFSprite *sprite = &sprites[o->sprite];\n\t\tif (o->CheckAttribute(&sprite->block_u, TA_WATER))\n\t\t{\n\t\t\thit_something = true;\n\t\t}\n\t}\n\t\n\tif (hit_something)\n\t{\n\t\tfor(int i=0;i<5;i++)\n\t\t{\n\t\t\tCaret *c = effect(o->CenterX(), o->CenterY(), EFFECT_GUNFISH_BUBBLE);\n\t\t\tc->xinertia = random(-0x400, 0x400);\n\t\t\tc->yinertia = random(-0x400, 0);\n\t\t}\n\t\t\n\t\tsound(SND_BUBBLE);\n\t\to->Delete();\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_droll(Object *o)\n{\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xmark = o->x;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(40, 0, 1);\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tif (o->shaketime)\n\t\t\t\to->state = 10;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// prepare to jump\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->frame = 2;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tif (++o->timer > 10)\n\t\t\t{\t// jump\n\t\t\t\to->state = 12;\n\t\t\t\to->frame = 6;\n\t\t\t\to->timer2 = 0;\t\t// have not fired yet\n\t\t\t\t\n\t\t\t\to->xinertia = (o->x >= o->xmark) ? -0x200 : 0x200;\n\t\t\t\to->yinertia = -0x600;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 12:\t// in air\n\t\t{\n\t\t\tif (o->yinertia >= 0)\n\t\t\t{\n\t\t\t\tif (!o->timer2)\t\t// have fired yet?\n\t\t\t\t{\n\t\t\t\t\tFACEPLAYER;\n\t\t\t\t\to->timer2 = 1;\n\t\t\t\t\to->frame = 7;\n\t\t\t\t\t\n\t\t\t\t\tEmFireAngledShot(o, OBJ_DROLL_SHOT, 0, 0x600);\n\t\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t}\n\t\t\t\telse if (o->yinertia > 0x200)\n\t\t\t\t{\t// after-fire frame\n\t\t\t\t\to->frame = 3;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (o->blockd)\t// already know that yinertia >= 0\n\t\t\t\t{\n\t\t\t\t\to->y >>= CSF; o->y <<= CSF;\n\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\t\n\t\t\t\t\to->state = 13;\n\t\t\t\t\to->frame = 2;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 13:\t// landed\n\t\t{\n\t\t\to->xinertia /= 2;\n\t\t\t\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x55;\n\tLIMITY(0x5ff);\n}\n\nvoid ai_droll_shot(Object *o)\n{\n\tANIMATE(0, 0, 2);\n\t\n\tif ((++o->timer % 5) == 0)\n\t\tsound(SND_DROLL_SHOT_FLY);\n\t\n\tbool hit_something = false;\n\tif (o->xinertia <= 0 && o->blockl) hit_something = true;\n\tif (o->xinertia >= 0 && o->blockr) hit_something = true;\n\tif (o->yinertia <= 0 && o->blocku) hit_something = true;\n\tif (o->yinertia >= 0 && o->blockd) hit_something = true;\n\t\n\tif (hit_something)\n\t{\n\t\tSmokeClouds(o, 4, 2, 2);\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\to->Delete();\n\t}\n}\n\n// stomps you in Teleporter Room\nvoid ai_droll_guard(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->x += (8 << CSF);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(30, 0, 1);\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->state = 11;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\to->frame = 2;\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->state = 12;\n\t\t\t\to->frame = 3;\n\t\t\t\to->yinertia = -0x600;\n\t\t\t\tXMOVE(0x200);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 12:\t// in air...\n\t\t{\n\t\t\tif (o->yinertia >= 0 && o->blockd)\n\t\t\t{\n\t\t\t\to->frame = 2;\n\t\t\t\to->state = 13;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 13:\t// landed\n\t\t{\n\t\t\to->xinertia /= 2;\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_mimiga_farmer(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (!random(0, 60))\n\t\t\t{\n\t\t\t\tif (o->type != OBJ_MIMIGA_FARMER_STANDING && random(0, 1))\n\t\t\t\t{\t// walk\n\t\t\t\t\to->state = 10;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t// blink\n\t\t\t\t\to->state = 2;\n\t\t\t\t\to->frame = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase 2:\t\t// blinking\n\t\t{\n\t\t\tif (++o->timer >= 8)\n\t\t\t{\n\t\t\t\to->state = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// walk\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->timer = random(16, 32);\n\t\t\to->dir = random(0, 1);\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tif ((o->dir == LEFT && o->blockl) || \\\n\t\t\t\t(o->dir == RIGHT && o->blockr))\n\t\t\t{\n\t\t\t\to->dir ^= 1;\n\t\t\t}\n\t\t\t\n\t\t\tXMOVE(0x200);\n\t\t\tANIMATE(4, 2, 5);\n\t\t\t\n\t\t\tif (!--o->timer)\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n}\n\n\nvoid onspawn_mimiga_cage(Object *o)\n{\n\t// ...because it isn't guaranteed that onspawn events\n\t// will only be called once during object creation.\n\tif (o->state == 1) return;\n\to->state = 1;\n\t\n\t// object is used both in Jail2 and then reused in Ring2 (Doctor battle),\n\t// but tileset is different then.\n\tif (game.curmap == STAGE_KINGS_TABLE)\n\t\to->sprite = SPR_MIMIGA_CAGE_FINAL;\n\telse\n\t\to->sprite = SPR_JAIL2_CAGE;\n\t\n\to->x -= (16 << CSF);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_npc_itoh(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\t// Option 2 is set when he is in plantation,\n\t\t\t// but he still should face left.\n\t\t\to->dir = LEFT;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 0;\n\t\t\trandblink(o);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t\t// cower\n\t\t{\n\t\t\to->frame = 2;\n\t\t\to->xinertia = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t\t// leap away\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->frame = 2;\n\t\t\to->xinertia = 0x200;\n\t\t\to->yinertia = -0x400;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\t\n\t\t\t\to->frame = 3;\n\t\t\t\to->state = 30;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t\t// shaking after leap\n\t\t{\n\t\t\to->xmark = o->x;\n\t\t\to->state = 31;\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\to->x = o->xmark;\n\t\t\tif (++o->timer & 2) o->x += (1 << CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// small vertical hop (from when he jumps out of helicopter at end)\n\t\t{\n\t\t\to->state = 41;\n\t\t\to->yinertia = -0x200;\n\t\t\to->frame = 2;\n\t\t}\n\t\tcase 41:\n\t\t{\n\t\t\tif (o->blockd && o->yinertia > 0)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = 42;\n\t\t\t\to->frame = 0;\n\t\t\t\to->dir = RIGHT;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase 42:\t// stop begin shocked after blocks fall (same as 0 except he doesn't blink)\n\t\t{\n\t\t\to->frame = 0;\n\t\t\to->dir = RIGHT;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 50:\t// run a moment then stop\n\t\t{\n\t\t\to->state = 51;\n\t\t\to->timer = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->dir = RIGHT;\n\t\t\to->frame = 5;\n\t\t}\n\t\tcase 51:\n\t\t{\n\t\t\tANIMATE(3, 4, 7);\n\t\t\tXMOVE(0x200);\n\t\t\t\n\t\t\tif (++o->timer > 32)\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = 52;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\nvoid ai_kanpachi_standing(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 10:\t// walking\n\t\tcase 11:\n\t\t{\n\t\t\tnpc_generic_walk(o, 10);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// face away/enter door\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 6;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\tai_generic_npc_nofaceplayer(o);\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_npc_momorin(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->frame = 0;\n\t\t\trandblink(o);\n\t\t\tFACEPLAYER;\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// surprised\n\t\t\to->frame = 2;\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_proximity_press_hoz(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tif (o->dir == LEFT) o->x -= (8 << CSF);\n\t\t\to->xmark = o->x;\n\t\t\t\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (pdistly2(0x800, 0x1000))\n\t\t\t{\n\t\t\t\tif (o->dir == LEFT)\n\t\t\t\t{\n\t\t\t\t\tif (player->Right() <= o->x)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((o->x - player->Right()) <= (192<<CSF))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\to->state = 2;\n\t\t\t\t\t\t\to->frame = 2;\n\t\t\t\t\t\t\to->timer = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (player->x >= o->x)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ((player->x - o->x) <= (192<<CSF))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\to->state = 2;\n\t\t\t\t\t\t\to->frame = 2;\n\t\t\t\t\t\t\to->timer = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// activated\n\t\t{\n\t\t\to->damage = 127;\n\t\t\tXMOVE(0xC00);\n\t\t\t\n\t\t\tif (++o->timer == 8)\n\t\t\t{\n\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\tSmokeSide(o, 4, o->dir);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 8)\n\t\t\t{\n\t\t\t\to->damage = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// hit other press\n\t\t{\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 4;\t// return\n\t\t\t\to->frame = 1;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\t\t// return to start pos\n\t\t{\n\t\t\tXMOVE(-0x800);\n\t\t\t\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->x = o->xmark;\n\t\t\t\t\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_rocket(Object *o)\n{\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// activated\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->timer = 0;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\to->timer++;\n\t\t\to->yinertia += 8;\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\tif (o->timer < 10)\n\t\t\t\t{\n\t\t\t\t\to->state = 12;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 12:\n\t\t{\n\t\t\to->flags &= ~FLAG_SCRIPTONACTIVATE;\n\t\t\to->state = 13;\n\t\t\to->timer = 0;\n\t\t\to->frame = 1;\n\t\t\t\n\t\t\tSmokeClouds(o, 10, 16, 8);\n\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t}\n\t\tcase 13:\n\t\t{\n\t\t\to->yinertia -= 0x08;\n\t\t\t\n\t\t\t// boosters fire left/right alternating:\n\t\t\to->timer++;\n\t\t\tSpawnRocketTrail(o, (o->timer & 1) ? RIGHT : LEFT);\n\t\t\t\n\t\t\t// noise\n\t\t\tif ((o->timer % 4) == 1)\n\t\t\t\tsound(SND_FIREBALL);\n\t\t\t\n\t\t\t// smacked into ceiling. note that I didn't check that we're actually\n\t\t\t// riding the rocket when I test player->blocku--the original doesn't\n\t\t\t// seem to either, so I'm emulating that bug.\n\t\t\tif (o->blocku || player->blocku)\n\t\t\t{\n\t\t\t\tif (player->cannotride == o)\n\t\t\t\t\tplayer->cannotride = NULL;\n\t\t\t\t\n\t\t\t\tif (!player->blocku && (player->riding == o || player->lastriding == o))\n\t\t\t\t{\n\t\t\t\t\tif (o->yinertia < 0 && o->yinertia < player->yinertia)\n\t\t\t\t\t\tplayer->yinertia = o->yinertia;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSmokeClouds(o, 6, 16, 8);\n\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\t\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->state = 14;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 14:\t\t// falling back down\n\t\t{\n\t\t\to->yinertia += 8;\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->yinertia < 0)\n\t\t\t{\n\t\t\t\tif ((o->timer % 4) == 0)\n\t\t\t\t\tSpawnRocketTrail(o, (o->timer & 8) ? RIGHT : LEFT);\n\t\t\t\t\n\t\t\t\t// sound\n\t\t\t\tif ((o->timer % 16) == 1)\n\t\t\t\t\tsound(SND_FIREBALL);\n\t\t\t}\n\t\t\telse if (o->blockd)\n\t\t\t{\n\t\t\t\to->y >>= CSF; o->y <<= CSF;\n\t\t\t\to->flags |= FLAG_SCRIPTONACTIVATE;\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tLIMITY(0x5ff);\n}\n\nstatic Caret *SpawnRocketTrail(Object *o, int side)\n{\nCaret *trail;\nint x, y;\n\n\tif (side == LEFT)\n\t{\n\t\tx = o->ActionPointX();\n\t\ty = o->ActionPointY();\n\t}\n\telse\n\t{\n\t\tx = o->ActionPoint2X();\n\t\ty = o->ActionPoint2Y();\n\t}\n\t\n\ttrail = effect(x, y, EFFECT_SMOKETRAIL);\n\ttrail->yinertia = 0x400;\n\treturn trail;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// in the Statue Room, if you enter via the Plantation\nvoid ai_numahachi(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\tcase 1:\n\t\t{\n\t\t\to->xinertia = 0;\n\t\t\to->state = 2;\n\t\t}\n\t\tcase 2:\n\t\t{\n\t\t\tANIMATE(50, 0, 1);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\n\n\n"
  },
  {
    "path": "ai/plantation/plantation.fdh",
    "content": "//hash:b57ca8a0\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in slope.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nbool IsSlopeAtPointList(Object *o, SIFPointList *points);\nint CheckStandOnSlope(Object *o);\n\n\n/* located in trig.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nvoid ThrowObjectAtPlayer(Object *o, int rand_variance, int speed);\nint xinertia_from_angle(uint8_t angle, int speed);\nint yinertia_from_angle(uint8_t angle, int speed);\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in ai/plantation/plantation.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nvoid ai_stumpy(Object *o);\nvoid ai_midorin(Object *o);\nvoid ai_orangebell(Object *o);\nvoid ai_orangebell_baby(Object *o);\nvoid ai_gunfish(Object *o);\nvoid ai_gunfish_shot(Object *o);\nvoid ai_droll(Object *o);\nvoid ai_droll_shot(Object *o);\nvoid ai_droll_guard(Object *o);\nvoid ai_mimiga_farmer(Object *o);\nvoid onspawn_mimiga_cage(Object *o);\nvoid ai_npc_itoh(Object *o);\nvoid ai_kanpachi_standing(Object *o);\nvoid ai_npc_momorin(Object *o);\nvoid ai_proximity_press_hoz(Object *o);\nvoid ai_rocket(Object *o);\nstatic Caret *SpawnRocketTrail(Object *o, int side);\nvoid ai_numahachi(Object *o);\n\n\n/* located in ai/npc/npcregu.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nvoid npc_generic_walk(Object *o, int basestate);\nvoid ai_generic_npc_nofaceplayer(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nvoid SmokeSide(Object *o, int nclouds, int dir);\n\n\n/* located in sound/sound.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-----------[referenced from ai/plantation/plantation.cpp]----------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/sand/curly_boss.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"curly_boss.fdh\"\n\n#define CURLYB_FIGHT_START\t\t10\n#define CURLYB_WAIT\t\t\t\t11\n#define CURLYB_WALK_PLAYER\t\t13\n#define CURLYB_WALKING_PLAYER\t14\n#define CURLYB_CHARGE_GUN\t\t20\n#define CURLYB_FIRE_GUN\t\t\t21\n#define CURLYB_SHIELD\t\t\t30\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_CURLY_BOSS, ai_curly_boss);\n\tONTICK(OBJ_CURLYBOSS_SHOT, ai_curlyboss_shot);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_curly_boss(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase CURLYB_FIGHT_START:\n\t\t{\n\t\t\t//o->hp = 12;\n\t\t\to->state = CURLYB_WAIT;\n\t\t\to->timer = random(50, 100);\n\t\t\to->frame = 0;\n\t\t\tif (o->x > player->x) o->dir = LEFT; else o->dir = RIGHT;\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t}\n\t\tcase CURLYB_WAIT:\n\t\t\tif (o->timer) o->timer--;\n\t\t\telse\n\t\t\t{\n\t\t\t\to->state = CURLYB_WALK_PLAYER;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase CURLYB_WALK_PLAYER:\n\t\t\to->state = CURLYB_WALKING_PLAYER;\n\t\t\to->frame = 3;\n\t\t\to->timer = random(50, 100);\n\t\t\tif (o->x > player->x) o->dir = LEFT; else o->dir = RIGHT;\n\t\tcase CURLYB_WALKING_PLAYER:\n\t\t\tif (++o->animtimer > 2)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\tif (++o->frame > 6) o->frame = 3;\n\t\t\t}\n\t\t\t\n\t\t\tXACCEL(0x40);\n\t\t\t\n\t\t\tif (o->timer) o->timer--;\n\t\t\telse\n\t\t\t{\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->state = CURLYB_CHARGE_GUN;\n\t\t\t\to->timer = 0;\n\t\t\t\tsound(SND_CHARGE_GUN);\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase CURLYB_CHARGE_GUN:\n\t\t\tif (o->x > player->x) o->dir = LEFT; else o->dir = RIGHT;\n\t\t\t\n\t\t\to->xinertia *= 8;\n\t\t\to->xinertia /= 9;\n\t\t\t\n\t\t\tif (++o->frame > 1) o->frame = 0;\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = CURLYB_FIRE_GUN;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase CURLYB_FIRE_GUN:\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (!(o->timer & 3))\n\t\t\t{\t// time to fire\n\t\t\t\t\n\t\t\t\t// check if player is trying to jump over\n\t\t\t\tif ((abs(o->x - player->x) < (32<<CSF)) && ((player->y + (10 << CSF)) < o->y))\n\t\t\t\t{\t// shoot up instead\n\t\t\t\t\to->frame = 2;\n\t\t\t\t\tcurlyboss_fire(o, UP);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->frame = 0;\n\t\t\t\t\tcurlyboss_fire(o, o->dir);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 30) o->state = 10;\n\t\tbreak;\n\t\t\n\t\tcase CURLYB_SHIELD:\n\t\t\tif (++o->frame > 8) o->frame = 7;\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = CURLYB_FIGHT_START;\n\t\t\t}\n\t\tbreak;\n\t}\n\n\n\tif (o->state > CURLYB_FIGHT_START && o->state < CURLYB_SHIELD)\n\t{\n\t\t// curly activates her shield anytime a missile's explosion goes off,\n\t\t// even if it's nowhere near her at all\n\t\tif (sound_is_playing(SND_MISSILE_HIT))\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->state = CURLYB_SHIELD;\n\t\t\to->frame = 7;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\to->xinertia = 0;\n\t\t}\n\t}\n\t\n\tif (o->xinertia > 0x1FF) o->xinertia = 0x1FF;\n\tif (o->xinertia < -0x1FF) o->xinertia = -0x1FF;\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\nstatic void curlyboss_fire(Object *o, int dir)\n{\n\tObject *shot = SpawnObjectAtActionPoint(o, OBJ_CURLYBOSS_SHOT);\n\t\n\tshot->damage = 6;\n\tshot->sprite = SPR_SHOT_MGUN_L1;\n\tshot->dir = o->dir;\n\tshot->shot.dir = dir;\n\t\n\teffect(shot->CenterX(), shot->CenterY(), EFFECT_STARPOOF);\n\t\n\tswitch(dir)\n\t{\n\t\tcase LEFT:\n\t\t\tshot->xinertia = -4096;\n\t\t\to->apply_xinertia(1 << CSF);\n\t\tbreak;\n\t\t\n\t\tcase RIGHT:\n\t\t\tshot->xinertia = 4096;\n\t\t\to->apply_xinertia(-(1 << CSF));\n\t\tbreak;\n\t\t\n\t\tcase UP:\n\t\t\tshot->yinertia = -4096;\n\t\t\tshot->sprite++;\n\t\tbreak;\n\t}\n\t\n\tsound(SND_POLAR_STAR_L1_2);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_curlyboss_shot(Object *o)\n{\n\tif (hitdetect(o, player) && !player->hurt_time)\n\t{\n\t\thurtplayer(o->shot.damage);\n\t}\n\telse if (IsBlockedInShotDir(o))\n\t { }\n\telse\n\t{\n\t\treturn;\n\t}\n\t\n\t// we get here only if we've hit the player, or the wall\n\tshot_spawn_effect(o, EFFECT_STARSOLID);\n\to->Delete();\n}\n\n"
  },
  {
    "path": "ai/sand/curly_boss.fdh",
    "content": "//hash:676e013b\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/sand/curly_boss.cpp]-------------//\nbool hitdetect(Object *o1, Object *o2);\n\n\n/* located in caret.cpp */\n\n//--------------[referenced from ai/sand/curly_boss.cpp]-------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in player.cpp */\n\n//--------------[referenced from ai/sand/curly_boss.cpp]-------------//\nvoid hurtplayer(int damage);\n\n\n/* located in ai/ai.cpp */\n\n//--------------[referenced from ai/sand/curly_boss.cpp]-------------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\n\n\n/* located in ai/sand/curly_boss.cpp */\n\n//--------------[referenced from ai/sand/curly_boss.cpp]-------------//\nvoid ai_curly_boss(Object *o);\nstatic void curlyboss_fire(Object *o, int dir);\nvoid ai_curlyboss_shot(Object *o);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//--------------[referenced from ai/sand/curly_boss.cpp]-------------//\nbool IsBlockedInShotDir(Object *o);\nvoid shot_spawn_effect(Object *o, int effectno);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/sand/curly_boss.cpp]-------------//\nvoid sound(int snd);\nbool sound_is_playing(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/sand/curly_boss.cpp]-------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/sand/puppy.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"puppy.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_PUPPY_WAG, ai_puppy_wag);\n\tONTICK(OBJ_PUPPY_BARK, ai_puppy_bark);\n\tONTICK(OBJ_PUPPY_SLEEP, ai_zzzz_spawner);\n\tONTICK(OBJ_PUPPY_RUN, ai_puppy_run);\n\t\n\tAFTERMOVE(OBJ_PUPPY_CARRY, aftermove_puppy_carry);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// these seem to be used for the the ones in jenka's house\n// that you have already gotten.\nvoid ai_puppy_wag(Object *o)\n{\n\t// code shared with talking item-giving puppy from Plantation--\n\t// that one doesn't face you.\n\tif (o->type != OBJ_PUPPY_ITEMS)\n\t{\n\t\tFACEPLAYER;\n\t}\n\t\n\t// needed so you can talk to them immediately after giving them to jenka\n\to->flags |= FLAG_SCRIPTONACTIVATE;\n\t\n\t// only wag when player is near\n\tif (pdistlx(56 << CSF))\n\t{\n\t\tif (++o->animtimer >= 4)\n\t\t{\n\t\t\to->animtimer = 0;\n\t\t\to->animframe ^= 1;\n\t\t}\n\t\t\n\t\to->frame = o->animframe;\n\t}\n\telse\n\t{\n\t\to->animframe = 1;\n\t\to->animtimer = 0;\n\t\to->frame = 0;\n\t}\n\t\n\trandblink(o, 2, 4);\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\nvoid ai_puppy_bark(Object *o)\n{\n#define BARK\t5\n#define NOBARK\t3\n\n\tif (o->state < 100)\n\t{\n\t\tFACEPLAYER;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\tcase 100:\n\t\t\to->state++;\n\t\t\to->animframe = 0;\n\t\t\to->timer2 = 0;\n\t\tcase 1:\n\t\tcase 101:\n\t\t\t// bark when player is near\n\t\t\t// note: this is also supposed to run at jenka's house when balrog appears\n\t\t\t// but it's ok:\n\t\t\t// the player is always near enough because of the way the cutscene is set up\n\t\t\tif ((abs(o->x - player->x) < (64 << CSF)) && ((abs(o->y - player->y) < (16 << CSF))))\n\t\t\t{\n\t\t\t\tif (++o->animtimer > 6)\n\t\t\t\t{\n\t\t\t\t\to->animtimer = 0;\n\t\t\t\t\t\n\t\t\t\t\tif (o->frame==NOBARK)\n\t\t\t\t\t{\n\t\t\t\t\t\to->frame = BARK;\n\t\t\t\t\t\tsound(SND_PUPPY_BARK);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\to->frame = NOBARK;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (random(0, 8)==0 || ++o->timer2 > 5)\n\t\t\t\t\t\t{\t// stop barking for a sec\n\t\t\t\t\t\t\to->state++;\n\t\t\t\t\t\t\to->timer = o->timer2 = 0;\n\t\t\t\t\t\t\to->frame = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->animtimer = 9999;\t\t// begin barking as SOON as player gets near\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\tcase 102:\n\t\t\to->frame = 0;\n\t\t\tif (++o->timer > 8)\n\t\t\t{\t// start barking again\n\t\t\t\to->state--;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->timer2 = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\t// do not bark at all--set during jenka's 1st cutscene with balrog\n\t\tcase 20:\n\t\tcase 120:\n\t\t\to->frame = 0;\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\nvoid ai_zzzz_spawner(Object *o)\n{\n\tif (!o->timer)\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_ZZZZ);\n\t\to->timer = 99;\n\t}\n\telse o->timer--;\n}\n\nvoid ai_puppy_run(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t\to->flags |= FLAG_SCRIPTONACTIVATE;\t\t// for some reason this isn't set on puppy in map\n\t\t\to->state = 1;\n\t\tcase 1:\n\t\t\tFACEPLAYER;\n\t\t\to->frame = 0;\t\t// necessary for randblink\n\t\t\t\n\t\t\tif (pdistly2((32 << CSF), (16 << CSF)))\n\t\t\t{\n\t\t\t\tif (pdistlx(32 << CSF))\n\t\t\t\t{\t// run away!!!\n\t\t\t\t\tFACEAWAYPLAYER;\n\t\t\t\t\to->state = 10;\n\t\t\t\t}\n\t\t\t\telse if (pdistlx(96 << CSF))\n\t\t\t\t{\n\t\t\t\t\t// wag tail\n\t\t\t\t\tif (++o->animtimer >= 4)\n\t\t\t\t\t{\n\t\t\t\t\t\to->animtimer = 0;\n\t\t\t\t\t\to->animframe ^= 1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\to->frame = o->animframe;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\trandblink(o, 2, 4);\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t\to->state = 11;\n\t\t\to->frame = 4;\n\t\t\to->animtimer = 0;\n\t\tcase 11:\t\t// running\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\tif (++o->animtimer > 2)\n\t\t\t\t{\n\t\t\t\t\to->animtimer = 0;\n\t\t\t\t\to->frame = (o->frame==4) ? 3:4;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// \"bounce\" off walls\n\t\t\tif (o->dir==RIGHT)\n\t\t\t{\n\t\t\t\tif (o->blockr)\n\t\t\t\t{\n\t\t\t\t\to->xinertia = -(o->xinertia >> 1);\n\t\t\t\t\to->dir = LEFT;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->blockl)\n\t\t\t\t{\n\t\t\t\t\to->xinertia = -(o->xinertia >> 1);\n\t\t\t\t\to->dir = RIGHT;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\to->xinertia += (o->dir==RIGHT) ? 0x40 : -0x40;\n\t\t\t\n\t\t\tif (o->xinertia > 0x5ff) o->xinertia = 0x400;\n\t\t\tif (o->xinertia < -0x5ff) o->xinertia = -0x400;\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid aftermove_puppy_carry(Object *o)\n{\n\tStickToPlayer(o, -1, -13, -23);\n\t\n\to->frame = 0;\n\trandblink(o, 2, 4);\n}\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/sand/puppy.fdh",
    "content": "//hash:a6684331\n//automatically generated by Makegen\n\n/* located in caret.cpp */\n\n//-----------------[referenced from ai/sand/puppy.cpp]---------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from ai/sand/puppy.cpp]---------------//\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\nvoid StickToPlayer(Object *o, int x_left, int x_right, int off_y);\n\n\n/* located in ai/sand/puppy.cpp */\n\n//-----------------[referenced from ai/sand/puppy.cpp]---------------//\nvoid ai_puppy_wag(Object *o);\nvoid ai_puppy_bark(Object *o);\nvoid ai_zzzz_spawner(Object *o);\nvoid ai_puppy_run(Object *o);\nvoid aftermove_puppy_carry(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/sand/puppy.cpp]---------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/sand/puppy.cpp]---------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/sand/sand.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../egg/egg.fdh\"\t// for ai_beetle_horiz\n#include \"sand.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BEETLE_BROWN, ai_beetle_horiz);\n\t\n\tONTICK(OBJ_POLISH, ai_polish);\n\tONDEATH(OBJ_POLISH, ondeath_polish);\n\t\n\tONTICK(OBJ_POLISHBABY, ai_polishbaby);\n\t\n\tONTICK(OBJ_SANDCROC, ai_sandcroc);\n\t\n\tONTICK(OBJ_MIMIGAC1, ai_curlys_mimigas);\n\tONTICK(OBJ_MIMIGAC2, ai_curlys_mimigas);\n\tONTICK(OBJ_MIMIGAC_ENEMY, ai_curlys_mimigas);\n\t\n\tONTICK(OBJ_SUNSTONE, ai_sunstone);\n\t\n\tONTICK(OBJ_ARMADILLO, ai_armadillo);\n\t\n\tONTICK(OBJ_CROW, ai_crow);\n\tONTICK(OBJ_CROWWITHSKULL, ai_crowwithskull);\n\t\n\tONTICK(OBJ_SKULLHEAD, ai_skullhead);\n\tONTICK(OBJ_SKULLHEAD_CARRIED, ai_skullhead_carried);\n\tAFTERMOVE(OBJ_SKULLHEAD_CARRIED, aftermove_skullhead_carried);\n\t\n\tONTICK(OBJ_SKULLSTEP, ai_skullstep);\n\tONTICK(OBJ_SKULLSTEP_FOOT, ai_skullstep_foot);\n\t\n\tONTICK(OBJ_SKELETON, ai_skeleton);\n\tONTICK(OBJ_SKELETON_SHOT, ai_skeleton_shot);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_polish(Object *o)\n{\n\t#define POLISH_ACCEL\t0x20\n\t#define POLISH_SPEED\t0x200\n\t#define POLISH_BOUNCE\t0x100\n\t\n\t#define POLISH_CCW_LEFT\t\t1\n\t#define POLISH_CCW_UP\t\t2\n\t#define POLISH_CCW_RIGHT\t3\n\t#define POLISH_CCW_DOWN\t\t4\n\t\n\t#define POLISH_CW_LEFT\t\t5\n\t#define POLISH_CW_UP\t\t6\n\t#define POLISH_CW_RIGHT\t\t7\n\t#define POLISH_CW_DOWN\t\t8\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// initilization\n\t\t{\n\t\t\to->state = (o->dir == LEFT) ? POLISH_CW_RIGHT : POLISH_CCW_LEFT;\n\t\t\t\n\t\t\t// reprocess first frame\n\t\t\tai_polish(o);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// -------------- Traveling around counter-clockwise --------------\n\t\t\n\t\tcase POLISH_CCW_LEFT:\t// traveling left on ceiling\n\t\t{\n\t\t\to->yinertia -= POLISH_ACCEL;\n\t\t\tif (o->yinertia < 0 && o->blocku)\n\t\t\t{\n\t\t\t\to->yinertia = POLISH_BOUNCE;\n\t\t\t\to->xinertia -= POLISH_BOUNCE;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockl) o->state = POLISH_CCW_DOWN;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase POLISH_CCW_UP:\t// traveling up right wall\n\t\t{\n\t\t\to->xinertia += POLISH_ACCEL;\n\t\t\tif (o->xinertia > 0 && o->blockr)\n\t\t\t{\n\t\t\t\to->xinertia = -POLISH_BOUNCE;\n\t\t\t\to->yinertia -= POLISH_BOUNCE;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blocku) o->state = POLISH_CCW_LEFT;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase POLISH_CCW_RIGHT:\t// traveling right on floor\n\t\t{\n\t\t\to->yinertia += POLISH_ACCEL;\n\t\t\tif (o->yinertia > 0 && o->blockd)\n\t\t\t{\n\t\t\t\to->yinertia = -POLISH_BOUNCE;\n\t\t\t\to->xinertia += POLISH_BOUNCE;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockr) o->state = POLISH_CCW_UP;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase POLISH_CCW_DOWN:\t// traveling down left wall\n\t\t{\n\t\t\to->xinertia -= POLISH_ACCEL;\n\t\t\tif (o->xinertia < 0 && o->blockl)\n\t\t\t{\n\t\t\t\to->xinertia = POLISH_BOUNCE;\n\t\t\t\to->yinertia += POLISH_BOUNCE;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd) o->state = POLISH_CCW_RIGHT;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// -------------- Traveling around clockwise --------------\n\t\t\n\t\tcase POLISH_CW_LEFT:\t\t// traveling left on floor\n\t\t{\n\t\t\to->yinertia += POLISH_ACCEL;\n\t\t\tif (o->yinertia > 0 && o->blockd)\n\t\t\t{\n\t\t\t\to->yinertia = -POLISH_BOUNCE;\n\t\t\t\to->xinertia -= POLISH_BOUNCE;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockl) o->state = POLISH_CW_UP;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase POLISH_CW_UP:\t\t// traveling up left wall\n\t\t{\n\t\t\to->xinertia -= POLISH_ACCEL;\n\t\t\tif (o->xinertia < 0 && o->blockl)\n\t\t\t{\n\t\t\t\to->xinertia = POLISH_BOUNCE;\n\t\t\t\to->yinertia -= POLISH_BOUNCE;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blocku) o->state = POLISH_CW_RIGHT;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase POLISH_CW_RIGHT:\t\t// traveling right on ceiling\n\t\t{\n\t\t\to->yinertia -= POLISH_ACCEL;\n\t\t\tif (o->yinertia < 0 && o->blocku)\n\t\t\t{\n\t\t\t\to->yinertia = POLISH_BOUNCE;\n\t\t\t\to->xinertia += POLISH_BOUNCE;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockr) o->state = POLISH_CW_DOWN;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase POLISH_CW_DOWN:\t\t// traveling down right wall\n\t\t{\n\t\t\to->xinertia += POLISH_ACCEL;\n\t\t\tif (o->xinertia > 0 && o->blockr)\n\t\t\t{\n\t\t\t\to->xinertia = -POLISH_BOUNCE;\n\t\t\t\to->yinertia += POLISH_BOUNCE;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd) o->state = POLISH_CW_LEFT;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tLIMITX(POLISH_SPEED);\n\tLIMITY(POLISH_SPEED);\n\t\n\t// animation\n\to->animframe ^= 1;\n\to->frame = o->animframe + 2;\n\t//if (o->state==P_DOWNRIGHT || o->state==P_UPRIGHT) o->frame += 2;\n\to->dir = RIGHT;\n}\n\nvoid ondeath_polish(Object *o)\n{\nint i;\nint x, y;\n\tx = o->CenterX();\n\ty = o->CenterY();\n\tfor(i=0;i<10;i++)\n\t{\n\t\tCreateObject(x, y, OBJ_POLISHBABY);\n\t}\n\to->Delete();\n}\n\nvoid ai_polishbaby(Object *o)\n{\n\tif (!o->state)\n\t{\n\t\to->state = 1;\n\t\tif (!random(0, 1)) o->xinertia = random(0x100, 0x200);\n\t\t\t\t  else o->xinertia = random(-0x200, -0x100);\n\t\t\n\t\tif (!random(0, 1)) o->yinertia = random(0x100, 0x200);\n\t\t\t\t  else o->yinertia = random(-0x200, -0x100);\n\t}\n\t\n\tif (o->xinertia > 0 && o->blockr) o->xinertia = -o->xinertia;\n\tif (o->xinertia < 0 && o->blockl) o->xinertia = -o->xinertia;\n\tif (o->yinertia > 0 && o->blockd) o->yinertia = -o->yinertia;\n\tif (o->yinertia < 0 && o->blocku) o->yinertia = -o->yinertia;\n\t\n\to->frame ^= 1;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_sandcroc(Object *o)\n{\nint pbottom, crocbottom;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\t\to->timer = 0;\n\t\t\to->ymark = o->y;\n\t\t\to->flags &= ~(FLAG_SOLID_MUSHY | FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_IGNORE_SOLID);\n\t\tcase 1:\n\t\t\t// track player invisibly underground\n\t\t\to->xinertia = (o->CenterX() < player->CenterX()) ? 0x400:-0x400;\n\t\t\t\n\t\t\tif (pdistlx(19 << CSF))\n\t\t\t{\n\t\t\t\t// check if bottoms of player and croc are near\n\t\t\t\tpbottom = player->y + (sprites[player->sprite].bbox.y2 << CSF);\n\t\t\t\tcrocbottom = o->y + (sprites[o->sprite].bbox.y2 << CSF) + 0x600;\n\t\t\t\t\n\t\t\t\tif (pbottom <= crocbottom && crocbottom - pbottom < (12 << CSF))\n\t\t\t\t{\t// attack!!\n\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\to->state = 2;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\tsound(SND_JAWS);\n\t\t\t\t\to->frame = 0;\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// attacking\n\t\t\tif (++o->animtimer > 3)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->frame++;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->frame==3) o->damage = (o->type==OBJ_SANDCROC_OSIDE) ? 15:10;\n\t\t\telse if (o->frame==4)\n\t\t\t{\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\n\t\t\to->flags |= FLAG_SOLID_MUSHY;\n\t\t\to->damage = 0;\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\to->state = 4;\n\t\t\t\to->timer = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->shaketime += 25;\t\t// delay floattext until after we're underground\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\t\t// retreat\n\t\t\to->y += 0x280;\n\t\t\t\n\t\t\tif (++o->timer == 30)\n\t\t\t{\n\t\t\t\to->flags &= ~(FLAG_SOLID_MUSHY | FLAG_SHOOTABLE);\n\t\t\t\to->state = 5;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 5:\n\t\t\to->frame = 0;\n\t\t\to->y = o->ymark;\n\t\t\t\n\t\t\tif (o->timer < 100)\n\t\t\t{\n\t\t\t\to->timer++;\n\t\t\t\t// have to wait before moving: till floattext goes away\n\t\t\t\t// else they can see us jump\n\t\t\t\tif (o->timer==98)\n\t\t\t\t{\n\t\t\t\t\to->xinertia = (player->CenterX() - o->CenterX());\n\t\t\t\t}\n\t\t\t\telse o->xinertia = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->state = 0;\n\t\t\t}\n\t\tbreak;\n\t}\n\tLIMITY(0x100);\n\t\n\t// these guys (from oside) don't track\n\tif (o->type == OBJ_SANDCROC_OSIDE) o->xinertia = 0;\n}\n\n\nvoid ai_sunstone(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\to->state = 1;\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// triggered to move by hvtrigger script\n\t\t\to->frame = 1;\n\t\t\to->timer = 0;\n\t\t\to->state++;\n\t\tcase 11:\n\t\t\t\n\t\t\tif (o->dir==LEFT) o->x -= 0x80; else o->x += 0x80;\n\t\t\t\n\t\t\tif ((o->timer & 7) == 0) sound(SND_QUAKE);\n\t\t\to->timer++;\n\t\t\t\t\n\t\t\tgame.quaketime = 20;\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_crow(Object *o)\n{\n\t// for crows carrying skullheads\n\tif (o->state >= 100)\n\t{\n\t\t// if our skullhead dies, go into attack mode\n\t\tif (!o->linkedobject)\n\t\t{\n\t\t\to->state = 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// link our blockd with it's blockd so we don't fly it through the floor\n\t\t\to->blockd |= o->linkedobject->blockd;\n\t\t}\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tuint8_t angle = random(0, 255);\n\t\t\tvector_from_angle(angle, (1<<CSF), &o->xinertia, &o->yinertia);\n\t\t\t\n\t\t\to->xmark = o->x + (o->xinertia * 8);\n\t\t\to->ymark = o->y + (o->yinertia * 8);\n\t\t\t\n\t\t\to->state = 1;\n\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t\t\n\t\t\to->animframe = random(0, 1);\n\t\t\to->animtimer = random(0, 4);\n\t\t}\n\t\tcase 1:\n\t\tcase 101:\n\t\t{\n\t\t\tif (o->x > o->xmark) o->xinertia -= 16;\n\t\t\telse if (o->x < o->xmark) o->xinertia += 16;\n\t\t\t\n\t\t\tif (o->y > o->ymark) o->yinertia -= 16;\n\t\t\telse if (o->y < o->ymark) o->yinertia += 16;\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\tLIMITX(0x200);\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\to->state++;\t\t// state 2/102\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tif (!o->linkedobject)\n\t\t\t\t{\n\t\t\t\t\tif (o->dir==RIGHT) o->xinertia = -0x200;\n\t\t\t\t\t\t\t\t  else o->xinertia = 0x200;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\to->yinertia = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\tcase 102:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\tif (o->shaketime)\n\t\t\t{\t// fall while hurt\n\t\t\t\to->yinertia += 0x20;\n\t\t\t\to->xinertia = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!o->linkedobject)\n\t\t\t\t{\t// move towards player\n\t\t\t\t\tif (o->x < player->x) o->xinertia += 0x10;\n\t\t\t\t\t\t\t\t\t else o->xinertia -= 0x10;\n\t\t\t\t\t\n\t\t\t\t\tif (o->y < player->y) o->yinertia += 0x10;\n\t\t\t\t\t\t\t\t\t else o->yinertia -= 0x10;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t// carrying a skull; don't chase him\n\t\t\t\t\to->state--;\t\t// state 1/101\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// bounce off walls\n\t\t\tif (o->xinertia < 0 && o->blockl) o->xinertia = 0x200;\n\t\t\tif (o->xinertia > 0 && o->blockr) o->xinertia = -0x200;\n\t\t\t\n\t\t\tif (o->yinertia < 0 && o->blocku) o->yinertia = 0x200;\n\t\t\tif (o->yinertia > 0 && o->blockd) o->yinertia = -0x200;\n\t\t\t\n\t\t\tLIMITX(0x5ff);\n\t\t\tLIMITY(0x5ff);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (++o->animtimer >= 2)\n\t{\n\t\to->animtimer = 0;\n\t\to->animframe ^= 1;\n\t}\n\t\n\to->frame = o->animframe;\n\tif (o->shaketime) o->frame = 4;\n}\n\n\nvoid ai_crowwithskull(Object *o)\n{\nObject *skull;\n\n\t// create the skullhead we're carrying\n\tskull = CreateObject(0, 0, OBJ_SKULLHEAD_CARRIED);\n\tskull->linkedobject = o;\n\tskull->timer = random(0, 50);\n\to->linkedobject = skull;\n\t\n\t// switch over to the main crow AI, but only move up & down\n\to->yinertia = random(-0x200, -0x100);\n\to->xmark = o->x;\n\to->ymark = o->y + random(-(28 << CSF), (10 << CSF));\n\to->animframe = random(0, 1);\n\to->animtimer = random(0, 4);\n\to->state = 101;\n\to->type = OBJ_CROW;\n\t\n\t// run the ai for the normal crow for this first frame\n\tai_crow(o);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid ai_skullhead(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->speed = 0x100;\t// skullhead_carried shares ai but moves faster\n\t\t\to->state = 1;\n\t\t\to->timer = random(-5, 0);\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (++o->timer > 3)\n\t\t\t{\n\t\t\t\to->yinertia = -0x350;\n\t\t\t\to->state = 2;\n\t\t\t\to->frame = 1;\n\t\t\t\tXMOVE(o->speed);\n\t\t\t}\n\t\t\telse break;\n\t\t}\n\t\tcase 2:\n\t\t{\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blocku && o->yinertia < 0) o->yinertia = 0;\n\t\t\tif (o->yinertia > 0) o->frame = 0; else o->frame = 1;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->xinertia)\n\t{\n\t\tif (o->blockl) { o->dir = RIGHT; o->xinertia = o->speed; }\n\t\tif (o->blockr) { o->dir = LEFT; o->xinertia = -o->speed; }\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\nvoid ai_skullhead_carried(Object *o)\n{\n\t// if our crow dies, change into a regular skullhead\n\tif (!o->linkedobject)\n\t{\n\t\to->type = OBJ_SKULLHEAD;\n\t\to->state = 2;\t// falling\n\t\to->speed = 0x200;\n\t\tXMOVE(o->speed);\n\t\tai_skullhead(o);\n\t\treturn;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\tcase 1:\t\t\t// mouth closed\n\t\t{\n\t\t\to->frame = 0;\n\t\t\t\n\t\t\t// shoot only when player near\n\t\t\tif ((abs(player->x - o->x) < (130 << CSF)) &&\n\t\t\t\t(abs(player->y - o->y) < (100 << CSF)))\n\t\t\t{\n\t\t\t\to->timer++;\n\t\t\t}\n\t\t\telse o->timer = 49;\n\t\t\t\n\t\t\tif (o->timer >= 50)\n\t\t\t{\n\t\t\t\to->frame = 1;\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t\t// mouth opened\n\t\t{\n\t\t\to->frame = 1;\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif ((o->timer==30 || o->timer==35) && o->onscreen)\n\t\t\t{\n\t\t\t\tEmFireAngledShot(o, OBJ_SKELETON_SHOT, 2, 0x300);\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t}\n\t\t\telse if (o->timer > 50)\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid aftermove_skullhead_carried(Object *o)\n{\nObject *crow;\n\n\t// keep us in the right spot relative to our crow\n\tif (o->linkedobject)\n\t{\n\t\tcrow = o->linkedobject;\n\t\to->x = crow->x + (1 << CSF);\n\t\to->y = crow->y + (21 << CSF);\n\t\to->dir = crow->dir;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_skeleton_shot(Object *o)\n{\n\tai_animate2(o);\t\t\t\t// animate at 1 frame per 2 ticks\n\t\n\t// bounce off walls\n\tif ((o->blockl && o->xinertia < 0) || (o->blockr && o->xinertia > 0))\n\t{\n\t\to->xinertia = -o->xinertia;\n\t\to->timer += 5;\n\t}\n\t\n\t// bounce off ceiling\n\tif ((o->blocku && o->yinertia < 0))\n\t{\n\t\to->yinertia = -o->yinertia;\n\t\to->timer += 5;\n\t}\n\t\n\t// if hit floor bounce along it...\n\tif (o->blockd)\n\t{\n\t\to->yinertia = -0x180;\n\t\to->state = 1;\t// begin falling\n\t\to->timer += 4;\n\t}\n\t\n\tif (o->state == 1)\n\t{\n\t\to->yinertia += 0x10;\n\t\tLIMITY(0x5ff);\n\t}\n\t\n\tif (o->timer >= 10)\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_FISHY);\n\t\to->Delete();\n\t}\n}\n\n\nvoid ai_armadillo(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (o->blockl && o->dir == LEFT) o->dir = RIGHT;\n\t\t\tif (o->blockr && o->dir == RIGHT) o->dir = LEFT;\n\t\t\tXMOVE(0x100);\n\t\t\t\n\t\t\tANIMATE(4, 0, 1);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_skullstep(Object *o)\n{\nObject *foot;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->y += (7 << CSF);\n\t\t\t\n\t\t\t// spawn the feet\n\t\t\tfoot = CreateObject(0, 0, OBJ_SKULLSTEP_FOOT);\n\t\t\tfoot->linkedobject = o;\n\t\t\t\n\t\t\tfoot = CreateObject(0, 0, OBJ_SKULLSTEP_FOOT);\n\t\t\tfoot->linkedobject = o;\n\t\t\tfoot->angleoffset = 128;\n\t\t\t\n\t\t\to->state = 1;\n\t\t\to->angle = 200;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\t// spin the feet\n\t\t\to->angle += (o->dir==RIGHT) ? 6 : -6;\n\t\t\t\n\t\t\t// if we hit the ground, slow down. if we have been there for a while,\n\t\t\t// our feet must have gone away, so go to explode state\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->xinertia *= 3;\n\t\t\t\to->xinertia /= 4;\n\t\t\t\tif (++o->timer > 60)\n\t\t\t\t{\n\t\t\t\t\to->state = 2;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse o->timer = 0;\n\t\t\t\n\t\t\t// turn around if we run into a wall\n\t\t\tif ((o->dir==RIGHT && o->blockr) || (o->dir==LEFT && o->blockl))\n\t\t\t{\n\t\t\t\tif (++o->timer2 > 8)\n\t\t\t\t{\n\t\t\t\t\to->dir ^= 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse o->timer2 = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\to->timer++;\n\t\t\to->shaketime = o->timer;\t// have to set it to timer and not a constant so it alternates\n\t\t\tif (o->timer > 50)\n\t\t\t{\n\t\t\t\tSmokeClouds(o, 8, 8, 8);\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x80;\n\tif (o->blockd) o->yinertia = 0;\n\tLIMITX(0x2ff);\n\tLIMITY(0x2ff);\n}\n\n\nvoid ai_skullstep_foot(Object *o)\n{\nObject *skull = o->linkedobject;\nuchar angle;\nint circle_x, circle_y;\n\t\n\t// skull was destroyed before us?\n\tif (!skull || skull->state==2)\n\t{\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tangle = skull->angle;\n\tangle += o->angleoffset;\n\t\n\t// handle moving up when stepping on the ground\n\tif (o->blockd)\n\t\tskullstep_do_step(o, skull, angle);\n\t\n\to->dir = skull->dir;\n\t\n\t// spin around\n\tvector_from_angle(angle, (10 << CSF), &circle_x, &circle_y);\n\to->x = skull->x + (3 << CSF) + circle_x;\n\to->y = skull->y + (8 << CSF) + circle_y;\n\t\n\to->frame = (angle >= 20 && angle <= 108) ? 0:1;\n}\n\n\n// prevent climbing the walls. this didn't seem to be a problem in the original\n// game but to me, the feet tend to spin into walls when they're near them and\n// \"falsely\" set blockd resulting in skipping up the wall.\nvoid skullstep_do_step(Object *o, Object *skull, int angle)\n{\nint x, y;\nint i;\n\n\t// get the coordinates of the tile that's blocking us\n\t// we already KNOW we're blockd, so if it returns false, we're standing on a slope\n\tif (o->CheckAttribute(&sprites[o->sprite].block_d, TA_SOLID_NPC, &x, &y))\n\t{\n\t\t// if the tile above it is also solid, it can't be a floor, it's a wall!\n\t\tif (tileattr[map.tiles[x][y-1]] & TA_SOLID_NPC)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// it's also a wall if the tile below is solid and neither of the tiles to\n\t\t\t// the left or right are solid (top of a wall)\n\t\t\tif (tileattr[map.tiles[x][y+1]] & TA_SOLID_NPC)\n\t\t\t{\n\t\t\t\t// we have to check TWO tiles to the right and see if EITHER is nonsolid because\n\t\t\t\t// of the two-tile wall on the right-lower \"arena\" slopey part--kind of a hack,\n\t\t\t\t// i hate to have to put map-specific code in\n\t\t\t\tif (!(tileattr[map.tiles[x+1][y]] & TA_SOLID_NPC) || \\\n\t\t\t\t\t!(tileattr[map.tiles[x+2][y]] & TA_SOLID_NPC))\n\t\t\t\t{\n\t\t\t\t\tif (!(tileattr[map.tiles[x-1][y]] & TA_SOLID_NPC))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// move us up until we're no longer in the ground\n\tfor(i=0;i<10;i++)\n\t{\n\t\to->y -= (1<<CSF);\n\t\tskull->y -= (1<<CSF);\n\t\to->UpdateBlockStates(DOWNMASK);\n\t\tif (!o->blockd) break;\n\t}\n\t\n\t// now move us down so we're just touching the ground\n\to->y += (1<<CSF);\n\tskull->y += (1<<CSF);\n\t\n\t// move us in the direction we're facing\n\tskull->xinertia += (o->dir==RIGHT) ? 0x80 : -0x80;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_skeleton(Object *o)\n{\nuchar pnear;\n#define SKNEAR_X\t\t(352<<CSF)\n#define SKNEAR_BELOW\t(160<<CSF)\n#define SKNEAR_ABOVE\t(64<<CSF)\n\t\n\tpnear = (pdistlx(SKNEAR_X) && pdistly2(SKNEAR_ABOVE, SKNEAR_BELOW));\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->frame = o->blockd ? 0:1;\n\t\t\to->xinertia = 0;\n\t\t\t\n\t\t\t// if player comes near, enter attack state\n\t\t\t// also if he shoots us while we're inactive, don't just stand there\n\t\t\t// like a ninny, jump around!\n\t\t\tif (o->shaketime) o->state = 20;\n\t\t\tif (pnear) o->state = 10;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// prepare for jump\n\t\t\to->timer = o->timer2 = o->frame = o->xinertia = 0;\n\t\t\to->state = 11;\n\t\tcase 11:\n\t\t\tif (++o->timer > 5 && o->blockd)\n\t\t\t{\n\t\t\t\t// jump if player near, else go to idle\n\t\t\t\to->state = pnear ? 20:0;\n\t\t\t}\n\t\tif (o->state != 20) break;\n\t\t\n\t\tcase 20:\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->frame = 1;\n\t\t\to->timer2 = 0;\n\t\t\to->yinertia = -(random(1, 3) << CSF);\n\t\t\t\n\t\t\t// jump towards player, unless we've been hurt; in that case jump away\n\t\t\tif (!o->shaketime)\n\t\t\t{\n\t\t\t\to->xinertia += (o->x > player->x) ? -0x100:0x100;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->xinertia += (o->x > player->x) ? 0x100:-0x100;\n\t\t\t}\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tif (o->yinertia > 0)\n\t\t\t{\n\t\t\t\tif (o->timer2 == 0)\n\t\t\t\t{\n\t\t\t\t\to->timer2++;\n\t\t\t\t\t\n\t\t\t\t\tEmFireAngledShot(o, OBJ_SKELETON_SHOT, 0, 0x300);\n\t\t\t\t\tif (o->onscreen) sound(SND_EM_FIRE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (o->blockd)\n\t\t\t\t{\n\t\t\t\t\to->state = 10;\n\t\t\t\t\to->frame = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->blocku) o->yinertia = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state >= 10) FACEPLAYER;\n\to->yinertia += 0x33;\n\tLIMITX(0x5ff);\n\tLIMITY(0x5ff);\n}\n\n\n// curly's mimiga's\nvoid ai_curlys_mimigas(Object *o)\n{\nstatic const uint8_t mimiga_walk_frames[5] = { 0, 2, 0, 3 };\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// init/set initial anim state\n\t\t\to->frame = 0;\n\t\t\t\n\t\t\tif (o->type==OBJ_MIMIGAC1) o->state = 100;\n\t\t\telse\n\t\t\t{\t// OBJ_MIMIGAC2 & OBJ_MIMIGA_ENEMY\n\t\t\t\to->state = 2;\t\t\t// stand and blink\n\t\t\t\t\n\t\t\t\tif (o->type==OBJ_MIMIGAC2)\n\t\t\t\t{\n\t\t\t\t\tif (o->dir == RIGHT)\n\t\t\t\t\t\to->state = 110;\t\t// sleeping\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tai_curlys_mimigas(o);\t\t// re-process again with correct state\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// init stand and blink\n\t\t\to->state = 3;\n\t\tcase 3:\t\t// stand and blink\n\t\t\to->frame = 0;\n\t\t\trandblink(o, 1, 8);\n\t\tbreak;\n\t\t\n\t\t// sitting mimiga (when facing right)\n\t\t// facing away mimiga (when facing left)\n\t\tcase 100:\n\t\t\to->frame = 4;\n\t\tbreak;\n\t\t\n\t\tcase 110:\t// sleeping facing left mimiga\n\t\t\to->frame = 7;\n\t\t\tai_zzzz_spawner(o);\n\t\tbreak;\n\t\t\n\t\t/// ******************** Fighting Mimiga Code ********************\n\t\tcase 10:\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\n\t\t\to->hp = 1000;\n\t\t\to->state = 11;\n\t\t\t\n\t\t\to->timer = random(0, 50);\n\t\t\to->frame = 0;\n\t\t//fall thru to state 11\n\t\tcase 11:\n\t\t\tif (o->timer) o->timer--;\n\t\t\telse o->state = 13;\n\t\tbreak;\n\t\t\n\t\tcase 13:\n\t\t\to->state = 14;\n\t\t\to->timer = random(0, 50);\n\t\t\to->animframe = 0;\n\t\t\t\n\t\t\tif (o->x <= player->x) o->dir = RIGHT;\n\t\t\t\t\t          else o->dir = LEFT;\n\t\t\t// fall thru\n\t\tcase 14:\n\t\t\tif (++o->animtimer > 2)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\tif (++o->animframe > 3) o->animframe = 0;\n\t\t\t}\n\t\t\to->frame = mimiga_walk_frames[o->animframe];\n\t\t\t\n\t\t\tif (o->dir==LEFT) o->xinertia -= 0x40;\n\t\t\t\t\t\t else o->xinertia += 0x40;\n\t\t\t\n\t\t\tif (o->timer)\n\t\t\t{\n\t\t\t\to->timer--;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// enter hop state\n\t\t\t\to->state = 15;\n\t\t\t\to->frame = 2;\n\t\t\t\to->yinertia = -0x200;\n\t\t\t\to->damage = 2;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 15:\t// hopping\n\t\t\tif (o->blockd)\n\t\t\t{\t// landed\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = 10;\n\t\t\t\to->damage = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// aiiie! got shot!!\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->state = 21;\n\t\t\t\tif (o->frame==6) o->frame = 7;\n\t\t\t\t\t\t\telse o->frame = 8;\n\t\t\t\t\n\t\t\t\to->timer = random(300, 400);\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 21:\t// lying on ground knocked out\n\t\t\tif (o->timer)\n\t\t\t{\n\t\t\t\to->timer--;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->hp = 1000;\n\t\t\to->state = 11;\n\t\t\to->timer = random(0, 50);\n\t\t\to->frame = 0;\n\t\tbreak;\n\t}\n\t\n\tif (o->state > 10 && o->state < 20 && o->hp != 1000)\n\t{\t// got shot by player\n\t\to->state = 20;\n\t\to->yinertia = -0x200;\n\t\to->frame = random(5, 6);\n\t\t\n\t\to->damage = 0;\n\t\to->flags &= ~FLAG_SHOOTABLE;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n\tLIMITX(0x1ff);\n}\n\n"
  },
  {
    "path": "ai/sand/sand.fdh",
    "content": "//hash:00b4d2dc\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-----------------[referenced from ai/sand/sand.cpp]----------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//-----------------[referenced from ai/sand/sand.cpp]----------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//-----------------[referenced from ai/sand/sand.cpp]----------------//\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys);\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from ai/sand/sand.cpp]----------------//\nvoid ai_animate2(Object *o);\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in ai/sand/sand.cpp */\n\n//-----------------[referenced from ai/sand/sand.cpp]----------------//\nvoid ai_polish(Object *o);\nvoid ondeath_polish(Object *o);\nvoid ai_polishbaby(Object *o);\nvoid ai_sandcroc(Object *o);\nvoid ai_sunstone(Object *o);\nvoid ai_crow(Object *o);\nvoid ai_crowwithskull(Object *o);\nvoid ai_skullhead(Object *o);\nvoid ai_skullhead_carried(Object *o);\nvoid aftermove_skullhead_carried(Object *o);\nvoid ai_skeleton_shot(Object *o);\nvoid ai_armadillo(Object *o);\nvoid ai_skullstep(Object *o);\nvoid ai_skullstep_foot(Object *o);\nvoid skullstep_do_step(Object *o, Object *skull, int angle);\nvoid ai_skeleton(Object *o);\nvoid ai_curlys_mimigas(Object *o);\n\n\n/* located in ai/sand/puppy.cpp */\n\n//-----------------[referenced from ai/sand/sand.cpp]----------------//\nvoid ai_zzzz_spawner(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------------[referenced from ai/sand/sand.cpp]----------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/sand/sand.cpp]----------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/sand/sand.cpp]----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/sand/toroko_frenzied.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"toroko_frenzied.fdh\"\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_TOROKO_FRENZIED, ai_toroko_frenzied);\n\t\n\tONTICK(OBJ_TOROKO_BLOCK, ai_toroko_block);\n\tAFTERMOVE(OBJ_TOROKO_BLOCK, aftermove_toroko_block);\n\t\n\tONTICK(OBJ_TOROKO_FLOWER, ai_toroko_flower);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_toroko_frenzied(Object *o)\n{\nObject *block = o->linkedobject;\n\n#define SPAWNBLOCK\t\\\n{\t\t\t\t\t\\\n\tblock = CreateObject(0, 0, OBJ_TOROKO_BLOCK);\t\\\n\tblock->PushBehind(o);\t\t\t\t\t\t\\\n\tblock->linkedobject = o;\t\t\t\t\t\\\n\to->linkedobject = block;\t\t\t\t\\\n\tblock->flags &= ~FLAG_INVULNERABLE;\t\t\\\n}\n#define THROWBLOCK\t\\\n{\t\t\t\\\n\tblock->x += (16 << CSF) * ((o->dir==RIGHT) ? 1 : -1);\t\\\n\tblock->y += (9 << CSF);\t\\\n\tblock->flags |= FLAG_INVULNERABLE;\t\t\\\n\tThrowObjectAtPlayer(block, 1, 0x900);\t\t\\\n\to->linkedobject = block->linkedobject = NULL;\t\\\n\tsound(SND_EM_FIRE);\t\t\\\n}\n\n#define HOLDBRICKTIME\t\t30\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\t\to->frame = 9;\n\t\t\to->flags &= ~(FLAG_SCRIPTONACTIVATE | FLAG_SHOOTABLE | FLAG_IGNORE_SOLID);\n\t\tcase 1:\t\t// wait a sec before morphing\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 2;\n\t\t\t\to->frame = 8;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// morph into big toroko\n\t\t\tANIMATE(0, 9, 10);\n\t\t\tif (++o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = 0;\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// rest a moment, then jump\n\t\t\to->frame = 1;\n\t\t\tif (++o->timer > 5)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// wait a moment then ATTACK!!\n\t\t\to->state = 11;\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->timer = random(20, 130);\n\t\t\to->xinertia = 0;\n\t\tcase 11:\n\t\t\tFACEPLAYER;\n\t\t\tANIMATE(4, 0, 1);\n\t\t\t///FIXME:: I think Toroko does not like fireball either?\n\t\t\tif (o->frame==0 && (sound_is_playing(SND_MISSILE_HIT) /*|| sound_is_playing(0)*/))\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t}\n\t\t\t\n\t\t\tif (!o->timer)\n\t\t\t{\n\t\t\t\to->state = (random(0, 1) ? 20 : 50);\n\t\t\t}\n\t\t\telse o->timer--;\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// init for a jump\n\t\t\to->state = 21;\n\t\t\to->frame = 2;\n\t\t\to->timer = 0;\n\t\tcase 21:\t// preparing to jump\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->state = 22;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 3;\n\t\t\t\to->yinertia = -0x5ff;\n\t\t\t\tXMOVE(0x200);\n\t\t\t}\n\t\tbreak;\n\t\tcase 22:\t// jumping up\n\t\t\tif (++o->timer > 10) { o->state = 23; o->timer = 0; o->frame = 6; SPAWNBLOCK; }\n\t\tbreak;\n\t\tcase 23:\t// preparing to throw block\n\t\t\tif (++o->timer > HOLDBRICKTIME) { o->state = 24; o->timer = 0; o->frame = 7; THROWBLOCK; }\n\t\t\tFACEPLAYER;\n\t\tbreak;\n\t\tcase 24:\t// threw block\n\t\t\tif (++o->timer > 3) { o->state = 25; o->frame = 3; }\n\t\tbreak;\n\t\tcase 25:\t// coming back down\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 26;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 2;\n\t\t\t\tsound(SND_QUAKE);\n\t\t\t\tgame.quaketime = 20;\n\t\t\t}\n\t\tbreak;\n\t\tcase 26:\t// landed\n\t\t\to->xinertia *= 8;\n\t\t\to->xinertia /= 9;\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 50:\t// throw a block (standing on ground)\n\t\t\to->state = 51;\n\t\t\to->timer = 0;\n\t\t\to->frame = 4;\n\t\t\tSPAWNBLOCK;\n\t\tcase 51:\n\t\t\tif (++o->timer > HOLDBRICKTIME)\n\t\t\t{\n\t\t\t\to->state = 52;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 5;\n\t\t\t\tTHROWBLOCK;\n\t\t\t}\n\t\t\tFACEPLAYER;\n\t\tbreak;\n\t\tcase 52:\n\t\t\tif (++o->timer > 3) { o->state = 10; o->frame = 0; }\n\t\tbreak;\n\t\t\n\t\tcase 100:\t\t// defeated (set by Script On Death)\n\t\t\to->frame = 3;\n\t\t\to->state = 101;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\tSmokeClouds(o, 8, 8, 8);\n\t\tcase 101:\t\t// wait till fall to ground\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 102;\n\t\t\t\to->frame = 2;\n\t\t\t\to->timer = 0;\n\t\t\t\tsound(SND_QUAKE);\n\t\t\t\tgame.quaketime = 20;\n\t\t\t}\n\t\tbreak;\n\t\tcase 102:\t\t// crouching & smoking\n\t\t\to->xinertia *= 8; o->xinertia /= 9;\n\t\t\tif (++o->timer > 50) { o->state = 103; o->timer = 0; o->frame = 10; }\n\t\tbreak;\n\t\tcase 103:\t\t// looks pained\n\t\t\tif (++o->timer > 50) { o->state = 104; o->timer = 0; o->frame = 9; }\n\t\tbreak;\n\t\tcase 104:\t\t// morphing back into normal toroko\n\t\t\to->frame = (o->frame==9) ? 10:9;\n\t\t\tif (++o->timer > 100) { o->state = 105; o->timer = 0; o->frame = 9; }\n\t\tbreak;\n\t\tcase 105:\t\t// back to normal\n\t\t\tif (++o->timer > 50) { o->state = 106; o->animtimer = 0; o->frame = 11; }\n\t\tbreak;\n\t\tcase 106:\t\t// red goes out of her eyes, she falls down\n\t\t\tif (++o->animtimer > 50)\n\t\t\t{\t// collapse\n\t\t\t\to->animtimer = 0;\n\t\t\t\tif (++o->frame > 12) o->frame = 12;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 140:\t\t// disappear\n\t\t\to->state = 141;\n\t\t\to->timer = 0;\n\t\t\to->frame = 12;\n\t\t\tsound(SND_TELEPORT);\n\t\tcase 141:\n\t\t\to->invisible ^= 1;\n\t\t\tif (++o->timer > 100)\n\t\t\t{\n\t\t\t\t// normal SmokeClouds() doesn't spawn in the right place because the sprite\n\t\t\t\t// is still sized for big toroko, so I made an Action Point for this frame.\n\t\t\t\tSmokePuff(o->ActionPointX(), o->ActionPointY());\n\t\t\t\tSmokePuff(o->ActionPointX(), o->ActionPointY());\n\t\t\t\tSmokePuff(o->ActionPointX(), o->ActionPointY());\n\t\t\t\tSmokePuff(o->ActionPointX(), o->ActionPointY());\n\t\t\t\to->Delete();\n\t\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state > 100 && o->state <= 105)\n\t{\n\t\tif ((o->timer % 9)==1)\n\t\t{\n\t\t\tSmokeClouds(o, 1, 8, 8);\n\t\t}\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// the blocks Frenzied Toroko throws\nvoid ai_toroko_block(Object *o)\n{\nint hit;\n\to->frame ^= 1;\n\t\n\t// if he's still holding us, just let the _am routine stick us to his action point\n\tif (o->linkedobject) return;\n\t\n\thit = 0;\n\tif (o->xinertia < 0) hit = o->blockl;\n\telse if (o->xinertia > 0) hit = o->blockr;\n\t\n\tif (o->yinertia < 0) hit |= o->blocku;\n\telse if (o->yinertia > 0) hit |= o->blockd;\n\t\n\tif (hit)\n\t{\n\t\tSmokeClouds(o, 6, 8, 8);\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_FISHY);\n\t\tsound(SND_BLOCK_DESTROY);\n\t\t\n\t\to->ChangeType(OBJ_TOROKO_FLOWER);\n\t\to->frame = 0;\n\t\to->state = 20;\n\t\to->xinertia = 0;\n\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\to->flags |= FLAG_SHOOTABLE;\n\t\to->BringToFront();\t\t// block was behind toro, but flowers are in front\n\t}\n}\n\nvoid aftermove_toroko_block(Object *o)\n{\n\tif (o->linkedobject)\n\t\taftermove_StickToLinkedActionPoint(o);\n}\n\nvoid ai_toroko_flower(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 10:\n\t\t\to->state = 11;\n\t\t\to->timer = o->frame = 0;\n\t\tcase 11:\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = 12;\n\t\t\t\to->frame = 1;\n\t\t\t\to->animtimer = 0;\n\t\t\t}\n\t\tbreak;\n\t\tcase 12:\n\t\t\tANIMATE_FWD(8);\n\t\t\tif (o->frame == 3)\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t\to->yinertia = -0x200;\n\t\t\t\to->xinertia = (o->x > player->x) ? -0x200 : 0x200;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// falling/jumping\n\t\t\tif (o->yinertia > -0x80) o->frame = 4; else o->frame = 3;\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->frame = 2;\n\t\t\t\to->state = 21;\n\t\t\t\to->timer = o->xinertia = 0;\n\t\t\t\tsound(SND_THUD);\n\t\t\t}\n\t\tbreak;\n\t\tcase 21:\n\t\t\tif (++o->timer > 10) { o->state = 10; o->frame = 0; }\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\n\n\n"
  },
  {
    "path": "ai/sand/toroko_frenzied.fdh",
    "content": "//hash:d1502efe\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//------------[referenced from ai/sand/toroko_frenzied.cpp]----------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//------------[referenced from ai/sand/toroko_frenzied.cpp]----------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//------------[referenced from ai/sand/toroko_frenzied.cpp]----------//\nvoid ThrowObjectAtPlayer(Object *o, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//------------[referenced from ai/sand/toroko_frenzied.cpp]----------//\nvoid aftermove_StickToLinkedActionPoint(Object *o);\n\n\n/* located in ai/sand/toroko_frenzied.cpp */\n\n//------------[referenced from ai/sand/toroko_frenzied.cpp]----------//\nvoid ai_toroko_frenzied(Object *o);\nvoid ai_toroko_block(Object *o);\nvoid aftermove_toroko_block(Object *o);\nvoid ai_toroko_flower(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//------------[referenced from ai/sand/toroko_frenzied.cpp]----------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nObject *SmokePuff(int x, int y);\n\n\n/* located in sound/sound.cpp */\n\n//------------[referenced from ai/sand/toroko_frenzied.cpp]----------//\nvoid sound(int snd);\nbool sound_is_playing(int snd);\n\n\n/* located in common/misc.cpp */\n\n//------------[referenced from ai/sand/toroko_frenzied.cpp]----------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/stdai.h",
    "content": "\n#ifndef _STDAI_H\n#define _STDAI_H\n\n#include \"../nx.h\"\n\nextern InitList AIRoutines;\n\n#define ONTICK(OBJTYPE, FUNCTION)\t\tobjprop[OBJTYPE].ai_routines.ontick = FUNCTION;\n#define ONDEATH(OBJTYPE, FUNCTION)\t\tobjprop[OBJTYPE].ai_routines.ondeath = FUNCTION;\n#define AFTERMOVE(OBJTYPE, FUNCTION)\tobjprop[OBJTYPE].ai_routines.aftermove = FUNCTION;\n#define ONSPAWN(OBJTYPE, FUNCTION)\t\tobjprop[OBJTYPE].ai_routines.onspawn = FUNCTION;\n\n#define GENERIC_NPC(O)\t\\\n{\t\\\n\tONSPAWN(O, onspawn_generic_npc);\t\\\n\tONTICK(O, ai_generic_npc);\t\\\n}\n\n#define GENERIC_NPC_NOFACEPLAYER(O)\t\\\n{\t\\\n\tONSPAWN(O, onspawn_generic_npc);\t\\\n\tONTICK(O, ai_generic_npc_nofaceplayer);\t\\\n}\n\nvoid aftermove_StickToLinkedActionPoint(Object *o);\nvoid onspawn_set_frame_from_id2(Object *o);\nvoid onspawn_snap_to_ground(Object *o);\nvoid ai_generic_angled_shot(Object *o);\n\nvoid ai_generic_npc(Object *o);\nvoid ai_generic_npc_nofaceplayer(Object *o);\nvoid onspawn_generic_npc(Object *o);\n\nvoid ai_animate1(Object *o);\nvoid ai_animate2(Object *o);\nvoid ai_animate3(Object *o);\nvoid ai_animate4(Object *o);\nvoid ai_animate5(Object *o);\n\nvoid KillObjectsOfType(int type);\nvoid DeleteObjectsOfType(int type);\n\n#endif\n"
  },
  {
    "path": "ai/sym/smoke.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"smoke.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_SMOKE_CLOUD, ai_smokecloud);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// spawn a single smoke puff at x,y and heading off in a random direction\nObject *SmokePuff(int x, int y)\n{\n\tObject *o = CreateObject(x, y, OBJ_SMOKE_CLOUD);\n\tvector_from_angle(random(0,255), random(0x200,0x5ff), &o->xinertia, &o->yinertia);\n\treturn o;\n}\n\n// spawn a cloud of smoke centered around object o and starting within \"range\" distance.\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind)\n{\n\tSmokeXY(o->CenterX(), o->CenterY(), nclouds, rangex, rangey, push_behind);\n}\n\n\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind)\n{\nObject *s;\n\n\tfor(int i=0;i<nclouds;i++)\n\t{\n\t\ts = SmokePuff(x + (random(-rangex, rangex) << CSF), \\\n\t\t\t \t      y + (random(-rangey, rangey) << CSF));\n\t\t\n\t\tif (push_behind)\n\t\t\ts->PushBehind(push_behind);\n\t}\n}\n\n\n// spawns smoke from the given side of the object,\n// as if it the object had smacked into something.\n// for example if an object smashed into ground you could pass DOWN in dir.\nvoid SmokeSide(Object *o, int nclouds, int dir)\n{\nint xmin, xmax, ymin, ymax;\nint xi_min, xi_max, yi_min, yi_max;\nstatic const int SSLOW = 0x155;\nstatic const int SFAST = 0x600;\n\n\tswitch(dir)\n\t{\n\t\tcase UP:\n\t\tcase DOWN:\n\t\t{\n\t\t\txmin = 0;\n\t\t\txmax = o->Width();\n\t\t\t\n\t\t\txi_min = -SSLOW;\n\t\t\txi_max = SSLOW;\n\t\t\t\n\t\t\tif (dir == UP)\n\t\t\t{\n\t\t\t\tymin = ymax = 0;\n\t\t\t\tyi_min = 0;\n\t\t\t\tyi_max = SFAST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tymin = ymax = (o->Height() - (2<<CSF));\n\t\t\t\tyi_min = -SFAST;\n\t\t\t\tyi_max = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase LEFT:\n\t\tcase RIGHT:\n\t\t{\n\t\t\tymin = 0;\n\t\t\tymax = o->Height();\n\t\t\t\n\t\t\tyi_min = -SSLOW;\n\t\t\tyi_max = SSLOW;\n\t\t\t\n\t\t\tif (dir == LEFT)\n\t\t\t{\n\t\t\t\txmin = xmax = 0;\n\t\t\t\txi_min = 0;\n\t\t\t\txi_max = SFAST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\txmin = xmax = (o->Width() - (2<<CSF));\n\t\t\t\txi_min = -SFAST;\n\t\t\t\txi_max = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase CENTER:\n\t\t{\n\t\t\txmin = 0; xmax = o->Width();\n\t\t\tymin = 0; ymax = o->Height();\n\t\t\t\n\t\t\txi_min = -SSLOW; xi_max = SSLOW;\n\t\t\tyi_min = -SSLOW; yi_max = 0;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tfor(int i=0;i<nclouds;i++)\n\t{\n\t\tCreateObject(o->x + random(xmin, xmax),\n\t\t\t\t\t o->y + random(ymin, ymax),\n\t\t\t\t\t OBJ_SMOKE_CLOUD,\n\t\t\t\t\t random(xi_min, xi_max),\n\t\t\t\t\t random(yi_min, yi_max));\n\t}\n}\n\nvoid SmokeCloudsSlow(int x, int y, int nclouds)\n{\n\tfor(int i=0;i<nclouds;i++)\n\t{\n\t\tCreateObject(x, y, OBJ_SMOKE_CLOUD,\n\t\t\t\t\trandom(-0x200, 0x200),\n\t\t\t\t\trandom(-0x200, 0x200));\n\t}\n}\n\nvoid SmokeBoomUp(Object *o)\n{\n\tfor(int i=0;i<8;i++)\n\t{\n\t\tCreateObject(o->CenterX() + random(-16<<CSF, 16<<CSF),\n\t\t\t\t\t o->CenterY() + random(-16<<CSF, 16<<CSF),\n\t\t\t\t\t OBJ_SMOKE_CLOUD,\n\t\t\t\t\t random(-0x155, 0x155),\n\t\t\t\t\t random(-0x600, 0));\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_smokecloud(Object *o)\n{\n\tif (!o->state)\n\t{\n\t\tif (!random(0, 1)) o->frame = 1;\n\t\to->state = 1;\n\t}\n\t\n\tif (++o->animtimer >= 5)\n\t{\n\t\to->animtimer = 0;\n\t\tif (++o->frame >= sprites[o->sprite].nframes)\n\t\t\to->Delete();\n\t}\n\t\n\to->xinertia *= 20; o->xinertia /= 21;\n\to->yinertia *= 20; o->yinertia /= 21;\n}\n\n\n\n"
  },
  {
    "path": "ai/sym/smoke.fdh",
    "content": "//hash:19c7b1dc\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-----------------[referenced from ai/sym/smoke.cpp]----------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in trig.cpp */\n\n//-----------------[referenced from ai/sym/smoke.cpp]----------------//\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------------[referenced from ai/sym/smoke.cpp]----------------//\nObject *SmokePuff(int x, int y);\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\nvoid SmokeSide(Object *o, int nclouds, int dir);\nvoid SmokeCloudsSlow(int x, int y, int nclouds);\nvoid SmokeBoomUp(Object *o);\nvoid ai_smokecloud(Object *o);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/sym/smoke.cpp]----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/sym/sym.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"sym.fdh\"\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_NULL, ai_null);\n\tONTICK(OBJ_HVTRIGGER, ai_hvtrigger);\n\t\n\tONTICK(OBJ_XP, ai_xp);\n\tONTICK(OBJ_HEART, ai_powerup);\n\tONTICK(OBJ_HEART3, ai_powerup);\n\tONTICK(OBJ_MISSILE, ai_powerup);\n\tONTICK(OBJ_MISSILE3, ai_powerup);\n\t\n\tONTICK(OBJ_HIDDEN_POWERUP, ai_hidden_powerup);\n\t\n\tONTICK(OBJ_DOOR, ai_door);\n\tONTICK(OBJ_LARGEDOOR, ai_largedoor);\n\t\n\tONTICK(OBJ_SAVE_POINT, ai_save_point);\n\tONTICK(OBJ_RECHARGE, ai_recharge);\n\t\n\tONTICK(OBJ_CHEST_CLOSED, ai_chest_closed);\n\tONTICK(OBJ_CHEST_OPEN, ai_chest_open);\n\t\n\tONTICK(OBJ_TELEPORTER, ai_teleporter);\n\tONTICK(OBJ_TELEPORTER_LIGHTS, ai_animate2);\n\t\n\tONTICK(OBJ_COMPUTER, ai_animate4);\n\tONTICK(OBJ_TERMINAL, ai_terminal);\n\t\n\tONTICK(OBJ_LIFE_CAPSULE, ai_animate4);\n\tONTICK(OBJ_XP_CAPSULE, ai_xp_capsule);\n\t\n\tONTICK(OBJ_SPRINKLER, ai_sprinkler);\n\tONTICK(OBJ_WATER_DROPLET, ai_water_droplet);\n\tONTICK(OBJ_LAVA_DROPLET, ai_water_droplet);\n\tONTICK(OBJ_DROPLET_SPAWNER, ai_droplet_spawner);\n\t\n\tONTICK(OBJ_FAN_UP, ai_fan_vert);\n\tONTICK(OBJ_FAN_DOWN, ai_fan_vert);\n\tONTICK(OBJ_FAN_LEFT, ai_fan_hoz);\n\tONTICK(OBJ_FAN_RIGHT, ai_fan_hoz);\n\tONTICK(OBJ_FAN_DROPLET, ai_fan_droplet);\n\t\n\tONTICK(OBJ_PRESS, ai_press);\n\tONTICK(OBJ_HIDDEN_SPARKLE, ai_animate4);\n\tONTICK(OBJ_LIGHTNING, ai_lightning);\n\t\n\tONTICK(OBJ_STRAINING, ai_straining);\n\t\n\tONTICK(OBJ_BUBBLE_SPAWNER, ai_bubble_spawner);\n\t\n\tONTICK(OBJ_CHINFISH, ai_chinfish);\n\tONTICK(OBJ_FIREPLACE, ai_fireplace);\n\t\n\tONTICK(OBJ_SMOKE_DROPPER, ai_smoke_dropper);\n\t\n\tONSPAWN(OBJ_SPIKE_SMALL, onspawn_spike_small);\n\t\n\tONTICK(OBJ_SCROLL_CONTROLLER, ai_scroll_controller);\n\tONTICK(OBJ_QUAKE, ai_quake);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// ai routine for OBJ_NULL\nvoid ai_null(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\to->state = 1;\n\t\t\n\t\t// FLAG_FACES_RIGHT is causes the object to drop down one tile when actually\n\t\t// seen in the game. I think this was used to make map editing easier in\n\t\t// places where things were getting really crouded with entities.\n\t\tif (o->dir == RIGHT)\n\t\t{\n\t\t\to->y += (TILE_H << CSF);\n\t\t\t\n\t\t\t// precedence hack for Boulder Chamber\n\t\t\tif (game.curmap == STAGE_BOULDER_CHAMBER)\n\t\t\t{\n\t\t\t\tObject *boulder = Objects::FindByType(OBJ_BOULDER);\n\t\t\t\tif (boulder) o->PushBehind(boulder);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// H/V Trigger\n//\n// By default, triggers on vertical axis.\n// If set to face right, it triggers on horizontal axis instead.\n//\n// If FLAG_SCRIPTONTOUCH is set, projects an invisible horizontal or vertical \"Beam\"\n// which is blocked by solid bricks, and only by intersecting the beam\n// can the player trip the trigger.\n//\nvoid ai_hvtrigger(Object *o)\n{\n\t// init: find bounding box within which we will trigger\n\tif (o->state == 0)\n\t{\n\t\to->state = 1;\n\t\to->hvt.is_horizontal = (o->dir == LEFT);\n\t\t\n\t\t// start with a trigger box around object which\n\t\t// encloses only the object's tile itself.\n\t\to->hvt.x1 = o->x;\n\t\to->hvt.y1 = o->y;\n\t\to->hvt.x2 = o->x + ((TILE_W - 1) << CSF);\n\t\to->hvt.y2 = o->y + ((TILE_H - 1) << CSF);\n\t\t\n\t\t// now expand the trigger box as appropriate\n\t\tif (o->flags & FLAG_SCRIPTONTOUCH)\n\t\t{\n\t\t\to->flags &= ~FLAG_SCRIPTONTOUCH;\n\t\t\thv_project_beam(o);\n\t\t}\n\t\telse if (o->hvt.is_horizontal)\n\t\t{\n\t\t\to->hvt.x1 = 0;\n\t\t\to->hvt.x2 = (map.xsize * TILE_W) << CSF;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->hvt.y1 = 0;\n\t\t\to->hvt.y2 = (map.ysize * TILE_H) << CSF;\n\t\t}\n\t}\n\t\n\tif (game.debug.DrawBoundingBoxes)\n\t\tAddDebugMark(o->hvt.x1, o->hvt.y1, o->hvt.x2, o->hvt.y2, DM_BOX, 255, 0, 255);\n\t\n\tint px = player->CenterX();\n\tif (px > o->hvt.x2) return;\n\tif (px < o->hvt.x1) return;\n\t\n\tint py = player->CenterY();\n\tif (py > o->hvt.y2) return;\n\tif (py < o->hvt.y1) return;\n\t\n\tif (game.debug.DrawBoundingBoxes)\n\t\tAddDebugMark(o->hvt.x1, o->hvt.y1, o->hvt.x2, o->hvt.y2, DM_BOX, 0, 255, 0);\n\t\n\t// ok then, we can trigger, except for:\n\tif (GetCurrentScript() == -1 &&\t\t// no override other scripts\n\t\tgame.switchstage.mapno == -1)\t// no repeat exec after <TRA\n\t{\n\t\tstat(\"HVTrigger %04d (%08x) activated\", o->id2, o);\n\t\tStartScript(o->id2);\n\t}\n}\n\n// project the Option 1 beam and set the hvtrigger's y1/y2 or x1/x2\nstatic void hv_project_beam(Object *o)\n{\nint tilex = (o->x >> CSF) / TILE_W;\nint tiley = (o->y >> CSF) / TILE_H;\nint x, y, t;\n\t\n\tif (!o->hvt.is_horizontal)\n\t{\n\t\tfor(y=tiley;y>=0;y--)\n\t\t{\n\t\t\tt = map.tiles[tilex][y];\n\t\t\tif (tileattr[t] & TA_SOLID) { y++; break; }\n\t\t}\n\t\t\n\t\to->hvt.y1 = (y * TILE_H) << CSF;\n\t\t\n\t\tfor(y=tiley;y<map.ysize;y++)\n\t\t{\n\t\t\tt = map.tiles[tilex][y];\n\t\t\tif (tileattr[t] & TA_SOLID) { y--; break; }\n\t\t}\n\t\t\n\t\to->hvt.y2 = ((y * TILE_H) + (TILE_H - 1)) << CSF;\n\t}\n\telse\n\t{\n\t\tfor(x=tilex;x>=0;x--)\n\t\t{\n\t\t\tt = map.tiles[x][tiley];\n\t\t\tif (tileattr[t] & TA_SOLID) { x++; break; }\n\t\t}\n\t\t\n\t\to->hvt.x1 = (x * TILE_W) << CSF;\n\t\t\n\t\tfor(x=tilex;x<map.xsize;x++)\n\t\t{\n\t\t\tt = map.tiles[x][tiley];\n\t\t\tif (tileattr[t] & TA_SOLID) { x--; break; }\n\t\t}\n\t\t\n\t\to->hvt.x2 = ((x * TILE_W) + (TILE_W - 1)) << CSF;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid ai_xp(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\to->yinertia = random(-400, 0);\n\t\to->state = 1;\n\t}\n\t\n\tif (Handle_Falling_Left(o))\n\t{\t// left-falling bouncing\n\t\tif (map.scrolltype == BK_FASTLEFT_LAYERS)\t// as opposed to Ironhead (BK_FASTLEFT)\n\t\t{\n\t\t\tif (o->blockl)\n\t\t\t{\n\t\t\t\tif (o->onscreen || pdistly((SCREEN_HEIGHT - (SCREEN_HEIGHT / 3)) << CSF))\n\t\t\t\t\tsound(SND_XP_BOUNCE);\n\t\t\t\t\n\t\t\t\to->xinertia = 0x100;\n\t\t\t\to->yinertia *= 2;\n\t\t\t\to->yinertia /= 3;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blocku || o->blockd)\n\t\t\t{\n\t\t\t\to->yinertia = -o->yinertia;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\t// normal bouncing\n\t\tif (o->blockd)\n\t\t{\n\t\t\t// disappear if we were spawned embedded in ground\n\t\t\t// added for XP spawned by sandcrocs\n\t\t\tif (o->blocku || (o->blockl && o->blockr))\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->onscreen || pdistlx((SCREEN_WIDTH - (SCREEN_WIDTH / 3)) << CSF))\n\t\t\t\tsound(SND_XP_BOUNCE);\n\t\t\t\n\t\t\to->yinertia = -0x280;\n\t\t\to->xinertia *= 2;\n\t\t\to->xinertia /= 3;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->yinertia += 42;\n\t\t}\n\t\t\n\t\tif (o->blockl || o->blockr)\n\t\t{\n\t\t\to->xinertia = -o->xinertia;\n\t\t}\n\t}\n\t\n\t\n\tif (++o->animtimer >= 3)\n\t{\n\t\to->animtimer = 0;\n\t\tif (++o->frame > 5) o->frame = 0;\n\t}\n\t\n\tif (++o->timer > 0x1f4)\n\t{\n\t\to->Delete();\n\t\treturn;\n\t}\n\telse if (o->timer > 0x1f2)\n\t{\t// twinkle before disappearing\n\t\to->frame = 0;\n\t\to->invisible = 0;\n\t\treturn;\n\t}\n\telse if (o->timer > 0x190)\n\t{\n\t\to->invisible = (o->timer & 2);\n\t}\n\t\n\t// let player get it!\n\tif (hitdetect(o, player))\n\t{\n\t\tswitch(o->sprite)\n\t\t{\n\t\t\tcase SPR_XP_SMALL: AddXP(XP_SMALL_AMT); break;\n\t\t\tcase SPR_XP_MED: AddXP(XP_MED_AMT); break;\n\t\t\tcase SPR_XP_LARGE: AddXP(XP_LARGE_AMT); break;\n\t\t}\n\t\t\n\t\to->Delete();\n\t}\n}\n\n// Hearts and Missiles\nvoid ai_powerup(Object *o)\n{\n\t// if o->state == 0, then was present in map; not dropped by an enemy...lasts forever\n\tif (o->state > 0)\n\t{\n\t\tHandle_Falling_Left(o);\n\t\t\n\t\tswitch(o->state)\n\t\t{\n\t\t\tcase 1:\t\t\t// animating\n\t\t\tcase 101:\t\t// animating (in left-fall mode)\n\t\t\t\tif (++o->timer >= 256) { o->timer = 0; o->state++; }\n\t\t\t\t\t\t\t   else break;\n\t\t\tcase 2:\t\t\t// start blinking--we're about to go away!!\n\t\t\tcase 102:\t\t// blinking (in left-fall mode)\n\t\t\t\tif (++o->timer > 48)\n\t\t\t\t{\n\t\t\t\t\teffect(o->CenterX()-(1<<CSF), o->CenterY()-(1<<CSF), EFFECT_BONUSFLASH);\n\t\t\t\t\to->Delete();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\to->invisible = (o->timer2 & 2);\n\t\t\t\to->timer2++;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// animation/frame selection\n\t\tif (++o->animtimer > 2)\n\t\t{\n\t\t\to->animtimer = 0;\n\t\t\to->frame ^= 1;\n\t\t}\n\t}\n\telse if (!o->state)\n\t{\t// adjust position of map-spawned missiles\n\t\tif (o->type == OBJ_MISSILE)\n\t\t{\n\t\t\to->x += (3 << CSF);\n\t\t\to->y += (4 << CSF);\n\t\t}\n\t\to->state = -1;\n\t}\n\t\n\t// hand over the powerup if player touches it\n\tif (hitdetect(o, player))\n\t{\n\t\tswitch(o->type)\n\t\t{\n\t\t\tcase OBJ_HEART:  sound(SND_HEALTH_REFILL); AddHealth(2); break;\n\t\t\tcase OBJ_HEART3: sound(SND_HEALTH_REFILL); AddHealth(6); break;\n\t\t\t\n\t\t\tcase OBJ_MISSILE:\n\t\t\tcase OBJ_MISSILE3:\n\t\t\t{\n\t\t\t\tint amt = (o->type == OBJ_MISSILE3) ? 3 : 1;\n\t\t\t\tint wpn = (player->weapons[WPN_SUPER_MISSILE].hasWeapon) ? \\\n\t\t\t\t\t\tWPN_SUPER_MISSILE : WPN_MISSILE;\n\t\t\t\t\n\t\t\t\tsound(SND_GET_MISSILE);\n\t\t\t\tAddAmmo(wpn, amt);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\to->Delete();\n\t}\n}\n\n\n\nbool Handle_Falling_Left(Object *o)\n{\n\tif (map.scrolltype == BK_FASTLEFT || \\\n\t\tmap.scrolltype == BK_FASTLEFT_LAYERS)\n\t{\n\t\tif (o->state < 100)\t\t\t// initilize\n\t\t{\n\t\t\to->state += 100;\n\t\t\to->yinertia = random(-0x20, 0x20);\n\t\t\to->xinertia = random(127, 256);\n\t\t\t//o->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t}\n\t\t\n\t\to->xinertia -= 0x08;\n\t\tif (o->xinertia < -0x600) o->xinertia = -0x600;\n\t\t\n\t\tif (map.scrolltype == BK_FASTLEFT)\n\t\t{\n\t\t\tif (o->x < ((5 * TILE_W) << CSF)) o->Delete();\t\t// went off screen in IronH\n\t\t}\n\t\t\n\t\tif (o->blockl && o->xinertia <= 0) o->xinertia = 0x40;\n\t\tif (o->blocku && o->yinertia <= 0) o->yinertia = 0x40;\n\t\tif (o->blockd && o->yinertia >= 0) o->yinertia = -0x40;\n\t\t\n\t\treturn 1;\n\t}\n\t\n\treturn 0;\n}\n\n\n// hidden heart/missile\nvoid ai_hidden_powerup(Object *o)\n{\n\tif (o->hp < 990)\n\t{\n\t\tSmokeBoomUp(o);\n\t\tsound(SND_EXPL_SMALL);\n\t\t\n\t\to->ChangeType((o->dir == LEFT) ? OBJ_HEART : OBJ_MISSILE);\n\t\tif (o->type == OBJ_HEART)\n\t\t{\n\t\t\to->x += (3 << CSF);\n\t\t\to->y += (4 << CSF);\n\t\t}\n\t}\n}\n\n\nvoid ai_xp_capsule(Object *o)\n{\n\tANIMATE(4, 0, 1);\n\t\n\tif (o->hp < 100)\n\t{\n\t\to->SpawnXP(o->id1);\n\t\tSmokeClouds(o, 8, 2, 2);\n\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\n\t\to->Delete();\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_save_point(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\tsmoke_if_bonus_item(o);\n\t\to->flags |= FLAG_SCRIPTONACTIVATE;\t// needed for SP after Sisters fight\n\t\to->state = 1;\n\t}\n\t\n\tai_animate3(o);\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\nvoid ai_recharge(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tsmoke_if_bonus_item(o);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\t\t// flickery animation\n\t\t{\n\t\t\tint x = random(0, 30);\n\t\t\t\n\t\t\tif (x < 10) o->state = 2;\n\t\t\telse if (x < 25) o->state = 3;\n\t\t\telse o->state = 4;\n\t\t\t\n\t\t\to->timer = random(16, 64);\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2: o->frame = 0; break;\t\t\t\t// solid on\n\t\t\n\t\tcase 3:\t\t\t\t\t\t\t\t\t\t// flickery\n\t\t\to->animtimer++;\n\t\t\to->frame = (o->animtimer & 1);\n\t\tbreak;\n\t\t\n\t\tcase 4: o->frame = 1; break;\t\t\t\t// solid off\n\t}\n\t\n\tif (--o->timer <= 0)\n\t\to->state = 1;\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\nvoid ai_chest_closed(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\tsmoke_if_bonus_item(o);\n\t\to->flags |= FLAG_SCRIPTONACTIVATE;\t// isn't always set\n\t\to->state = 1;\n\t\t\n\t\t// stop motion of chest spawned from Kulala\n\t\tif (settings->emulate_bugs)\n\t\t\to->xinertia = 0;\n\t}\n\t\n\t// gleaming animation\n\tif (++o->timer < 3) o->frame = 1;\n\telse if (o->timer < 6) o->frame = 2;\n\telse\n\t{\n\t\to->frame = 0;\n\t\tif (o->timer >= 80) o->timer = 0;\n\t}\n\t\n\t// need this for the big jelly that drops a chest in Weed\n\tif (o->blockd)\n\t\to->xinertia = 0;\n\t\n\t// fall\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\nvoid ai_chest_open(Object *o)\n{\n\to->flags |= FLAG_SCRIPTONACTIVATE;\n}\n\n// save points, recharges, and chests make smoke and jump in air for a moment\n// when spawned as a bonus item (e.g. after a boss fight). That they should do\n// this is indicated by the script setting it's direction to RIGHT.\nstatic void smoke_if_bonus_item(Object *o)\n{\n\tif (o->dir == RIGHT)\n\t{\n\t\tSmokeClouds(o, 4, 8, 8);\n\t\to->yinertia = -0x200;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_lightning(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->invisible = true;\n\t\t\to->state = 1;\n\t\t\t\n\t\t\tif (o->dir == RIGHT)\n\t\t\t\tflashscreen.Start();\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->invisible = false;\n\t\t\t\tsound(SND_LIGHTNING_STRIKE);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\tif (++o->animtimer > 2)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\t\n\t\t\t\tif (o->frame >= 3)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0;i<5;i++)\n\t\t\t\t\t\tSmokePuff(o->ActionPointX(), o->ActionPointY());\n\t\t\t\t\t\n\t\t\t\t\teffect(o->ActionPointX(), o->ActionPointY(), EFFECT_BOOMFLASH);\n\t\t\t\t\to->Delete();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (++o->frame == 2)\n\t\t\t\t\t\to->damage = 10;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_teleporter(Object *o)\n{\n\tif (o->state==0)\n\t{\n\t\to->frame = 0;\n\t}\n\telse\n\t{\n\t\to->frame ^= 1;\n\t}\n}\n\nvoid ai_door(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->frame = (o->dir == RIGHT) ? 1:0;\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// being banged on\n\t\t\to->shaketime = 20;\n\t\t\to->state = 0;\n\t\tbreak;\n\t}\n}\n\nvoid ai_largedoor(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\t\tif (o->dir==RIGHT)\n\t\t\t{\n\t\t\t\t//o->frame = 1;\n\t\t\t\to->x -= (TILE_W << CSF);\n\t\t\t}\n\t\t\to->xmark = o->x;\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// door opens into frame\n\t\t\to->state = 11;\n\t\t\to->timer = 0;\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\to->clip_enable = 1;\n\t\tcase 11:\n\t\t{\n\t\t\tint px;\n\t\t\to->timer++;\n\t\t\tif ((o->timer & 7)==0)\n\t\t\t{\n\t\t\t\tsound(SND_QUAKE);\n\t\t\t}\n\t\t\t\n\t\t\tpx = (o->timer >> 3);\n\t\t\tif (o->dir==LEFT)\n\t\t\t{\n\t\t\t\to->x = o->xmark - (px << CSF);\n\t\t\t\to->clipx1 = px;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->x = o->xmark + (px << CSF);\n\t\t\t\to->clipx2 = (16 - px);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer==104) o->Delete();\n\t\t}\n\t}\n}\n\n\nvoid ai_press(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tif (!o->blockd)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t\t// fall\n\t\t{\n\t\t\tif (o->frame < 2)\n\t\t\t\tANIMATE_FWD(2);\n\t\t\t\n\t\t\to->yinertia += 0x20;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (o->y < player->y)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_SOLID_BRICK;\n\t\t\t\to->damage = 127;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t\t\to->damage = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\tSmokeSide(o, 4, DOWN);\n\t\t\t\tquake(10);\n\t\t\t\t\n\t\t\t\to->state = 0;\n\t\t\t\to->frame = 0;\n\t\t\t\to->damage = 0;\n\t\t\t\to->flags |= FLAG_SOLID_BRICK;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_terminal(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\tcase 1:\n\t\t\to->frame = 0;\n\t\t\tif (pdistlx(8<<CSF) && pdistly2(16<<CSF, 8<<CSF))\n\t\t\t{\n\t\t\t\tsound(SND_COMPUTER_BEEP);\n\t\t\t\to->frame = 1;\n\t\t\t\to->state = 10;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t\tANIMATE(0, 1, 2);\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n#define FAN_BLOW_FORCE\t\t0x88\n\nvoid ai_fan_vert(Object *o)\n{\n\tif (o->dir == LEFT)\n\t{\t// fan off\n\t\to->frame = 0;\n\t\treturn;\n\t}\n\t\n\tint blowdir = (o->type == OBJ_FAN_UP) ? UP : DOWN;\n\tANIMATE(0, 0, 2);\n\t\n\t// spawn droplet effects\n\tif (pdistlx(SCREEN_WIDTH << CSF) && pdistly(SCREEN_HEIGHT << CSF))\n\t{\n\t\tif (!random(0, 5))\n\t\t{\n\t\t\tint x = o->x + (random(4, 12) << CSF);\n\t\t\tint y = (blowdir == DOWN) ? o->Bottom() : o->y;\n\t\t\t\n\t\t\tObject *drop = CreateObject(x, y, OBJ_FAN_DROPLET);\n\t\t\tdrop->dir = blowdir;\n\t\t}\n\t}\n\t\n\t// blow player\n\tif (pdistlx(8 << CSF) && pdistly(96 << CSF))\n\t{\n\t\tif (blowdir == UP && player->y < o->y)\n\t\t\tplayer->yinertia -= FAN_BLOW_FORCE;\n\t\t\n\t\tif (blowdir == DOWN && player->y > o->Bottom())\n\t\t\tplayer->yinertia += FAN_BLOW_FORCE;\n\t}\n}\n\nvoid ai_fan_hoz(Object *o)\n{\n\tif (o->dir == LEFT)\n\t{\t// fan off\n\t\to->frame = 0;\n\t\treturn;\n\t}\n\t\n\tint blowdir = (o->type == OBJ_FAN_LEFT) ? LEFT : RIGHT;\n\tANIMATE(0, 0, 2);\n\t\n\t// spawn droplet effects\n\tif (pdistlx(SCREEN_WIDTH << CSF) && pdistly(SCREEN_HEIGHT << CSF))\n\t{\n\t\tif (!random(0, 5))\n\t\t{\n\t\t\tint x = (blowdir == LEFT) ? o->x : o->Right();\n\t\t\tint y = o->y + (random(4, 12) << CSF);\n\t\t\t\n\t\t\tObject *drop = CreateObject(x, y, OBJ_FAN_DROPLET);\n\t\t\tdrop->dir = blowdir;\n\t\t}\n\t}\n\t\n\t// blow player\n\tif (pdistlx(96 << CSF) && pdistly(8 << CSF))\n\t{\n\t\tif (blowdir == LEFT && player->x < o->x)\n\t\t\tplayer->xinertia -= FAN_BLOW_FORCE;\n\t\t\n\t\tif (blowdir == RIGHT && player->x > o->Right())\n\t\t\tplayer->xinertia += FAN_BLOW_FORCE;\n\t}\n}\n\n// the visible moving air current from fans\nvoid ai_fan_droplet(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\t\to->frame = random(0, 2);\n\t\t\t\n\t\t\to->xinertia = o->yinertia = 0;\n\t\t\t\n\t\t\tswitch(o->dir)\n\t\t\t{\n\t\t\t\tcase LEFT: o->xinertia = -1; break;\n\t\t\t\tcase RIGHT: o->xinertia = 1; break;\n\t\t\t\tcase UP: o->yinertia = -1; break;\n\t\t\t\tcase DOWN: o->yinertia = 1; break;\n\t\t\t}\n\t\t\t\n\t\t\to->dir = RIGHT;\t\t// so frame is correct\n\t\t\t\n\t\t\to->xinertia *= random((2 << CSF), (4 << CSF));\n\t\t\to->yinertia *= random((2 << CSF), (4 << CSF));\n\t\tcase 1:\n\t\t\tANIMATE_FWD(6);\n\t\t\tif (o->frame > 4) o->Delete();\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// Yamashita Farm and Plantation water-droplet emitter\n// throws out oodles of water splash droplets\nvoid ai_sprinkler(Object *o)\n{\n\tif (o->dir == RIGHT) return;\n\t\n\tif (++o->animtimer & 1)\n\t\to->frame ^= 1;\n\t\n\tif (pdistlx(0x28000) && pdistly(0x1E000))\n\t{\n\t\tObject *drop;\n\t\t\n\t\tdrop = CreateObject(o->CenterX() + (1<<CSF), \\\n\t\t\t\t\t\t\to->CenterY() + (1<<CSF), \\\n\t\t\t\t\t\t\tOBJ_WATER_DROPLET);\n\t\t\n\t\tdrop->xinertia = random(-(2 << CSF), (2 << CSF));\n\t\tdrop->yinertia = random(-(3 << CSF), 384);\n\t}\n}\n\n\n// generates small splash water droplets\nvoid ai_droplet_spawner(Object *o)\n{\n\tif (pdistlx(SCREEN_WIDTH << CSF) && pdistly(SCREEN_HEIGHT << CSF))\n\t{\n\t\tif (!random(0, 80))\n\t\t{\n\t\t\tCreateObject(o->x + (random(2, (TILE_W - 2)) << CSF), o->y, OBJ_WATER_DROPLET);\n\t\t}\n\t}\n}\n\n\n// small flying water droplet from splashes or sprinklers\nvoid ai_water_droplet(Object *o)\n{\nstatic const Point waterattrpoint[] = { 0, -3 };\n\n\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\n\to->yinertia += 0x20;\n\tif (o->yinertia > 0x5ff) o->yinertia = 0x5ff;\n\t\n\to->frame = random(0, 4);\n\t\n\tif (++o->timer > 10)\n\t{\n\t\tif (o->blockl || o->blockr || o->blockd || \\\n\t\t\t(o->GetAttributes(waterattrpoint, 1, NULL) & TA_WATER))\n\t\t{\n\t\t\to->Delete();\n\t\t}\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_bubble_spawner(Object *o)\n{\nObject *ko;\n\n\tif (o->dir == LEFT)\n\t{\t// spawn smoke (broken motorcycle in Grass)\n\t\tif (!random(0, 40))\n\t\t{\n\t\t\tko = CreateObject(o->x + (random(-20, 20) << CSF), o->y, OBJ_SMOKE_CLOUD);\n\t\t\tko->xinertia = 0x100;\n\t\t\tko->yinertia = -0x200;\n\t\t}\n\t}\n\telse\n\t{\t// spawn \"bubbles\" (IronH battle)\n\t\tko = CreateObject(o->x + (random(-160, 160) << CSF), \\\n\t\t\t\t\t\t  o->y + (random(-128, 128) << CSF), \\\n\t\t\t\t\t\t  OBJ_FAN_DROPLET);\n\t\t\n\t\tko->dir = RIGHT;\n\t\tko->xinertia = 0x100;\n\t}\n}\n\nvoid ai_chinfish(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t\to->yinertia = 0x88;\n\t\tcase 1:\n\t\t\to->yinertia += (o->y > o->ymark) ? -8:8;\n\t\t\tLIMITY(0x100);\n\t\t\tANIMATE(4, 0, 1);\n\t\t\tif (o->shaketime) o->frame = 2;\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_fireplace(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// burn\n\t\t\to->frame = 0;\n\t\t\to->state = 1;\n\t\t\to->invisible = 0;\n\t\tcase 1:\n\t\t\tai_animate4(o);\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// extinguished by Jellyfish Juice\n\t\t\to->state = 11;\n\t\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\t\tSmokeClouds(o, 8, 16, 16);\n\t\tcase 11:\n\t\t\to->invisible = 1;\n\t\tbreak;\n\t}\n}\n\n// straining effect from Boulder Chamber\nvoid ai_straining(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tif (o->dir == LEFT)\n\t\t\t{\t// curly's straining\n\t\t\t\to->x += (14 << CSF);\n\t\t\t\to->y -= (18 << CSF);\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// player's straining\n\t\t\t\to->x = player->x - (6 << CSF);\n\t\t\t\to->y = player->y - (2 << CSF);\n\t\t\t}\n\t\t\t\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (++o->animtimer > 8)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->frame ^= 1;\n\t\t\t\t\n\t\t\t\tif (++o->timer2 >= 8)\n\t\t\t\t\to->Delete();\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n// used by CMP to delay smoke created during a PRI until the PRI is released.\n// See the description in tsc.cpp.\nvoid ai_smoke_dropper(Object *o)\n{\n\tSmokeXY(o->x, o->y, o->timer2, TILE_W/2, TILE_H/2);\n\to->Delete();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// this object is used in a few places, such as during the Red Demon fight (last cave),\n// and during some of the end sequences. It seems to be primarily involved with providing\n// \"extra\" map scrolling modes. Generally you'll <FON on it, then set the mode you desire.\nvoid ai_scroll_controller(Object *o)\n{\n\t//debug(\"scrollctrl: state %d; dp %d; linked %08x\", o->state, o->dirparam, o->linkedobject);\n\t\n\tswitch(o->state)\n\t{\n\t\t// stay above player's head. This is used during the \"mad run\" Balcony2 stage;\n\t\t// you'll notice there is not normal scrolling during this part.\n\t\tcase 10:\n\t\t{\n\t\t\to->x = player->x;\n\t\t\to->y = player->y - (32 << CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// pan in the specified direction. used when you get the good ending\n\t\t// to pan over all the scenes from the island just before it crashes.\n\t\tcase 20:\n\t\t{\n\t\t\tswitch(o->dir)\n\t\t\t{\n\t\t\t\tcase LEFT:\to->x -= (2 << CSF); break;\n\t\t\t\tcase UP:\to->y -= (2 << CSF); break;\n\t\t\t\tcase RIGHT: o->x += (2 << CSF); break;\n\t\t\t\tcase DOWN:\to->y += (2 << CSF); break;\n\t\t\t}\n\t\t\t\n\t\t\t// player is invisible during this part. dragging him along is\n\t\t\t// what makes all the monsters, falling spikes etc react.\n\t\t\tplayer->x = o->x;\n\t\t\tplayer->y = o->y;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// stay below player.\n\t\tcase 30:\n\t\t{\n\t\t\to->x = player->x;\n\t\t\to->y = player->y + (80 << CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// stay mid-way between player and the specified object.\n\t\t// used during the Red Demon fight in Last Cave (hidden).\n\t\tcase 100:\n\t\t{\n\t\t\to->state = 101;\n\t\t\t\n\t\t\tif (o->dirparam == 0)\n\t\t\t{\n\t\t\t\to->linkedobject = game.stageboss.object;\n\t\t\t\t\n\t\t\t\tif (!o->linkedobject)\n\t\t\t\t{\n\t\t\t\t\tstaterr(\"sctrl: no stageboss object!\");\n\t\t\t\t\to->Delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->linkedobject = FindObjectByID2(o->dirparam);\n\t\t\t\t\n\t\t\t\tif (o->linkedobject)\n\t\t\t\t{\n\t\t\t\t\tstaterr(\"sctrl: successfully linked to object %08x\", o->linkedobject);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstaterr(\"sctrl: failed to link to id2 %d: object not found\", o->id2);\n\t\t\t\t\to->Delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcase 101:\n\t\t{\n\t\t\tif (o->linkedobject)\n\t\t\t{\n\t\t\t\to->x = (player->x + o->linkedobject->x) / 2;\n\t\t\t\to->y = (player->y + o->linkedobject->y) / 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n// makes a perpetual quake. used during end-run and Hell.\nvoid ai_quake(Object *o)\n{\n\tif (!settings->no_quake_in_hell || \\\n\t\t(game.curmap != STAGE_HELL1 && \\\n\t\t game.curmap != STAGE_HELL2 && \\\n\t\t game.curmap != STAGE_HELL3 && \\\n\t\t game.curmap != STAGE_HELL4 && \\\n\t\t game.curmap != STAGE_HELL42 && \\\n\t\t game.curmap != STAGE_STATUE_CHAMBER && \\\n\t\t game.curmap != STAGE_CORRIDOR && \\\n\t\t game.curmap != STAGE_SEAL_CHAMBER))\n\t{\n\t\tgame.quaketime = 10;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_generic_angled_shot(Object *o)\n{\n\t// enemies can set the shot's ttl by setting an initial timer value\n\t// after they spawn us. Or, they can leave it at zero and we\n\t// will set a default.\n\tif (o->state == 0)\n\t{\n\t\to->state = 1;\n\t\t\n\t\tif (o->timer == 0)\n\t\t\to->timer = 200;\n\t}\n\t\n\tif (o->sprite == SPR_GAUDI_FLYING_SHOT)\n\t{\n\t\tANIMATE(0, 0, sprites[o->sprite].nframes - 1);\n\t}\n\telse\n\t{\n\t\tANIMATE(2, 0, sprites[o->sprite].nframes - 1);\n\t}\n\t\n\tif (o->blockl && o->xinertia < 0) goto del;\n\tif (o->blockr && o->xinertia > 0) goto del;\n\tif (o->blocku && o->yinertia < 0) goto del;\n\tif (o->blockd && o->yinertia > 0) goto del;\n\t\n\tif (--o->timer < 0)\n\t{\n\t\tdel: ;\n\t\t\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_FISHY);\n\t\to->Delete();\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid onspawn_spike_small(Object *o)\n{\n\to->frame = o->id2;\n\t\n\t// hack to remove 2 spikes in First Cave which are\n\t// extraneous and invisible because they are embedded\n\t// in the wall, but due to slight engine differences\n\t// you can still sometimes get hurt by them in our engine.\n\tint tile = map.tiles[(o->CenterX() >> CSF) / TILE_W][(o->CenterY() >> CSF) / TILE_H];\n\tif (tileattr[tile] & TA_SOLID)\n\t{\n\t\tstat(\"onspawn_spike_small: spike %08x embedded in wall, deleting\", o);\n\t\to->Delete();\n\t}\n}\n\n\n\n\n"
  },
  {
    "path": "ai/sym/sym.fdh",
    "content": "//hash:3ee94f7a\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nbool hitdetect(Object *o1, Object *o2);\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nObject *FindObjectByID2(int id2);\n\n\n/* located in caret.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in playerstats.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nvoid AddXP(int xp, bool quiet);\nvoid AddHealth(int hp);\nvoid AddAmmo(int wpn, int ammo);\n\n\n/* located in tsc.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nint GetCurrentScript(void);\nScriptInstance *StartScript(int scriptno, int pageno);\n\n\n/* located in debug.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nvoid AddDebugMark(int x, int y, int x2, int y2, char type, uchar r, uchar g, uchar b);\n\n\n/* located in ai/ai.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nvoid ai_animate3(Object *o);\nvoid ai_animate4(Object *o);\n\n\n/* located in ai/sym/sym.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nvoid ai_null(Object *o);\nvoid ai_hvtrigger(Object *o);\nstatic void hv_project_beam(Object *o);\nvoid ai_xp(Object *o);\nvoid ai_powerup(Object *o);\nbool Handle_Falling_Left(Object *o);\nvoid ai_hidden_powerup(Object *o);\nvoid ai_xp_capsule(Object *o);\nvoid ai_save_point(Object *o);\nvoid ai_recharge(Object *o);\nvoid ai_chest_closed(Object *o);\nvoid ai_chest_open(Object *o);\nstatic void smoke_if_bonus_item(Object *o);\nvoid ai_lightning(Object *o);\nvoid ai_teleporter(Object *o);\nvoid ai_door(Object *o);\nvoid ai_largedoor(Object *o);\nvoid ai_press(Object *o);\nvoid ai_terminal(Object *o);\nvoid ai_fan_vert(Object *o);\nvoid ai_fan_hoz(Object *o);\nvoid ai_fan_droplet(Object *o);\nvoid ai_sprinkler(Object *o);\nvoid ai_droplet_spawner(Object *o);\nvoid ai_water_droplet(Object *o);\nvoid ai_bubble_spawner(Object *o);\nvoid ai_chinfish(Object *o);\nvoid ai_fireplace(Object *o);\nvoid ai_straining(Object *o);\nvoid ai_smoke_dropper(Object *o);\nvoid ai_scroll_controller(Object *o);\nvoid ai_quake(Object *o);\nvoid ai_generic_angled_shot(Object *o);\nvoid onspawn_spike_small(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nvoid SmokeBoomUp(Object *o);\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\nObject *SmokePuff(int x, int y);\nvoid SmokeSide(Object *o, int nclouds, int dir);\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//------------------[referenced from ai/sym/sym.cpp]-----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/village/balrog_boss_running.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../balrog_common.h\"\n#include \"balrog_boss_running.fdh\"\n\n#define STATE_CHARGE\t\t\t10\n#define STATE_JUMP\t\t\t\t20\n#define STATE_SLOW_DOWN\t\t\t30\n#define STATE_CAUGHT_PLAYER\t\t40\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BALROG_BOSS_RUNNING, ai_balrog_boss_running);\n\tONDEATH(OBJ_BALROG_BOSS_RUNNING, ondeath_balrog_boss_running);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_balrog_boss_running(Object *o)\n{\n\t// try to catch player\n\tif (o->state == STATE_CHARGE+1 || o->state == STATE_JUMP)\n\t{\n\t\tif ((pdistlx(12 << CSF) && pdistly(8 << CSF)) && o->timer > 8)\n\t\t{\n\t\t\thurtplayer(2);\n\t\t\tbalrog_grab_player(o);\n\t\t\to->state = STATE_CAUGHT_PLAYER;\n\t\t}\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->frame = 0;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (++o->timer > 30)\n\t\t\t{\n\t\t\t\to->state = STATE_CHARGE;\n\t\t\t\to->timer2++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// running towards player\n\t\tcase STATE_CHARGE:\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->frame = 9;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase STATE_CHARGE+1:\n\t\t{\n\t\t\tXACCEL(0x10);\n\t\t\twalking_animation(o);\n\t\t\t\n\t\t\tif (++o->timer > 75 || \\\n\t\t\t\t(o->dir == LEFT && o->blockl) ||\n\t\t\t\t(o->dir == RIGHT && o->blockr))\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = STATE_SLOW_DOWN;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// can jump every 3rd time, but if he catches the player\n\t\t\t// before he gets a chance to he does NOT jump on the next charge.\n\t\t\tif ((o->timer2 & 3) == 0)\n\t\t\t{\n\t\t\t\tif (o->timer > 25)\n\t\t\t\t{\t// initiate jump\n\t\t\t\t\to->frame = 3;\n\t\t\t\t\to->yinertia = -0x400;\n\t\t\t\t\to->state = STATE_JUMP;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// jumping\n\t\tcase STATE_JUMP:\n\t\t{\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->frame = 2;\t\t// <-- Landed frame.\n\t\t\t\tquake(30);\n\t\t\t\to->state = STATE_SLOW_DOWN;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// slowing down after charging or jumping\n\t\tcase STATE_SLOW_DOWN:\n\t\t{\n\t\t\to->xinertia *= 4;\n\t\t\to->xinertia /= 5;\n\t\t\t\n\t\t\tif (o->xinertia == 0)\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// caught player\n\t\tcase STATE_CAUGHT_PLAYER:\n\t\t{\n\t\t\tif (balrog_toss_player_away(o))\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITX(0x400);\n\tLIMITY(0x5FF);\n}\n\nstatic void walking_animation(Object *o)\n{\n\tif (++o->animtimer > 3)\n\t{\n\t\to->animtimer = 0;\n\t\t\n\t\tif (++o->frame > 12)\n\t\t\to->frame = 9;\n\t\t\n\t\tif (o->frame == 10 || o->frame == 12)\n\t\t{\n\t\t\tsound(SND_THUD);\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ondeath_balrog_boss_running(Object *o)\n{\n\to->xinertia = 0;\n\to->yinertia = 0;\n}\n\n\n"
  },
  {
    "path": "ai/village/balrog_boss_running.fdh",
    "content": "//hash:01c3aee9\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//--------[referenced from ai/village/balrog_boss_running.cpp]-------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in player.cpp */\n\n//--------[referenced from ai/village/balrog_boss_running.cpp]-------//\nvoid hurtplayer(int damage);\n\n\n/* located in ai/village/balrog_boss_running.cpp */\n\n//--------[referenced from ai/village/balrog_boss_running.cpp]-------//\nvoid ai_balrog_boss_running(Object *o);\nstatic void walking_animation(Object *o);\nvoid ondeath_balrog_boss_running(Object *o);\n\n\n/* located in ai/maze/balrog_boss_missiles.cpp */\n\n//--------[referenced from ai/village/balrog_boss_running.cpp]-------//\nstatic void walking_animation(Object *o);\n\n\n/* located in ai/balrog_common.cpp */\n\n//--------[referenced from ai/village/balrog_boss_running.cpp]-------//\nvoid balrog_grab_player(Object *o);\nbool balrog_toss_player_away(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//--------[referenced from ai/village/balrog_boss_running.cpp]-------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/village/ma_pignon.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"ma_pignon.fdh\"\n\nenum\n{\n\tMP_Fight_Start\t\t= 100,\t\t// scripted\n\tMP_BaseState\t\t= 110,\n\tMP_Jump\t\t\t\t= 120,\n\tMP_In_Air\t\t\t= 130,\n\tMP_Landed\t\t\t= 140,\n\tMP_ChargeAttack\t\t= 200,\n\tMP_Hit_Wall\t\t\t= 220,\n\tMP_CloneAttack\t\t= 300,\n\tMP_Fly_Up\t\t\t= 310,\n\tMP_Spawn_Clones\t\t= 330,\n\tMP_Defeated\t\t\t= 500\t\t// scripted\n};\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_MA_PIGNON, ai_ma_pignon);\n\t\n\tONTICK(OBJ_MA_PIGNON_ROCK, ai_ma_pignon_rock);\n\tONTICK(OBJ_MA_PIGNON_CLONE, ai_ma_pignon_clone);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_ma_pignon(Object *o)\n{\n\t/*debug(\"state: %d\", o->state);\n\tdebug(\"timer: %d\", o->timer);\n\tdebug(\"timer2: %d\", o->timer2);\n\tdebug(\"timer3: %d\", o->timer3);\n\tdebug(\"xinertia: %d\", o->xinertia);\n\tdebug(\"yinertia: %d\", o->yinertia);\n\tdebug(\"frame: %d\", o->frame);\n\t*/\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->SnapToGround();\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->frame = 0;\n\t\t\trandblink(o);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MP_Fight_Start:\t\t// set by script\n\t\t{\n\t\t\to->state = MP_BaseState;\n\t\t\to->timer = 0;\n\t\t\to->timer2 = 0;\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t}\n\t\tcase MP_BaseState:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->damage = 1;\n\t\t\to->frame = 0;\n\t\t\t\n\t\t\tif (++o->timer > 4)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = MP_Jump;\n\t\t\t\t\n\t\t\t\tif (++o->timer3 > 12)\n\t\t\t\t{\n\t\t\t\t\to->timer3 = 0;\n\t\t\t\t\to->state = MP_CloneAttack;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MP_Jump:\t\t// pause a moment and jump\n\t\t{\n\t\t\to->frame = 2;\n\t\t\tif (++o->timer > 4)\n\t\t\t{\n\t\t\t\to->state = MP_In_Air;\n\t\t\t\to->frame = 3;\n\t\t\t\t\n\t\t\t\to->xinertia = random(-0x400, 0x400);\n\t\t\t\to->yinertia = -0x800;\n\t\t\t\t\n\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t\to->timer2++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MP_In_Air:\t\t// jumping or falling after clone attack\n\t\t{\n\t\t\to->yinertia += 0x80;\n\t\t\t\n\t\t\t// for when falling back onscreen after clone attack\n\t\t\tif (o->y > (8 * TILE_H) << CSF)\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\telse\n\t\t\t\to->blockd = false;\n\t\t\t\n\t\t\t// bounce off walls\n\t\t\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t\t\t(o->blockr && o->xinertia > 0))\n\t\t\t{\n\t\t\t\to->xinertia = -o->xinertia;\n\t\t\t}\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\t// select frame\n\t\t\tif (o->yinertia < -0x200)\n\t\t\t{\n\t\t\t\to->frame = 3;\n\t\t\t}\n\t\t\telse if (o->yinertia > 0x200)\n\t\t\t{\n\t\t\t\to->frame = 4;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd && o->yinertia > 0)\n\t\t\t{\n\t\t\t\to->state = MP_Landed;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 2;\n\t\t\t\to->xinertia = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer2 > 4)\n\t\t\t{\n\t\t\t\tif (player->y < (o->y + 0x800))\n\t\t\t\t{\n\t\t\t\t\to->state = MP_ChargeAttack;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\to->yinertia = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MP_Landed:\n\t\t{\n\t\t\to->frame = 2;\n\t\t\tif (++o->timer > 4)\n\t\t\t{\n\t\t\t\to->state = MP_BaseState;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase MP_ChargeAttack:\t\t// charge attack\n\t\t{\n\t\t\to->frame = 5;\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->state = MP_ChargeAttack+1;\n\t\t\t\to->frame = 6;\n\t\t\t\t\n\t\t\t\tXMOVE(0x5ff);\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\t\n\t\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\t\to->damage = 10;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase MP_ChargeAttack+1:\t\t// in-air during charge attack\n\t\t{\n\t\t\tANIMATE(0, 6, 7);\n\t\t\t\n\t\t\tif ((o->xinertia < 0 && o->blockl) || \\\n\t\t\t\t(o->xinertia > 0 && o->blockr))\n\t\t\t{\n\t\t\t\to->state = MP_Hit_Wall;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MP_Hit_Wall:\t\t// hit wall\n\t\t{\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\tquake(16);\n\t\t}\n\t\tcase MP_Hit_Wall+1:\n\t\t{\n\t\t\to->damage = 4;\n\t\t\tANIMATE(0, 6, 7);\n\t\t\t\n\t\t\tif ((++o->timer % 6) == 0)\n\t\t\t{\n\t\t\t\tint x = (random(4, 16) * TILE_W) << CSF;\n\t\t\t\tCreateObject(x, (16 << CSF), OBJ_MA_PIGNON_ROCK);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 30)\n\t\t\t{\n\t\t\t\to->timer2 = 0;\n\t\t\t\to->state = MP_In_Air;\n\t\t\t\t\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\t\n\t\t\t\to->damage = 3;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t\n\t\tcase MP_CloneAttack:\t// begin clone-attack sequence\n\t\t{\n\t\t\to->state++;\n\t\t\to->frame = 9;\n\t\t\tFACEPLAYER;\n\t\t}\n\t\tcase MP_CloneAttack+1:\t// walk at player before attack\n\t\t{\n\t\t\tANIMATE(0, 9, 11);\n\t\t\t\n\t\t\tXMOVE(0x400);\n\t\t\tif (pdistlx(3 << CSF))\n\t\t\t{\n\t\t\t\to->state = MP_Fly_Up;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 2;\n\t\t\t\to->xinertia = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MP_Fly_Up:\t\t// jump and fly up for clone attack\n\t\t{\n\t\t\to->frame = 2;\n\t\t\tif (++o->timer > 4)\n\t\t\t{\n\t\t\t\to->state++;\n\t\t\t\to->frame = 12;\n\t\t\t\to->yinertia = -0x800;\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\t\n\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\t\t\n\t\t\t\to->damage = 10;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase MP_Fly_Up+1:\t\t// flying up\n\t\t{\n\t\t\tANIMATE(0, 12, 13);\n\t\t\t\n\t\t\tif (o->y < (16<<CSF))\n\t\t\t\to->state = MP_Spawn_Clones;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MP_Spawn_Clones:\t// offscreen, spawning clones\n\t\t{\n\t\t\to->yinertia = 0;\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\t\n\t\t\tquake(10);\n\t\t}\n\t\tcase MP_Spawn_Clones+1:\n\t\t{\n\t\t\tANIMATE(0, 12, 13);\n\t\t\t\n\t\t\tif ((++o->timer % 6) == 0)\n\t\t\t{\n\t\t\t\tint x = (random(4, 16) * TILE_W) << CSF;\n\t\t\t\tCreateObject(x, (16 << CSF), OBJ_MA_PIGNON_CLONE);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 30)\n\t\t\t{\n\t\t\t\to->timer2 = 0;\n\t\t\t\to->state = MP_In_Air;\t// fall back down to ground\n\t\t\t\t\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase MP_Defeated:\t\t\t// defeated -- set by script\n\t\t{\n\t\t\tKillObjectsOfType(OBJ_MA_PIGNON_CLONE);\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->state++;\n\t\t\to->timer = 0;\n\t\t\to->frame = 8;\n\t\t\to->damage = 0;\n\t\t}\n\t\tcase MP_Defeated+1:\n\t\t{\n\t\t\to->yinertia += 0x20;\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->xinertia *= 7;\n\t\t\t\to->xinertia /= 8;\n\t\t\t}\n\t\t\t\n\t\t\to->display_xoff = (++o->timer & 1);\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// ma pignon is invulnerable to missiles and Blade.\n\tif (o->state >= MP_Fight_Start && o->state < MP_Defeated)\n\t{\n\t\t// ....he's invulnerable anyway during these two states so don't mess with that.\n\t\tif (o->state != MP_ChargeAttack+1 && o->state != MP_Fly_Up+1)\n\t\t{\n\t\t\tbool found_weapons = false;\n\t\t\tif (o->type != OBJ_MA_PIGNON_CLONE)\n\t\t\t{\n\t\t\t\tObject *c;\n\t\t\t\tFOREACH_OBJECT(c)\n\t\t\t\t{\n\t\t\t\t\tif (c->type == OBJ_MISSILE_SHOT || \\\n\t\t\t\t\t\tc->type == OBJ_SUPERMISSILE_SHOT || \\\n\t\t\t\t\t\tc->type == OBJ_MISSILE_BOOM_SPAWNER || \\\n\t\t\t\t\t\tc->type == OBJ_BLADE12_SHOT || \\\n\t\t\t\t\t\tc->type == OBJ_BLADE3_SHOT || \\\n\t\t\t\t\t\tc->type == OBJ_BLADE_SLASH)\n\t\t\t\t\t{\n\t\t\t\t\t\tfound_weapons = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (found_weapons)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// don't use LIMITY, it limits upwards too and breaks his jumps\n\tif (o->yinertia > 0x5ff)\n\t\to->yinertia = 0x5ff;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid ai_ma_pignon_rock(Object *o)\n{\n\tANIMATE(6, 0, 2);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->timer3 = 0;\n\t\t\to->state = 1;\n\t\t\to->flags |= (FLAG_INVULNERABLE | FLAG_IGNORE_SOLID);\n\t\t\to->frame = random(0, 2);\n\t\t\to->damage = 10;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x700);\n\t\t\t\n\t\t\tif (o->y > (8 * TILE_H) << CSF)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\t\n\t\t\t\tif (o->blockd)\n\t\t\t\t{\n\t\t\t\t\to->yinertia = -0x200;\n\t\t\t\t\to->state = 2;\n\t\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\t\t\n\t\t\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\t\t\tgame.quaketime = 10;\n\t\t\t\t\t\n\t\t\t\t\t// these smoke clouds appear BEHIND the map tiles\n\t\t\t\t\tfor(int i=0;i<2;i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tObject *smoke = CreateObject(o->CenterX() + random(-12<<CSF, 12<<CSF),\n\t\t\t\t\t\t\t\t\t\t\t\t\t o->Bottom()+(16<<CSF), OBJ_SMOKE_CLOUD);\n\t\t\t\t\t\tsmoke->xinertia = random(-0x155, 0x155);\n\t\t\t\t\t\tsmoke->yinertia = random(-0x600, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tif (o->y > (map.ysize * TILE_H) << CSF)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_ma_pignon_clone(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->frame = 3;\n\t\t\to->yinertia += 0x80;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (o->y > (8 * TILE_H) << CSF)\n\t\t\t{\n\t\t\t\to->state = 130;\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\to->timer2 = o->timer3 = 0;\n\t\t\tai_ma_pignon(o);\n\t\tbreak;\n\t}\n\t\n\tif (++o->substate > 300)\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\to->Delete();\n\t}\n}\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/village/ma_pignon.fdh",
    "content": "//hash:976221c5\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//-------------[referenced from ai/village/ma_pignon.cpp]------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//-------------[referenced from ai/village/ma_pignon.cpp]------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//-------------[referenced from ai/village/ma_pignon.cpp]------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/ai.cpp */\n\n//-------------[referenced from ai/village/ma_pignon.cpp]------------//\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/village/ma_pignon.cpp */\n\n//-------------[referenced from ai/village/ma_pignon.cpp]------------//\nvoid ai_ma_pignon(Object *o);\nvoid ai_ma_pignon_rock(Object *o);\nvoid ai_ma_pignon_clone(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//-------------[referenced from ai/village/ma_pignon.cpp]------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-------------[referenced from ai/village/ma_pignon.cpp]------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/village/village.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"../weed/weed.fdh\"\n#include \"village.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_TOROKO_SHACK, ai_toroko_shack);\n\t\n\tONTICK(OBJ_MUSHROOM_ENEMY, ai_mushroom_enemy);\n\tONTICK(OBJ_GIANT_MUSHROOM_ENEMY, ai_mushroom_enemy);\n\tONTICK(OBJ_GRAVEKEEPER, ai_gravekeeper);\n\t\n\tONTICK(OBJ_CAGE, ai_cage);\n\tONSPAWN(OBJ_FLOWERS_PENS1, onspawn_snap_to_ground);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// scared toroko attacking in Shack\nvoid ai_toroko_shack(Object *o)\n{\n\t//debug(\"Y:%d  Yinertia:%d  blockd:%d  flags:%d\", o->y>>CSF, o->yinertia, o->blockd, o->flags);\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->timer = 0;\n\t\t\to->yinertia = -(2 << CSF);\n\t\t\to->y -= (2 << CSF);\n\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\to->state = 1;\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(2, 0, 3);\n\t\t\tXMOVE(0x100);\n\t\t\t\n\t\t\tif (o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\t\n\t\t\t\tif (o->blockd)\n\t\t\t\t{\n\t\t\t\t\tASSERT((o->y % TILE_H) == 0);\n\t\t\t\t\t\n\t\t\t\t\to->yinertia = 0;\n\t\t\t\t\to->state = 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\n\t\t\to->frame = o->timer = o->animtimer = 0;\n\t\t\to->state = 3;\n\t\tcase 3:\n\t\t{\n\t\t\tANIMATE(2, 0, 3);\n\t\t\tXACCEL(0x40);\n\t\t\t\n\t\t\tif (++o->timer >= 50)\n\t\t\t{\n\t\t\t\to->timer = 40;\n\t\t\t\to->xinertia = -o->xinertia;\n\t\t\t\to->dir = (o->dir == RIGHT) ? LEFT:RIGHT;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer >= 35)\n\t\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\t\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\to->state = 4;\n\t\t\t\to->frame = 4;\n\t\t\t\to->yinertia = -(2 << CSF);\n\t\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\t\to->damage = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\n\t\t\tXMOVE(0x100);\n\t\t\t\n\t\t\tif (++o->timer > 2 && o->blockd)\n\t\t\t{\n\t\t\t\to->state = 5;\n\t\t\t\to->flags |= FLAG_SCRIPTONACTIVATE;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 5:\n\t\t\to->xinertia = 0;\n\t\t\to->frame = 5;\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITX(0x400);\n\tLIMITY(0x5ff);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// mushroom enemy (\"Pignon\") from Mimiga Graveyard\nvoid ai_mushroom_enemy(Object *o)\n{\n\tenum {\n\t\t\tINIT = 0,\n\t\t\tSTANDING,\n\t\t\tBLINKING,\n\t\t\tWALKING, WALKING2,\n\t\t\tSHOT\n\t};\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->state = STANDING;\n\t\tcase STANDING:\t\t// stand around\n\t\t{\n\t\t\tif (!random(0, 100))\n\t\t\t{\t// blink\n\t\t\t\to->state = BLINKING;\n\t\t\t\to->frame = 1;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (!random(0, 150))\n\t\t\t\t\to->dir ^= 1;\n\t\t\t\t\n\t\t\t\t// start walking\n\t\t\t\tif (!random(0, 150))\n\t\t\t\t{\n\t\t\t\t\to->state = WALKING;\n\t\t\t\t\to->frame = 0;\n\t\t\t\t\to->timer = 50;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BLINKING:\t\t// eyes closed/blinking\n\t\t{\n\t\t\tif (++o->timer > 8)\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = STANDING;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase WALKING:\t\t// walking\n\t\t\to->state++;\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\tcase WALKING+1:\n\t\t{\n\t\t\tif (!--o->timer)\n\t\t\t\to->state = INIT;\n\t\t\t\n\t\t\tif (o->blockl && o->dir == LEFT)\n\t\t\t{\n\t\t\t\to->dir = RIGHT;\n\t\t\t\to->xinertia = 0x200;\n\t\t\t}\n\t\t\telse if (o->blockr && o->dir == RIGHT)\n\t\t\t{\n\t\t\t\to->dir = LEFT;\n\t\t\t\to->xinertia = -0x200;\n\t\t\t}\n\t\t\t\n\t\t\tANIMATE(2, 2, 4);\n\t\t\tXMOVE(0x100);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase SHOT:\t\t// hit by shot\n\t\t\tif (o->blockd)\n\t\t\t\to->state = INIT;\n\t\tbreak;\n\t}\n\t\n\tif (o->shaketime && o->state != SHOT)\n\t{\n\t\to->state = SHOT;\n\t\to->yinertia = -0x200;\n\t\to->frame = 6;\n\t}\n\t\n\to->yinertia += 0x40;\n\tLIMITY(0x5ff);\n}\n\n\n// guy with knife, Mimiga Graveyard\nvoid ai_gravekeeper(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\t\t\n\t\t\to->damage = 0;\n\t\t\to->state = 1;\n\t\tcase 1:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\t// start walking when player comes near\n\t\t\tif (pdistlx(128 << CSF) && pdistly2(48<<CSF, 32<<CSF))\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->animtimer = 0;\n\t\t\t}\n\t\t\t\n\t\t\t// start walking if shot\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->frame = 1;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// walking\n\t\t{\n\t\t\tANIMATE(6, 0, 3);\n\t\t\t\n\t\t\t// reached knife range of player?\n\t\t\t// (no, he doesn't check Y)\n\t\t\tif (pdistlx(10 << CSF))\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tsound(SND_FIREBALL);\n\t\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t}\n\t\t\t\n\t\t\tFACEPLAYER;\n\t\t\tXMOVE(0x100);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// knife raised\n\t\t{\n\t\t\to->frame = 4;\n\t\t\to->xinertia = 0;\n\t\t\t\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\to->state = 4;\n\t\t\t\to->timer = 0;\n\t\t\t\tsound(SND_SLASH);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\t\t// knife frame 2\n\t\t{\n\t\t\to->frame = 5;\n\t\t\to->damage = 10;\n\t\t\t\n\t\t\tif (++o->timer > 2)\n\t\t\t{\n\t\t\t\to->state = 5;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 5:\t\t// knife frame 3\n\t\t{\n\t\t\to->frame = 6;\n\t\t\tif (++o->timer > 60)\n\t\t\t\to->state = 0;\n\t\t\t\n\t\t\tif (o->xinertia > 0 && o->blockl) o->xinertia = 0;\n\t\t\tif (o->xinertia < 0 && o->blockr) o->xinertia = 0;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->yinertia += 0x20;\n\tLIMITX(0x400);\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_cage(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\t// the Cage's drawpoint is used to tweak the positioning\n\t\t// of the camera, which is <FON'd on it, during the post-Egg cutscene,\n\t\t// see the rules for draw points in map_scroll_do().\n\t\to->x += o->DrawPointX();\n\t\to->y += o->DrawPointY();\n\t\to->state = 1;\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/village/village.fdh",
    "content": "//hash:8be69c8c\n//automatically generated by Makegen\n\n/* located in ai/village/village.cpp */\n\n//--------------[referenced from ai/village/village.cpp]-------------//\nvoid ai_toroko_shack(Object *o);\nvoid ai_mushroom_enemy(Object *o);\nvoid ai_gravekeeper(Object *o);\nvoid ai_cage(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/village/village.cpp]-------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/village/village.cpp]-------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/weapons/blade.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"blade.fdh\"\n\n// how far away the area-of-effect slashes are spawned when\n// the blade hits something and pauses for a moment dealing extra damage.\n#define BLADE_AOE\t\t(64 << CSF)\n\n#define STATE_FLYING\t0\n#define STATE_AOE\t\t1\n\n\nINITFUNC(AIRoutines)\n{\n\tAFTERMOVE(OBJ_BLADE12_SHOT, aftermove_blade_l12_shot);\n\tONTICK(OBJ_BLADE3_SHOT, ai_blade_l3_shot);\n\t\n\tAFTERMOVE(OBJ_BLADE_SLASH, aftermove_blade_slash);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_blade_l3_shot(Object *o)\n{\n\t\n\tswitch(o->state)\n\t{\n\t\tcase STATE_FLYING:\n\t\t{\n\t\t\tif ((++o->timer % 4) == 1)\n\t\t\t{\n\t\t\t\tObject *slash = CreateObject(o->x, o->y - (12 << CSF), OBJ_BLADE_SLASH);\n\t\t\t\t\n\t\t\t\tif (++o->timer2 & 1)\n\t\t\t\t{\n\t\t\t\t\tslash->dir = LEFT;\n\t\t\t\t\tslash->x += (10 << CSF);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tslash->dir = RIGHT;\n\t\t\t\t\tslash->x -= (10 << CSF);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsound(SND_SLASH);\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer2 > o->shot.ttl)\n\t\t\t{\n\t\t\t\tshot_dissipate(o);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// damage enemies and hit walls\n\t\t\tif (o->timer2 >= 5)\n\t\t\t{\n\t\t\t\tObject *enemy;\n\t\t\t\tif ((enemy = damage_enemies(o)))\n\t\t\t\t{\n\t\t\t\t\tif (enemy->flags & FLAG_INVULNERABLE)\n\t\t\t\t\t{\n\t\t\t\t\t\tshot_spawn_effect(o, EFFECT_STARSOLID);\n\t\t\t\t\t\tsound(SND_SHOT_HIT);\n\t\t\t\t\t\to->Delete();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\to->x += o->xinertia;\n\t\t\t\t\t\to->y += o->yinertia;\n\t\t\t\t\t\to->xinertia = 0;\n\t\t\t\t\t\to->yinertia = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\to->state = STATE_AOE;\n\t\t\t\t\t\to->frame = 1;\n\t\t\t\t\t\to->timer = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (IsBlockedInShotDir(o))\n\t\t\t\t{\n\t\t\t\t\tif (!shot_destroy_blocks(o))\n\t\t\t\t\t\tsound(SND_SHOT_HIT);\n\t\t\t\t\t\n\t\t\t\t\tshot_spawn_effect(o, EFFECT_STARSOLID);\n\t\t\t\t\to->Delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase STATE_AOE:\n\t\t{\n\t\t\tif (!random(0, 2))\n\t\t\t{\n\t\t\t\tObject *slash = CreateObject(o->x + random(-BLADE_AOE, BLADE_AOE),\n\t\t\t\t\t\t\t\t\t\t\t o->y + random(-BLADE_AOE, BLADE_AOE),\n\t\t\t\t\t\t\t\t\t\t\t OBJ_BLADE_SLASH);\n\t\t\t\t\n\t\t\t\tslash->dir = random(0, 1) ? LEFT : RIGHT;\n\t\t\t\tsound(SND_SLASH);\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer > 50)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->invisible = (o->timer & 1);\n}\n\nvoid aftermove_blade_slash(Object *o)\n{\n\tANIMATE_FWD(2);\n\tif (o->frame >= 4)\n\t{\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\to->x += (o->dir == LEFT) ? -0x400 : 0x400;\n\to->y += 0x400;\n\t\n\tstatic const int damage_for_frames[] = { 0, 1, 2, 2, 2 };\n\to->shot.damage = damage_for_frames[o->frame];\n\t\n\t// deal damage to anything we touch.\n\tObject *enemy = damage_enemies(o);\n\tif (enemy && (enemy->flags & FLAG_INVULNERABLE))\n\t\to->Delete();\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid aftermove_blade_l12_shot(Object *o)\n{\n\tint level = (o->shot.btype - B_BLADE_L1);\n\tANIMATE(1, 0, 3);\n\t\n\tif (--o->shot.ttl < 0)\n\t{\n\t\tshot_dissipate(o);\n\t\treturn;\n\t}\n\t\n\t// only start damaging enemies after we've passed the player\n\t// as it starts slightly behind him\n\tif (++o->timer >= 4)\n\t{\n\t\tObject *enemy;\n\t\tif ((enemy = damage_enemies(o)))\n\t\t{\n\t\t\t// on level 2 we can deal damage up to 3 times (18 max)\n\t\t\tif (level == 0 || \\\n\t\t\t\t++o->timer2 >= 3 || (enemy->flags & FLAG_INVULNERABLE))\n\t\t\t{\n\t\t\t\to->Delete();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse if (IsBlockedInShotDir(o))\n\t\t{\n\t\t\tif (!shot_destroy_blocks(o))\n\t\t\t\tsound(SND_SHOT_HIT);\n\t\t\t\n\t\t\tshot_dissipate(o, EFFECT_STARSOLID);\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\tswitch(level)\n\t{\n\t\tcase 0:\n\t\t\tif ((o->timer % 5) == 1)\n\t\t\t\tsound(SND_FIREBALL);\n\t\tbreak;\n\t\t\n\t\tcase 1:\n\t\t\tif ((o->timer % 7) == 1)\n\t\t\t\tsound(SND_SLASH);\n\t\tbreak;\n\t}\n}\n\n"
  },
  {
    "path": "ai/weapons/blade.fdh",
    "content": "//hash:90bd36fc\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//---------------[referenced from ai/weapons/blade.cpp]--------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//---------------[referenced from ai/weapons/blade.cpp]--------------//\nvoid shot_dissipate(Object *o, int effectno);\nObject *damage_enemies(Object *o, uint32_t flags_to_exclude);\nvoid shot_spawn_effect(Object *o, int effectno);\nbool IsBlockedInShotDir(Object *o);\nbool shot_destroy_blocks(Object *o);\n\n\n/* located in ai/weapons/blade.cpp */\n\n//---------------[referenced from ai/weapons/blade.cpp]--------------//\nvoid ai_blade_l3_shot(Object *o);\nvoid aftermove_blade_slash(Object *o);\nvoid aftermove_blade_l12_shot(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//---------------[referenced from ai/weapons/blade.cpp]--------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//---------------[referenced from ai/weapons/blade.cpp]--------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/weapons/bubbler.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"bubbler.fdh\"\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BUBBLER12_SHOT, ai_bubbler_l12);\n\tONTICK(OBJ_BUBBLER3_SHOT, ai_bubbler_l3);\n\tONTICK(OBJ_BUBBLER_SHARP, ai_bubbler_sharp);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_bubbler_l12(Object *o)\n{\nint decel;\n\n\tif (o->shot.level == 1 && o->state == 0)\n\t{\n\t\to->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\to->state = 1;\n\t\t\n\t\tint variance = random(-0x100, 0x100);\n\t\tswitch(o->shot.dir)\n\t\t{\n\t\t\tcase LEFT:\n\t\t\tcase RIGHT:\to->yinertia = variance; break;\n\t\t\t\n\t\t\tcase UP:\n\t\t\tcase DOWN:  o->xinertia = variance; break;\n\t\t}\n\t}\n\t\n\tif (damage_enemies(o))\n\t{\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tif (IsBlockedInShotDir(o))\n\t{\n\t\tshot_dissipate(o, EFFECT_FISHY);\n\t\treturn;\n\t}\n\t\n\tif (--o->shot.ttl < 0)\n\t{\n\t\teffect(o->x, o->y, EFFECT_BUBBLE_BURST);\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tif (o->shot.level == 0)\n\t\tdecel = 0x2A;\n\telse\n\t\tdecel = 0x10;\n\t\n\tswitch(o->shot.dir)\n\t{\n\t\tcase LEFT:  o->xinertia += decel; break;\n\t\tcase RIGHT: o->xinertia -= decel; break;\n\t\tcase UP:\to->yinertia += decel; break;\n\t\tcase DOWN:\to->yinertia -= decel; break;\n\t}\n\t\n\tif (o->frame < 3)\n\t\tANIMATE_FWD(3);\n}\n\n\nvoid ai_bubbler_l3(Object *o)\n{\n\tif (damage_enemies(o))\n\t{\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tif (--o->shot.ttl < 0 || !inputs[FIREKEY])\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_FISHY);\n\t\tsound(SND_BUBBLER_LAUNCH);\n\t\t\n\t\tObject *shot = CreateObject(o->x, o->y, OBJ_BUBBLER_SHARP);\n\t\tshot->dir = player->dir;\n\t\tshot->shot.dir = (player->look) ? player->look : player->dir;\n\t\tshot->shot.damage = 3;\n\t\tshot->shot.ttl = 32;\n\t\t\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tif (o->state == 0)\n\t{\n\t\tint bigspeed   = random(0x200, 0x400);\n\t\tint smallspeed = (random(-4, 4) << CSF) / 2;\n\t\t\n\t\tswitch(o->shot.dir)\n\t\t{\n\t\t\tcase LEFT:\n\t\t\t\to->xinertia = -bigspeed;\n\t\t\t\to->yinertia = smallspeed;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase RIGHT:\n\t\t\t\to->xinertia = bigspeed;\n\t\t\t\to->yinertia = smallspeed;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase UP:\n\t\t\t\to->xinertia = smallspeed;\n\t\t\t\to->yinertia = -bigspeed;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase DOWN:\n\t\t\t\to->xinertia = smallspeed;\n\t\t\t\to->yinertia = bigspeed;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\to->state = 1;\n\t}\n\t\n\t// track player\n\tif (o->CenterX() > player->CenterX()) o->xinertia -= 0x20;\n\tif (o->CenterX() < player->CenterX()) o->xinertia += 0x20;\n\tif (o->CenterY() > player->CenterY()) o->yinertia -= 0x20;\n\tif (o->CenterY() < player->CenterY()) o->yinertia += 0x20;\n\t\n\t// bouncy\n\tif (o->xinertia < 0 && o->blockl)\n\t\to->xinertia = 0x400;\n\t\n\tif (o->xinertia > 0 && o->blockr)\n\t\to->xinertia = -0x400;\n\t\n\tif (o->yinertia < 0 && o->blocku)\n\t\to->yinertia = 0x400;\n\t\n\tif (o->yinertia > 0 && o->blockd)\n\t\to->yinertia = -0x400;\n\t\n\t// animate\n\tif (o->frame < 3)\n\t\tANIMATE_FWD(3);\n}\n\n\nvoid ai_bubbler_sharp(Object *o)\n{\n\tif (run_shot(o, true))\n\t\treturn;\n\t\n\tif (o->state == 0)\n\t{\n\t\to->state = 1;\n\t\t\n\t\tint speed = (random(10, 16) << CSF) / 2;\n\t\tswitch(o->shot.dir)\n\t\t{\n\t\t\tcase LEFT:  o->xinertia = -speed; break;\n\t\t\tcase RIGHT: o->xinertia = speed; break;\n\t\t\tcase UP:\to->yinertia = -speed; break;\n\t\t\tcase DOWN:\to->yinertia = speed; break;\n\t\t}\n\t\t\n\t\to->x -= o->xinertia;\n\t\to->y -= o->yinertia;\n\t}\n\telse\n\t{\n\t\tANIMATE(1, 0, 1);\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/weapons/bubbler.fdh",
    "content": "//hash:5ebaab6e\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/weapons/bubbler.cpp]-------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//--------------[referenced from ai/weapons/bubbler.cpp]-------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//--------------[referenced from ai/weapons/bubbler.cpp]-------------//\nObject *damage_enemies(Object *o, uint32_t flags_to_exclude);\nbool IsBlockedInShotDir(Object *o);\nvoid shot_dissipate(Object *o, int effectno);\nuint8_t run_shot(Object *o, bool destroys_blocks);\n\n\n/* located in ai/weapons/bubbler.cpp */\n\n//--------------[referenced from ai/weapons/bubbler.cpp]-------------//\nvoid ai_bubbler_l12(Object *o);\nvoid ai_bubbler_l3(Object *o);\nvoid ai_bubbler_sharp(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/weapons/bubbler.cpp]-------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/weapons/bubbler.cpp]-------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/weapons/fireball.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"fireball.fdh\"\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_FIREBALL1, ai_fireball);\n\tONTICK(OBJ_FIREBALL23, ai_fireball_level_23);\n\t\n\tONTICK(OBJ_FIREBALL_TRAIL, ai_fireball_trail);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// shared between all weapon levels\nvoid ai_fireball(Object *o)\n{\n\tif (--o->shot.ttl < 0)\n\t{\n\t\tshot_dissipate(o, EFFECT_STARPOOF);\n\t\treturn;\n\t}\n\t\n\t// bounce\n\tif (o->blockl || o->blockr || o->blockd)\n\t{\n\t\tsound(SND_FIREBALL);\n\t\t\n\t\tif (o->blockd) o->yinertia = -0x400;\n\t\tif (o->blockl) o->xinertia = 0x400;\n\t\tif (o->blockr) o->xinertia = -0x400;\n\t\t\n\t\t// dissipate immediately if we somehow get entirely embedded in a wall.\n\t\tif (o->blockl && o->blockr && o->blocku && o->blockd)\n\t\t{\n\t\t\tshot_dissipate(o, EFFECT_STARPOOF);\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t// fall\n\to->yinertia += 0x55;\n\tif (o->yinertia > 0x3ff) o->yinertia = 0x3ff;\n\t\n\t// hit ceil\n\tif (o->blocku && o->yinertia < 0) o->yinertia = 0;\n\t\n\t// spin in shot direction\n\tif (o->dir==RIGHT)\n\t{\n\t\tif (++o->frame >= sprites[o->sprite].nframes) o->frame = 0;\n\t}\n\telse\n\t{\n\t\tif (--o->frame < 0) o->frame = sprites[o->sprite].nframes-1;\n\t}\n\t\n\tObject *enemy;\n\tif ((enemy = check_hit_enemy(o)))\n\t{\n\t\t// bounce off of invulnerable non-enemy objects instead of dissipating\n\t\t// (prevents incorrect dissipation if a fireball hits the Lift in Almond)\n\t\tif ((enemy->flags & FLAG_INVULNERABLE) && enemy->damage == 0)\n\t\t{\n\t\t\tstatic const Point embedpt[] = { 8, 8 };\n\t\t\tstatic const Point pcheckl[] = { { -1, 4 }, { -1, 12 } };\n\t\t\tstatic const Point pcheckr[] = { { 16, 4 }, { 16, 12 } };\n\t\t\tstatic const Point pchecku[] = { { 4, -1 }, { 12, -1 } };\n\t\t\tstatic const Point pcheckd[] = { { 4, 16 }, { 12, 16 } };\n\t\t\t\n\t\t\t// keeps us from bouncing around forever if something gets screwed up\n\t\t\tif (!o->CheckSolidIntersect(enemy, embedpt, 1))\n\t\t\t{\n\t\t\t\t// figure out whether we're on top, to the left, or etc of whatever we hit\n\t\t\t\t// so we know which way to bounce off\n\t\t\t\tif (o->CheckSolidIntersect(enemy, pcheckl, 2))\n\t\t\t\t\t{ o->xinertia = 0x400; return; }\n\t\t\t\t\n\t\t\t\tif (o->CheckSolidIntersect(enemy, pcheckr, 2))\n\t\t\t\t\t{ o->xinertia = -0x400; return; }\n\t\t\t\t\n\t\t\t\tif (o->CheckSolidIntersect(enemy, pchecku, 2))\n\t\t\t\t\t{ o->yinertia = 0x400; return; }\n\t\t\t\t\n\t\t\t\tif (o->CheckSolidIntersect(enemy, pcheckd, 2))\n\t\t\t\t\t{ o->yinertia = -0x400; return; }\n\t\t\t}\n\t\t\t\n\t\t\tshot_dissipate(o, EFFECT_STARPOOF);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// \"Fireball will barrel through weaker enemies, dealing only half damage\n\t\t//  and continuing on if the enemy is killed by that much damage.\"\n\t\t// So, our damage is set to half of what it should be, and we'll let ourselves\n\t\t// deal it up to twice.\n\t\tenemy->DealDamage(o->shot.damage);\n\t\t\n\t\tif (o->timer3 == 1)\n\t\t\tshot_dissipate(o, EFFECT_STARPOOF);\n\t\telse\n\t\t\to->timer3 = 1;\n\t}\n}\n\nvoid ai_fireball_level_23(Object *o)\n{\n\t// everything from level 1, and...\n\tai_fireball(o);\n\tif (o->deleted) return;\n\t\n\t// ...spawn trails\n\tif ((++o->timer2 & 1) == 0)\n\t{\n\t\tcreate_fire_trail(o, OBJ_FIREBALL_TRAIL, o->shot.level);\n\t}\n}\n\n/*\nvoid c------------------------------() {}`\n*/\n\n// shared between Fireball and Snake\nObject *create_fire_trail(Object *o, int objtype, int level)\n{\n\tObject *trail = CreateObject(o->x, o->y, objtype);\n\t\n\ttrail->sprite = (level == 2) ? SPR_FIREBALL_TRAIL3 : SPR_FIREBALL_TRAIL2;\n\ttrail->dir = o->dir;\n\t\n\t// be sure and show the 1st frame\n\ttrail->animframe = -1;\n\t\n\t// draw the trail BEHIND the lead fireball\n\ttrail->PushBehind(o);\n\t\n\treturn trail;\n}\n\nvoid ai_fireball_trail(Object *o)\n{\nstatic const int ccw_trail_frames[] = { 2, 1, 0, 5, 4, 3, 8, 7, 6 };\n\t\n\tif (++o->animframe >= sprites[o->sprite].nframes)\n\t{\n\t\to->Delete();\n\t}\n\telse\n\t{\n\t\tif (o->dir == RIGHT)\n\t\t{\n\t\t\to->frame = o->animframe;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->frame = ccw_trail_frames[o->animframe];\n\t\t}\n\t}\n}\n\n"
  },
  {
    "path": "ai/weapons/fireball.fdh",
    "content": "//hash:b87b3dad\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/weapons/fireball.cpp]------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//--------------[referenced from ai/weapons/fireball.cpp]------------//\nvoid shot_dissipate(Object *o, int effectno);\nObject *check_hit_enemy(Object *shot, uint32_t flags_to_exclude);\n\n\n/* located in ai/weapons/fireball.cpp */\n\n//--------------[referenced from ai/weapons/fireball.cpp]------------//\nvoid ai_fireball(Object *o);\nvoid ai_fireball_level_23(Object *o);\nObject *create_fire_trail(Object *o, int objtype, int level);\nvoid ai_fireball_trail(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/weapons/fireball.cpp]------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/weapons/missile.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"missile.fdh\"\n\n#define STATE_WAIT_RECOIL_OVER\t\t1\n#define STATE_RECOIL_OVER\t\t\t2\n#define STATE_MISSILE_CAN_EXPLODE\t3\n\nstruct MissileSettings\n{\n\tint maxspeed;\t\t// max speed of missile\n\tint accel;\t\t\t// rate of acceleration\n\tint smokeamt;\t\t// how much smoke to make on explosion (higher = more)\n\tint num_booms;\t\t// number of boomflashes to create on impact\n\tint boomrange;\t\t// max dist away to create the boomflashes\n\tint damage;\t\t\t// damage dealt by a direct hit of the missile itself\n\tint boomdamage;\t\t// damage dealt by contact with a boomflash (AoE damage)\n}\nmissile_settings[] =\n{\n//  Level 1-3 regular missile\n//  have on record here for damage 4, 6, 4; check if that's correct\n//  maxspd   acl   smk, nboom, range,  dmg,  bmdmg\n\t0xA00,  0x80,  4,   4,\t\t16,\t\t8,\t   1,\n\t0xA00,  0x100, 6,   6,\t\t32,\t\t15,\t   2,\n\t0xA00,  0x80,  12,  2,\t\t40,\t\t8,\t   2,\n\t\n//  Level 1-3 super missile\n//  maxspd   acl   smk, nboom, range,  dmg,  bmdmg\n\t0x1400, 0x200, 8,   4,     16,\t\t18,\t   1,\n\t0x1400, 0x200, 6,   5,     32,\t\t30,\t   2,\n\t0x1400, 0x200, 12,  3,     40,\t\t18,    2,\n};\n\n/*\n\tDirect Hits:\n\t\tL1 Super Missile deals 18 damage, boomflashes are 2 apiece I think\n\t\n\tl1 super missile spawns 8 smoke clouds, 2 per frame\n\tand so it appears that there are 4 booms and the booms are spawning the smoke\n\t\n*/\n\nINITFUNC(AIRoutines)\n{\n\tAFTERMOVE(OBJ_MISSILE_SHOT, ai_missile_shot);\n\tAFTERMOVE(OBJ_SUPERMISSILE_SHOT, ai_missile_shot);\n\tAFTERMOVE(OBJ_MISSILE_BOOM_SPAWNER, ai_missile_boom_spawner);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_missile_shot(Object *o)\n{\n\tint index = o->shot.level + ((o->type == OBJ_SUPERMISSILE_SHOT) ? 3 : 0);\n\tMissileSettings *settings = &missile_settings[index];\n\t\n\tif (o->state == 0)\n\t{\n\t\to->shot.damage = settings->damage;\n\t\t\n\t\tif (o->shot.level == 2)\n\t\t{\n\t\t\t// initilize wavey effect\n\t\t\tif (o->shot.dir == LEFT || o->shot.dir == RIGHT)\n\t\t\t\to->ymark = -0x20;\n\t\t\telse\n\t\t\t\to->xmark = -0x20;\n\t\t\t\n\t\t\t// don't let it explode until the \"recoil\" effect is over.\n\t\t\to->state = STATE_WAIT_RECOIL_OVER;\n\t\t\t// record position we were fired at (we won't explode until we pass it)\n\t\t\to->xmark2 = player->x;\n\t\t\to->ymark2 = player->y;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->state = STATE_MISSILE_CAN_EXPLODE;\n\t\t}\n\t}\n\t\n\t// accelerate according to current type and level of missile\n\t// don't use LIMITX here as it can mess up recoil of level 3 super missiles\n\tswitch(o->shot.dir)\n\t{\n\t\tcase RIGHT:\n\t\t\to->xinertia += settings->accel;\n\t\t\tif (o->xinertia > settings->maxspeed) o->xinertia = settings->maxspeed;\n\t\tbreak;\n\t\t\n\t\tcase LEFT:\n\t\t\to->xinertia -= settings->accel;\n\t\t\tif (o->xinertia < -settings->maxspeed) o->xinertia = -settings->maxspeed;\n\t\tbreak;\n\t\t\n\t\tcase UP:\n\t\t\to->yinertia -= settings->accel;\n\t\t\tif (o->yinertia < -settings->maxspeed) o->yinertia = -settings->maxspeed;\n\t\tbreak;\n\t\t\n\t\tcase DOWN:\n\t\t\to->yinertia += settings->accel;\n\t\t\tif (o->yinertia > settings->maxspeed) o->yinertia = settings->maxspeed;\n\t\tbreak;\n\t}\n\t\n\t// wavey effect for level 3\n\t// (markx/y is used as a \"speed\" value here)\n\tif (o->shot.level == 2)\n\t{\n\t\tif (o->shot.dir == LEFT || o->shot.dir == RIGHT)\n\t\t{\n\t\t\to->yinertia += o->ymark;\n\t\t\t\n\t\t\tif (o->ymark > 0 && o->yinertia > 0x100)  o->ymark = -o->ymark;\n\t\t\tif (o->ymark < 0 && o->yinertia < -0x100) o->ymark = -o->ymark;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->xinertia += o->xmark;\n\t\t\t\n\t\t\tif (o->xmark > 0 && o->xinertia > 0x100)  o->xmark = -o->xmark;\n\t\t\tif (o->xmark < 0 && o->xinertia < -0x100) o->xmark = -o->xmark;\n\t\t}\n\t}\n\t\n\t// check if we hit an enemy\n\t// level 3 missiles can not blow up while they are \"recoiling\"\n\t// what we do is first wait until they're traveling in the direction\n\t// they're pointing, then wait till they pass the player's original position.\n\tswitch(o->state)\n\t{\n\t\tcase STATE_WAIT_RECOIL_OVER:\n\t\t\tswitch(o->shot.dir)\n\t\t\t{\n\t\t\t\tcase LEFT: if (o->xinertia <= 0) o->state = STATE_RECOIL_OVER; break;\n\t\t\t\tcase RIGHT: if (o->xinertia >= 0) o->state = STATE_RECOIL_OVER; break;\n\t\t\t\tcase UP: if (o->yinertia <= 0) o->state = STATE_RECOIL_OVER; break;\n\t\t\t\tcase DOWN: if (o->yinertia >= 0) o->state = STATE_RECOIL_OVER; break;\n\t\t\t}\n\t\tif (o->state != STATE_RECOIL_OVER)\n\t\t\tbreak;\n\t\t\t\n\t\tcase STATE_RECOIL_OVER:\n\t\t\tswitch(o->shot.dir)\n\t\t\t{\n\t\t\t\tcase LEFT: if (o->x <= o->xmark2-(2<<CSF)) o->state = STATE_MISSILE_CAN_EXPLODE; break;\n\t\t\t\tcase RIGHT: if (o->x >= o->xmark2+(2<<CSF)) o->state = STATE_MISSILE_CAN_EXPLODE; break;\n\t\t\t\tcase UP: if (o->y <= o->ymark2-(2<<CSF)) o->state = STATE_MISSILE_CAN_EXPLODE; break;\n\t\t\t\tcase DOWN: if (o->y >= o->ymark2+(2<<CSF)) o->state = STATE_MISSILE_CAN_EXPLODE; break;\n\t\t\t}\n\t\tif (o->state != STATE_MISSILE_CAN_EXPLODE)\n\t\t\tbreak;\n\t\t\t\n\t\tcase STATE_MISSILE_CAN_EXPLODE:\n\t\t{\n\t\t\tbool blow_up = false;\n\t\t\t\n\t\t\tif (damage_enemies(o))\n\t\t\t{\n\t\t\t\tblow_up = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// check if we hit a wall\n\t\t\t\tif (o->shot.dir==LEFT && o->blockl) \t  blow_up = true;\n\t\t\t\telse if (o->shot.dir==RIGHT && o->blockr) blow_up = true;\n\t\t\t\telse if (o->shot.dir==UP && o->blocku)\t  blow_up = true;\n\t\t\t\telse if (o->shot.dir==DOWN && o->blockd)  blow_up = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (blow_up)\n\t\t\t{\n\t\t\t\tsound(SND_MISSILE_HIT);\n\t\t\t\t\n\t\t\t\t// create the boom-spawner object for the flashes, smoke, and AoE damage\n\t\t\t\tObject *sp = CreateObject(o->CenterX(), o->CenterY(), OBJ_MISSILE_BOOM_SPAWNER);\n\t\t\t\t\n\t\t\t\tsp->shot.boomspawner.range = settings->boomrange;\n\t\t\t\tsp->shot.boomspawner.booms_left = settings->num_booms;\n\t\t\t\tsp->shot.damage = settings->boomdamage;\n\t\t\t\t\n\t\t\t\to->Delete();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (--o->shot.ttl < 0)\n\t\tshot_dissipate(o, EFFECT_STARPOOF);\n\t\n\t// smoke trails\n\tif (++o->timer > 2)\n\t{\n\t\to->timer = 0;\n\t\tCaret *trail = effect(o->CenterX() - o->xinertia, \\\n\t\t\t\t\t\t\t  o->CenterY() - o->yinertia, EFFECT_SMOKETRAIL);\n\t\t\n\t\tconst int trailspd = 0x400;\n\t\tswitch(o->shot.dir)\n\t\t{\n\t\t\tcase LEFT:\ttrail->xinertia = trailspd;  trail->y -= (2<<CSF); break;\n\t\t\tcase RIGHT: trail->xinertia = -trailspd; trail->y -= (2<<CSF); break;\n\t\t\tcase UP:\ttrail->yinertia = trailspd;  trail->x -= (1<<CSF); break;\n\t\t\tcase DOWN:\ttrail->yinertia = -trailspd; trail->x -= (1<<CSF); break;\n\t\t}\n\t}\n\t\n}\n\nvoid ai_missile_boom_spawner(Object *o)\n{\n\tif ((++o->timer % 3) != 1)\n\t\treturn;\n\t\n\tif (o->state == 0)\n\t{\n\t\to->state = 1;\n\t\to->timer = 0;\n\t\t\n\t\to->xmark = o->x;\n\t\to->ymark = o->y;\n\t\t\n\t\t// give us the same bounding box as the boomflash effects\n\t\to->sprite = SPR_BOOMFLASH;\n\t\to->invisible = true;\n\t}\n\t\n\tint range = o->shot.boomspawner.range;\n\to->x = o->xmark + (random(-range, range) << CSF);\n\to->y = o->ymark + (random(-range, range) << CSF);\n\t\n\teffect(o->x, o->y, EFFECT_BOOMFLASH);\n\tmissilehitsmoke(o);\n\t\n\tdamage_all_enemies_in_bb(o, FLAG_INVULNERABLE);\n\t\n\tif (--o->shot.boomspawner.booms_left <= 0)\n\t\to->Delete();\n}\n\nstatic void missilehitsmoke(Object *o)\n{\n\tint smokex = o->CenterX() - (8 << CSF);\n\tint smokey = o->CenterY() - (8 << CSF);\n\tObject *smoke;\n\t\n\tfor(int i=0;i<2;i++)\n\t{\n\t\tsmoke = CreateObject(smokex, smokey, OBJ_SMOKE_CLOUD);\n\t\tsmoke->sprite = SPR_MISSILEHITSMOKE;\n\t\tvector_from_angle(random(0,255), random(0x100,0x3ff), &smoke->xinertia, &smoke->yinertia);\n\t}\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/weapons/missile.fdh",
    "content": "//hash:52b1c23b\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/weapons/missile.cpp]-------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//--------------[referenced from ai/weapons/missile.cpp]-------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//--------------[referenced from ai/weapons/missile.cpp]-------------//\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//--------------[referenced from ai/weapons/missile.cpp]-------------//\nObject *damage_enemies(Object *o, uint32_t flags_to_exclude);\nvoid shot_dissipate(Object *o, int effectno);\nint damage_all_enemies_in_bb(Object *o, uint32_t flags_to_exclude);\n\n\n/* located in ai/weapons/missile.cpp */\n\n//--------------[referenced from ai/weapons/missile.cpp]-------------//\nvoid ai_missile_shot(Object *o);\nvoid ai_missile_boom_spawner(Object *o);\nstatic void missilehitsmoke(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/weapons/missile.cpp]-------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/weapons/missile.cpp]-------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/weapons/nemesis.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"nemesis.fdh\"\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_NEMESIS_SHOT, ai_nemesis_shot);\n\tONTICK(OBJ_NEMESIS_SHOT_CURLY, ai_nemesis_shot);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_nemesis_shot(Object *o)\n{\n\tif (run_shot(o, (o->shot.level != 2)))\n\t\treturn;\n\t\n\t// smoke trails on level 1\n\tif (o->shot.level == 0)\n\t{\n\t\t// observe, first smokecloud is on 3rd frame;\n\t\t// it goes BLUE, YELLOW, BLUE--that's when the first cloud appears.\n\t\tif ((++o->timer % 4) == 3)\n\t\t{\n\t\t\tint x, y, xi, yi;\n\t\t\t\n\t\t\tswitch(o->shot.dir)\n\t\t\t{\n\t\t\t\tcase RIGHT:\n\t\t\t\t{\n\t\t\t\t\tx = o->Left();\n\t\t\t\t\ty = o->CenterY();\n\t\t\t\t\txi = 0x200;\n\t\t\t\t\tyi = random(-0x200, 0x200);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase LEFT:\n\t\t\t\t{\n\t\t\t\t\tx = o->Right();\n\t\t\t\t\ty = o->CenterY();\n\t\t\t\t\txi = -0x200;\n\t\t\t\t\tyi = random(-0x200, 0x200);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase UP:\n\t\t\t\t{\n\t\t\t\t\tx = o->CenterX();\n\t\t\t\t\ty = o->Bottom();\n\t\t\t\t\txi = random(-0x200, 0x200);\n\t\t\t\t\tyi = -0x200;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase DOWN:\n\t\t\t\t{\n\t\t\t\t\tx = o->CenterX();\n\t\t\t\t\ty = o->Top();\n\t\t\t\t\txi = random(-0x200, 0x200);\n\t\t\t\t\tyi = 0x200;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tx += o->xinertia;\n\t\t\ty += o->yinertia;\n\t\t\t\n\t\t\tObject *smoke = CreateObject(x, y, OBJ_SMOKE_CLOUD);\n\t\t\tsmoke->xinertia = xi;\n\t\t\tsmoke->yinertia = yi;\n\t\t\tsmoke->PushBehind(o);\n\t\t\t\n\t\t\tif (o->timer2 == 0)\n\t\t\t{\n\t\t\t\tsmoke->frame = 3;\n\t\t\t\to->timer2 = 1;\n\t\t\t}\n\t\t\telse if (random(0, 1))\n\t\t\t{\n\t\t\t\tsmoke->frame = 1;\n\t\t\t}\n\t\t}\n\t}\n\t\n\to->frame ^= 1;\n}\n\n\n\n"
  },
  {
    "path": "ai/weapons/nemesis.fdh",
    "content": "//hash:8e5ea205\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/weapons/nemesis.cpp]-------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//--------------[referenced from ai/weapons/nemesis.cpp]-------------//\nuint8_t run_shot(Object *o, bool destroys_blocks);\n\n\n/* located in ai/weapons/nemesis.cpp */\n\n//--------------[referenced from ai/weapons/nemesis.cpp]-------------//\nvoid ai_nemesis_shot(Object *o);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from ai/weapons/nemesis.cpp]-------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/weapons/polar_mgun.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"polar_mgun.fdh\"\n\n// code for both Polar Star _AND_ MGun. The way I handle trails on level 2 & 3 mgun shots\n// is a little weird, but it is already written and works ok, so leaving it for now.\n\n// when we hit something, level 2&3 mgun shots enter this state instead of immediately\n// destroying themselves so that they act as a \"marker\" for the trails, so the trails\n// know when to delete themselves.\n#define STATE_SHOT_HIT\t\t\t\t100\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_POLAR_SHOT, ai_polar_shot);\n\tONTICK(OBJ_MGUN_L1_SHOT, ai_polar_shot);\n\t\n\tONTICK(OBJ_MGUN_LEADER, ai_polar_shot);\n\tONTICK(OBJ_MGUN_TRAIL, ai_mgun_trail);\n\t\n\tONTICK(OBJ_MGUN_SPAWNER, ai_mgun_spawner);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_polar_shot(Object *o)\n{\n\t// flying/active state (as opposed to mgun leaders being a marker for their trails)\n\tif (o->state == 0)\n\t{\n\t\tif (damage_enemies(o))\n\t\t{\n\t\t\to->state = STATE_SHOT_HIT;\n\t\t}\n\t\telse if (IsBlockedInShotDir(o))\n\t\t{\n\t\t\tshot_spawn_effect(o, EFFECT_STARSOLID);\n\t\t\to->state = STATE_SHOT_HIT;\n\t\t\t\n\t\t\tif (!shot_destroy_blocks(o))\n\t\t\t{\n\t\t\t\tsound(SND_SHOT_HIT);\n\t\t\t}\n\t\t}\n\t\telse if (--o->shot.ttl < 0)\n\t\t{\n\t\t\tshot_spawn_effect(o, EFFECT_STARPOOF);\n\t\t\to->state = STATE_SHOT_HIT;\n\t\t}\n\t}\n\t\n\t// have we hit something? if so, stick around awhile as a marker for\n\t// any machine-gun layers which may be trailing us.\n\tif (o->state == STATE_SHOT_HIT)\n\t{\n\t\t// is this a layered machine gun shot? if so, we gotta get fancy\n\t\tif (o->type == OBJ_MGUN_LEADER)\n\t\t{\n\t\t\tif (o->timer == 0)\n\t\t\t{\t// stick around for a frame, visible, at the spot we hit at\n\t\t\t\to->xmark = o->xinertia;\t\t// save for next tick\n\t\t\t\to->ymark = o->yinertia;\n\t\t\t\to->xinertia = o->yinertia = 0;\n\t\t\t}\n\t\t\telse if (o->timer == 1)\n\t\t\t{\t// go invisible, and move ourselves one more tick in the direction we\n\t\t\t\t// were traveling. this ensures that our trails don't disappear in mid-air.\n\t\t\t\to->invisible = true;\n\t\t\t\t\n\t\t\t\t// I don't know why we need this check. It's finicky and I just\n\t\t\t\t// discovered it's necessity empirically.\n\t\t\t\t//if (o->shot.dir == RIGHT || o->shot.dir == DOWN)\n\t\t\t\t{\n\t\t\t\t//\to->x += o->xmark;\n\t\t\t\t//\to->y += o->ymark;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// then wait idle for a moment so any layers trailing us can see where to stop at--\n\t\t\t// this timer value must be greater than the highest possible # of trailing layers\n\t\t\tif (++o->timer > 8)\n\t\t\t\to->Delete();\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->Delete();\n\t\t}\n\t}\n}\n\n// the trails of a machine-gun L2 or L3 shot\nvoid ai_mgun_trail(Object *o)\n{\n\t// linkedobject points to the leader\n\tASSERT(o->linkedobject != NULL);\n\t\n\t// check if the leader has hit something\n\tif (o->linkedobject->state == STATE_SHOT_HIT)\n\t{\n\t\tbool passed_leader;\n\t\t\n\t\t// dissappear as we pass the point it hit at\n\t\tswitch(o->shot.dir)\n\t\t{\n\t\t\tcase RIGHT: passed_leader = ((o->Right() >> CSF) >= (o->linkedobject->Right() >> CSF)); break;\n\t\t\tcase LEFT:  passed_leader = ((o->Left() >> CSF) <= (o->linkedobject->Left() >> CSF)); break;\n\t\t\tcase UP:    passed_leader = ((o->Top() >> CSF) <= (o->linkedobject->Top() >> CSF)); break;\n\t\t\tcase DOWN:  passed_leader = ((o->Bottom() >> CSF) >= (o->linkedobject->Bottom() >> CSF)); break;\n\t\t}\n\t\t\n\t\tif (passed_leader)\n\t\t\to->Delete();\n\t}\n}\n\n// this invisible object is dropped by the player every time he fires an L2/3 machine-gun shot.\n// it spits out the leader, then the trails, one per frame in order, forming the complete\n// level 2 or 3 machine-gun blast.\nvoid ai_mgun_spawner(Object *o)\n{\nObject *shot;\n\t\n\tif (!o->timer)\n\t{\t// first layer (leader)\n\t\tshot = CreateObject(o->x, o->y, OBJ_MGUN_LEADER);\n\t\to->linkedobject = shot;\n\t}\n\telse\n\t{\t// subsequent layers (trail)\n\t\tshot = CreateObject(o->x, o->y, OBJ_MGUN_TRAIL);\n\t\tshot->linkedobject = o->linkedobject;\n\t}\n\t\n\t// fire next layer\n\tSetupBullet(shot, o->x, o->y, o->mgun.bultype, o->dir);\n\t\n\t// apply the wave\n\tif (o->dir==UP || o->dir==DOWN)\n\t\tshot->xinertia = o->mgun.wave_amt;\n\telse\n\t\tshot->yinertia = o->mgun.wave_amt;\n\t\n\t// fire next layer next time\n\to->mgun.bultype++;\n\tif (++o->timer >= o->mgun.nlayers) o->Delete();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n"
  },
  {
    "path": "ai/weapons/polar_mgun.fdh",
    "content": "//hash:646e2d68\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-------------[referenced from ai/weapons/polar_mgun.cpp]-----------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in p_arms.cpp */\n\n//-------------[referenced from ai/weapons/polar_mgun.cpp]-----------//\nvoid SetupBullet(Object *shot, int x, int y, int btype, int dir);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//-------------[referenced from ai/weapons/polar_mgun.cpp]-----------//\nObject *damage_enemies(Object *o, uint32_t flags_to_exclude);\nbool IsBlockedInShotDir(Object *o);\nvoid shot_spawn_effect(Object *o, int effectno);\nbool shot_destroy_blocks(Object *o);\n\n\n/* located in ai/weapons/polar_mgun.cpp */\n\n//-------------[referenced from ai/weapons/polar_mgun.cpp]-----------//\nvoid ai_polar_shot(Object *o);\nvoid ai_mgun_trail(Object *o);\nvoid ai_mgun_spawner(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//-------------[referenced from ai/weapons/polar_mgun.cpp]-----------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/weapons/snake.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"snake.fdh\"\n\n// settings for wavy and acceleration of levels 2 & 3\n#define SNAKE_VERT_SPEED\t\t0x400\n#define SNAKE_ACCEL_SPEED\t\t0x80\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_SNAKE1_SHOT, ai_snake);\n\t\n\tONTICK(OBJ_SNAKE23_SHOT, ai_snake_23);\n\tONTICK(OBJ_SNAKE_TRAIL, ai_snake_trail);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_snake(Object *o)\n{\n\tif (o->state == 0)\n\t{\n\t\to->state = 1;\n\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\n\t\to->frame = random(0, 2);\n\t}\n\t\n\tif (--o->shot.ttl < 0)\n\t{\n\t\t// emphasis wave effect\n\t\tif (o->shot.dir == LEFT || o->shot.dir == RIGHT)\n\t\t\to->y += o->yinertia;\n\t\telse\n\t\t\to->x += o->xinertia;\n\t\t\n\t\tshot_dissipate(o, EFFECT_STARPOOF);\n\t\treturn;\n\t}\n\t\n\t// spin in shot direction\n\tif (o->shot.dir == LEFT)\n\t{\n\t\tif (--o->frame < 0) o->frame = sprites[o->sprite].nframes - 1;\n\t}\n\telse\n\t{\n\t\tif (++o->frame >= sprites[o->sprite].nframes) o->frame = 0;\n\t}\n\t\n\tif (damage_enemies(o))\n\t{\n\t\tshot_dissipate(o, EFFECT_STARPOOF);\n\t}\n}\n\nvoid ai_snake_23(Object *o)\n{\nstatic int wave_dir = 0;\n\n\tif (o->state == 0)\n\t{\n\t\t// start moving off at an angle to our direction.\n\t\t// whether we start off going up or down alternates with each shot.\n\t\tint wavespeed = (wave_dir & 1) ? -SNAKE_VERT_SPEED : SNAKE_VERT_SPEED;\n\t\twave_dir ^= 1;\n\t\t\n\t\tif (o->shot.dir == LEFT || o->shot.dir == RIGHT)\n\t\t{\n\t\t\to->yinertia = wavespeed;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->xinertia = wavespeed;\n\t\t}\n\t\t\n\t\t// ...we don't set state to 1, that'll be done in ai_snake common code\n\t}\n\telse\n\t{\n\t\t// accelerate the shot\n\t\tswitch(o->shot.dir)\n\t\t{\n\t\t\tcase LEFT:  o->xinertia -= 0x80; break;\n\t\t\tcase UP:    o->yinertia -= 0x80; break;\n\t\t\tcase RIGHT: o->xinertia += 0x80; break;\n\t\t\tcase DOWN:  o->yinertia += 0x80; break;\n\t\t}\n\t}\n\t\n\t// periodically abruptly change the wave's direction\n\tif ((++o->timer % 5) == 2)\n\t{\n\t\tif (o->shot.dir == LEFT || o->shot.dir == RIGHT)\n\t\t{\n\t\t\to->yinertia = -o->yinertia;\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->xinertia = -o->xinertia;\n\t\t}\n\t}\n\t\n\t// spawn trails\n\tObject *trail = create_fire_trail(o, OBJ_SNAKE_TRAIL, o->shot.level);\n\ttrail->frame = random(0, 2);\n\ttrail->animtimer = 0;\n\ttrail->yinertia = -0x200;\n\t\n\t// ... and all the basic logic from level 1\n\tai_snake(o);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_snake_trail(Object *o)\n{\n\tif (++o->animtimer > 1)\n\t{\n\t\to->animtimer = 0;\n\t\to->frame += 3;\n\t\t\n\t\tif (o->frame >= sprites[o->sprite].nframes)\n\t\t\to->Delete();\n\t}\n}\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/weapons/snake.fdh",
    "content": "//hash:e16efd5e\n//automatically generated by Makegen\n\n/* located in ai/weapons/weapons.cpp */\n\n//---------------[referenced from ai/weapons/snake.cpp]--------------//\nvoid shot_dissipate(Object *o, int effectno);\nObject *damage_enemies(Object *o, uint32_t flags_to_exclude);\n\n\n/* located in ai/weapons/fireball.cpp */\n\n//---------------[referenced from ai/weapons/snake.cpp]--------------//\nObject *create_fire_trail(Object *o, int objtype, int level);\n\n\n/* located in ai/weapons/snake.cpp */\n\n//---------------[referenced from ai/weapons/snake.cpp]--------------//\nvoid ai_snake(Object *o);\nvoid ai_snake_23(Object *o);\nvoid ai_snake_trail(Object *o);\n\n\n/* located in common/misc.cpp */\n\n//---------------[referenced from ai/weapons/snake.cpp]--------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/weapons/spur.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"spur.fdh\"\n\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_SPUR_SHOT, ai_spur_shot);\n\tONTICK(OBJ_SPUR_TRAIL, ai_spur_trail);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// trail l3 11 shot 12\n// trail l2 6 damage 8\n// trail l1 3 shot 4\n\nvoid ai_spur_shot(Object *o)\n{\n\tif (IsBlockedInShotDir(o))\n\t{\n\t\tif (!shot_destroy_blocks(o))\n\t\t{\n\t\t\tsound(SND_SHOT_HIT);\n\t\t\tshot_spawn_effect(o, EFFECT_STARSOLID);\n\t\t\tshot_spawn_effect(o, EFFECT_SPUR_HIT);\n\t\t\t\n\t\t\to->Delete();\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\tObject *enemy;\n\tif ((enemy = damage_enemies(o)))\n\t{\n\t\to->shot.damage--;\n\t\t\n\t\tif (o->shot.damage <= 0 || (enemy->flags & FLAG_INVULNERABLE))\n\t\t{\n\t\t\to->Delete();\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\tif (--o->shot.ttl < 0)\n\t{\n\t\tshot_spawn_effect(o, EFFECT_STARPOOF);\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\tspur_spawn_trail(o);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nstatic void spur_spawn_trail(Object *o)\n{\nstatic const int trail_sprites[] = \\\n\t{ SPR_TRAIL_SPUR_L1, SPR_TRAIL_SPUR_L2, SPR_TRAIL_SPUR_L3 };\n\t\nstatic const int trail_damage[] = { 3, 6, 11 };\n\n\t// Calculate position to spawn the trail. The shot is 16x8 and the trails are 8x8.\n\t// We want the trail to cover up the back portion of the shot. The less of it we\n\t// cover up the more of a gap there will be when we hit a wall. The gap is adjusted\n\t// so that it does not go too far into the spur_hit circle, but also so that the trail\n\t// does not start too far back from the firing position.\n\tint x = o->x, y = o->y;\n\t\n\tif (o->state == 0)\n\t{\n\t\tif (o->shot.level != 2) o->state = 1;\n\t\tif (o->shot.dir == RIGHT) x += (8<<CSF);\n\t\tif (o->shot.dir == DOWN)  y += (8<<CSF);\n\t}\n\telse\n\t{\n\t\tswitch(o->shot.dir)\n\t\t{\n\t\t\tcase LEFT:  x += (6<<CSF); break;\n\t\t\tcase RIGHT: x += (2<<CSF); break;\n\t\t\tcase UP:    y += (6<<CSF); break;\n\t\t\tcase DOWN:  y += (2<<CSF); break;\n\t\t}\n\t}\n\t\n\tObject *trail = CreateObject(x, y, OBJ_SPUR_TRAIL);\n\t\n\ttrail->shot.damage = trail_damage[o->shot.level];\n\ttrail->sprite = trail_sprites[o->shot.level];\n\t\n\tif ((o->shot.dir == UP || o->shot.dir == DOWN) && o->shot.level != 2)\n\t\ttrail->sprite++;\n}\n\n\nvoid ai_spur_trail(Object *o)\n{\n\tif (++o->timer > 20)\n\t{\n\t\to->frame++;\n\t\tif (o->frame >= sprites[o->sprite].nframes)\n\t\t{\n\t\t\to->Delete();\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t// keep dealing \"damage\" even once we are dealing 0 damage,\n\t// so that the enemy keeps making noise and shaking for as long\n\t// as it remains in the beam.\n\tif (damage_enemies(o, FLAG_INVULNERABLE))\n\t{\n\t\to->shot.damage = 0;\n\t}\n}\n\n\n\n"
  },
  {
    "path": "ai/weapons/spur.fdh",
    "content": "//hash:f4f572b1\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//----------------[referenced from ai/weapons/spur.cpp]--------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//----------------[referenced from ai/weapons/spur.cpp]--------------//\nbool IsBlockedInShotDir(Object *o);\nbool shot_destroy_blocks(Object *o);\nvoid shot_spawn_effect(Object *o, int effectno);\nObject *damage_enemies(Object *o, uint32_t flags_to_exclude);\n\n\n/* located in ai/weapons/spur.cpp */\n\n//----------------[referenced from ai/weapons/spur.cpp]--------------//\nvoid ai_spur_shot(Object *o);\nstatic void spur_spawn_trail(Object *o);\nvoid ai_spur_trail(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//----------------[referenced from ai/weapons/spur.cpp]--------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/weapons/weapons.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"weapons.fdh\"\n\n/*\nvoid c------------------------------() {}\n*/\n\n// a convenience function which does some stuff common to a basic weapon--\n// damage enemies, hit walls, and ttl dispersion.\n// if it deletes the shot, returns nonzero.\nuint8_t run_shot(Object *o, bool destroys_blocks)\n{\n\tif (damage_enemies(o))\n\t{\n\t\to->Delete();\n\t\treturn RS_HIT_ENEMY;\n\t}\n\t\n\tif (IsBlockedInShotDir(o))\n\t{\n\t\tshot_spawn_effect(o, EFFECT_STARSOLID);\n\t\t\n\t\tif (destroys_blocks)\n\t\t{\n\t\t\tif (!shot_destroy_blocks(o))\n\t\t\t\tsound(SND_SHOT_HIT);\n\t\t}\n\t\t\n\t\to->Delete();\n\t\treturn RS_HIT_WALL;\n\t}\n\t\n\tif (--o->shot.ttl < 0)\n\t{\n\t\tshot_spawn_effect(o, EFFECT_STARPOOF);\n\t\to->Delete();\n\t\treturn RS_TTL_EXPIRED;\n\t}\n\t\n\treturn 0;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// checks if the shot passed in has struck an enemy. if so, returns the enemy.\n// optional parameter flags_to_exclude lets you pass through enemies with\n// certain flags set (such as if you don't want to try to hurt invulnerable enemies).\nObject *check_hit_enemy(Object *shot, uint32_t flags_to_exclude)\n{\n\tObject *enemy;\n\tFOREACH_OBJECT(enemy)\n\t{\n\t\tif (enemy->flags & (FLAG_SHOOTABLE | FLAG_INVULNERABLE))\n\t\t{\n\t\t\tif ((enemy->flags & flags_to_exclude) == 0)\n\t\t\t{\n\t\t\t\tif (hitdetect(enemy, shot))\n\t\t\t\t{\n\t\t\t\t\t// can't hit an enemy by shooting up when standing on it\n\t\t\t\t\t// (added for omega battle but good probably in other times too)\n\t\t\t\t\tif (player->riding != enemy || shot->yinertia >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn enemy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn NULL;\n}\n\n\n// checks if the player shot \"o\" has hit an enemy and handles damaging the enemy if so.\n// also, if an enemy was damaged, returns it's handle.\n// multi is for weapons such as the spur and fireball that can \"plow through\" enemies\n// until their damage is exhausted.\nObject *damage_enemies(Object *o, uint32_t flags_to_exclude)\n{\nObject *enemy;\n\n\t// first check if we hit an enemy\n\tif ((enemy = check_hit_enemy(o, flags_to_exclude)))\n\t{\n\t\tif (enemy->flags & FLAG_INVULNERABLE)\n\t\t{\n\t\t\tshot_spawn_effect(o, EFFECT_STARSOLID);\n\t\t\tsound(SND_TINK);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tenemy->DealDamage(o->shot.damage, o);\n\t\t}\n\t\t\n\t\treturn enemy;\n\t}\n\t\n\treturn NULL;\n}\n\n// used by AoE weapons, damages all enemies within the bounding box,\n// not just the first one found. Returns the number of enemies hit.\nint damage_all_enemies_in_bb(Object *o, uint32_t flags_to_exclude)\n{\nObject *enemy;\nint count = 0;\n\n\tFOREACH_OBJECT(enemy)\n\t{\n\t\tif (enemy->flags & (FLAG_SHOOTABLE | FLAG_INVULNERABLE))\n\t\t{\n\t\t\tif ((enemy->flags & flags_to_exclude) == 0)\n\t\t\t{\n\t\t\t\tif (hitdetect(enemy, o))\n\t\t\t\t{\n\t\t\t\t\tif (enemy->flags & FLAG_INVULNERABLE)\n\t\t\t\t\t{\n\t\t\t\t\t\tshot_spawn_effect(o, EFFECT_STARSOLID);\n\t\t\t\t\t\tsound(SND_TINK);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tenemy->DealDamage(o->shot.damage, o);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn count;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// spawn an effect at a shot's center point\nvoid shot_spawn_effect(Object *o, int effectno)\n{\nint x, y;\n\n\t// Nemesis shots are very long so just centering the star doesn't look right.\n\t// I could have gone off of aspect ratio but wanted to keep missiles the same\n\t// and not risk breaking any older weapons.\n\tif ((o->type == OBJ_NEMESIS_SHOT && o->shot.level != 2) || \\\n\t\t(o->type == OBJ_MGUN_LEADER))\n\t{\n\t\tswitch(o->shot.dir)\n\t\t{\n\t\t\tcase LEFT:\n\t\t\t\tx = o->x;\n\t\t\t\ty = o->CenterY();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase RIGHT:\n\t\t\t\tx = (o->x + o->Width());\n\t\t\t\ty = o->CenterY();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase UP:\n\t\t\t\tx = o->CenterX();\n\t\t\t\ty = o->y;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase DOWN:\n\t\t\t\tx = o->CenterX();\n\t\t\t\ty = (o->y + o->Height());\n\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n\t\tx = o->CenterX();\n\t\ty = o->CenterY();\n\t}\n\t\n\tif (effectno == EFFECT_STARSOLID || effectno == EFFECT_SPUR_HIT)\n\t{\t// embed it in the wall, instead of the spot where we hit at\n\t\tswitch(o->shot.dir)\n\t\t{\n\t\t\tcase RIGHT: x += 0x400; break;\n\t\t\tcase LEFT:  x -= 0x400; break;\n\t\t\tcase UP:    y -= 0x400; break;\n\t\t\tcase DOWN:  y += 0x400; break;\n\t\t}\n\t}\n\t\n\teffect(x, y, effectno);\n}\n\nvoid shot_dissipate(Object *o, int effectno)\n{\n\tshot_spawn_effect(o, effectno);\n\to->Delete();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n// called when certain kinds of shots hit a wall to see if it was a\n// destroyable brick that they hit.\n// this destroys star-blocks which are touching the shot.\n// returns nonzero if any were destroyed.\nbool shot_destroy_blocks(Object *o)\n{\nint x, y;\nSIFPointList *plist;\n\n\t// select which pointlist to check based on which direction shot is traveling\n\tswitch(o->shot.dir)\n\t{\n\t\tcase LEFT: \tplist = &sprites[o->sprite].block_l; break;\n\t\tcase RIGHT: plist = &sprites[o->sprite].block_r; break;\n\t\tcase UP: \tplist = &sprites[o->sprite].block_u; break;\n\t\tcase DOWN: \tplist = &sprites[o->sprite].block_d; break;\n\t\tdefault:\treturn 0;\n\t}\n\t\n\t// see if we've hit a destroyable block\n\tif (o->CheckAttribute(plist, TA_DESTROYABLE, &x, &y))\n\t{\n\t\tmap.tiles[x][y]--;\n\t\tSmokeCloudsSlow(((x * TILE_W) + (TILE_W / 2)) << CSF, \\\n\t\t\t\t\t\t((y * TILE_H) + (TILE_H / 2)) << CSF, 4);\n\t\t\n\t\tsound(SND_BLOCK_DESTROY);\n\t\tshot_spawn_effect(o, EFFECT_FISHY);\n\t\treturn 1;\n\t}\n\t\n\treturn 0;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// returns nonzero if a shot is blocked in the direction it's traveling\nbool IsBlockedInShotDir(Object *o)\n{\n\tswitch(o->shot.dir)\n\t{\n\t\tcase LEFT:  return o->blockl;\n\t\tcase RIGHT: return o->blockr;\n\t\tcase UP: \treturn o->blocku;\n\t\tcase DOWN: \treturn o->blockd;\n\t}\n\t\n\tstaterr(\"IsBlockedInShotDir(%x): invalid direction %d\", o, o->shot.dir);\n\treturn 0;\n}\n\n\n"
  },
  {
    "path": "ai/weapons/weapons.fdh",
    "content": "//hash:b29df477\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/weapons/weapons.cpp]-------------//\nbool hitdetect(Object *o1, Object *o2);\n\n\n/* located in caret.cpp */\n\n//--------------[referenced from ai/weapons/weapons.cpp]-------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//--------------[referenced from ai/weapons/weapons.cpp]-------------//\nuint8_t run_shot(Object *o, bool destroys_blocks);\nObject *check_hit_enemy(Object *shot, uint32_t flags_to_exclude);\nObject *damage_enemies(Object *o, uint32_t flags_to_exclude);\nint damage_all_enemies_in_bb(Object *o, uint32_t flags_to_exclude);\nvoid shot_spawn_effect(Object *o, int effectno);\nvoid shot_dissipate(Object *o, int effectno);\nbool shot_destroy_blocks(Object *o);\nbool IsBlockedInShotDir(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//--------------[referenced from ai/weapons/weapons.cpp]-------------//\nvoid SmokeCloudsSlow(int x, int y, int nclouds);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/weapons/weapons.cpp]-------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//--------------[referenced from ai/weapons/weapons.cpp]-------------//\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "ai/weapons/weapons.h",
    "content": "\n#ifndef _WEAPONS_H\n#define _WEAPONS_H\n\n#include \"../stdai.h\"\n\nuint8_t run_shot(Object *o, bool destroys_blocks);\nenum run_shot_result\n{\n\tRS_NONE = 0,\n\tRS_HIT_ENEMY,\n\tRS_HIT_WALL,\n\tRS_TTL_EXPIRED\n};\n\nObject *check_hit_enemy(Object *o, uint32_t flags_to_exclude=0);\nObject *damage_enemies(Object *o, uint32_t flags_to_exclude=0);\nint damage_multiple_enemies(Object *o, uint32_t flags_to_exclude=0);\n\nvoid shot_spawn_effect(Object *o, int effectno);\nvoid shot_dissipate(Object *o, int effectno = EFFECT_STARPOOF);\nbool shot_destroy_blocks(Object *o);\n\nbool IsBlockedInShotDir(Object *o);\n\n// ---------------------------------------\n\n// from Fireball code, shared with Snake\nObject *create_fire_trail(Object *o, int objtype, int level);\n\n\n#endif\n"
  },
  {
    "path": "ai/weapons/whimstar.cpp",
    "content": "\n#include \"weapons.h\"\n#include \"whimstar.h\"\n#include \"whimstar.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_WHIMSICAL_STAR, ai_whimsical_star);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid init_whimstar(WhimsicalStar *wh)\n{\n\t// this offset kickstarts them into orbiting at a sufficient distance\n\tint px = player->Right();// + 0x1000;\n\tint py = player->Bottom();// + 0x1000;\n\t\n\tfor(int i=0;i<MAX_WHIMSTARS;i++)\n\t{\n\t\twh->stars[i].x = px;\n\t\twh->stars[i].y = py;\n\t}\n}\n\nvoid add_whimstar(WhimsicalStar *wh)\n{\n\tif (wh->nstars < MAX_WHIMSTARS)\n\t\twh->nstars++;\n}\n\nvoid remove_whimstar(WhimsicalStar *wh)\n{\n\tif (wh->nstars > 0)\n\t\twh->nstars--;\n}\n\nvoid run_whimstar(WhimsicalStar *wh)\n{\nWhimstar *stars = wh->stars;\nint i;\n\n\tif (++wh->stariter > 2)\n\t\twh->stariter = 0;\n\t\n\tfor(i=0;i<MAX_WHIMSTARS;i++)\n\t{\n\t\tint tgtx, tgty;\n\t\t\n\t\t// first star follows player,\n\t\t// subsequent stars follow the previous star\n\t\tif (i == 0)\n\t\t{\n\t\t\ttgtx = player->CenterX();\n\t\t\ttgty = player->CenterY();\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttgtx = stars[i - 1].x;\n\t\t\ttgty = stars[i - 1].y;\n\t\t}\n\t\t\n\t\tstars[i].xinertia += (stars[i].x < tgtx) ? 0x80 : -0x80;\n\t\tstars[i].yinertia += (stars[i].y < tgty) ? 0xAA : -0xAA;\n\t\t\n\t\tif (stars[i].xinertia > 0xA00)  stars[i].xinertia = 0xA00;\n\t\tif (stars[i].xinertia < -0xA00) stars[i].xinertia = -0xA00;\n\t\tif (stars[i].yinertia > 0xA00)  stars[i].yinertia = 0xA00;\n\t\tif (stars[i].yinertia < -0xA00) stars[i].yinertia = -0xA00;\n\t\t\n\t\tstars[i].x += stars[i].xinertia;\n\t\tstars[i].y += stars[i].yinertia;\n\t\t\n\t\tif (player->equipmask & EQUIP_WHIMSTAR)\n\t\t{\n\t\t\tif (i < wh->nstars && i == wh->stariter)\n\t\t\t{\n\t\t\t\tCreateObject(stars[i].x, stars[i].y, OBJ_WHIMSICAL_STAR);\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid draw_whimstars(WhimsicalStar *wh)\n{\nWhimstar *stars = wh->stars;\nint i;\nint scr_x, scr_y;\n\tfor(i=0;i<wh->nstars;i++)\n    {\n        scr_x = (stars[i].x >> CSF) - (map.displayed_xscroll >> CSF);\n        scr_y = (stars[i].y >> CSF) - (map.displayed_yscroll >> CSF);\n\n\t\tdraw_sprite_at_dp(scr_x, scr_y, SPR_WHIMSICAL_STAR, i);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// invisible trail object left by whimsical star which damages enemies\nvoid ai_whimsical_star(Object *o)\n{\n\tObject *enemy = check_hit_enemy(o);\n\tif (enemy)\n\t{\n\t\tif (!(enemy->flags & FLAG_INVULNERABLE))\n\t\t{\n\t\t\tenemy->DealDamage(1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\teffect(o->x, o->y, EFFECT_STARSOLID);\n\t\t\tsound(SND_TINK);\n\t\t}\n\t\t\n\t\to->Delete();\n\t}\n\telse if (o->state == 1)\n\t{\n\t\to->Delete();\n\t}\n\telse\n\t{\n\t\to->invisible = true;\n\t\to->state = 1;\n\t}\n}\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/weapons/whimstar.fdh",
    "content": "//hash:cbbcdfc9\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------[referenced from ai/weapons/whimstar.cpp]------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//--------------[referenced from ai/weapons/whimstar.cpp]------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/weapons/weapons.cpp */\n\n//--------------[referenced from ai/weapons/whimstar.cpp]------------//\nObject *check_hit_enemy(Object *shot, uint32_t flags_to_exclude);\n\n\n/* located in ai/weapons/whimstar.cpp */\n\n//--------------[referenced from ai/weapons/whimstar.cpp]------------//\nvoid init_whimstar(WhimsicalStar *wh);\nvoid add_whimstar(WhimsicalStar *wh);\nvoid remove_whimstar(WhimsicalStar *wh);\nvoid run_whimstar(WhimsicalStar *wh);\nvoid draw_whimstars(WhimsicalStar *wh);\nvoid ai_whimsical_star(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//--------------[referenced from ai/weapons/whimstar.cpp]------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/weapons/whimstar.h",
    "content": "\n#ifndef _WHIMSTAR_H\n#define _WHIMSTAR_H\n\n\n#define MAX_WHIMSTARS\t\t\t3\n\nstruct Whimstar\n{\n\tint x, y;\n\tint xinertia, yinertia;\n};\n\nstruct WhimsicalStar\n{\n\tWhimstar stars[MAX_WHIMSTARS];\n\tint nstars;\n\tint stariter;\n};\n\n\n\n#endif\n"
  },
  {
    "path": "ai/weed/balrog_boss_flying.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"balrog_boss_flying.fdh\"\n\n#define STEPS_TO_PLAYER\t\t\t100\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_BALROG_BOSS_FLYING, ai_balrog_boss_flying);\n\tONDEATH(OBJ_BALROG_BOSS_FLYING, ondeath_balrog_boss_flying);\n\t\n\tONTICK(OBJ_BALROG_SHOT_BOUNCE, ai_balrog_shot_bounce);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_balrog_boss_flying(Object *o)\n{\n\tenum\n\t{\n\t\tINIT = 0,\n\t\tWAIT_BEGIN,\n\t\t\n\t\tSHOOT_PLAYER,\n\t\tJUMP_BEGIN,\n\t\tJUMP_UP,\n\t\tFLYING,\n\t\tJUMP_END,\n\t\tLANDED\n\t};\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = WAIT_BEGIN;\n\t\t\to->timer = 0;\n\t\tcase WAIT_BEGIN:\t// wait at start of battle\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\tif (++o->timer > 12)\n\t\t\t{\n\t\t\t\to->state = SHOOT_PLAYER;\n\t\t\t\to->timer = 0;\n\t\t\t\to->timer2 = 0;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase SHOOT_PLAYER:\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\tif (++o->timer > 16)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 1;\n\t\t\t\t\n\t\t\t\tEmFireAngledShot(o, OBJ_IGOR_SHOT, 16, 0x200);\n\t\t\t\tsound(SND_EM_FIRE);\n\t\t\t\t\n\t\t\t\tif (++o->timer2 > 3)\t// number of shots to fire\n\t\t\t\t{\n\t\t\t\t\to->state = JUMP_BEGIN;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase JUMP_BEGIN:\t// begin jump\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\tif (++o->timer > 3)\n\t\t\t{\n\t\t\t\to->state = JUMP_UP;\n\t\t\t\to->timer = 0;\n\t\t\t\to->xinertia = (player->x - o->x) / STEPS_TO_PLAYER;\n\t\t\t\to->yinertia = -0x600;\n\t\t\t\to->frame = 3;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase JUMP_UP:\t\t// jumping up\n\t\t{\n\t\t\tif (o->yinertia > 0x200)\n\t\t\t{\n\t\t\t\tif (o->hp <= 60)\n\t\t\t\t{\t// skip flying if low health\n\t\t\t\t\to->state = JUMP_END;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\to->state = FLYING;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\to->ymark = o->y;\n\t\t\t\t\t\n\t\t\t\t\to->frame = 13;\n\t\t\t\t\to->animtimer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase FLYING:\n\t\t{\n\t\t\tif (++o->animtimer > 1)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->frame = (o->frame == 13) ? 14 : 13;\n\t\t\t\t// wings just went down\n\t\t\t\tif (o->frame == 13)\n\t\t\t\t\tsound(SND_EXPLOSION2);\n\t\t\t}\n\t\t\t\n\t\t\tif (++o->timer >= STEPS_TO_PLAYER)\n\t\t\t{\n\t\t\t\to->state = JUMP_END;\n\t\t\t\to->frame = 3;\n\t\t\t}\n\t\t\t\n\t\t\to->yinertia += (o->y >= o->ymark) ? -0x40 : 0x40;\n\t\t\tLIMITY(0x200);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase JUMP_END:\t\t// coming down from jump\n\t\t{\n\t\t\tif ((o->y + (16 << CSF)) < player->y)\n\t\t\t{\n\t\t\t\to->damage = 10;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->damage = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->damage = 0;\n\t\t\t\t\n\t\t\t\tsound(SND_FUNNY_EXPLODE);\n\t\t\t\tquake(30);\n\t\t\t\t\n\t\t\t\tSmokeSide(o, 6, DOWN);\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<8;i++)\n\t\t\t\t{\n\t\t\t\t\tint x = random(o->Left(), o->Right());\n\t\t\t\t\tint y = o->Bottom() - (8 << CSF);\n\t\t\t\t\tObject *shot = CreateObject(x, y, OBJ_BALROG_SHOT_BOUNCE);\n\t\t\t\t\t\n\t\t\t\t\tshot->xinertia = random(-0x400, 0x400);\n\t\t\t\t\tshot->yinertia = random(-0x400, 0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\to->state = LANDED;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase LANDED:\n\t\t{\n\t\t\to->frame = 2;\n\t\t\tif (++o->timer > 3)\n\t\t\t{\n\t\t\t\to->state = SHOOT_PLAYER;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state != FLYING)\n\t\to->yinertia += 0x33;\n\t\n\tLIMITY(0x5FF);\n}\n\nvoid ondeath_balrog_boss_flying(Object *o)\n{\n\to->xinertia = 0;\n\to->flags &= ~FLAG_SHOOTABLE;\n\t\n\tKillObjectsOfType(OBJ_BALROG_SHOT_BOUNCE);\n\tKillObjectsOfType(OBJ_IGOR_SHOT);\n}\n\n\nvoid ai_balrog_shot_bounce(Object *o)\n{\n\tANIMATE(2, 0, 1);\n\t\n\tif (o->blockd)\n\t\to->yinertia = -0x400;\n\t\n\to->yinertia += 42;\n\t\n\tif ((o->blockl && o->xinertia < 0) || \\\n\t\t(o->blockr && o->xinertia > 0) || \\\n\t\t++o->timer > 250)\n\t{\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_FISHY);\n\t\to->Delete();\n\t}\n}\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/weed/balrog_boss_flying.fdh",
    "content": "//hash:4e9001fb\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//----------[referenced from ai/weed/balrog_boss_flying.cpp]---------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//----------[referenced from ai/weed/balrog_boss_flying.cpp]---------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//----------[referenced from ai/weed/balrog_boss_flying.cpp]---------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in trig.cpp */\n\n//----------[referenced from ai/weed/balrog_boss_flying.cpp]---------//\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//----------[referenced from ai/weed/balrog_boss_flying.cpp]---------//\nvoid KillObjectsOfType(int type);\n\n\n/* located in ai/weed/balrog_boss_flying.cpp */\n\n//----------[referenced from ai/weed/balrog_boss_flying.cpp]---------//\nvoid ai_balrog_boss_flying(Object *o);\nvoid ondeath_balrog_boss_flying(Object *o);\nvoid ai_balrog_shot_bounce(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//----------[referenced from ai/weed/balrog_boss_flying.cpp]---------//\nvoid SmokeSide(Object *o, int nclouds, int dir);\n\n\n/* located in sound/sound.cpp */\n\n//----------[referenced from ai/weed/balrog_boss_flying.cpp]---------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//----------[referenced from ai/weed/balrog_boss_flying.cpp]---------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "ai/weed/frenzied_mimiga.cpp",
    "content": "\n// frenzied mimiga subboss seen in Grasstown Hut\n#include \"../stdai.h\"\n#include \"frenzied_mimiga.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_FRENZIED_MIMIGA, ai_frenzied_mimiga);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_frenzied_mimiga(Object *o)\n{\n\t/*debug(\"state %d\", o->state);\n\tdebug(\"timer %d\", o->timer);\n\tdebug(\"xi %d\", o->xinertia);\n\tdebug(\"yi %d\", o->yinertia);*/\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->xinertia = 0;\n\t\t\to->state = 1;\n\t\t\to->timer = 0;\n\t\t\to->timer2 = 0;\n\t\tcase 1:\n\t\t{\t// waiting-- attack once player gets too close or shoots us\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\tif (pdistlx(96<<CSF) && pdistly2(96<<CSF, 32<<CSF))\n\t\t\t\t{\n\t\t\t\t\to->state = 10;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (o->shaketime)\n\t\t\t\t{\n\t\t\t\t\to->state = 10;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t{\t// woken up-- preparing to attack\n\t\t\tFACEPLAYER;\n\t\t\to->frame = 1;\n\t\t\t\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 20;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\n\t\t{\t// hop, hop, lunge...\n\t\t\to->damage = 0;\n\t\t\to->xinertia = 0;\n\t\t\t\n\t\t\tANIMATE_FWD(2);\n\t\t\tif (o->frame >= 3)\n\t\t\t{\n\t\t\t\tFACEPLAYER;\n\t\t\t\tXMOVE(0x200);\n\t\t\t\t\n\t\t\t\tif (++o->timer2 >= 3)\t// lunge/bite\n\t\t\t\t{\n\t\t\t\t\to->timer2 = 0;\n\t\t\t\t\t\n\t\t\t\t\tsound(SND_JAWS);\n\t\t\t\t\to->frame = 4;\n\t\t\t\t\to->damage = 5;\n\t\t\t\t\to->xinertia *= 2;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\to->state = 21;\n\t\t\t\to->yinertia = -0x400;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase 21:\t// doing jump or lunge\n\t\t{\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\tsound(SND_THUD);\n\t\t\t\t\n\t\t\t\to->state = 20;\n\t\t\t\to->frame = 1;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->damage = 0;\n\t\t\t\t\n\t\t\t\t// if player too far away return to wait state\n\t\t\t\tif (!pdistlx(144<<CSF) || !pdistly2(144<<CSF, 72<<CSF))\n\t\t\t\t{\n\t\t\t\t\to->state = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t\t// jumping out of fireplace (set by script)\n\t\t{\n\t\t\tSmokeClouds(o, 8, 16, 16);\n\t\t\to->frame = 0;\n\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 50:\t\t// killed (as boss, in Grasstown Hut) (set by script)\n\t\t{\n\t\t\tsound(SND_ENEMY_HURT);\n\t\t\to->frame = 4;\n\t\t\to->damage = 0;\n\t\t\to->flags &= ~(FLAG_SHOOTABLE | FLAG_SOLID_MUSHY);\n\t\t\t\n\t\t\to->state = 51;\n\t\t\to->yinertia = -0x200;\n\t\t}\n\t\tcase 51:\n\t\t{\n\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t{\n\t\t\t\to->frame = 5;\n\t\t\t\to->xinertia = 0;\n\t\t\t\tsound(SND_THUD);\n\t\t\t\t\n\t\t\t\to->state = 52;\t// falls slower\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state == 52)\n\t\to->yinertia += 0x20;\n\telse\n\t\to->yinertia += 0x40;\n\t\n\tLIMITY(0x5ff);\n}\n\n\n\n"
  },
  {
    "path": "ai/weed/frenzied_mimiga.fdh",
    "content": "//hash:f0cdb4ba\n//automatically generated by Makegen\n\n/* located in ai/weed/frenzied_mimiga.cpp */\n\n//------------[referenced from ai/weed/frenzied_mimiga.cpp]----------//\nvoid ai_frenzied_mimiga(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//------------[referenced from ai/weed/frenzied_mimiga.cpp]----------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//------------[referenced from ai/weed/frenzied_mimiga.cpp]----------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "ai/weed/weed.cpp",
    "content": "\n#include \"../stdai.h\"\n#include \"weed.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_CRITTER_FLYING, ai_critter);\n\tONTICK(OBJ_POWER_CRITTER, ai_critter);\n\t\n\tONTICK(OBJ_BAT_HANG, ai_bat_hang);\n\tONTICK(OBJ_BAT_CIRCLE, ai_bat_circle);\n\t\n\tONTICK(OBJ_JELLY, ai_jelly);\n\tONTICK(OBJ_GIANT_JELLY, ai_giant_jelly);\n\t\n\tONTICK(OBJ_MANNAN, ai_mannan);\n\tONTICK(OBJ_MANNAN_SHOT, ai_mannan_shot);\n\t\n\tONTICK(OBJ_FROG, ai_frog);\n\tONTICK(OBJ_MINIFROG, ai_frog);\n\t\n\tONTICK(OBJ_SANTAS_KEY, ai_animate2);\n\t\n\tONTICK(OBJ_HEY_SPAWNER, ai_hey_spawner);\n\tONTICK(OBJ_MOTORBIKE, ai_motorbike);\n\t\n\tONTICK(OBJ_POWERCOMP, ai_animate3);\n\tONTICK(OBJ_POWERSINE, ai_animate1);\n\tONTICK(OBJ_MALCO, ai_malco);\n\tONTICK(OBJ_MALCO_BROKEN, ai_malco_broken);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_critter(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tif (o->type == OBJ_POWER_CRITTER)\n\t\t\t{\t// altered physics for Power Critter\n\t\t\t\to->critter.jumpheight = 0x2800;\n\t\t\t\to->critter.jumpgrav = 0x1C;\n\t\t\t\to->critter.falldmg = 12;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->critter.jumpheight = 0;\n\t\t\t\to->critter.jumpgrav = 0x40;\n\t\t\t\to->critter.falldmg = 3;\n\t\t\t\t\n\t\t\t\tif (o->type == OBJ_CRITTER_HOPPING_BLUE || \t\t\t// first cave\n\t\t\t\t\to->type == OBJ_CRITTER_HOPPING_GREEN || \t\t// egg 1\n\t\t\t\t\to->type == OBJ_CRITTER_HOPPING_AQUA ||\t\t\t// egg 2\n\t\t\t\t\to->type == OBJ_CRITTER_HOPPING_RED)\t\t\t\t// last cave\n\t\t\t\t{\n\t\t\t\t\to->critter.canfly = false;\n\t\t\t\t\t\n\t\t\t\t\t// critters in egg1 only 2 dmg\n\t\t\t\t\tif (o->type == OBJ_CRITTER_HOPPING_GREEN)\n\t\t\t\t\t\to->critter.falldmg = 2;\n\t\t\t\t\t\n\t\t\t\t\t// critters in First Cave don't jump as high\n\t\t\t\t\tif (o->type != OBJ_CRITTER_HOPPING_BLUE)\n\t\t\t\t\t{\n\t\t\t\t\t\to->critter.jumpgrav = 0x2C;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// critters are purple in Maze\n\t\t\t\t\to->sprite = SPR_CRITTER_FLYING_CYAN;\n\t\t\t\t\t\n\t\t\t\t\to->critter.canfly = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\to->state = 1;\n\t\t} //fall thru\n\t\tcase 1:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\t\n\t\t\tif (o->timer >= 8)\n\t\t\t{\n\t\t\t\tint attack_dist = (o->critter.canfly) ? (96 << CSF) : (64 << CSF);\n\t\t\t\t\n\t\t\t\t// close enough to attack?\n\t\t\t\tif (pdistlx(attack_dist) && pdistly2(96<<CSF, 48<<CSF))\n\t\t\t\t{\n\t\t\t\t\to->state = 2;\n\t\t\t\t\to->frame = 0;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t\telse if (pdistlx(attack_dist + (32<<CSF)) && pdistly2(128<<CSF, 48<<CSF))\n\t\t\t\t{\t// no, but close enough to look up at \"attention\" and watch player\n\t\t\t\t\tFACEPLAYER;\n\t\t\t\t\to->frame = 1;\n\t\t\t\t\to->timer = 8;\t// reset timer to stop watching\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// once a little time has passed stop watching him if he turns his back\n\t\t\t\t\tif ((o->x > player->x && player->dir==LEFT) || \\\n\t\t\t\t\t\t(o->x < player->x && player->dir==RIGHT))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (++o->timer >= 150)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\to->frame = 0;\n\t\t\t\t\t\t\to->timer = 8;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse o->timer = 8;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->timer++;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->shaketime)\n\t\t\t{\t// attack if shot\n\t\t\t\to->state = 2;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// start jump\n\t\t{\n\t\t\tif (++o->timer > 8)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->frame = 2;\n\t\t\t\to->yinertia = -1228;\n\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t\t\n\t\t\t\tFACEPLAYER;\n\t\t\t\tXMOVE(0x100);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// jumping\n\t\t{\n\t\t\t// enter flying phase as we start to come down or\n\t\t\t// if we hit the ceiling.\n\t\t\tif (o->yinertia > 0x100 || o->blocku)\n\t\t\t{\n\t\t\t\t// during flight we will sine-wave oscilliate around this position\n\t\t\t\to->ymark = (o->y - o->critter.jumpheight);\n\t\t\t\t\n\t\t\t\to->state = 4;\n\t\t\t\to->frame = 3;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->blockd && o->yinertia >= 0)\n\t\t\t\t{\t// jumped onto a platform before we got to fly--land immediately\n\t\t\t\t\tgoto landed;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t// fall-thru\n\t\tcase 4:\t\t// flying\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\t// time to come down yet?\n\t\t\t// (come down immediately if we are not one of the flying critters)\n\t\t\tif (!o->critter.canfly || \\\n\t\t\t\to->blockl || o->blockr || o->blocku || \\\n\t\t\t\t++o->timer > 100)\n\t\t\t{\n\t\t\t\to->damage = o->critter.falldmg;\t\t\t// increased damage if falls on player\n\t\t\t\to->state = 5;\n\t\t\t\to->frame = 2;\n\t\t\t\to->yinertia /= 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// run the propeller\n\t\t\t\tANIMATE(0, 3, 5);\n\t\t\t\tif ((o->timer & 3)==1) sound(SND_CRITTER_FLY);\n\t\t\t\t\n\t\t\t\tif (o->blockd) o->yinertia = -0x200;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 5:\t\t// coming down from flight\n\t\t{\n\t\t\tif (o->blockd)\n\t\t\t{\t// landed\nlanded: ;\n\t\t\t\to->damage = 2;\t\t\t// reset to normal damage\n\t\t\t\to->state = 1;\n\t\t\t\t\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\t\n\t\t\t\tsound(SND_THUD);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state == 4)\t\t// flying\n\t{\n\t\t// fly towards player\n\t\to->xinertia += (o->x > player->x) ? -0x20 : 0x20;\n\t\t// sine-wave oscillate\n\t\to->yinertia += (o->y > o->ymark) ? -0x10 : 0x10;\n\t\t\n\t\tLIMITX(0x200);\n\t\tLIMITY(0x200);\n\t}\n\telse if (o->state == 3 && o->yinertia < 0)\t// jumping up\n\t{\n\t\to->yinertia += o->critter.jumpgrav;\n\t}\n\telse\n\t{\n\t\to->yinertia += 0x40;\n\t}\n\t\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_bat_hang(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\tcase 1:\t\t// hanging and waiting\n\t\t\tif (!random(0, 100))\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (pdistlx(0x1000) && pdistly2(0x1000, 0x9000))\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->state = 3;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// blinking\n\t\t\tif (++o->timer > 8)\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// at attention\n\t\t\to->frame = 0;\n\t\t\tif (o->shaketime || pdistlx(0x2800))\n\t\t\t{\n\t\t\t\to->frame = 1;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->state = 4;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 4:\t\t// falling\n\t\t\to->yinertia += 0x20;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\to->timer++;\n\t\t\tif (o->timer > 20 || o->blockd)\n\t\t\t{\n\t\t\t\tif (o->blockd || ((player->y - 0x2000) < o->y))\n\t\t\t\t{\t// start flying\n\t\t\t\t\to->animtimer = 0;\n\t\t\t\t\to->frame = 2;\n\t\t\t\t\to->state = 5;\n\t\t\t\t\to->ymark = o->y;\n\t\t\t\t\tif (o->blockd) o->yinertia = -0x200;\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 5:\t\t// flying\n\t\t\tANIMATE(1, 2, 4);\n\t\t\tFACEPLAYER;\n\t\t\t\n\t\t\to->xinertia += (o->x > player->x) ? -0x20 : 0x20;\n\t\t\to->yinertia += (o->y > o->ymark) ? -0x10 : 0x10;\n\t\t\t\n\t\t\tLIMITX(0x200);\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\tif (o->blockd) o->yinertia = -0x200;\n\t\t\tif (o->blockr) o->yinertia = 0x200;\n\t\tbreak;\n\t}\n}\n\nvoid ai_bat_circle(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tuint8_t angle;\n\t\t\to->state = 1;\n\t\t\t\n\t\t\t// set up initial direction and target x,y\n\t\t\tangle = random(0, 255);\n\t\t\to->xinertia = sin_table[angle];\n\t\t\t\n\t\t\tangle += 64;\n\t\t\to->xmark = (o->x + (sin_table[angle] * 8));\n\t\t\t\n\t\t\tangle = random(0, 255);\n\t\t\to->yinertia = sin_table[angle];\n\t\t\t\n\t\t\tangle += 64;\n\t\t\to->ymark = (o->y + (sin_table[angle] * 8));\n\t\t}\n\t\tcase 1:\n\t\t\t// circle around our target point\n\t\t\tANIMATE(1, 2, 4);\n\t\t\tFACEPLAYER;\n\t\t\to->xinertia += (o->x > o->xmark) ? -0x10 : 0x10;\n\t\t\to->yinertia += (o->y > o->ymark) ? -0x10 : 0x10;\n\t\t\tLIMITX(0x200);\n\t\t\tLIMITY(0x200);\n\t\t\t\n\t\t\tif (!o->timer2)\n\t\t\t{\n\t\t\t\tif (pdistlx(0x1000) && (player->y > o->y) && pdistly(0xC000))\n\t\t\t\t{\t// dive attack\n\t\t\t\t\to->xinertia /= 2;\n\t\t\t\t\to->yinertia = 0;\n\t\t\t\t\to->state = 2;\n\t\t\t\t\to->frame = 5;\t\t// mouth showing teeth\n\t\t\t\t}\n\t\t\t}\n\t\t\telse o->timer2--;\n\t\tbreak;\n\t\t\n\t\tcase 2:\t// dive attack\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->xinertia *= 2;\n\t\t\t\to->timer2 = 120;\t\t// delay before can dive again\n\t\t\t\to->state = 1;\n\t\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_jelly(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->nxflags |= NXFLAG_SLOW_WHEN_HURT;\n\t\t\to->timer = random(0, 20);\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t\t\n\t\t\to->xinertia = (o->dir == LEFT) ? 0x200 : -0x200;\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t}\n\t\t\telse break;\n\t\t}\n\t\tcase 10:\n\t\t{\n\t\t\tif (++o->timer > 10)\n\t\t\t{\n\t\t\t\to->timer = o->frame = 0;\n\t\t\t\to->state = 11;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 11:\n\t\t{\n\t\t\tif (++o->animtimer > 5)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->frame++;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->frame == 2)\n\t\t\t{\n\t\t\t\to->xinertia += (o->dir == LEFT) ? -0x100 : +0x100;\n\t\t\t\to->yinertia -= 0x200;\n\t\t\t}\n\t\t\telse if (o->frame > 2)\n\t\t\t{\n\t\t\t\to->state = 12;\n\t\t\t\to->frame = 3;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 12:\n\t\t{\n\t\t\to->timer++;\n\t\t\tif (o->y > o->ymark && o->timer > 10)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 10;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\to->dir = (o->x > o->xmark) ? LEFT : RIGHT;\n\t\n\tif (o->blockl) o->dir = RIGHT;\n\tif (o->blockr) o->dir = LEFT;\n\tif (o->blockd) o->yinertia = -0x200;\n\t\n\to->yinertia += 0x20;\n\t\n\tLIMITX(0x100);\n\tLIMITY(0x200);\n}\n\n// Kulala\nvoid ai_giant_jelly(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// frozen/in stasis. waiting for player to shoot.\n\t\t\to->frame = 4;\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\tquake(30);\n\t\t\t\to->state = 10;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// falling\n\t\t{\n\t\t\to->flags |= FLAG_SHOOTABLE;\n\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\t\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->animtimer = 0;\n\t\t\t\to->state = 11;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 11:\t// animate thrust\n\t\t{\n\t\t\tANIMATE_FWD(5);\n\t\t\tif (o->frame >= 3)\n\t\t\t{\n\t\t\t\to->frame = 3;\n\t\t\t\to->state = 12;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 12:\t// thrusting upwards\n\t\t{\n\t\t\to->yinertia = -0x155;\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// shot/freeze over/go invulnerable\n\t\t{\n\t\t\to->frame = 4;\n\t\t\to->xinertia >>= 1;\n\t\t\to->yinertia += 0x20;\n\t\t\t\n\t\t\tif (!o->shaketime)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 30;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->shaketime)\n\t{\n\t\tif (++o->timer3 > 12)\n\t\t{\n\t\t\to->state = 20;\n\t\t\to->frame = 4;\n\t\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\t\to->flags |= FLAG_INVULNERABLE;\n\t\t}\n\t}\n\telse\n\t{\n\t\to->timer3 = 0;\n\t}\n\t\n\tif (o->state >= 10)\n\t{\n\t\tif (o->blockl) { o->timer2 = 50; o->dir = RIGHT; }\n\t\tif (o->blockr) { o->timer2 = 50; o->dir = LEFT; }\n\t\t\n\t\tif (o->timer2 > 0)\n\t\t{\n\t\t\to->timer2--;\n\t\t\tXACCEL(0x80);\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->timer2 = 50;\n\t\t\tFACEPLAYER;\n\t\t}\n\t\t\n\t\to->yinertia += 0x10;\n\t\tif (o->blockd) o->yinertia = -0x300;\n\t}\n\t\n\tLIMITX(0x100);\n\tLIMITY(0x300);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_mannan(Object *o)\n{\n\t// check if we were \"killed\"\n\tif (o->state < 3 && o->hp < 90)\n\t{\n\t\tsound(SND_LITTLE_CRASH);\n\t\tSmokeClouds(o, 8, 12, 12);\n\t\to->SpawnXP(objprop[o->type].xponkill);\n\t\to->flags &= ~FLAG_SHOOTABLE;\n\t\to->state = 3;\n\t\to->timer = 0;\n\t\to->frame = 2;\n\t\to->damage = 0;\n\t}\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\tif (o->shaketime)\n\t\t\t{\n\t\t\t\tSpawnObjectAtActionPoint(o, OBJ_MANNAN_SHOT);\n\t\t\t\to->frame = 1;\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// firing\n\t\t\tif (++o->timer > 20)\n\t\t\t{\n\t\t\t\to->timer = o->state = o->frame = 0;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// dead/blinking\n\t\t\tswitch(++o->timer)\n\t\t\t{\n\t\t\t\tcase 50: case 60: o->frame = 3; break;\n\t\t\t\tcase 53: case 63: o->frame = 2; break;\n\t\t\t\tcase 100: o->state = 4; break;\n\t\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_mannan_shot(Object *o)\n{\n\tXACCEL(0x20);\n\tANIMATE(0, 1, 2);\n\t\n\tif ((o->timer & 3) == 1)\n\t\tsound(SND_IRONH_SHOT_FLY);\n\t\n\tif (++o->timer > 100)\n\t\to->Delete();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// there is an apparent bug on the sprite sheet for this monster:\n//\tright-facing frame 1 is a duplicate of frame 0,\n//\tso the mouth-twitch animation does not work when\n//\tthe frog is facing right.\nvoid ai_frog(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->timer = 0;\n\t\t\to->xinertia = 0;\n\t\t\to->yinertia = 0;\n\t\t\t\n\t\t\t// non-normal dirs are used to indicate that this frog was\n\t\t\t// spawned by balfrog: we are falling out of ceiling during fight\n\t\t\tif (o->dir != LEFT && o->dir != RIGHT)\n\t\t\t{\n\t\t\t\to->dir = random(0, 1) ? LEFT : RIGHT;\n\t\t\t\to->flags |= FLAG_IGNORE_SOLID;\n\t\t\t\t\n\t\t\t\to->state = 3;\n\t\t\t\to->frame = 2;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\to->state = 1;\n\t\t\t}\n\t\t}\n\t\tcase 1:\t\t// standing\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (!random(0, 50))\n\t\t\t{\t// mouth-flitter animation\n\t\t\t\to->state = 2;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t\to->animtimer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// mouth flitter\n\t\t{\n\t\t\tANIMATE(2, 0, 1);\n\t\t\t\n\t\t\tif (++o->timer > 18)\n\t\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// falling out of ceiling during balfrog fight\n\t\t{\n\t\t\tif (++o->timer > 40)\n\t\t\t{\n\t\t\t\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\t\t\t\n\t\t\t\tif (o->blockd)\n\t\t\t\t{\n\t\t\t\t\to->state = 0;\n\t\t\t\t\to->frame = 0;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// jumping\n\t\tcase 11:\n\t\t{\n\t\t\tif (o->blockl && o->xinertia < 0)\n\t\t\t{\n\t\t\t\to->dir = RIGHT;\n\t\t\t\to->xinertia = -o->xinertia;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockr && o->xinertia > 0)\n\t\t\t{\n\t\t\t\to->dir = LEFT;\n\t\t\t\to->xinertia = -o->xinertia;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->state = 0;\n\t\t\t\to->frame = 0;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// random jumping, and jump when shot\n\tif (o->state < 3 && o->timer > 10)\n\t{\n\t\tbool dojump = false;\n\t\t\n\t\tif (o->shaketime)\n\t\t{\n\t\t\tdojump = true;\n\t\t}\n\t\telse if (pdistlx(0x14000) && pdistly(0x8000))\n\t\t{\n\t\t\tif (!random(0, 50))\n\t\t\t{\n\t\t\t\tdojump = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (dojump)\n\t\t{\n\t\t\tFACEPLAYER;\n\t\t\to->state = 10;\n\t\t\to->frame = 2;\n\t\t\to->yinertia = -0x5ff;\n\t\t\t\n\t\t\t// no jumping sound in cutscenes at ending\n\t\t\tif (!player->inputs_locked && !player->disabled)\n\t\t\t\tsound(SND_ENEMY_JUMP);\n\t\t\t\n\t\t\tXMOVE(0x200);\n\t\t}\n\t}\n\t\n\to->yinertia += 0x80;\n\tLIMITY(0x5ff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_hey_spawner(Object *o)\n{\n\tif (!o->state)\n\t{\n\t\teffect(o->x, o->y - (8<<CSF), EFFECT_HEY);\n\t\to->state = 1;\n\t}\n}\n\nvoid ai_motorbike(Object *o)\n{\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// parked\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// kazuma and booster mounted\n\t\t\to->y -= (sprites[SPR_MOTORBIKE_MOUNTED].h - sprites[SPR_MOTORBIKE].h) << CSF;\n\t\t\to->sprite = SPR_MOTORBIKE_MOUNTED;\n\t\t\to->state++;\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// kazuma and booster start the engine\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->timer = 1;\n\t\t\t\n\t\t\to->xmark = o->x;\n\t\t\to->ymark = o->y;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\to->x = o->xmark + (random(-1, 1) << CSF);\n\t\t\to->y = o->ymark + (random(-1, 1) << CSF);\n\t\t\t\n\t\t\tif (++o->timer > 30)\n\t\t\t\to->state = 30;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// kazuma and booster take off\n\t\t{\n\t\t\to->state = 31;\n\t\t\to->timer = 1;\n\t\t\t\n\t\t\to->xinertia = -0x800;\n\t\t\to->ymark = o->y;\n\t\t\t\n\t\t\tsound(SND_MISSILE_HIT);\n\t\t}\n\t\tcase 31:\n\t\t{\n\t\t\to->xinertia += 0x20;\n\t\t\to->timer++;\n\t\t\t\n\t\t\to->y = o->ymark + (random(-1, 1) << CSF);\n\t\t\t\n\t\t\tif (o->timer > 10)  o->dir = RIGHT;\n\t\t\tif (o->timer > 200) o->state = 40;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t\t// flying away (fast out-of-control)\n\t\t{\n\t\t\to->state = 41;\n\t\t\to->timer = 2;\n\t\t\to->dir = LEFT;\n\t\t\to->y -= (48 << CSF);\t\t// move up...\n\t\t\to->xinertia = -0x1000;\t\t// ...and fly fast\n\t\t}\n\t\tcase 41:\n\t\t{\n\t\t\to->timer += 2;\t// makes exhaust sound go faster\n\t\t\tif (o->timer > 1200)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->state >= 20 && (o->timer & 3) == 0)\n\t{\n\t\tsound(SND_FIREBALL);\n\t\t\n\t\t// make exhaust puffs, and make them go out horizontal\n\t\t// instead of straight up as this effect usually does\n\t\tCaret *puff = effect(o->ActionPointX(), o->ActionPointY(), EFFECT_SMOKETRAIL_SLOW);\n\t\tpuff->yinertia = 0;\n\t\tpuff->xinertia = (o->dir == LEFT) ? 0x280 : -0x280;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_malco(Object *o)\n{\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t\to->state = 1;\n\t\t\to->frame = 0;\n\t\t\t\n\t\t\t// smushed into ground, used on re-entry to room\n\t\t\t// if player does not choose to pull him out\n\t\t\t// after Balrog fight\n\t\t\tif (o->dir == RIGHT)\n\t\t\t\to->frame = 5;\n\t\tbreak;\n\t\t\n\t\tcase 10:\n\t\t\to->state = 11;\n\t\t\to->timer = 0;\n\t\t\to->timer = 0;\n\t\t\tSmokeClouds(o, 4, 16, 16);\n\t\tcase 11:\t// beeping and eyes flickering\n\t\t\tif (++o->timer < 100)\n\t\t\t{\n\t\t\t\tif ((o->timer & 1)==0)\n\t\t\t\t{\n\t\t\t\t\tsound(SND_COMPUTER_BEEP);\n\t\t\t\t\to->frame ^= 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (o->timer > 150)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 15;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 15:\t\t// shaking\n\t\t\tif (o->timer & 2)\n\t\t\t{\n\t\t\t\to->x += (1<<CSF);\n\t\t\t\tsound(SND_DOOR);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->x -= (1<<CSF);\n\t\t\t}\n\t\t\tif (++o->timer > 50) o->state = 16;\n\t\tbreak;\n\t\t\n\t\tcase 16:\t\t// stand up\n\t\t\to->state = 17;\n\t\t\to->frame = 2;\n\t\t\to->timer = 0;\n\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\tSmokeClouds(o, 4, 16, 16);\n\t\tcase 17:\n\t\t\tif (++o->timer > 150)\n\t\t\t{\n\t\t\t\to->state = 18;\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 18:\t\t// gawking/bobbing up and down\n\t\t\to->state = 19;\n\t\t\to->timer = 0;\n\t\t\t// go into gawk frame first time\n\t\t\to->animtimer = 999; o->frame = 9;\n\t\tcase 19:\n\t\t\tif (++o->animtimer > 3)\n\t\t\t{\n\t\t\t\to->animtimer = 0;\n\t\t\t\tif (++o->frame > 4) o->frame = 3;\n\t\t\t\tif (o->frame==3) sound(SND_DOOR);\n\t\t\t}\n\t\t\tif (++o->timer > 100)\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t\tsound(SND_DOOR);\n\t\t\t\tSmokeClouds(o, 4, 16, 16);\n\t\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20: o->frame = 4; break;\n\t\t\n\t\tcase 21:\t// got smushed!\n\t\t\to->state = 22;\n\t\t\to->frame = 5;\n\t\t\tsound(SND_ENEMY_HURT);\n\t\tbreak;\n\t\t\n\t\tcase 22:\n\t\tbreak;\n\t\t\n\t\tcase 100:\t// \"baby\" malcos waking up during credits\n\t\t{\n\t\t\to->state = 101;\n\t\t\to->frame = 3;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 101:\n\t\t{\n\t\t\tANIMATE(4, 3, 4);\n\t\t}\n\t\tbreak;\n\t\tcase 110:\t// the one that blows up\n\t\t{\n\t\t\tSmokeClouds(o, 16, 4, 4);\n\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n}\n\nvoid ai_malco_broken(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 10:\t// set when pulled out of ground\n\t\t\tsound(SND_BLOCK_DESTROY);\n\t\t\tSmokeClouds(o, 4, 16, 16);\n\t\t\to->state = 0;\n\t\tbreak;\n\t\t\n\t\tcase 0:\n\t\t{\n\t\t\to->frame = 0;\n\t\t\trandblink(o, 1, 8, 50);\n\t\t\t\n\t\t\tif (game.mode != GM_CREDITS)\n\t\t\t\tFACEPLAYER;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "ai/weed/weed.fdh",
    "content": "//hash:55189a91\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//-----------------[referenced from ai/weed/weed.cpp]----------------//\nvoid quake(int quaketime, int snd);\n\n\n/* located in caret.cpp */\n\n//-----------------[referenced from ai/weed/weed.cpp]----------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from ai/weed/weed.cpp]----------------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in ai/weed/weed.cpp */\n\n//-----------------[referenced from ai/weed/weed.cpp]----------------//\nvoid ai_critter(Object *o);\nvoid ai_bat_hang(Object *o);\nvoid ai_bat_circle(Object *o);\nvoid ai_jelly(Object *o);\nvoid ai_giant_jelly(Object *o);\nvoid ai_mannan(Object *o);\nvoid ai_mannan_shot(Object *o);\nvoid ai_frog(Object *o);\nvoid ai_hey_spawner(Object *o);\nvoid ai_motorbike(Object *o);\nvoid ai_malco(Object *o);\nvoid ai_malco_broken(Object *o);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//-----------------[referenced from ai/weed/weed.cpp]----------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from ai/weed/weed.cpp]----------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from ai/weed/weed.cpp]----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "autogen/AssignSprites.cpp",
    "content": "//hash: 2eeb494c\n//auto-generated by sifedit Tue 06 2010  07:14:33PM\n\n#include \"asdefs.h\"\n#include \"sprites.h\"\n\nvoid AssignSprites(void)\n{\n\tASSIGN_SPRITE(OBJ_NULL, SPR_NULL);\n\tASSIGN_SPRITE(OBJ_TABLECHAIRS, SPR_TABLECHAIRS);\n\tASSIGN_SPRITE(OBJ_SIGNPOST, SPR_SIGNPOST);\n\tASSIGN_SPRITE(OBJ_POT, SPR_POT);\n\tASSIGN_SPRITE(OBJ_BED, SPR_BED);\n\tASSIGN_SPRITE(OBJ_RED_PETALS, SPR_RED_PETALS);\n\tASSIGN_SPRITE(OBJ_DOOR, SPR_DOOR);\n\tASSIGN_SPRITE(OBJ_DOOR_BUSTED, SPR_DOOR_BUSTED);\n\tASSIGN_SPRITE(OBJ_SAVE_SIGN, SPR_SAVE_SIGN);\n\tASSIGN_SPRITE(OBJ_SAVE_POINT, SPR_SAVE_POINT);\n\tASSIGN_SPRITE(OBJ_RECHARGE, SPR_RECHARGE);\n\tASSIGN_SPRITE(OBJ_SMOKE_CLOUD, SPR_SMOKE_CLOUD);\n\tASSIGN_SPRITE(OBJ_FIREPLACE, SPR_FIREPLACE);\n\tASSIGN_SPRITE(OBJ_CHEST_CLOSED, SPR_CHEST_CLOSED);\n\tASSIGN_SPRITE(OBJ_CHEST_OPEN, SPR_CHEST_OPEN);\n\tASSIGN_SPRITE(OBJ_LIFE_CAPSULE, SPR_LIFE_CAPSULE);\n\tASSIGN_SPRITE(OBJ_XP_CAPSULE, SPR_XP_CAPSULE);\n\tASSIGN_SPRITE(OBJ_LIGHTNING, SPR_LIGHTNING);\n\tASSIGN_SPRITE(OBJ_TERMINAL, SPR_TERMINAL);\n\tASSIGN_SPRITE(OBJ_TELEPORTER, SPR_TELEPORTER);\n\tASSIGN_SPRITE(OBJ_TELEPORTER_LIGHTS, SPR_TELEPORTER_LIGHTS);\n\tASSIGN_SPRITE(OBJ_WATER_DROPLET, SPR_WATER_DROPLET);\n\tASSIGN_SPRITE(OBJ_LAVA_DROPLET, SPR_LAVA_DROPLET);\n\tASSIGN_SPRITE(OBJ_SPRINKLER, SPR_SPRINKLER);\n\tASSIGN_SPRITE(OBJ_LARGEDOOR, SPR_LARGEDOOR);\n\tASSIGN_SPRITE(OBJ_LARGEDOOR_FRAME, SPR_LARGEDOOR_FRAME);\n\tASSIGN_SPRITE(OBJ_PRESS, SPR_PRESS);\n\tASSIGN_SPRITE(OBJ_HIDDEN_SPARKLE, SPR_HIDDEN_SPARKLE);\n\tASSIGN_SPRITE(OBJ_BIG_SPIKE, SPR_BIG_SPIKE);\n\tASSIGN_SPRITE(OBJ_SPIKE_SMALL, SPR_SPIKE_SMALL);\n\tASSIGN_SPRITE(OBJ_COMPUTER, SPR_COMPUTER);\n\tASSIGN_SPRITE(OBJ_CHALKBOARD, SPR_CHALKBOARD);\n\tASSIGN_SPRITE(OBJ_GRATE, SPR_GRATE);\n\tASSIGN_SPRITE(OBJ_HEART, SPR_HEART);\n\tASSIGN_SPRITE(OBJ_MISSILE, SPR_MISSILE);\n\tASSIGN_SPRITE(OBJ_HEART3, SPR_HEART3);\n\tASSIGN_SPRITE(OBJ_MISSILE3, SPR_MISSILE3);\n\tASSIGN_SPRITE(OBJ_HIDDEN_POWERUP, SPR_HIDDEN_POWERUP);\n\tASSIGN_SPRITE(OBJ_CURLY, SPR_CURLY);\n\tASSIGN_SPRITE(OBJ_BALROG, SPR_BALROG);\n\tASSIGN_SPRITE(OBJ_JENKA, SPR_JENKA);\n\tASSIGN_SPRITE(OBJ_JENKA_COLLAPSED, SPR_JENKA_COLLAPSED);\n\tASSIGN_SPRITE(OBJ_DOCTOR, SPR_DOCTOR);\n\tASSIGN_SPRITE(OBJ_SUE, SPR_SUE);\n\tASSIGN_SPRITE(OBJ_TOROKO, SPR_TOROKO);\n\tASSIGN_SPRITE(OBJ_KING, SPR_KING);\n\tASSIGN_SPRITE(OBJ_KINGS_SWORD, SPR_KINGS_SWORD);\n\tASSIGN_SPRITE(OBJ_BLUE_ROBOT, SPR_BLUE_ROBOT);\n\tASSIGN_SPRITE(OBJ_CHTHULU, SPR_CHTHULU);\n\tASSIGN_SPRITE(OBJ_KAZUMA, SPR_KAZUMA);\n\tASSIGN_SPRITE(OBJ_PROFESSOR_BOOSTER, SPR_PROFESSOR_BOOSTER);\n\tASSIGN_SPRITE(OBJ_BEETLE_BROWN, SPR_BEETLE_BROWN);\n\tASSIGN_SPRITE(OBJ_CURLY_BOSS, SPR_CURLY_BOSS);\n\tASSIGN_SPRITE(OBJ_POLISH, SPR_POLISH);\n\tASSIGN_SPRITE(OBJ_POLISHBABY, SPR_POLISHBABY);\n\tASSIGN_SPRITE(OBJ_SANDCROC, SPR_SANDCROC);\n\tASSIGN_SPRITE(OBJ_SUNSTONE, SPR_SUNSTONE);\n\tASSIGN_SPRITE(OBJ_SKULLHEAD, SPR_SKULLHEAD);\n\tASSIGN_SPRITE(OBJ_SKULLSTEP, SPR_SKULLSTEP);\n\tASSIGN_SPRITE(OBJ_SKULLSTEP_FOOT, SPR_SKULLSTEP_FOOT);\n\tASSIGN_SPRITE(OBJ_SKELETON, SPR_SKELETON);\n\tASSIGN_SPRITE(OBJ_SKELETON_SHOT, SPR_SKELETON_SHOT);\n\tASSIGN_SPRITE(OBJ_ARMADILLO, SPR_ARMADILLO);\n\tASSIGN_SPRITE(OBJ_CROW, SPR_CROW);\n\tASSIGN_SPRITE(OBJ_TOROKO_FRENZIED, SPR_TOROKO_FRENZIED);\n\tASSIGN_SPRITE(OBJ_TOROKO_FLOWER, SPR_TOROKO_FLOWER);\n\tASSIGN_SPRITE(OBJ_TOROKO_BLOCK, SPR_TOROKO_BLOCK);\n\tASSIGN_SPRITE(OBJ_POWER_CRITTER, SPR_POWER_CRITTER);\n\tASSIGN_SPRITE(OBJ_JELLY, SPR_JELLY);\n\tASSIGN_SPRITE(OBJ_GIANT_JELLY, SPR_GIANT_JELLY);\n\tASSIGN_SPRITE(OBJ_SANTA, SPR_SANTA);\n\tASSIGN_SPRITE(OBJ_SANTAS_KEY, SPR_SANTAS_KEY);\n\tASSIGN_SPRITE(OBJ_CHACO, SPR_CHACO);\n\tASSIGN_SPRITE(OBJ_MANNAN, SPR_MANNAN);\n\tASSIGN_SPRITE(OBJ_MANNAN_SHOT, SPR_MANNAN_SHOT);\n\tASSIGN_SPRITE(OBJ_FAN_LEFT, SPR_FAN_LEFT);\n\tASSIGN_SPRITE(OBJ_FAN_UP, SPR_FAN_UP);\n\tASSIGN_SPRITE(OBJ_FAN_RIGHT, SPR_FAN_RIGHT);\n\tASSIGN_SPRITE(OBJ_FAN_DOWN, SPR_FAN_DOWN);\n\tASSIGN_SPRITE(OBJ_HEY, SPR_HEY);\n\tASSIGN_SPRITE(OBJ_MOTORBIKE, SPR_MOTORBIKE);\n\tASSIGN_SPRITE(OBJ_MOTORBIKE_BROKEN, SPR_MOTORBIKE_BROKEN);\n\tASSIGN_SPRITE(OBJ_POWERCOMP, SPR_POWERCOMP);\n\tASSIGN_SPRITE(OBJ_POWERSINE, SPR_POWERSINE);\n\tASSIGN_SPRITE(OBJ_MALCO, SPR_MALCO);\n\tASSIGN_SPRITE(OBJ_MALCO_BROKEN, SPR_MALCO_BROKEN);\n\tASSIGN_SPRITE(OBJ_BALROG_SHOT_BOUNCE, SPR_BALROG_SHOT_BOUNCE);\n\tASSIGN_SPRITE(OBJ_FRENZIED_MIMIGA, SPR_FRENZIED_MIMIGA);\n\tASSIGN_SPRITE(OBJ_FROG, SPR_FROG);\n\tASSIGN_SPRITE(OBJ_MINIFROG, SPR_MINIFROG);\n\tASSIGN_SPRITE(OBJ_BALFROG, SPR_BALFROG);\n\tASSIGN_SPRITE(OBJ_BALFROG_SHOT, SPR_BALFROG_SHOT);\n\tASSIGN_SPRITE(OBJ_CRITTER_SHOOTING_PURPLE, SPR_CRITTER_SHOOTING_PURPLE);\n\tASSIGN_SPRITE(OBJ_CRITTER_SHOT, SPR_CRITTER_SHOT);\n\tASSIGN_SPRITE(OBJ_FIREWHIRR, SPR_FIREWHIRR);\n\tASSIGN_SPRITE(OBJ_FIREWHIRR_SHOT, SPR_FIREWHIRR_SHOT);\n\tASSIGN_SPRITE(OBJ_GAUDI_EGG, SPR_GAUDI_EGG);\n\tASSIGN_SPRITE(OBJ_GRATING, SPR_GRATING);\n\tASSIGN_SPRITE(OBJ_SHUTTER, SPR_SHUTTER);\n\tASSIGN_SPRITE(OBJ_SHUTTER_BIG, SPR_SHUTTER_BIG);\n\tASSIGN_SPRITE(OBJ_SHUTTER_STUCK, SPR_SHUTTER_STUCK);\n\tASSIGN_SPRITE(OBJ_ALMOND_LIFT, SPR_ALMOND_LIFT);\n\tASSIGN_SPRITE(OBJ_ALMOND_ROBOT, SPR_ALMOND_ROBOT);\n\tASSIGN_SPRITE(OBJ_CORE_FRONT, SPR_CORE_FRONT);\n\tASSIGN_SPRITE(OBJ_CORE_BACK, SPR_CORE_BACK);\n\tASSIGN_SPRITE(OBJ_MINICORE, SPR_MINICORE);\n\tASSIGN_SPRITE(OBJ_MINICORE_SHOT, SPR_MINICORE_SHOT);\n\tASSIGN_SPRITE(OBJ_CORE_GHOSTIE, SPR_CORE_GHOSTIE);\n\tASSIGN_SPRITE(OBJ_CORE_BLAST, SPR_CORE_BLAST);\n\tASSIGN_SPRITE(OBJ_MOTION_WALL, SPR_MOTION_WALL);\n\tASSIGN_SPRITE(OBJ_IRONH, SPR_IRONH);\n\tASSIGN_SPRITE(OBJ_IRONH_FISHY, SPR_IRONH_FISHY);\n\tASSIGN_SPRITE(OBJ_IRONH_SHOT, SPR_IRONH_SHOT);\n\tASSIGN_SPRITE(OBJ_IRONH_BRICK, SPR_IRONH_BRICK);\n\tASSIGN_SPRITE(OBJ_IKACHAN, SPR_IKACHAN);\n\tASSIGN_SPRITE(OBJ_CURLY_COLLAPSED, SPR_CURLY_COLLAPSED);\n\tASSIGN_SPRITE(OBJ_SANDCROC_OSIDE, SPR_SANDCROC_OSIDE);\n\tASSIGN_SPRITE(OBJ_HOPPY, SPR_HOPPY);\n\tASSIGN_SPRITE(OBJ_CHINFISH, SPR_CHINFISH);\n\tASSIGN_SPRITE(OBJ_KANPACHI_FISHING, SPR_KANPACHI_FISHING);\n\tASSIGN_SPRITE(OBJ_FLOWERS_PENS1, SPR_FLOWERS_PENS1);\n\tASSIGN_SPRITE(OBJ_JACK, SPR_JACK);\n\tASSIGN_SPRITE(OBJ_MAHIN, SPR_MAHIN);\n\tASSIGN_SPRITE(OBJ_YAMASHITA_FLOWERS, SPR_YAMASHITA_FLOWERS);\n\tASSIGN_SPRITE(OBJ_YAMASHITA_PAVILION, SPR_YAMASHITA_PAVILION);\n\tASSIGN_SPRITE(OBJ_TOROKO_SHACK, SPR_TOROKO_SHACK);\n\tASSIGN_SPRITE(OBJ_MISERYS_BUBBLE, SPR_MISERYS_BUBBLE);\n\tASSIGN_SPRITE(OBJ_MUSHROOM_ENEMY, SPR_MUSHROOM_ENEMY);\n\tASSIGN_SPRITE(OBJ_GIANT_MUSHROOM_ENEMY, SPR_GIANT_MUSHROOM_ENEMY);\n\tASSIGN_SPRITE(OBJ_GRAVEKEEPER, SPR_GRAVEKEEPER);\n\tASSIGN_SPRITE(OBJ_CAGE, SPR_CAGE);\n\tASSIGN_SPRITE(OBJ_CRITTER_HOPPING_GREEN, SPR_CRITTER_HOPPING_GREEN);\n\tASSIGN_SPRITE(OBJ_CRITTER_HOPPING_BLUE, SPR_CRITTER_HOPPING_BLUE);\n\tASSIGN_SPRITE(OBJ_CRITTER_HOPPING_AQUA, SPR_CRITTER_HOPPING_AQUA);\n\tASSIGN_SPRITE(OBJ_BAT_BLUE, SPR_BAT_BLUE);\n\tASSIGN_SPRITE(OBJ_DOOR_ENEMY, SPR_DOOR_ENEMY);\n\tASSIGN_SPRITE(OBJ_HERMIT_GUNSMITH, SPR_HERMIT_GUNSMITH);\n\tASSIGN_SPRITE(OBJ_KAZUMA_AT_COMPUTER, SPR_KAZUMA_AT_COMPUTER);\n\tASSIGN_SPRITE(OBJ_SUE_AT_COMPUTER, SPR_SUE_AT_COMPUTER);\n\tASSIGN_SPRITE(OBJ_BASIL, SPR_BASIL);\n\tASSIGN_SPRITE(OBJ_BEHEMOTH, SPR_BEHEMOTH);\n\tASSIGN_SPRITE(OBJ_BEETLE_GREEN, SPR_BEETLE_GREEN);\n\tASSIGN_SPRITE(OBJ_BEETLE_FREEFLY, SPR_BEETLE_FREEFLY);\n\tASSIGN_SPRITE(OBJ_GIANT_BEETLE, SPR_GIANT_BEETLE);\n\tASSIGN_SPRITE(OBJ_GIANT_BEETLE_SHOT, SPR_GIANT_BEETLE_SHOT);\n\tASSIGN_SPRITE(OBJ_FORCEFIELD, SPR_FORCEFIELD);\n\tASSIGN_SPRITE(OBJ_EGG_ELEVATOR, SPR_EGG_ELEVATOR);\n\tASSIGN_SPRITE(OBJ_IGOR_SHOT, SPR_IGOR_SHOT);\n\tASSIGN_SPRITE(OBJ_BEETLE_FREEFLY_2, SPR_BEETLE_FREEFLY_2);\n\tASSIGN_SPRITE(OBJ_GIANT_BEETLE_2, SPR_GIANT_BEETLE_2);\n\tASSIGN_SPRITE(OBJ_BLADE_SLASH, SPR_BLADE_SLASH);\n\tASSIGN_SPRITE(OBJ_BLUE_ROBOT_SITTING, SPR_BLUE_ROBOT_SITTING);\n\tASSIGN_SPRITE(OBJ_BLUE_ROBOT_REMAINS, SPR_BLUE_ROBOT_REMAINS);\n\tASSIGN_SPRITE(OBJ_X_BODY, SPR_X_BODY);\n\tASSIGN_SPRITE(OBJ_X_INTERNALS, SPR_X_INTERNALS);\n\tASSIGN_SPRITE(OBJ_X_DOOR, SPR_X_DOOR);\n\tASSIGN_SPRITE(OBJ_X_FISHY_MISSILE, SPR_X_FISHY_MISSILE);\n\tASSIGN_SPRITE(OBJ_X_DEFEATED, SPR_X_DEFEATED);\n\tASSIGN_SPRITE(OBJ_GAUDI_FLYING_SHOT, SPR_GAUDI_FLYING_SHOT);\n\tASSIGN_SPRITE(OBJ_GAUDI, SPR_GAUDI);\n\tASSIGN_SPRITE(OBJ_GAUDI_DYING, SPR_GAUDI_DYING);\n\tASSIGN_SPRITE(OBJ_GAUDI_FLYING, SPR_GAUDI_FLYING);\n\tASSIGN_SPRITE(OBJ_GAUDI_ARMORED, SPR_GAUDI_ARMORED);\n\tASSIGN_SPRITE(OBJ_GAUDI_ARMORED_SHOT, SPR_GAUDI_ARMORED_SHOT);\n\tASSIGN_SPRITE(OBJ_GAUDI_SHOPKEEP, SPR_GAUDI_SHOPKEEP);\n\tASSIGN_SPRITE(OBJ_DR_GERO, SPR_DR_GERO);\n\tASSIGN_SPRITE(OBJ_NURSE_HASUMI, SPR_NURSE_HASUMI);\n\tASSIGN_SPRITE(OBJ_POOH_BLACK, SPR_POOH_BLACK);\n\tASSIGN_SPRITE(OBJ_POOH_BLACK_BUBBLE, SPR_POOH_BLACK_BUBBLE);\n\tASSIGN_SPRITE(OBJ_BOULDER, SPR_BOULDER);\n\tASSIGN_SPRITE(OBJ_STRAINING, SPR_STRAINING);\n\tASSIGN_SPRITE(OBJ_BALROG_MISSILE, SPR_BALROG_MISSILE);\n\tASSIGN_SPRITE(OBJ_FUZZ_CORE, SPR_FUZZ_CORE);\n\tASSIGN_SPRITE(OBJ_FUZZ, SPR_FUZZ);\n\tASSIGN_SPRITE(OBJ_BUYOBUYO_BASE, SPR_BUYOBUYO_BASE);\n\tASSIGN_SPRITE(OBJ_BUYOBUYO, SPR_BUYOBUYO);\n\tASSIGN_SPRITE(OBJ_DRAGON_ZOMBIE, SPR_DRAGON_ZOMBIE);\n\tASSIGN_SPRITE(OBJ_DRAGON_ZOMBIE_DEAD, SPR_DRAGON_ZOMBIE_DEAD);\n\tASSIGN_SPRITE(OBJ_DRAGON_ZOMBIE_SHOT, SPR_DRAGON_ZOMBIE_SHOT);\n\tASSIGN_SPRITE(OBJ_FALLING_SPIKE_SMALL, SPR_FALLING_SPIKE_SMALL);\n\tASSIGN_SPRITE(OBJ_FALLING_SPIKE_LARGE, SPR_FALLING_SPIKE_LARGE);\n\tASSIGN_SPRITE(OBJ_COUNTER_BOMB, SPR_COUNTER_BOMB);\n\tASSIGN_SPRITE(OBJ_COUNTER_BOMB_NUMBER, SPR_COUNTER_BOMB_NUMBER);\n\tASSIGN_SPRITE(OBJ_SISTERS_BODY, SPR_SISTERS_BODY);\n\tASSIGN_SPRITE(OBJ_SKY_DRAGON, SPR_SKY_DRAGON);\n\tASSIGN_SPRITE(OBJ_NIGHT_SPIRIT, SPR_NIGHT_SPIRIT);\n\tASSIGN_SPRITE(OBJ_NIGHT_SPIRIT_SHOT, SPR_NIGHT_SPIRIT_SHOT);\n\tASSIGN_SPRITE(OBJ_PIXEL_CAT, SPR_PIXEL_CAT);\n\tASSIGN_SPRITE(OBJ_ITOH, SPR_ITOH);\n\tASSIGN_SPRITE(OBJ_MOMORIN, SPR_MOMORIN);\n\tASSIGN_SPRITE(OBJ_ORANGEBELL, SPR_ORANGEBELL);\n\tASSIGN_SPRITE(OBJ_ORANGEBELL_BABY, SPR_ORANGEBELL_BABY);\n\tASSIGN_SPRITE(OBJ_STUMPY, SPR_STUMPY);\n\tASSIGN_SPRITE(OBJ_GUNFISH, SPR_GUNFISH);\n\tASSIGN_SPRITE(OBJ_GUNFISH_SHOT, SPR_GUNFISH_SHOT);\n\tASSIGN_SPRITE(OBJ_MIDORIN, SPR_MIDORIN);\n\tASSIGN_SPRITE(OBJ_DROLL, SPR_DROLL);\n\tASSIGN_SPRITE(OBJ_DROLL_SHOT, SPR_DROLL_SHOT);\n\tASSIGN_SPRITE(OBJ_RED_FLOWERS_SPROUTS, SPR_RED_FLOWERS_SPROUTS);\n\tASSIGN_SPRITE(OBJ_RED_FLOWERS_BLOOMING, SPR_RED_FLOWERS_BLOOMING);\n\tASSIGN_SPRITE(OBJ_CHIE, SPR_CHIE);\n\tASSIGN_SPRITE(OBJ_MEGANE, SPR_MEGANE);\n\tASSIGN_SPRITE(OBJ_MIMIGA_SLEEPING, SPR_MIMIGA_SLEEPING);\n\tASSIGN_SPRITE(OBJ_KANPACHI_STANDING, SPR_KANPACHI_STANDING);\n\tASSIGN_SPRITE(OBJ_BUCKET, SPR_BUCKET);\n\tASSIGN_SPRITE(OBJ_JAIL_GRATING, SPR_JAIL_GRATING);\n\tASSIGN_SPRITE(OBJ_MIMIGA_JAILED, SPR_MIMIGA_JAILED);\n\tASSIGN_SPRITE(OBJ_ROCKET, SPR_ROCKET);\n\tASSIGN_SPRITE(OBJ_PROXIMITY_PRESS_HOZ, SPR_PROXIMITY_PRESS_HOZ);\n\tASSIGN_SPRITE(OBJ_MA_PIGNON, SPR_MA_PIGNON);\n\tASSIGN_SPRITE(OBJ_MA_PIGNON_ROCK, SPR_MA_PIGNON_ROCK);\n\tASSIGN_SPRITE(OBJ_CRITTER_HOPPING_RED, SPR_CRITTER_HOPPING_RED);\n\tASSIGN_SPRITE(OBJ_LAVA_DRIP, SPR_LAVA_DRIP);\n\tASSIGN_SPRITE(OBJ_RED_BAT, SPR_RED_BAT);\n\tASSIGN_SPRITE(OBJ_RED_DEMON, SPR_RED_DEMON);\n\tASSIGN_SPRITE(OBJ_RED_DEMON_SHOT, SPR_RED_DEMON_SHOT);\n\tASSIGN_SPRITE(OBJ_PROXIMITY_PRESS_VERT, SPR_PROXIMITY_PRESS_VERT);\n\tASSIGN_SPRITE(OBJ_BOSS_MISERY, SPR_BOSS_MISERY);\n\tASSIGN_SPRITE(OBJ_MISERY_RING, SPR_MISERY_RING);\n\tASSIGN_SPRITE(OBJ_MISERY_SHOT, SPR_MISERY_SHOT);\n\tASSIGN_SPRITE(OBJ_MISERY_BALL, SPR_MISERY_BALL);\n\tASSIGN_SPRITE(OBJ_BLACK_LIGHTNING, SPR_BLACK_LIGHTNING);\n\tASSIGN_SPRITE(OBJ_MISERY_PHASE, SPR_MISERY_PHASE);\n\tASSIGN_SPRITE(OBJ_HELICOPTER, SPR_HELICOPTER);\n\tASSIGN_SPRITE(OBJ_MIMIGA_CAGED, SPR_MIMIGA_CAGED);\n\tASSIGN_SPRITE(OBJ_DOCTOR_CROWNED, SPR_DOCTOR_CROWNED);\n\tASSIGN_SPRITE(OBJ_RED_CRYSTAL, SPR_RED_CRYSTAL);\n\tASSIGN_SPRITE(OBJ_BOSS_DOCTOR, SPR_BOSS_DOCTOR);\n\tASSIGN_SPRITE(OBJ_DOCTOR_SHOT, SPR_DOCTOR_SHOT);\n\tASSIGN_SPRITE(OBJ_DOCTOR_BLAST, SPR_DOCTOR_BLAST);\n\tASSIGN_SPRITE(OBJ_BOSS_DOCTOR_FRENZIED, SPR_BOSS_DOCTOR_FRENZIED);\n\tASSIGN_SPRITE(OBJ_RED_ENERGY, SPR_RED_ENERGY);\n\tASSIGN_SPRITE(OBJ_DOCTOR_BAT, SPR_DOCTOR_BAT);\n\tASSIGN_SPRITE(OBJ_SUE_FRENZIED, SPR_SUE_FRENZIED);\n\tASSIGN_SPRITE(OBJ_MISERY_FRENZIED, SPR_MISERY_FRENZIED);\n\tASSIGN_SPRITE(OBJ_MISERY_CRITTER, SPR_MISERY_CRITTER);\n\tASSIGN_SPRITE(OBJ_MISERY_MISSILE, SPR_MISERY_MISSILE);\n\tASSIGN_SPRITE(OBJ_UD_BLAST, SPR_UD_BLAST);\n\tASSIGN_SPRITE(OBJ_UD_PELLET, SPR_UD_PELLET);\n\tASSIGN_SPRITE(OBJ_UD_SMOKE, SPR_UD_SMOKE);\n\tASSIGN_SPRITE(OBJ_UD_SPINNER, SPR_UD_SPINNER);\n\tASSIGN_SPRITE(OBJ_UD_SPINNER_TRAIL, SPR_UD_SPINNER_TRAIL);\n\tASSIGN_SPRITE(OBJ_UDMINI_PLATFORM, SPR_UDMINI_PLATFORM);\n\tASSIGN_SPRITE(OBJ_BALROG_FLYING, SPR_BALROG_FLYING);\n\tASSIGN_SPRITE(OBJ_BALROG_MEDIC, SPR_BALROG_MEDIC);\n\tASSIGN_SPRITE(OBJ_GAUDI_PATIENT, SPR_GAUDI_PATIENT);\n\tASSIGN_SPRITE(OBJ_BABY_PUPPY, SPR_BABY_PUPPY);\n\tASSIGN_SPRITE(OBJ_TRANSMOGRIFIER, SPR_TRANSMOGRIFIER);\n\tASSIGN_SPRITE(OBJ_TURNING_HUMAN, SPR_TURNING_HUMAN);\n\tASSIGN_SPRITE(OBJ_BUILDING_FAN, SPR_BUILDING_FAN);\n\tASSIGN_SPRITE(OBJ_MISERY_WIND, SPR_MISERY_WIND);\n\tASSIGN_SPRITE(OBJ_AHCHOO, SPR_AHCHOO);\n\tASSIGN_SPRITE(OBJ_THANK_YOU, SPR_THANK_YOU);\n\tASSIGN_SPRITE(OBJ_LITTLE_FAMILY, SPR_LITTLE_FAMILY);\n\tASSIGN_SPRITE(OBJ_BUBBLER_SHARP, SPR_BUBBLER_SHARP);\n\tASSIGN_SPRITE(OBJ_BUTE_FLYING, SPR_BUTE_FLYING);\n\tASSIGN_SPRITE(OBJ_BUTE_DYING, SPR_BUTE_DYING);\n\tASSIGN_SPRITE(OBJ_BUTE_FALLING, SPR_BUTE_FALLING);\n\tASSIGN_SPRITE(OBJ_BUTE_SWORD, SPR_BUTE_SWORD);\n\tASSIGN_SPRITE(OBJ_BUTE_ARCHER, SPR_BUTE_ARCHER);\n\tASSIGN_SPRITE(OBJ_MESA, SPR_MESA);\n\tASSIGN_SPRITE(OBJ_MESA_BLOCK, SPR_MESA_BLOCK);\n\tASSIGN_SPRITE(OBJ_MESA_DYING, SPR_MESA_DYING);\n\tASSIGN_SPRITE(OBJ_DELEET, SPR_DELEET);\n\tASSIGN_SPRITE(OBJ_ROLLING, SPR_ROLLING);\n\tASSIGN_SPRITE(OBJ_HEAVY_PRESS, SPR_HEAVY_PRESS);\n\tASSIGN_SPRITE(OBJ_HP_LIGHTNING, SPR_HP_LIGHTNING);\n\tASSIGN_SPRITE(OBJ_STATUE, SPR_STATUE);\n\tASSIGN_SPRITE(OBJ_NUMAHACHI, SPR_NUMAHACHI);\n\tASSIGN_SPRITE(OBJ_PUPPY_GHOST, SPR_PUPPY_GHOST);\n\tASSIGN_SPRITE(OBJ_CURLY_CARRIED_SHOOTING, SPR_CURLY_CARRIED_SHOOTING);\n\tASSIGN_SPRITE(OBJ_BALLOS_PRIEST, SPR_BALLOS_PRIEST);\n\tASSIGN_SPRITE(OBJ_BALLOS_SMILE, SPR_BALLOS_SMILE);\n\tASSIGN_SPRITE(OBJ_BALLOS_TARGET, SPR_BALLOS_TARGET);\n\tASSIGN_SPRITE(OBJ_BALLOS_BONE_SPAWNER, SPR_BALLOS_BONE_SPAWNER);\n\tASSIGN_SPRITE(OBJ_BALLOS_BONE, SPR_BALLOS_BONE);\n\tASSIGN_SPRITE(OBJ_BALLOS_MAIN, SPR_BALLOS_MAIN);\n\tASSIGN_SPRITE(OBJ_BALLOS_BODY, SPR_BALLOS_BODY);\n\tASSIGN_SPRITE(OBJ_BALLOS_EYE, SPR_BALLOS_EYE);\n\tASSIGN_SPRITE(OBJ_BALLOS_ROTATOR, SPR_BALLOS_ROTATOR);\n\tASSIGN_SPRITE(OBJ_BALLOS_SKULL, SPR_BALLOS_SKULL);\n\tASSIGN_SPRITE(OBJ_BALLOS_SPIKES, SPR_BALLOS_SPIKES);\n\tASSIGN_SPRITE(OBJ_BALLOS_PLATFORM, SPR_BALLOS_PLATFORM);\n\tASSIGN_SPRITE(OBJ_GREEN_DEVIL, SPR_GREEN_DEVIL);\n\tASSIGN_SPRITE(OBJ_BUTE_SWORD_RED, SPR_BUTE_SWORD_RED);\n\tASSIGN_SPRITE(OBJ_BUTE_ARCHER_RED, SPR_BUTE_ARCHER_RED);\n\tASSIGN_SPRITE(OBJ_CCS_GUN, SPR_CCS_GUN);\n\tASSIGN_SPRITE(OBJ_WHIMSICAL_STAR, SPR_WHIMSICAL_STAR);\n\tASSIGN_SPRITE(OBJ_INTRO_KINGS, SPR_INTRO_KINGS);\n\tASSIGN_SPRITE(OBJ_INTRO_CROWN, SPR_INTRO_CROWN);\n\tASSIGN_SPRITE(OBJ_INTRO_DOCTOR, SPR_INTRO_DOCTOR);\n}\n\n\n"
  },
  {
    "path": "autogen/AssignSprites.fdh",
    "content": "//hash:fc79b590\n//automatically generated by Makegen\n\n/* located in autogen/AssignSprites.cpp */\n\n//-------------[referenced from autogen/AssignSprites.cpp]-----------//\nvoid AssignSprites(void);\n\n"
  },
  {
    "path": "autogen/asdefs.h",
    "content": "\n// this is a small file that tells AssignSprites.cpp how to do it's job,\n// like glue that links it with the rest of the project in a project-independent way.\n#include \"../nx.h\"\n\n#define ASSIGN_SPRITE(OBJECT, SPRITE)\t\\\n\tobjprop[OBJECT].sprite = SPRITE;\n"
  },
  {
    "path": "autogen/objnames.cpp",
    "content": "\n// auto-generated by genobjnametable.cpp\n#include <stdio.h>\n\nconst char *object_names[] = {\n\tNULL,\n\t\"XP\",\n\t\"BEHEMOTH\",\n\tNULL,\n\t\"SMOKE_CLOUD\",\n\t\"CRITTER_HOPPING_GREEN\",\n\t\"BEETLE_GREEN\",\n\t\"BASIL\",\n\t\"BEETLE_FREEFLY\",\n\t\"BALROG_DROP_IN\",\n\tNULL,\n\t\"IGOR_SHOT\",\n\t\"BALROG\",\n\t\"FORCEFIELD\",\n\t\"SANTAS_KEY\",\n\t\"CHEST_CLOSED\",\n\t\"SAVE_POINT\",\n\t\"RECHARGE\",\n\t\"DOOR\",\n\t\"BALROG_BUST_IN\",\n\t\"COMPUTER\",\n\t\"CHEST_OPEN\",\n\t\"TELEPORTER\",\n\t\"TELEPORTER_LIGHTS\",\n\t\"POWER_CRITTER\",\n\t\"EGG_ELEVATOR\",\n\t\"BAT_CIRCLE\",\n\t\"BIG_SPIKE\",\n\t\"CRITTER_FLYING\",\n\t\"CHTHULU\",\n\t\"HERMIT_GUNSMITH\",\n\t\"BAT_HANG\",\n\t\"LIFE_CAPSULE\",\n\t\"BALROG_SHOT_BOUNCE\",\n\t\"BED\",\n\t\"MANNAN\",\n\t\"BALROG_BOSS_FLYING\",\n\t\"SIGNPOST\",\n\t\"FIREPLACE\",\n\t\"SAVE_SIGN\",\n\t\"SANTA\",\n\t\"DOOR_BUSTED\",\n\t\"SUE\",\n\t\"CHALKBOARD\",\n\t\"POLISH\",\n\t\"POLISHBABY\",\n\t\"HVTRIGGER\",\n\t\"SANDCROC\",\n\tNULL,\n\t\"SKULLHEAD\",\n\t\"SKELETON_SHOT\",\n\t\"CROWWITHSKULL\",\n\t\"BLUE_ROBOT_SITTING\",\n\t\"SKULLSTEP_FOOT\",\n\t\"SKULLSTEP\",\n\t\"KAZUMA\",\n\t\"BEETLE_BROWN\",\n\t\"CROW\",\n\t\"GIANT_BEETLE\",\n\t\"DOOR_ENEMY\",\n\t\"TOROKO\",\n\t\"KING\",\n\t\"KAZUMA_AT_COMPUTER\",\n\t\"TOROKO_SHACK\",\n\t\"CRITTER_HOPPING_BLUE\",\n\t\"BAT_BLUE\",\n\t\"MISERYS_BUBBLE\",\n\t\"MISERY_FLOAT\",\n\t\"BALROG_BOSS_RUNNING\",\n\t\"MUSHROOM_ENEMY\",\n\t\"HIDDEN_SPARKLE\",\n\t\"CHINFISH\",\n\t\"SPRINKLER\",\n\t\"WATER_DROPLET\",\n\t\"JACK\",\n\t\"KANPACHI_FISHING\",\n\t\"YAMASHITA_FLOWERS\",\n\t\"YAMASHITA_PAVILION\",\n\t\"POT\",\n\t\"MAHIN\",\n\t\"GRAVEKEEPER\",\n\t\"GIANT_MUSHROOM_ENEMY\",\n\t\"MISERY_STAND\",\n\t\"NPC_IGOR\",\n\t\"GIANT_BEETLE_SHOT\",\n\t\"TERMINAL\",\n\t\"MISSILE\",\n\t\"HEART\",\n\t\"BOSS_IGOR\",\n\t\"BOSS_IGOR_DEFEATED\",\n\tNULL,\n\t\"CAGE\",\n\t\"SUE_AT_COMPUTER\",\n\t\"CHACO\",\n\t\"GIANT_JELLY\",\n\t\"JELLY\",\n\t\"FAN_LEFT\",\n\t\"FAN_UP\",\n\t\"FAN_RIGHT\",\n\t\"FAN_DOWN\",\n\t\"GRATE\",\n\t\"POWERCOMP\",\n\t\"POWERSINE\",\n\t\"MANNAN_SHOT\",\n\t\"FROG\",\n\t\"HEY\",\n\t\"HEY_SPAWNER\",\n\t\"MALCO\",\n\t\"BALFROG_SHOT\",\n\t\"MALCO_BROKEN\",\n\t\"MINIFROG\",\n\t\"PTELOUT\",\n\t\"PTELIN\",\n\t\"PROFESSOR_BOOSTER\",\n\t\"PRESS\",\n\t\"FRENZIED_MIMIGA\",\n\t\"RED_PETALS\",\n\t\"CURLY\",\n\t\"CURLY_BOSS\",\n\t\"TABLECHAIRS\",\n\t\"MIMIGAC1\",\n\t\"MIMIGAC2\",\n\t\"MIMIGAC_ENEMY\",\n\t\"CURLYBOSS_SHOT\",\n\t\"SUNSTONE\",\n\t\"HIDDEN_POWERUP\",\n\t\"PUPPY_RUN\",\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"PUPPY_WAG\",\n\t\"PUPPY_SLEEP\",\n\t\"PUPPY_BARK\",\n\t\"JENKA\",\n\t\"ARMADILLO\",\n\t\"SKELETON\",\n\t\"PUPPY_CARRY\",\n\t\"LARGEDOOR_FRAME\",\n\t\"LARGEDOOR\",\n\t\"DOCTOR\",\n\t\"TOROKO_FRENZIED\",\n\t\"TOROKO_BLOCK\",\n\t\"TOROKO_FLOWER\",\n\t\"JENKA_COLLAPSED\",\n\t\"TOROKO_TELEPORT_IN\",\n\t\"KINGS_SWORD\",\n\t\"LIGHTNING\",\n\t\"CRITTER_SHOOTING_PURPLE\",\n\t\"CRITTER_SHOT\",\n\t\"BLOCK_MOVEH\",\n\t\"NPC_PLAYER\",\n\t\"BLUE_ROBOT\",\n\t\"SHUTTER_STUCK\",\n\t\"GAUDI\",\n\t\"GAUDI_DYING\",\n\t\"GAUDI_FLYING\",\n\t\"GAUDI_FLYING_SHOT\",\n\t\"BLOCK_MOVEV\",\n\t\"X_FISHY_MISSILE\",\n\t\"X_DEFEATED\",\n\t\"POOH_BLACK\",\n\t\"POOH_BLACK_BUBBLE\",\n\t\"POOH_BLACK_DYING\",\n\t\"DR_GERO\",\n\t\"NURSE_HASUMI\",\n\t\"CURLY_COLLAPSED\",\n\t\"GAUDI_SHOPKEEP\",\n\t\"BOOSTER_FALLING\",\n\t\"BOULDER\",\n\t\"BALROG_BOSS_MISSILES\",\n\t\"BALROG_MISSILE\",\n\t\"FIREWHIRR\",\n\t\"FIREWHIRR_SHOT\",\n\t\"GAUDI_ARMORED\",\n\t\"GAUDI_ARMORED_SHOT\",\n\t\"GAUDI_EGG\",\n\t\"BUYOBUYO_BASE\",\n\t\"BUYOBUYO\",\n\t\"MINICORE_SHOT\",\n\t\"CORE_GHOSTIE\",\n\t\"CURLY_AI\",\n\t\"CAI_GUN\",\n\t\"CAI_MGUN\",\n\t\"CAI_WATERSHIELD\",\n\t\"SHUTTER_BIG\",\n\t\"SHUTTER\",\n\t\"ALMOND_LIFT\",\n\t\"FUZZ_CORE\",\n\t\"FUZZ\",\n\tNULL,\n\t\"ALMOND_ROBOT\",\n\t\"WATERLEVEL\",\n\t\"MOTORBIKE\",\n\t\"MOTORBIKE_BROKEN\",\n\t\"BLUE_ROBOT_REMAINS\",\n\t\"GRATING\",\n\t\"MOTION_WALL\",\n\t\"IRONH_FISHY\",\n\t\"IRONH_SHOT\",\n\t\"FAN_DROPLET\",\n\t\"DRAGON_ZOMBIE\",\n\t\"DRAGON_ZOMBIE_DEAD\",\n\t\"DRAGON_ZOMBIE_SHOT\",\n\t\"CRITTER_HOPPING_AQUA\",\n\t\"FALLING_SPIKE_SMALL\",\n\t\"FALLING_SPIKE_LARGE\",\n\t\"COUNTER_BOMB\",\n\t\"COUNTER_BOMB_NUMBER\",\n\t\"GIANT_BEETLE_2\",\n\tNULL,\n\t\"BEETLE_FREEFLY_2\",\n\t\"SPIKE_SMALL\",\n\t\"SKY_DRAGON\",\n\t\"NIGHT_SPIRIT\",\n\t\"NIGHT_SPIRIT_SHOT\",\n\t\"SANDCROC_OSIDE\",\n\t\"PIXEL_CAT\",\n\t\"ITOH\",\n\t\"CORE_BLAST\",\n\t\"BUBBLE_SPAWNER\",\n\t\"MIMIGA_FARMER_STANDING\",\n\t\"MIMIGA_FARMER_WALKING\",\n\t\"JAIL_GRATING\",\n\t\"MOMORIN\",\n\t\"CHIE\",\n\t\"MEGANE\",\n\t\"KANPACHI_STANDING\",\n\t\"BUCKET\",\n\t\"DROLL_GUARD\",\n\t\"RED_FLOWERS_SPROUTS\",\n\t\"RED_FLOWERS_BLOOMING\",\n\t\"ROCKET\",\n\t\"ORANGEBELL\",\n\t\"ORANGEBELL_BABY\",\n\t\"FLOWERS_PENS1\",\n\t\"MIDORIN\",\n\t\"GUNFISH\",\n\t\"GUNFISH_SHOT\",\n\t\"PROXIMITY_PRESS_HOZ\",\n\t\"MIMIGA_CAGE\",\n\t\"MIMIGA_JAILED\",\n\t\"CRITTER_HOPPING_RED\",\n\t\"RED_BAT\",\n\t\"RED_BAT_SPAWNER\",\n\t\"LAVA_DRIP\",\n\t\"LAVA_DRIP_SPAWNER\",\n\t\"PROXIMITY_PRESS_VERT\",\n\t\"BOSS_MISERY\",\n\t\"MISERY_SHOT\",\n\t\"MISERY_PHASE\",\n\t\"MISERY_BALL\",\n\t\"BLACK_LIGHTNING\",\n\t\"MISERY_RING\",\n\t\"XP_CAPSULE\",\n\t\"HELICOPTER\",\n\t\"HELICOPTER_BLADE\",\n\t\"DOCTOR_CROWNED\",\n\t\"RED_CRYSTAL\",\n\t\"MIMIGA_SLEEPING\",\n\t\"CURLY_CARRIED\",\n\t\"MIMIGA_CAGED\",\n\t\"CHIE_CAGED\",\n\t\"CHACO_CAGED\",\n\t\"BOSS_DOCTOR\",\n\t\"DOCTOR_SHOT\",\n\t\"DOCTOR_SHOT_TRAIL\",\n\t\"DOCTOR_BLAST\",\n\t\"BOSS_DOCTOR_FRENZIED\",\n\t\"IGOR_BALCONY\",\n\t\"DOCTOR_BAT\",\n\t\"RED_ENERGY\",\n\t\"IRONH_BRICK\",\n\t\"BRICK_SPAWNER\",\n\t\"DROLL_SHOT\",\n\t\"DROLL\",\n\t\"PUPPY_ITEMS\",\n\t\"RED_DEMON\",\n\t\"RED_DEMON_SHOT\",\n\t\"LITTLE_FAMILY\",\n\t\"FALLING_BLOCK\",\n\t\"SUE_TELEPORT_IN\",\n\t\"DOCTOR_GHOST\",\n\t\"UDMINI_PLATFORM\",\n\t\"MISERY_FRENZIED\",\n\t\"SUE_FRENZIED\",\n\t\"UD_SPINNER\",\n\t\"UD_SPINNER_TRAIL\",\n\t\"UD_SMOKE\",\n\t\"UD_PELLET\",\n\t\"MISERY_CRITTER\",\n\t\"MISERY_BAT\",\n\t\"UD_MINICORE_IDLE\",\n\t\"QUAKE\",\n\t\"UD_BLAST\",\n\t\"FALLING_BLOCK_SPAWNER\",\n\t\"CLOUD\",\n\t\"CLOUD_SPAWNER\",\n\tNULL,\n\t\"INTRO_DOCTOR\",\n\t\"INTRO_KINGS\",\n\t\"INTRO_CROWN\",\n\t\"MISERY_MISSILE\",\n\t\"SCROLL_CONTROLLER\",\n\tNULL,\n\t\"GAUDI_PATIENT\",\n\t\"BABY_PUPPY\",\n\t\"BALROG_MEDIC\",\n\t\"SANTA_CAGED\",\n\t\"STUMPY\",\n\t\"BUTE_FLYING\",\n\t\"BUTE_SWORD\",\n\t\"BUTE_ARCHER\",\n\t\"BUTE_ARROW\",\n\t\"MA_PIGNON\",\n\t\"MA_PIGNON_ROCK\",\n\t\"MA_PIGNON_CLONE\",\n\t\"BUTE_DYING\",\n\t\"MESA\",\n\t\"MESA_DYING\",\n\t\"MESA_BLOCK\",\n\t\"CURLY_CARRIED_SHOOTING\",\n\t\"CCS_GUN\",\n\t\"DELEET\",\n\t\"BUTE_FALLING\",\n\t\"BUTE_SPAWNER\",\n\t\"HP_LIGHTNING\",\n\t\"TURNING_HUMAN\",\n\t\"AHCHOO\",\n\t\"TRANSMOGRIFIER\",\n\t\"BUILDING_FAN\",\n\t\"ROLLING\",\n\t\"BALLOS_BONE\",\n\t\"BALLOS_BONE_SPAWNER\",\n\t\"BALLOS_TARGET\",\n\t\"STRAINING\",\n\t\"IKACHAN\",\n\t\"IKACHAN_SPAWNER\",\n\t\"NUMAHACHI\",\n\t\"GREEN_DEVIL\",\n\t\"GREEN_DEVIL_SPAWNER\",\n\t\"BALLOS_PRIEST\",\n\t\"BALLOS_SMILE\",\n\t\"BALLOS_ROTATOR\",\n\t\"BALLOS_BODY_2\",\n\t\"BALLOS_EYE_2\",\n\t\"BALLOS_SKULL\",\n\t\"BALLOS_PLATFORM\",\n\t\"HOPPY\",\n\t\"BALLOS_SPIKES\",\n\t\"STATUE_BASE\",\n\t\"BUTE_ARCHER_RED\",\n\t\"STATUE\",\n\t\"THE_CAST\",\n\t\"BUTE_SWORD_RED\",\n\t\"WALL_COLLAPSER\",\n\t\"BALROG_PASSENGER\",\n\t\"BALROG_FLYING\",\n\t\"PUPPY_GHOST\",\n\t\"MISERY_WIND\",\n\t\"DROPLET_SPAWNER\",\n\t\"THANK_YOU\",\n\tNULL,\n\tNULL,\n\t\"BALFROG\",\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"PLAYER\",\n\t\"HEART3\",\n\t\"MISSILE3\",\n\t\"LAVA_DROPLET\",\n\t\"SKULLHEAD_CARRIED\",\n\t\"BBOX_PUPPET\",\n\t\"SMOKE_DROPPER\",\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"CORE_CONTROLLER\",\n\t\"CORE_FRONT\",\n\t\"CORE_BACK\",\n\t\"CORE_MARKER\",\n\t\"MINICORE\",\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"POLAR_SHOT\",\n\t\"MGUN_SPAWNER\",\n\t\"MGUN_LEADER\",\n\t\"MGUN_TRAIL\",\n\t\"MGUN_L1_SHOT\",\n\t\"MISSILE_SHOT\",\n\t\"SUPERMISSILE_SHOT\",\n\t\"MISSILE_BOOM_SPAWNER\",\n\t\"FIREBALL1\",\n\t\"FIREBALL23\",\n\t\"FIREBALL_TRAIL\",\n\t\"BLADE12_SHOT\",\n\t\"BLADE3_SHOT\",\n\t\"BLADE_SLASH\",\n\t\"SNAKE1_SHOT\",\n\t\"SNAKE23_SHOT\",\n\t\"SNAKE_TRAIL\",\n\t\"NEMESIS_SHOT\",\n\t\"NEMESIS_SHOT_CURLY\",\n\t\"BUBBLER12_SHOT\",\n\t\"BUBBLER3_SHOT\",\n\t\"BUBBLER_SHARP\",\n\t\"SPUR_SHOT\",\n\t\"SPUR_TRAIL\",\n\t\"WHIMSICAL_STAR\",\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"SHOTS_END\",\n\t\"OMEGA_BODY\",\n\t\"OMEGA_LEG\",\n\t\"OMEGA_STRUT\",\n\t\"OMEGA_SHOT\",\n\tNULL,\n\t\"IRONH\",\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"X_MAINOBJECT\",\n\t\"X_BODY\",\n\t\"X_TREAD\",\n\t\"X_INTERNALS\",\n\t\"X_DOOR\",\n\t\"X_TARGET\",\n\t\"X_FISHY_SPAWNER\",\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"SISTERS_HEAD\",\n\t\"SISTERS_BODY\",\n\t\"SISTERS_MAIN\",\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"UDCORE_MAIN\",\n\t\"UDCORE_FRONT\",\n\t\"UDCORE_BACK\",\n\t\"UDCORE_FACE\",\n\t\"UDMINI_ROTATOR\",\n\t\"UDMINI_BBOX\",\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"HEAVY_PRESS\",\n\t\"HEAVY_PRESS_SHIELD\",\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\t\"BALLOS_MAIN\",\n\t\"BALLOS_BODY\",\n\t\"BALLOS_EYE\",\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL,\n\tNULL\n};\n"
  },
  {
    "path": "autogen/objnames.fdh",
    "content": "//hash:00000000\n//automatically generated by Makegen\n"
  },
  {
    "path": "autogen/sprites.h",
    "content": "//hash: e3321826\n//auto-generated by sifedit Tue 06 2010  05:35:38PM\n\n#define SPR_NULL\t\t0\n#define SPR_FADE_DIAMOND\t\t1\n#define SPR_FADE_CIRCLE\t\t2\n#define SPR_MYCHAR\t\t3\n#define SPR_MYCHAR_MIMIGA\t\t4\n#define SPR_BONKHEADPLUS\t\t5\n#define SPR_QMARK\t\t6\n#define SPR_PDROWNED\t\t7\n#define SPR_WATER_SHIELD\t\t8\n#define SPR_SHOT_FIREBALL1\t\t9\n#define SPR_WEAPONS_START\t\t10\n#define SPR_WEPSTART_VERT\t\t11\n#define SPR_SNAKEGUN\t\t12\n#define SPR_SNAKEGUNVERT\t\t13\n#define SPR_PSTAR\t\t14\n#define SPR_PSTAR_VERT\t\t15\n#define SPR_FIREBALLGUN\t\t16\n#define SPR_FIREBALLGUNVERT\t\t17\n#define SPR_MGUN\t\t18\n#define SPR_MGUN_VERT\t\t19\n#define SPR_MLAUNCHER\t\t20\n#define SPR_MLAUNCHER_VERT\t\t21\n#define SPR_SUPER_MLAUNCHER\t\t22\n#define SPR_SUPER_MLAUNCHER_VERT\t\t23\n#define SPR_BUBBLE_BURST\t\t24\n#define SPR_SHOT_POLARSTAR\t\t25\n#define SPR_SHOT_POLARSTARV\t\t26\n#define SPR_SHOT_POLARSTAR_L3\t\t27\n#define SPR_SHOT_POLARSTAR_L3V\t\t28\n#define SPR_SHOT_MGUN_L1\t\t29\n#define SPR_SHOT_MGUN_L1V\t\t30\n#define SPR_SHOT_MGUN_L2\t\t31\n#define SPR_SHOT_MGUN_L2V\t\t32\n#define SPR_SHOT_MGUN_L3LEAD\t\t33\n#define SPR_SHOT_MGUN_L3LEADV\t\t34\n#define SPR_SHOT_MGUN_L3TAIL\t\t35\n#define SPR_SHOT_MGUN_L3TAILV\t\t36\n#define SPR_SHOT_MISSILE1\t\t37\n#define SPR_SHOT_MISSILE1V\t\t38\n#define SPR_SHOT_MISSILE2\t\t39\n#define SPR_SHOT_MISSILE2V\t\t40\n#define SPR_SHOT_MISSILE3\t\t41\n#define SPR_SHOT_MISSILE3V\t\t42\n#define SPR_SHOT_SUPERMISSILE13\t\t43\n#define SPR_SHOT_SUPERMISSILE13_V\t\t44\n#define SPR_SHOT_SUPERMISSILE2\t\t45\n#define SPR_SHOT_SUPERMISSILE2_V\t\t46\n#define SPR_SHOT_FIREBALL23\t\t47\n#define SPR_FIREBALL_TRAIL2\t\t48\n#define SPR_FIREBALL_TRAIL3\t\t49\n#define SPR_SHOT_BLADE_L1\t\t50\n#define SPR_SHOT_BLADE_L1_VERT\t\t51\n#define SPR_SHOT_BLADE_L2\t\t52\n#define SPR_SHOT_BLADE_L2_V\t\t53\n#define SPR_TABLECHAIRS\t\t54\n#define SPR_SIGNPOST\t\t55\n#define SPR_POT\t\t56\n#define SPR_BED\t\t57\n#define SPR_RED_PETALS\t\t58\n#define SPR_DOOR\t\t59\n#define SPR_DOOR_BUSTED\t\t60\n#define SPR_SAVE_SIGN\t\t61\n#define SPR_SAVE_POINT\t\t62\n#define SPR_RECHARGE\t\t63\n#define SPR_DESTROYABLE\t\t64\n#define SPR_SMOKE_CLOUD\t\t65\n#define SPR_MISSILEHITSMOKE\t\t66\n#define SPR_FIREPLACE\t\t67\n#define SPR_CHEST_CLOSED\t\t68\n#define SPR_CHEST_OPEN\t\t69\n#define SPR_LIFE_CAPSULE\t\t70\n#define SPR_XP_CAPSULE\t\t71\n#define SPR_LIGHTNING\t\t72\n#define SPR_TERMINAL\t\t73\n#define SPR_TELEPORTER\t\t74\n#define SPR_TELEPORTER_LIGHTS\t\t75\n#define SPR_WATER_DROPLET\t\t76\n#define SPR_LAVA_DROPLET\t\t77\n#define SPR_SPRINKLER\t\t78\n#define SPR_LARGEDOOR\t\t79\n#define SPR_LARGEDOOR_FRAME\t\t80\n#define SPR_PRESS\t\t81\n#define SPR_HIDDEN_SPARKLE\t\t82\n#define SPR_BIG_SPIKE\t\t83\n#define SPR_SPIKE_SMALL\t\t84\n#define SPR_COMPUTER\t\t85\n#define SPR_CHALKBOARD\t\t86\n#define SPR_GRATE\t\t87\n#define SPR_STAR_SOLID\t\t88\n#define SPR_STAR_POOF\t\t89\n#define SPR_FISHY\t\t90\n#define SPR_BLOODHIT\t\t91\n#define SPR_SMOKETRAIL\t\t92\n#define SPR_BOOMFLASH\t\t93\n#define SPR_ZZZZ\t\t94\n#define SPR_HEART\t\t95\n#define SPR_MISSILE\t\t96\n#define SPR_HEART3\t\t97\n#define SPR_MISSILE3\t\t98\n#define SPR_XP_SMALL\t\t99\n#define SPR_XP_MED\t\t100\n#define SPR_XP_LARGE\t\t101\n#define SPR_HIDDEN_POWERUP\t\t102\n#define SPR_TEXTBOX\t\t103\n#define SPR_TEXTBULLET\t\t104\n#define SPR_YESNO\t\t105\n#define SPR_YESNOHAND\t\t106\n#define SPR_FACES\t\t107\n#define SPR_ITEMIMAGE\t\t108\n#define SPR_STAGEIMAGE\t\t109\n#define SPR_AIR\t\t110\n#define SPR_TEXT_ARMS\t\t111\n#define SPR_TEXT_ITEMS\t\t112\n#define SPR_TEXT_WARP\t\t113\n#define SPR_SELECTOR_ITEMS\t\t114\n#define SPR_SELECTOR_ARMS\t\t115\n#define SPR_HEALTHBAR\t\t116\n#define SPR_HEALTHFILL\t\t117\n#define SPR_XPBAR\t\t118\n#define SPR_XPLEVELICON\t\t119\n#define SPR_ARMSICONS\t\t120\n#define SPR_NAAMMO\t\t121\n#define SPR_REDNUMBERS\t\t122\n#define SPR_WHITENUMBERS\t\t123\n#define SPR_NIKU_CLOCK\t\t124\n#define SPR_NIKU_PUNC\t\t125\n#define SPR_LEVELUP\t\t126\n#define SPR_LEVELDOWN\t\t127\n#define SPR_EMPTY\t\t128\n#define SPR_BOSSHPICON\t\t129\n#define SPR_CURLY\t\t130\n#define SPR_MISERY\t\t131\n#define SPR_BALROG\t\t132\n#define SPR_JENKA\t\t133\n#define SPR_JENKA_COLLAPSED\t\t134\n#define SPR_DOCTOR\t\t135\n#define SPR_SUE\t\t136\n#define SPR_TOROKO\t\t137\n#define SPR_KING\t\t138\n#define SPR_KINGS_SWORD\t\t139\n#define SPR_BLADE\t\t140\n#define SPR_BLUE_ROBOT\t\t141\n#define SPR_CHTHULU\t\t142\n#define SPR_KAZUMA\t\t143\n#define SPR_PROFESSOR_BOOSTER\t\t144\n#define SPR_OMG_CLOSED\t\t145\n#define SPR_OMG_OPENED\t\t146\n#define SPR_OMG_STRUT\t\t147\n#define SPR_OMG_LEG_INAIR\t\t148\n#define SPR_OMG_LEG_ONGROUND\t\t149\n#define SPR_OMG_BULLET_NORMAL\t\t150\n#define SPR_OMG_BULLET_HARD\t\t151\n#define SPR_BEETLE_BROWN\t\t152\n#define SPR_MIMIGAC\t\t153\n#define SPR_CURLY_BOSS\t\t154\n#define SPR_POLISH\t\t155\n#define SPR_POLISHBABY\t\t156\n#define SPR_SANDCROC\t\t157\n#define SPR_SUNSTONE\t\t158\n#define SPR_PUPPY\t\t159\n#define SPR_PUPPY_ASLEEP\t\t160\n#define SPR_SKULLHEAD\t\t161\n#define SPR_SKULLSTEP\t\t162\n#define SPR_SKULLSTEP_FOOT\t\t163\n#define SPR_SKELETON\t\t164\n#define SPR_SKELETON_SHOT\t\t165\n#define SPR_ARMADILLO\t\t166\n#define SPR_CROW\t\t167\n#define SPR_TOROKO_FRENZIED\t\t168\n#define SPR_TOROKO_FLOWER\t\t169\n#define SPR_TOROKO_BLOCK\t\t170\n#define SPR_POWER_CRITTER\t\t171\n#define SPR_JELLY\t\t172\n#define SPR_GIANT_JELLY\t\t173\n#define SPR_SANTA\t\t174\n#define SPR_SANTAS_KEY\t\t175\n#define SPR_CHACO\t\t176\n#define SPR_MANNAN\t\t177\n#define SPR_MANNAN_SHOT\t\t178\n#define SPR_FAN_LEFT\t\t179\n#define SPR_FAN_UP\t\t180\n#define SPR_FAN_RIGHT\t\t181\n#define SPR_FAN_DOWN\t\t182\n#define SPR_HEY\t\t183\n#define SPR_MOTORBIKE\t\t184\n#define SPR_MOTORBIKE_MOUNTED\t\t185\n#define SPR_MOTORBIKE_BROKEN\t\t186\n#define SPR_POWERCOMP\t\t187\n#define SPR_POWERSINE\t\t188\n#define SPR_MALCO\t\t189\n#define SPR_MALCO_BROKEN\t\t190\n#define SPR_BALROG_SHOT_BOUNCE\t\t191\n#define SPR_FRENZIED_MIMIGA\t\t192\n#define SPR_FROG\t\t193\n#define SPR_MINIFROG\t\t194\n#define SPR_BALROG_GREEN\t\t195\n#define SPR_BALFROG\t\t196\n#define SPR_BALFROG_JUMP\t\t197\n#define SPR_BALFROG_SHOT\t\t198\n#define SPR_CRITTER_SHOOTING_PURPLE\t\t199\n#define SPR_CRITTER_SHOT\t\t200\n#define SPR_MOVING_BLOCK\t\t201\n#define SPR_FIREWHIRR\t\t202\n#define SPR_FIREWHIRR_SHOT\t\t203\n#define SPR_GAUDI_EGG\t\t204\n#define SPR_GRATING\t\t205\n#define SPR_SHUTTER\t\t206\n#define SPR_SHUTTER_BIG\t\t207\n#define SPR_SHUTTER_STUCK\t\t208\n#define SPR_ALMOND_LIFT\t\t209\n#define SPR_ALMOND_ROBOT\t\t210\n#define SPR_CORE_FRONT\t\t211\n#define SPR_CORE_BACK\t\t212\n#define SPR_MINICORE\t\t213\n#define SPR_MINICORE_SHOT\t\t214\n#define SPR_CORE_GHOSTIE\t\t215\n#define SPR_CORE_BLAST\t\t216\n#define SPR_CORESHOOTMARKER\t\t217\n#define SPR_WATER_CURRENT\t\t218\n#define SPR_MOTION_WALL\t\t219\n#define SPR_IRONH\t\t220\n#define SPR_IRONH_HURT\t\t221\n#define SPR_IRONH_FISHY\t\t222\n#define SPR_IRONH_SHOT\t\t223\n#define SPR_IRONH_BRICK\t\t224\n#define SPR_IRONH_BIGBRICK\t\t225\n#define SPR_IKACHAN\t\t226\n#define SPR_CURLY_COLLAPSED\t\t227\n#define SPR_SANDCROC_OSIDE\t\t228\n#define SPR_HOPPY\t\t229\n#define SPR_CHINFISH\t\t230\n#define SPR_KANPACHI_FISHING\t\t231\n#define SPR_FLOWERS_PENS1\t\t232\n#define SPR_JACK\t\t233\n#define SPR_MAHIN\t\t234\n#define SPR_YAMASHITA_FLOWERS\t\t235\n#define SPR_YAMASHITA_PAVILION\t\t236\n#define SPR_TOROKO_SHACK\t\t237\n#define SPR_MISERYS_BUBBLE\t\t238\n#define SPR_MUSHROOM_ENEMY\t\t239\n#define SPR_GIANT_MUSHROOM_ENEMY\t\t240\n#define SPR_GRAVEKEEPER\t\t241\n#define SPR_CAGE\t\t242\n#define SPR_CRITTER_HOPPING_GREEN\t\t243\n#define SPR_CRITTER_HOPPING_BLUE\t\t244\n#define SPR_CRITTER_FLYING_CYAN\t\t245\n#define SPR_CRITTER_HOPPING_AQUA\t\t246\n#define SPR_BAT\t\t247\n#define SPR_BAT_BLUE\t\t248\n#define SPR_DOOR_ENEMY\t\t249\n#define SPR_HERMIT_GUNSMITH\t\t250\n#define SPR_KAZUMA_AT_COMPUTER\t\t251\n#define SPR_SUE_AT_COMPUTER\t\t252\n#define SPR_BASIL\t\t253\n#define SPR_BEHEMOTH\t\t254\n#define SPR_BEETLE_GREEN\t\t255\n#define SPR_BEETLE_FREEFLY\t\t256\n#define SPR_GIANT_BEETLE\t\t257\n#define SPR_GIANT_BEETLE_SHOT\t\t258\n#define SPR_FORCEFIELD\t\t259\n#define SPR_EGG_ELEVATOR\t\t260\n#define SPR_IGOR\t\t261\n#define SPR_IGOR_PUNCHING\t\t262\n#define SPR_IGOR_SHOT\t\t263\n#define SPR_IGOR_DEFEATED\t\t264\n#define SPR_BEETLE_FREEFLY_2\t\t265\n#define SPR_GIANT_BEETLE_2\t\t266\n#define SPR_UNIMPLEMENTED_OBJECT\t\t267\n#define SPR_BBOX_PUPPET_1\t\t268\n#define SPR_BBOX_PUPPET_2\t\t269\n#define SPR_BBOX_PUPPET_3\t\t270\n#define SPR_BBOX_PUPPET_4\t\t271\n#define SPR_SHOT_BLADE_L3\t\t272\n#define SPR_SHOT_BLADE_L3_V\t\t273\n#define SPR_BLADE_SLASH\t\t274\n#define SPR_SHOT_SNAKE_L1\t\t275\n#define SPR_BLUE_ROBOT_SITTING\t\t276\n#define SPR_BLUE_ROBOT_REMAINS\t\t277\n#define SPR_X_BODY\t\t278\n#define SPR_X_TREAD_LOWER\t\t279\n#define SPR_X_TREAD_UPPER\t\t280\n#define SPR_X_INTERNALS\t\t281\n#define SPR_X_DOOR\t\t282\n#define SPR_X_TARGETS\t\t283\n#define SPR_X_FISHY_MISSILE\t\t284\n#define SPR_X_DEFEATED\t\t285\n#define SPR_GAUDI_FLYING_SHOT\t\t286\n#define SPR_GAUDI\t\t287\n#define SPR_GAUDI_DYING\t\t288\n#define SPR_GAUDI_FLYING\t\t289\n#define SPR_GAUDI_ARMORED\t\t290\n#define SPR_GAUDI_ARMORED_SHOT\t\t291\n#define SPR_GAUDI_SHOPKEEP\t\t292\n#define SPR_DR_GERO\t\t293\n#define SPR_NURSE_HASUMI\t\t294\n#define SPR_POOH_BLACK\t\t295\n#define SPR_POOH_BLACK_BUBBLE\t\t296\n#define SPR_BOULDER\t\t297\n#define SPR_STRAINING\t\t298\n#define SPR_BALROG_MISSILE\t\t299\n#define SPR_FUZZ_CORE\t\t300\n#define SPR_FUZZ\t\t301\n#define SPR_BUYOBUYO_BASE\t\t302\n#define SPR_BUYOBUYO_BASE_CEILING\t\t303\n#define SPR_BUYOBUYO\t\t304\n#define SPR_DRAGON_ZOMBIE\t\t305\n#define SPR_DRAGON_ZOMBIE_DEAD\t\t306\n#define SPR_DRAGON_ZOMBIE_SHOT\t\t307\n#define SPR_FALLING_SPIKE_SMALL\t\t308\n#define SPR_FALLING_SPIKE_LARGE\t\t309\n#define SPR_COUNTER_BOMB\t\t310\n#define SPR_COUNTER_BOMB_NUMBER\t\t311\n#define SPR_SISTERS_BODY\t\t312\n#define SPR_SISTERS_HEAD_1\t\t313\n#define SPR_SISTERS_HEAD_2\t\t314\n#define SPR_SKY_DRAGON\t\t315\n#define SPR_NIGHT_SPIRIT\t\t316\n#define SPR_NIGHT_SPIRIT_SHOT\t\t317\n#define SPR_PIXEL_CAT\t\t318\n#define SPR_ITOH\t\t319\n#define SPR_MOMORIN\t\t320\n#define SPR_ORANGEBELL\t\t321\n#define SPR_ORANGEBELL_BABY\t\t322\n#define SPR_STUMPY\t\t323\n#define SPR_GUNFISH\t\t324\n#define SPR_GUNFISH_SHOT\t\t325\n#define SPR_GUNFISH_BUBBLE\t\t326\n#define SPR_MIDORIN\t\t327\n#define SPR_DROLL\t\t328\n#define SPR_DROLL_SHOT\t\t329\n#define SPR_MIMIGA_FARMER\t\t330\n#define SPR_RED_FLOWERS_SPROUTS\t\t331\n#define SPR_RED_FLOWERS_BLOOMING\t\t332\n#define SPR_CHIE\t\t333\n#define SPR_MEGANE\t\t334\n#define SPR_MIMIGA_SLEEPING\t\t335\n#define SPR_KANPACHI_STANDING\t\t336\n#define SPR_BUCKET\t\t337\n#define SPR_JAIL_GRATING\t\t338\n#define SPR_JAIL2_CAGE\t\t339\n#define SPR_MIMIGA_JAILED\t\t340\n#define SPR_ROCKET\t\t341\n#define SPR_PROXIMITY_PRESS_HOZ\t\t342\n#define SPR_MA_PIGNON\t\t343\n#define SPR_MA_PIGNON_ROCK\t\t344\n#define SPR_CRITTER_HOPPING_RED\t\t345\n#define SPR_LAVA_DRIP\t\t346\n#define SPR_LAVA_DRIP_SPLASH\t\t347\n#define SPR_RED_BAT\t\t348\n#define SPR_RED_DEMON\t\t349\n#define SPR_RED_DEMON_SHOT\t\t350\n#define SPR_PROXIMITY_PRESS_VERT\t\t351\n#define SPR_BOSS_MISERY\t\t352\n#define SPR_MISERY_RING\t\t353\n#define SPR_MISERY_SHOT\t\t354\n#define SPR_MISERY_BALL\t\t355\n#define SPR_BLACK_LIGHTNING\t\t356\n#define SPR_MISERY_PHASE\t\t357\n#define SPR_ORANGE_BAT_FINAL\t\t358\n#define SPR_HELICOPTER\t\t359\n#define SPR_HELICOPTER_BLADE_1\t\t360\n#define SPR_HELICOPTER_BLADE_2\t\t361\n#define SPR_BALCONY_BLOCK_LARGE\t\t362\n#define SPR_BALCONY_BLOCK_SMALL\t\t363\n#define SPR_MIMIGA_CAGE_FINAL\t\t364\n#define SPR_MIMIGA_CAGED\t\t365\n#define SPR_DOCTOR_CROWNED\t\t366\n#define SPR_RED_CRYSTAL\t\t367\n#define SPR_BOSS_DOCTOR\t\t368\n#define SPR_DOCTOR_SHOT\t\t369\n#define SPR_DOCTOR_BLAST\t\t370\n#define SPR_BOSS_DOCTOR_FRENZIED\t\t371\n#define SPR_RED_ENERGY\t\t372\n#define SPR_DOCTOR_BAT\t\t373\n#define SPR_SUE_FRENZIED\t\t374\n#define SPR_MISERY_FRENZIED\t\t375\n#define SPR_MISERY_CRITTER\t\t376\n#define SPR_MISERY_MISSILE\t\t377\n#define SPR_UD_MINICORE\t\t378\n#define SPR_UD_FRONT\t\t379\n#define SPR_UD_BACK\t\t380\n#define SPR_UD_FACES\t\t381\n#define SPR_UD_BLAST\t\t382\n#define SPR_UD_PELLET\t\t383\n#define SPR_UD_SMOKE\t\t384\n#define SPR_UD_BANG\t\t385\n#define SPR_MARKER\t\t386\n#define SPR_UD_ROTATOR\t\t387\n#define SPR_UD_SPINNER\t\t388\n#define SPR_UD_SPINNER_TRAIL\t\t389\n#define SPR_UDMINI_PLATFORM\t\t390\n#define SPR_ISLAND_SCENE\t\t391\n#define SPR_ISLAND_TREES\t\t392\n#define SPR_ISLAND\t\t393\n#define SPR_CLOUD_1\t\t394\n#define SPR_CLOUD_2\t\t395\n#define SPR_CLOUD_3\t\t396\n#define SPR_CLOUD_4\t\t397\n#define SPR_BALROG_FLYING\t\t398\n#define SPR_CASTS\t\t399\n#define SPR_BALROG_MEDIC\t\t400\n#define SPR_GAUDI_PATIENT\t\t401\n#define SPR_BABY_PUPPY\t\t402\n#define SPR_TRANSMOGRIFIER\t\t403\n#define SPR_TURNING_HUMAN\t\t404\n#define SPR_BUILDING_FAN\t\t405\n#define SPR_MISERY_WIND\t\t406\n#define SPR_AHCHOO\t\t407\n#define SPR_BALROG_CAST\t\t408\n#define SPR_THANK_YOU\t\t409\n#define SPR_NEMESIS\t\t410\n#define SPR_NEMESIS_VERT\t\t411\n#define SPR_SPUR\t\t412\n#define SPR_SPUR_VERT\t\t413\n#define SPR_BUBBLER\t\t414\n#define SPR_BUBBLER_VERT\t\t415\n#define SPR_SHOT_NEMESIS_L1\t\t416\n#define SPR_SHOT_NEMESIS_L1_V\t\t417\n#define SPR_SHOT_NEMESIS_L2\t\t418\n#define SPR_SHOT_NEMESIS_L2_V\t\t419\n#define SPR_SHOT_NEMESIS_L3\t\t420\n#define SPR_SHOT_NEMESIS_L3_V\t\t421\n#define SPR_LITTLE_FAMILY\t\t422\n#define SPR_SHOT_BUBBLER_L1\t\t423\n#define SPR_SHOT_BUBBLER_L2\t\t424\n#define SPR_SHOT_BUBBLER_L3\t\t425\n#define SPR_BUBBLER_SHARP\t\t426\n#define SPR_TRAIL_SPUR_L1\t\t427\n#define SPR_TRAIL_SPUR_L1_V\t\t428\n#define SPR_TRAIL_SPUR_L2\t\t429\n#define SPR_TRAIL_SPUR_L2_V\t\t430\n#define SPR_TRAIL_SPUR_L3\t\t431\n#define SPR_SPUR_HIT\t\t432\n#define SPR_MAP_PIXELS\t\t433\n#define SPR_HELL_BLOCK_LARGE\t\t434\n#define SPR_HELL_BLOCK_SMALL\t\t435\n#define SPR_BUTE_FLYING\t\t436\n#define SPR_BUTE_DYING\t\t437\n#define SPR_BUTE_FALLING\t\t438\n#define SPR_BUTE_SWORD\t\t439\n#define SPR_BUTE_ARCHER\t\t440\n#define SPR_BUTE_ARROW_RIGHT\t\t441\n#define SPR_BUTE_ARROW_LEFT\t\t442\n#define SPR_MESA\t\t443\n#define SPR_MESA_BLOCK\t\t444\n#define SPR_MESA_DYING\t\t445\n#define SPR_DELEET\t\t446\n#define SPR_ROLLING\t\t447\n#define SPR_HEAVY_PRESS\t\t448\n#define SPR_HP_CHARGE\t\t449\n#define SPR_HP_LIGHTNING\t\t450\n#define SPR_STATUE\t\t451\n#define SPR_NUMAHACHI\t\t452\n#define SPR_PUPPY_GHOST\t\t453\n#define SPR_GHOST_SPARKLE\t\t454\n#define SPR_CURLY_CARRIED_SHOOTING\t\t455\n#define SPR_BALLOS_PRIEST\t\t456\n#define SPR_BALLOS_SMILE\t\t457\n#define SPR_BALLOS_TARGET\t\t458\n#define SPR_BALLOS_BONE_SPAWNER\t\t459\n#define SPR_BALLOS_BONE\t\t460\n#define SPR_BALLOS_MAIN\t\t461\n#define SPR_BALLOS_BODY\t\t462\n#define SPR_BALLOS_EYE\t\t463\n#define SPR_BALLOS_ROTATOR\t\t464\n#define SPR_BALLOS_SKULL\t\t465\n#define SPR_BALLOS_SPIKES\t\t466\n#define SPR_BALLOS_PLATFORM\t\t467\n#define SPR_GREEN_DEVIL\t\t468\n#define SPR_BUTE_SWORD_RED_FALLING\t\t469\n#define SPR_BUTE_SWORD_RED\t\t470\n#define SPR_BUTE_ARCHER_RED\t\t471\n#define SPR_CCS_GUN\t\t472\n#define SPR_WHIMSICAL_STAR\t\t473\n#define SPR_INTRO_KINGS\t\t474\n#define SPR_INTRO_CROWN\t\t475\n#define SPR_INTRO_DOCTOR\t\t476\n#define SPR_CS_MYCHAR\t\t477\n#define SPR_CS_CURLY\t\t478\n#define SPR_CS_TOROKO\t\t479\n#define SPR_CS_KING\t\t480\n#define SPR_CS_SUE\t\t481\n#define SPR_TITLE\t\t482\n#define SPR_MENU\t\t483\n#define SPR_PIXEL_FOREVER\t\t484\n#define SPR_RESETPROMPT\t\t485\n#define SPR_OC_QUOTE\t\t486\n#define SPR_SAVESELECTOR_SIDES\t\t487\n#define SPR_SAVESELECTOR_MIDDLE\t\t488\n#define SPR_SS_HEALTH_ICON\t\t489\n\n"
  },
  {
    "path": "autogen/stagedata.fdh",
    "content": "//hash:00000000\n//automatically generated by Makegen\n"
  },
  {
    "path": "caret.cpp",
    "content": "\n// handle carets; a simplified type of objects used for visual effects.\n// carets have no interaction with real objects, and are always drawn\n// on top of all other objects and in front even of map foreground tiles.\n\n#include \"nx.h\"\n#include <math.h>\n#include \"common/llist.h\"\n#include \"caret.fdh\"\n\nCaret *firstcaret = NULL;\nCaret *lastcaret = NULL;\nstatic int _effecttype = EFFECT_NONE;\n\n\nbool Carets::init(void)\n{\n\tfirstcaret = NULL;\n\tlastcaret = NULL;\n\treturn 0;\n}\n\nvoid Carets::close(void)\n{\n\tCarets::DestroyAll();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nCaret *CreateCaret(int x, int y, int sprite, void (*ontick)(Caret *c), \\\n\t\t\t\t   int xinertia, int yinertia)\n{\n\tCaret *c = new Caret;\n\tmemset(c, 0, sizeof(Caret));\n\t\n\tc->x = x;\n\tc->y = y;\n\tc->xinertia = xinertia;\n\tc->yinertia = yinertia;\n\tc->sprite = sprite;\n\tc->OnTick = ontick;\n\tc->effecttype = _effecttype;\n\t\n\tLL_ADD_END(c, prev, next, firstcaret, lastcaret);\n\treturn c;\n}\n\nvoid Caret::Delete()\n{\n\tthis->deleted = true;\n}\n\nvoid Caret::Destroy()\n{\n\tLL_REMOVE(this, prev, next, firstcaret, lastcaret);\n\tdelete this;\n}\n\nvoid Caret::MoveAtDir(int dir, int speed)\n{\n\tthis->xinertia = 0;\n\tthis->yinertia = 0;\n\t\n\tswitch(dir)\n\t{\n\t\tcase LEFT:  this->xinertia = -speed; break;\n\t\tcase RIGHT: this->xinertia = speed; break;\n\t\tcase UP:\tthis->yinertia = -speed; break;\n\t\tcase DOWN:  this->yinertia = speed; break;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Carets::DrawAll(void)\n{\n    Caret *c = firstcaret;\n    Caret *next;\n    int scr_x, scr_y;\n\n    while(c)\n    {\n        next = c->next;\n\n        if (c->deleted)\n        {\n            c->Destroy();\n        }\n        else\n        {\n            // do caret ai\n            (*c->OnTick)(c);\n\n            // move caret\n            c->x += c->xinertia;\n            c->y += c->yinertia;\n\n            // get caret's onscreen position\n            // since caret's are all short-lived we just assume it's still onscreen\n            // and let SDL's clipping handle it if not.\n            if (!c->invisible && !c->deleted)\t// must check deleted again in case handler_function set it\n            {\n                scr_x = (c->x >> CSF) - (map.displayed_xscroll >> CSF);\n                scr_y = (c->y >> CSF) - (map.displayed_yscroll >> CSF);\n\n                scr_x -= sprites[c->sprite].frame[c->frame].dir[0].drawpoint.x;\n                scr_y -= sprites[c->sprite].frame[c->frame].dir[0].drawpoint.y;\n\n                draw_sprite(scr_x, scr_y, c->sprite, c->frame, RIGHT);\n            }\n        }\n\n        c = next;\n    }\n}\n\nint Carets::CountByEffectType(int type)\n{\n\tint count = 0;\n\tCaret *c = firstcaret;\n\twhile(c)\n\t{\n\t\tif (c->effecttype == type) count++;\n\t\tc = c->next;\n\t}\n\t\n\treturn count;\n}\n\nint Carets::DeleteByEffectType(int type)\n{\n\tint count = 0;\n\tCaret *c = firstcaret;\n\twhile(c)\n\t{\n\t\tif (c->effecttype == type) c->Delete();\n\t\tc = c->next;\n\t}\n\t\n\treturn count;\n}\n\nvoid Carets::DestroyAll(void)\n{\n\twhile(firstcaret)\n\t\tfirstcaret->Destroy();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// generates a caret-based effect at x, y. Most sprites used for carets have the\n// drawpoint at their center so the effect is generally centered at that position.\n//\n// an effect can be just a convenience function for creating a caret\n// with a particular sprite/ai combo, or it can produce a group of carets\n// which are always seen together (e.g. bonkplus or bloodspatter).\nCaret *effect(int x, int y, int effectno)\n{\nCaret *c;\nint i;\n\n\t// tell CreateCaret what kind of effect we're spawning\n\t_effecttype = effectno;\n\t\n\tswitch(effectno)\n\t{\n\t\tcase EFFECT_STARSOLID:\t  c = CreateCaret(x, y, SPR_STAR_SOLID, caret_animate3); break;\n\t\tcase EFFECT_STARPOOF:\t  c = CreateCaret(x, y, SPR_STAR_POOF, caret_animate3); break;\n\t\tcase EFFECT_FISHY: \t\t  c = CreateCaret(x, y, SPR_FISHY, caret_fishy); break;\n\t\tcase EFFECT_BOOMFLASH:\t  c = CreateCaret(x, y, SPR_BOOMFLASH, caret_animate3); break;\n\t\tcase EFFECT_BUBBLE_BURST: c = CreateCaret(x, y, SPR_BUBBLE_BURST, caret_animate3); break;\n\t\tcase EFFECT_SPUR_HIT: \t  c = CreateCaret(x, y, SPR_SPUR_HIT, caret_spur_hit); break;\n\t\tcase EFFECT_ZZZZ: \t\t  c = CreateCaret(x, y, SPR_ZZZZ, caret_zzzz); break;\n\t\tcase EFFECT_LEVELUP:\t  c = CreateCaret(x, y, SPR_LEVELUP, caret_playertext); break;\n\t\tcase EFFECT_LEVELDOWN: \t  c = CreateCaret(x, y, SPR_LEVELDOWN, caret_playertext); break;\n\t\tcase EFFECT_BONUSFLASH:\t  c = CreateCaret(x, y, SPR_SMOKE_CLOUD, caret_bonusflash); break;\n\t\tcase EFFECT_HEY: \t\t  c = CreateCaret(x, y, SPR_HEY, caret_hey); break;\n\t\tcase EFFECT_EMPTY:\t\t  c = CreateCaret(x, y, SPR_EMPTY, caret_playertext); break;\n\t\tcase EFFECT_SMOKETRAIL:\t  c = CreateCaret(x, y, SPR_SMOKETRAIL, caret_animate2); break;\n\t\t\n\t\tcase EFFECT_SMOKETRAIL_SLOW:\n\t\t\tc = CreateCaret(x, y, SPR_SMOKETRAIL, caret_animate3);\n\t\tbreak;\n\t\t\n\t\tcase EFFECT_GUNFISH_BUBBLE:\n\t\t{\n\t\t\tc = CreateCaret(x-(3<<CSF), y-(3<<CSF), SPR_GUNFISH_BUBBLE, caret_gunfish_bubble); break;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase EFFECT_LAVA_SPLASH:\n\t\t{\n\t\t\tc = CreateCaret(x-(3<<CSF), y-(3<<CSF), SPR_LAVA_DRIP_SPLASH, caret_gunfish_bubble); break;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase EFFECT_GHOST_SPARKLE:\n\t\t{\n\t\t\tc = CreateCaret(x, y, SPR_GHOST_SPARKLE, caret_ghost_sparkle);\n\t\t\tc->yinertia = random(-0x600, -0x200);\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// \"blood\" spatters from shot hitting enemy\n\t\tcase EFFECT_BLOODSPLATTER:\n\t\t{\n\t\t\tfor(i=0;i<3;i++)\n\t\t\t{\n\t\t\t\tc = CreateCaret(x, y, SPR_BLOODHIT, caret_animate3);\n\t\t\t\tvector_from_angle(random(0, 255), (2<<CSF), &c->xinertia, &c->yinertia);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// two little blinky stars when player bonks his head on the ceiling\n\t\tcase EFFECT_BONKPLUS:\n\t\t{\n\t\t\tfor(i=0;i<2;i++)\n\t\t\t{\n\t\t\t\tc = CreateCaret(x, y, SPR_BONKHEADPLUS, caret_bonkplus);\n\t\t\t\t\n\t\t\t\tc->xinertia = random(-0x600, 0x600);\n\t\t\t\tc->yinertia = random(-0x200, 0x200);\n\t\t\t\t//uint8_t angle = random(-14, 14);\n\t\t\t\t//if (random(0, 1)) angle += 128;\n\t\t\t\t//vector_from_angle(angle, random(0x200, 0x384), &c->xinertia, &c->yinertia);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase EFFECT_QMARK:\n\t\t{\n\t\t\t// only 1 question mark is ever shown at a time\n\t\t\tDeleteEffectsOfType(EFFECT_QMARK);\n\t\t\tc = CreateCaret(x, y, SPR_QMARK, caret_qmark);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\tstaterr(\"effect: invalid effect type %d\", effectno);\n\t\t\treturn NULL;\n\t}\n\t\n\t_effecttype = EFFECT_NONE;\n\treturn c;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid caret_animate1(Caret *c)\n{\n\tc->animdie(0);\n}\n\nvoid caret_animate2(Caret *c)\n{\n\tc->animdie(1);\n}\n\nvoid caret_animate3(Caret *c)\n{\n\tc->animdie(2);\n}\n\nvoid Caret::anim(int speed)\n{\nCaret * const &c = this;\n\n\tif (++c->animtimer > speed)\n\t{\n\t\tc->animtimer = 0;\n\t\t\n\t\tif (++c->frame >= sprites[c->sprite].nframes)\n\t\t\tc->frame = 0;\n\t}\n}\n\nvoid Caret::animdie(int speed)\n{\nCaret * const &c = this;\n\n\tif (++c->animtimer > speed)\n\t{\n\t\tc->animtimer = 0;\n\t\t\n\t\tif (++c->frame >= sprites[c->sprite].nframes)\n\t\t\tc->Delete();\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// flickers rapidly and decels at exponential speed.\n// used for the \"bonkplus\" effect when you bonk your head\nvoid caret_bonkplus(Caret *c)\n{\n\tc->xinertia *= 4; c->xinertia /= 5;\n\tc->yinertia *= 4; c->yinertia /= 5;\n\t\n\tc->invisible = (++c->timer & 2);\n\t\n\tif (c->timer > 20)\n\t\tc->Delete();\n}\n\n\nvoid caret_fishy(Caret *c)\n{\n\tc->yinertia -= 16;\n\tc->animdie(4);\n}\n\n\nvoid caret_spur_hit(Caret *c)\n{\n\tc->timer++;\n\tc->frame = (c->timer / 2) % 3;\n\t\n\tif (c->timer > 24)\n\t\tc->Delete();\n}\n\n\n// \"Level Up\", \"Level Down\", and \"Empty\" texts\nvoid caret_playertext(Caret *c)\n{\nint spd, stop;\n\n\tc->anim(1);\n\t\n\t// \"EMPTY\" text goes twice as fast as \"Level\" text\n\tif (c->sprite == SPR_EMPTY)\n\t{\n\t\tspd = 2;\n\t\tstop = 18;\n\t}\n\telse\n\t{\n\t\tspd = 1;\n\t\tstop = 20;\n\t}\n\t\n\tc->timer += spd;\n\tif (c->timer < 80)\n\t{\n\t\tif (c->timer < stop)\n\t\t{\n\t\t\tc->y -= (spd << CSF);\n\t\t}\n\t}\n\telse\n\t{\n\t\tc->Delete();\n\t}\n}\n\n\n// ? effect when you press down with no object around to activate\nvoid caret_qmark(Caret *c)\n{\n\tif (++c->timer < 40)\n\t{\n\t\tif (c->timer < 7)\n\t\t{\n\t\t\tc->y -= (3 << CSF);\n\t\t}\n\t}\n\telse\n\t{\n\t\tc->Delete();\n\t}\n}\n\n\nvoid caret_bonusflash(Caret *c)\n{\n\tif (++c->timer == 4)\n\t\tc->Delete();\n}\n\n\nvoid caret_hey(Caret *c)\n{\n\tif (++c->timer > 30) c->Delete();\n\tif (c->timer < 5) c->y -= (1<<CSF);\n}\n\n\nvoid caret_gunfish_bubble(Caret *c)\n{\n\tc->animdie(5);\n\t\n\tc->yinertia += 0x40;\n\tif (c->yinertia >= 0x5ff) c->yinertia = 0x5ff;\n}\n\n\nvoid caret_ghost_sparkle(Caret *c)\n{\n\tc->invisible = (++c->timer & 2);\n\t\n\tif (c->timer > 20)\n\t\tc->Delete();\n}\n\n\nvoid caret_zzzz(Caret *c)\n{\n\tc->animdie(5);\n\t\n\tc->x += 0x80;\n\tc->y -= 0x80;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "caret.fdh",
    "content": "//hash:1ea42078\n//automatically generated by Makegen\n\n/* located in caret.cpp */\n\n//---------------------[referenced from caret.cpp]-------------------//\nCaret *CreateCaret(int x, int y, int sprite, void (*ontick)(Caret *c), int xinertia, int yinertia);\nCaret *effect(int x, int y, int effectno);\nvoid caret_animate1(Caret *c);\nvoid caret_animate2(Caret *c);\nvoid caret_animate3(Caret *c);\nvoid caret_bonkplus(Caret *c);\nvoid caret_fishy(Caret *c);\nvoid caret_spur_hit(Caret *c);\nvoid caret_playertext(Caret *c);\nvoid caret_qmark(Caret *c);\nvoid caret_bonusflash(Caret *c);\nvoid caret_hey(Caret *c);\nvoid caret_gunfish_bubble(Caret *c);\nvoid caret_ghost_sparkle(Caret *c);\nvoid caret_zzzz(Caret *c);\n\n\n/* located in trig.cpp */\n\n//---------------------[referenced from caret.cpp]-------------------//\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys);\n\n\n/* located in common/stat.cpp */\n\n//---------------------[referenced from caret.cpp]-------------------//\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//---------------------[referenced from caret.cpp]-------------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "caret.h",
    "content": "\n#ifndef _CARET_H\n#define _CARET_H\n\nenum EffectTypes\n{\n\tEFFECT_NONE = 0,\n\t\n\tEFFECT_STARSOLID,\t\t\t\t// \"shot hit wall\" dissipation effect\n\tEFFECT_STARPOOF,\t\t\t\t// \"shot exceeded ttl\" dissipation effect\n\tEFFECT_FISHY,\t\t\t\t\t// common enemy shot dissipation effect\n\tEFFECT_BLOODSPLATTER,\t\t\t// \"blood\" spatter from hitting enemies\n\tEFFECT_BONKPLUS,\t\t\t\t// two +'s from player hitting head\n\tEFFECT_BOOMFLASH,\t\t\t\t// big white circle flash from enemies exploding etc\n\tEFFECT_LEVELUP,\n\tEFFECT_LEVELDOWN,\n\tEFFECT_QMARK,\t\t\t\t\t// \"?\" from pressing down with nothing nearby\n\tEFFECT_BONUSFLASH,\t\t\t\t// small bright \"tink\" when hearts/missiles disappear\n\tEFFECT_ZZZZ,\t\t\t\t\t// rising sleeping zzzzz's\n\tEFFECT_EMPTY,\t\t\t\t\t// rising text that says \"empty\"\n\tEFFECT_SMOKETRAIL,\t\t\t\t// small smoke puff\n\tEFFECT_SMOKETRAIL_SLOW,\t\t\t// small smoke puff (slower animate)\n\tEFFECT_HEY,\t\t\t\t\t\t// balloon that says \"Hey!\" (from grasstown)\n\tEFFECT_GUNFISH_BUBBLE,\t\t\t// bubbles spawned during dissipation of Gunfish shots\n\tEFFECT_LAVA_SPLASH,\t\t\t\t// just red version of gunfish bubble, really\n\tEFFECT_BUBBLE_BURST,\t\t\t// Bubbler dissipation effect. is NOT CENTERED.\n\tEFFECT_SPUR_HIT,\t\t\t\t// Spur hit wall effect, used in addition to starsolid.\n\tEFFECT_GHOST_SPARKLE\t\t\t// rising sparkles from Ballos's dog\n};\n\n\nnamespace Carets\n{\n\tbool init(void);\n\tvoid close(void);\n\t\n\tvoid DrawAll(void);\n\tint CountByEffectType(int type);\n\tint DeleteByEffectType(int type);\n\tvoid DestroyAll(void);\n};\n\n// synonyms\n#define CountEffectsOfType\t\tCarets::CountByEffectType\n#define DeleteEffectsOfType\t\tCarets::DeleteByEffectType\n\nstruct Caret\n{\n\tvoid (*OnTick)(Caret *c);\n\t\n\tint x, y;\n\tint xinertia, yinertia;\n\tint sprite, frame;\n\t\n\tint state;\n\tint effecttype;\n\t\n\tint timer, timer2;\n\tint animtimer;\n\t\n\tbool invisible;\n\tbool deleted;\n\t\n\tCaret *next, *prev;\n\t\n// ---------------------------------------\n\t\n\tvoid Delete();\n\tvoid Destroy();\n\tvoid MoveAtDir(int dir, int speed);\n\t\n\tvoid anim(int speed);\n\tvoid animdie(int speed);\n};\n\nCaret *CreateCaret(int x, int y, int sprite, void (*ontick)(Caret *c), \\\n\t\t\t\t   int xinertia=0, int yinertia=0);\n\n\n#endif\n\n"
  },
  {
    "path": "common/BList.cpp",
    "content": "//------------------------------------------------------------------------------\n//\tCopyright (c) 2001-2008, Haiku, Inc.\n//\n//\tPermission is hereby granted, free of charge, to any person obtaining a\n//\tcopy of this software and associated documentation files (the \"Software\"),\n//\tto deal in the Software without restriction, including without limitation\n//\tthe rights to use, copy, modify, merge, publish, distribute, sublicense,\n//\tand/or sell copies of the Software, and to permit persons to whom the\n//\tSoftware is furnished to do so, subject to the following conditions:\n//\n//\tThe above copyright notice and this permission notice shall be included in\n//\tall copies or substantial portions of the Software.\n//\n//\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n//\tFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n//\tDEALINGS IN THE SOFTWARE.\n//\n//\tFile Name:\t\tList.cpp\n//\tAuthor(s):\t\tThe Storage kit Team\n//\t\t\t\t\tIsaac Yonemoto\n//\t\t\t\t\tRene Gollent\n//\tDescription:\tBList class provides storage for pointers.\n//\t\t\t\t\tNot thread safe.\n//------------------------------------------------------------------------------\n\n\n// Standard Includes -----------------------------------------------------------\n#include \"BList.h\"\n\n// System Includes -------------------------------------------------------------\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n\n// helper function\nstatic inline\nvoid\nmove_items(void** items, int32 offset, int32 count)\n{\n\tif (count > 0 && offset != 0)\n\t\tmemmove(items + offset, items, count * sizeof(void*));\n}\n\n\n// constructor\nBList::BList(int32 count)\n\t  :\t\t fObjectList(NULL),\n\t\t\t fPhysicalSize(0),\n\t\t\t fItemCount(0),\n\t\t\t fBlockSize(count),\n\t\t\t fResizeThreshold(0)\n{\n\tif (fBlockSize <= 0)\n\t\tfBlockSize = 1;\n\t_ResizeArray(fItemCount);\n}\n\n\n// copy constructor\nBList::BList(const BList& anotherList)\n\t  :\t\t fObjectList(NULL),\n\t\t\t fPhysicalSize(0),\n\t\t\t fItemCount(0),\n\t\t\t fBlockSize(anotherList.fBlockSize)\n{\n\t*this = anotherList;\n}\n\n\n// destructor\nBList::~BList()\n{\n\tfree(fObjectList);\n}\n\n\n// =\nBList&\nBList::operator =(const BList &list)\n{\n\tfBlockSize = list.fBlockSize;\n\tif (_ResizeArray(list.fItemCount)) {\n\t\tfItemCount = list.fItemCount;\n\t\tmemcpy(fObjectList, list.fObjectList, fItemCount * sizeof(void*));\n\t}\n\t\n\treturn *this;\n}\n\n\n// AddItem\nbool\nBList::AddItem(const void *item, int32 index)\n{\n\tif (index < 0 || index > fItemCount)\n\t\treturn false;\n\t\n\tbool result = true;\n\t\n\tif (fItemCount + 1 > fPhysicalSize)\n\t\tresult = _ResizeArray(fItemCount + 1);\n\tif (result) {\n\t\t++fItemCount;\n\t\tmove_items(fObjectList + index, 1, fItemCount - index - 1);\n\t\tfObjectList[index] = (void *)item;\n\t}\n\treturn result;\n}\n\n\n// AddItem\nbool\nBList::AddItem(const void *item)\n{\n\tbool result = true;\n\tif (fPhysicalSize > fItemCount) {\n\t\tfObjectList[fItemCount] = (void *)item;\n\t\t++fItemCount;\n\t} else {\n\t\tif ((result = _ResizeArray(fItemCount + 1))) {\n\t\t\tfObjectList[fItemCount] = (void *)item;\n\t\t\t++fItemCount;\n\t\t}\n\t}\n\treturn result;\n}\n\n\n// AddList\nbool\nBList::AddList(const BList *list, int32 index)\n{\n\tbool result = (list && index >= 0 && index <= fItemCount);\n\tif (result && list->fItemCount > 0) {\n\t\tint32 count = list->fItemCount;\n\t\tif (fItemCount + count > fPhysicalSize)\n\t\t\tresult = _ResizeArray(fItemCount + count);\n\t\tif (result) {\n\t\t\tfItemCount += count;\n\t\t\tmove_items(fObjectList + index, count, fItemCount - index - count);\n\t\t\tmemcpy(fObjectList + index, list->fObjectList,\n\t\t\t\t   list->fItemCount * sizeof(void *));\n\t\t}\n\t}\n\treturn result;\n}\n\n\n// AddList\nbool\nBList::AddList(const BList *list)\n{\n\tbool result = (list != NULL);\n\tif (result && list->fItemCount > 0) {\n\t\tint32 index = fItemCount;\n\t\tint32 count = list->fItemCount;\n\t\tif (fItemCount + count > fPhysicalSize)\n\t\t\tresult = _ResizeArray(fItemCount + count);\n\t\tif (result) {\n\t\t\tfItemCount += count;\n\t\t\tmemcpy(fObjectList + index, list->fObjectList,\n\t\t\t\t   list->fItemCount * sizeof(void *));\n\t\t}\n\t}\n\treturn result;\n}\n\n\n// RemoveItem\nbool\nBList::RemoveItem(void *item)\n{\n\tint32 index = IndexOf(item);\n\tbool result = (index >= 0);\n\tif (result)\n\t\tRemoveItem(index);\n\treturn result;\n}\n\n\n// RemoveItem\nvoid *\nBList::RemoveItem(int32 index)\n{\n\tvoid *item = NULL;\n\tif (index >= 0 && index < fItemCount) {\n\t\titem = fObjectList[index];\n\t\tmove_items(fObjectList + index + 1, -1, fItemCount - index - 1);\n\t\t--fItemCount;\n\t\tif (fItemCount <= fResizeThreshold)\n\t\t\t_ResizeArray(fItemCount);\n\t}\n\treturn item;\n}\n\n\n// RemoveItems\nbool\nBList::RemoveItems(int32 index, int32 count)\n{\n\tbool result = (index >= 0 && index <= fItemCount);\n\tif (result) {\n\t\tif (index + count > fItemCount)\n\t\t\tcount = fItemCount - index;\n\t\tif (count > 0) {\n\t\t\tmove_items(fObjectList + index + count, -count,\n\t\t\t\t\t   fItemCount - index - count);\n\t\t\tfItemCount -= count;\n\t\t\tif (fItemCount <= fResizeThreshold)\n\t\t\t\t_ResizeArray(fItemCount);\n\t\t} else\n\t\t\tresult = false;\n\t}\n\treturn result;\n}\n\n\n//ReplaceItem\nbool\nBList::ReplaceItem(int32 index, void *newItem)\n{\n\tbool result = false;\n\t\n\tif (index >= 0 && index < fItemCount) {\n\t\tfObjectList[index] = newItem;\n\t\tresult = true;\n\t}\n\treturn result;\n}\n\n\n// MakeEmpty\nvoid\nBList::MakeEmpty()\n{\n\tfItemCount = 0;\n\t_ResizeArray(0);\n}\n\n\n/* Reordering items. */\n// SortItems\nvoid\nBList::SortItems(int (*compareFunc)(const void *, const void *))\n{\n\tif (compareFunc)\n\t\tqsort(fObjectList, fItemCount, sizeof(void *), compareFunc);\n}\n\n\n//SwapItems\nbool\nBList::SwapItems(int32 indexA, int32 indexB)\n{\n\tbool result = false;\n\t\n\tif (indexA >= 0 && indexA < fItemCount\n\t\t&& indexB >= 0 && indexB < fItemCount) {\n\t\t\n\t\tvoid *tmpItem = fObjectList[indexA];\n\t\tfObjectList[indexA] = fObjectList[indexB];\n\t\tfObjectList[indexB] = tmpItem;\n\t\t\n\t\tresult = true;\n\t}\n\t\n\treturn result;\n}\n\n\n// MoveItem\n// This moves a list item from posititon a to position b, moving the appropriate\n// block of list elements to make up for the move. For example, in the array:\n//\tA B C D E F G H I J\n//\t\tMoveing 1(B)->6(G) would result in this:\n// A C D E F G B H I J\nbool\nBList::MoveItem(int32 fromIndex, int32 toIndex)\n{\n\tif ((fromIndex >= fItemCount) || (toIndex >= fItemCount) || (fromIndex < 0)\n\t\t|| (toIndex < 0))\n\t\treturn false;\n\t\n\tvoid * tmpMover = fObjectList[fromIndex];\n\tif (fromIndex < toIndex) {\n\t\tmemmove(fObjectList + fromIndex, fObjectList + fromIndex + 1,\n\t\t\t(toIndex - fromIndex) * sizeof(void *));\n\t} else if (fromIndex > toIndex) {\n\t\tmemmove(fObjectList + toIndex + 1, fObjectList + toIndex,\n\t\t\t(fromIndex - toIndex) * sizeof(void *));\n\t};\n\tfObjectList[toIndex] = tmpMover;\n\t\n\treturn true;\n}\n\n\n/* Retrieving items. */\n// ItemAt\nvoid *\nBList::ItemAt(int32 index) const\n{\n\tvoid *item = NULL;\n\tif (index >= 0 && index < fItemCount)\n\t\titem = fObjectList[index];\n\treturn item;\n}\n\n\n// FirstItem\nvoid *\nBList::FirstItem() const\n{\n\tvoid *item = NULL;\n\tif (fItemCount > 0)\n\t\titem = fObjectList[0];\n\treturn item;\n}\n\n\n// ItemAtFast\nvoid *\nBList::ItemAtFast(int32 index) const\n{\n\treturn fObjectList[index];\n}\n\n\n// Items\nvoid *\nBList::Items() const\n{\n\treturn fObjectList;\n}\n\n\n// LastItem\nvoid *\nBList::LastItem() const\n{\n\tvoid *item = NULL;\n\tif (fItemCount > 0)\n\t\titem = fObjectList[fItemCount - 1];\n\treturn item;\n}\n\n\n/* Querying the list. */\n// HasItem\nbool\nBList::HasItem(void *item) const\n{\n\treturn (IndexOf(item) >= 0);\n}\n\n\n// IndexOf\nint32\nBList::IndexOf(void *item) const\n{\n\tfor (int32 i = 0; i < fItemCount; i++) {\n\t\tif (fObjectList[i] == item)\n\t\t\treturn i;\n\t}\n\treturn -1;\n}\n\n\n// CountItems\nint32\nBList::CountItems() const\n{\n\treturn fItemCount;\n}\n\n\n// IsEmpty\nbool\nBList::IsEmpty() const\n{\n\treturn (fItemCount == 0);\n}\n\n\n/* Iterating over the list. */\n//iterate a function over the whole list.  If the function outputs a true\n//value, then the process is terminated.\n\nvoid\nBList::DoForEach(bool (*func)(void *))\n{\n\tbool terminate = false; int32 index = 0;\t\t//set terminate condition variables to go.\n\tif (func != NULL)\n\t{\n\t\twhile ((!terminate) && (index < fItemCount))\t//check terminate condition.\n\t\t{\n\t\t\tterminate = func(fObjectList[index]);\t\t\t//reset immediate terminator\n\t\t\tindex++;\t\t\t\t\t\t\t\t\t//advance along the list.\n\t\t};\n\t}\n\n}\n\n\n//same as above, except this function takes an argument.\nvoid\nBList::DoForEach(bool (*func)(void *, void*), void * arg)\n{\n\tbool terminate = false; int32 index = 0;\n\tif (func != NULL)\n\t{\n\t\twhile ((!terminate) && (index < fItemCount))\n\t\t{\n\t\t\tterminate = func(fObjectList[index], arg);\n\t\t\tindex++;\n\t\t};\n\t}\n}\n\n#if (__GNUC__ == 2)\n\n// This is somewhat of a hack for backwards compatibility -\n// the reason these functions are defined this way rather than simply\n// being made private members is that if they are included, then whenever\n// gcc encounters someone calling AddList() with a non-const BList pointer,\n// it will try to use the private version and fail with a compiler error.\n\n// obsolete AddList(BList* list, int32 index) and AddList(BList* list)\n// AddList\nextern \"C\" bool\nAddList__5BListP5BListl(BList* self, BList* list, int32 index)\n{\n\treturn self->AddList((const BList*)list, index);\n}\n\n// AddList\nextern \"C\" bool\nAddList__5BListP5BList(BList* self, BList* list)\n{\n\treturn self->AddList((const BList *)list);\n}\n#endif\n\n// Resize\n//\n// Resizes fObjectList to be large enough to contain count items.\nbool\nBList::_ResizeArray(int32 count)\n{\n\tbool result = true;\n\t// calculate the new physical size\n\t// by doubling the existing size\n\t// until we can hold at least count items\n\tint32 newSize = fPhysicalSize > 0 ? fPhysicalSize : fBlockSize;\n\tint32 targetSize = count;\n\tif (targetSize <= 0)\n\t\ttargetSize = fBlockSize;\n\tif (targetSize > fPhysicalSize) {\n\t\twhile (newSize < targetSize)\n\t\t\tnewSize <<= 1;\n\t} else if (targetSize <= fResizeThreshold) {\n\t\tnewSize = fResizeThreshold;\n\t}\n\t\n\t// resize if necessary\n\tif (newSize != fPhysicalSize) {\n\t\tvoid** newObjectList\n\t\t\t= (void**)realloc(fObjectList, newSize * sizeof(void*));\n\t\tif (newObjectList) {\n\t\t\tfObjectList = newObjectList;\n\t\t\tfPhysicalSize = newSize;\n\t\t\t// set our lower bound to either 1/4\n\t\t\t//of the current physical size, or 0\n\t\t\tfResizeThreshold = fPhysicalSize >> 2 >= fBlockSize\n\t\t\t\t? fPhysicalSize >> 2 : 0;\n\t\t} else\n\t\t\tresult = false;\n\t}\n\treturn result;\n}\n\n"
  },
  {
    "path": "common/BList.fdh",
    "content": "//hash:57950a83\n//automatically generated by Makegen\n\n/* located in common/BList.cpp */\n\n//-----------------[referenced from common/BList.cpp]----------------//\nmove_items(void** items, int32 offset, int32 count);\n|| (toIndex < 0));\nAddList__5BListP5BListl(BList* self, BList* list, int32 index);\nAddList__5BListP5BList(BList* self, BList* list);\n\n"
  },
  {
    "path": "common/BList.h",
    "content": "/*\n * Copyright 2001-2007, Haiku, Inc. All Rights Reserved.\n * Distributed under the terms of the MIT License.\n */\n#ifndef _BE_LIST_H\n#define _BE_LIST_H\n\n\n#include \"SupportDefs.h\"\n\n\nclass BList {\n\tpublic:\n\t\tBList(int32 count = 20);\n\t\tBList(const BList& anotherList);\n\t\tvirtual ~BList();\n\t\t\n\t\tvirtual BList& operator =(const BList &);\n\t\t\n\t\t/* Adding and removing items. */\n\t\tbool AddItem(const void* item, int32 index);\n\t\tbool AddItem(const void* item);\n\t\tbool AddList(const BList* list, int32 index);\n\t\tbool AddList(const BList* list);\n\t\tbool RemoveItem(void* item);\n\t\tvoid* RemoveItem(int32 index);\n\t\tbool RemoveItems(int32 index, int32 count);\n\t\tbool ReplaceItem(int32 index, void* newItem);\n\t\tvirtual void MakeEmpty();\n\t\t\n\t\t// Reorder items\n\t\tvoid SortItems(int (*compareFunc)(const void*, const void*));\n\t\tbool SwapItems(int32 indexA, int32 indexB);\n\t\tbool MoveItem(int32 fromIndex, int32 toIndex);\n\t\t\n\t\t// Retrieve items\n\t\tvoid* ItemAt(int32 index) const;\n\t\tvoid* FirstItem() const;\n\t\tvoid* ItemAtFast(int32) const;\n\t\t\t// does not check the array bounds!\n\t\t\n\t\tvoid* LastItem() const;\n\t\tvoid* Items() const;\n\t\t\n\t\t// Query\n\t\tbool HasItem(void* item) const;\n\t\tint32 IndexOf(void* item) const;\n\t\tint32 CountItems() const;\n\t\tbool IsEmpty() const;\n\t\t\n\t\t// Iteration\n\t\tvoid DoForEach(bool (*func)(void* item));\n\t\tvoid DoForEach(bool (*func)(void* item, void* arg2), void *arg2);\n\t\t\n\tprivate:\n\t\tbool _ResizeArray(int32 count);\n\t\t\n\t\tvoid**\tfObjectList;\n\t\tint32\tfPhysicalSize;\n\t\tint32\tfItemCount;\n\t\tint32\tfBlockSize;\n\t\tint32\tfResizeThreshold;\n\t\tuint32\t_reserved[1];\n};\n\n#endif // _BE_LIST_H\n"
  },
  {
    "path": "common/DBuffer.cpp",
    "content": "\n#include <stdlib.h>\n#include <stdint.h>\n#include <string.h>\n\n#include \"DBuffer.h\"\n#include \"DBuffer.fdh\"\n\n\nDBuffer::DBuffer()\n{\n\tfData = &fBuiltInData[0];\n\tfAllocSize = DBUFFER_BUILTIN_SIZE;\n\tfAllocdExternal = false;\n\tfLength = 0;\n}\n\nDBuffer::~DBuffer()\n{\n\tif (fAllocdExternal)\n\t\tfree(fData);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// append data to the end of the buffer\nvoid DBuffer::AppendData(const uint8_t *data, int length)\n{\n\tif (length <= 0) return;\n\tEnsureAlloc(fLength + length);\n\t\n\tmemcpy(&fData[fLength], data, length);\n\tfLength += length;\n}\n\n// append a string, along with it's null-terminator.\nvoid DBuffer::AppendString(const char *str)\n{\n\tAppendData((uint8_t *)str, strlen(str) + 1);\n}\n\n// append a string, without it's null-terminator.\nvoid DBuffer::AppendStringNoNull(const char *str)\n{\n\tAppendData((uint8_t *)str, strlen(str));\n}\n\n\nvoid DBuffer::AppendBool(bool value)\n{\nuint8_t ch = (uint8_t)value;\n\tAppendData((uchar *)&ch, 1);\n}\n\nvoid DBuffer::Append16(uint16_t value)\n{\n\tAppendData((uchar *)&value, 2);\n}\n\nvoid DBuffer::Append32(uint32_t value)\n{\n\tAppendData((uchar *)&value, 4);\n}\n\nvoid DBuffer::Append24(uint32_t value)\n{\n\tAppend16(value);\n\tAppend8(value >> 16);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// real SetTo code is in DBuffer.h\n\nvoid DBuffer::SetTo(const char *string)\n{\n\tSetTo((const uint8_t *)string, strlen(string) + 1);\n}\n\nvoid DBuffer::SetTo(DBuffer *other)\n{\n\tSetTo(other->Data(), other->Length());\n}\n\nvoid DBuffer::SetTo(DBuffer &other)\n{\n\tSetTo(other.Data(), other.Length());\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DBuffer::ReplaceUnprintableChars()\n{\nchar *data = (char *)fData;\nint length = fLength;\nint i;\n\n\tfor(i=0;i<length;i++)\n\t{\n\t\tif (data[i] == '\\n' || data[i] == '\\r')\n\t\t{\n\t\t\tdata[i] = '+';\n\t\t}\n\t\telse if (((uchar)data[i] < 32 || (uchar)data[i] > 127) && data[i] != 0)\n\t\t{\n\t\t\tdata[i] = '`';\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nDBuffer& DBuffer::operator= (const DBuffer &other)\n{\n\tSetTo((DBuffer *)&other);\n\treturn *this;\n}\n\n// return the data contained in the buffer\nuint8_t *DBuffer::Data()\n{\n\treturn (uint8_t *)fData;\n}\n\n// return the data contained in the buffer, and \"steal\" the pointer from the DBuffer\n// so that the caller obtains ownership of it and the DBuffer contents are lost.\n// the contents of the DBuffer are undefined after this function returns.\n// It is intended for quickly returning C-style pointers to data from functions which use\n// DBuffer internally to build the data.\nuint8_t *DBuffer::TakeData()\n{\n\tif (!fAllocdExternal)\n\t{\t// we can't give them ownership of the data, because it's still small enough\n\t\t// that it's located within our own object. So give them a copy instead.\n\t\tuint8_t *copy = (uint8_t *)malloc(fLength);\n\t\tmemcpy(copy, fData, fLength);\n\t\treturn copy;\n\t}\n\t\n\tuint8_t *data = fData;\t\t\t// save our pointer\n\tfData = NULL;\t\t\t\t\t// now forget it, so it's not freed in the destructor\n\tfAllocdExternal = false;\t\t// revert to internal data buffer\n\t\n\treturn data;\n}\n\n// return the data, along with a trailing null-terminator\nchar *DBuffer::String()\n{\n\t// ensure the data returned is null-terminated\n\tif (fLength == 0 || fData[fLength - 1] != 0)\n\t{\n\t\tEnsureAlloc(fLength + 1);\n\t\tfData[fLength] = '\\0';\n\t}\n\t\n\treturn (char *)fData;\n}\n\n// return the length of the buffer. note that this will include\n// any null-terminators.\nint DBuffer::Length()\n{\n\treturn fLength;\n}\n\n"
  },
  {
    "path": "common/DBuffer.fdh",
    "content": "//hash:00000000\n//automatically generated by Makegen\n"
  },
  {
    "path": "common/DBuffer.h",
    "content": "\n#ifndef _DBUFFER_H\n#define _DBUFFER_H\n\n#include \"basics.h\"\n#include <stdlib.h>\n#include <string.h>\n#include <stdint.h>\n\n/*\n\tDBuffer vs. DString\n\t\n\tThe difference is that with a DBuffer, if you AppendString() multiple times,\n\tyou will get null-terminators in between each string. With a DString,\n\tthe strings will be concatenated. You can override this behavior in a DBuffer\n\tby calling AppendStringNoNull instead of AppendString, but there is no function\n\tfor inserting NULLs into a DString, as that doesn't make sense.\n*/\n\n#define DBUFFER_BUILTIN_SIZE\t\t\t16\n\nclass DBuffer\n{\npublic:\n\tDBuffer();\n\t~DBuffer();\n\t\n\tvoid SetTo(const uint8_t *data, int length);\n\tvoid SetTo(const char *string);\n\tvoid SetTo(DBuffer *other);\n\tvoid SetTo(DBuffer &other);\n\t\n\tvoid AppendData(const uchar *data, int length);\n\tvoid AppendString(const char *str);\n\tvoid AppendStringNoNull(const char *str);\n\t\n\tvoid AppendBool(bool value);\n\tvoid AppendChar(uchar ch);\n\tvoid Append8(uint8_t value);\n\tvoid Append16(uint16_t value);\n\tvoid Append24(uint32_t value);\n\tvoid Append32(uint32_t value);\n\t\n\tbool ReadTo(DBuffer *line, uchar ch, bool add_null=true);\n\tvoid EnsureAlloc(int min_required);\n\t\n\tvoid ReplaceUnprintableChars();\n\t\n\tDBuffer &operator= (const DBuffer &other);\n\t\n\t// ---------------------------------------\n\t\n\tvoid Clear();\n\tuint8_t *Data();\n\tuint8_t *TakeData();\n\tchar *String();\n\tint Length();\n\nprivate:\n\tuint8_t *fData;\n\tint fLength;\n\tint fAllocSize;\n\tbool fAllocdExternal;\n\t\n\tuint8_t fBuiltInData[DBUFFER_BUILTIN_SIZE];\n};\n\n\ninline void DBuffer::EnsureAlloc(int min_required)\n{\n\tif (min_required > fAllocSize)\n\t{\n\t\tfAllocSize = (min_required + (min_required >> 1));\n\t\t\n\t\tif (fAllocdExternal)\n\t\t{\n\t\t\tfData = (uint8_t *)realloc(fData, fAllocSize);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfData = (uint8_t *)malloc(fAllocSize);\n\t\t\tfAllocdExternal = true;\n\t\t\t\n\t\t\t// compatibility with String() - copy the potential extra null-terminator\n\t\t\tint copysize = (fLength + 1);\n\t\t\tif (copysize > fAllocSize) copysize = fAllocSize;\n\t\t\tmemcpy(fData, fBuiltInData, copysize);\n\t\t}\n\t}\n}\n\ninline void DBuffer::Clear()\n{\n\t// free any external memory and switch back to builtin\n\tif (fAllocdExternal)\n\t{\n\t\tfree(fData);\n\t\tfData = &fBuiltInData[0];\n\t\tfAllocSize = DBUFFER_BUILTIN_SIZE;\n\t\tfAllocdExternal = false;\n\t}\n\t\n\tfLength = 0;\n}\n\ninline void DBuffer::SetTo(const uint8_t *data, int length)\n{\n\t// SetTo from a portion of ourselves\n\tif (data >= fData && data <= fData + (fLength - 1))\n\t{\n\t\tuint8_t *tempBuffer = (uint8_t *)malloc(length);\n\t\tmemcpy(tempBuffer, data, length);\n\t\tSetTo(tempBuffer, length);\n\t\tfree(tempBuffer);\n\t\treturn;\n\t}\n\t\n\tif (fAllocdExternal && length < DBUFFER_BUILTIN_SIZE)\n\t{\n\t\tfree(fData);\n\t\tfData = &fBuiltInData[0];\n\t\tfAllocSize = DBUFFER_BUILTIN_SIZE;\n\t\tfAllocdExternal = false;\n\t}\n\telse if (length > fAllocSize)\n\t{\t// we are growing, so allocate more memory\n\t\tif (fAllocdExternal) free(fData);\n\t\tfAllocdExternal = true;\n\t\t\n\t\tfAllocSize = (length + 16);\t// arbitrary, is just space for growing\n\t\tfData = (uint8_t *)malloc(fAllocSize);\n\t}\n\t\n\tif (length) memcpy(fData, data, length);\n\tfLength = length;\n}\n\n\ninline void DBuffer::AppendChar(uchar ch)\n{\n\tAppendData((uchar *)&ch, 1);\n}\n\ninline void DBuffer::Append8(uint8_t value)\n{\n\tAppendData((uchar *)&value, 1);\n}\n\n#endif\n"
  },
  {
    "path": "common/DString.cpp",
    "content": "\n#include <stdlib.h>\n#include <stdint.h>\n#include <string.h>\n\n#include \"DString.h\"\n#include \"DString.fdh\"\n\n\nDString::DString()\n{\n}\n\nDString::DString(const char *str)\n{\n\tSetTo(str);\n}\n\nDString::DString(const char *str, int length)\n{\n\tSetTo(str, length);\n}\n\nDString::DString(DString &other)\n{\n\tSetTo(other.String(), other.Length());\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DString::SetTo(const char *str, int length)\n{\n\tfBuffer.SetTo((uint8_t *)str, length);\n}\n\nvoid DString::SetTo(const char *str)\n{\n\tfBuffer.SetTo((uint8_t *)str, strlen(str));\n}\n\nvoid DString::SetTo(DString *other)\n{\n\tfBuffer.SetTo(other->fBuffer.Data(), other->fBuffer.Length());\n}\n\nvoid DString::SetTo(DString &other)\n{\n\tfBuffer.SetTo(other.fBuffer.Data(), other.fBuffer.Length());\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DString::AppendString(const char *str)\n{\n\tfBuffer.AppendData((uint8_t *)str, strlen(str));\n}\n\nvoid DString::AppendString(const char *str, int length)\n{\n\tfBuffer.AppendData((uint8_t *)str, length);\n}\n\nvoid DString::AppendChar(uchar ch)\n{\n\tfBuffer.AppendData((uint8_t *)&ch, 1);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DString::ReplaceString(const char *repstr_old, const char *repstr_new)\n{\n\tDString newString;\n\tchar *str = String();\n\tchar *ptr = str;\n\tint oldLength, newLength;\n\tchar *hit;\n\t\n\tfor(;;)\n\t{\n\t\thit = strstr(ptr, repstr_old);\n\t\tif (!hit)\n\t\t{\n\t\t\t// first time around the loop? if so then we don't need\n\t\t\t// to do any copying as we won't modify ourselves anyway.\n\t\t\tif (ptr == str)\n\t\t\t\treturn;\n\t\t\t\n\t\t\tnewString.AppendString(ptr);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// defer calling the strlens until we're sure we need them\n\t\t// (by now we know there is an occurance of repstr_old within the original string).\n\t\tif (ptr == str)\n\t\t{\n\t\t\toldLength = strlen(repstr_old);\n\t\t\tif (oldLength == 0) return;\n\t\t\t\n\t\t\tnewLength = strlen(repstr_new);\n\t\t}\n\t\t\n\t\t// add substring up to the hit\n\t\tnewString.AppendString(ptr, (hit - ptr));\n\t\tnewString.AppendString(repstr_new, newLength);\n\t\t\n\t\tptr = (hit + oldLength);\n\t}\n\t\n\tSetTo(newString);\n}\n\n/*{\n\tchar *str = String();\n\tchar *hit = strstr(str, oldstring);\n\tif (!hit) return;\t// avoid strlens in common case of no hits\n\t\n\tint oldlen = strlen(oldstring);\n\tint newlen = strlen(newstring);\n\t\n\tfor(;;)\n\t{\n\t\tDString temp(str, (hit - str));\n\t\ttemp.AppendString(newstring);\n\t\ttemp.AppendString(hit + oldlen);\n\t\t\n\t\tSetTo(temp.String());\n\t\t\n\t\tint index = (hit - str) + newlen;\n\t\tstr = String() + index;\n\t\t\n\t\thit = strstr(str, oldstring);\n\t\tif (!hit) break;\n\t}\n}*/\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DString::EnsureAlloc(int min_required)\n{\n\tfBuffer.EnsureAlloc(min_required);\n}\n\nvoid DString::ReplaceUnprintableChars()\n{\n\tfBuffer.ReplaceUnprintableChars();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DString::Clear()\n{\n\tfBuffer.Clear();\n}\n\nint DString::Length()\n{\n\treturn fBuffer.Length();\n}\n\nchar *DString::String()\n{\n\treturn fBuffer.String();\n}\n\t\n\n"
  },
  {
    "path": "common/DString.fdh",
    "content": "//hash:aa5032f8\n//automatically generated by Makegen\n\n/* located in tsc.cpp */\n\n//----------------[referenced from common/DString.cpp]---------------//\nvoid Clear();\n\n"
  },
  {
    "path": "common/DString.h",
    "content": "\n#ifndef _DSTRING_H\n#define _DSTRING_H\n\n#include \"basics.h\"\n#include \"DBuffer.h\"\n\n/*\n\tDString vs. DBuffer\n\t\n\tThe difference is that with a DBuffer, if you AppendString() multiple times,\n\tyou will get null-terminators in between each string. With a DString,\n\tthe strings will be concatenated. You can override this behavior in a DBuffer\n\tby calling AppendStringNoNull instead of AppendString, but there is no function\n\tfor inserting NULLs into a DString, as that doesn't make sense.\n*/\n\nclass DString\n{\npublic:\n\tDString();\n\tDString(const char *string);\n\tDString(const char *string, int length);\n\tDString(DString &other);\n\t\n\tvoid SetTo(const char *string);\n\tvoid SetTo(const char *string, int length);\n\tvoid SetTo(DString *other);\n\tvoid SetTo(DString &other);\n\t\n\tvoid AppendString(const char *str);\n\tvoid AppendString(const char *str, int length);\n\tvoid AppendChar(uchar ch);\n\t\n\tvoid ReplaceString(const char *repstr_old, const char *repstr_new);\n\tvoid EnsureAlloc(int min_required);\n\t\n\tvoid Clear();\n\tchar *String();\n\tint Length();\n\t\n\tvoid ReplaceUnprintableChars();\n\t\nprivate:\n\tDBuffer fBuffer;\n};\n\n#endif\n"
  },
  {
    "path": "common/FileBuffer.cpp",
    "content": "\n#include <stdio.h>\n#include \"FileBuffer.h\"\n\nFileBuffer::FileBuffer()\n{\n\tfMaxSize = 0;\n\tfFP = NULL;\n}\n\nvoid FileBuffer::SetBufferSize(int maxsize)\n{\n\tfMaxSize = maxsize;\n}\n\nvoid FileBuffer::SetFile(FILE *fp)\n{\n\tfFP = fp;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid FileBuffer::Write8(uint8_t data)\n{\n\tfBuffer.Append8(data);\n\tCheckFlush(fMaxSize);\n}\n\nvoid FileBuffer::Write16(uint16_t data)\n{\n\tfBuffer.Append16(data);\n\tCheckFlush(fMaxSize);\n}\n\nvoid FileBuffer::Write32(uint32_t data)\n{\n\tfBuffer.Append32(data);\n\tCheckFlush(fMaxSize);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid FileBuffer::CheckFlush(int maxsize)\n{\n\tif (fBuffer.Length() >= maxsize)\n\t{\n\t\tif (fFP)\n\t\t{\n\t\t\t//stat(\"CheckFlush wrote %d bytes\", fBuffer.Length());\n\t\t\tfwrite(fBuffer.Data(), fBuffer.Length(), 1, fFP);\n\t\t\tfBuffer.Clear();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstaterr(\"CheckFlush: no file\");\n\t\t}\n\t}\n}\n\nvoid FileBuffer::Flush()\n{\n\tCheckFlush(0);\n}\n\nvoid FileBuffer::Dump()\n{\n\tfBuffer.Clear();\n}\n\n\n"
  },
  {
    "path": "common/FileBuffer.fdh",
    "content": "//hash:78d0206c\n//automatically generated by Makegen\n\n/* located in tsc.cpp */\n\n//---------------[referenced from common/FileBuffer.cpp]-------------//\nvoid Clear();\n\n\n/* located in common/stat.cpp */\n\n//---------------[referenced from common/FileBuffer.cpp]-------------//\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "common/FileBuffer.h",
    "content": "\n#ifndef _FILEBUFFER_H\n#define _FILEBUFFER_H\n\n#include \"DBuffer.h\"\n\n\nclass FileBuffer\n{\npublic:\n\tFileBuffer();\n\tvoid SetBufferSize(int maxsize);\n\tvoid SetFile(FILE *fp);\n\t\n\tvoid Write8(uint8_t data);\n\tvoid Write16(uint16_t data);\n\tvoid Write32(uint32_t data);\n\t\n\tvoid Flush();\n\tvoid Dump();\n\t\nprivate:\n\tvoid CheckFlush(int maxsize);\n\t\n\tDBuffer fBuffer;\n\tint fMaxSize;\n\t\n\tFILE *fFP;\n};\n\n\n\n#endif\n"
  },
  {
    "path": "common/InitList.cpp",
    "content": "\n// this is a combination of some C++ and preprocessor magic which allows a\n// group of initilization functions to be declared across many different\n// source files and then at the appropriate time all can be called at once.\n// The \"trick\" is that it automatically works for all modules linked to the\n// program so you don't have to keep a handmade list anywhere of the names\n// of the initilization functions. This is used by the AI functions to initilize\n// all the function pointers etc for the various creatures.\n#include \"InitList.h\"\n#include \"InitList.fdh\"\n\nvoid InitList::AddFunction(void (*func)(void))\n{\n\tAddFunction((void *)func);\n}\n\nvoid InitList::AddFunction(bool (*func)(void))\n{\n\tAddFunction((void *)func);\n}\n\nvoid InitList::AddFunction(void *func)\n{\n\t//stat(\"AddFunction (void)%08x [%d]\", func, fCount);\n\tif (fCount >= MAX_INIT_RECORDS)\n\t\treturn;\n\t\n\tfFunctions[fCount++] = (void *)func;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool InitList::CallFunctions()\n{\nint i;\n\n\tif (fCount >= MAX_INIT_RECORDS)\n\t{\n\t\tstat(\"InitList::CallFunctions(%08x): too many initializers\", this);\n\t\treturn 1;\n\t}\n\t\n\tstat(\"InitList::CallFunctions(%08x): executing %d functions...\", this, fCount);\n\t\n\tfor(i=0;i<fCount;i++)\n\t{\n\t\tvoid (*func)(void) = (void (*)())fFunctions[i];\n\t\t(*func)();\n\t}\n\t\n\treturn 0;\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "common/InitList.fdh",
    "content": "//hash:7790eafb\n//automatically generated by Makegen\n\n/* located in common/stat.cpp */\n\n//----------------[referenced from common/InitList.cpp]--------------//\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "common/InitList.h",
    "content": "\n#ifndef _INITLIST_H\n#define _INITLIST_H\n\n#define MAX_INIT_RECORDS\t\t100\n\nclass InitList\n{\npublic:\n\tvoid AddFunction(void (*func)(void));\n\tvoid AddFunction(bool (*func)(void));\n\tvoid AddFunction(void *func);\n\tbool CallFunctions();\n\t\nprivate:\n\tvoid *fFunctions[MAX_INIT_RECORDS];\n\tint fCount;\t\t// counting on behavior of auto-initilization to 0\n};\n\nclass InitAdder\n{\npublic:\n\tInitAdder(InitList *initlist, void (*func)(void)) { initlist->AddFunction(func); }\n\tInitAdder(InitList *initlist, bool (*func)(void)) { initlist->AddFunction(func); }\n\tInitAdder(InitList &initlist, void (*func)(void)) { initlist.AddFunction(func); }\n\tInitAdder(InitList &initlist, bool (*func)(void)) { initlist.AddFunction(func); }\n};\n\n#define INITFUNC(TARGET)\t\\\n\tstatic void __InitFunc(void);\t\\\n\tstatic InitAdder _ia(TARGET, __InitFunc);\t\\\n\tstatic void __InitFunc(void)\t\\\n\n#endif\n"
  },
  {
    "path": "common/StringList.cpp",
    "content": "\n#include <stdlib.h>\n#include <string.h>\n\n#include \"StringList.h\"\n#include \"StringList.fdh\"\n\n\nStringList::~StringList()\n{\n\tMakeEmpty();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid StringList::Shuffle()\n{\nint i, count = CountItems();\n\n\tfor(i=0;i<count;i++)\n\t{\n\t\tint swap = random(0, count - 1);\n\t\tif (swap != i)\n\t\t{\n\t\t\tSwapItems(i, swap);\n\t\t}\n\t}\n}\n\nbool StringList::ContainsString(const char *term)\n{\nint i;\nchar *str;\n\n\tfor(i=0; (str = StringAt(i)); i++)\n\t{\n\t\tif (!strcmp(str, term))\n\t\t\treturn true;\n\t}\n\t\n\treturn false;\n}\n\nbool StringList::ContainsCaseString(const char *term)\n{\nint i;\nchar *str;\n\n\tfor(i=0; (str = StringAt(i)); i++)\n\t{\n\t\tif (!strcasecmp(str, term))\n\t\t\treturn true;\n\t}\n\t\n\treturn false;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid StringList::AddString(const char *str)\n{\n\tBList::AddItem(strdup(str));\n}\n\nbool StringList::SetString(int index, const char *newstring)\n{\n\tchar *str = StringAt(index);\n\tif (!str) return 1;\n\tif (str == newstring) return 0;\n\t\n\tint copylen = strlen(newstring) + 1;\n\tstr = (char *)realloc(str, copylen);\n\tmemcpy(str, newstring, copylen);\n\t\n\tBList::ReplaceItem(index, str);\n\treturn 0;\n}\n\nvoid StringList::RemoveString(int index)\n{\n\tchar *str = StringAt(index);\n\tif (str)\n\t{\n\t\tBList::RemoveItem(index);\n\t\tfree(str);\n\t}\n}\n\nvoid StringList::RemoveString(const char *str)\n{\nint i;\nchar *entry;\n\n\tfor(i=0; (entry = StringAt(i)); i++)\n\t{\n\t\tif (!strcmp(entry, str))\n\t\t{\n\t\t\tBList::RemoveItem(i);\n\t\t\tfree(entry);\n\t\t\ti--;\n\t\t}\n\t}\n}\n\nvoid StringList::RemoveIString(const char *str)\n{\nint i;\nchar *entry;\n\n\tfor(i=0; (entry = StringAt(i)); i++)\n\t{\n\t\tif (!strcasecmp(entry, str))\n\t\t{\n\t\t\tBList::RemoveItem(i);\n\t\t\tfree(entry);\n\t\t\ti--;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid StringList::SwapItems(int index1, int index2)\n{\n\tBList::SwapItems(index1, index2);\n}\n\nvoid StringList::DumpContents()\n{\nint i, count = CountItems();\n\n\tstat(\"StringList %08x; %d entries\", this, count);\n\tfor(i=0;i<count;i++)\n\t{\n\t\tchar *str = StringAt(i);\n\t\tstat(\"(%d) <%08x>: '%s'\", i, str, str ? str : \"(null)\");\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nchar *StringList::StringAt(int index) const\n{\n\treturn (char *)BList::ItemAt(index);\n}\n\nvoid StringList::MakeEmpty()\n{\n\tint i, count = CountItems();\n\tfor(i=0;i<count;i++)\n\t{\n\t\tfree(ItemAt(i));\n\t}\n\t\n\tBList::MakeEmpty();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nStringList &StringList::operator= (const StringList &other)\n{\n\tStringList::MakeEmpty();\n\t\n\tfor(int i=0;;i++)\n\t{\n\t\tchar *str = other.StringAt(i);\n\t\tif (!str) break;\n\t\t\n\t\tAddString(str);\n\t}\n\t\n\treturn *this;\n}\n\nbool StringList::operator== (const StringList &other) const\n{\n\tif (CountItems() != other.CountItems())\n\t\treturn false;\n\t\n\tfor(int i=0;;i++)\n\t{\n\t\tchar *str1 = StringAt(i);\n\t\tchar *str2 = other.StringAt(i);\n\t\t\n\t\tif (!str1 || !str2)\n\t\t\treturn (!str1 && !str2);\n\t\t\n\t\tif (strcmp(str1, str2) != 0)\n\t\t\treturn false;\n\t}\n}\n\nbool StringList::operator!= (const StringList &other) const\n{\n\treturn !(*this == other);\n}\n\n\n"
  },
  {
    "path": "common/StringList.fdh",
    "content": "//hash:32a53999\n//automatically generated by Makegen\n\n/* located in common/stat.cpp */\n\n//---------------[referenced from common/StringList.cpp]-------------//\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//---------------[referenced from common/StringList.cpp]-------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "common/StringList.h",
    "content": "\n#ifndef _STRINGLIST_H\n#define _STRINGLIST_H\n\n#include \"BList.h\"\n\nclass StringList : protected BList\n{\npublic:\n\tStringList() { }\n\t\n\tStringList(const StringList &other)\n\t{\n\t\t*this = other;\n\t}\n\t\n\tvirtual ~StringList();\n\t\n\tvoid AddString(const char *str);\n\tchar *StringAt(int index) const;\n\tbool SetString(int index, const char *newstring);\n\tvoid MakeEmpty();\n\t\n\tvoid Shuffle();\n\tbool ContainsString(const char *term);\n\tbool ContainsCaseString(const char *term);\n\tvoid RemoveString(int index);\n\tvoid RemoveString(const char *str);\n\tvoid RemoveIString(const char *str);\n\t\n\tvoid SwapItems(int index1, int index2);\n\tvoid DumpContents();\n\t\n\tint32_t CountItems() const { return BList::CountItems(); }\n\t\n\tStringList &operator= (const StringList &other);\n\tbool operator== (const StringList &other) const;\n\tbool operator!= (const StringList &other) const;\n};\n\n\n\n#endif\n"
  },
  {
    "path": "common/SupportDefs.h",
    "content": "/*\n * Copyright 2004-2007, Haiku, Inc. All Rights Reserved.\n * Distributed under the terms of the MIT License.\n *\n * Author:\n *\t\tErik Jaesler (erik@cgsoftware.com)\n */\n#ifndef _SUPPORT_DEFS_H\n#define _SUPPORT_DEFS_H\n\n#include <stdint.h>\n\n/* this must be located before the include of sys/types.h */\n#if !defined(_SYS_TYPES_H) && !defined(_SYS_TYPES_H_)\ntypedef unsigned long\t\t\tulong;\ntypedef unsigned int\t\t\tuint;\ntypedef unsigned short\t\t\tushort;\n#endif\n\n//#include <BeBuild.h>\n//#include <Errors.h>\n\n//#include <sys/types.h>\n\n\n/* Shorthand type formats */\ntypedef\tint8_t\t\t\tint8;\ntypedef uint8_t\t\t\tuint8;\ntypedef volatile int8_t\t\tvint8;\ntypedef volatile uint8_t\tvuint8;\n\ntypedef\tint16_t\t\t\tint16;\ntypedef uint16_t \t\tuint16;\ntypedef volatile int16_t\tvint16;\ntypedef volatile uint16_t\tvuint16;\n\ntypedef\tint32_t\t\t\tint32;\ntypedef uint32_t\t\tuint32;\ntypedef volatile int32_t\tvint32;\ntypedef volatile uint32_t\tvuint32;\n\ntypedef\tint64_t\t\t\tint64;\ntypedef uint64_t\t\tuint64;\ntypedef volatile int64_t\tvint64;\ntypedef volatile uint64_t\tvuint64;\n\ntypedef volatile long\t\tvlong;\ntypedef volatile int\t\tvint;\ntypedef volatile short\t\tvshort;\ntypedef volatile char\t\tvchar;\n\ntypedef volatile unsigned long\tvulong;\ntypedef volatile unsigned int\tvuint;\ntypedef volatile unsigned short\tvushort;\ntypedef volatile unsigned char\tvuchar;\n\ntypedef unsigned char\t\tuchar;\ntypedef unsigned short          unichar;\n\n\n/* Descriptive formats */\ntypedef int32\t\t\tstatus_t;\ntypedef int64\t\t\tbigtime_t;\ntypedef uint32\t\t\ttype_code;\ntypedef uint32\t\t\tperform_code;\n\n\n/* Empty string (\"\") */\n#ifdef __cplusplus\nextern const char *B_EMPTY_STRING;\n#endif\n\n#ifndef INT8_MAX\n#define INT8_MAX\t0x7f\n#endif\n#ifndef INT16_MAX\n#define INT16_MAX\t0x7fff\n#endif\n#ifndef INT32_MAX\n#define INT32_MAX\t0x7fffffff\n#endif\n#ifndef INT64_MAX\n#define INT64_MAX\t0x7fffffffffffffff\n#endif\n#ifndef UINT8_MAX\n#define UINT8_MAX\t0xff\n#endif\n#ifndef UINT16_MAX\n#define UINT16_MAX\t0xffff\n#endif\n#ifndef UINT32_MAX\n#define UINT32_MAX\t0xffffffffffffffff\n#endif\n\n/* min and max comparisons */\n#ifndef __cplusplus\n#\tifndef min\n#\t\tdefine min(a,b) ((a)>(b)?(b):(a))\n#\tendif\n#\tifndef max\n#\t\tdefine max(a,b) ((a)>(b)?(a):(b))\n#\tendif\n#endif \n\n/* min() and max() won't work in C++ */\n#define min_c(a,b) ((a)>(b)?(b):(a))\n#define max_c(a,b) ((a)>(b)?(a):(b))\n\n\n/* Grandfathering */\n//#ifndef __cplusplus\n//#\tinclude <stdbool.h>\n//#endif \n\n#ifndef NULL\n#\tdefine NULL (0)\n#endif\n\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* Atomic functions; previous value is returned */\nextern int32\tatomic_set(vint32 *value, int32 newValue);\nextern int32\tatomic_test_and_set(vint32 *value, int32 newValue, int32 testAgainst);\nextern int32\tatomic_add(vint32 *value, int32 addValue);\nextern int32\tatomic_and(vint32 *value, int32 andValue);\nextern int32\tatomic_or(vint32 *value, int32 orValue);\t\nextern int32\tatomic_get(vint32 *value);\n\nextern int64\tatomic_set64(vint64 *value, int64 newValue);\nextern int64\tatomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst);\nextern int64\tatomic_add64(vint64 *value, int64 addValue);\nextern int64\tatomic_and64(vint64 *value, int64 andValue);\nextern int64\tatomic_or64(vint64 *value, int64 orValue);\t\nextern int64\tatomic_get64(vint64 *value);\n\n/* Other stuff */\nextern void*\tget_stack_frame(void);\n\n#ifdef __cplusplus\n}\n#endif\n\n/* Obsolete or discouraged API */\n\n/* use 'true' and 'false' */\n#ifndef FALSE\n#\tdefine FALSE\t0\n#endif\n#ifndef TRUE\n#\tdefine TRUE\t\t1\n#endif\n\n#endif\t/* _SUPPORT_DEFS_H */\n"
  },
  {
    "path": "common/basics.h",
    "content": "\n#ifndef _BASICS_H\n#define _BASICS_H\n\n#include <stdint.h>\n\n#ifdef __clang__\n\t#define MAXPATHLEN\t256\n#else\n\t#include <sys/param.h>\t// MAXPATHLEN\n#endif\n\n#ifndef PATH_MAX\n\t#define PATH_MAX\t259\n#endif\n\ntypedef unsigned char\t\tuchar;\n\n\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n#define ASSERT(X)\t\\\n{\t\\\n\tif (!(X))\t\\\n\t{\t\\\n\t\tstaterr(\"** ASSERT FAILED: '%s' at %s(%d)\", #X, __FILE__, __LINE__);\t\\\n\t\texit(1); \t\\\n\t}\t\\\n}\n\n#define SWAP(A, B)\t{ A ^= B; B ^= A; A ^= B; }\n\n#ifndef MIN\n#define MIN(A, B)\t( ( (A) < (B) ) ? (A) : (B) )\n#endif\n\n#ifndef MAX\n#define MAX(A, B)\t( ( (A) > (B) ) ? (A) : (B) )\n#endif\n\n#endif\n"
  },
  {
    "path": "common/bufio.cpp",
    "content": "\n#include <stdlib.h>\n#include <string.h>\n#include \"DBuffer.h\"\n\n#include \"bufio.fdh\"\n\nuint8_t read_U8(const uint8_t **data, const uint8_t *data_end)\n{\n\tif (*data > data_end)\n\t{\n\t\tstaterr(\"read_U8: read past end of buffer: *data > data_end\");\n\t\treturn 0xfe;\n\t}\n\t\n\treturn *(*data)++;\n}\n\nuint16_t read_U16(const uint8_t **data, const uint8_t *data_end)\n{\n\tconst uint8_t *ptr = *data;\n\t\n\tif ((ptr + 1) > data_end)\n\t{\n\t\tstaterr(\"read_U16: read past end of buffer: *data + 1 > data_end\");\n\t\treturn 0xfefe;\n\t}\n\t\n\t*data = (ptr + 2);\n\t// we should not just cast to a uint16_t, as some processors\n\t// e.g. ARM would have alignment issues then, plus endian issues on others.\n\treturn (ptr[1] << 8) | ptr[0];\n}\n\nuint32_t read_U32(const uint8_t **data, const uint8_t *data_end)\n{\n\tconst uint8_t *ptr = *data;\n\t\n\tif ((ptr + 3) > data_end)\n\t{\n\t\tstaterr(\"read_U32: read past end of buffer: *data + 3 > data_end\");\n\t\treturn 0xfefefefe;\n\t}\n\t\n\t*data = (ptr + 4);\n\treturn (ptr[3] << 24) | (ptr[2] << 16) | (ptr[1] << 8) | ptr[0];\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid write_U8(DBuffer *buffer, uint8_t data)\n{\n\tbuffer->AppendData((uint8_t *)&data, 1);\n}\n\nvoid write_U16(DBuffer *buffer, uint16_t data)\n{\n\tbuffer->AppendData((uint8_t *)&data, 2);\n}\n\nvoid write_U32(DBuffer *buffer, uint32_t data)\n{\n\tbuffer->AppendData((uint8_t *)&data, 4);\n}\n\nvoid write_U64(DBuffer *buffer, uint64_t data)\n{\n\tbuffer->AppendData((uint8_t *)&data, 8);\n}\n\nvoid write_F32(DBuffer *buffer, float data)\n{\n\tbuffer->AppendData((uint8_t *)&data, 4);\n}\n\nvoid write_F64(DBuffer *buffer, double data)\n{\n\tbuffer->AppendData((uint8_t *)&data, 8);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nuint32_t read_U24(const uint8_t **data, const uint8_t *data_end)\n{\n\tuint32_t a, b;\n\t\n\ta = read_U16(data, data_end);\n\tb = read_U8(data, data_end);\n\t\n\treturn a | (b << 16);\n}\n\nvoid write_U24(DBuffer *buffer, uint32_t data)\n{\n\twrite_U16(buffer, data);\n\twrite_U8(buffer, data >> 16);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nchar read_char(const char **data, const char *data_end)\n{\n\treturn (char)read_U8((const uint8_t **)data, (const uint8_t *)data_end);\n}\n\nchar read_nonblank_char(const char **data, const char *data_end)\n{\nchar ch;\n\n\tfor(;;)\n\t{\n\t\tif (*data > data_end)\n\t\t{\n\t\t\tstaterr(\"read_nonblank_char: read past end of buffer: *data > data_end\");\n\t\t\treturn 254;\n\t\t}\n\t\t\n\t\tch = read_char(data, data_end);\n\t\tif (ch != ' ' && ch != '\\t' && ch != '\\n' && ch != '\\r') break;\n\t}\n\t\n\treturn ch;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nchar *read_string(const uint8_t **data, const uint8_t *data_end)\n{\n\tDBuffer buffer;\n\tread_Variable(&buffer, data, data_end);\n\treturn strdup(buffer.String());\n}\n\nvoid read_Variable(DBuffer *out, const uint8_t **data, const uint8_t *data_end)\n{\n\tuint8_t len = read_U8(data, data_end);\n\tconst uint8_t *ptr = *data;\n\t\n\tif ((ptr + (len - 1)) > data_end)\n\t{\n\t\tstaterr(\"read_Variable: read past end of buffer: *ptr+len > data_end\");\n\t\treturn;\n\t}\n\t\n\tout->SetTo(ptr, len);\n\t*data = (ptr + len);\n}\n\nvoid write_Variable(DBuffer *out, DBuffer *in)\n{\n\twrite_Variable(out, in->Data(), in->Length());\n}\n\nvoid write_Variable(DBuffer *out, const uint8_t *data, int len)\n{\n\tif (len > 255)\n\t{\n\t\tstaterr(\"write_Variable: input length > 255\");\n\t\tlen = 255;\n\t}\n\t\n\tout->AppendChar(len);\n\tout->AppendData(data, len);\n}\n\n\nvoid read_Variable16(DBuffer *out, const uint8_t **data, const uint8_t *data_end)\n{\n\tuint16_t len = read_U16(data, data_end);\n\tconst uint8_t *ptr = *data;\n\t\n\tif ((ptr + (len - 1)) > data_end)\n\t{\n\t\tstaterr(\"read_Variable16: read past end of buffer: *ptr+len > data_end\");\n\t\treturn;\n\t}\n\t\n\tout->SetTo(ptr, len);\n\t*data = (ptr + len);\n}\n\nvoid write_Variable16(DBuffer *out, DBuffer *in)\n{\n\tint len = in->Length();\n\tif (len > 65535)\n\t{\n\t\tstaterr(\"write_Variable16: input length > 65535\");\n\t\tlen = 65535;\n\t}\n\t\n\tout->Append16(len);\n\tout->AppendData(in->Data(), len);\n}\n\n\n"
  },
  {
    "path": "common/bufio.fdh",
    "content": "//hash:f4b316a6\n//automatically generated by Makegen\n\n/* located in common/bufio.cpp */\n\n//-----------------[referenced from common/bufio.cpp]----------------//\nuint8_t read_U8(const uint8_t **data, const uint8_t *data_end);\nuint16_t read_U16(const uint8_t **data, const uint8_t *data_end);\nuint32_t read_U32(const uint8_t **data, const uint8_t *data_end);\nvoid write_U8(DBuffer *buffer, uint8_t data);\nvoid write_U16(DBuffer *buffer, uint16_t data);\nvoid write_U32(DBuffer *buffer, uint32_t data);\nvoid write_U64(DBuffer *buffer, uint64_t data);\nvoid write_F32(DBuffer *buffer, float data);\nvoid write_F64(DBuffer *buffer, double data);\nuint32_t read_U24(const uint8_t **data, const uint8_t *data_end);\nvoid write_U24(DBuffer *buffer, uint32_t data);\nchar read_char(const char **data, const char *data_end);\nchar read_nonblank_char(const char **data, const char *data_end);\nchar *read_string(const uint8_t **data, const uint8_t *data_end);\nvoid read_Variable(DBuffer *out, const uint8_t **data, const uint8_t *data_end);\nvoid write_Variable(DBuffer *out, DBuffer *in);\nvoid write_Variable(DBuffer *out, const uint8_t *data, int len);\nvoid read_Variable16(DBuffer *out, const uint8_t **data, const uint8_t *data_end);\nvoid write_Variable16(DBuffer *out, DBuffer *in);\n\n\n/* located in common/stat.cpp */\n\n//-----------------[referenced from common/bufio.cpp]----------------//\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "common/bufio.h",
    "content": "\n#ifndef _BUFIO_H\n#define _BUFIO_H\n\n#include \"bufio.fdh\"\n\nvoid write_Variable(DBuffer *out, const uint8_t *data, int len);\nvoid write_Variable(DBuffer *out, DBuffer *in);\n\n\n\n#endif\n"
  },
  {
    "path": "common/llist.h",
    "content": "\n#ifndef _LLIST_H\n#define _LLIST_H\n\n// this file provides macros which implement common operations on linked lists.\n// this saves a little bit of thinking and helps prevent bugs caused by\n// forgetting one of the steps.\n\n// call them giving them the node to work on and the names of the fields\n// for next, prev, first and last nodes.\n\n// add a node to the end of a linked list\n#define LL_ADD_END(O, PREV, NEXT, FIRST, LAST)\t\\\n{\t\\\n\tif (LAST)\t\\\n\t\tLAST->NEXT = O;\t\\\n\telse\t\\\n\t\tFIRST = O;\t\\\n\t\\\n\tO->PREV = LAST;\t\\\n\tO->NEXT = NULL; \\\n\tLAST = O;\t\\\n}\n\n// add a node at the start of a linked list\n#define LL_ADD_BEGIN(O, PREV, NEXT, FIRST, LAST)\t\\\n{\t\\\n\tO->NEXT = FIRST;\t\\\n\tO->PREV = NULL;\t\\\n\t\\\n\tif (FIRST)\t\\\n\t\tFIRST->PREV = O;\t\\\n\telse\t\\\n\t\tFIRST = LAST = O;\t\\\n}\n\n// insert a node just before another node\n#define LL_INSERT_BEFORE(O, BEHIND, PREV, NEXT, FIRST, LAST)\t\\\n{\t\\\n\tif (BEHIND == FIRST)\t\\\n\t\tFIRST = O;\t\\\n\telse\t\\\n\t\tBEHIND->PREV->NEXT = O;\t\\\n\t\\\n\tO->NEXT = BEHIND;\t\\\n\tO->PREV = BEHIND->PREV;\t\\\n\tBEHIND->PREV = O;\t\\\n}\n\n// insert a node just after another node\n#define LL_INSERT_AFTER(O, AFTER, PREV, NEXT, FIRST, LAST)\t\\\n{\t\\\n\tif (AFTER == LAST)\t\\\n\t\tLAST = O;\t\\\n\telse\t\\\n\t\tAFTER->NEXT->PREV = O;\t\\\n\t\\\n\tO->NEXT = AFTER->NEXT;\t\\\n\tO->PREV = AFTER;\t\\\n\tAFTER->NEXT = O;\t\\\n}\n\n// remove a node from a linked list\n#define LL_REMOVE(O, PREV, NEXT, FIRST, LAST)\t\\\n{\t\\\n\tif (O == FIRST)\t\\\n\t\tFIRST = FIRST->NEXT;\t\\\n\telse if (O->PREV)\t\\\n\t\tO->PREV->NEXT = O->NEXT;\t\\\n\t\\\n\tif (O == LAST)\t\\\n\t\tLAST = LAST->PREV;\t\\\n\telse if (O->NEXT)\t\\\n\t\tO->NEXT->PREV = O->PREV;\t\\\n}\n\n// debug function\n#define LL_DUMP_LIST(START, PREV, NEXT, NODETYPE)\t\\\n{\t\\\n\tstat(\"LL_DUMP_LIST from %s using %s\", #START, #NEXT);\t\\\n\t\\\n\tNODETYPE *n = START;\t\\\n\tint iter = 0;\t\\\n\twhile(n)\t\\\n\t{\t\\\n\t\tstat(\"%d: %08x   P:%08x  N:%08x\", iter++, n, n->PREV, n->NEXT);\t\\\n\t\tn = n->NEXT;\t\\\n\t}\t\\\n}\n\n\n#endif\n\n\n"
  },
  {
    "path": "common/misc.fdh",
    "content": "//hash:dacee9eb\n//automatically generated by Makegen\n\n/* located in platform.cpp */\n\n//------------------[referenced from common/misc.cpp]----------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in common/stat.cpp */\n\n//------------------[referenced from common/misc.cpp]----------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//------------------[referenced from common/misc.cpp]----------------//\nuint16_t fgeti(FILE *fp);\nuint16_t fgeti(FILE *fp, int *eof);\nuint32_t fgetl(FILE *fp);\nuint32_t fgetl(FILE *fp, int *eof);\nvoid fputi(uint16_t word, FILE *fp);\nvoid fputl(uint32_t word, FILE *fp);\nuint16_t fgeti(FILE *fp);\nuint32_t fgetl(FILE *fp);\nvoid fputi(uint16_t word, FILE *fp);\nvoid fputl(uint32_t word, FILE *fp);\ndouble fgetfloat(FILE *fp);\nvoid fputfloat(double q, FILE *fp);\nvoid freadstring(FILE *fp, char *buf, int max);\nvoid fputstring(const char *buf, FILE *fp);\nvoid fputstringnonull(const char *buf, FILE *fp);\nbool fverifystring(FILE *fp, const char *str);\nvoid fgetcsv(FILE *fp, char *str, int maxlen);\nint fgeticsv(FILE *fp);\ndouble fgetfcsv(FILE *fp);\nvoid fgetline(FILE *fp, char *str, int maxlen);\nint filesize(FILE *fp);\nbool file_exists(const char *fname);\nchar *stprintf(const char *fmt, ...);\nint random(int min, int max);\nuint32_t getrand();\nvoid seedrand(uint32_t newseed);\nbool strbegin(const char *bigstr, const char *smallstr);\nbool strcasebegin(const char *bigstr, const char *smallstr);\nint count_string_list(const char *list[]);\nchar *GetStaticStr(void);\nvoid maxcpy(char *dst, const char *src, int maxlen);\nvoid fresetboolean(void);\nchar fbooleanread(FILE *fp);\nvoid fbooleanwrite(char bit, FILE *fp);\nvoid fbooleanflush(FILE *fp);\n\n"
  },
  {
    "path": "common/misc_comm.cpp",
    "content": "\n#include <stdio.h>\n#include <stdint.h>\n#include <string.h>\n#include <stdlib.h>\n#include <stdarg.h>\n#include <math.h>\n#include <ctype.h>\n#include <errno.h>\n\n#include \"basics.h\"\n#include \"misc.fdh\"\n\nvoid stat(const char *fmt, ...);\n\n#if __BYTE_ORDER == __LITTLE_ENDIAN\nuint16_t fgeti(FILE *fp)\n{\nuint16_t value;\nint eof;\n\tvalue = fgeti(fp, &eof);\n\tif (eof) {\n\t\tstaterr(\"fgeti: eof reached while reading uint16_t from file\");\n\t\tfclose(fp);\n\t\texit(1);\n\t}\n\treturn value;\n}\n\nuint16_t fgeti(FILE *fp, int *eof)\n{\nuint16_t value;\n\tif (fread(&value, 2, 1, fp) != 1 && ferror(fp)) {\n\t\tstaterr(\"fgeti: error reading uint16_t from file: %s\", strerror(errno));\n\t\tfclose(fp);\n\t\texit(1);\n\t}\n\t*eof = feof(fp);\n\treturn value;\n}\n\nuint32_t fgetl(FILE *fp)\n{\nuint32_t value;\nint eof;\n\tvalue = fgetl(fp, &eof);\n\tif (eof) {\n\t\tstaterr(\"fgetl: eof reached while reading uint32_t from file\");\n\t\tfclose(fp);\n\t\texit(1);\n\t}\n\treturn value;\n}\n\nuint32_t fgetl(FILE *fp, int *eof)\n{\nuint32_t value;\n\tif (fread(&value, 4, 1, fp) != 1 && ferror(fp)) {\n\t\tstaterr(\"fgetl: error reading uint32_t from file: %s\", strerror(errno));\n\t\tfclose(fp);\n\t\texit(1);\n\t}\n\t*eof = feof(fp);\n\treturn value;\n}\n\nvoid fputi(uint16_t word, FILE *fp)\n{\n\tfwrite(&word, 2, 1, fp);\n}\n\nvoid fputl(uint32_t word, FILE *fp)\n{\n\tfwrite(&word, 4, 1, fp);\n}\n#else\nuint16_t fgeti(FILE *fp)\n{\nuint16_t value;\nint eof;\n\tvalue = fgeti(fp, &eof);\n\tif (eof) {\n\t\tstaterr(\"fgeti: eof reached while reading uint16_t from file\");\n\t\tfclose(fp);\n\t\texit(1);\n\t}\n\treturn value;\n}\n\nuint16_t fgeti(FILE *fp, int *eof)\n{\nuint16_t a, b;\n\teof = 0;\n\tif ((a = fgetc(fp)) == EOF) goto error;\n\tif ((b = fgetc(fp)) == EOF) goto error;\n\treturn (b << 8) | a;\n\nerror:\n\tif (ferror(fp)) {\n\t\tstaterr(\"fgeti: error reading uint16_t from file\");\n\t\tfclose(fp);\n\t\texit(1);\n\t}\n\t*eof = feof(fp);\n\treturn 0;\n}\n\nuint32_t fgetl(FILE *fp)\n{\nuint32_t value;\nint eof;\n\tvalue = fgetl(fp, &eof);\n\tif (eof) {\n\t\tstaterr(\"fgetl: eof reached while reading uint32_t from file\");\n\t\tfclose(fp);\n\t\texit(1);\n\t}\n\treturn value;\n}\n\nuint32_t fgetl(FILE *fp, int *eof)\n{\nuint32_t a, b, c, d;\n\teof = 0;\n\tif ((a = fgetc(fp)) == EOF) goto error;\n\tif ((b = fgetc(fp)) == EOF) goto error;\n\tif ((c = fgetc(fp)) == EOF) goto error;\n\tif ((d = fgetc(fp)) == EOF) goto error;\n\treturn (d<<24)|(c<<16)|(b<<8)|(a);\n\nerror:\n\tif (ferror(fp)) {\n\t\tstaterr(\"fgetl: error reading uint32_t from file\");\n\t\tfclose(fp);\n\t\texit(1);\n\t}\n\t*eof = feof(fp);\n\treturn 0;\n}\n\nvoid fputi(uint16_t word, FILE *fp)\n{\n\tfputc(word, fp);\n\tfputc(word >> 8, fp);\n}\n\nvoid fputl(uint32_t word, FILE *fp)\n{\n\tfputc(word, fp);\n\tfputc(word >> 8, fp);\n\tfputc(word >> 16, fp);\n\tfputc(word >> 24, fp);\n}\n#endif\t\t// __BYTE_ORDER  == __LITTLE_ENDIAN\n\n\n\ndouble fgetfloat(FILE *fp)\n{\nchar buf[16];\ndouble *float_ptr;\nint i;\n\n\tfor(i=0;i<4;i++) fgetc(fp);\n\tfor(i=0;i<8;i++) buf[i] = fgetc(fp);\n\t\n\tfloat_ptr = (double *)&buf[0];\n\treturn *float_ptr;\n}\n\nvoid fputfloat(double q, FILE *fp)\n{\nchar *float_ptr;\nint i;\n\n\tfloat_ptr = (char *)&q;\n\t\n\tfor(i=0;i<4;i++) fputc(0, fp);\n\tfor(i=0;i<8;i++) fputc(float_ptr[i], fp);\n\t\n\treturn;\n}\n\n\n// read a string from a file until a null is encountered\nvoid freadstring(FILE *fp, char *buf, int max)\n{\nint i;\n\n\t--max;\n\tfor(i=0;i<max;i++)\n\t{\n\t\tbuf[i] = fgetc(fp);\n\t\tif (!buf[i])\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\tbuf[i] = 0;\n}\n\n// write a string to a file and null-terminate it\nvoid fputstring(const char *buf, FILE *fp)\n{\n\tif (buf[0]) fprintf(fp, \"%s\", buf);\n\tfputc(0, fp);\n}\n\n// write a string to a file-- does NOT null-terminate it\nvoid fputstringnonull(const char *buf, FILE *fp)\n{\n\tif (buf[0])\n\t\tfprintf(fp, \"%s\", buf);\n}\n\n\n// reads strlen(str) bytes from file fp, and returns true if they match \"str\"\nbool fverifystring(FILE *fp, const char *str)\n{\nint i;\nchar result = 1;\nint stringlength = strlen(str);\n\n\tfor(i=0;i<stringlength;i++)\n\t{\n\t\tif (fgetc(fp) != str[i]) result = 0;\n\t}\n\t\n\treturn result;\n}\n\n// read data from a file until ',' or CR\nvoid fgetcsv(FILE *fp, char *str, int maxlen)\n{\nint i, j;\nchar ch;\n\n\tmaxlen--;\n\tfor(i=j=0;i<maxlen;i++)\n\t{\n\t\tch = fgetc(fp);\n\t\t\n\t\tif (ch==13 || ch==',' || ch=='}' || ch==-1)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (ch != 10)\n\t\t{\n\t\t\tstr[j++] = ch;\n\t\t}\n\t}\n\t\n\tstr[j] = 0;\n}\n\n// read a number from a CSV'd list in a file\nint fgeticsv(FILE *fp)\n{\nchar buffer[80];\n\tfgetcsv(fp, buffer, sizeof(buffer));\n\treturn atoi(buffer);\n}\n\ndouble fgetfcsv(FILE *fp)\n{\nchar buffer[80];\n\tfgetcsv(fp, buffer, sizeof(buffer));\n\treturn atof(buffer);\n}\n\n\n// read data from a file until CR\nvoid fgetline(FILE *fp, char *str, int maxlen)\n{\nint k;\n\tstr[0] = 0;\n\tfgets(str, maxlen - 1, fp);\n\t\n\t// trim the CRLF that fgets appends\n\tfor(k=strlen(str)-1;k>=0;k--)\n\t{\n\t\tif (str[k] != 13 && str[k] != 10) break;\n\t\tstr[k] = 0;\n\t}\n}\n\nint filesize(FILE *fp)\n{\nint cp, sz;\n\n\tcp = ftell(fp);\n\tfseek(fp, 0, SEEK_END);\n\tsz = ftell(fp);\n\tfseek(fp, cp, SEEK_SET);\n\t\n\treturn sz;\n}\n\nbool file_exists(const char *fname)\n{\nFILE *fp;\n\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp) return 0;\n\tfclose(fp);\n\treturn 1;\n}\n\nchar *stprintf(const char *fmt, ...)\n{\nva_list ar;\nchar *str = GetStaticStr();\n\n\tva_start(ar, fmt);\n\tvsnprintf(str, 255, fmt, ar);\n\tva_end(ar);\n\t\n\treturn str;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic uint32_t seed = 0;\n\n// return a random number between min and max inclusive\nint random(int min, int max)\n{\nint range, val;\n\t\n\tif (max < min)\n\t{\n\t\tstaterr(\"random(): warning: max < min [%d, %d]\", min, max);\n\t\tmin ^= max;\n\t\tmax ^= min;\n\t\tmin ^= max;\n\t}\n\t\n\trange = (max - min);\n\t\n\tif (range >= RAND_MAX)\n\t{\n\t\tstaterr(\"random(): range > RAND_MAX\", min, max);\n\t\treturn 0;\n\t}\n\t\n\tval = getrand() % (range + 1);\n\treturn val + min;\n}\n\nuint32_t getrand()\n{\n\tseed = (seed * 0x343FD) + 0x269EC3;\n\treturn seed;\n}\n\nvoid seedrand(uint32_t newseed)\n{\n\tseed = newseed;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nbool strbegin(const char *bigstr, const char *smallstr)\n{\nint i;\n\n\tfor(i=0;smallstr[i];i++)\n\t\tif (bigstr[i] != smallstr[i]) return false;\n\t\n\treturn true;\n}\n\nbool strcasebegin(const char *bigstr, const char *smallstr)\n{\nint i;\n\n\tfor(i=0;smallstr[i];i++)\n\t\tif (toupper(bigstr[i]) != toupper(smallstr[i])) return false;\n\t\n\treturn true;\n}\n\n\n// returns how many strings are in a null-terminated array of C strings\nint count_string_list(const char *list[])\n{\nint i;\n\tfor(i=0;list[i];i++) ;\n\treturn i;\n}\n\n\nchar *GetStaticStr(void)\n{\nstatic int counter = 0;\nstatic struct\n{\n\tchar str[1024];\n} bufs[24];\n\n\tif (++counter >= 24) counter = 0;\n\treturn bufs[counter].str;\n}\n\n// a strncpy that works as you might expect\nvoid maxcpy(char *dst, const char *src, int maxlen)\n{\nint len = strlen(src);\n\n\tif (len >= maxlen)\n\t{\n\t\tif (maxlen >= 2) memcpy(dst, src, maxlen - 2);\n\t\tif (maxlen >= 1) dst[maxlen - 1] = 0;\n\t}\n\telse\n\t{\n\t\tmemcpy(dst, src, len + 1);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic int boolbyte, boolmask_r, boolmask_w;\n\n// prepare for a boolean read operation\nvoid fresetboolean(void)\n{\n\tboolmask_r = 256;\n\tboolmask_w = 1;\n\tboolbyte = 0;\n}\n\n// read a boolean value (a single bit) from a file\nchar fbooleanread(FILE *fp)\n{\nchar value;\n\n\tif (boolmask_r == 256)\n\t{\n\t\tboolbyte = fgetc(fp);\n\t\tboolmask_r = 1;\n\t}\n\t\n\tvalue = (boolbyte & boolmask_r) ? 1:0;\n\tboolmask_r <<= 1;\n\treturn value;\n}\n\nvoid fbooleanwrite(char bit, FILE *fp)\n{\n\tif (boolmask_w == 256)\n\t{\n\t\tfputc(boolbyte, fp);\n\t\tboolmask_w = 1;\n\t\tboolbyte = 0;\n\t}\n\t\n\tif (bit)\n\t{\n\t\tboolbyte |= boolmask_w;\n\t}\n\t\n\tboolmask_w <<= 1;\n}\n\nvoid fbooleanflush(FILE *fp)\n{\n\tfputc(boolbyte, fp);\n\tboolmask_w = 1;\n}\n\n\n\n"
  },
  {
    "path": "common/stat.cpp",
    "content": "\n#include <stdio.h>\n#include <stdarg.h>\n#include <string.h>\n#include <time.h>\n\n#include <SDL/SDL.h>\n#include \"graphics/font.h\"\n\n#include \"basics.h\"\n#include \"misc.fdh\"\n\n#define MAXBUFSIZE\t\t1024\nchar logfilename[64] = { 0 };\nvoid writelog(const char *buf, bool append_cr);\n\n\nvoid SetLogFilename(const char *fname)\n{\n\tmaxcpy(logfilename, fname, sizeof(logfilename));\n\tremove(logfilename);\n}\n\nvoid writelog(const char *buf, bool append_cr)\n{\nFILE *fp;\n\n\tfp = fileopen(logfilename, \"a+\");\n\tif (fp)\n\t{\n\t\tfputs(buf, fp);\n\t\tif (append_cr) fputc('\\n', fp);\n\t\t\n\t\tfclose(fp);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid stat(const char *fmt, ...)\n{\n    va_list ar;\n    char buffer[MAXBUFSIZE];\n\tva_start(ar, fmt);\n\tvsnprintf(buffer, sizeof(buffer), fmt, ar);\n\tva_end(ar);\n\t\n#ifdef _L10N_CP1251\n    char buffer_w_u[MAXBUFSIZE];\n    NXFont::win1251_to_utf8(buffer, buffer_w_u);\n    puts(buffer_w_u);\n    fflush(stdout);\n    if (logfilename[0])\n        writelog(buffer_w_u, true);\n#else\n    puts(buffer);\n    fflush(stdout);\n    if (logfilename[0])\n        writelog(buffer, true);\n#endif\n}\n\nvoid staterr(const char *fmt, ...)\n{\nva_list ar;\nchar buffer[MAXBUFSIZE];\n\n\tva_start(ar, fmt);\n\tvsnprintf(buffer, sizeof(buffer), fmt, ar);\n\tva_end(ar);\n\t\n\tprintf(\" error << %s >> \\n\", buffer);\n\tfflush(stdout);\n\t\n\tif (logfilename[0])\n\t{\n\t\twritelog(\" error << \", false);\n\t\twritelog(buffer, false);\n\t\twritelog(\" >>\\n\", false);\n\t}\n}\n\n\n"
  },
  {
    "path": "common/stat.fdh",
    "content": "//hash:cca537b6\n//automatically generated by Makegen\n\n/* located in platform.cpp */\n\n//------------------[referenced from common/stat.cpp]----------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in common/stat.cpp */\n\n//------------------[referenced from common/stat.cpp]----------------//\nvoid SetLogFilename(const char *fname);\nvoid writelog(const char *buf, bool append_cr);\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//------------------[referenced from common/stat.cpp]----------------//\nvoid maxcpy(char *dst, const char *src, int maxlen);\n\n"
  },
  {
    "path": "config.h",
    "content": "\n#ifndef _CONFIG_H\n#define _CONFIG_H\n\n// if set graphics scaling factor is changable at runtime (otherwise it's a #define)\n#define CONFIG_MUTABLE_SCALE\n\n// SDL_ttf support. if turned off SDL_ttf will not be required but only\n// bitmap fonts will be supported.\n#define CONFIG_ENABLE_TTF\n\n// include the Doukutsu data-file extractor in the build\n// (it's needed only the first time the program is run).\n#define CONFIG_DATA_EXTRACTOR\n\n// do image scaling in hardware via OpenGL\n//#define CONFIG_OPENGL\n\n#endif\n"
  },
  {
    "path": "console.cpp",
    "content": "\n#include \"nx.h\"\n#include <stdarg.h>\n#include \"console.fdh\"\n\nstatic CommandEntry commands[] =\n{\n\t\"god\", __god, 0, 1,\n\t\"script\", __script, 1, 1,\n\t\"warp\", __warp, 1, 999,\n\t\"sound\", __sound, 1, 1,\n\t\"music\", __music, 1, 1,\n\t\"giveweapon\", __giveweapon, 1, 1,\n\t\"dropweapon\", __dropweapon, 0, 1,\n\t\"level\", __level, 1, 1,\n\t\"ammo\", __ammo, 1, 1,\n\t\"maxammo\", __maxammo, 1, 1,\n\t\"hp\", __hp, 1, 1,\n\t\"maxhp\", __maxhp, 1, 1,\n\t\"xp\", __xp, 1, 1,\n\t\"spawn\", __spawn, 1, 999,\n\t\"animate\", __animate, 1, 2,\n\t\"infinitedamage\", __infinitedamage, 0, 1,\n\t\"killall\", __killall, 0, 0,\n\t\"movemode\", __movemode, 1, 1,\n\t\"flag\", __flag, 1, 1,\n\t\"clearflags\", __clearflags, 0, 0,\n\t\"equip\", __equip, 1, 2,\n\t\"giveitem\", __giveitem, 1, 1,\n\t\"takeitem\", __takeitem, 1, 1,\n\t\"qua\", __qua, 0, 1,\n\t\"boa\", __boa, 1, 1,\n\t\"cre\", __cre, 0, 0,\n\t\"reset\", __reset, 0, 0,\n\t\"fps\", __fps, 0, 1,\n\t\n\t\"instant-quit\", __set_iquit, 1, 1,\n\t\"no-quake-in-hell\", __set_noquake, 1, 1,\n\t\"inhibit-fullscreen\", __inhibit_fullscreen, 1, 1,\n\t\"emulate-bugs\", __emulate_bugs, 1, 1,\n\t\"displayformat\", __displayformat, 1, 1,\n\t\"skip-intro\", __skip_intro, 1, 1,\n\t\n\t\"player->hide\", __player_hide, 1, 1,\n\t\"player->inputs_locked\", __player_inputs_locked, 1, 1,\n\t\"game.frozen\", __game_frozen, 1, 1,\n\t\"textbox.SetVisible\", __textbox_setvisible, 1, 1,\n\t\n\t\"hello\", __hello, 0, 0,\n\t\"hi\", __hello, 0, 0,\n\t\n\tNULL, NULL\n};\n\n\nDebugConsole::DebugConsole()\n{\n\tfVisible = false;\n\tfLineLen = 0;\n\tfCursorTimer = 0;\n\tfResponseTimer = 0;\n\t\n\tfLine[0] = 0;\n\tfResponse[0] = 0;\n\t\n\tfKeyDown = 0;\n\tfRepeatTimer = 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DebugConsole::SetVisible(bool newstate)\n{\n\t//stat(\"DebugConsole::SetVisible(%s)\", newstate?\"true\":\"false\");\n\t\n\tif (fVisible != newstate)\n\t{\n\t\tfVisible = newstate;\n\t\tfKeyDown = 0;\n\t\tfRepeatTimer = 0;\n\t\t\n\t\tif (newstate)\n\t\t{\n\t\t\tfLine[0] = 0;\n\t\t\tfLineLen = 0;\n\t\t\tfBrowsingExpansion = false;\n\t\t\tfBackIndex = fBackBuffer.CountItems();\n\t\t\t\n\t\t\tfResponse[0] = 0;\n\t\t\tfCursorTimer = 0;\n\t\t}\n\t}\n}\n\nbool DebugConsole::IsVisible()\n{\n\treturn fVisible;\n}\n\nbool DebugConsole::HandleKey(int key)\n{\n\tif (!fVisible) return 0;\n\tif (key != 9) fBrowsingExpansion = false;\n\t\n\tif (key != fKeyDown)\n\t{\n\t\tfKeyDown = key;\n\t\tfRepeatTimer = 25;\n\t}\n\telse\n\t{\n\t\tfRepeatTimer = 1;\n\t}\n\t\n\tfCursorTimer = 0;\n\n\tswitch(key)\n\t{\n\t\tcase 27:\n\t\tcase '`':\n\t\t{\n\t\t\tSetVisible(false);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 13:\n\t\tcase 271:\t// numeric enter\n\t\t{\n\t\t\tSetVisible(false);\n\t\t\t\n\t\t\tfLine[fLineLen] = 0;\n\t\t\tExecute(fLine);\n\t\t\tfLineLen = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10: break;\n\t\t\n\t\tcase 8:\n\t\t{\n\t\t\tif (fLineLen > 0)\n\t\t\t\tfLineLen--;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 9:\t\t// command completion\n\t\t{\n\t\t\tfLine[fLineLen] = 0;\n\t\t\tExpandCommand();\n\t\t\t\n\t\t\tfBrowsingExpansion = true;\n\t\t\tfExpandIndex++;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// command backbuffer\n\t\tcase SDLK_UP:\n\t\tcase SDLK_DOWN:\n\t\t{\n\t\t\tif (fBackBuffer.CountItems() > 0)\n\t\t\t{\n\t\t\t\tfBackIndex += (key == SDLK_UP) ? -1 : 1;\n\t\t\t\tif (fBackIndex < 0) fBackIndex = (fBackBuffer.CountItems() - 1);\n\t\t\t\telse fBackIndex %= fBackBuffer.CountItems();\n\t\t\t\t\n\t\t\t\tconst char *str = fBackBuffer.StringAt(fBackIndex);\n\t\t\t\t\n\t\t\t\tmaxcpy(fLine, str, sizeof(fLine) - 1);\n\t\t\t\tfLineLen = strlen(str);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t{\n\t\t\tif (fLineLen < (sizeof(fLine) - 1))\n\t\t\t\tfLine[fLineLen++] = key;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\treturn 1;\n}\n\nvoid DebugConsole::HandleKeyRelease(int key)\n{\n\tif (key == fKeyDown)\n\t{\n\t\tfKeyDown = 0;\n\t\tfRepeatTimer = 0;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DebugConsole::Draw()\n{\n\tif (fResponse[0])\n\t{\n\t\tthis->DrawText(fResponse);\n\t\t\n\t\tif (--fResponseTimer <= 0)\n\t\t\tfResponse[0] = 0;\n\t}\n\telse if (fVisible)\n\t{\n\t\t// key-repeat\n\t\tif (fKeyDown)\n\t\t{\n\t\t\tif (--fRepeatTimer < 0)\n\t\t\t\tHandleKey(fKeyDown);\n\t\t}\n\t\t\n\t\tchar buffer[CONSOLE_MAXCMDLEN + 10];\n\t\tfLine[fLineLen] = 0;\n\t\t\n\t\tsprintf(buffer, \"-> %s%c\",\n\t\t\tfLine, (fCursorTimer < 20) ? '_' : ' ');\n\t\t\n\t\tthis->DrawText(buffer);\n\t\t\n\t\tif (++fCursorTimer > 30)\n\t\t\tfCursorTimer = 0;\n\t}\n}\n\nvoid DebugConsole::DrawText(const char *text)\n{\n\tfont_draw_shaded(4, (SCREEN_HEIGHT - 16), text);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DebugConsole::Print(const char *fmt, ...)\n{\nva_list ar;\n\n\tva_start(ar, fmt);\n\tvsnprintf(fResponse, sizeof(fResponse), fmt, ar);\n\tva_end(ar);\n\t\n\tstat(\"%s\", fResponse);\n\tfResponseTimer = 60;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool DebugConsole::Execute(const char *line)\n{\n\tstat(\"DebugConsole::Execute('%s')\", line);\n\t\n\t// record command in backbuffer\n\tif (fBackBuffer.CountItems() >= CONSOLE_MAX_BACK)\n\t\tfBackBuffer.RemoveString(0);\n\tfBackBuffer.AddString(line);\n\t\n\t// split command into arguments\n\tStringList args;\n\tchar *cmd = SplitCommand(line, &args);\n\t\n\tif (cmd)\n\t{\n\t\tBList matches;\n\t\tMatchCommand(cmd, &matches);\n\t\tfree(cmd);\n\t\t\n\t\tif (matches.CountItems() == 1)\n\t\t{\n\t\t\tCommandEntry *command = (CommandEntry *)matches.ItemAt(0);\n\t\t\t\n\t\t\tif (args.CountItems() < command->minArgs || \\\n\t\t\t\targs.CountItems() > command->maxArgs)\n\t\t\t{\n\t\t\t\tif (command->minArgs == command->maxArgs)\n\t\t\t\t{\n\t\t\t\t\tPrint(\"'%s' requires %d argument%s\", \\\n\t\t\t\t\t\tcommand->name, command->minArgs, \\\n\t\t\t\t\t\t(command->minArgs == 1) ? \"\":\"s\");\n\t\t\t\t}\n\t\t\t\telse if (args.CountItems() < command->minArgs)\n\t\t\t\t{\n\t\t\t\t\tPrint(\"'%s' requires at least %d argument%s\",\n\t\t\t\t\t\tcommand->name, command->minArgs,\n\t\t\t\t\t\t(command->minArgs == 1) ? \"\":\"s\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tPrint(\"'%s' requires no more than %d arguments\",\n\t\t\t\t\t\tcommand->name, command->maxArgs);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvoid (*handler)(StringList *, int) = command->handler;\n\t\t\t\tint num = (args.CountItems() > 0) ? atoi(args.StringAt(0)) : 0;\n\t\t\t\t\n\t\t\t\t(*handler)(&args, num);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\telse if (matches.CountItems() == 0)\n\t\t{\n\t\t\tPrint(\"I don't understand\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPrint(\"Ambiguous command\");\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n\nvoid DebugConsole::MatchCommand(const char *cmd, BList *matches)\n{\n\tfor(int i=0; commands[i].name; i++)\n\t{\n\t\tif (strcasebegin(commands[i].name, cmd))\n\t\t\tmatches->AddItem(&commands[i]);\n\t}\n}\n\n// split an input line into command and arguments\n// returns the command portion of the line. you must free this buffer.\nchar *DebugConsole::SplitCommand(const char *line_in, StringList *args)\n{\n\twhile(*line_in == ' ' || *line_in == '\\t') line_in++;\n\tchar *line = strdup(line_in);\n\t\n\tchar *cmd = strtok(line, \" \\t\");\n\tif (cmd && cmd[0])\n\t{\n\t\twhile(const char *arg = strtok(NULL, \" \\t\"))\n\t\t{\n\t\t\targs->AddString(arg);\n\t\t}\n\t\t\n\t\treturn line;\n\t}\n\t\n\tfree(line);\n\treturn NULL;\n}\n\n// tab-expand the current command\nvoid DebugConsole::ExpandCommand()\n{\nStringList args;\nBList matches;\nchar *cmd;\n\n\tfLine[fLineLen] = 0;\n\t\n\tif (!fBrowsingExpansion)\n\t{\n\t\tmaxcpy(fLineToExpand, fLine, sizeof(fLineToExpand));\n\t\tfExpandIndex = 0;\n\t}\n\t\n\tcmd = SplitCommand(fLineToExpand, &args);\n\tif (cmd)\n\t{\n\t\tMatchCommand(cmd, &matches);\n\t\tfree(cmd);\n\t\t\n\t\tif (matches.CountItems() > 0)\n\t\t{\n\t\t\tif (fExpandIndex >= matches.CountItems())\n\t\t\t\tfExpandIndex = 0;\n\t\t\t\n\t\t\tCommandEntry *command = (CommandEntry *)matches.ItemAt(fExpandIndex);\n\t\t\tDString newCommand(command->name);\n\t\t\t\n\t\t\tfor(int i=0;;i++)\n\t\t\t{\n\t\t\t\tconst char *arg = args.StringAt(i);\n\t\t\t\tif (!arg) break;\n\t\t\t\t\n\t\t\t\tnewCommand.AppendChar(' ');\n\t\t\t\tnewCommand.AppendString(arg);\n\t\t\t}\n\t\t\t\n\t\t\tif (args.CountItems() < command->minArgs)\n\t\t\t\tnewCommand.AppendChar(' ');\n\t\t\t\n\t\t\tmaxcpy(fLine, newCommand.String(), sizeof(fLine));\n\t\t\tfLineLen = strlen(fLine);\n\t\t}\n\t}\n\t\n\tif (matches.CountItems() != 1)\n\t\tsound(SND_TINK);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n#define Respond\t\tconsole.Print\n\n\nstatic void __god(StringList *args, int num)\n{\nbool enable;\n\n\tif (args->CountItems() == 0)\n\t\tenable = true;\n\telse\n\t\tenable = num;\n\t\n\tgame.debug.god = enable;\n}\n\nstatic void __script(StringList *args, int num)\n{\n\t// release any focus a current script may have on us\n\tif (player->movementmode == MOVEMODE_NORMAL)\n\t\tmap_focus(NULL);\n\t\n\tif (StartScript(num))\n\t{\n\t\tRespond(\"Script %04d started.\", num);\n\t}\n\telse\n\t{\n\t\tRespond(\"No such script %04d\", num);\n\t}\n}\n\nstatic void __warp(StringList *args, int num)\n{\n\tif (num == 0)\n\t{\n\t\tDString stagename;\n\t\tfor(int i=0;i<args->CountItems();i++)\n\t\t{\n\t\t\tif (i != 0) stagename.AppendChar(' ');\n\t\t\tstagename.AppendString(args->StringAt(i));\n\t\t}\n\t\t\n\t\tstat(\"Looking for '%s'\", stagename.String());\n\t\tfor(num=0;;num++)\n\t\t{\n\t\t\tif (num >= num_stages)\n\t\t\t{\n\t\t\t\tif (!strcasecmp(stagename.String(), \"village\"))\n\t\t\t\t{\n\t\t\t\t\tnum = 11;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tRespond(\"Could determine stage number from your description.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (strcasebegin(stages[num].stagename, stagename.String()))\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tgame.switchstage.mapno = num;\n\tgame.switchstage.playerx = 16;\n\tgame.switchstage.playery = 16;\n}\n\nstatic void __sound(StringList *args, int num)\n{\n\tsound(num);\n\tconsole.SetVisible(true);\t// keep console up\n}\n\nstatic void __music(StringList *args, int num)\n{\n\textern const char *org_names[];\n\tbool ok = true;\n\tint i;\n\t\n\tconst char *name = args->StringAt(0);\n\tif (num == 0 && strcmp(name, \"0\") != 0)\n\t{\n\t\tfor(i=1;;i++)\n\t\t{\n\t\t\tif (!org_names[i]) break;\n\t\t\t\n\t\t\tif (strcasebegin(org_names[i], name))\n\t\t\t{\n\t\t\t\tnum = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (num == 0)\n\t\t{\n\t\t\tRespond(\"Don't know that song.\");\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\tif (num < 0) ok = false;\n\telse\n\t{\n\t\tfor(i=1;i<=num;i++)\n\t\t{\n\t\t\tif (!org_names[i])\n\t\t\t{\n\t\t\t\tok = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (!ok)\n\t{\n\t\tRespond(\"track out of range\");\n\t\tmusic(0);\n\t}\n\telse\n\t{\n\t\tmusic(0);\n\t\tmusic(num);\n\t\tif (org_names[num])\n\t\t\tRespond(\"%s started\", org_names[num]);\n\t}\n}\n\nstatic void __giveweapon(StringList *args, int num)\n{\n\tif (num >= 0 && num < WPN_COUNT)\n\t{\n\t\tplayer->weapons[num].hasWeapon = 1;\n\t\tplayer->weapons[num].maxammo = 0;\t\t// gives it unlimited ammo\n\t\tplayer->weapons[num].ammo = 0;\n\t\tplayer->curWeapon = num;\n\t}\n}\n\nstatic void __dropweapon(StringList *args, int num)\n{\n\tif (args->CountItems() == 0)\n\t\tnum = player->curWeapon;\n\t\n\tplayer->weapons[num].hasWeapon = 0;\n\tplayer->weapons[num].maxammo = 0;\n\tplayer->weapons[num].ammo = 0;\n\t\n\tif (num == player->curWeapon)\n\t\tstat_NextWeapon();\n}\n\n// set weapon level\nstatic void __level(StringList *args, int num)\n{\n\tnum--;\n\tif (num < 0) num = 0;\n\tif (num > 2) num = 2;\n\t\n\tif (player->weapons[player->curWeapon].xp < 5)\n\t\tplayer->weapons[player->curWeapon].xp = 5;\n\t\n\tfor(int timeout=0;timeout<500;timeout++)\n\t{\n\t\tif (player->weapons[player->curWeapon].level == num)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telse if (player->weapons[player->curWeapon].level < num)\n\t\t{\n\t\t\tAddXP(1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSubXP(1);\n\t\t}\n\t}\n\t\n\tRespond(\"Timeout\");\n}\n\n\nstatic void __ammo(StringList *args, int num)\n{\n\tplayer->weapons[player->curWeapon].ammo = num;\n\tif (player->weapons[player->curWeapon].ammo > player->weapons[player->curWeapon].maxammo)\n\t\tplayer->weapons[player->curWeapon].maxammo = player->weapons[player->curWeapon].ammo;\n}\n\nstatic void __maxammo(StringList *args, int num)\n{\n\tplayer->weapons[player->curWeapon].maxammo = num;\n\tif (player->weapons[player->curWeapon].ammo > player->weapons[player->curWeapon].maxammo)\n\t\tplayer->weapons[player->curWeapon].ammo = player->weapons[player->curWeapon].maxammo;\n}\n\nstatic void __hp(StringList *args, int num)\n{\n\tplayer->hp = num;\n\tif (player->hp > player->maxHealth)\n\t\tplayer->maxHealth = player->hp;\n}\n\nstatic void __maxhp(StringList *args, int num)\n{\n\tplayer->maxHealth = num;\n\tif (player->hp > player->maxHealth)\n\t{\n\t\tplayer->hp = player->maxHealth;\n\t\t//PHealthBar.displayed_value = player->hp;\n\t}\n}\n\nstatic void __xp(StringList *args, int num)\n{\n\tplayer->weapons[player->curWeapon].xp = num;\n}\n\nstatic void __spawn(StringList *args, int num)\n{\n\tint i = 0;\n\n\t// if first argument is a number interpret it as a count of\n\t// objects to spawn.\n\tint count;\n\tif (isdigit(args->StringAt(0)[0]))\n\t{\n\t\tcount = num;\n\t\ti++;\n\t}\n\telse\n\t{\n\t\tcount = 1;\n\t}\n\t\n\t// reconstitute the arguments into the name of the object\n\t// to be spawned.\n\tDString objName;\n\tint starti = i;\n\tfor(;;i++)\n\t{\n\t\tif (!args->StringAt(i)) break;\n\t\t\n\t\tif (i > starti) objName.AppendChar(' ');\n\t\tobjName.AppendString(args->StringAt(i));\n\t}\n\t\n\t// try and get object type from the provided name\n\tint type = ObjectNameToType(objName.String());\n\tif (type == -1)\n\t{\n\t\tRespond(\"Unknown object. See object.h for definitions.\");\n\t\treturn;\n\t}\n\n\t// reset console animate flags on any previously spawned objects\n\tObject *o;\n\tFOREACH_OBJECT(o)\n\t{\n\t\to->nxflags &= ~NXFLAG_CONSOLE_ANIMATE;\n\t}\n\t\n\t// get starting spawn position and spacing\n\tint x = player->x + ((player->dir==RIGHT) ? (24 << CSF) : -(24 << CSF));\n\tint y = player->y - (16 << CSF);\n\tint w = (sprites[objprop[type].sprite].w + 4) << CSF;\n\t\n\t// create 'em\n\tfor(i=0;i<count;i++)\n\t{\n\t\tObject *o = CreateObject(x, y, type);\n\t\t\n\t\to->dir = player->dir;\n\t\to->nxflags |= NXFLAG_CONSOLE_ANIMATE;\n\t\tx += w;\n\t}\n\t\n\tif (count != 1)\n\t\tRespond(\"%s x%d\", DescribeObjectType(type), count);\n\telse\n\t\tRespond(\"%s\", DescribeObjectType(type));\n}\n\nstatic void __animate(StringList *args, int num)\n{\n\tObject *o;\n\t\n\tif (args->CountItems() == 2)\n\t{\t// specifying explicitly by id2\n\t\to = FindObjectByID2(atoi(args->StringAt(0)));\n\t\tif (o)\n\t\t\to->state = atoi(args->StringAt(1));\n\t\telse\n\t\t\tRespond(\"Object not found.\");\n\t\t\n\t\treturn;\n\t}\n\t\n\t// animating implicitly from last spawn command\n\tbool found = false;\n\tFOREACH_OBJECT(o)\n\t{\n\t\tif (o->nxflags & NXFLAG_CONSOLE_ANIMATE)\n\t\t{\n\t\t\to->state = num;\n\t\t\tfound = true;\n\t\t}\n\t}\n\t\n\tif (!found)\n\t\tRespond(\"No objects found.\");\n}\n\nstatic void __infinitedamage(StringList *args, int num)\n{\n\tif (args->CountItems() > 0)\n\t\tgame.debug.infinite_damage = num;\n\telse\n\t\tgame.debug.infinite_damage ^= 1;\n\t\n\tRespond(game.debug.infinite_damage ? \"My, oh my...\" : \"Back to normal.\");\n}\n\nstatic void __killall(StringList *args, int num)\n{\n\tfor(int i=0;i<nOnscreenObjects;i++)\n\t{\n\t\tObject *o = onscreen_objects[i];\n\t\tif (o->flags & FLAG_SHOOTABLE)\n\t\t{\n\t\t\to->flags &= ~FLAG_INVULNERABLE;\n\t\t\to->DealDamage(999);\n\t\t}\n\t}\n}\n\nstatic void __movemode(StringList *args, int num)\n{\n\tplayer->movementmode = num;\n}\n\nstatic void __flag(StringList *args, int num)\n{\n\tgame.flags[num] ^= 1;\n\tRespond(\"Flag %04d: %s\", num, game.flags[num] ? \"SET\":\"CLEARED\");\n}\n\nstatic void __clearflags(StringList *args, int num)\n{\n\tmemset(game.flags, 0, sizeof(game.flags));\n\tRespond(\"Warning- all game flags cleared\");\n}\n\nstatic void __equip(StringList *args, int num)\n{\nstatic const char *equiplist[] =\n{\n\t\"booster08\",\n\t\"map\",\n\t\"armsbarrier\",\n\t\"turbocharge\",\n\t\"airtank\",\n\t\"booster20\",\n\t\"mimigamask\",\n\t\"whimstar\",\n\t\"nikumaru\",\n\tNULL\n};\nint i, mask;\n\n\tconst char *item = args->StringAt(0);\n\tbool enable = args->StringAt(1) ? atoi(args->StringAt(1)) : true;\n\t\n\tmask = 0x01;\n\tfor(i=0;equiplist[i];i++)\n\t{\n\t\tif (!strcasecmp(equiplist[i], item))\n\t\t{\n\t\t\t// allow only booster 08 or booster 20 at a time\n\t\t\tif (mask & (EQUIP_BOOSTER08 | EQUIP_BOOSTER20))\n\t\t\t\tplayer->equipmask &= ~(EQUIP_BOOSTER08 | EQUIP_BOOSTER20);\n\t\t\t\n\t\t\tif (enable)\n\t\t\t\tplayer->equipmask |= mask;\n\t\t\telse\n\t\t\t\tplayer->equipmask &= ~mask;\n\t\t\t\n\t\t\tRespond(\"Item %s (0x%04x) %sequipped.\",\n\t\t\t\tequiplist[i], mask, enable ? \"\" : \"un-\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tmask <<= 1;\n\t}\n\t\n\tRespond(\"Unknown item\");\n}\n\nstatic void __giveitem(StringList *args, int num)\n{\n\tif (FindInventory(num) == -1)\n\t{\n\t\tAddInventory(num);\n\t\tRespond(\"Added item %d to your inventory.\", num);\n\t}\n\telse\n\t{\n\t\tRespond(\"You already have item %d in your inventory.\", num);\n\t}\n}\n\nstatic void __takeitem(StringList *args, int num)\n{\n\tif (FindInventory(num) != -1)\n\t{\n\t\tDelInventory(num);\n\t\tRespond(\"Removed item %d from your inventory.\", num);\n\t}\n\telse\n\t{\n\t\tRespond(\"You don't have item %d in your inventory.\", num);\n\t}\n}\n\nstatic void __qua(StringList *args, int num)\n{\n\tif (args->CountItems() > 0)\n\t\tmegaquake(50);\n\telse\n\t\tquake(50);\n}\n\nstatic void __boa(StringList *args, int num)\n{\n\tgame.stageboss.SetState(num);\n}\n\n// skip to good ending sequence\nstatic void __cre(StringList *args, int num)\n{\n\tgame.reset();\n\tgame.pause(0);\n\tgame.setmode(GM_NORMAL);\n\t\n\tgame.flags[1341] = true;\n\tgame.switchstage.mapno = 70;\n\tgame.switchstage.playerx = 16;\n\tgame.switchstage.playery = 16;\n\tgame.switchstage.eventonentry = 400;\n}\n\nstatic void __reset(StringList *args, int num)\n{\n\tgame.reset();\n}\n\nstatic void __fps(StringList *args, int num)\n{\nextern int fps;\n\n\tsettings->show_fps ^= 1;\n\tsettings_save();\n\tfps = 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void __set_iquit(StringList *args, int num)\n{\n\tsettings->instant_quit = num;\n\tsettings_save();\n\tRespond(\"instant quit: %s\", settings->instant_quit ? \"enabled\":\"disabled\");\n}\n\nstatic void __set_noquake(StringList *args, int num)\n{\n\tsettings->no_quake_in_hell = num;\n\tsettings_save();\n\tRespond(\"no quake in hell: %s\", settings->no_quake_in_hell ? \"enabled\":\"disabled\");\n}\n\nstatic void __inhibit_fullscreen(StringList *args, int num)\n{\n\tsettings->inhibit_fullscreen = num;\n\tsettings_save();\n\tRespond(\"inhibit fullscreen: %s\", settings->inhibit_fullscreen ? \"enabled\":\"disabled\");\n}\n\nstatic void __emulate_bugs(StringList *args, int num)\n{\n\tsettings->emulate_bugs = num;\n\tsettings_save();\n\tRespond(\"emulate bugs: %s\", settings->emulate_bugs ? \"enabled\":\"disabled\");\n}\n\nstatic void __displayformat(StringList *args, int num)\n{\n\tsettings->displayformat = num;\n\tsettings_save();\n\tGraphics::FlushAll();\n\tRespond(\"SDL_DisplayFormat: %s\", settings->displayformat ? \"on\":\"off\");\n}\n\nstatic void __skip_intro(StringList *args, int num)\n{\n\tsettings->skip_intro = num;\n\tsettings_save();\n\tRespond(\"skip_intro: %s\", settings->skip_intro ? \"enabled\":\"disabled\");\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void __hello(StringList *args, int num)\n{\n\tRespond(\"I'm a computer, you ninny. Go get a real friend.\");\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void __player_hide(StringList *args, int num)\n{\n\tplayer->hide = num;\n}\n\nstatic void __player_inputs_locked(StringList *args, int num)\n{\n\tplayer->inputs_locked = num;\n}\n\nstatic void __game_frozen(StringList *args, int num)\n{\n\tgame.frozen = num;\n}\n\nstatic void __textbox_setvisible(StringList *args, int num)\n{\n\ttextbox.SetVisible(num);\n}\n\n"
  },
  {
    "path": "console.fdh",
    "content": "//hash:5d27c89d\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nvoid megaquake(int quaketime, int snd);\nvoid quake(int quaketime, int snd);\n\n\n/* located in ObjManager.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nvoid map_focus(Object *o, int spd);\nObject *FindObjectByID2(int id2);\n\n\n/* located in settings.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nbool settings_save(Settings *setfile);\n\n\n/* located in playerstats.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nvoid AddXP(int xp, bool quiet);\nvoid SubXP(int xp, bool quiet);\nint FindInventory(int item);\nvoid AddInventory(int item);\nvoid DelInventory(int item);\n\n\n/* located in statusbar.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nvoid stat_NextWeapon(bool quiet);\n\n\n/* located in tsc.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nScriptInstance *StartScript(int scriptno, int pageno);\n\n\n/* located in debug.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nint ObjectNameToType(const char *name_in);\nconst char *DescribeObjectType(int type);\n\n\n/* located in console.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nstatic void __god(StringList *args, int num);\nstatic void __script(StringList *args, int num);\nstatic void __warp(StringList *args, int num);\nstatic void __sound(StringList *args, int num);\nstatic void __music(StringList *args, int num);\nstatic void __giveweapon(StringList *args, int num);\nstatic void __dropweapon(StringList *args, int num);\nstatic void __level(StringList *args, int num);\nstatic void __ammo(StringList *args, int num);\nstatic void __maxammo(StringList *args, int num);\nstatic void __hp(StringList *args, int num);\nstatic void __maxhp(StringList *args, int num);\nstatic void __xp(StringList *args, int num);\nstatic void __spawn(StringList *args, int num);\nstatic void __animate(StringList *args, int num);\nstatic void __infinitedamage(StringList *args, int num);\nstatic void __killall(StringList *args, int num);\nstatic void __movemode(StringList *args, int num);\nstatic void __flag(StringList *args, int num);\nstatic void __clearflags(StringList *args, int num);\nstatic void __equip(StringList *args, int num);\nstatic void __giveitem(StringList *args, int num);\nstatic void __takeitem(StringList *args, int num);\nstatic void __qua(StringList *args, int num);\nstatic void __boa(StringList *args, int num);\nstatic void __cre(StringList *args, int num);\nstatic void __reset(StringList *args, int num);\nstatic void __fps(StringList *args, int num);\nstatic void __set_iquit(StringList *args, int num);\nstatic void __set_noquake(StringList *args, int num);\nstatic void __inhibit_fullscreen(StringList *args, int num);\nstatic void __emulate_bugs(StringList *args, int num);\nstatic void __displayformat(StringList *args, int num);\nstatic void __skip_intro(StringList *args, int num);\nstatic void __hello(StringList *args, int num);\nstatic void __player_hide(StringList *args, int num);\nstatic void __player_inputs_locked(StringList *args, int num);\nstatic void __game_frozen(StringList *args, int num);\nstatic void __textbox_setvisible(StringList *args, int num);\n\n\n/* located in graphics/font.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nint font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in sound/sound.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nvoid sound(int snd);\nvoid music(int songno);\n\n\n/* located in common/stat.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//--------------------[referenced from console.cpp]------------------//\nvoid maxcpy(char *dst, const char *src, int maxlen);\nbool strcasebegin(const char *bigstr, const char *smallstr);\n\n"
  },
  {
    "path": "console.h",
    "content": "\n#ifndef _CONSOLE_H\n#define _CONSOLE_H\n\n#define CONSOLE_MAXCMDLEN\t\t48\n#define CONSOLE_MAXRESPONSELEN\t48\n\n// how many commands to remember in the backbuffer\n#define CONSOLE_MAX_BACK\t\t8\n\nstruct CommandEntry\n{\n\tconst char *name;\n\tvoid (*handler)(StringList *args, int num);\n\tint minArgs, maxArgs;\n};\n\nclass DebugConsole\n{\npublic:\n\tDebugConsole();\n\t\n\tvoid SetVisible(bool newstate);\n\tbool IsVisible();\n\t\n\tbool HandleKey(int key);\n\tvoid HandleKeyRelease(int key);\n\tvoid Draw();\n\t\n\tbool Execute(const char *line);\n\tvoid Print(const char *fmt, ...);\n\t\nprivate:\n\tvoid DrawText(const char *text);\n\tvoid MatchCommand(const char *cmd, BList *matches);\n\tchar *SplitCommand(const char *line_in, StringList *args);\n\tvoid ExpandCommand();\n\t\n\tchar fLine[CONSOLE_MAXCMDLEN];\n\tint fLineLen;\n\tint fKeyDown;\n\tint fRepeatTimer;\n\t\n\tchar fLineToExpand[CONSOLE_MAXCMDLEN];\n\tbool fBrowsingExpansion;\n\tint fExpandIndex;\n\t\n\tchar fResponse[CONSOLE_MAXRESPONSELEN];\n\tint fResponseTimer;\n\t\n\tint fCursorTimer;\n\tbool fVisible;\n\t\n\t// up-down last-command buffer\n\tint fBackIndex;\n\tStringList fBackBuffer;\n};\n\nextern DebugConsole console;\n\n#endif\n"
  },
  {
    "path": "debug.cpp",
    "content": "\n#include \"nx.h\"\n#include <stdarg.h>\n#include <string.h>\n\n#include \"debug.fdh\"\n\n#define MAX_DEBUG_MARKS\t\t80\nstatic struct\n{\n\tint x, y, x2, y2;\n\tchar type;\n\tuchar r, g, b;\n} debugmarks[MAX_DEBUG_MARKS];\n\nstatic int ndebugmarks = 0;\nstatic StringList DebugList;\n\n\nvoid DrawDebug(void)\n{\n\tif (settings->enable_debug_keys)\n\t{\n\t\t// handle debug keys\n\t\tif (justpushed(DEBUG_GOD_KEY))\n\t\t{\n\t\t\tgame.debug.god ^= 1;\n\t\t\tsound(SND_MENU_SELECT);\n\t\t}\n\t\t\n\t\tif (justpushed(DEBUG_SAVE_KEY))\n\t\t{\n\t\t\tgame_save(settings->last_save_slot);\n\t\t\tsound(SND_SWITCH_WEAPON);\n\t\t\tconsole.Print(\"Game saved.\");\n\t\t}\n\t\t\n        if (justpushed(F6KEY))\n\t\t{\n\t\t\tgame.debug.DrawBoundingBoxes ^= 1;\n\t\t\tsound(SND_COMPUTER_BEEP);\n\t\t}\n\t\t\n        if (justpushed(F7KEY))\n        {\n            SDL_SaveBMP(screen->GetSDLSurface(), \"screen.bmp\");\n        }\n\n        if (justpushed(F9KEY))\n\t\t{\n\t\t\tAddXP(1);\n\t\t}\n\t\t\n\t\tif (inputs[DEBUG_FLY_KEY])\n\t\t{\n\t\t\tplayer->yinertia = -0x880;\n\t\t\tif (!player->hurt_time) player->hurt_time = 20;\t\t// make invincible\n\t\t}\n\t}\n\t\n\t/*if (game.debug.debugmode)\n\t{\n\t\t//debug(\"%d fps\", game.debug.fps);\n\t\t\n\t\tif (game.debug.god)\n\t\t{\n\t\t\t//debug(\"<GOD MODE>\");\n\t\t\tplayer->weapons[player->curWeapon].level = 2;\n\t\t\tplayer->weapons[player->curWeapon].xp = player->weapons[player->curWeapon].max_xp[2];\n\t\t\tplayer->weapons[player->curWeapon].ammo = player->weapons[player->curWeapon].maxammo;\n\t\t\tplayer->hp = player->maxHealth;\n\t\t}\n\t\t\n\t\tdebug(\"%d,%d\", (player->x>>CSF)/TILE_W, (player->y>>CSF)/TILE_H);\n\t\tdebug(\"[%c%c%c%c]\", player->blockl?'l':' ', player->blockr?'r':' ', player->blocku?'u':' ', player->blockd?'d':' ');\n\t\t//debug(\"%d\", player->xinertia);\n\t\t//debug(\"%d\", player->yinertia);*/\n\t\t/*\n\t\tdebug(\"Have Puppy: %d\", game.flags[274]);\n\t\tdebug(\"Kakeru: %d\", game.flags[275]);\n\t\tdebug(\"Runner Gone: %d\", game.flags[276]);\n\t\tdebug(\"No Shinobu: %d\", game.flags[277]);\n\t\tdebug(\"Door Open: %d\", game.flags[278]);\n\t\tdebug(\"Mick: %d\", game.flags[279]);\n\t\tdebug(\"Gave 1st: %d\", game.flags[590]);\n\t\tdebug(\"Gave 2nd: %d\", game.flags[591]);\n\t\tdebug(\"Gave 3rd: %d\", game.flags[592]);\n\t\tdebug(\"Gave 4th: %d\", game.flags[593]);\n\t\tdebug(\"Gave 5th: %d\", game.flags[594]);\n\t\tdebug(\"-\");\n\t\t{\n\t\t\tint i;\n\t\t\tfor(i=0;i<player->ninventory;i++)\n\t\t\t\tdebug(\"%d\", player->inventory[i]);\n\t\t}\n\t\t*/\n\t//}\n\t\n\tdebug_draw();\n\tDrawDebugMarks();\n}\n\n\nvoid DrawBoundingBoxes()\n{\n\tObject *o;\n\tFOREACH_OBJECT(o)\n\t{\n\t\tif (o->onscreen || o == player)\n\t\t{\n\t\t\tuint32_t color;\n\t\t\t\n\t\t\tif (o == player)\n\t\t\t{\n\t\t\t\tcolor = 0xffff00;\n\t\t\t}\n\t\t\telse if (o->flags & FLAG_INVULNERABLE)\n\t\t\t{\n\t\t\t\tcolor = 0xffffff;\n\t\t\t}\n\t\t\telse if (o->flags & FLAG_SHOOTABLE)\n\t\t\t{\n\t\t\t\tcolor = 0x00ff00;\n\t\t\t}\n\t\t\telse if (o->flags & FLAG_SOLID_MUSHY)\n\t\t\t{\n\t\t\t\tcolor = 0xff0080;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcolor = 0xff0000;\n\t\t\t}\n\t\t\t\n\t\t\tAddDebugMark(o->Left(), o->Top(), o->Right(), o->Bottom(),\n\t\t\t\t\t\tDM_BOX, color>>16, (color>>8)&0xff, color&0xff);\n\t\t}\n\t}\n}\n\nvoid DrawAttrPoints()\n{\n\tObject *o;\n\tFOREACH_OBJECT(o)\n\t{\n\t\tdraw_pointlist(o, &sprites[o->sprite].block_l);\n\t\tdraw_pointlist(o, &sprites[o->sprite].block_r);\n\t\tdraw_pointlist(o, &sprites[o->sprite].block_u);\n\t\tdraw_pointlist(o, &sprites[o->sprite].block_d);\n\t}\n}\n\nstatic void draw_pointlist(Object *o, SIFPointList *points)\n{\n\tint xoff = (o->x >> CSF);\n\tint yoff = (o->y >> CSF);\n\t\n\tfor(int i=0;i<points->count;i++)\n\t{\n\t\tDebugPixel((xoff + points->point[i].x) << CSF, \\\n\t\t\t(yoff + points->point[i].y) << CSF, 255, 0, 255);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// debug text display debug() useful for reporting game vars etc\nvoid debug(const char *fmt, ...)\n{\nchar buffer[128];\nva_list ar;\n\n\tva_start(ar, fmt);\n\tvsnprintf(buffer, sizeof(buffer), fmt, ar);\n\tva_end(ar);\n\t\n\tDebugList.AddString(buffer);\n}\n\nvoid debug_draw(void)\n{\n\tfor(int i=0;;i++)\n\t{\n\t\tconst char *text = DebugList.StringAt(i);\n\t\tif (!text) break;\n\t\t\n\t\tint x = (SCREEN_WIDTH - 8) - GetFontWidth(text, 0, true);\n\t\tint y = 4 + (i * (GetFontHeight() + 1));\n\t\tfont_draw_shaded(x, y, text, 0, &greenfont);\n\t}\n}\n\nvoid debug_clear()\n{\n\tDebugList.MakeEmpty();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nextern char *object_names[];\t// from autogen'd objnames.cpp\n\n// given an object type returns the name of the object e.g. \"OBJ_TOROKO\"\nconst char *DescribeObjectType(int type)\n{\n\tif (type >= 0 && type < OBJ_LAST && object_names[type])\n\t\treturn stprintf(\"OBJ_%s(%d)\", object_names[type], type);\n\t\n\treturn stprintf(\"[Type %d]\", type);\n}\n\n// tries to convert a string, such as OBJ_TOROKO, into it's numeric type,\n// with a small bit of english-language intelligence.\nint ObjectNameToType(const char *name_in)\n{\n\t// if all characters are numeric they're specifying by number\n\t// so simply return the atoi\n\tfor(int i=0;;i++)\n\t{\n\t\tif (name_in[i] == 0)\n\t\t{\n\t\t\treturn atoi(name_in);\n\t\t}\n\t\t\n\t\tif (!isdigit(name_in[i])) break;\n\t}\n\t\n\tchar *name = strdup(name_in);\t// make string writeable\n\t\n\t// some string preprocessing\n\tfor(int i=0;name[i];i++)\n\t{\n\t\tif (name[i] == ' ')\n\t\t{\n\t\t\tname[i] = '_';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tname[i] = toupper(name[i]);\n\t\t}\n\t}\n\t\n\t// remove the \"OBJ_\" suffix if it's present\n\tconst char *searchstring = name;\n\tif (strbegin(name, \"OBJ_\"))\n\t\tsearchstring += 4;\n\t\n\t// search for it in the object_names table\n\tfor(int i=0;i<OBJ_LAST;i++)\n\t{\n\t\tif (object_names[i] && !strcmp(object_names[i], searchstring))\n\t\t{\n\t\t\tfree(name);\n\t\t\treturn i;\n\t\t}\n\t}\n\t\n\tstat(\"ObjectNameToType: couldn't find object 'OBJ_%s'\", searchstring);\n\tfree(name);\n\treturn -1;\n}\n\nconst char *DescribeDir(int dir)\n{\n\tswitch(dir)\n\t{\n\t\tcase LEFT: return \"LEFT\";\n\t\tcase RIGHT: return \"RIGHT\";\n\t\tcase UP: return \"UP\";\n\t\tcase DOWN: return \"DOWN\";\n\t\tcase CENTER: return \"CENTER\";\n\t\tdefault: return stprintf(\"[Invalid Direction %d]\", dir);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nconst char *strhex(int value)\n{\n\tif (value < 0)\n\t\treturn stprintf(\"-0x%x\", -value);\n\telse\n\t\treturn stprintf(\"0x%x\", value);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DrawDebugMarks(void)\n{\n    int i;\n    int x, y, x2, y2;\n    uchar r, g, b;\n\n    for(i=0;i<ndebugmarks;i++)\n    {\n        x = (debugmarks[i].x >> CSF) - (map.displayed_xscroll >> CSF);\n        y = (debugmarks[i].y >> CSF) - (map.displayed_yscroll >> CSF);\n        x2 = (debugmarks[i].x2 >> CSF) - (map.displayed_xscroll >> CSF);\n        y2 = (debugmarks[i].y2 >> CSF) - (map.displayed_yscroll >> CSF);\n\n        r = debugmarks[i].r;\n        g = debugmarks[i].g;\n        b = debugmarks[i].b;\n\n        switch(debugmarks[i].type)\n        {\n        case DM_PIXEL:\n            DrawPixel(x, y, r, g, b);\n            break;\n\n        case DM_CROSSHAIR:\n            DrawPixel(x, y, r, g, b);\n            DrawPixel(x+1, y, r, g, b);\n            DrawPixel(x-1, y, r, g, b);\n            DrawPixel(x, y+1, r, g, b);\n            DrawPixel(x, y-1, r, g, b);\n            break;\n\n        case DM_XLINE:\n            FillRect(x, 0, x, SCREEN_HEIGHT, r, g, b);\n            break;\n\n        case DM_YLINE:\n            FillRect(0, y, SCREEN_WIDTH, y, r, g, b);\n            break;\n\n        case DM_BOX:\n            DrawRect(x, y, x2, y2, r, g, b);\n            break;\n        }\n    }\n\n    ndebugmarks = 0;\n}\n\nvoid AddDebugMark(int x, int y, int x2, int y2, char type, uchar r, uchar g, uchar b)\n{\n\tif (ndebugmarks >= MAX_DEBUG_MARKS)\n\t\treturn;\n\t\n\tdebugmarks[ndebugmarks].x = x;\n\tdebugmarks[ndebugmarks].y = y;\n\tdebugmarks[ndebugmarks].x2 = x2;\n\tdebugmarks[ndebugmarks].y2 = y2;\n\tdebugmarks[ndebugmarks].r = r;\n\tdebugmarks[ndebugmarks].g = g;\n\tdebugmarks[ndebugmarks].b = b;\n\tdebugmarks[ndebugmarks].type = type;\n\tndebugmarks++;\n}\n\n// draw a pixel of the specified color at [x,y] in object coordinates\nvoid DebugPixel(int x, int y, uchar r, uchar g, uchar b)\n{\n\tAddDebugMark(x, y, 0, 0, DM_PIXEL, r, g, b);\n}\n\nvoid DebugCrosshair(int x, int y, uchar r, uchar g, uchar b)\n{\n\tAddDebugMark(x, y, 0, 0, DM_CROSSHAIR, r, g, b);\n}\n\nvoid crosshair(int x, int y)\n{\n\tdebugVline(x, 255, 0, 0);\n\tdebugHline(y, 0, 255, 0);\n}\n\nvoid DebugPixelNonCSF(int x, int y, uchar r, uchar g, uchar b) { DebugPixel(x<<CSF,y<<CSF,r,g,b); }\nvoid DebugCrosshairNonCSF(int x, int y, uchar r, uchar g, uchar b) { DebugCrosshair(x<<CSF,y<<CSF,r,g,b); }\n\nvoid debugVline(int x, uchar r, uchar g, uchar b)\n{\n\tAddDebugMark(x, 0, 0, 0, DM_XLINE, r, g, b);\n}\n\nvoid debugHline(int y, uchar r, uchar g, uchar b)\n{\n\tAddDebugMark(0, y, 0, 0, DM_YLINE, r, g, b);\n}\n\nvoid debugbox(int x1, int y1, int x2, int y2, uchar r, uchar g, uchar b)\n{\n\tAddDebugMark(x1, y1, x2, y2, DM_BOX, r, g, b);\n}\n\nvoid debugtile(int x, int y, uchar r, uchar g, uchar b)\n{\nint x1, y1, x2, y2;\n\n\tx *= (TILE_W << CSF);\n\ty *= (TILE_H << CSF);\n\t\n\tx1 = x; y1 = y;\n\tx2 = x1 + (TILE_W << CSF);\n\ty2 = y1 + (TILE_H << CSF);\n\tAddDebugMark(x1, y1, x2, y2, DM_BOX, r, g, b);\n}\n\n"
  },
  {
    "path": "debug.fdh",
    "content": "//hash:40743ca5\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//---------------------[referenced from debug.cpp]-------------------//\nbool game_save(Profile *p);\n\n\n/* located in playerstats.cpp */\n\n//---------------------[referenced from debug.cpp]-------------------//\nvoid AddXP(int xp, bool quiet);\n\n\n/* located in input.cpp */\n\n//---------------------[referenced from debug.cpp]-------------------//\nbool justpushed(int k);\n\n\n/* located in debug.cpp */\n\n//---------------------[referenced from debug.cpp]-------------------//\nvoid DrawDebug(void);\nvoid DrawBoundingBoxes();\nvoid DrawAttrPoints();\nstatic void draw_pointlist(Object *o, SIFPointList *points);\nvoid debug(const char *fmt, ...);\nvoid debug_draw(void);\nvoid debug_clear();\nconst char *DescribeObjectType(int type);\nint ObjectNameToType(const char *name_in);\nconst char *DescribeDir(int dir);\nconst char *strhex(int value);\nvoid DrawDebugMarks(void);\nvoid AddDebugMark(int x, int y, int x2, int y2, char type, uchar r, uchar g, uchar b);\nvoid DebugPixel(int x, int y, uchar r, uchar g, uchar b);\nvoid DebugCrosshair(int x, int y, uchar r, uchar g, uchar b);\nvoid crosshair(int x, int y);\nvoid DebugPixelNonCSF(int x, int y, uchar r, uchar g, uchar b);\nvoid DebugCrosshairNonCSF(int x, int y, uchar r, uchar g, uchar b);\nvoid debugVline(int x, uchar r, uchar g, uchar b);\nvoid debugHline(int y, uchar r, uchar g, uchar b);\nvoid debugbox(int x1, int y1, int x2, int y2, uchar r, uchar g, uchar b);\nvoid debugtile(int x, int y, uchar r, uchar g, uchar b);\n\n\n/* located in graphics/font.cpp */\n\n//---------------------[referenced from debug.cpp]-------------------//\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint GetFontHeight();\nint font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in sound/sound.cpp */\n\n//---------------------[referenced from debug.cpp]-------------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//---------------------[referenced from debug.cpp]-------------------//\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//---------------------[referenced from debug.cpp]-------------------//\nchar *stprintf(const char *fmt, ...);\nbool strbegin(const char *bigstr, const char *smallstr);\n\n"
  },
  {
    "path": "debug.h",
    "content": "\n#ifndef _DEBUG_H\n#define _DEBUG_H\n\n#define DM_PIXEL\t\t\t0\n#define DM_CROSSHAIR\t\t1\n#define DM_XLINE\t\t\t2\n#define DM_YLINE\t\t\t3\n#define DM_BOX\t\t\t\t4\n\n#endif\n"
  },
  {
    "path": "dirnames.h",
    "content": "\n\nextern const char *data_dir;\nextern const char *stage_dir;\nextern const char *pic_dir;\nextern const char *savegamename;\nextern const char *nxdata_dir;\n"
  },
  {
    "path": "endgame/CredReader.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"CredReader.h\"\n#include \"CredReader.fdh\"\n\n/*\nCREDITS FORMAT (credit.tsc)\n==============\n[T]X\tText T with casts.pbm image X [on left?]\n+X\t\tShift credits X spaces towards the RIGHT\n!X\t\tPlay music X\n-X\t\tParagraph X lines\nfX:Y\tJump to location Y if flag X is set\njX\t\tJump to location X\nlX\t\tLocation X\n~\t\tFade music to low volume\n/\t\t[end?]\n<<<\t\t[comment?]\n\n*/\n\nbool CredReader::ReadCommand(CredCommand *cmd)\n{\nint ch, i;\n\n\tmemset(cmd, 0, sizeof(CredCommand));\n\tcmd->type = -1;\n\t\n\tif (!data)\n\t{\n\t\tstaterr(\"CredReader: ReadNextCommand called but file is not loaded!\");\n\t\treturn 1;\n\t}\n\t\n\tfor(;;)\n\t{\n\t\tch = get();\n\t\tif (ch == '\\r' || ch == '\\n') continue;\n\t\telse break;\n\t}\n\t\n\tcmd->type = ch;\n\tswitch(ch)\n\t{\n\t\tcase CC_TEXT:\n\t\t{\n\t\t\tfor(i=0;i<sizeof(cmd->text)-1;i++)\n\t\t\t{\n\t\t\t\tcmd->text[i] = get();\n\t\t\t\tif (cmd->text[i] == ']' || !cmd->text[i]) break;\n\t\t\t}\n\t\t\t\n\t\t\tcmd->text[i] = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase CC_SET_XOFF:\n\t\tcase CC_BLANK_SPACE:\n\t\tcase CC_JUMP:\n\t\tcase CC_LABEL:\n\t\tcase CC_MUSIC:\n\t\tcase CC_FLAGJUMP:\n\t\tcase CC_FADE_MUSIC:\n\t\tcase CC_END:\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t{\n\t\t\tstaterr(\"CredReader: unknown command type '%c'\", ch);\n\t\t\tcmd->type = -1;\n\t\t\treturn 1;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (isdigit(peek()))\n\t\tcmd->parm = ReadNumber();\n\t\n\tif (get() == ':')\n\t\tcmd->parm2 = ReadNumber();\n\telse\n\t\tunget();\n\t\n\treturn 0;\n}\n\n\nint CredReader::ReadNumber()\n{\n\tint num = atoi(&data[dataindex]);\n\twhile(isdigit(get())) ;\n\tunget();\n\treturn num;\n}\n\n\n/*\nstruct CredCommand\n{\n\tint type;\n\tint parm1, parm2;\n\tchar text[80];\n\t\n\tvoid DumpContents();\n};\n*/\n\nvoid CredCommand::DumpContents()\n{\n\tstat(\"CC '%c': [%s]:%04d:%04d\", type, text, parm, parm2);\n}\n\nvoid CredReader::Rewind()\n{\n\tdataindex = 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nCredReader::CredReader()\n{\n\tdata = NULL;\n\tdataindex = 0;\n}\n\nbool CredReader::OpenFile(void)\n{\nchar fname[MAXPATHLEN];\n\n\tif (data) CloseFile();\n\tsprintf(fname, \"%s/Credit.tsc\", data_dir);\n\t\n\tdata = tsc_decrypt(fname, &datalen);\n\tif (!data)\n\t{\n\t\tstaterr(\"CredReader: couldn't open '%s'!\", fname);\n\t\treturn 1;\n\t}\n\t\n\tstat(\"CredReader: '%s' loaded ok!\", fname);\n\tdataindex = 0;\n\treturn 0;\n}\n\nvoid CredReader::CloseFile()\n{\n\tstat(\"CredReader: closing file\");\n\t\n\tif (data)\n\t{\n\t\tfree(data);\n\t\tdata = NULL;\n\t\tdatalen = 0;\n\t}\n}\n\nchar CredReader::get()\n{\n\tif (dataindex >= datalen)\n\t\treturn 0;\n\t\n\treturn data[dataindex++];\n}\n\nvoid CredReader::unget()\n{\n\tif (dataindex > 0)\n\t\tdataindex--;\n}\n\nchar CredReader::peek()\n{\n\tif (dataindex >= datalen)\n\t\treturn 0;\n\t\n\treturn data[dataindex];\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n/*\nbool OpenFile();\n\tvoid CloseFile();\n\tbool ReadNextLine(CredCommand *cmd);\n\t\nprivate:\n\tFILE *fFP;\n\t\n\t\nenum CC\n{\n\tCC_TEXT,\n\tCC_SET_XOFF,\n\tCC_BLANK_SPACE,\n\t\n\tCC_JUMP,\n\tCC_FLAGJUMP,\n\tCC_LABEL,\n\t\n\tCC_MUSIC,\n\tCC_FADE_MUSIC,\n\tCC_END\n};\n\n*/\n\n"
  },
  {
    "path": "endgame/CredReader.fdh",
    "content": "//hash:d0daead0\n//automatically generated by Makegen\n\n/* located in tsc.cpp */\n\n//--------------[referenced from endgame/CredReader.cpp]-------------//\nstatic int ReadNumber(const char **buf, const char *buf_end);\nchar *tsc_decrypt(const char *fname, int *fsize_out);\n\n\n/* located in common/stat.cpp */\n\n//--------------[referenced from endgame/CredReader.cpp]-------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "endgame/CredReader.h",
    "content": "\n#ifndef _CREDITS_READER_H\n#define _CREDITS_READER_H\n\nenum CC\n{\n\tCC_TEXT\t\t\t= '[',\n\tCC_SET_XOFF\t\t= '+',\n\tCC_BLANK_SPACE  = '-',\n\t\n\tCC_JUMP\t\t\t= 'j',\n\tCC_FLAGJUMP\t\t= 'f',\n\tCC_LABEL\t\t= 'l',\n\t\n\tCC_MUSIC\t\t= '!',\n\tCC_FADE_MUSIC\t= '~',\n\tCC_END\t\t\t= '/'\n};\n\n// represents a command from the .tsc\nstruct CredCommand\n{\n\tint type;\n\tint parm, parm2;\n\tchar text[80];\n\t\n\tvoid DumpContents();\n};\n\nclass CredReader\n{\npublic:\n\tCredReader();\n\tbool OpenFile();\n\tvoid CloseFile();\n\tbool ReadCommand(CredCommand *cmd);\n\tvoid Rewind();\n\t\nprivate:\n\tint ReadNumber();\n\tchar get();\n\tvoid unget();\n\tchar peek();\n\n\tchar *data;\n\tint dataindex, datalen;\n};\n\n\n#endif\n"
  },
  {
    "path": "endgame/credits.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"credits.h\"\n#include \"credits.fdh\"\n\n#define MARGIN\t\t\t48\n#define SCREEN_Y(Y)\t\t( (Y) - (scroll_y >> CSF) )\n#define TEXT_SPACING\t5\t// X-spacing between letters\n\t\nCredits *credits = NULL;\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool Credits::Init()\n{\n\tif (script.OpenFile()) return 1;\n\tif (bigimage.Init()) return 1;\n\tReplay::end_record();\n\t\n\tspawn_y = (SCREEN_HEIGHT + 8);\n\tscroll_y = 0 << CSF;\n\t\n\txoffset = 0;\n\troll_running = true;\n\t\n\tlines_out = lines_vis = 0;\n\t\n\tfirstline = NULL;\n\tlastline = NULL;\n\t\n\treturn 0;\n}\n\nCredits::~Credits()\n{\n\tscript.CloseFile();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Credits::Tick()\n{\n\t/*debug(\"scroll_y: %d\", scroll_y>>CSF);\n\tdebug(\"spawn_y: %d\", spawn_y);\n\tdebug(\"scr_spawn_y: %d\", SCREEN_Y(spawn_y));\n\tdebug(\"trigger: %d\", SCREEN_HEIGHT+MARGIN);\n\tdebug(\"\");*/\n\t/*debug(\"imgno: %d\", bigimage.imgno);\n\tdebug(\"state: %d\", bigimage.state);\n\tdebug(\"imagex: %d\", bigimage.imagex);*/\n\t\n\tif (roll_running || SCREEN_Y(spawn_y) >= (SCREEN_HEIGHT + 8))\n\t{\n\t\tscroll_y += 0x100;\n\t}\n\t\n\twhile(roll_running && SCREEN_Y(spawn_y) < (SCREEN_HEIGHT + MARGIN))\n\t{\n\t\tRunNextCommand();\n\t}\n\t\n\tif (player)\n\t{\n\t\tplayer->hide = true;\n\t\tplayer->dead = true;\t// should pretty much completely disable HandlePlayer()\n\t}\n\t\n\tgame_tick_normal();\n\tbigimage.Draw();\n\tDraw();\n}\n\n\nvoid Credits::RunNextCommand()\n{\nCredCommand cmd;\n\n\tif (script.ReadCommand(&cmd))\n\t{\n\t\tconsole.Print(\"script.ReadCommand failed: credits terminated\");\n\t\troll_running = false;\n\t\treturn;\n\t}\n\t\n\tcmd.DumpContents();\n\t\n\tswitch(cmd.type)\n\t{\n\t\tcase CC_TEXT:\n\t\t{\n\t\t\tCredLine *line = NewLine();\n\t\t\t\n\t\t\tmaxcpy(line->text, cmd.text, sizeof(line->text));\n\t\t\tline->image = cmd.parm;\n\t\t\tline->x = xoffset;\n\t\t\tline->y = spawn_y;\n\t\t\t\n\t\t\t// the last line is supposed to be centered--slightly\n\t\t\t// varying font sizes can lead to it being a little bit off\n\t\t\tif (strstr(line->text, \"The End\"))\n\t\t\t{\n\t\t\t\tline->x = (SCREEN_WIDTH / 2) - (GetFontWidth(line->text, TEXT_SPACING) / 2);\n\t\t\t}\n\t\t\t\n\t\t\tspawn_y += 1;\n\t\t\tlines_out++;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase CC_BLANK_SPACE:\n\t\t\tspawn_y += cmd.parm / 2;\n\t\tbreak;\n\t\t\n\t\tcase CC_SET_XOFF:\n\t\t\txoffset = cmd.parm;\n\t\tbreak;\n\t\t\n\t\tcase CC_FLAGJUMP:\n\t\t\tif (game.flags[cmd.parm])\n\t\t\t\tJump(cmd.parm2);\n\t\tbreak;\n\t\t\n\t\tcase CC_JUMP:\n\t\t\tJump(cmd.parm);\n\t\tbreak;\n\t\t\n\t\tcase CC_LABEL:\n\t\tbreak;\n\t\t\n\t\tcase CC_MUSIC:\t\t music(cmd.parm); break;\n\t\tcase CC_FADE_MUSIC:\t org_fade(); break;\n\t\t\n\t\tcase CC_END:\t\t roll_running = false; break;\n\t\t\n\t\tdefault:\n\t\t\tconsole.Print(\"Unhandled command '%c'; credits terminated\", cmd.type);\n\t\t\troll_running = false;\n\t\tbreak;\n\t}\n}\n\nbool Credits::Jump(int label)\n{\nCredCommand cmd;\nbool tried_rewind = false;\n\n\tstat(\"- Jump to label %04d\", label);\n\t\n\tfor(;;)\n\t{\n\t\tif (script.ReadCommand(&cmd) || cmd.type == CC_END)\n\t\t{\t// I think all the jumps in the original credits are forwards,\n\t\t\t// so only try looking back if there's a problem finding the label.\n\t\t\tif (!tried_rewind)\n\t\t\t{\n\t\t\t\tscript.Rewind();\n\t\t\t\ttried_rewind = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconsole.Print(\"Missing label %04d; credits terminated\", label);\n\t\t\t\troll_running = false;\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (cmd.type == CC_LABEL && cmd.parm == label)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool Credits::DrawLine(CredLine *line)\n{\n\tint x = line->x;\n\tint y = SCREEN_Y(line->y);\n\tif (y < -MARGIN) return true;\t// line can be deleted now\n\t\n\tif (line->image)\n\t{\n\t\tdraw_sprite(x - 24, y - 8, SPR_CASTS, line->image);\n\t\t//DrawBox(x, y, x+GetFontWidth(line->text, TEXT_SPACING), y+8,  56, 0, 0);\n\t}\n\t\n\t//int font_draw(int x, int y, const char *string, int font_spacing)\n\t//DrawRect(x, y, x+63, y+8, 128, 0, 0);\n\tfont_draw(x, y, line->text, TEXT_SPACING);\n\t\n\treturn false;\n}\n\n\nvoid Credits::Draw()\n{\nCredLine *line, *next;\n\n\tline = firstline;\n\twhile(line)\n\t{\n\t\tnext = line->next;\n\t\t\n\t\tif (DrawLine(line))\n\t\t{\n\t\t\tRemoveLine(line);\n\t\t\tdelete line;\n\t\t}\n\t\t\n\t\tline = next;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nCredLine *Credits::NewLine()\n{\n\treturn AddLine(new CredLine);\n}\n\nCredLine *Credits::AddLine(CredLine *line)\n{\n\tline->prev = NULL;\n\tline->next = firstline;\n\t\n\tif (firstline)\n\t{\n\t\tfirstline->prev = line;\n\t\tfirstline = line;\n\t}\n\telse\n\t{\n\t\tfirstline = lastline = line;\n\t}\n\t\n\tlines_vis++;\n\treturn line;\n}\n\nvoid Credits::RemoveLine(CredLine *line)\n{\n\tif (line->next) line->next->prev = line->prev;\n\tif (line->prev) line->prev->next = line->next;\n\tif (line == firstline) firstline = firstline->next;\n\tif (line == lastline) lastline = lastline->next;\n\tlines_vis--;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nenum BIStates\n{\n\tBI_CLEAR,\n\tBI_SLIDE_IN,\n\tBI_SLIDE_OUT,\n\tBI_HOLD\n};\n\nbool BigImage::Init()\n{\nchar fname[MAXPATHLEN];\n\n\timagex = 0;\n\timgno = 0;\n\tstate = BI_CLEAR;\n\tmemset(images, 0, sizeof(images));\n\t\n\t// load any images present\n\tfor(int i=0;i<MAX_BIGIMAGES;i++)\n\t{\n\t\tsprintf(fname, \"%s/credit%02d.bmp\", pic_dir, i);\n\t\tif (file_exists(fname))\n\t\t{\n\t\t\timages[i] = NXSurface::FromFile(fname, false);\n\t\t\tif (!images[i])\n\t\t\t\tstaterr(\"BigImage::Init: image '%s' exists but seems corrupt!\", fname);\n\t\t\telse\n\t\t\t\tstat(\"BigImage: loaded %s ok\", fname);\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n\nBigImage::~BigImage()\n{\n\tfor(int i=0;i<MAX_BIGIMAGES;i++)\n\t{\n\t\tif (images[i])\n\t\t{\n\t\t\tstaterr(\"BigImage: freeing image %d\", i);\n\t\t\tdelete images[i];\n\t\t\timages[i] = NULL;\n\t\t}\n\t}\n}\n\n\nvoid BigImage::Set(int num)\n{\n\tif (images[num])\n\t{\n\t\timgno = num;\n\t\timagex = -images[num]->Width();\n\t\tstate = BI_SLIDE_IN;\n\t}\n\telse\n\t{\n\t\tstaterr(\"BigImage::Set: invalid image number %d\", num);\n\t\tstate = BI_CLEAR;\n\t}\n}\n\nvoid BigImage::Clear()\n{\n\tstate = BI_SLIDE_OUT;\n}\n\nvoid BigImage::Draw()\n{\n\t#define IMAGE_SPEED\t\t32\n\t\n\tswitch(state)\n\t{\n\t\tcase BI_SLIDE_IN:\n\t\t{\n\t\t\timagex += IMAGE_SPEED;\n\t\t\tif (imagex > 0)\n\t\t\t{\n\t\t\t\timagex = 0;\n\t\t\t\tstate = BI_HOLD;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BI_SLIDE_OUT:\n\t\t{\n\t\t\timagex -= IMAGE_SPEED;\n\t\t\tif (imagex < -images[imgno]->Width())\n\t\t\t\tstate = BI_CLEAR;\n\t\t}\n\t}\n\t\n\t// take up any unused space with blue\n\tif (state != BI_HOLD)\n\t\tFillRect(0, 0, SCREEN_WIDTH/2, SCREEN_HEIGHT, DK_BLUE);\n\t\n\tif (state != BI_CLEAR)\n\t\tDrawSurface(images[imgno], imagex, 0);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool credit_init(int parameter)\n{\n\tcredits = new Credits;\n\tif (credits->Init())\n\t{\n\t\tstaterr(\"Credits initilization failed\");\n\t\treturn 1;\n\t}\n\t\n\treturn 0;\n}\n\nvoid credit_close()\n{\n\tdelete credits;\n\tcredits = NULL;\n}\n\nvoid credit_tick()\n{\n\tif (credits)\n\t\tcredits->Tick();\n}\n\nvoid credit_set_image(int imgno)\n{\n\tif (credits)\n\t\tcredits->bigimage.Set(imgno);\n}\n\nvoid credit_clear_image()\n{\n\tif (credits)\n\t\tcredits->bigimage.Clear();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n\n\n"
  },
  {
    "path": "endgame/credits.fdh",
    "content": "//hash:2dcff26e\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//----------------[referenced from endgame/credits.cpp]--------------//\nvoid game_tick_normal(void);\n\n\n/* located in tsc.cpp */\n\n//----------------[referenced from endgame/credits.cpp]--------------//\nvoid Clear();\n\n\n/* located in endgame/credits.cpp */\n\n//----------------[referenced from endgame/credits.cpp]--------------//\nbool credit_init(int parameter);\nvoid credit_close();\nvoid credit_tick();\nvoid credit_set_image(int imgno);\nvoid credit_clear_image();\n\n\n/* located in graphics/font.cpp */\n\n//----------------[referenced from endgame/credits.cpp]--------------//\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in sound/sound.cpp */\n\n//----------------[referenced from endgame/credits.cpp]--------------//\nvoid music(int songno);\n\n\n/* located in sound/org.cpp */\n\n//----------------[referenced from endgame/credits.cpp]--------------//\nvoid org_fade(void);\n\n\n/* located in common/stat.cpp */\n\n//----------------[referenced from endgame/credits.cpp]--------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//----------------[referenced from endgame/credits.cpp]--------------//\nvoid maxcpy(char *dst, const char *src, int maxlen);\nbool file_exists(const char *fname);\n\n"
  },
  {
    "path": "endgame/credits.h",
    "content": "\n#ifndef _CREDITS_H\n#define _CREDITS_H\n\n#define MAX_BIGIMAGES\t\t20\n#define CRED_MAX_TEXT\t\t80\n#include \"CredReader.h\"\n\n// a currently displayed line of text\nstruct CredLine\n{\n\tchar text[CRED_MAX_TEXT];\n\tint image;\n\tint x, y;\n\t\n\tCredLine *next, *prev;\n};\n\nclass BigImage\n{\npublic:\n\tbool Init();\n\t~BigImage();\n\t\n\tvoid Set(int num);\n\tvoid Clear();\n\tvoid Draw();\n\t\nprivate:\n\tint imagex, state;\n\tint imgno;\n\tNXSurface *images[MAX_BIGIMAGES];\n};\n\n\nclass Credits\n{\npublic:\n\tbool Init();\n\tvoid Tick();\n\t~Credits();\n\t\n\tBigImage bigimage;\t// current \"SIL\" big left-hand image\n\t\nprivate:\n\tvoid RunNextCommand();\n\tbool Jump(int label);\n\t\n\tCredLine *NewLine();\n\tCredLine *AddLine(CredLine *line);\n\tvoid RemoveLine(CredLine *line);\n\t\n\tvoid Draw();\n\tbool DrawLine(CredLine *line);\n\t\n\t\n\tint spawn_y;\t\t// position of next line relative to top of roll\n\tint scroll_y;\t\t// CSFd roll position\n\t\n\tint xoffset;\t\t// x position of next line\n\t\n\t// turns off scrolling and further script execution when \"/\" command hit at end\n\tbool roll_running;\n\t\n\t\n\tint lines_out;\t\t// debug...\n\tint lines_vis;\t\t// ...counters\n\t\n\tCredReader script;\n\tCredLine *firstline, *lastline;\n};\n\n\nbool credit_init(int parameter);\nvoid credit_tick();\nvoid credit_set_image(int imgno);\nvoid credit_clear_image();\nvoid credit_close();\n\n#endif\n\n\n\n"
  },
  {
    "path": "endgame/island.cpp",
    "content": "\n// \"XX1\" island-crashes cutscene from \"good ending\"\n// and island-looks-like-it-gonna-crash but it's ok from secret ending\n#include \"../nx.h\"\n#include \"island.fdh\"\n\nstatic struct\n{\n\tint x, y;\n\tint timer, scene_length;\n\tint speed;\n\tbool survives;\n\t\n\tint scene_x, scene_y;\n\tint trees_x, trees_y;\n} island;\n\n\nbool island_init(int parameter)\n{\n\tmemset(&island, 0, sizeof(island));\n\t\n\tisland.timer = 0;\n\tisland.speed = 0x33;\n\tisland.survives = parameter;\n\tisland.scene_length = (!island.survives) ? 900 : 750;\n\t\n\tisland.scene_x = (SCREEN_WIDTH / 2) - (sprites[SPR_ISLAND_SCENE].w / 2);\n\tisland.scene_y = (SCREEN_HEIGHT / 2) - (sprites[SPR_ISLAND_SCENE].h / 2);\n\t\n\tisland.trees_x = island.scene_x;\n\tisland.trees_y = (island.scene_y + sprites[SPR_ISLAND_SCENE].h) - sprites[SPR_ISLAND_TREES].h;\n\t\n\tisland.x = (SCREEN_WIDTH / 2) - (sprites[SPR_ISLAND].w / 2);\n\tisland.y = (island.scene_y - sprites[SPR_ISLAND].h) << CSF;\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid island_tick()\n{\n\tif (island.timer >= island.scene_length)\n\t{\n\t\tgame.setmode(GM_NORMAL);\n\t\treturn;\n\t}\n\t\n\tif (island.survives)\n\t{\n\t\tswitch(island.timer)\n\t\t{\n\t\t\tcase 350: island.speed = 0x19; break;\n\t\t\tcase 500: island.speed = 0x0C; break;\n\t\t\tcase 600: island.speed = 0; break;\n\t\t}\n\t}\n\t\n\tisland.y += island.speed;\n\tisland.timer++;\n\t\n\t// draw the scene\n\tClearScreen(BLACK);\n\t\n\tset_clip_rect(island.scene_x, island.scene_y, \\\n\t\t\t\tsprites[SPR_ISLAND_SCENE].w, sprites[SPR_ISLAND_SCENE].h);\n\t\n\tdraw_sprite(island.scene_x, island.scene_y, SPR_ISLAND_SCENE);\n\tdraw_sprite(island.x, (island.y>>CSF), SPR_ISLAND);\n\t\n\tdraw_sprite(island.trees_x, island.trees_y, SPR_ISLAND_TREES);\n\t\n\tclear_clip_rect();\n\t\n\tif (player->equipmask & EQUIP_NIKUMARU)\n\t\tniku_draw(game.counter);\n}\n\n\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "endgame/island.fdh",
    "content": "//hash:a7d258f5\n//automatically generated by Makegen\n\n/* located in statusbar.cpp */\n\n//----------------[referenced from endgame/island.cpp]---------------//\nvoid niku_draw(int value, bool force_white);\n\n\n/* located in endgame/island.cpp */\n\n//----------------[referenced from endgame/island.cpp]---------------//\nbool island_init(int parameter);\nvoid island_tick();\n\n"
  },
  {
    "path": "endgame/island.h",
    "content": "\n#ifndef _ISLAND_H\n#define _ISLAND_H\n\nbool island_init(int survives);\nvoid island_tick();\n\n\n#endif\n"
  },
  {
    "path": "endgame/misc.fdh",
    "content": "//hash:e401a413\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//-----------------[referenced from endgame/misc.cpp]----------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in ai/ai.cpp */\n\n//-----------------[referenced from endgame/misc.cpp]----------------//\nvoid randblink(Object *o, int blinkframe, int blinktime, int prob);\n\n\n/* located in endgame/misc.cpp */\n\n//-----------------[referenced from endgame/misc.cpp]----------------//\nvoid ai_cloud_spawner(Object *o);\nvoid ai_cloud(Object *o);\nvoid ai_balrog_flying(Object *o);\nvoid aftermove_balrog_passenger(Object *o);\nvoid ai_balrog_medic(Object *o);\nvoid ai_gaudi_patient(Object *o);\nvoid ai_baby_puppy(Object *o);\nvoid ai_turning_human(Object *o);\nvoid ai_ahchoo(Object *o);\nvoid ai_misery_wind(Object *o);\nvoid ai_the_cast(Object *o);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from endgame/misc.cpp]----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "endgame/misc_end.cpp",
    "content": "\n#include \"../ai/stdai.h\"\n#include \"misc.fdh\"\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_CLOUD_SPAWNER, ai_cloud_spawner);\n\tONTICK(OBJ_CLOUD, ai_cloud);\n\t\n\tONTICK(OBJ_BALROG_FLYING, ai_balrog_flying);\n\tAFTERMOVE(OBJ_BALROG_PASSENGER, aftermove_balrog_passenger);\n\n\tONTICK(OBJ_BALROG_MEDIC, ai_balrog_medic);\n\tONTICK(OBJ_GAUDI_PATIENT, ai_gaudi_patient);\n\t\n\tONTICK(OBJ_BABY_PUPPY, ai_baby_puppy);\n\t\n\tONTICK(OBJ_TURNING_HUMAN, ai_turning_human);\n\tONTICK(OBJ_BUILDING_FAN, ai_animate2);\n\tONTICK(OBJ_AHCHOO, ai_ahchoo);\n\n\tONTICK(OBJ_MISERY_WIND, ai_misery_wind);\n\tONTICK(OBJ_THE_CAST, ai_the_cast);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// clouds should be layered parallax, according to their size & speed.\n// the clouds are behind all the other objects (player, etc).\nstatic int cloud_sprites[] = { SPR_CLOUD_1, SPR_CLOUD_2, SPR_CLOUD_3, SPR_CLOUD_4 };\n\n\n// makes the clouds from the falling scene (good ending)\nvoid ai_cloud_spawner(Object *o)\n{\nObject *cloud;\nint type;\n\n\tif (o->state == 0)\n\t{\n\t\tfor(int i=0;i<4;i++)\n\t\t{\n\t\t\to->cloud.layers[i] = CreateObject(0, 0, OBJ_NULL);\n\t\t\to->cloud.layers[i]->PushBehind(lowestobject);\n\t\t}\n\t\t\n\t\to->state = 1;\n\t}\n\t\n\tif (--o->timer < 0)\n\t{\n\t\to->timer = random(0, 16);\n\t\ttype = random(0, 3);\n\t\t\n\t\tcloud = CreateObject(0, 0, OBJ_CLOUD);\n\t\tcloud->sprite = cloud_sprites[type];\n\t\t\n\t\tif (o->dir == LEFT)\t\t// vertical clouds (falling)\n\t\t{\n\t\t\tcloud->x = o->x + MAPY(random(-10, 10));\n\t\t\tcloud->y = o->y;\n\t\t\tcloud->yinertia = -(0x1000 >> type);\t// each type half as fast as the last\n\t\t}\n\t\telse\t\t\t\t\t// horizontal clouds (flying with Kazuma)\n\t\t{\n\t\t\tcloud->x = o->x;\n\t\t\tcloud->y = o->y + MAPY(random(-7, 7));\n\t\t\tcloud->xinertia = -(0x400 >> type);\n\t\t}\n\t\t\n\t\t// cut down on the amount of time Kazuma is flying\n\t\t// against plain blue when he appears in the credits\n\t\tif (game.mode == GM_CREDITS && o->state < 10)\n\t\t{\n\t\t\tcloud->x -= (128 << CSF);\n\t\t\to->state++;\n\t\t}\n\t\t\n\t\tcloud->PushBehind(o->cloud.layers[type]);\n\t}\n\n}\n\nvoid ai_cloud(Object *o)\n{\n\tif (o->x < -o->Width() || o->y < -o->Height())\n\t\to->Delete();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// Balrog flying in clouds with player and Curly in best-ending.\nvoid ai_balrog_flying(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->animtimer = 0;\n\t\t\t\n\t\t\to->ymark = o->y - 0x2000;\n\t\t\to->xmark = o->x - 0xC00;\n\t\t\to->yinertia = 0;\n\t\t\t\n\t\t\tCreateObject(0, 0, OBJ_BALROG_PASSENGER, 0, 0, LEFT, o)->state = 1;\n\t\t\tCreateObject(0, 0, OBJ_BALROG_PASSENGER, 0, 0, RIGHT, o)->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(4, 0, 1);\n\t\t\t\n\t\t\to->xinertia += (o->x < o->xmark) ? 0x08 : -0x08;\n\t\t\to->yinertia += (o->y < o->ymark) ? 0x08 : -0x08;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// fly away\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->xinertia = -0x400;\n\t\t\to->yinertia = 0x200;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tANIMATE(2, 0, 1);\n\t\t\t\n\t\t\to->xinertia += 0x10;\n\t\t\to->yinertia -= 0x08;\n\t\t\t\n\t\t\tif (o->x > 0x78000)\n\t\t\t{\n\t\t\t\to->xinertia = 0;\n\t\t\t\to->yinertia = 0;\n\t\t\t\to->state = 22;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n// player/curly when rescued by Balrog during best-ending\nvoid aftermove_balrog_passenger(Object *o)\n{\n\tif (!o->linkedobject)\n\t{\n\t\to->Delete();\n\t\treturn;\n\t}\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// being rescued from Seal Chamber\n\t\t{\n\t\t\tif (o->dir == RIGHT)\n\t\t\t{\n\t\t\t\to->sprite = player->sprite;\n\t\t\t\to->frame = 4;\n\t\t\t\t\n\t\t\t\to->x = o->linkedobject->x - (2<<CSF);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->sprite = SPR_CURLY;\n\t\t\t\to->frame = 7;\n\t\t\t\t\n\t\t\t\to->x = o->linkedobject->x + (26<<CSF);\n\t\t\t}\n\t\t\t\n\t\t\to->y = o->linkedobject->y + (14<<CSF);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// flying in clouds\n\t\t{\n\t\t\tif (o->dir == RIGHT)\n\t\t\t{\n\t\t\t\to->sprite = SPR_MYCHAR;\n\t\t\t\to->frame = 12;\n\t\t\t\t\n\t\t\t\to->x = o->linkedobject->x - (15<<CSF);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->sprite = SPR_CURLY;\n\t\t\t\to->frame = 18;\n\t\t\t\t\n\t\t\t\to->x = o->linkedobject->x - (4<<CSF);\n\t\t\t}\n\t\t\t\n\t\t\to->y = o->linkedobject->y - (23<<CSF);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// seen in credits\nvoid ai_balrog_medic(Object *o)\n{\n\to->frame = 0;\n\trandblink(o, 1, 12);\n}\n\nvoid ai_gaudi_patient(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// sitting\n\t\t{\n\t\t\to->frame = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// lying\n\t\t{\n\t\t\to->frame = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// hurting\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->frame = 2;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tANIMATE(10, 2, 3);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_baby_puppy(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->animtimer = random(0, 6);\t// desync with other puppies\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tANIMATE(6, 0, 1);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_turning_human(Object *o)\n{\nObject *ahchoo;\n\t\n\t// LEFT = Itoh\n\t// RIGHT = Sue\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->x += (16<<CSF);\n\t\t\to->y -= (16<<CSF);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (++o->timer > 80)\n\t\t\t{\n\t\t\t\to->state = 10;\n\t\t\t\to->timer = 0;\n\t\t\t}\n\t\t\t\n\t\t\t// before machine turns on they both blink,\n\t\t\t// at slightly different times\n\t\t\tif (o->dir == LEFT)\n\t\t\t{\n\t\t\t\tif (o->timer == 30) o->frame = 1;\n\t\t\t\tif (o->timer == 40) o->frame = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (o->timer == 50) o->frame = 1;\n\t\t\t\tif (o->timer == 60) o->frame = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// being transformed\n\t\t{\n\t\t\to->timer++;\n\t\t\to->frame = (o->timer & 2) ? 2 : 3;\n\t\t\t\n\t\t\tif (o->timer > 50)\n\t\t\t{\n\t\t\t\to->state = 20;\n\t\t\t\to->frame = 4;\n\t\t\t\t\n\t\t\t\t// wait for slightly different times before falling\n\t\t\t\to->timer = (o->dir == LEFT) ? 40 : 60;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// waiting after transformation\n\t\t{\n\t\t\tif (--o->timer < 0)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->state = 30;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// falling\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (++o->timer > 50)\t// sneeze\n\t\t\t{\n\t\t\t\to->state = 40;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 6;\t// head-back to sneeze\n\t\t\t\t\n\t\t\t\t// create sneeze. Itoh is taller.\n\t\t\t\tint yoffs = (o->dir == LEFT) ? (16<<CSF) : (8<<CSF);\n\t\t\t\tahchoo = CreateObject(o->x, o->y - yoffs, OBJ_AHCHOO);\n\t\t\t\tahchoo->linkedobject = o;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// sneezing\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 30)\n\t\t\t\to->frame = 7;\n\t\t\t\n\t\t\tif (o->timer > 40)\n\t\t\t\to->state = 50;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 50:\t// turn back to mimiga...\n\t\t{\n\t\t\to->state = 41;\n\t\t\to->timer = 0;\n\t\t\to->frame = 0;\n\t\t}\n\t\tcase 51:\t// ..and blink\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\tif (o->timer == 30) o->frame = 1;\n\t\t\tif (o->timer == 40) o->frame = 0;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_ahchoo(Object *o)\n{\n\tif (!o->linkedobject)\n\t{\n\t\to->Delete();\n\t\treturn;\n\t}\n\t\n\to->timer++;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// rise up \"ah...\"\n\t\t{\n\t\t\tif (o->timer < 4)\n\t\t\t\to->y -= (2 << CSF);\n\t\t\t\n\t\t\tif (o->linkedobject->frame == 7)\t// sneezing frame\n\t\t\t{\n\t\t\t\to->frame = 1;\t// \"choo!\"\n\t\t\t\to->state = 1;\n\t\t\t\to->xmark = o->x;\n\t\t\t\to->ymark = o->y;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// shaking \"choo!\"\n\t\t{\n\t\t\tif (o->timer < 48)\n\t\t\t{\t// shake\n\t\t\t\to->x = o->xmark + (random(-1, 1) << CSF);\n\t\t\t\to->y = o->ymark + (random(-1, 1) << CSF);\n\t\t\t}\n\t\t\telse\n\t\t\t{\t// return to original pos\n\t\t\t\to->xmark = o->x;\n\t\t\t\to->ymark = o->y;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 70)\n\t\t\t\to->Delete();\n\t\t}\n\t\tbreak;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ai_misery_wind(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\tANIMATE(6, 0, 1);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// look at screen\n\t\t{\n\t\t\tANIMATE(6, 3, 4);\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// 000 - King\n// 100 - Toroko\n// 200 - Kazuma\n// 300 - Sue\n// 400 - Momorin\n// 500 - Booster\n// 600 - Jenka\n//\n// 700 - Nurse Hasumi\n// 800 - Dr Gero\n// 900 - Balrog\n// 1000 - Curly\n// 1100 - Misery\n// 1200 - Malco\n// 1300 - Hermit Gunsmith\nvoid ai_the_cast(Object *o)\n{\nconst static struct\n{\n\tint sprite;\n\tint fallframe, standframe;\n\tint dir;\n\tbool tall;\n}\ncast_data[] =\n{\n\tSPR_KING,\t\t6, 0, RIGHT, false,\n\tSPR_TOROKO,\t\t2, 0, RIGHT, false,\n\tSPR_KAZUMA,\t\t4, 0, RIGHT, true,\n\tSPR_SUE, \t\t4, 0, RIGHT, false,\n\tSPR_MOMORIN, \t2, 0, LEFT, true,\n\tSPR_PROFESSOR_BOOSTER, 8, 0, LEFT, false,\n\tSPR_JENKA,\t\t0, 0, LEFT, false,\n\t\n\tSPR_NURSE_HASUMI,\t 1, 0, RIGHT, false,\n\tSPR_DR_GERO,\t\t 1, 0, RIGHT, false,\n\tSPR_BALROG_CAST,\t 1, 0, RIGHT, true,\n\tSPR_CURLY,\t\t\t 1, 0, RIGHT, false,\n\tSPR_MISERY,\t\t\t 0, 2, LEFT, false,\n\tSPR_MALCO_BROKEN,\t 1, 0, LEFT, true,\n\tSPR_HERMIT_GUNSMITH, 1, 0, LEFT, true\n};\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->dirparam /= 100;\n\t\t\tif (o->dirparam >= 14) o->dirparam = 0;\n\t\t\t\n\t\t\to->sprite = cast_data[o->dirparam].sprite;\n\t\t\to->frame = cast_data[o->dirparam].fallframe;\n\t\t\to->dir = cast_data[o->dirparam].dir;\n\t\t\t\n\t\t\tif (cast_data[o->dirparam].tall)\n\t\t\t\to->y -= (4<<CSF);\n\t\t\t\n\t\t\t// create King's sword\n\t\t\tif (o->sprite == SPR_KING)\n\t\t\t{\n\t\t\t\tObject *sword;\n\t\t\t\tsword = CreateObject(o->x, o->y, OBJ_KINGS_SWORD);\n\t\t\t\tsword->linkedobject = o;\n\t\t\t\tsword->carry.flip = true;\n\t\t\t}\n\t\t\t\n\t\t\t// Balrog goes behind Curly\n\t\t\tif (o->sprite == SPR_BALROG_CAST)\n\t\t\t{\n\t\t\t\to->PushBehind(lowestobject);\n\t\t\t}\n\t\t\t\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->yinertia += 0x40;\n\t\t\tLIMITY(0x5ff);\n\t\t\t\n\t\t\tif (o->blockd)\n\t\t\t{\n\t\t\t\to->frame = cast_data[o->dirparam].standframe;\n\t\t\t\to->state = 2;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "extract/crc.cpp",
    "content": "\n#include <stdio.h>\n#include <stdint.h>\n#include <string.h>\n#include \"crc.fdh\"\n\nstatic uint32_t CRC_Table[256];\nstatic const uint32_t poly = 0x04c11db7;\n\nvoid crc_init(void)\n{\nint i, j;\n\t\n\tfor(i=0;i<256;i++)\n\t{\n\t\tCRC_Table[i] = reflect(i, 8) << 24;\n\t\t\n\t\tfor(j=0;j<8;j++)\n\t\t\tCRC_Table[i] = (CRC_Table[i] << 1) ^ ((CRC_Table[i] & (1 << 31)) ? poly : 0);\n\t\t\n\t\tCRC_Table[i] = reflect(CRC_Table[i], 32);\n\t}\n}\n\nuint32_t crc_calc(uint8_t *buf, uint32_t size)\n{\nuint32_t crc = 0xFFFFFFFF;\n\t\n\twhile(size)\n\t{\n\t\tcrc = (crc >> 8) ^ CRC_Table[(crc & 0xFF) ^ *buf++];\n\t\tsize--;\n\t}\n\t\n\treturn (crc ^ 0xFFFFFFFF);\n}\n\n\nstatic uint32_t reflect(uint32_t value, int size)\n{\nuint32_t newbits = 0;\nint i;\n\n\tfor(i=1;i<=size;i++)\n\t{\n\t\tif (value & 1)\n\t\t\tnewbits |= (1 << (size - i));\n\t\t\n\t\tvalue >>= 1;\n\t}\n\n\treturn newbits;\n}\n\n\n"
  },
  {
    "path": "extract/crc.fdh",
    "content": "//hash:6c29cc36\n//automatically generated by Makegen\n\n/* located in extract/crc.cpp */\n\n//------------------[referenced from extract/crc.cpp]----------------//\nvoid crc_init(void);\nuint32_t crc_calc(uint8_t *buf, uint32_t size);\nstatic uint32_t reflect(uint32_t value, int size);\n\n"
  },
  {
    "path": "extract/extract.cpp",
    "content": "\n#include <SDL/SDL.h>\n#include <stdio.h>\n#include <stdint.h>\n#include <string.h>\n#include <stdlib.h>\n#include \"../graphics/safemode.h\"\n#include \"extract.fdh\"\n\nusing safemode::print;\nusing safemode::status;\nusing safemode::clearstatus;\nusing safemode::clear;\nusing safemode::moveto;\nusing safemode::run_until_key;\nstatic const char *filename = \"Doukutsu.exe\";\n\nstatic int extract_do(void)\n{\nFILE *fp;\n\n\tclear();\n\tmoveto(SM_UPPER_THIRD);\n\tprint(\"= Extracting Files =\");\n\t\n\tfp = fileopen(filename, \"rb\");\n\tif (!fp)\n\t{\n\t\tmoveto(SM_CENTER);\n\t\tprint(\"cannot find executable %s\", filename);\n\t\tprint(\"\");\n\t\tprint(\"\");\n\t\tprint(\"Please put it and it's \\\"data\\\" directory\");\n\t\tprint(\"into the same folder as this program.\");\n\t\trun_until_key();\n\t\treturn 1;\n\t}\n\t\n\tif (extract_pxt(fp)) return 1;\n\tif (extract_files(fp)) return 1;\n\tif (extract_stages(fp)) return 1;\n\t//findfiles(fp);\n\t//exit(1);\n\t\n\tclearstatus();\n\tfclose(fp);\n\treturn 0;\n}\n\n\nint extract_main()\n{\nint result;\n\n\tif (safemode::init())\n\t{\n\t\tstaterr(\"failed to initialize safemode graphics\");\n\t\treturn 1;\n\t}\n\t\n\tresult = introduction();\n\t#ifdef __SDLSHIM__\n\tif (result == SDLK_BTN1)\n\t#else\n\tif (result == SDLK_ESCAPE)\n\t#endif\n\t{\n\t\tstat(\"Breaking out\");\n\t\treturn 1;\n\t}\n\t\n\tresult = extract_do();\n\tif (!result)\n\t\tconclusion();\n\t\n\tsafemode::close();\n\treturn result;\n}\n\n\nint introduction()\n{\n\tclear();\n\tmoveto(SM_UPPER_THIRD);\n\t\n\tprint(\"I need to extract some game data\");\n\tprint(\"before I can start up for the first time.\");\n\tprint(\"\");\n\tprint(\"Before beginning, you should have the Aeon Genesis\");\n\tprint(\"English translation of version 1.0.0.6, and drop\");\n\tprint(\"Doukutsu.exe and it's \\\"data\\\" directory into the same\");\n\tprint(\"folder as the \\\"nx\\\" program you just ran.\");\n\tprint(\"\");\n\t#ifdef __SDLSHIM__\n\tprint(\"If you haven't done that yet, please press BTN1 now\");\n\t#else\n\tprint(\"If you haven't done that yet, please press ESCAPE now\");\n\t#endif\n\tprint(\"and come back in a moment. Otherwise, you can\");\n\tprint(\"press any other key to start the extraction.\");\n\t\n\treturn run_until_key();\n}\n\nint conclusion()\n{\n\tmoveto(SM_MIDUPPER_Y);\n\tprint(\"Success!\");\n\tprint(\"\");\n\tprint(\"You can now remove the Doukutsu.exe file\");\n\tprint(\"if you like, as it isn't needed anymore.\");\n\tprint(\"Please leave the \\\"data\\\" directory though.\");\n\tprint(\"\");\n\tprint(\"Once you get to the title screen, you may want\");\n\tprint(\"to adjust your resolution by pressing F3.\");\n\tprint(\"\");\n\tprint(\"Press any key to begin\");\n\t\n\treturn run_until_key();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n//#define FINDFILES\n#ifdef FINDFILES\nstatic struct\n{\n\tconst char *filename;\n\tint headersize;\n}\nfileinfo[] =\n{\n\t\"endpic/credit01.bmp\", 25,\n\t\"endpic/credit02.bmp\", 25,\n\t\"endpic/credit03.bmp\", 25,\n\t\"endpic/credit04.bmp\", 25,\n\t\"endpic/credit05.bmp\", 25,\n\t\"endpic/credit06.bmp\", 25,\n\t\"endpic/credit07.bmp\", 25,\n\t\"endpic/credit08.bmp\", 25,\n\t\"endpic/credit09.bmp\", 25,\n\t\"endpic/credit10.bmp\", 25,\n\t\"endpic/credit11.bmp\", 25,\n\t\"endpic/credit12.bmp\", 25,\n\t\"endpic/credit14.bmp\", 25,\n\t\"endpic/credit15.bmp\", 25,\n\t\"endpic/credit16.bmp\", 25,\n\t\"endpic/credit17.bmp\", 25,\n\t\"endpic/credit18.bmp\", 25,\n\t\"endpic/pixel.bmp\", 25,\n\t\"wavetable.dat\", 0,\n\t\"org/access.org\", 0,\n\t\"org/balcony.org\", 0,\n\t\"org/balrog.org\", 0,\n\t\"org/breakdown.org\", 0,\n\t\"org/cemetary.org\", 0,\n\t\"org/charge.org\", 0,\n\t\"org/credits.org\", 0,\n\t\"org/egg.org\", 0,\n\t\"org/eyesofflame.org\", 0,\n\t\"org/fanfale1.org\", 0,\n\t\"org/fanfale2.org\", 0,\n\t\"org/fanfale3.org\", 0,\n\t\"org/gameover.org\", 0,\n\t\"org/geothermal.org\", 0,\n\t\"org/gestation.org\", 0,\n\t\"org/gravity.org\", 0,\n\t\"org/grasstown.org\", 0,\n\t\"org/hell.org\", 0,\n\t\"org/heroend.org\", 0,\n\t\"org/jenka1.org\", 0,\n\t\"org/jenka2.org\", 0,\n\t\"org/labyrinth.org\", 0,\n\t\"org/lastbattle.org\", 0,\n\t\"org/lastcave.org\", 0,\n\t\"org/meltdown2.org\", 0,\n\t\"org/oppression.org\", 0,\n\t\"org/oside.org\", 0,\n\t\"org/plant.org\", 0,\n\t\"org/pulse.org\", 0,\n\t\"org/quiet.org\", 0,\n\t\"org/run.org\", 0,\n\t\"org/safety.org\", 0,\n\t\"org/scorching.org\", 0,\n\t\"org/seal.org\", 0,\n\t\"org/theme.org\", 0,\n\t\"org/toroko.org\", 0,\n\t\"org/town.org\", 0,\n\t\"org/tyrant.org\", 0,\n\t\"org/waterway.org\", 0,\n\t\"org/white.org\", 0,\n\t\"org/zombie.org\", 0,\n\tNULL\n};\n\nbool findfiles(FILE *exefp)\n{\nint i;\nFILE *fpo;\nint len;\nuint32_t crc;\n\n\tfpo = fileopen(\"/tmp/files.dat\", \"wb\");\n\tcrc_init();\n\t\n\tfor(i=0;fileinfo[i].filename;i++)\n\t{\n\t\tuint32_t offset = findfile(fileinfo[i].filename, exefp, fileinfo[i].headersize, \\\n\t\t\t\t\t\t\t\t&len, &crc);\n\t\t\n\t\tif (offset == 0)\n\t\t{\n\t\t\tstaterr(\"couldn't find file %s\", fileinfo[i].filename);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tconst char *headertable = \"NULL\";\n\t\tif (fileinfo[i].headersize)\n\t\t{\n\t\t\theadertable = strstr(fileinfo[i].filename, \"pixel\") ? \\\n\t\t\t\t\t\"pixel_header\" : \"credit_header\";\n\t\t}\n\t\t\n\t\tfprintf(fpo, \"\\t\\\"%s\\\", 0x%06x, %d, 0x%08x, %s,\\n\",\n\t\t\t\t\tfileinfo[i].filename,\n\t\t\t\t\toffset, len, crc, headertable);\n\t}\n\t\n\tfclose(fpo);\n\treturn 0;\n}\n\n\nuint32_t findfile(const char *fname, FILE *exefp, int headersize, \\\n\t\t\t\t\tint *len_out, uint32_t *crc_out)\n{\nFILE *fp;\nuint8_t *buffer;\nuint32_t hit = 0;\nint len;\n\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"can't open %s\", fname);\n\t\treturn 0;\n\t}\n\t\n\tlen = filesize(fp);\n\tbuffer = (uint8_t *)malloc(len);\n\t\n\tlen -= headersize;\n\tfseek(fp, headersize, SEEK_SET);\n\tfread(buffer, len, 1, fp);\n\t\n\t*crc_out = crc_calc(buffer, len);\n\t*len_out = len;\n\t\n\tstat(\"searching for '%s'; %d bytes\", fname, len);\n\t\n\tint match = 0;\n\tfseek(exefp, 0, SEEK_SET);\n\twhile(!feof(exefp))\n\t{\n\t\tuint8_t ch = fgetc(exefp);\nrecheck: ;\n\t\t\n\t\tif (ch == buffer[match])\n\t\t{\n\t\t\tmatch++;\n\t\t\tif (match >= len)\n\t\t\t{\n\t\t\t\thit = (ftell(exefp) - len);\n\t\t\t\tstat(\"hit at 0x%06x\", hit);\n\t\t\t\tmatch = 0;\n\t\t\t}\n\t\t}\n\t\telse if (match)\n\t\t{\n\t\t\tmatch = 0;\n\t\t\tgoto recheck;\n\t\t}\n\t}\n\t\n\tfree(buffer);\n\tfclose(fp);\n\treturn hit;\n}\n#endif\n\n"
  },
  {
    "path": "extract/extract.fdh",
    "content": "//hash:ae36d920\n//automatically generated by Makegen\n\n/* located in platform.cpp */\n\n//----------------[referenced from extract/extract.cpp]--------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in extract/extract.cpp */\n\n//----------------[referenced from extract/extract.cpp]--------------//\nstatic int extract_do(void);\nint extract_main();\nint introduction();\nint conclusion();\nbool findfiles(FILE *exefp);\nuint32_t findfile(const char *fname, FILE *exefp, int headersize, int *len_out, uint32_t *crc_out);\n\n\n/* located in extract/extractpxt.cpp */\n\n//----------------[referenced from extract/extract.cpp]--------------//\nbool extract_pxt(FILE *fp);\n\n\n/* located in extract/extractfiles.cpp */\n\n//----------------[referenced from extract/extract.cpp]--------------//\nbool extract_files(FILE *exefp);\n\n\n/* located in extract/extractstages.cpp */\n\n//----------------[referenced from extract/extract.cpp]--------------//\nbool extract_stages(FILE *exefp);\n\n\n/* located in extract/crc.cpp */\n\n//----------------[referenced from extract/extract.cpp]--------------//\nvoid crc_init(void);\nuint32_t crc_calc(uint8_t *buf, uint32_t size);\n\n\n/* located in common/stat.cpp */\n\n//----------------[referenced from extract/extract.cpp]--------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//----------------[referenced from extract/extract.cpp]--------------//\nint filesize(FILE *fp);\n\n"
  },
  {
    "path": "extract/extractfiles.cpp",
    "content": "\n#include <SDL/SDL.h>\n#include <stdio.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sys/stat.h>\n#include \"../common/basics.h\"\n#include \"../graphics/safemode.h\"\n#include \"extractfiles.fdh\"\n\n#ifdef __MINGW32__\n\t#include <io.h>\n#endif\n\nusing safemode::moveto;\nusing safemode::status;\nusing safemode::print;\nusing safemode::run_until_key;\n\n#define HEADER_LEN\t\t25\n#define MAX_FILE_SIZE\t32768\n\n// Windows .bmp resources don't include the BMP-file headers\nconst uint8_t credit_header[] = \\\n{\n\t0x42, 0x4D, 0x76, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x76, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xA0, 0x00,\n\t0x00, 0x00, 0xF0, 0x00, 0x00\n};\n\nconst uint8_t pixel_header[] = \\\n{\n\t0x42, 0x4D, 0x76, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t0x76, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xA0, 0x00,\n\t0x00, 0x00, 0x10, 0x00, 0x00\n};\n\nstatic struct\n{\n\tconst char *filename;\n\tuint32_t offset;\n\tuint32_t length;\n\tuint32_t crc;\n\tconst uint8_t *header;\n}\nfiles[] =\n{\n\t\"endpic/credit01.bmp\", 0x117047, 19293, 0xeb87b19b, credit_header,\n\t\"endpic/credit02.bmp\", 0x11bbaf, 19293, 0x239c1a37, credit_header,\n\t\"endpic/credit03.bmp\", 0x120717, 19293, 0x4398bbda, credit_header,\n\t\"endpic/credit04.bmp\", 0x12527f, 19293, 0x44bae3ac, credit_header,\n\t\"endpic/credit05.bmp\", 0x129de7, 19293, 0xd1b876ad, credit_header,\n\t\"endpic/credit06.bmp\", 0x12e94f, 19293, 0x5a60082e, credit_header,\n\t\"endpic/credit07.bmp\", 0x1334b7, 19293, 0xc1e9db91, credit_header,\n\t\"endpic/credit08.bmp\", 0x13801f, 19293, 0xcbbcc7fa, credit_header,\n\t\"endpic/credit09.bmp\", 0x13cb87, 19293, 0xfa7177b1, credit_header,\n\t\"endpic/credit10.bmp\", 0x1416ef, 19293, 0x56390a07, credit_header,\n\t\"endpic/credit11.bmp\", 0x146257, 19293, 0xff3d6d83, credit_header,\n\t\"endpic/credit12.bmp\", 0x14adbf, 19293, 0x9e948dc2, credit_header,\n\t\"endpic/credit14.bmp\", 0x14f927, 19293, 0x32b6ce2d, credit_header,\n\t\"endpic/credit15.bmp\", 0x15448f, 19293, 0x88539803, credit_header,\n\t\"endpic/credit16.bmp\", 0x158ff7, 19293, 0xc0ef9adf, credit_header,\n\t\"endpic/credit17.bmp\", 0x15db5f, 19293, 0x8c5a003d, credit_header,\n\t\"endpic/credit18.bmp\", 0x1626c7, 19293, 0x66bcbf22, credit_header,\n\t\"endpic/pixel.bmp\",    0x16722f, 1373,  0x6181d0a1, pixel_header,\n\t\"wavetable.dat\",       0x110664, 25599, 0xcaa7b1dd, NULL,\n\t\"org/access.org\",      0x09b35c, 1138,  0xd965dddb, NULL,\n\t\"org/balcony.org\",     0x09dbbc, 3082,  0x892345ca, NULL,\n\t\"org/balrog.org\",      0x0b45a0, 5970,  0xb02093b8, NULL,\n\t\"org/breakdown.org\",   0x09f5bc, 2570,  0xf80dd62a, NULL,\n\t\"org/cemetary.org\",    0x09ffc8, 4578,  0x2ce377cc, NULL,\n\t\"org/charge.org\",      0x0d28d4, 2770,  0x10dec9d5, NULL,\n\t\"org/credits.org\",     0x0a7eac, 17898, 0xa9ed4834, NULL,\n\t\"org/egg.org\",         0x0feb20, 19626, 0xb651047e, NULL,\n\t\"org/eyesofflame.org\", 0x0aedc0, 21354, 0x6b5ff989, NULL,\n\t\"org/fanfale1.org\",    0x0ae25c, 914,   0xaefd547b, NULL,\n\t\"org/fanfale2.org\",    0x0ae98c, 1074,  0x3a5170a6, NULL,\n\t\"org/fanfale3.org\",    0x0ae5f0, 922,   0x85813929, NULL,\n\t\"org/gameover.org\",    0x0b412c, 1137,  0x525d58f3, NULL,\n\t\"org/geothermal.org\",  0x0b5cf4, 13466, 0xdb4795ac, NULL,\n\t\"org/gestation.org\",   0x0f83c8, 10458, 0xce2e68c1, NULL,\n\t\"org/gravity.org\",     0x0b9190, 20578, 0x64a9318d, NULL,\n\t\"org/grasstown.org\",   0x1037cc, 23706, 0xa27883b6, NULL,\n\t\"org/hell.org\",        0x0be1f4, 18386, 0x93bbf277, NULL,\n\t\"org/heroend.org\",     0x0f1598, 9722,  0xfc64d0d0, NULL,\n\t\"org/jenka1.org\",      0x0c5e54, 8306,  0xb42d7eaa, NULL,\n\t\"org/jenka2.org\",      0x0c7ec8, 11986, 0xc095cbe1, NULL,\n\t\"org/labyrinth.org\",   0x0dbcb8, 14786, 0x0292cf2c, NULL,\n\t\"org/lastbattle.org\",  0x0cd650, 21122, 0x8888dac9, NULL,\n\t\"org/lastcave.org\",    0x0d33a8, 18122, 0x469b38b9, NULL,\n\t\"org/meltdown2.org\",   0x0df67c, 21074, 0x83d08aed, NULL,\n\t\"org/oppression.org\",  0x0c29c8, 13450, 0x3ce4cdbe, NULL,\n\t\"org/oside.org\",       0x0e725c, 25634, 0x1e33b095, NULL,\n\t\"org/plant.org\",       0x0ed680, 11378, 0x3911e040, NULL,\n\t\"org/pulse.org\",       0x0cad9c, 10418, 0x92ef0330, NULL,\n\t\"org/quiet.org\",       0x0f02f4, 4770,  0x0e95a468, NULL,\n\t\"org/run.org\",         0x0ac498, 7618,  0x65a4bb85, NULL,\n\t\"org/safety.org\",      0x09b7d0, 9194,  0x779e83c2, NULL,\n\t\"org/scorching.org\",   0x0faca4, 15994, 0xd09341e2, NULL,\n\t\"org/seal.org\",        0x09e7c8, 3570,  0x373988ad, NULL,\n\t\"org/theme.org\",       0x0a11ac, 25738, 0xf5ace8b0, NULL,\n\t\"org/toroko.org\",      0x0f3b94, 18482, 0xc202de07, NULL,\n\t\"org/town.org\",        0x0e48d0, 10634, 0x6a6aa627, NULL,\n\t\"org/tyrant.org\",      0x0a7638, 2162,  0xc64dc450, NULL,\n\t\"org/waterway.org\",    0x0d7a74, 16962, 0xb533d72a, NULL,\n\t\"org/white.org\",       0x109468, 23714, 0xcff0fb34, NULL,\n\t\"org/zombie.org\",      0x10f180, 5346,  0xd217cc29, NULL,\n\tNULL\n};\n\n\nbool extract_files(FILE *exefp)\n{\nuint8_t *buffer;\nuint8_t *file;\nuint32_t length;\nuint32_t crc;\nbool check_crc = true;\nbool first_crc_failure = true;\n\n\tbuffer = (uint8_t *)malloc(MAX_FILE_SIZE);\n\tcrc_init();\n\t\n\tfor(int i=0;;i++)\n\t{\n\t\tconst char *outfilename = files[i].filename;\n\t\tif (!outfilename) break;\n\t\t\n\t\tstatus(\"[ %s ]\", outfilename);\n\t\t\n\t\t// initialize header if any\n\t\tfile = buffer;\n\t\tlength = files[i].length;\n\t\t\n\t\tif (files[i].header)\n\t\t{\n\t\t\tmemcpy(buffer, files[i].header, HEADER_LEN);\n\t\t\tfile += HEADER_LEN;\n\t\t\tlength += HEADER_LEN;\n\t\t}\n\t\t\n\t\t// read data from exe\n\t\tfseek(exefp, files[i].offset, SEEK_SET);\n\t\tfread(file, files[i].length, 1, exefp);\n\t\t\n#ifndef _L10N_CP1251\n\t\tif (check_crc)\n\t\t{\n\t\t\tcrc = crc_calc(file, files[i].length);\n\t\t\tif (crc != files[i].crc)\n\t\t\t{\n\t\t\t\tstatus(\"File '%s' failed CRC check.\", outfilename);\n\t\t\t\tprint(\"\");\n\t\t\t\t\n\t\t\t\t#ifndef __SDLSHIM__\n\t\t\t\t\tprint(\"[I]gnore\");\n\t\t\t\t\tprint(\"Ignore [A]ll\");\n\t\t\t\t\tprint(\"[S]top\");\n\t\t\t\t\t#define IGNORE_BTN\t\tSDLK_i\n#if defined(_MOTOMAGX) || defined(_MOTOEZX)\n\t\t\t\t\t#define IGNORE_ALL_BTN\tSDLK_PLUS\n#else\n\t\t\t\t\t#define IGNORE_ALL_BTN\tSDLK_a\n#endif\n\t\t\t\t\t#define STOP_BTN\t\tSDLK_s\n\t\t\t\t#else\n\t\t\t\t\tprint(\"B1 - Ignore\");\n\t\t\t\t\tprint(\"B2 - Ignore All\");\n\t\t\t\t\tprint(\"B3 - Stop\");\n\t\t\t\t\t#define IGNORE_BTN\t\tSDLK_BTN1\n\t\t\t\t\t#define IGNORE_ALL_BTN\tSDLK_BTN2\n\t\t\t\t\t#define STOP_BTN\t\tSDLK_BTN3\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\tfor(;;)\n\t\t\t\t{\n\t\t\t\t\tswitch(run_until_key(first_crc_failure))\n\t\t\t\t\t{\n\t\t\t\t\t\tcase IGNORE_BTN:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase IGNORE_ALL_BTN:\n\t\t\t\t\t\t\tcheck_crc = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifndef __SDLSHIM__\n\t\t\t\t\t\tcase SDLK_ESCAPE:\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\tcase STOP_BTN:\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfree(buffer);\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfirst_crc_failure = false;\n\t\t\t}\n\t\t}\n#endif\n\t\t// write out the file\n\t\tcreatedir(outfilename);\n\t\t\n\t\tFILE *fp = fileopen(outfilename, \"wb\");\n\t\tif (!fp)\n\t\t{\n\t\t\tstatus(\"Failed to open '%s' for writing.\", outfilename);\n\t\t\tfree(buffer);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tfwrite(buffer, length, 1, fp);\n\t\tfclose(fp);\n\t}\n\t\n\tfree(buffer);\n\treturn 0;\n}\n\n\nstatic void createdir(const char *fname)\n{\n\tchar *dir = strdup(fname);\n\tchar *ptr = strchr(dir, '/');\n\tif (ptr)\n\t{\n\t\t*ptr = 0;\n\t\t\n\t\t#ifdef __MINGW32__\n\t\t\tmkdir(dir);\n\t\t#else\n\t\t\tmkdir(dir, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);\n\t\t#endif\n\t}\n\t\n\tfree(dir);\n}\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "extract/extractfiles.fdh",
    "content": "//hash:ac97400d\n//automatically generated by Makegen\n\n/* located in platform.cpp */\n\n//-------------[referenced from extract/extractfiles.cpp]------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in extract/extractfiles.cpp */\n\n//-------------[referenced from extract/extractfiles.cpp]------------//\nbool extract_files(FILE *exefp);\nstatic void createdir(const char *fname);\n\n\n/* located in extract/crc.cpp */\n\n//-------------[referenced from extract/extractfiles.cpp]------------//\nvoid crc_init(void);\nuint32_t crc_calc(uint8_t *buf, uint32_t size);\n\n"
  },
  {
    "path": "extract/extractpxt.cpp",
    "content": "\n#include <SDL/SDL.h>\n#include <stdio.h>\n#include <stdint.h>\n#include <string.h>\n#include <sys/stat.h>\n\n#ifdef __MINGW32__\n#include <unistd.h>\n#endif\n\n#include \"../graphics/safemode.h\"\n#include \"../common/basics.h\"\n#include \"extractpxt.fdh\"\n\nusing safemode::moveto;\nusing safemode::status;\n\nstatic struct\n{\n\tconst char *name;\n\tbool is_integer;\n}\nfields[] =\n{\n\t\"use  \", 1,\n\t\"size \", 1,\n\t\"main_model   \", 1,\n\t\"main_freq    \", 0,\n\t\"main_top     \", 1,\n\t\"main_offset  \", 1,\n\t\"pitch_model  \", 1,\n\t\"pitch_freq   \", 0,\n\t\"pitch_top    \", 1,\n\t\"pitch_offset \", 1,\n\t\"volume_model \", 1,\n\t\"volume_freq  \", 0,\n\t\"volume_top   \", 1,\n\t\"volume_offset\", 1,\n\t\"initialY\", 1,\n\t\"ax      \", 1,\n\t\"ay      \", 1,\n\t\"bx      \", 1,\n\t\"by      \", 1,\n\t\"cx      \", 1,\n\t\"cy      \", 1,\n\tNULL\n};\n\nstatic struct\n{\n\tint id;\n\tint nchanl;\n\tuint32_t offset;\n}\nsnd[] =\n{\n\t0x01, 1, 0x0907b0,\n\t0x02, 1, 0x0909e0,\n\t0x03, 1, 0x0934c0,\n\t0x04, 1, 0x090890,\n\t0x05, 1, 0x090660,\n\t0x06, 1, 0x093530,\n\t0x07, 1, 0x0935a0,\n\t0x0b, 1, 0x090740,\n\t0x0c, 2, 0x090c80,\n\t0x0e, 1, 0x090a50,\n\t0x0f, 1, 0x08fbe0,\n\t0x10, 2, 0x090350,\n\t0x11, 3, 0x090430,\n\t0x12, 1, 0x090820,\n\t0x14, 2, 0x090900,\n\t0x15, 1, 0x090c10,\n\t0x16, 1, 0x0906d0,\n\t0x17, 1, 0x08fcc0,\n\t0x18, 1, 0x08fc50,\n\t0x19, 2, 0x090d60,\n\t0x1a, 2, 0x090b30,\n\t0x1b, 1, 0x090e40,\n\t0x1c, 2, 0x0910e0,\n\t0x1d, 1, 0x0911c0,\n\t0x1e, 1, 0x091ee0,\n\t0x1f, 1, 0x091310,\n\t0x20, 2, 0x08f940,\n\t0x21, 2, 0x08fa20,\n\t0x22, 2, 0x08fb00,\n\t0x23, 3, 0x090eb0,\n\t0x25, 2, 0x092810,\n\t0x26, 2, 0x091230,\n\t0x27, 3, 0x091000,\n\t0x28, 2, 0x092730,\n\t0x29, 2, 0x092730,\n\t0x2a, 1, 0x091380,\n\t0x2b, 1, 0x0913f0,\n\t0x2c, 3, 0x091460,\n\t0x2d, 1, 0x0915b0,\n\t0x2e, 1, 0x091620,\n\t0x2f, 1, 0x091700,\n\t0x30, 1, 0x091770,\n\t0x31, 2, 0x0917e0,\n\t0x32, 2, 0x08fd30,\n\t0x33, 2, 0x08fe10,\n\t0x34, 2, 0x08fef0,\n\t0x35, 2, 0x090580,\n\t0x36, 2, 0x091a80,\n\t0x37, 2, 0x092ea0,\n\t0x38, 2, 0x092650,\n\t0x39, 2, 0x0928f0,\n\t0x3a, 2, 0x092dc0,\n\t0x3b, 1, 0x093060,\n\t0x3c, 1, 0x0930d0,\n\t0x3d, 1, 0x093140,\n\t0x3e, 2, 0x0931b0,\n\t0x3f, 2, 0x093290,\n\t0x40, 2, 0x093370,\n\t0x41, 1, 0x093450,\n\t0x46, 2, 0x08ffd0,\n\t0x47, 2, 0x0900b0,\n\t0x48, 2, 0x090190,\n\t0x64, 1, 0x0918c0,\n\t0x65, 3, 0x091930,\n\t0x66, 2, 0x091b60,\n\t0x67, 2, 0x091c40,\n\t0x68, 1, 0x091cb0,\n\t0x68, 1, 0x092c00,\n\t0x69, 1, 0x091d20,\n\t0x6a, 2, 0x091d90,\n\t0x6b, 1, 0x091e70,\n\t0x6c, 1, 0x091f50,\n\t0x6d, 1, 0x091fc0,\n\t0x6e, 1, 0x092030,\n\t0x6f, 1, 0x0920a0,\n\t0x70, 1, 0x092110,\n\t0x71, 1, 0x092180,\n\t0x72, 2, 0x0921f0,\n\t0x73, 3, 0x092ab0,\n\t0x74, 3, 0x092c70,\n\t0x75, 2, 0x092f80,\n\t0x96, 2, 0x0922d0,\n\t0x97, 2, 0x0923b0,\n\t0x98, 1, 0x092490,\n\t0x99, 1, 0x092500,\n\t0x9a, 2, 0x092570,\n\t0x9b, 2, 0x0929d0,\n\t0, 0, 0\n};\n\nbool extract_pxt(FILE *fp)\n{\nstruct\n{\n\tunion\n\t{\n\t\tint intvalue;\n\t\tdouble fpvalue;\n\t} values[50];\n} chan[4];\nint s, c, i;\n\n\tfor(s=0;;s++)\n\t{\n\t\tif (!snd[s].id) break;\n\t\t\n\t\tchar outfilename[MAXPATHLEN];\n\t\tsprintf(outfilename, \"pxt/fx%02x.pxt\", snd[s].id);\n\t\tstatus(\"[ %s ]\", outfilename);\n#ifndef __MINGW32__\n\t\tmkdir(\"pxt\", 0755);\n#else\n\t\tmkdir(\"pxt\");\n#endif\n\t\tFILE *fpo = fileopen(outfilename, \"wb\");\n\t\tif (!fpo)\n\t\t{\n\t\t\tstatus(\"failed to open %s\", outfilename);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tfseek(fp, snd[s].offset, SEEK_SET);\n\t\tmemset(chan, 0, sizeof(chan));\n\t\t\n\t\t// load data\n\t\tfor(c=0;c<snd[s].nchanl;c++)\n\t\t{\n\t\t\tfor(i=0;fields[i].name;i++)\n\t\t\t{\n\t\t\t\tif (fields[i].is_integer)\n\t\t\t\t{\n\t\t\t\t\tchan[c].values[i].intvalue = fgetl(fp);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tchan[c].values[i].fpvalue = fgetfloat(fp);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// skip padding between sections\n\t\t\tif (fgetl(fp) != 0)\n\t\t\t{\n\t\t\t\tstatus(\"PXT out of sync\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write human-readable section\n\t\tfor(c=0;c<4;c++)\n\t\t{\n\t\t\tfor(i=0;fields[i].name;i++)\n\t\t\t{\n\t\t\t\tif (fields[i].is_integer)\n\t\t\t\t\tfprintf(fpo, \"%s:%d\\r\\n\", fields[i].name, chan[c].values[i].intvalue);\n\t\t\t\telse\n\t\t\t\t\tfprintf(fpo, \"%s:%.2f\\r\\n\", fields[i].name, chan[c].values[i].fpvalue);\n\t\t\t}\n\t\t\t\n\t\t\tfprintf(fpo, \"\\r\\n\");\n\t\t}\n\t\t\n\t\t// write machine-readable section\n\t\tfor(c=0;c<4;c++)\n\t\t{\n\t\t\tfprintf(fpo, \"{\");\n\t\t\t\n\t\t\tfor(i=0;fields[i].name;i++)\n\t\t\t{\n\t\t\t\tconst char *suffix = (fields[i+1].name == NULL) ? \"},\\r\\n\" : \",\";\n\t\t\t\t\n\t\t\t\tif (fields[i].is_integer)\n\t\t\t\t\tfprintf(fpo, \"%d%s\", chan[c].values[i].intvalue, suffix);\n\t\t\t\telse\n\t\t\t\t\tfprintf(fpo, \"%.2f%s\", chan[c].values[i].fpvalue, suffix);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfclose(fpo);\n\t}\n\t\n\treturn 0;\n}\n\n"
  },
  {
    "path": "extract/extractpxt.fdh",
    "content": "//hash:34b55a98\n//automatically generated by Makegen\n\n/* located in platform.cpp */\n\n//--------------[referenced from extract/extractpxt.cpp]-------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in extract/extractpxt.cpp */\n\n//--------------[referenced from extract/extractpxt.cpp]-------------//\nbool extract_pxt(FILE *fp);\n\n\n/* located in common/misc.cpp */\n\n//--------------[referenced from extract/extractpxt.cpp]-------------//\nuint32_t fgetl(FILE *fp);\ndouble fgetfloat(FILE *fp);\n\n"
  },
  {
    "path": "extract/extractstages.cpp",
    "content": "\n#include <SDL/SDL.h>\n#include <stdio.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n#include <sys/stat.h>\n#include \"../graphics/safemode.h\"\n#include \"../common/StringList.h\"\n#include \"../common/basics.h\"\n#include \"../stagedata.h\"\n#include \"../maprecord.h\"\n#include \"extractstages.fdh\"\n\nusing safemode::moveto;\nusing safemode::status;\nusing safemode::print;\nusing safemode::run_until_key;\n\n#define NMAPS\t\t\t95\n#define DATA_OFFSET\t\t0x937B0\n\nstruct EXEMapRecord\n{\n\tchar tileset[32];\n\tchar filename[32];\n\tint scroll_type;\n\tchar background[32];\n\tchar NPCset1[32];\n\tchar NPCset2[32];\n\tuint8_t bossNo;\n\tchar caption[35];\n};\n\nEXEMapRecord exemapdata[NMAPS];\nMapRecord mapdata[NMAPS];\n\n// the NPC set system isn't used by NXEngine, but the information\n// is used in a few places to figure out which sprite to be drawn.\n// for example Balrog when he appears in the Gum Room is supposed to be green.\nconst char *npcsetnames[] =\n{\n\t\"guest\", \"0\", \"eggs1\", \"ravil\", \"weed\", \"maze\",\n\t\"sand\", \"omg\", \"cemet\", \"bllg\", \"plant\", \"frog\",\n\t\"curly\", \"stream\", \"ironh\", \"toro\", \"x\", \"dark\",\n\t\"almo1\", \"eggs2\", \"twind\", \"moon\", \"cent\", \"heri\",\n\t\"red\", \"miza\", \"dr\", \"almo2\", \"kings\", \"hell\",\n\t\"press\", \"priest\", \"ballos\", \"island\", NULL\n};\n\n\nbool extract_stages(FILE *exefp)\n{\nint i;\n\n\tstatus(\"[ stage.dat ]\");\n\t\n\t// load raw data into struct\n\tfseek(exefp, DATA_OFFSET, SEEK_SET);\n\tfread(exemapdata, sizeof(EXEMapRecord), NMAPS, exefp);\n\t\n\t// convert the data\n\tmemset(mapdata, 0, sizeof(mapdata));\n\tconst char *error = NULL;\n\t\n\tfor(i=0;i<NMAPS;i++)\n\t{\n\t\tstrcpy(mapdata[i].filename, exemapdata[i].filename);\n\t\tstrcpy(mapdata[i].stagename, exemapdata[i].caption);\n\t\t\n\t\tmapdata[i].scroll_type = exemapdata[i].scroll_type;\n\t\tmapdata[i].bossNo = exemapdata[i].bossNo;\n\t\t\n\t\tmapdata[i].tileset = find_index(exemapdata[i].tileset, tileset_names);\n\t\tif (mapdata[i].tileset == 0xff) { error = \"tileset\"; break; }\n\t\t\n        mapdata[i].bg_no   = find_index(exemapdata[i].background, backdrop_names);\n\t\tif (mapdata[i].bg_no == 0xff) { error = \"backdrop\"; break; }\n\t\t\n\t\tmapdata[i].NPCset1 = find_index(exemapdata[i].NPCset1, npcsetnames);\n\t\tif (mapdata[i].NPCset1 == 0xff) { error = \"NPCset1\"; break; }\n\t\t\n\t\tmapdata[i].NPCset2 = find_index(exemapdata[i].NPCset2, npcsetnames);\n\t\tif (mapdata[i].NPCset2 == 0xff) { error = \"NPCset2\"; break; }\n\t}\n\n\tif (error)\n\t{\n\t\tstatus(\"didn't recognize map %s name\", error);\n\t\tprint(\"on stage %d\", i);\n\t\t\n\t\trun_until_key();\n\t\treturn 1;\n\t}\n\t\n\t// write out\n\tFILE *fpo = fileopen(\"stage.dat\", \"wb\");\n\tif (!fpo)\n\t{\n\t\tstatus(\"failed to open stage.dat for writing\");\n\t\trun_until_key();\n\t\treturn 1;\n\t}\n\t\n\tfputc(NMAPS, fpo);\n\tfor(i=0;i<NMAPS;i++)\n\t\tfwrite(&mapdata[i], sizeof(MapRecord), 1, fpo);\n\t\n\tfclose(fpo);\n\treturn 0;\n}\n\n\nstatic int find_index(const char *fname, const char *list[])\n{\n\tfor(int i=0;list[i];i++)\n\t{\n\t\tif (!strcasecmp(list[i], fname))\n\t\t{\n\t\t\treturn i;\n\t\t}\n\t}\n\t\n\treturn 0xff;\n}\n\n\n\n\n"
  },
  {
    "path": "extract/extractstages.fdh",
    "content": "//hash:dbadae2c\n//automatically generated by Makegen\n\n/* located in platform.cpp */\n\n//-------------[referenced from extract/extractstages.cpp]-----------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in extract/extractstages.cpp */\n\n//-------------[referenced from extract/extractstages.cpp]-----------//\nbool extract_stages(FILE *exefp);\nstatic int find_index(const char *fname, const char *list[]);\n\n"
  },
  {
    "path": "floattext.cpp",
    "content": "\n#include \"nx.h\"\n#include \"floattext.fdh\"\n\nFloatText *FloatText::first = NULL;\nFloatText *FloatText::last = NULL;\n\n/*\nvoid c------------------------------() {}\n*/\n\nFloatText::FloatText(int sprite)\n{\n\tprev = NULL;\n\tnext = first;\n\t\n\tif (first)\n\t\tfirst->prev = this;\n\telse\n\t\tlast = this;\n\t\n\tfirst = this;\n\tthis->sprite = sprite;\n\t\n\tReset();\n\tObjectDestroyed = false;\n}\n\nFloatText::~FloatText()\n{\n\tif (this->next) this->next->prev = this->prev;\n\tif (this->prev) this->prev->next = this->next;\n\t\n\tif (this == first) first = first->next;\n\tif (this == last) last = last->prev;\n}\n\nvoid FloatText::Reset()\n{\n\tthis->state = FT_IDLE;\n\tthis->shownAmount = 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// adds the spec'd amount of damage/energy to the object's point display\nvoid FloatText::AddQty(int amt)\n{\n\t//stat(\"FloatText::AddQty(%d)\", amt);\n\tif (amt == 0) return;\n\t\n\t// first add the damage to the total\n\tif (this->state == FT_IDLE)\n\t{\n\t\tthis->state = FT_RISE;\n\t\t\n\t\tthis->shownAmount = amt;\n\t\tthis->yoff = FT_Y_START;\n\t\tthis->timer = 0;\n\t}\n\telse\n\t{\n\t\tthis->shownAmount += amt;\n\t\t\n\t\t// if we're scrolling away jerk back down\n\t\tif (this->state == FT_SCROLL_AWAY)\n\t\t{\n\t\t\tthis->state = FT_HOLD;\n\t\t\tthis->yoff = FT_Y_HOLD;\n\t\t}\n\t\t\n\t\t// reset the timer which counts how long we stay in hold state\n\t\tif (this->state != FT_RISE)\n\t\t\tthis->timer = 0;\n\t}\n\t\n\tif (this->shownAmount > 9999)\n\t\tthis->shownAmount = 9999;\t\t// overrun protection for buffer\n}\n\n// updates the position of a floattext in respect to it's object\nvoid FloatText::UpdatePos(Object *assoc_object)\n{\n\t// get the center pixel of the object we're associated with\n\tthis->objX = (assoc_object->x >> CSF) + (sprites[assoc_object->sprite].w / 2);\n\tthis->objY = (assoc_object->y >> CSF) + (sprites[assoc_object->sprite].h / 2);\n\t\n\t// adjust for possible draw point\n\tSIFDir *dir = &sprites[assoc_object->sprite].frame[assoc_object->frame].dir[assoc_object->dir];\n\tthis->objX -= dir->drawpoint.x;\n\tthis->objY -= dir->drawpoint.y;\n}\n\n\n// moves and draws the given float text if need be\nvoid FloatText::Draw()\n{\nFloatText *ft = this;\nint x, y, i;\n\n\tswitch(ft->state)\n\t{\n\t\t// rise to top point, moving once every other frame\n\t\tcase FT_RISE:\n\t\t{\n\t\t\tft->timer ^= 1;\n\t\t\tif (ft->timer)\n\t\t\t{\n\t\t\t\tif (--ft->yoff <= FT_Y_HOLD)\n\t\t\t\t{\n\t\t\t\t\tft->state = FT_HOLD;\n\t\t\t\t\tft->timer = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// hold at top for a moment\n\t\tcase FT_HOLD:\n\t\t{\n\t\t\tif (++ft->timer >= 42)\n\t\t\t\tft->state = FT_SCROLL_AWAY;\n\t\t}\n\t\tbreak;\n\t\t\n\t\t// scroll away quickly and disappear\n\t\tcase FT_SCROLL_AWAY:\n\t\t{\n\t\t\tif (--ft->yoff <= FT_Y_RISEAWAY)\n\t\t\t{\n\t\t\t\tft->state = FT_IDLE;\n\t\t\t\tft->shownAmount = 0;\n\t\t\t\tft->timer = 0;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// set the SDL clipping region to just above the hold point\n\t// so it looks like it \"rolls\" away.\n\tif (ft->state == FT_SCROLL_AWAY)\n\t{\n\t\t// this formula is confusing until you realize that FT_Y_HOLD is a negative number\n\t\tint y = ((ft->objY - (map.displayed_yscroll >> CSF)) + FT_Y_HOLD);\n\t\tint h = (SCREEN_HEIGHT - y);\n\t\t\n\t\tset_clip_rect(0, y, SCREEN_WIDTH, h);\n\t}\n\t\n\t// render the damage amount into a string\n\tchar text[6] = { 10 };\n\tsprintf(&text[1], \"%d\", ft->shownAmount);\n\tfor(i=1;text[i];i++) text[i] -= '0';\n\tint textlen = i;\n\t\n\tx = ft->objX - (textlen * (8 / 2));\t\t\t// center the string on the object\n\ty = ft->objY + ft->yoff;\n\t// adjust to object's onscreen position\n\n    x -= (map.displayed_xscroll >> CSF);\n    y -= (map.displayed_yscroll >> CSF);\n\t\n\t// draw the text char by char\n\tfor(i=0;i<textlen;i++)\n\t{\n\t\tdraw_sprite(x, y, ft->sprite, text[i], 0);\n\t\tx += 8;\n\t}\n\t\n\tif (ft->state == FT_SCROLL_AWAY)\n\t\tclear_clip_rect();\n}\n\nbool FloatText::IsScrollingAway()\n{\n\treturn (this->state == FT_SCROLL_AWAY);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid FloatText::DrawAll(void)\n{\n\tFloatText *ft = first;\n\tFloatText *nextft;\n\tint count = 0;\n\t\n\twhile(ft)\n\t{\n\t\tnextft = ft->next;\n\t\t\n\t\tif (ft->state != FT_IDLE)\n\t\t{\n\t\t\tft->Draw();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (ft->ObjectDestroyed)\n\t\t\t\tdelete ft;\n\t\t}\n\t\t\n\t\tft = nextft;\n\t\tcount++;\n\t}\n}\n\n// do NOT call this to remove all enemy's floattext from the map.\n// for one thing, it could leave dangling invalid pointers.\n// for another, it deletes the player->XPText, etc.\n// instead, call ResetAll and let them clean themselves up.\nvoid FloatText::DeleteAll(void)\n{\n\twhile(first)\n\t\tdelete first;\n}\n\nvoid FloatText::ResetAll(void)\n{\n\tFloatText *ft = first;\n\twhile(ft)\n\t{\n\t\tft->Reset();\n\t\tft = ft->next;\n\t}\n}\n\n\n\n"
  },
  {
    "path": "floattext.fdh",
    "content": "//hash:00000000\n//automatically generated by Makegen\n"
  },
  {
    "path": "floattext.h",
    "content": "\n#ifndef _FLOATTEXT_H\n#define _FLOATTEXT_H\n\n#define FT_Y_START\t\t-4\t\t// this starts it exactly centered, since the font is 8px tall\n#define FT_Y_HOLD\t\t-19\n#define FT_Y_RISEAWAY\t(FT_Y_HOLD - 8)\n\nenum FloatTextStates\n{\n\tFT_IDLE,\n\tFT_RISE,\n\tFT_HOLD,\n\tFT_SCROLL_AWAY,\n};\n\nclass FloatText\n{\npublic:\n\tFloatText(int sprite);\n\t~FloatText();\n\tvoid Reset();\n\t\n\tvoid AddQty(int amt);\n\tbool IsScrollingAway();\n\t\n\tvoid UpdatePos(Object *assoc_object);\n\t\n\tstatic void DrawAll();\n\tstatic void DeleteAll();\n\tstatic void ResetAll(void);\n\t\n\tbool ObjectDestroyed;\n\nprivate:\n\tvoid Draw();\n\t\n\tuint8_t state;\n\t\n\tint yoff;\t\t\t// how much we've risen\n\tint shownAmount;\n\tint sprite;\t\t\t// allows selecting font\n\tint timer;\n\t\n\tSDL_Rect cliprect;\n\tint objX, objY;\t\t// the center pixel of the associated object (de-CSFd)\n\t\n\t\n\tFloatText *next, *prev;\n\tstatic FloatText *first, *last;\n};\n\n\n#endif\n\n"
  },
  {
    "path": "game.cpp",
    "content": "\n#include \"nx.h\"\n#include \"endgame/island.h\"\n#include \"endgame/credits.h\"\n#include \"intro/intro.h\"\n#include \"intro/title.h\"\n#include \"pause/pause.h\"\n#include \"pause/options.h\"\n#include \"inventory.h\"\n#include \"map_system.h\"\n#include \"game.h\"\n#include \"profile.h\"\n#include \"game.fdh\"\n\nstatic struct TickFunctions\n{\n\tvoid (*OnTick)(void);\n\tbool (*OnEnter)(int param);\n\tvoid (*OnExit)(void);\n}\ntickfunctions[] =\n{\n\tNULL,\t\t\t\tNULL,\t\t\tNULL,\t\t\t// GM_NONE\n\tgame_tick_normal,\tNULL,\t\t\tNULL,\t\t\t// GM_NORMAL\n\tinventory_tick,\t\tinventory_init,\tNULL,\t\t\t// GM_INVENTORY\n\tms_tick,\t\t\tms_init,\t\tms_close,\t\t// GM_MAP_SYSTEM\n\tisland_tick,\t\tisland_init,\tNULL,\t\t\t// GM_ISLAND\n\tcredit_tick,\t\tcredit_init,\tcredit_close,\t// GM_CREDITS\n\tintro_tick,\t\t\tintro_init,\t\tNULL,\t\t\t// GM_INTRO\n\ttitle_tick,\t\t\ttitle_init,\t\tNULL,\t\t\t// GM_TITLE\n\tpause_tick,\t\t\tpause_init,\t\tNULL,\t\t\t// GP_PAUSED\n\toptions_tick,\t\toptions_init,\toptions_close\t// GP_OPTIONS\n\t//old_options_tick,\t\told_options_init,\told_options_close\t// GP_OPTIONS\n};\n\nObject *onscreen_objects[MAX_OBJECTS];\nint nOnscreenObjects;\n\nGame game;\nTextBox textbox;\nDebugConsole console;\nObjProp objprop[OBJ_LAST];\n\n// init Game object: only called once during startup\nbool Game::init()\n{\nint i;\n\n\tmemset(&game, 0, sizeof(game));\n\t\n\t// set default properties\n\tmemset(objprop, 0, sizeof(objprop));\n\tfor(i=0;i<OBJ_LAST;i++)\n\t{\n\t\tobjprop[i].shaketime = 16;\n\t\t#ifdef DEBUG\t// big red \"NO\" sprite points out unimplemented objects\n\t\t\tobjprop[i].sprite = SPR_UNIMPLEMENTED_OBJECT;\n\t\t#else\n\t\t\tobjprop[i].sprite = SPR_NULL;\n\t\t#endif\n\t}\n\t\n\tAssignSprites();\t\t// auto-generated function to assign sprites to objects\n\tAssignExtraSprites();\t// assign rest of sprites (to be replaced at some point)\n\t\n\tif (ai_init()) return 1;\t\t\t// setup function pointers to AI routines\n\t\n\tif (initslopetable()) return 1;\n\tif (initmapfirsttime()) return 1;\n\t\n\t// create the player object--note that the player is NOT destroyed on map change\n\tif (game.createplayer()) return 1;\n\t\n\treturn 0;\n}\n\n\n// reset things to prepare for entry to the next stage\nbool Game::initlevel()\n{\n\tCarets::DestroyAll();\t// delete smoke clouds, ZZzz's etc...\n\tScreenEffects::Stop();\t// prevents white flash after island scene when ballos defeated\n\t\n\tgame.frozen = false;\n\tgame.bossbar.object = NULL;\n\tnOnscreenObjects = 0;\n\t\n\tif (statusbar_init()) return 1;\t\t\t\t\t// reset his displayed health value\n\tInitPlayer();\n\tinitmap();\n\t\n\tgame.stageboss.SetType(stages[game.curmap].bossNo);\n\tgame.stageboss.OnMapEntry();\n\t\n\tmap_scroll_jump(player->CenterX(), player->CenterY());\n\t\n\tif (game.switchstage.eventonentry)\n\t{\n\t\t// this prevents a glitch otherwise caused by entry script to Last Cave.\n\t\t// i.e. the script immediately <PRI's then fades in while the game is still\n\t\t// frozen, thus the player code never has a chance to set the initial frame.\n\t\tPHandleAttributes();\n\t\tPSelectFrame();\n\t\t\n\t\tstat(\"-- Starting on-entry script %d\", game.switchstage.eventonentry);\n\t\tStartScript(game.switchstage.eventonentry);\n\t\tgame.switchstage.eventonentry = 0;\n\t}\n\t\n\treturn 0;\n}\n\nbool Game::createplayer()\n{\n\tif (player)\n\t{\n\t\tstaterr(\"game.createplayer: player already exists!\");\n\t\treturn 1;\n\t}\n\t\n\tplayer = (Player *)CreateObject(0, 0, OBJ_PLAYER);\n\tPInitFirstTime();\n\t\n\treturn 0;\n}\n\n\nvoid Game::close(void)\n{\n\t// call any onexit/cleanup function for the current mode\n\tsetmode(GM_NONE);\n\t\n\tObjects::DestroyAll(true);\t// destroy all objects and player\n\tFloatText::DeleteAll();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool Game::setmode(int newmode, int param, bool force)\n{\n\tif (newmode == 0)\n\t\tnewmode = GM_NORMAL;\n\t\n\tif (game.mode == newmode && !force)\n\t\treturn 0;\n\t\n\tstat(\"Setting tick function to type %d param %d\", newmode, param);\n\t\n\tif (tickfunctions[game.mode].OnExit)\n\t\ttickfunctions[game.mode].OnExit();\n\t\n\tgame.mode = newmode;\n\t\n\tif (tickfunctions[game.mode].OnEnter)\n\t{\n\t\tif (tickfunctions[game.mode].OnEnter(param))\n\t\t{\n\t\t\tstaterr(\"game.setmode: initilization failed for mode %d\", newmode);\n\t\t\tgame.mode = GM_NONE;\n\t\t\treturn 1;\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n\nbool Game::pause(int pausemode, int param)\n{\n\tif (game.paused == pausemode)\n\t\treturn 0;\n\t\n\tstat(\"Setting pause: type %d param %d\", pausemode, param);\n\t\n\tif (tickfunctions[game.paused].OnExit)\n\t\ttickfunctions[game.paused].OnExit();\n\t\n\tgame.paused = pausemode;\n\t\n\tif (tickfunctions[game.paused].OnEnter)\n\t{\n\t\tif (tickfunctions[game.paused].OnEnter(param))\n\t\t{\n\t\t\tstaterr(\"game.pause: initilization failed for mode %d\", pausemode);\n\t\t\tgame.paused = 0;\n\t\t\treturn 1;\n\t\t}\n\t}\n\t\n\tif (!game.paused)\n\t\tmemset(inputs, 0, sizeof(inputs));\n\t\n\treturn 0;\n}\n\nvoid Game::tick(void)\n{\n\tdebug_clear();\n\t\n\tif (game.paused)\n\t{\n\t\ttickfunctions[game.paused].OnTick();\n\t}\n\telse\n\t{\n\t\t// record/playback replays\n\t\tReplay::run();\n\t\t\n\t\t// run scripts\n\t\tRunScripts();\n\t\t\n\t\t// call the tick function for the current game mode\n\t\ttickfunctions[game.mode].OnTick();\n\t}\n\t\n\tDrawDebug();\n\tconsole.Draw();\n}\n\n\nvoid Game::switchmap(int mapno, int scriptno, int px, int py)\n{\n\tgame.switchstage.mapno = mapno;\n\tgame.switchstage.playerx = px;\n\tgame.switchstage.playery = py;\n\tgame.switchstage.eventonentry = scriptno;\n}\n\n\nvoid Game::reset()\n{\n\tmemset(inputs, 0, sizeof(inputs));\n\tStopLoopSounds();\n\tStopScripts();\n\t\n\tReplay::end_record();\n\tReplay::end_playback();\n\t\n\tgame.pause(false);\n\tgame.setmode(GM_INTRO, 0, true);\n\tconsole.SetVisible(false);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// standard in-game tick (as opposed to title-screen, inventory etc)\nvoid game_tick_normal(void)\n{\nObject *o;\n\n\tplayer->riding = NULL;\n\tplayer->bopped_object = NULL;\n\tObjects::UpdateBlockStates();\n\n\tif (!game.frozen)\n\t{\n\t\t// run AI for player and stageboss first\n\t\tHandlePlayer();\n\t\tgame.stageboss.Run();\n\t\t\n\t\t// now objects AI and move all objects to their new positions\n\t\tObjects::RunAI();\n\t\tObjects::PhysicsSim();\n\t\t\n\t\t// run the \"aftermove\" AI routines\n\t\tHandlePlayer_am();\n\t\tgame.stageboss.RunAftermove();\n\t\t\n\t\tFOREACH_OBJECT(o)\n\t\t{\n\t\t\tif (!o->deleted)\n\t\t\t\to->OnAftermove();\n\t\t}\n\t}\n\n\t// important to put this before and not after DrawScene(), or non-existant objects\n\t// can wind up in the onscreen_objects[] array, and blow up the program on the next tick.\n\tObjects::CullDeleted();\n\t\n\tmap_scroll_do();\n\t\n\tDrawScene();\n\tDrawStatusBar();\n\tfade.Draw();\n\t\n\tniku_run();\n\tif (player->equipmask & EQUIP_NIKUMARU)\n\t\tniku_draw(game.counter);\n\t\n\ttextbox.Draw();\n\t\n\tScreenEffects::Draw();\n\tmap_draw_map_name();\t// stage name overlay as on entry\n}\n\n\n// shake screen.\nvoid quake(int quaketime, int snd)\n{\n\tif (game.quaketime < quaketime)\n\t\tgame.quaketime = quaketime;\n\t\n\tif (snd)\n\t\tsound((snd != -1) ? snd : SND_QUAKE);\n}\n\n// during Ballos fight, since there's already a perpetual quake,\n// we need to be able to make an even BIGGER quake effect.\nvoid megaquake(int quaketime, int snd)\n{\n\tif (game.megaquaketime < quaketime)\n\t{\n\t\tgame.megaquaketime = quaketime;\n\t\tif (game.quaketime < game.megaquaketime)\n\t\t\tgame.quaketime = game.megaquaketime;\n\t}\n\t\n\tif (snd)\n\t\tsound((snd != -1) ? snd : SND_QUAKE);\n}\n\n\nvoid DrawScene(void)\n{\nint scr_x, scr_y;\nextern int flipacceltime;\n\t\n\t// sporidically-used animated tile feature,\n\t// e.g. water currents in Waterway\n\tif (map.nmotiontiles)\n\t\tAnimateMotionTiles();\n\t\n\t// draw background map tiles\n\tif (!flipacceltime)\n\t{\n\t\tmap_draw_backdrop();\n\t\tmap_draw(false);\n\t}\n\t\n\t// draw all objects following their z-order\n\tnOnscreenObjects = 0;\n\t\n\tfor(Object *o = lowestobject;\n\t\to != NULL;\n\t\to = o->higher)\n\t{\n\t\tif (o == player) continue;\t// player drawn specially in DrawPlayer\n\t\t\n\t\t// keep it's floattext linked with it's position\n\t\to->DamageText->UpdatePos(o);\n\t\t\n\t\t// shake enemies that were just hit. when they stop shaking,\n\t\t// start rising up how many damage they took.\n\t\tif (o->shaketime)\n\t\t{\n\t\t\to->display_xoff = (o->shaketime & 2) ? 1 : -1;\n\t\t\tif (!--o->shaketime) o->display_xoff = 0;\n\t\t}\n\t\telse if (o->DamageWaiting > 0)\n\t\t{\n\t\t\to->DamageText->AddQty(o->DamageWaiting);\n\t\t\to->DamageWaiting = 0;\n\t\t}\n\t\t\n\t\t// get object's onscreen position\n\n        scr_x = (o->x >> CSF) - (map.displayed_xscroll >> CSF);\n        scr_y = (o->y >> CSF) - (map.displayed_yscroll >> CSF);\n\n\t\tscr_x -= sprites[o->sprite].frame[o->frame].dir[o->dir].drawpoint.x;\n\t\tscr_y -= sprites[o->sprite].frame[o->frame].dir[o->dir].drawpoint.y;\n\t\t\n\t\t// don't draw objects that are completely offscreen\n\t\t// (+26 so floattext won't suddenly disappear on object near bottom of screen)\n\t\tif (scr_x <= SCREEN_WIDTH && scr_y <= SCREEN_HEIGHT+26 && \\\n\t\t\tscr_x >= -sprites[o->sprite].w && scr_y >= -sprites[o->sprite].h)\n\t\t{\n\t\t\tif (nOnscreenObjects < MAX_OBJECTS-1)\n\t\t\t{\n\t\t\t\tonscreen_objects[nOnscreenObjects++] = o;\n\t\t\t\to->onscreen = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tstaterr(\"%s:%d: Max Objects Overflow\", __FILE__, __LINE__);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif (!o->invisible && o->sprite != SPR_NULL)\n\t\t\t{\n\t\t\t\tscr_x += o->display_xoff;\n\t\t\t\t\n\t\t\t\tif (o->clip_enable)\n\t\t\t\t{\n\t\t\t\t\tdraw_sprite_clipped(scr_x, scr_y, o->sprite, o->frame, o->dir, o->clipx1, o->clipx2, o->clipy1, o->clipy2);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tdraw_sprite(scr_x, scr_y, o->sprite, o->frame, o->dir);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\to->onscreen = false;\n\t\t}\n\t}\n\t\n\t// draw the player\n\tDrawPlayer();\n\t\n\t// draw foreground map tiles\n\tif (!flipacceltime)\n\t\tmap_draw(TA_FOREGROUND);\n\t\n\t// draw carets (always-on-top effects such as boomflash)\n\tCarets::DrawAll();\n\t\n\t// draw rising/falling water in maps like Almond\n\tmap_drawwaterlevel();\n\t\n\t// draw all floattext (rising damage and XP amounts)\n\tFloatText::DrawAll();\n\t\n\tif (game.debug.DrawBoundingBoxes) DrawBoundingBoxes();\n    //if (game.debug.debugmode) DrawAttrPoints();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool game_load(int num)\n{\nProfile p;\n\n\tstat(\"game_load: loading savefile %d\", num);\n\t\n\tif (profile_load(GetProfileName(num), &p))\n\t\treturn 1;\n\t\n\treturn game_load(&p);\n}\n\nbool game_load(Profile *p)\n{\nint i;\n\n\tplayer->hp = p->hp;\n\tplayer->maxHealth = p->maxhp;\n\t\n\tplayer->whimstar.nstars = p->num_whimstars;\n\tplayer->equipmask = p->equipmask;\n\t\n\t// load weapons\n\tfor(i=0;i<WPN_COUNT;i++)\n\t{\n\t\tplayer->weapons[i].hasWeapon = p->weapons[i].hasWeapon;\n\t\tplayer->weapons[i].level = p->weapons[i].level;\n\t\tplayer->weapons[i].xp = p->weapons[i].xp;\n\t\tplayer->weapons[i].ammo = p->weapons[i].ammo;\n\t\tplayer->weapons[i].maxammo = p->weapons[i].maxammo;\n\t}\n\t\n\tplayer->curWeapon = p->curWeapon;\n\t\n\t// load inventory\n\tmemcpy(player->inventory, p->inventory, sizeof(player->inventory));\n\tplayer->ninventory = p->ninventory;\n\t\n\t// load flags\n\tmemcpy(game.flags, p->flags, sizeof(game.flags));\n\t\n\t// load teleporter slots\n\ttextbox.StageSelect.ClearSlots();\n\tfor(i=0;i<p->num_teleslots;i++)\n\t{\n\t\tint slotno = p->teleslots[i].slotno;\n\t\tint scriptno = p->teleslots[i].scriptno;\n\t\t\n\t\ttextbox.StageSelect.SetSlot(slotno, scriptno);\n\t\tstat(\" - Read Teleporter Slot %d: slotno=%d scriptno=%d\", i, slotno, scriptno);\n\t}\n\t\n\t// have to load the stage last AFTER the flags are loaded because\n\t// of the options to appear and disappear objects based on flags.\n\tif (load_stage(p->stage)) return 1;\n\tmusic(p->songno);\n\t\n\tplayer->x = p->px;\n\tplayer->y = p->py;\n\tplayer->dir = p->pdir;\n\tplayer->hide = false;\n\tgame.showmapnametime = 0;\n\t\n\treturn 0;\n}\n\n\nbool game_save(int num)\n{\nProfile p;\n\n\tstat(\"game_save: writing savefile %d\", num);\n\t\n\tif (game_save(&p))\n\t\treturn 1;\n\t\n\tif (profile_save(GetProfileName(num), &p))\n\t\treturn 1;\n\t\n\treturn 0;\n}\n\nbool game_save(Profile *p)\n{\nint i;\n\n\tmemset(p, 0, sizeof(Profile));\n\t\n\tp->stage = game.curmap;\n\tp->songno = music_cursong();\n\t\n\tp->px = player->x;\n\tp->py = player->y;\n\tp->pdir = player->dir;\n\t\n\tp->hp = player->hp;\n\tp->maxhp = player->maxHealth;\n\t\n\tp->num_whimstars = player->whimstar.nstars;\n\tp->equipmask = player->equipmask;\n\t\n\t// save weapons\n\tp->curWeapon = player->curWeapon;\n\t\n\tfor(i=0;i<WPN_COUNT;i++)\n\t{\n\t\tp->weapons[i].hasWeapon = player->weapons[i].hasWeapon;\n\t\tp->weapons[i].level = player->weapons[i].level;\n\t\tp->weapons[i].xp = player->weapons[i].xp;\n\t\tp->weapons[i].ammo = player->weapons[i].ammo;\n\t\tp->weapons[i].maxammo = player->weapons[i].maxammo;\n\t}\n\t\n\t// save inventory\n\tp->ninventory = player->ninventory;\n\tmemcpy(p->inventory, player->inventory, sizeof(p->inventory));\n\t\n\t// save flags\n\tmemcpy(p->flags, game.flags, sizeof(p->flags));\n\t\n\t// save teleporter slots\n\tfor(i=0;i<NUM_TELEPORTER_SLOTS;i++)\n\t{\n\t\tint slotno, scriptno;\n\t\tif (!textbox.StageSelect.GetSlotByIndex(i, &slotno, &scriptno))\n\t\t{\n\t\t\tp->teleslots[p->num_teleslots].slotno = slotno;\n\t\t\tp->teleslots[p->num_teleslots].scriptno = scriptno;\n\t\t\tp->num_teleslots++;\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// assign sprites for the objects that didn't get covered by the\n// auto-generated spritesetup->cpp, and set some properties on the objects.\n// This is mostly for objects where the sprite is not named the same as\n// the object it is assigned to.\nvoid AssignExtraSprites(void)\n{\n\tobjprop[OBJ_PLAYER].sprite = SPR_MYCHAR;\n\tobjprop[OBJ_NPC_PLAYER].sprite = SPR_MYCHAR;\n\tobjprop[OBJ_PTELIN].sprite = SPR_MYCHAR;\n\tobjprop[OBJ_PTELOUT].sprite = SPR_MYCHAR;\n\t\n\tobjprop[OBJ_NULL].sprite = SPR_NULL;\n\tobjprop[OBJ_HVTRIGGER].sprite = SPR_NULL;\n\tobjprop[OBJ_BUBBLE_SPAWNER].sprite = SPR_NULL;\n\tobjprop[OBJ_DROPLET_SPAWNER].sprite = SPR_NULL;\n\tobjprop[OBJ_HEY_SPAWNER].sprite = SPR_NULL;\n\tobjprop[OBJ_WATERLEVEL].sprite = SPR_NULL;\n\tobjprop[OBJ_LAVA_DRIP_SPAWNER].sprite = SPR_NULL;\n\tobjprop[OBJ_RED_BAT_SPAWNER].sprite = SPR_NULL;\n\tobjprop[OBJ_SCROLL_CONTROLLER].sprite = SPR_NULL;\n\tobjprop[OBJ_DOCTOR_GHOST].sprite = SPR_NULL;\n\tobjprop[OBJ_FALLING_BLOCK].sprite = SPR_NULL;\t// set at runtime based on current map\n\tobjprop[OBJ_FALLING_BLOCK_SPAWNER].sprite = SPR_NULL;\n\tobjprop[OBJ_QUAKE].sprite = SPR_NULL;\n\tobjprop[OBJ_BUTE_SPAWNER].sprite = SPR_NULL;\n\tobjprop[OBJ_SMOKE_DROPPER].sprite = SPR_NULL;\n\n\n\tobjprop[OBJ_BUTE_ARROW].sprite = SPR_BUTE_ARROW_LEFT;\t// so spawn point is applied\n\t\n\tobjprop[OBJ_POLISHBABY].defaultnxflags |= NXFLAG_SLOW_WHEN_HURT;\n\t\n\tobjprop[OBJ_MIMIGAC1].sprite = SPR_MIMIGAC;\n\tobjprop[OBJ_MIMIGAC2].sprite = SPR_MIMIGAC;\n\tobjprop[OBJ_MIMIGAC_ENEMY].sprite = SPR_MIMIGAC;\n\tobjprop[OBJ_MIMIGAC_ENEMY].shaketime = 0;\n\t\n\tobjprop[OBJ_MISERY_FLOAT].sprite = SPR_MISERY;\n\tobjprop[OBJ_MISERY_FLOAT].damage = 1;\n\tobjprop[OBJ_MISERY_STAND].sprite = SPR_MISERY;\n\t\n\tobjprop[OBJ_PUPPY_WAG].sprite = SPR_PUPPY;\n\tobjprop[OBJ_PUPPY_BARK].sprite = SPR_PUPPY;\n\tobjprop[OBJ_PUPPY_CARRY].sprite = SPR_PUPPY;\n\tobjprop[OBJ_PUPPY_SLEEP].sprite = SPR_PUPPY_ASLEEP;\n\tobjprop[OBJ_PUPPY_RUN].sprite = SPR_PUPPY;\n\tobjprop[OBJ_PUPPY_ITEMS].sprite = SPR_PUPPY;\n\t\n\tobjprop[OBJ_BALROG_DROP_IN].sprite = SPR_BALROG;\n\tobjprop[OBJ_BALROG_BUST_IN].sprite = SPR_BALROG;\n\t\n\tobjprop[OBJ_CROWWITHSKULL].sprite = SPR_CROW;\n\tobjprop[OBJ_ARMADILLO].defaultnxflags |= (NXFLAG_FOLLOW_SLOPE | NXFLAG_SLOW_WHEN_HURT);\n\tobjprop[OBJ_SKULLHEAD_CARRIED].sprite = SPR_SKULLHEAD;\n\t\n\tobjprop[OBJ_TOROKO].defaultnxflags |= NXFLAG_FOLLOW_SLOPE;\n\tobjprop[OBJ_TOROKO_TELEPORT_IN].sprite = SPR_TOROKO;\n\t\n\tobjprop[OBJ_KING].defaultnxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\n\tobjprop[OBJ_FAN_DROPLET].sprite = SPR_WATER_DROPLET;\n\t\n\tobjprop[OBJ_MGUN_TRAIL].defaultflags |= FLAG_IGNORE_SOLID;\n\t\n\tobjprop[OBJ_BLOCK_MOVEH].sprite = SPR_MOVING_BLOCK;\n\tobjprop[OBJ_BLOCK_MOVEV].sprite = SPR_MOVING_BLOCK;\n\t\n\tobjprop[OBJ_IRONH].shaketime = 8;\n\t\n\tobjprop[OBJ_OMEGA_BODY].shaketime = 0;\t\t// omega handles his own shaketime\n\tobjprop[OBJ_OMEGA_BODY].hurt_sound = SND_ENEMY_HURT_BIG;\n\t\n\tobjprop[OBJ_OMEGA_LEG].sprite = SPR_OMG_LEG_INAIR;\n\tobjprop[OBJ_OMEGA_STRUT].sprite = SPR_OMG_STRUT;\n\t\n\tobjprop[OBJ_OMEGA_SHOT].death_smoke_amt = 4;\n\tobjprop[OBJ_OMEGA_SHOT].death_sound = SND_EXPL_SMALL;\n\tobjprop[OBJ_OMEGA_SHOT].initial_hp = 1;\n\tobjprop[OBJ_OMEGA_SHOT].xponkill = 1;\n\t\n\tobjprop[OBJ_BAT_HANG].sprite = SPR_BAT;\n\tobjprop[OBJ_BAT_CIRCLE].sprite = SPR_BAT;\n\t\n\tobjprop[OBJ_FIREBALL1].defaultnxflags |= NXFLAG_FOLLOW_SLOPE;\n\tobjprop[OBJ_FIREBALL23].defaultnxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\n\tobjprop[OBJ_CURLY_AI].sprite = SPR_CURLY;\n\tobjprop[OBJ_CURLY_AI].defaultnxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\n\tobjprop[OBJ_CURLY].defaultnxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\n\tobjprop[OBJ_MINICORE].hurt_sound = SND_ENEMY_HURT_COOL;\n\tobjprop[OBJ_CORE_CONTROLLER].hurt_sound = SND_CORE_HURT;\n\t\n\tobjprop[OBJ_CURLY_CARRIED].sprite = SPR_CURLY;\n\t\n\tobjprop[OBJ_BALROG_BOSS_RUNNING].sprite = SPR_BALROG;\n\tobjprop[OBJ_BALROG_BOSS_FLYING].sprite = SPR_BALROG;\n\tobjprop[OBJ_BALROG_BOSS_MISSILES].sprite = SPR_BALROG;\n\t\n\tobjprop[OBJ_XP].sprite = SPR_XP_SMALL;\n\t\n\tobjprop[OBJ_NPC_IGOR].sprite = SPR_IGOR;\n\tobjprop[OBJ_BOSS_IGOR].sprite = SPR_IGOR;\n\tobjprop[OBJ_BOSS_IGOR_DEFEATED].sprite = SPR_IGOR;\n\tobjprop[OBJ_IGOR_BALCONY].sprite = SPR_IGOR;\n\t\n\tobjprop[OBJ_X_TARGET].hurt_sound = SND_ENEMY_HURT_COOL;\n\tobjprop[OBJ_X_INTERNALS].shaketime = 9;\n\tobjprop[OBJ_X_MAINOBJECT].xponkill = 1;\n\t\n\tobjprop[OBJ_POOH_BLACK_BUBBLE].xponkill = 0;\n\tobjprop[OBJ_POOH_BLACK_DYING].sprite = SPR_POOH_BLACK;\n\t\n\tobjprop[OBJ_BOOSTER_FALLING].sprite = SPR_PROFESSOR_BOOSTER;\n\t\n\tobjprop[OBJ_MIMIGA_FARMER_STANDING].sprite = SPR_MIMIGA_FARMER;\n\tobjprop[OBJ_MIMIGA_FARMER_WALKING].sprite = SPR_MIMIGA_FARMER;\n\tobjprop[OBJ_DROLL_GUARD].sprite = SPR_DROLL;\n\t\n\tobjprop[OBJ_MA_PIGNON_CLONE].sprite = SPR_MA_PIGNON;\n\t\n\tobjprop[OBJ_DOCTOR_SHOT_TRAIL].sprite = SPR_DOCTOR_SHOT;\n\t\n\t// they're still able to detect when they touch floor; etc,\n\t// but we don't want say a falling one to get blocked by the ceiling.\n\tobjprop[OBJ_RED_ENERGY].defaultflags |= FLAG_IGNORE_SOLID;\n\t\n\tobjprop[OBJ_SUE_TELEPORT_IN].sprite = SPR_SUE;\n\t\n\tobjprop[OBJ_MISERY_BAT].sprite = SPR_ORANGE_BAT_FINAL;\n\tobjprop[OBJ_UD_MINICORE_IDLE].sprite = SPR_UD_MINICORE;\n\t\n\tobjprop[OBJ_WHIMSICAL_STAR].sprite = SPR_WHIMSICAL_STAR;\t// for bbox only, object is invisible\n\t\n\t// these are set by AI; this is just to silence unimplemented object warnings\n\t#ifdef DEBUG\n\tobjprop[OBJ_CRITTER_FLYING].sprite = SPR_CRITTER_FLYING_CYAN;\n\tfor(int i=OBJ_SHOTS_START;i<=OBJ_SHOTS_END;i++)\n\t\tif (objprop[i].sprite==SPR_UNIMPLEMENTED_OBJECT) objprop[i].sprite = SPR_NULL;\n\t#endif\n}\n\n"
  },
  {
    "path": "game.fdh",
    "content": "//hash:1a5f54ff\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nvoid game_tick_normal(void);\nvoid quake(int quaketime, int snd);\nvoid megaquake(int quaketime, int snd);\nvoid DrawScene(void);\nbool game_load(int num);\nbool game_load(Profile *p);\nbool game_save(int num);\nbool game_save(Profile *p);\nvoid AssignExtraSprites(void);\n\n\n/* located in ObjManager.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nbool initmapfirsttime(void);\nvoid initmap(void);\nvoid map_scroll_jump(int x, int y);\nvoid map_scroll_do(void);\nvoid map_draw_map_name(void);\nvoid AnimateMotionTiles(void);\nvoid map_draw_backdrop(void);\nvoid map_draw(uint8_t foreground);\nvoid map_drawwaterlevel(void);\nbool load_stage(int stage_no);\n\n\n/* located in profile.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nbool profile_load(const char *pfname, Profile *file);\nconst char *GetProfileName(int num);\nbool profile_save(const char *pfname, Profile *file);\n\n\n/* located in slope.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nbool initslopetable(void);\n\n\n/* located in player.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nvoid InitPlayer(void);\nvoid PHandleAttributes(void);\nvoid PSelectFrame(void);\nvoid PInitFirstTime();\nvoid HandlePlayer(void);\nvoid HandlePlayer_am(void);\nvoid DrawPlayer(void);\n\n\n/* located in statusbar.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nbool statusbar_init(void);\nvoid DrawStatusBar(void);\nvoid niku_run();\nvoid niku_draw(int value, bool force_white);\n\n\n/* located in tsc.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nScriptInstance *StartScript(int scriptno, int pageno);\nvoid RunScripts(void);\nvoid StopScripts(void);\n\n\n/* located in debug.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nvoid debug_clear();\nvoid DrawDebug(void);\nvoid DrawBoundingBoxes();\n\n\n/* located in ai/ai.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nbool ai_init(void);\n\n\n/* located in sound/sound.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nvoid StopLoopSounds(void);\nvoid sound(int snd);\nvoid music(int songno);\nint music_cursong();\n\n\n/* located in autogen/AssignSprites.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nvoid AssignSprites(void);\n\n\n/* located in common/stat.cpp */\n\n//---------------------[referenced from game.cpp]--------------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "game.h",
    "content": "\n#ifndef _GAME_H\n#define _GAME_H\n\nenum Directions\n{\n\tRIGHT\t= 0,\n\tLEFT\t= 1,\n\tUP\t\t= 2,\n\tDOWN\t= 3,\n\tCENTER\t= 5\n};\n\n#define GAME_FPS\t\t50\n\n// for UpdateBlockedStates\n#define RIGHTMASK\t\t0x01\n#define LEFTMASK\t\t0x02\n#define UPMASK\t\t\t0x04\n#define DOWNMASK\t\t0x08\n#define ALLDIRMASK\t\t(LEFTMASK | RIGHTMASK | UPMASK | DOWNMASK)\n\n// highest addressable flag by tsc scripts etc\n#define NUM_GAMEFLAGS\t\t8000\n\n// switchstage.mapno is set to this to load a game\n#define MAPNO_SPECIALS\t\t1000\n#define LOAD_GAME\t\t\t1000\n#define NEW_GAME\t\t\t1001\n#define NEW_GAME_FROM_MENU\t1002\t// new game (include Kazuma cutscene)\n#define LOAD_GAME_FROM_MENU\t1003\t// load game (from title screen, include weapon slide)\n#define START_REPLAY\t\t1004\n\n// game modes (changes *tickfunction)\nenum GameModes\n{\n\tGM_NONE,\t\t\t// default mode at startup & shutdown\n\tGM_NORMAL,\t\t\t// playing the game\n\tGM_INVENTORY,\t\t// in inventory screen\n\tGM_MAP_SYSTEM,\t\t// viewing Map System\n\tGM_ISLAND,\t\t\t// XX1 good-ending island-crash cutscene\n\tGM_CREDITS,\t\t\t// <CRE credits\n\tGM_INTRO,\t\t\t// intro\n\tGM_TITLE,\t\t\t// title screen\n\t\n\tGP_PAUSED,\t\t\t// pausemode: Pause (use game.pause())\n\tGP_OPTIONS,\t\t\t// pausemode: Options (use game.pause())\n\t\n\tNUM_GAMEMODES\n};\n\n// note: this structure is memsetted at 0 at startup.\n// ensure it doesn't contain any non-POD types that would be harmed by this.\nstruct Game\n{\n\tbool running;\n\tbool frozen;\n\t\n\tint mode;\n\tint paused;\n\t\n\tint curmap;\n\tint showmapnametime;\n\tint mapname_x;\n\t\n\tuint32_t counter;\t// Nikumaru counter value\n\t\n\tstruct\n\t{\n\t\tbool god;\n\t\t//bool debugmode;\n\t\tbool infinite_damage;\n\t\tbool DrawBoundingBoxes;\n\t} debug;\n\t\n\t// if mapno becomes >= 0 the stage ends and we switch to the new stage\n\tstruct\n\t{\n\t\tint mapno;\n\t\tint playerx, playery;\n\t\tint eventonentry;\n\t\tint param;\n\t} switchstage;\n\t\n\t// game flags and skipflags as set by scripts\n\tbool flags[NUM_GAMEFLAGS];\n\tbool skipflags[NUM_GAMEFLAGS];\n\t\n\t// earthquake effect; <QUA command\n\tint quaketime;\n\tint megaquaketime;\n\t\n\t// stuff for boss bar\n \tstruct\n\t{\n\t\tObject *object;\t\t\t// if != NULL, a boss bar is shown displaying this object's remaining health\n\t\tint starting_hp;\t\t// HP boss had when <BSL was called\n\t\tbool defeated;\t\t\t// set to true when boss is defeated\n\t\tPercentBar bar;\n\t} bossbar;\n\t\n\tStageBossManager stageboss;\n\t\n\t// set by enemies in Labyrinth M and by Almond Core to tell\n\t// curly where to shoot at (it's like a hint)\n\tstruct\n\t{\n\t\tint x, y, timeleft;\n\t} curlytarget;\n\t\n\tint fullscreen;\n\tint ffwdtime;\t\t// debug option: disables speed-limiting for ffwdtime ticks\n\t\n// ---------------------------------------\n\n\t// static member functions--not private (Game is an object, not a namespace)\n\tstatic bool init();\n\tstatic bool initlevel();\n\tstatic bool createplayer();\n\t\n\tstatic void switchmap(int mapno, int scriptno=0, int px=0, int py=0);\n\tstatic void reset();\n\t\n\tstatic bool setmode(int newmode, int param=0, bool force=false);\n\tstatic bool pause(int pausemode, int param=0);\n\tstatic void tick();\n\t\n\tstatic void close();\n};\n\n// NPC flags definitions\n#define FLAG_SOLID_MUSHY\t\t\t0x0001\t// object blocks player but is a little \"mushy\" (normal solid state for enemies)\n#define FLAG_IGNORETILE44\t\t\t0x0002\n#define FLAG_INVULNERABLE\t\t\t0x0004\n#define FLAG_IGNORE_SOLID\t\t\t0x0008\n#define FLAG_BOUNCY\t\t\t\t\t0x0010\t// when SOLID_BRICK also set, acts like a mini trampoline\n#define FLAG_SHOOTABLE\t\t\t\t0x0020\n#define FLAG_SOLID_BRICK\t\t\t0x0040\t// object's entire bbox is rock-solid, just like a solid tile\n#define FLAG_NOREARTOPATTACK\t\t0x0080\n#define FLAG_SCRIPTONTOUCH\t\t\t0x0100\n#define FLAG_SCRIPTONDEATH\t\t\t0x0200\n#define FLAG_DROP_POWERUPS_DONTUSE\t0x0400\t// not used here because it doesn't seem to be set on some npc.tbl entries which DO in fact spawn powerups; see the nxflag which replaces it\n#define FLAG_APPEAR_ON_FLAGID\t\t0x0800\n#define FLAG_FACES_RIGHT\t\t\t0x1000\n#define FLAG_SCRIPTONACTIVATE\t\t0x2000\n#define FLAG_DISAPPEAR_ON_FLAGID\t0x4000\n#define FLAG_SHOW_FLOATTEXT\t\t\t0x8000\n\n// NXEngine flag definitions\n#define NXFLAG_FOLLOW_SLOPE\t\t\t0x0001\t// enable moving up/down slopes when moving horizontally\n#define NXFLAG_SLOW_X_WHEN_HURT\t\t0x0002\t// move at half X speed when shaking from damage\n#define NXFLAG_SLOW_Y_WHEN_HURT\t\t0x0004\t// move at half Y speed when shaking from damage\n#define NXFLAG_THUD_ON_RIDING\t\t0x0008\t// if set there is a \"thud\" sound when player lands on it\n#define NXFLAG_NO_RESET_YINERTIA\t0x0010\t// don't zero yinertia on blocku/blockd\n#define NXFLAG_CONSOLE_ANIMATE\t\t0x0020\t// spawned at console and is implicit target of subsequent animate commands\n\n#define NXFLAG_SLOW_WHEN_HURT\t\t(NXFLAG_SLOW_X_WHEN_HURT | NXFLAG_SLOW_Y_WHEN_HURT)\n\nextern Game game;\nextern TextBox textbox;\n\nextern Object *onscreen_objects[MAX_OBJECTS];\nextern int nOnscreenObjects;\n\nvoid debug(const char *fmt, ...);\nvoid quake(int quaketime, int snd=-1);\nvoid megaquake(int quaketime, int snd=-1);\n\nstruct Profile;\nbool game_load(int num);\nbool game_load(Profile *p);\nbool game_save(int num);\nbool game_save(Profile *p);\n\n#endif\n"
  },
  {
    "path": "graphics/fbdev.cpp",
    "content": "\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <unistd.h>\n#include <string.h>\n#include <sys/ioctl.h>\n#include <linux/fb.h>\n#include <sys/mman.h>\n#include <sys/time.h>\n\n#include <fcntl.h>\n\n#include \"../config.h\"\n#include \"fbdev.fdh\"\n\nstatic int fd = -1;\nstatic struct fb_var_screeninfo vinfo;\nstatic struct fb_fix_screeninfo finfo;\nstatic uint8_t *framebuffer = NULL;\nstatic uint8_t *start_addr = NULL;\nstatic int depth, screen_pitch;\nstatic int vram_length;\n\nbool fbdev_init(void)\n{\n\tstat(\"Initilizing framebuffer...\");\n\t\n\tfd = open(\"/dev/fb0\", O_RDWR);\n\tif (fd == -1)\n\t{\n\t\tstaterr(\"Could not open framebuffer.\");\n\t\treturn 1;\n\t}\n\n\t// Get fixed screen information\n\tif (ioctl(fd, FBIOGET_FSCREENINFO, &finfo))\n\t{\n\t\tstaterr(\"Could not read fixed screen info.\");\n\t\treturn 1;\n\t}\n\n\t// Get variable screen information\n\tif (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo))\n\t{\n\t\tstaterr(\"Could not read variable screen info.\");\n\t\treturn 1;\n\t}\n\n\tstat(\"Framebuffer %dx%d, %dbpp\", vinfo.xres_virtual, vinfo.yres_virtual, vinfo.bits_per_pixel);\n\tdepth = (vinfo.bits_per_pixel / 8);\n\tscreen_pitch = (vinfo.xres_virtual * depth);\n\tvram_length = (vinfo.yres_virtual * screen_pitch);\n\n\t// Map the device to memory\n\tframebuffer = (uint8_t *)mmap(0, vram_length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);\n\tif (framebuffer == MAP_FAILED)\n\t{\n\t\tstaterr(\"Framebuffer mmap failed!\");\n\t\treturn 1;\n\t}\n\n\tstat(\"Framebuffer init success!\");\n\tstart_addr = framebuffer;\n\treturn 0;\n}\n\nvoid fbdev_close(void)\n{\n\tif (framebuffer)\n\t\tmunmap(framebuffer, vram_length);\n\t\n\tif (fd != -1)\n\t\tclose(fd);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid fbdev_blit(uint8_t *source, int width, int height)\n{\n\tuint8_t *ptr = start_addr;\n\tint line_len = (width * depth);\n\t\n\tfor(int y=0;y<height;y++)\n\t{\n\t\tmemcpy(ptr, source, line_len);\n\t\t\n\t\tsource += line_len;\n\t\tptr += screen_pitch;\n\t}\n}\n\nvoid fbdev_test(void)\n{\n\tstat(\"Performing fbdev test!\");\n\tuint8_t *crap = (uint8_t *)malloc(40000);\n\t\n\tuint64_t end = timer() + 1000;\n\tint c = 281;\n\tint fps = 0;\n\t\n\twhile(timer() < end)\n\t{\n\t\tuint8_t *ptr = framebuffer;\n\t\tfor(int y=0;y<480;y++)\n\t\t{\n\t\t\tmemcpy(ptr, crap, 640*2);\n\t\t\tptr += 1024*2;\n\t\t}\n\t\t\n\t\tc ^= 4;\n\t\tfps++;\n\t}\n\t\n\tstat(\"Got %d fps\", fps);\n}\n\n\n\nstatic uint64_t timer(void)\n{\nstruct timeval tv;\nuint64_t result;\n\n\tgettimeofday(&tv, NULL);\n\t\n\tresult = tv.tv_sec;\n\tresult *= 1000;\n\tresult += (tv.tv_usec / 1000);\n\treturn (uint64_t)result;\n}\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "graphics/fbdev.fdh",
    "content": "//hash:180b8a59\n//automatically generated by Makegen\n\n/* located in graphics/fbdev.cpp */\n\n//----------------[referenced from graphics/fbdev.cpp]---------------//\nbool fbdev_init(void);\nvoid fbdev_close(void);\nvoid fbdev_blit(uint8_t *source, int width, int height);\nvoid fbdev_test(void);\nstatic uint64_t timer(void);\n\n\n/* located in common/stat.cpp */\n\n//----------------[referenced from graphics/fbdev.cpp]---------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "graphics/font.cpp",
    "content": "\n#include \"../config.h\"\n#include <SDL/SDL.h>\n\n#ifdef CONFIG_ENABLE_TTF\n\t#include <SDL/SDL_ttf.h>\n#endif\n\n#include \"../nx.h\"\n#include \"font.h\"\n#include \"font.fdh\"\n\nstatic int text_draw(int x, int y, const char *text, int spacing=0, NXFont *font=&whitefont);\n\n#define SHADOW_OFFSET\t\t2\t\t// distance of drop shadows\n\n#define BITMAP_CHAR_WIDTH\t5\t\t// width of each char\n#define BITMAP_CHAR_HEIGHT\t9\t\t// height of each char\n#define BITMAP_SPAC_WIDTH\t8\t\t// how far apart chars are from each other on the sheet\n#define BITMAP_SPAC_HEIGHT\t12\t\t// ditto for Y-spacing\n\n// For convert cp1251 to utf-8\nint wtable[64] = {\n  0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021,\n  0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F,\n  0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,\n  0x007F, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F,\n  0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7,\n  0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407,\n  0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7,\n  0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457\n};\n\nstatic const char bitmap_map[] = {\t\t// letter order of bitmap font sheet\n\t\" !\\\"#$%&`()*+,-./0123456789:;<=>?\"\n\t\"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]%_\"\n\t\"'abcdefghijklmnopqrstuvwxyz{|}~\"\n};\n\nconst char *bmpfontfile = \"smalfont.bmp\";\n\n#if defined(_320X240) || defined(_480X272)\nconst char *ttffontfile = \"DroidSansMono.ttf\";\n#else\nconst char *ttffontfile = \"font.ttf\";\n#endif\n\nstatic SDL_Surface *sdl_screen = NULL;\nstatic SDL_Surface *shadesfc = NULL;\n\nstatic bool initilized = false;\nstatic bool rendering = true;\nstatic bool shrink_spaces = true;\nstatic int fontheight = 0;\n\nNXFont whitefont;\nNXFont greenfont;\nNXFont bluefont;\t\t// used for \"F3:Options\" text on pause screen\nNXFont shadowfont;\t\t// white letters w/ drop shadow\n\n// point sizes for each valid scaling factor\nint pointsize[] = { -1,  10, 17, 26 };\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool font_init(void)\n{\nbool error = false;\n\n\t// we'll be bypassing the NXSurface automatic scaling features\n\t// and drawing at the real resolution so we can get better-looking fonts.\n\tsdl_screen = screen->GetSDLSurface();\n\n\t// at 320x240 switch to bitmap fonts for better appearance\n#if (defined(_320X240) || defined(_480X272)) && defined(_L10N_CP1251)\n    if (false)\n#elif defined(CONFIG_ENABLE_TTF)\n    if (SCALE == 1)\n#endif\n\t{\n\t\tstat(\"fonts: using bitmapped from %s\", bmpfontfile);\n\n\t\tSDL_Surface *sheet = SDL_LoadBMP(bmpfontfile);\n\t\tif (!sheet)\n\t\t{\n\t\t\tstaterr(\"Couldn't open bitmap font file: '%s'\", bmpfontfile);\n\t\t\treturn 1;\n\t\t}\n\n\t\tuint32_t fgindex = SDL_MapRGB(sheet->format, 255, 255, 255);\n\n\t\terror |= whitefont.InitBitmapChars(sheet, fgindex, 0xffffff);\n\t\terror |= greenfont.InitBitmapChars(sheet, fgindex, 0x00ff80);\n\t\terror |= bluefont.InitBitmapChars(sheet, fgindex, 0xa0b5de);\n\t\terror |= shadowfont.InitBitmapCharsShadowed(sheet, fgindex, 0xffffff, 0x000000);\n\t}\n    #ifdef CONFIG_ENABLE_TTF\n\telse\n\t{\n\t\tstat(\"fonts: using truetype at %dpt\", pointsize[SCALE]);\n\n\t\t// initilize normal TTF fonts\n\t\tif (TTF_Init() < 0)\n\t\t{\n\t\t\tstaterr(\"Couldn't initialize SDL_ttf: %s\", TTF_GetError());\n\t\t\treturn 1;\n\t\t}\n\n        TTF_Font *font = TTF_OpenFont(ttffontfile, pointsize[SCALE]);\n\t\tif (!font)\n\t\t{\n\t\t\tstaterr(\"Couldn't open font: '%s'\", ttffontfile);\n\t\t\treturn 1;\n\t\t}\n\n\t\terror |= whitefont.InitChars(font, 0xffffff);\n\t\terror |= greenfont.InitChars(font, 0x00ff80);\n\t\terror |= bluefont.InitChars(font, 0xa0b5de);\n\t\terror |= shadowfont.InitCharsShadowed(font, 0xffffff, 0x000000);\n\n\t\tTTF_CloseFont(font);\n\t}\n    #endif\n\n\terror |= create_shade_sfc();\n\tif (error) return 1;\n\n\tfontheight = (whitefont.letters['M']->h / SCALE);\n\tinitilized = true;\n\treturn 0;\n}\n\nvoid font_close(void)\n{\n\n}\n\nbool font_reload()\n{\n\tif (!initilized) return 0;\n\n\twhitefont.free();\n\tgreenfont.free();\n\tbluefont.free();\n\tshadowfont.free();\n\n\treturn font_init();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nNXFont::NXFont()\n{\n\tmemset(letters, 0, sizeof(letters));\n}\n\nNXFont::~NXFont()\n{\n\tfree();\n}\n\nvoid NXFont::free()\n{\n\tfor(int i=0;i<NUM_LETTERS_RENDERED;i++)\n\t{\n\t\tif (letters[i]) SDL_FreeSurface(letters[i]);\n\t\tletters[i] = NULL;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n#ifdef CONFIG_ENABLE_TTF\nbool NXFont::InitChars(TTF_Font *font, uint32_t color)\n{\nSDL_Color fgcolor;\nSDL_Surface *letter;\n\n\tfgcolor.r = (uint8_t)(color >> 16);\n\tfgcolor.g = (uint8_t)(color >> 8);\n\tfgcolor.b = (uint8_t)(color);\n\n#ifdef _L10N_CP1251\n    char utf8_str[2];\n#endif\n\n\tchar str[2];\n\tstr[1] = 0;\n\n\tfor(int i=1;i<NUM_LETTERS_RENDERED;i++)\n\t{\n\t\tstr[0] = i;\n#ifndef _L10N_CP1251\n        letter = TTF_RenderUTF8_Solid(font, str, fgcolor);\n#else\n        win1251_to_utf8(str, utf8_str);\n        letter = TTF_RenderUTF8_Solid(font, utf8_str, fgcolor);\n#endif\n\t\tif (!letter)\n\t\t{\n\t\t\tstaterr(\"InitChars: failed to render character %d: %s\", i, TTF_GetError());\n\t\t\treturn 1;\n\t\t}\n\n\t\tletters[i] = SDL_DisplayFormat(letter);\n\t\tSDL_FreeSurface(letter);\n\t}\n\n\treturn 0;\n}\n\n// create a font with a drop-shadow (used for \"MNA\" stage-name displays)\nbool NXFont::InitCharsShadowed(TTF_Font *font, uint32_t color, uint32_t shadowcolor)\n{\nSDL_Color fgcolor, shcolor;\nSDL_Surface *top, *bottom;\nSDL_Rect dstrect;\n\n\tfgcolor.r = (uint8_t)(color >> 16);\n\tfgcolor.g = (uint8_t)(color >> 8);\n\tfgcolor.b = (uint8_t)(color);\n\n\tshcolor.r = (uint8_t)(shadowcolor >> 16);\n\tshcolor.g = (uint8_t)(shadowcolor >> 8);\n\tshcolor.b = (uint8_t)(shadowcolor);\n\n#ifdef _L10N_CP1251\n    char utf8_str[2];\n#endif\n\n\tchar str[2];\n\tstr[1] = 0;\n\n\tSDL_PixelFormat *format = sdl_screen->format;\n\tuint32_t transp = SDL_MapRGB(format, 255, 0, 255);\n\n\tfor(int i=1;i<NUM_LETTERS_RENDERED;i++)\n\t{\n\t\tstr[0] = i;\n\n#ifndef _L10N_CP1251\n        top = TTF_RenderUTF8_Solid(font, str, fgcolor);\n        bottom = TTF_RenderUTF8_Solid(font, str, shcolor);\n#else\n        win1251_to_utf8(str, utf8_str);\n        top = TTF_RenderUTF8_Solid(font, utf8_str, fgcolor);\n        bottom = TTF_RenderUTF8_Solid(font, utf8_str, shcolor);\n#endif\n\t\tif (!top || !bottom)\n\t\t{\n\t\t\tstaterr(\"InitCharsShadowed: failed to render character %d: %s\", i, TTF_GetError());\n\t\t\treturn 1;\n\t\t}\n\n\t\tletters[i] = SDL_CreateRGBSurface(SDL_SRCCOLORKEY, top->w, top->h+SHADOW_OFFSET,\n\t\t\t\t\t\t\tformat->BitsPerPixel, format->Rmask, format->Gmask,\n\t\t\t\t\t\t\tformat->Bmask, format->Amask);\n\t\tif (!letters[i])\n\t\t{\n\t\t\tstaterr(\"InitCharsShadowed: failed to create surface for character %d: %s\", i, SDL_GetError());\n\t\t\treturn 1;\n\t\t}\n\n\t\tSDL_FillRect(letters[i], NULL, transp);\n\t\tSDL_SetColorKey(letters[i], SDL_SRCCOLORKEY, transp);\n\n\t\tdstrect.x = 0;\n\t\tdstrect.y = SHADOW_OFFSET;\n\t\tSDL_BlitSurface(bottom, NULL, letters[i], &dstrect);\n\n\t\tdstrect.x = 0;\n\t\tdstrect.y = 0;\n\t\tSDL_BlitSurface(top, NULL, letters[i], &dstrect);\n\t}\n\n    return 0;\n}\n\n/* Universal way to convert Windows-1251 to UTF-8 by Den Zurin\n * (c) http://www.gamedev.ru/code/forum/?id=119312&page=2#m17 */\n\nint NXFont::win1251_to_utf8(const char *text, char *utext)\n{\n    int wc;\n    int i, j;\n    if (!utext) {\n        return 0;\n    }\n    i=0;\n    j=0;\n    while (i<strlen(text)) {\n        wc = (unsigned char)text[i++];\n        // Windows-1251 to Unicode\n        if (wc>=0x80) {\n            if (wc<=0xBF) {\n                wc = wtable[wc-0x80];\n            }\n            else if (wc>=0xC0 && wc<=0xDF) {\n                wc = wc - 0xC0 + 0x0410;\n            }\n            else if (wc>=0xE0) {\n                wc = wc - 0xE0 + 0x0430;\n            }\n        }\n        // Unicode to UTF-8\n        // 0x00000000 — 0x0000007F -> 0xxxxxxx\n        // 0x00000080 — 0x000007FF -> 110xxxxx 10xxxxxx\n        // 0x00000800 — 0x0000FFFF -> 1110xxxx 10xxxxxx 10xxxxxx\n        // 0x00010000 — 0x001FFFFF -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n        if (wc<0x80) {\n            utext[j++] = (char)wc;\n        } else if (wc<0x800) {\n            utext[j++] = (char)((wc>>6)   | 0xC0);\n            utext[j++] = (char)((wc&0x3F) | 0x80);\n        } else if (wc<0x10000) {\n            utext[j++] = (char)((wc>>12)  | 0xE0);\n            utext[j++] = (char)((wc>>6)   | 0x80);\n            utext[j++] = (char)((wc&0x3F) | 0x80);\n        } else {\n            utext[j++] = (char)((wc>>18)  | 0xF0);\n            utext[j++] = (char)((wc>>12)  | 0x80);\n            utext[j++] = (char)((wc>>6)   | 0x80);\n            utext[j++] = (char)((wc&0x3F) | 0x80);\n        }\n    }\n    utext[j] = 0x00;\n    return 1;\n}\n\n#endif\t\t//CONFIG_ENABLE_TTF\n\n/*\nvoid c------------------------------() {}\n*/\n\n// Create a font from a bitmapped font sheet.\n// sheet: a 8bpp (paletted) sheet to create the font from.\n// fgindex: color index of foreground color of letters.\n// color: the color you want the letters to be.\nbool NXFont::InitBitmapChars(SDL_Surface *sheet, uint32_t fgcolor, uint32_t color)\n{\nSDL_PixelFormat *format = sdl_screen->format;\nSDL_Rect srcrect, dstrect;\nSDL_Surface *letter;\nint x, y, i;\n\n\t// NULL out letters we don't have a character for\n\tmemset(this->letters, 0, sizeof(this->letters));\n\n\t// change the color of the letters by messing with the palette on the sheet\n\tReplaceColor(sheet, fgcolor, color);\n\n\t// start at the top of the letter sheet.\n\tx = 0;\n\ty = 0;\n\tfor(i=0;bitmap_map[i];i++)\n\t{\n\t\tuint8_t ch = bitmap_map[i];\n\t\t//stat(\"copying letter %d: '%c' from [%d,%d]\", i, ch, x, y);\n\n\t\t// make character surface one pixel larger than the actual char so that there\n\t\t// is some space between letters in autospaced text such as on the menus.\n\t\tletter = SDL_CreateRGBSurface(SDL_SRCCOLORKEY, \\\n\t\t\t\t\t\t\tBITMAP_CHAR_WIDTH+1, BITMAP_CHAR_HEIGHT+1,\n\t\t\t\t\t\t\tformat->BitsPerPixel, \\\n\t\t\t\t\t\t\tformat->Rmask, format->Gmask,\n\t\t\t\t\t\t\tformat->Bmask, format->Amask);\n\t\tif (!letter)\n\t\t{\n\t\t\tstaterr(\"InitBitmapChars: failed to create surface for character %d/%d\", i, ch);\n\t\t\treturn 1;\n\t\t}\n\n\t\tSDL_FillRect(letter, NULL, SDL_MapRGB(format, 0, 0, 0));\n\n\t\t// copy letter off of sheet\n\t\tsrcrect.x = x;\n\t\tsrcrect.y = y;\n\t\tsrcrect.w = BITMAP_CHAR_WIDTH;\n\t\tsrcrect.h = BITMAP_CHAR_HEIGHT;\n\n\t\tdstrect.x = 0;\n\t\tdstrect.y = 0;\n\n\t\tSDL_BlitSurface(sheet, &srcrect, letter, &dstrect);\n\n\t\t// make background transparent and copy into final position\n\t\tSDL_SetColorKey(letter, SDL_SRCCOLORKEY, SDL_MapRGB(format, 0, 0, 0));\n\n\t\tletters[ch] = SDL_DisplayFormat(letter);\n\t\tSDL_FreeSurface(letter);\n\n\t\t// advance to next position on sheet\n\t\tx += BITMAP_SPAC_WIDTH;\n\t\tif (x >= sheet->w)\n\t\t{\n\t\t\tx = 0;\n\t\t\ty += BITMAP_SPAC_HEIGHT;\n\t\t}\n\t}\n\n\treturn 0;\n}\n\n// create a bitmapped font with a drop-shadow.\nbool NXFont::InitBitmapCharsShadowed(SDL_Surface *sheet, uint32_t fgcolor, \\\n\t\t\t\t\t\t\t\t\tuint32_t color, uint32_t shadowcolor)\n{\nSDL_PixelFormat *format = sdl_screen->format;\nNXFont fgfont, shadowfont;\nSDL_Rect dstrect;\n\n\t// create temporary fonts in the fg and shadow color\n\tif (fgfont.InitBitmapChars(sheet, fgcolor, color))\n\t\treturn 1;\n\n\tif (shadowfont.InitBitmapChars(sheet, fgcolor, shadowcolor))\n\t\treturn 1;\n\n\t// now combine the two fonts\n\tuint32_t transp = SDL_MapRGB(format, 0, 0, 0);\n\tfor(int i=0;i<NUM_FONT_LETTERS;i++)\n\t{\n\t\tif (fgfont.letters[i])\n\t\t{\n\t\t\tletters[i] = SDL_CreateRGBSurface(SDL_SRCCOLORKEY, \\\n\t\t\t\t\t\t\tBITMAP_CHAR_WIDTH+1, BITMAP_CHAR_HEIGHT+1+SHADOW_OFFSET,\n\t\t\t\t\t\t\tformat->BitsPerPixel, \\\n\t\t\t\t\t\t\tformat->Rmask, format->Gmask,\n\t\t\t\t\t\t\tformat->Bmask, format->Amask);\n\n\t\t\tSDL_FillRect(letters[i], NULL, transp);\n\t\t\tSDL_SetColorKey(letters[i], SDL_SRCCOLORKEY, transp);\n\n\t\t\tdstrect.x = 0;\n\t\t\tdstrect.y = SHADOW_OFFSET;\n\t\t\tSDL_BlitSurface(shadowfont.letters[i], NULL, letters[i], &dstrect);\n\n\t\t\tdstrect.x = 0;\n\t\t\tdstrect.y = 0;\n\t\t\tSDL_BlitSurface(fgfont.letters[i], NULL, letters[i], &dstrect);\n\t\t}\n\t}\n\n\treturn 0;\n}\n\n\n// if sfc is an 8bpp paletted surface, change color index 'oldcolor' to be newcolor.\n// if sfc is a 16bpp surface, replace all instances of color 'oldcolor' with 'newcolor'\nvoid NXFont::ReplaceColor(SDL_Surface *sfc, uint32_t oldcolor, uint32_t newcolor)\n{\n\t#ifndef __SDLSHIM__\n\tif (sfc->format->BitsPerPixel == 8)\n\t{\n\t\tSDL_Color desired;\n\n\t\tdesired.r = (newcolor >> 16) & 0xff;\n\t\tdesired.g = (newcolor >> 8) & 0xff;\n\t\tdesired.b = (newcolor & 0xff);\n\n\t\tSDL_SetColors(sfc, &desired, oldcolor, 1);\n\t}\n\telse\n\t#endif\n\t{\n\t\tuint16_t *pixels = (uint16_t *)sfc->pixels;\n\t\tint npixels = (sfc->w * sfc->h);\n\n\t\tfor(int i=0;i<npixels;i++)\n\t\t{\n\t\t\tif (pixels[i] == oldcolor)\n\t\t\t\tpixels[i] = newcolor;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n#ifdef __SDLSHIM__\nvoid direct_text_draw(int x, int y, const char *text)\n{\nSDL_Rect dstrect;\n\n\tfor(int i=0;text[i];i++)\n\t{\n\t\tSDL_Surface *letter = whitefont.letters[text[i]];\n\n\t\tif (letter)\n\t\t{\n\t\t\tdstrect.x = x;\n\t\t\tdstrect.y = y;\n\t\t\tSDL_BlitSurface(letter, NULL, SDLS_VRAMSurface, &dstrect);\n\t\t}\n\n\t\tx += 8;\n\t}\n}\n#endif\n\n\n// draw a text string\nstatic int text_draw(int x, int y, const char *text, int spacing, NXFont *font)\n{\nint orgx = x;\nint i;\nSDL_Rect dstrect;\n\n\tfor(i=0;text[i];i++)\n\t{\n\t\tuint8_t ch = text[i];\n\t\tSDL_Surface *letter = font->letters[ch];\n\n\t\tif (ch == '=' && game.mode != GM_CREDITS)\n\t\t{\n\t\t\tif (rendering)\n\t\t\t{\n\t\t\t\tint yadj = (SCALE==1) ? 1:2;\n\t\t\t\tdraw_sprite((x/SCALE), (y/SCALE)+yadj, SPR_TEXTBULLET);\n\t\t\t}\n\t\t}\n\t\telse if (rendering && ch != ' ' && letter)\n\t\t{\n\t\t\t// must set this every time, because SDL_BlitSurface overwrites\n\t\t\t// dstrect with final clipping rectangle.\n\t\t\tdstrect.x = x;\n\t\t\tdstrect.y = y;\n\t\t\tSDL_BlitSurface(letter, NULL, sdl_screen, &dstrect);\n\t\t}\n\n\t\tif (spacing != 0)\n\t\t{\t// fixed spacing\n\t\t\tx += spacing;\n\t\t}\n\t\telse\n\t\t{\t// variable spacing\n\t\t\tif (ch == ' ' && shrink_spaces)\n\t\t\t{\t// 10.5 px for spaces - make smaller than they really are - the default\n\t\t\t\tx += (SCALE == 1) ? 5 : 10;\n\t\t\t\tif (i & 1) x++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (letter)\n\t\t\t\t\tx += letter->w;\n\t\t\t}\n\t\t}\n\t}\n\n\t// return the final width of the text drawn\n    return (x - orgx);\n}\n\n\nint GetFontWidth(const char *text, int spacing, bool is_shaded)\n{\nint wd;\n\n\tif (spacing)\n\t\treturn (strlen(text) * spacing);\n\n\trendering = false;\n\tshrink_spaces = !is_shaded;\n\n\twd = text_draw(0, 0, text, spacing * SCALE);\n\n\trendering = true;\n\tshrink_spaces = true;\n\n\treturn (wd / SCALE);\n}\n\nint GetFontHeight()\n{\n\treturn fontheight;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// create the shadesfc, used by font_draw_shaded. It's just a big long black surface\n// with 50% per-surface alpha applied, that we can use to darken the background.\nstatic bool create_shade_sfc(void)\n{\n\tif (shadesfc)\n\t\tSDL_FreeSurface(shadesfc);\n\n\tint wd = (SCREEN_WIDTH * SCALE);\n\tint ht = whitefont.letters['M']->h;\n\n\tSDL_PixelFormat *format = sdl_screen->format;\n\tshadesfc = SDL_CreateRGBSurface(SDL_SRCALPHA | SDL_HWSURFACE, wd, ht,\n\t\t\t\t\t\t\tformat->BitsPerPixel, format->Rmask, format->Gmask,\n\t\t\t\t\t\t\tformat->Bmask, format->Amask);\n\n\tif (!shadesfc)\n\t{\n\t\tstaterr(\"create_shade_sfc: failed to create surface\");\n\t\treturn 1;\n\t}\n\n\tSDL_FillRect(shadesfc, NULL, SDL_MapRGB(format, 0, 0, 0));\n\tSDL_SetAlpha(shadesfc, SDL_SRCALPHA, 128);\n\n\treturn 0;\n}\n\n\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font)\n{\n\tx *= SCALE;\n\ty *= SCALE;\n\tspacing *= SCALE;\n\n\treturn (text_draw(x, y, text, spacing, font) / SCALE);\n}\n\n// draw a text string with a 50% dark border around it\nint font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font)\n{\nSDL_Rect srcrect, dstrect;\nint wd;\n\n\tx *= SCALE;\n\ty *= SCALE;\n\tspacing *= SCALE;\n\n\t// get full-res width of final text\n\trendering = false;\n\tshrink_spaces = false;\n\n\tsrcrect.x = 0;\n\tsrcrect.y = 0;\n\tsrcrect.h = shadesfc->h;\n\tsrcrect.w = text_draw(0, 0, text, spacing, font);\n\n\trendering = true;\n\n\t// shade\n\tdstrect.x = x;\n\tdstrect.y = y;\n\tSDL_BlitSurface(shadesfc, &srcrect, sdl_screen, &dstrect);\n\n\t// draw the text on top as normal\n\twd = text_draw(x, y, text, spacing, font);\n\n\tshrink_spaces = true;\n\treturn (wd / SCALE);\n}\n\n\n\n\n\n"
  },
  {
    "path": "graphics/font.fdh",
    "content": "//hash:d7ca2a1d\n//automatically generated by Makegen\n\n/* located in graphics/font.cpp */\n\n//-----------------[referenced from graphics/font.cpp]---------------//\nbool font_init(void);\nvoid font_close(void);\nbool font_reload();\nvoid direct_text_draw(int x, int y, const char *text);\nstatic int text_draw(int x, int y, const char *text, int spacing, NXFont *font);\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint GetFontHeight();\nstatic bool create_shade_sfc(void);\nint win1251_to_utf8(const char* text, char* utext);\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\nint font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in common/stat.cpp */\n\n//-----------------[referenced from graphics/font.cpp]---------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "graphics/font.h",
    "content": "\n#ifndef _FONT_H\n#define _FONT_H\n\n// I don't want to needlessly include <SDL_ttf.h> in every file that\n// includes this one so this forward declaration makes those modules\n// that don't what a TTF_Font is shut up about InitChars(); however\n// technically TTF_Font is a typedef, so if the including file knows\n// the real declaration, it would bawk at this.\n#ifndef SDL_TTF_VERSION\n\tstruct TTF_Font;\n#endif\n\n#define NUM_FONT_LETTERS\t\t256\n#ifndef _L10N_CP1251\n#define NUM_LETTERS_RENDERED\t128\n#else\n#define NUM_LETTERS_RENDERED\t256\n#endif\n#define FONT_DEFAULT_SPACING\t5\n\nclass NXFont\n{\npublic:\n\tNXFont();\n\t~NXFont();\n\t\n\tbool InitChars(TTF_Font *font, uint32_t color);\n\tbool InitCharsShadowed(TTF_Font *top, uint32_t color, uint32_t shadowcolor);\n\n    static int win1251_to_utf8(const char* text, char* utext);\n\t\n\tbool InitBitmapChars(SDL_Surface *sheet, uint32_t fgcolor, uint32_t color);\n\tbool InitBitmapCharsShadowed(SDL_Surface *sheet, uint32_t fgcolor, uint32_t color, uint32_t shadowcolor);\n\t\n\tvoid free();\n\t\n\tSDL_Surface *letters[NUM_FONT_LETTERS];\n\nprivate:\n\tvoid ReplaceColor(SDL_Surface *sfc, uint32_t oldcolor, uint32_t newcolor);\n};\n\n\nextern NXFont whitefont;\nextern NXFont greenfont;\nextern NXFont bluefont;\t\t// used for \"F3:Options\" text on pause screen\nextern NXFont shadowfont;\t// white letters w/ drop shadow\n\nint font_draw(int x, int y, const char *text, int spacing=0, NXFont *font=&whitefont);\nint font_draw_shaded(int x, int y, const char *text, int spacing=0, NXFont *font=&whitefont);\n\nint GetFontWidth(const char *text, int spacing=0, bool is_shaded=false);\nint GetFontHeight();\n\n#endif\n"
  },
  {
    "path": "graphics/graphics.cpp",
    "content": "\n// graphics routines\n#include <SDL/SDL.h>\n#ifndef __SDLSHIM__\n\t#include <SDL/SDL_getenv.h>\n#endif\n\n#include <stdlib.h>\n#include \"../config.h\"\n#include \"graphics.h\"\n#include \"tileset.h\"\n#include \"sprites.h\"\n#include \"../dirnames.h\"\n#include \"graphics.fdh\"\n#include \"../l10n_strings.h\"\n\n#if !defined(_DINGUX) || !defined(_MOTOMAGX) || !defined(_MOTOEZX)\n#include \"../nx_icon.h\"\n#endif\n\nNXSurface *screen = NULL;\t\t\t\t// created from SDL's screen\nstatic NXSurface *drawtarget = NULL;\t// target of DrawRect etc; almost always screen\nbool use_palette = false;\t\t\t\t// true if we are in an indexed-color video mode\nint screen_bpp;\n\nconst NXColor DK_BLUE(0, 0, 0x21);\t\t// the popular dk blue backdrop color\nconst NXColor BLACK(0, 0, 0);\t\t\t// pure black, only works if no colorkey\nconst NXColor CLEAR(0, 0, 0);\t\t\t// the transparent/colorkey color\n\nstatic bool is_fullscreen = false;\nstatic int current_res = -1;\n\nbool Graphics::init(int resolution)\n{\n#if defined(_480X272) || defined(_320X240)\n    resolution = 0;\n#endif\n\n\tif (use_palette)\n\t{\n\t\tscreen_bpp = 8;\n\t}\n\telse\n\t{\n\t\tscreen_bpp = 16;\t// the default\n\t\t\n\t\t#ifndef __SDLSHIM__\n\t\tconst SDL_VideoInfo *info;\n\t\t\n\t\t// it's faster if we create the SDL screen at the bpp of the real screen.\n\t\t// max fps went from 120 to 160 on my X11 system this way.\n\t\tif ((info = SDL_GetVideoInfo()))\n\t\t{\n\t\t\tstat(\"videoinfo: desktop bpp %d\", info->vfmt->BitsPerPixel);\n\t\t\tif (info->vfmt->BitsPerPixel > 8)\n\t\t\t\tscreen_bpp = info->vfmt->BitsPerPixel;\n\t\t}\n\t\t#endif\n\t}\n\t\n\tpalette_reset();\n\t\n\tif (SetResolution(resolution, false))\n\t\treturn 1;\n\t\n\tif (Tileset::Init())\n\t\treturn 1;\n\t\n\tif (Sprites::Init())\n\t\treturn 1;\n\t\n\treturn 0;\n}\n\nvoid Graphics::close()\n{\n\tstat(\"Graphics::Close()\");\n#if defined(_480X272) || defined(_320X240)\n    SDL_ShowCursor(false);\n#else\n\tSDL_ShowCursor(true);\n#endif\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool Graphics::InitVideo()\n{\n    SDL_Surface *sdl_screen;\n\n#if !defined(_DINGUX) || !defined(_MOTOMAGX) || !defined(_MOTOEZX)\n    SDL_Surface *icon;\n    icon = SDL_CreateRGBSurfaceFrom((void *)WINDOW_TITLE_ICON.pixel_data,\n                                    WINDOW_TITLE_ICON.width,\n                                    WINDOW_TITLE_ICON.height,\n                                    WINDOW_TITLE_ICON.bytes_per_pixel * 8,\n                                    WINDOW_TITLE_ICON.bytes_per_pixel * WINDOW_TITLE_ICON.width,\n                                #if (SDL_BYTEORDER == SDL_BIG_ENDIAN)\n                                    0xff000000, /* Red bit mask. */\n                                    0x00ff0000, /* Green bit mask. */\n                                    0x0000ff00, /* Blue bit mask. */\n                                    0x000000ff  /* Alpha bit mask. */\n                                #else\n                                    0x000000ff, /* Red bit mask. */\n                                    0x0000ff00, /* Green bit mask. */\n                                    0x00ff0000, /* Blue bit mask. */\n                                    0xff000000  /* Alpha bit mask. */\n                                #endif\n                                    );\n    SDL_WM_SetIcon(icon, NULL);\n    SDL_FreeSurface(icon);\n#endif\n\n\tif (drawtarget == screen) drawtarget = NULL;\n\tif (screen) delete screen;\n\t\n\tuint32_t flags = SDL_SWSURFACE | SDL_HWPALETTE;\n\tif (is_fullscreen) flags |= SDL_FULLSCREEN;\n\t\n\t#ifndef __SDLSHIM__\n\tputenv((char *)\"SDL_VIDEO_CENTERED=1\");\n\t#endif\n\t\n\tstat(\"SDL_SetVideoMode: %dx%d @ %dbpp\", SCREEN_WIDTH*SCALE, SCREEN_HEIGHT*SCALE, screen_bpp);\n\tsdl_screen = SDL_SetVideoMode(SCREEN_WIDTH*SCALE, SCREEN_HEIGHT*SCALE, screen_bpp, flags);\n\tif (!sdl_screen)\n\t{\n\t\tstaterr(\"Graphics::InitVideo: error setting video mode\");\n\t\treturn 1;\n\t}\n\t\n\tif (use_palette && !(sdl_screen->flags & SDL_HWPALETTE))\n\t{\n\t\tstaterr(\"Graphics::InitVideo: failed to obtain exclusive access to hardware palette\");\n\t\texit(1);\n\t}\n\t\n\tSDL_WM_SetCaption(\"NXEngine\", NULL);\n\n#if defined (_480X272) || defined (_320X240)\n    SDL_ShowCursor(false);\n#else\n    SDL_ShowCursor(is_fullscreen == false);\n#endif\n\n\tscreen = new NXSurface(sdl_screen, false);\n\tif (!drawtarget) drawtarget = screen;\n\treturn 0;\n}\n\nbool Graphics::FlushAll()\n{\n\tstat(\"Graphics::FlushAll()\");\n\tpalette_reset();\n\tSprites::FlushSheets();\n\tTileset::Reload();\n\tmap_flush_graphics();\n\treturn font_reload();\n}\n\nvoid Graphics::SetFullscreen(bool enable)\n{\n\tif (is_fullscreen != enable)\n\t{\n\t\tis_fullscreen = enable;\n\t\tInitVideo();\n\t\tGraphics::FlushAll();\n\t}\n}\n\n// change the video mode to one of the available resolution codes, currently:\n// 0 - 640x480, Fullscreen\n// 1 - Windowed scale x1 (320x240)\n// 2 - Windowed scale x2 (640x480)\n// 3 - Windowed scale x3 (960x720)\nbool Graphics::SetResolution(int r, bool restoreOnFailure)\n{\n\tstat(\"Graphics::SetResolution(%d)\", r);\n\tif (r == current_res)\n\t\treturn 0;\n\t\n\tint old_res = current_res;\n\tint factor;\n\t\n\tif (r == 0)\n\t{\n#if defined (_480X272) || defined (_320X240)\n        is_fullscreen = false;\n        factor = 1;\n#else\n        is_fullscreen = true;\n        factor = 2;\n#endif\n\n\t}\n\telse\n\t{\n\t\tis_fullscreen = false;\n\t\tfactor = r;\n\t}\n\t\n\tstat(\"Setting scaling %d and fullscreen=%s\", factor, is_fullscreen ? \"yes\":\"no\");\n\tNXSurface::SetScale(factor);\n\t\n\tif (Graphics::InitVideo())\n\t{\n\t\tstaterr(\"Switch to resolution %d failed!\", r);\n\t\t\n\t\tif (restoreOnFailure)\n\t\t{\n\t\t\tstaterr(\"Trying to recover old mode %d.\", r, old_res);\n\t\t\tif (Graphics::SetResolution(old_res, false))\n\t\t\t{\n\t\t\t\tstaterr(\"Fatal error: vidmode recovery failed!!!\");\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}\n\t\n\tif (Graphics::FlushAll()) return 1;\n\treturn 0;\n}\n\n// return a pointer to a null-terminated list of available resolutions.\nconst char **Graphics::GetResolutions()\n{\n#ifdef _480X272 // 480x272 widescreen fix\n    static const char *res_str[]   =\n    {\n        \"480x272\",\n        NULL\n    };\n#elif _320X240\n    static const char *res_str[]   =\n    {\n        \"320x240\",\n        NULL\n    };\n#else\n    static const char *res_str[]   =\n    {\n        LC_FULLSCREEN,\n        \"320x240\",\n        \"640x480\",\n        \"960x720\",\n        NULL\n    };\n#endif\n    return res_str;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// copy a sprite into the current tileset.\n// used to obtain the images for the star tiles (breakable blocks),\n// and for animated motion tiles in Waterway.\nvoid Graphics::CopySpriteToTile(int spr, int tileno, int offset_x, int offset_y)\n{\n    NXRect srcrect, dstrect;\n\n\tsrcrect.x = (sprites[spr].frame[0].dir[0].sheet_offset.x + offset_x);\n\tsrcrect.y = (sprites[spr].frame[0].dir[0].sheet_offset.y + offset_y);\n\tsrcrect.w = TILE_W;\n\tsrcrect.h = TILE_H;\n\t\n\tdstrect.x = (tileno % 16) * TILE_W;\n\tdstrect.y = (tileno / 16) * TILE_H;\n\tdstrect.w = TILE_W;\n\tdstrect.h = TILE_H;\n\t\n\tNXSurface *tileset = Tileset::GetSurface();\n\tNXSurface *spritesheet = Sprites::get_spritesheet(sprites[spr].spritesheet);\n\t\n\tif (tileset && spritesheet)\n\t{\n\t\t// blank out the old tile data with clear\n\t\ttileset->FillRect(&dstrect, CLEAR);\n\t\t\n\t\t// copy the sprite over\n\t\tBlitSurface(spritesheet, &srcrect, tileset, &dstrect);\n    }\n}\n\n\nvoid Graphics::ShowLoadingScreen()\n{\nNXSurface loading;\nchar fname[MAXPATHLEN];\n\t\n\tsprintf(fname, \"%s/Loading.pbm\", data_dir);\n\tif (loading.LoadImage(fname))\n\t\treturn;\n\t\n\tint x = (SCREEN_WIDTH / 2) - (loading.Width() / 2);\n\tint y = (SCREEN_HEIGHT / 2) - loading.Height();\n\t\n\tClearScreen(BLACK);\n\tDrawSurface(&loading, x, y);\n\tdrawtarget->Flip();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// blit from one surface to another, just like SDL_BlitSurface.\nvoid Graphics::BlitSurface(NXSurface *src, NXRect *srcrect, NXSurface *dst, NXRect *dstrect)\n{\n    dst->DrawSurface(src, dstrect->x, dstrect->y, \\\n                     srcrect->x, srcrect->y, srcrect->w, srcrect->h);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// draw the entire surface to the screen at the given coordinates.\nvoid Graphics::DrawSurface(NXSurface *src, int x, int y)\n{\n\tdrawtarget->DrawSurface(src, x, y);\n}\n\n\n// blit the specified portion of the surface to the screen\nvoid Graphics::DrawSurface(NXSurface *src, \\\n\t\t\t\t\t\t   int dstx, int dsty, int srcx, int srcy, int wd, int ht)\n{\n    drawtarget->DrawSurface(src, dstx, dsty, srcx, srcy, wd, ht);\n}\n\n\n// blit the specified surface across the screen in a repeating pattern\nvoid Graphics::BlitPatternAcross(NXSurface *sfc, int x_dst, int y_dst, int y_src, int height)\n{\n    drawtarget->BlitPatternAcross(sfc, x_dst, y_dst, y_src, height);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Graphics::DrawRect(int x1, int y1, int x2, int y2, NXColor color)\n{\n    drawtarget->DrawRect(x1, y1, x2, y2, color);\n}\n\nvoid Graphics::FillRect(int x1, int y1, int x2, int y2, NXColor color)\n{\n    drawtarget->FillRect(x1, y1, x2, y2, color);\n}\n\nvoid Graphics::DrawPixel(int x, int y, NXColor color)\n{\n    drawtarget->DrawPixel(x, y, color);\n}\n\nvoid Graphics::ClearScreen(NXColor color)\n{\n    drawtarget->Clear(color.r, color.g, color.b);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Graphics::DrawRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b)\n{\n\tdrawtarget->DrawRect(x1, y1, x2, y2, r, g, b);\n}\n\nvoid Graphics::FillRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b)\n{\n\tdrawtarget->FillRect(x1, y1, x2, y2, r, g, b);\n}\n\nvoid Graphics::DrawPixel(int x, int y, uint8_t r, uint8_t g, uint8_t b)\n{\n\tdrawtarget->DrawPixel(x, y, r, g, b);\n}\n\nvoid Graphics::ClearScreen(uint8_t r, uint8_t g, uint8_t b)\n{\n\tdrawtarget->Clear(r, g, b);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Graphics::set_clip_rect(int x, int y, int w, int h)\n{\n\tdrawtarget->set_clip_rect(x, y, w, h);\n}\n\nvoid Graphics::set_clip_rect(NXRect *rect)\n{\n\tdrawtarget->set_clip_rect(rect);\n}\n\nvoid Graphics::clear_clip_rect()\n{\n\tdrawtarget->clear_clip_rect();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// change the target surface of operation like DrawRect to something\n// other than the screen.\nvoid Graphics::SetDrawTarget(NXSurface *surface)\n{\n\tdrawtarget = surface;\n}\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "graphics/graphics.fdh",
    "content": "//hash:3ab8d1dd\n//automatically generated by Makegen\n\n/* located in map.cpp */\n\n//---------------[referenced from graphics/graphics.cpp]-------------//\nvoid map_flush_graphics();\n\n\n/* located in tsc.cpp */\n\n//---------------[referenced from graphics/graphics.cpp]-------------//\nvoid Clear();\n\n\n/* located in graphics/font.cpp */\n\n//---------------[referenced from graphics/graphics.cpp]-------------//\nbool font_reload();\n\n\n/* located in graphics/palette.cpp */\n\n//---------------[referenced from graphics/graphics.cpp]-------------//\nvoid palette_reset(void);\n\n\n/* located in common/stat.cpp */\n\n//---------------[referenced from graphics/graphics.cpp]-------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "graphics/graphics.h",
    "content": "\n#ifndef _GRAPHICS_H\n#define _GRAPHICS_H\n\n#include \"nxsurface.h\"\n// (unscaled) screen size/video mode\n\n#ifndef _480X272 // 480x272 widescreen fix\n#define SCREEN_WIDTH\t\t320\n#define SCREEN_HEIGHT\t\t240\n#else\n#define SCREEN_WIDTH\t\t480\n#define SCREEN_HEIGHT\t\t272\n#endif\n\nextern NXSurface *screen;\nextern const NXColor DK_BLUE;\nextern const NXColor BLACK;\nextern const NXColor CLEAR;\nextern bool use_palette;\n\nnamespace Graphics\n{\n\tbool init(int resolution);\n\tvoid close();\n\t\n\tbool InitVideo();\n\tvoid SetFullscreen(bool enable);\n\tbool SetResolution(int factor, bool restoreOnFailure=true);\n\tconst char **GetResolutions();\n\tbool FlushAll();\n\t\n\t// ---------------------------------------\n\t\n\tvoid CopySpriteToTile(int spr, int tileno, int offset_x, int offset_y);\n\tvoid ShowLoadingScreen();\n\t\n\tvoid BlitSurface(NXSurface *src, NXRect *srcrect, NXSurface *dst, NXRect *dstrect);\n\t\n\t// these are all just convenience wrappers around the equivalent\n\t// NXSurface member functions, most of which are set to target the screen.\n\tvoid DrawSurface(NXSurface *src, int x, int y);\n\tvoid DrawSurface(NXSurface *src, int dstx, int dsty, int srcx, int srcy, int wd, int ht);\n\t\n\tvoid BlitPatternAcross(NXSurface *sfc, int x_dst, int y_dst, int y_src, int height);\n\t\n\t\n\tvoid ClearScreen(NXColor color);\n\tvoid ClearScreen(uint8_t r, uint8_t g, uint8_t b);\n\n\n\tvoid DrawRect(int x1, int y1, int x2, int y2, NXColor color);\n\tvoid FillRect(int x1, int y1, int x2, int y2, NXColor color);\n\tvoid DrawPixel(int x, int y, NXColor color);\n\t\n\tvoid DrawRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b);\n\tvoid FillRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b);\n\tvoid DrawPixel(int x, int y, uint8_t r, uint8_t g, uint8_t b);\n\t\n\tvoid set_clip_rect(int x, int y, int w, int h);\n\tvoid set_clip_rect(NXRect *rect);\n\tvoid clear_clip_rect();\n\t\n    void SetDrawTarget(NXSurface *surface);\n};\n\n#endif\n"
  },
  {
    "path": "graphics/nxsurface.cpp",
    "content": "\n#include <string.h>\n#include <stdint.h>\n#include \"../settings.h\"\n#include \"../config.h\"\n#include \"graphics.h\"\n#include \"nxsurface.h\"\n#include \"nxsurface.fdh\"\n\n#ifdef CONFIG_MUTABLE_SCALE\n\tint SCALE = 3;\n#endif\n\n\nNXSurface::NXSurface()\n{\n\tfSurface = NULL;\n\tfFreeSurface = true;\n}\n\n\nNXSurface::NXSurface(int wd, int ht, NXFormat *format)\n{\n\tfSurface = NULL;\n\tAllocNew(wd, ht, format);\n\tfFreeSurface = true;\n}\n\n\nNXSurface::NXSurface(SDL_Surface *from_sfc, bool free_surface)\n{\n\tfSurface = from_sfc;\n\tfFreeSurface = free_surface;\n}\n\nNXSurface::~NXSurface()\n{\n\tFree();\n}\n\n// static function, and requires a reload of all surfaces\nvoid NXSurface::SetScale(int factor)\n{\n\t#ifdef CONFIG_MUTABLE_SCALE\n\t\tSCALE = factor;\n\t#else\n\t\tstaterr(\"NXSurface::SetScale: CONFIG_MUTABLE_SCALE not set\");\n\t#endif\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// allocate for an empty surface of the given size\nbool NXSurface::AllocNew(int wd, int ht, NXFormat *format)\n{\n\tFree();\n\t\n\tfSurface = SDL_CreateRGBSurface(SDL_SRCCOLORKEY, wd*SCALE, ht*SCALE, \\\n\t\t\tformat->BitsPerPixel, format->Rmask, format->Gmask, format->Bmask, format->Amask);\n\t\n\tif (!fSurface)\n\t{\n\t\tstaterr(\"NXSurface::AllocNew: failed to allocate RGB surface\");\n\t\treturn 1;\n\t}\n\t\n\treturn fSurface;\n}\n\n\n// load the surface from a .pbm or bitmap file\nbool NXSurface::LoadImage(const char *pbm_name, bool use_colorkey, int use_display_format)\n{\nSDL_Surface *image;\n\n\tFree();\n\t\n\tif (use_display_format == -1)\n\t{\t// use value specified in settings\n\t\tuse_display_format = settings->displayformat;\n\t}\n\t\n\timage = SDL_LoadBMP(pbm_name);\n\tif (!image)\n\t{\n\t\tstaterr(\"NXSurface::LoadImage: load failed of '%s'!\", pbm_name);\n\t\treturn 1;\n\t}\n\t\n\tfSurface = Scale(image, SCALE, use_colorkey, true, use_display_format);\n\treturn (fSurface == NULL);\n}\n\n\nNXSurface *NXSurface::FromFile(const char *pbm_name, bool use_colorkey, int use_display_format)\n{\n\tNXSurface *sfc = new NXSurface;\n\tif (sfc->LoadImage(pbm_name, use_colorkey, use_display_format))\n\t{\n\t\tdelete sfc;\n\t\treturn NULL;\n\t}\n\t\n\treturn sfc;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// draw some or all of another surface onto this surface.\nvoid NXSurface::DrawSurface(NXSurface *src, \\\n\t\t\t\t\t\t \tint dstx, int dsty, int srcx, int srcy, int wd, int ht)\n{\nSDL_Rect srcrect, dstrect;\n\n\tsrcrect.x = srcx * SCALE;\n\tsrcrect.y = srcy * SCALE;\n\tsrcrect.w = wd * SCALE;\n\tsrcrect.h = ht * SCALE;\n\t\n\tdstrect.x = dstx * SCALE;\n\tdstrect.y = dsty * SCALE;\n\t\n\tSDL_BlitSurface(src->fSurface, &srcrect, fSurface, &dstrect);\n}\n\nvoid NXSurface::DrawSurface(NXSurface *src, int dstx, int dsty)\n{\n\tDrawSurface(src, dstx, dsty, 0, 0, src->Width(), src->Height());\n}\n\n// draw the given source surface in a repeating pattern across the entire width of the surface.\n// x_dst: an starting X with which to offset the pattern horizontally (usually negative).\n// y_dst: the Y coordinate to copy to on the destination.\n// y_src: the Y coordinate to copy from.\n// height: the number of pixels tall to copy.\nvoid NXSurface::BlitPatternAcross(NXSurface *src,\n\t\t\t\t\t\t   int x_dst, int y_dst, int y_src, int height)\n{\nSDL_Rect srcrect, dstrect;\n\n\tsrcrect.x = 0;\n\tsrcrect.w = src->fSurface->w;\n    srcrect.y = (y_src * SCALE);\n    srcrect.h = (height * SCALE);\n\t\n\tint x = (x_dst * SCALE);\n    int y = (y_dst * SCALE);\n\tint destwd = fSurface->w;\n\t\n\tdo\n\t{\n        dstrect.x = x;\n        dstrect.y = y;\n\n\t\tSDL_BlitSurface(src->fSurface, &srcrect, fSurface, &dstrect);\n\t\tx += src->fSurface->w;\n\t}\n\twhile(x < destwd);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nvoid NXSurface::DrawRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b)\n{\nSDL_Rect rect;\nuint32_t color = MapColor(r, g, b);\n\n\t// top and bottom\n\trect.x = x1 * SCALE;\n\trect.y = y1 * SCALE;\n\trect.w = ((x2 - x1) + 1) * SCALE;\n\trect.h = SCALE;\n\tSDL_FillRect(fSurface, &rect, color);\n\t\n\trect.y = y2 * SCALE;\n\tSDL_FillRect(fSurface, &rect, color);\n\t\n\t// left and right\n\trect.y = y1 * SCALE;\n\trect.w = SCALE;\n\trect.h = ((y2 - y1) + 1) * SCALE;\n\tSDL_FillRect(fSurface, &rect, color);\n\t\n\trect.x = x2 * SCALE;\n\tSDL_FillRect(fSurface, &rect, color);\n}\n\n\nvoid NXSurface::FillRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b)\n{\nSDL_Rect rect;\n\n\trect.x = x1 * SCALE;\n\trect.y = y1 * SCALE;\n\trect.w = ((x2 - x1) + 1) * SCALE;\n\trect.h = ((y2 - y1) + 1) * SCALE;\n\t\n\tSDL_FillRect(fSurface, &rect, MapColor(r, g, b));\n}\n\nvoid NXSurface::Clear(uint8_t r, uint8_t g, uint8_t b)\n{\n\tSDL_FillRect(fSurface, NULL, MapColor(r, g, b));\n}\n\n\nvoid NXSurface::DrawPixel(int x, int y, uint8_t r, uint8_t g, uint8_t b)\n{\n\tDrawRect(x, y, x, y, r, g, b);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nint NXSurface::Width()\n{\n\treturn fSurface->w / SCALE;\n}\n\nint NXSurface::Height()\n{\n\treturn fSurface->h / SCALE;\n}\n\nNXFormat *NXSurface::Format()\n{\n\treturn fSurface->format;\n}\n\nvoid NXSurface::Flip()\n{\n\tSDL_Flip(fSurface);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid NXSurface::set_clip_rect(int x, int y, int w, int h)\n{\n\tNXRect rect(x * SCALE, y * SCALE, w * SCALE, h * SCALE);\n\tSDL_SetClipRect(fSurface, &rect);\n}\n\nvoid NXSurface::set_clip_rect(NXRect *rect)\n{\n\tSDL_SetClipRect(fSurface, rect);\n}\n\nvoid NXSurface::clear_clip_rect()\n{\n\tSDL_SetClipRect(fSurface, NULL);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// internal function which scales the given SDL surface by the given factor.\nSDL_Surface *NXSurface::Scale(SDL_Surface *original, int factor, \\\n\t\tbool use_colorkey, bool free_original, bool use_display_format)\n{\nSDL_Surface *scaled;\n\n\tif (factor == 1 && free_original)\n\t{\n\t\tscaled = original;\n\t}\n\telse\n\t{\n\t\tscaled = SDL_CreateRGBSurface(SDL_SRCCOLORKEY, \\\n\t\t\t\t\t\toriginal->w * SCALE, \\\n\t\t\t\t\t\toriginal->h * SCALE, \\\n\t\t\t\t\t\toriginal->format->BitsPerPixel, \\\n\t\t\t\t\t\toriginal->format->Rmask, original->format->Gmask,\n\t\t\t\t\t\toriginal->format->Bmask, original->format->Amask);\n\t\t\n\t\tif (original->format->BitsPerPixel == 8)\n\t\t{\t// copy the palette from the old surface to the new surface\n\t\t\tSDL_Color palette[256];\n\t\t\tfor(int i=0;i<256;i++)\n\t\t\t{\n\t\t\t\tSDL_GetRGB(i, original->format, &palette[i].r, &palette[i].g, &palette[i].b);\n\t\t\t}\n\t\t\t\n\t\t\tSDL_SetColors(scaled, palette, 0, 256);\n\t\t}\n\t\t\n\t\t// all the .pbm files are 8bpp, so I haven't had a reason\n\t\t// to write any other scalers.\n\t\tswitch(original->format->BitsPerPixel)\n\t\t{\n\t\t\tcase 8:\n\t\t\t\tScale8(original, scaled, factor);\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tstaterr(\"NXSurface::Scale: unsupported bpp %d\", original->format->BitsPerPixel);\n\t\t\t\tSDL_FreeSurface(scaled);\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// can get rid of original now if they wanted us to\n\t\tif (free_original)\n\t\t\tSDL_FreeSurface(original);\n\t}\n\t\n\t// set colorkey to black if requested\n\tif (use_colorkey)\n\t{\t// don't use SDL_RLEACCEL--it seems to actually make things a lot slower,\n\t\t// especially on maps with motion tiles.\n\t\tSDL_SetColorKey(scaled, SDL_SRCCOLORKEY, SDL_MapRGB(scaled->format, 0, 0, 0));\n\t}\n\t\n\tif (use_palette)\n\t{\n\t\tscaled = palette_add(scaled);\n\t\tif (!scaled)\n\t\t\treturn NULL;\n\t}\n\t\n\tif (use_display_format)\n\t{\n\t\tSDL_Surface *ret_sfc = SDL_DisplayFormat(scaled);\n\t\tSDL_FreeSurface(scaled);\n\t\t\n\t\treturn ret_sfc;\n\t}\n\telse\n\t{\n\t\treturn scaled;\n\t}\n}\n\nvoid NXSurface::Scale8(SDL_Surface *src, SDL_Surface *dst, int factor)\n{\nint x, y, i;\n\n    for(y=0;y<src->h;y++)\n\t{\n\t\tuint8_t *srcline = (uint8_t *)src->pixels + (y * src->pitch);\n\t\tuint8_t *dstline = (uint8_t *)dst->pixels + (y * factor * dst->pitch);\n\t\tuint8_t *dstptr = dstline;\n\t\t\n\t\tfor(x=0;x<src->w;x++)\n\t\t{\n\t\t\tfor(i=0;i<factor;i++)\n\t\t\t\t*(dstptr++) = srcline[x];\n\t\t}\n\t\t\n\t\tdstptr = dstline;\n\t\tfor(i=1;i<factor;i++)\n\t\t{\n\t\t\tdstptr += dst->pitch;\n\t\t\tmemcpy(dstptr, dstline, dst->pitch);\n\t\t}\n    }\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid NXSurface::EnableColorKey()\n{\n\tSDL_SetColorKey(fSurface, SDL_SRCCOLORKEY, SDL_MapRGB(fSurface->format, 0, 0, 0));\n}\n\nuint32_t NXSurface::MapColor(uint8_t r, uint8_t g, uint8_t b)\n{\n\treturn SDL_MapRGB(fSurface->format, r, g, b);\n}\n\n\nvoid NXSurface::Free()\n{\n\tif (fSurface)\n\t{\n\t\tif (fFreeSurface)\n\t\t\tSDL_FreeSurface(fSurface);\n\t\t\n\t\tfSurface = NULL;\n\t}\n}\n\n\n\n"
  },
  {
    "path": "graphics/nxsurface.fdh",
    "content": "//hash:dd5708e0\n//automatically generated by Makegen\n\n/* located in tsc.cpp */\n\n//--------------[referenced from graphics/nxsurface.cpp]-------------//\nvoid Clear();\n\n\n/* located in graphics/palette.cpp */\n\n//--------------[referenced from graphics/nxsurface.cpp]-------------//\nSDL_Surface *palette_add(SDL_Surface *sfc);\n\n\n/* located in common/stat.cpp */\n\n//--------------[referenced from graphics/nxsurface.cpp]-------------//\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "graphics/nxsurface.h",
    "content": "\n#ifndef _NXSURFACE_H\n#define _NXSURFACE_H\n\n#include <SDL/SDL.h>\n#include \"../common/basics.h\"\n\n// scaling factor for the graphics\n#ifdef CONFIG_MUTABLE_SCALE\n\textern int SCALE;\n#else\n\t#define SCALE\t\t1\n#endif\n\nstruct NXSurface;\nextern NXSurface *screen;\n\nstruct NXColor\n{\n\tuint8_t r, g, b;\n\t\n\tNXColor(uint8_t rr, uint8_t gg, uint8_t bb)\n\t\t: r(rr), g(gg), b(bb)\n\t{ }\n\t\n\tNXColor(uint32_t hexcolor)\n\t{\n\t\tr = hexcolor >> 16;\n\t\tg = hexcolor >> 8;\n\t\tb = hexcolor;\n\t}\n};\n\nstruct NXRect : public SDL_Rect\n{\n\tinline NXRect() { }\n\t\n\tinline NXRect(int x, int y, int w, int h)\n\t{\n\t\tthis->x = x;\n\t\tthis->y = y;\n\t\tthis->w = w;\n\t\tthis->h = h;\n\t}\n\t\n\tinline void Set(int x, int y, int w, int h)\n\t{\n\t\tthis->x = x;\n\t\tthis->y = y;\n\t\tthis->w = w;\n\t\tthis->h = h;\n\t}\n};\n\ntypedef SDL_PixelFormat\tNXFormat;\n\n\nclass NXSurface\n{\npublic:\n\tNXSurface();\n\tNXSurface(int wd, int ht, NXFormat *format = screen->Format());\n\tNXSurface(SDL_Surface *from_sfc, bool freesurface=true);\n\t~NXSurface();\n\t\n\tbool AllocNew(int wd, int ht, NXFormat *format = screen->Format());\n\tbool LoadImage(const char *pbm_name, bool use_colorkey=false, int use_display_format=-1);\n\tstatic NXSurface *FromFile(const char *pbm_name, bool use_colorkey=false, int use_display_format=-1);\n\t\n\t// blitting\n\tvoid DrawSurface(NXSurface *src, int dstx, int dsty);\n\tvoid DrawSurface(NXSurface *src, int dstx, int dsty, int srcx, int srcy, int wd, int ht);\n\tvoid BlitPatternAcross(NXSurface *src, int x_dst, int y_dst, int y_src, int height);\n\t\n\t// graphics primitives\n\tvoid DrawRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b);\n\tvoid DrawRect(int x1, int y1, int x2, int y2, NXColor color);\n\tvoid DrawRect(NXRect *rect, uint8_t r, uint8_t g, uint8_t b);\n\tvoid DrawRect(NXRect *rect, NXColor color);\n\t\n\tvoid FillRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b);\n\tvoid FillRect(int x1, int y1, int x2, int y2, NXColor color);\n\tvoid FillRect(NXRect *rect, uint8_t r, uint8_t g, uint8_t b);\n\tvoid FillRect(NXRect *rect, NXColor color);\n\tvoid Clear(uint8_t r, uint8_t g, uint8_t b);\n\t\n\tvoid DrawPixel(int x, int y, uint8_t r, uint8_t g, uint8_t b);\n\tvoid DrawPixel(int x, int y, NXColor color);\n\t\n\t// misc\n\tvoid set_clip_rect(int x, int y, int w, int h);\n\tvoid set_clip_rect(NXRect *rect);\n\tvoid clear_clip_rect();\n\t\n\tint Width();\n\tint Height();\n\tvoid EnableColorKey();\n\tNXFormat *Format();\n\t\n\tvoid Flip();\n\tSDL_Surface *GetSDLSurface() { return fSurface; }\n\t\n\tstatic void SetScale(int factor);\n\t\nprivate:\n\tstatic SDL_Surface *Scale(SDL_Surface *original, int factor, bool use_colorkey, bool free_original, bool use_display_format);\n    static void Scale8(SDL_Surface *src, SDL_Surface *dst, int factor);\n\t\n\tinline uint32_t MapColor(uint8_t r, uint8_t g, uint8_t b);\n\tvoid Free();\n\t\n\tSDL_Surface *fSurface;\n\tbool fFreeSurface;\n};\n\nvoid inline\nNXSurface::DrawRect(int x1, int y1, int x2, int y2, NXColor color)\n{ DrawRect(x1, y1, x2, y2, color.r, color.g, color.b); }\n\nvoid inline\nNXSurface::DrawRect(NXRect *rect, uint8_t r, uint8_t g, uint8_t b)\n{ DrawRect(rect->x, rect->y, rect->x + (rect->w - 1), rect->y + (rect->h - 1), r, g, b); }\n\nvoid inline\nNXSurface::DrawRect(NXRect *rect, NXColor color)\n{ DrawRect(rect->x, rect->y, rect->x + (rect->w - 1), rect->y + (rect->h - 1), color.r, color.g, color.b); }\n\n\nvoid inline\nNXSurface::FillRect(int x1, int y1, int x2, int y2, NXColor color)\n{ FillRect(x1, y1, x2, y2, color.r, color.g, color.b); }\n\nvoid inline\nNXSurface::FillRect(NXRect *rect, uint8_t r, uint8_t g, uint8_t b)\n{ FillRect(rect->x, rect->y, rect->x + (rect->w - 1), rect->y + (rect->h - 1), r, g, b); }\n\nvoid inline\nNXSurface::FillRect(NXRect *rect, NXColor color)\n{ FillRect(rect->x, rect->y, rect->x + (rect->w - 1), rect->y + (rect->h - 1), color.r, color.g, color.b); }\n\n\nvoid inline\nNXSurface::DrawPixel(int x, int y, NXColor color)\n{ DrawPixel(x, y, color.r, color.g, color.b); }\n\n\n#endif\n\n"
  },
  {
    "path": "graphics/palette.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"palette.h\"\n#include \"palette.fdh\"\n\n#define MAX_COLORS\t\t256\nstatic SDL_Color screenpal[MAX_COLORS];\nint ncolors = -1;\n\n// clear out all palette entries\nvoid palette_reset(void)\n{\n\tncolors = 0;\n}\n\n// given a paletted surface add it's colors in to the screen colormap\n// then return a surface with the color indexes remapped ready to\n// be displayed on the screen. insfc is either freed, or reused to\n// create the returned surface.\nSDL_Surface *palette_add(SDL_Surface *sfc)\n{\nSDL_Palette *pal = sfc->format->palette;\nint remap[MAX_COLORS];\nint x, y, i;\n\n\tif (sfc->format->BitsPerPixel > 8)\n\t{\n\t\tstaterr(\"palette_add: input surface is > 8bpp\");\n\t\treturn NULL;\n\t}\n\t\n\tstat(\"palette_add: adding %d colors to screen palette...\", pal->ncolors);\n\tfor(i=0;i<pal->ncolors;i++)\n\t{\n\t\tremap[i] = palette_alloc(pal->colors[i].r, pal->colors[i].g, pal->colors[i].b);\n\t\tif (remap[i] == -1)\n\t\t\treturn sfc;\n\t}\n\t\n\tSDL_SetColors(screen->GetSDLSurface(), screenpal, 0, ncolors);\n\treturn sfc;\n/*\n\t// remap indexes in surface\n\tfor(y=0;y<sfc->h;y++)\n\t{\n\t\tuint8_t *pixels = (uint8_t *)sfc->pixels + (y * sfc->pitch);\n\t\t\n\t\tfor(x=0;x<sfc->w;x++)\n\t\t{\n\t\t\t*pixels = remap[*pixels];\n\t\t\tpixels++;\n\t\t}\n\t}\n\t\n\treturn sfc;*/\n}\n\n\n// add the given color to the screen palette and return it's index.\nint palette_alloc(uint8_t r, uint8_t g, uint8_t b)\n{\nint i;\n\n\tfor(i=0;i<ncolors;i++)\n\t{\n\t\tif (screenpal[i].r == r && \\\n\t\t\tscreenpal[i].g == g && \\\n\t\t\tscreenpal[i].b == b)\n\t\t{\n\t\t\treturn i;\n\t\t}\n\t}\n\t\n\tif (ncolors >= MAX_COLORS)\n\t{\n\t\tstaterr(\"palette_alloc: out of color space!\");\n\t\treturn -1;\n\t}\n\t\n\tscreenpal[ncolors].r = r;\n\tscreenpal[ncolors].g = g;\n\tscreenpal[ncolors].b = b;\n\treturn ncolors++;\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "graphics/palette.fdh",
    "content": "//hash:38ce643b\n//automatically generated by Makegen\n\n/* located in graphics/palette.cpp */\n\n//---------------[referenced from graphics/palette.cpp]--------------//\nvoid palette_reset(void);\nSDL_Surface *palette_add(SDL_Surface *sfc);\nint palette_alloc(uint8_t r, uint8_t g, uint8_t b);\n\n\n/* located in common/stat.cpp */\n\n//---------------[referenced from graphics/palette.cpp]--------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "graphics/palette.h",
    "content": "\n#ifndef _PALETTE_H\n#define _PALETTE_H\n\n\n\n\n\n#endif\n"
  },
  {
    "path": "graphics/safemode.cpp",
    "content": "\n// a limited and redundant graphics system which allows placing text on the screen\n// in the case of startup errors or before the real data files are extracted.\n#include <stdarg.h>\n#include \"../nx.h\"\n#include \"safemode.h\"\n#include \"safemode.fdh\"\n\nusing namespace safemode;\nusing namespace Graphics;\n\nstatic int nexty = 0;\nstatic bool initilized = false;\nstatic SDL_Rect printrect;\nstatic NXColor backcolor(0x20, 0x20, 0x20);\n\nstatic bool have_status = false;\nstatic SDL_Rect statusrect;\n\nbool safemode::init()\n{\n\tmoveto(SM_UPPER_THIRD);\n\tinitilized = true;\n\t\n\treturn 0;\n}\n\nvoid safemode::close()\n{\n\tif (initilized)\n\t{\n\t\tClearScreen(BLACK);\n\t\tscreen->Flip();\n\t\t\n\t\tclear();\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid safemode::moveto(int y)\n{\n\tswitch(y)\n\t{\n\t\tcase SM_CENTER:\n\t\t\tnexty = (SCREEN_HEIGHT / 2) - (GetFontHeight() / 2);\n\t\tbreak;\n\t\t\n\t\tcase SM_UPPER_THIRD:\n\t\t\tnexty = (SCREEN_HEIGHT / 4) - (GetFontHeight() / 2);\n\t\tbreak;\n\t\t\n\t\tcase SM_LOWER_THIRD:\n\t\t\tnexty = (SCREEN_HEIGHT / 4) - (GetFontHeight() / 2);\n\t\t\tnexty = (SCREEN_HEIGHT - nexty);\n\t\tbreak;\n\t\t\n\t\tcase SM_MIDUPPER_Y:\n\t\t\tnexty = (SCREEN_HEIGHT / 2) - (GetFontHeight() / 2);\n\t\t\tnexty -= 32;\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\tnexty = y;\n\t\tbreak;\n\t}\n}\n\nbool safemode::print(const char *fmt, ...)\n{\nva_list ar;\nchar buffer[128];\n\n\tva_start(ar, fmt);\n\tvsnprintf(buffer, sizeof(buffer), fmt, ar);\n\tva_end(ar);\n\t\n\tstat(\"safemode print: '%s'\", buffer);\n\t\n\tint fontwidth = GetFontWidth(buffer, 0, false);\n\tint fontheight = GetFontHeight();\n\t\n\tif (buffer[0])\n\t{\n\t\tint x = ((SCREEN_WIDTH / 2) - (fontwidth / 2));\n\t\t\n\t\tprintrect.x = x;\n\t\tprintrect.y = nexty;\n\t\tprintrect.w = fontwidth;\n\t\tprintrect.h = fontheight;\n\t\t\n\t\tfont_draw(x, nexty, buffer, 0, &greenfont);\n\t\tscreen->Flip();\n\t}\n\t\n\tSDL_Delay(50);\n\t\n\tnexty += (fontheight + 1);\n\treturn 0;\n}\n\nvoid safemode::clear()\n{\n\tClearScreen(backcolor);\n\tmoveto(SM_UPPER_THIRD);\n}\n\n\nint safemode::run_until_key(bool delay)\n{\n\tstat(\"run_until_key()\");\n\tuint32_t start = SDL_GetTicks();\n\t\n\tlast_sdl_key = -1;\n\tdo\n\t{\n\t\tinput_poll();\n\t\tSDL_Delay(50);\n\t\t\n\t\tif (delay && (SDL_GetTicks() - start) < 500)\n\t\t\tlast_sdl_key = -1;\n\t}\n\twhile(last_sdl_key == -1);\n\t\n\tstat(\"returning key %d\", last_sdl_key);\n\treturn last_sdl_key;\n}\n\n\nvoid safemode::status(const char *fmt, ...)\n{\nva_list ar;\nchar buffer[128];\n\n\tva_start(ar, fmt);\n\tvsnprintf(buffer, sizeof(buffer), fmt, ar);\n\tva_end(ar);\n\t\n\tclearstatus();\n\tmoveto(SM_CENTER);\n\tprint(\"%s\", buffer);\n\t\n\tstatusrect = printrect;\n\thave_status = true;\n}\n\nvoid safemode::clearstatus()\n{\n\tif (have_status)\n\t{\n\t\tFillRect(statusrect.x, statusrect.y, \\\n\t\t\t\tstatusrect.x + (statusrect.w - 1), \\\n\t\t\t\tstatusrect.y + (statusrect.h - 1),\n\t\t\t\tbackcolor);\n\t\t\n\t\tmoveto(SM_CENTER);\n\t\thave_status = false;\n\t}\n}\n\n\n\n\n\n"
  },
  {
    "path": "graphics/safemode.fdh",
    "content": "//hash:98779cf6\n//automatically generated by Makegen\n\n/* located in main.cpp */\n\n//---------------[referenced from graphics/safemode.cpp]-------------//\nvoid SDL_Delay(int ms);\n\n\n/* located in input.cpp */\n\n//---------------[referenced from graphics/safemode.cpp]-------------//\nvoid input_poll(void);\n\n\n/* located in graphics/font.cpp */\n\n//---------------[referenced from graphics/safemode.cpp]-------------//\nint GetFontHeight();\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in common/stat.cpp */\n\n//---------------[referenced from graphics/safemode.cpp]-------------//\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "graphics/safemode.h",
    "content": "\n#ifndef _SAFEMODE_H\n#define _SAFEMODE_H\n\nenum\t\t// special Y positioning arguments for moveto\n{\n\tSM_UPPER_THIRD = -1,\n\tSM_CENTER = -2,\n\tSM_LOWER_THIRD = -3,\n\tSM_NONE = -4,\n\tSM_MIDUPPER_Y = -5\n};\n\nnamespace safemode\n{\n\tbool init();\n\tvoid close();\n\t\n\tvoid moveto(int y);\n\tbool print(const char *fmt, ...);\n\tvoid clear();\n\t\n\tvoid status(const char *fmt, ...);\n\tvoid clearstatus();\n\t\n\tint run_until_key(bool delay=true);\n};\n\n#endif\n"
  },
  {
    "path": "graphics/sprites.cpp",
    "content": "\n// sprites routines\n#include \"graphics.h\"\n#include <string.h>\n#include \"../siflib/sif.h\"\n#include \"../siflib/sifloader.h\"\n#include \"../siflib/sectSprites.h\"\n#include \"../siflib/sectStringArray.h\"\n#include \"../autogen/sprites.h\"\n#include \"../common/StringList.h\"\n#include \"../dirnames.h\"\n#include \"../settings.h\"\nusing namespace Graphics;\n\n#include \"sprites.h\"\n#include \"sprites.fdh\"\n\nstatic NXSurface *spritesheet[MAX_SPRITESHEETS];\nstatic int num_spritesheets;\nstatic StringList sheetfiles;\n\nSIFSprite sprites[MAX_SPRITES];\nint num_sprites;\n\n\nbool Sprites::Init()\n{\n\tmemset(spritesheet, 0, sizeof(spritesheet));\n\t\n\t// load sprites info--sheet positions, bounding boxes etc\n\tif (load_sif(\"sprites.sif\"))\n\t\treturn 1;\n\t\n\tnum_spritesheets = sheetfiles.CountItems();\n\treturn 0;\n}\n\nvoid Sprites::Close()\n{\n\tFlushSheets();\n\tsheetfiles.MakeEmpty();\n}\n\nvoid Sprites::FlushSheets()\n{\n\tfor(int i=0;i<MAX_SPRITESHEETS;i++)\n\t{\n\t\tif (spritesheet[i])\n\t\t{\n\t\t\tdelete spritesheet[i];\n\t\t\tspritesheet[i] = NULL;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// ensure the given spritesheet is loaded\nstatic void Sprites::LoadSheetIfNeeded(int sheetno)\n{\n\tif (!spritesheet[sheetno])\n\t{\n\t\tchar pbm_name[MAXPATHLEN];\n\t\t\n\t\tsprintf(pbm_name, \"%s/%s\", data_dir, sheetfiles.StringAt(sheetno));\n\t\tspritesheet[sheetno] = new NXSurface;\n\t\tspritesheet[sheetno]->LoadImage(pbm_name, true);\n\t\t\n\t\t// fix the blue dash in the middle of the starpoof effect on that one frame,\n\t\t// I'm pretty sure this is a glitch.\n\t\tif (!settings->emulate_bugs)\n\t\t{\n\t\t\tif (sheetno == 3)\t// Caret.pbm\n\t\t\t\tspritesheet[sheetno]->FillRect(40, 58, 41, 58, 0, 0, 0);\n\t\t}\n\t}\n}\n\n\n// master sprite drawing function\nstatic void Sprites::BlitSprite(int x, int y, int s, int frame, uint8_t dir, \\\n\t\t\t\t\t\t\t\tint xoff, int yoff, int wd, int ht)\n{\n\tLoadSheetIfNeeded(sprites[s].spritesheet);\n\t\n\tdir %= sprites[s].ndirs;\n\tSIFDir *sprdir = &sprites[s].frame[frame].dir[dir];\n\t\n\tDrawSurface(spritesheet[sprites[s].spritesheet], \\\n\t\t\t\tx, y, \\\n\t\t\t\t(sprdir->sheet_offset.x + xoff), \\\n\t\t\t\t(sprdir->sheet_offset.y + yoff), \\\n\t\t\t\twd, ht);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// draw sprite \"s\" at [x,y]. drawing frame \"frame\" and dir \"dir\".\nvoid Sprites::draw_sprite(int x, int y, int s, int frame, uint8_t dir)\n{\n\tBlitSprite(x, y, s, frame, dir, 0, 0, sprites[s].w, sprites[s].h);\n}\n\n// draw sprite \"s\", place it's draw point at [x,y] instead of it's upper-left corner.\nvoid Sprites::draw_sprite_at_dp(int x, int y, int s, int frame, uint8_t dir)\n{\n\tx -= sprites[s].frame[frame].dir[dir].drawpoint.x;\n\ty -= sprites[s].frame[frame].dir[dir].drawpoint.y;\n\tBlitSprite(x, y, s, frame, dir, 0, 0, sprites[s].w, sprites[s].h);\n}\n\n\n// draw a portion of a sprite, such as a sprite in the middle of \"teleporting\".\n// only the area between clipy1 (inclusive) and clipy2 (exclusive) are visible.\nvoid Sprites::draw_sprite_clipped(int x, int y, int s, int frame, uint8_t dir, \\\n\t\t\t\t\t\tint clipx1, int clipx2, int clipy1, int clipy2)\n{\n\tBlitSprite(x + clipx1, y + clipy1, s, frame, dir, clipx1, clipy1, \\\n\t\t\t\t(clipx2 - clipx1), (clipy2 - clipy1));\n}\n\n// draw a clipped sprite while clipping only the width.\n// used for drawing percentage bars, etc.\nvoid Sprites::draw_sprite_clip_width(int x, int y, int s, int frame, int wd)\n{\n\tBlitSprite(x, y, s, frame, 0, 0, 0, wd, sprites[s].h);\n}\n\n// draws a sprite at less than it's actual width by chopping it into two chunks.\n// on the left, the first \"repeat_at\" pixels are drawn.\n// then, the remaining \"wd\" is drawn from the right half of the sprite.\n// used for things like drawing the textboxes.\nvoid Sprites::draw_sprite_chopped(int x, int y, int s, int frame, int wd, int repeat_at)\n{\nint xoff;\n\n\tif (wd >= sprites[s].w)\n\t{\n\t\tdraw_sprite(x, y, s, frame);\n\t\treturn;\n\t}\n\t\n\t// draw the left part\n\tBlitSprite(x, y, s, frame, 0, 0, 0, repeat_at, sprites[s].h);\n\tx += repeat_at;\n\twd -= repeat_at;\n\t\n\t// draw the rest of it\n\txoff = (sprites[s].w - wd);\n\t\n\tBlitSprite(x, y, s, frame, 0, xoff, 0, wd, sprites[s].h);\n}\n\n// draws a sprite to any arbitrary width by repeating it over the given distance.\n// if needed, the rightmost instance of the sprite is clipped.\nvoid Sprites::draw_sprite_repeating_x(int x, int y, int s, int frame, int wd)\n{\n\tint wdleft = wd;\n\twhile(wdleft > 0)\n\t{\n\t\tint blitwd = wdleft;\n\t\tif (blitwd > sprites[s].w) blitwd = sprites[s].w;\n\t\t\n\t\tBlitSprite(x, y, s, frame, 0, 0, 0, blitwd, sprites[s].h);\n\t\tx += blitwd;\n\t\twdleft -= blitwd;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// return the NXSurface for a given spritesheet #\nNXSurface *Sprites::get_spritesheet(int sheetno)\n{\n\tLoadSheetIfNeeded(sheetno);\n\treturn spritesheet[sheetno];\n}\n\n// create an empty spritesheet of the given size and return it's index.\nint Sprites::create_spritesheet(int wd, int ht)\n{\n\tif (num_spritesheets >= MAX_SPRITESHEETS)\n\t\treturn -1;\n\t\n\tspritesheet[num_spritesheets] = new NXSurface(wd, ht);\n\treturn num_spritesheets++;\n}\n\n// draw a sprite onto some surface other than the screen\nvoid Sprites::draw_sprite_to_surface(NXSurface *dst, int x, int y, int s, int frame, uint8_t dir)\n{\n\tGraphics::SetDrawTarget(dst);\n\tdraw_sprite(x, y, s, frame, dir);\n\tGraphics::SetDrawTarget(screen);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic bool load_sif(const char *fname)\n{\nSIFLoader sif;\nuint8_t *sheetdata, *spritesdata;\nint sheetdatalength, spritesdatalength;\n\n\tif (sif.LoadHeader(fname))\n\t\treturn 1;\n\t\n\tif (!(sheetdata = sif.FindSection(SIF_SECTION_SHEETS, &sheetdatalength)))\n\t{\n\t\tstaterr(\"load_sif: file '%s' missing SIF_SECTION_SHEETS\", fname);\n\t\treturn 1;\n\t}\n\t\n\tif (!(spritesdata = sif.FindSection(SIF_SECTION_SPRITES, &spritesdatalength)))\n\t{\n\t\tstaterr(\"load_sif: file '%s' missing SIF_SECTION_SPRITES\", fname);\n\t\treturn 1;\n\t}\n\t\n\t// decode sheets\n\tsheetfiles.MakeEmpty();\n\tif (SIFStringArraySect::Decode(sheetdata, sheetdatalength, &sheetfiles))\n\t\treturn 1;\n\t\n\t// decode sprites\n\tif (SIFSpritesSect::Decode(spritesdata, spritesdatalength, \\\n\t\t\t\t\t\t&sprites[0], &num_sprites, MAX_SPRITES))\n\t{\n\t\tstaterr(\"load_sif: SIFSpritesSect decoder failed\");\n\t\treturn 1;\n\t}\n\t\n\tsif.CloseFile();\n\t\n\tcreate_slope_boxes();\n\toffset_by_draw_points();\n\texpand_single_dir_sprites();\n\t\n\treturn 0;\n}\n\n\n// create slope boxes for all sprites, used by the slope-handling routines\n// these are basically just a form of bounding box describing the bounds of the\n// blockd points.\nstatic void create_slope_boxes()\n{\n\tfor(int s=0;s<num_sprites;s++)\n\t{\n\t\tif (sprites[s].block_d.count != 0)\n\t\t{\n\t\t\tint leftmost = 99999;\n\t\t\tint rightmost = -99999;\n\t\t\tfor(int i=0;i<sprites[s].block_d.count;i++)\n\t\t\t{\n\t\t\t\tif (sprites[s].block_d[i].x < leftmost)  leftmost = sprites[s].block_d[i].x;\n\t\t\t\tif (sprites[s].block_d[i].x > rightmost) rightmost = sprites[s].block_d[i].x;\n\t\t\t}\n\t\t\t\n\t\t\tsprites[s].slopebox.x1 = leftmost;\n\t\t\tsprites[s].slopebox.x2 = rightmost;\n\t\t\t\n\t\t\tif (sprites[s].block_u.count)\n\t\t\t\tsprites[s].slopebox.y1 = (sprites[s].block_u[0].y + 1);\n\t\t\telse\n\t\t\t\tsprites[s].slopebox.y1 = 0;\n\t\t\t\n\t\t\tsprites[s].slopebox.y2 = (sprites[s].block_d[0].y - 1);\n\t\t}\n\t}\n\t\n\tsprites[SPR_MYCHAR].slopebox.y1 += 3;\n}\n\n// offset things like blockl/r/u/d, bounding box etc by the draw point of all\n// sprites so that these things are consistent with where the sprite appears to be\nstatic void offset_by_draw_points()\n{\n\tfor(int s=0;s<num_sprites;s++)\n\t{\n\t\tint dx = -sprites[s].frame[0].dir[0].drawpoint.x;\n\t\tint dy = -sprites[s].frame[0].dir[0].drawpoint.y;\n\t\t\n\t\tsprites[s].bbox.offset(dx, dy);\n\t\tsprites[s].slopebox.offset(dx, dy);\n\t\tsprites[s].solidbox.offset(dx, dy);\n\t\t\n\t\tsprites[s].block_l.offset(dx, dy);\n\t\tsprites[s].block_r.offset(dx, dy);\n\t\tsprites[s].block_u.offset(dx, dy);\n\t\tsprites[s].block_d.offset(dx, dy);\n\t\t\n\t\tfor(int f=0;f<sprites[s].nframes;f++)\n\t\t{\n\t\t\tfor(int d=0;d<sprites[s].ndirs;d++)\n\t\t\t{\n\t\t\t\tint dx = -sprites[s].frame[f].dir[d].drawpoint.x;\n\t\t\t\tint dy = -sprites[s].frame[f].dir[d].drawpoint.y;\n\t\t\t\tsprites[s].frame[f].dir[d].pf_bbox.offset(dx, dy);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// for sprites which only have 1 dir (no separate frames for left & right),\n// create a 2nd identical dir as the rest of the engine doesn't bother\n// with this complication.\nstatic void expand_single_dir_sprites()\n{\n\tfor(int s=0;s<num_sprites;s++)\n\t{\n\t\tif (sprites[s].ndirs == 1)\n\t\t{\n\t\t\tsprites[s].ndirs = 2;\n\t\t\tfor(int f=0;f<sprites[s].nframes;f++)\n\t\t\t\tsprites[s].frame[f].dir[1] = sprites[s].frame[f].dir[0];\n\t\t}\n\t}\n}\n\n\n\n"
  },
  {
    "path": "graphics/sprites.fdh",
    "content": "//hash:ce3c3b74\n//automatically generated by Makegen\n\n/* located in graphics/sprites.cpp */\n\n//---------------[referenced from graphics/sprites.cpp]--------------//\nstatic bool load_sif(const char *fname);\nstatic void create_slope_boxes();\nstatic void offset_by_draw_points();\nstatic void expand_single_dir_sprites();\n\n\n/* located in common/stat.cpp */\n\n//---------------[referenced from graphics/sprites.cpp]--------------//\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "graphics/sprites.h",
    "content": "\n#ifndef _SPRITES_H\n#define _SPRITES_H\n\n#define MAX_SPRITESHEETS\t64\n#define MAX_SPRITES\t\t\t512\n\n#include \"../siflib/sif.h\"\nextern SIFSprite sprites[MAX_SPRITES];\n\n\nnamespace Sprites\n{\n\tbool Init();\n\tvoid Close();\n\tvoid FlushSheets();\n\t\n\tstatic void LoadSheetIfNeeded(int spr);\n\t\n\tstatic void BlitSprite(int x, int y, int s, int frame, uint8_t dir, \\\n\t\t\t\t\t\tint xoff, int yoff, int wd, int ht);\n\n\n\tvoid draw_sprite(int x, int y, int s, int frame=0, uint8_t dir=0);\n\tvoid draw_sprite_at_dp(int x, int y, int s, int frame=0, uint8_t dir=0);\n\tvoid draw_sprite_clipped(int x, int y, int s, int frame, uint8_t dir, int clipx1, int clipx2, int clipy1, int clipy2);\n\tvoid draw_sprite_clip_width(int x, int y, int s, int frame, int wd);\n\tvoid draw_sprite_chopped(int x, int y, int s, int frame, int wd, int repeat_at);\n\tvoid draw_sprite_repeating_x(int x, int y, int s, int frame, int wd);\n\t\n\tNXSurface *get_spritesheet(int sheetno);\n\tint create_spritesheet(int wd, int ht);\n\tvoid draw_sprite_to_surface(NXSurface *dst, int x, int y, int s, int frame, uint8_t dir);\n\n};\n\n\n\n\n#endif\n"
  },
  {
    "path": "graphics/tileset.cpp",
    "content": "\n// manages the tileset\n#include \"graphics.h\"\n#include \"tileset.h\"\n#include \"tileset.fdh\"\nusing namespace Graphics;\n\nextern const char *tileset_names[];\t\t// from stagedata.cpp\nextern const char *stage_dir;\t\t\t// from main\n\nstatic NXSurface *tileset;\nstatic int current_tileset = -1;\n\nbool Tileset::Init()\n{\n\ttileset = NULL;\n\tcurrent_tileset = -1;\n\treturn 0;\n}\n\nvoid Tileset::Close()\n{\n\tdelete tileset;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// load the given tileset into memory, replacing any other tileset.\nbool Tileset::Load(int new_tileset)\n{\nchar fname[MAXPATHLEN];\n\n\tif (new_tileset != current_tileset)\n\t{\n\t\tif (tileset)\n\t\t{\n\t\t\tdelete tileset;\n\t\t\tcurrent_tileset = -1;\n\t\t}\n\t\t\n\t\tsprintf(fname, \"%s/Prt%s.pbm\", stage_dir, tileset_names[new_tileset]);\n\t\t\n\t\t// always use SDL_DisplayFormat on tilesets; they need to come out of 8-bit\n\t\t// so that we can replace the destroyable star tiles without them palletizing.\n\t\ttileset = NXSurface::FromFile(fname, true, true);\n\t\tif (!tileset)\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tcurrent_tileset = new_tileset;\n\t}\n\t\n\treturn 0;\n}\n\n// draw the given tile from the current tileset to the screen\nvoid Tileset::draw_tile(int x, int y, int t)\n{\n\t// 16 tiles per row on all tilesheet\n\tint srcx = (t % 16) * TILE_W;\n\tint srcy = (t / 16) * TILE_H;\n\t\n\tDrawSurface(tileset, x, y, srcx, srcy, TILE_W, TILE_H);\n}\n\nvoid Tileset::Reload()\n{\n\tif (current_tileset != -1)\n\t{\n\t\tint tileset = current_tileset;\n\t\tcurrent_tileset = -1;\n\t\tLoad(tileset);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nNXSurface *Tileset::GetSurface()\n{\n\treturn tileset;\n}\n\n"
  },
  {
    "path": "graphics/tileset.fdh",
    "content": "//hash:00000000\n//automatically generated by Makegen\n"
  },
  {
    "path": "graphics/tileset.h",
    "content": "\n#ifndef _TILESET_H\n#define _TILESET_H\n\n#define TILE_W\t\t\t\t16\n#define TILE_H\t\t\t\t16\n\nnamespace Tileset\n{\n\tbool Init();\n\tvoid Close();\n\t\n\tbool Load(int new_tileset);\n\tvoid Reload();\n\tvoid draw_tile(int x, int y, int t);\n\t\n\tNXSurface *GetSurface();\n};\n\n\n#endif\n"
  },
  {
    "path": "input.cpp",
    "content": "\n#include \"nx.h\"\n#include \"input.fdh\"\n\n#ifdef _MOTOEZX\n#include \"platform/EZX/EZX_SDL_PollEvent.h\"\n#endif\n\nuint8_t mappings[SDLK_LAST];\n\nbool inputs[INPUT_COUNT];\nbool lastinputs[INPUT_COUNT];\nint last_sdl_key;\n\nbool input_init(void)\n{\n\tmemset(inputs, 0, sizeof(inputs));\n\tmemset(lastinputs, 0, sizeof(lastinputs));\n\tmemset(mappings, 0xff, sizeof(mappings));\n\t\n\t// default mappings\n\t#ifdef __SDLSHIM__\n\t{\n\t\tmappings[SDLK_LEFT] = LEFTKEY;\n\t\tmappings[SDLK_RIGHT] = RIGHTKEY;\n\t\tmappings[SDLK_UP] = UPKEY;\n\t\tmappings[SDLK_DOWN] = DOWNKEY;\n\t\t\n\t\tmappings[SDLK_BTN3] = JUMPKEY;\n\t\tmappings[SDLK_BTN4] = FIREKEY;\n\t\t\n\t\tmappings[SDLK_BTN1] = INVENTORYKEY;\n\t\tmappings[SDLK_BTN2] = MAPSYSTEMKEY;\n\t\t\n\t\tmappings[SDLK_JOGDIAL_UP] = PREVWPNKEY;\n\t\tmappings[SDLK_JOGDIAL_DOWN] = NEXTWPNKEY;\n\t}\n\t#else\n\t{\n\t\tmappings[SDLK_LEFT] = LEFTKEY;\n\t\tmappings[SDLK_RIGHT] = RIGHTKEY;\n\t\tmappings[SDLK_UP] = UPKEY;\n\t\tmappings[SDLK_DOWN] = DOWNKEY;\n\n#ifdef _DINGUX\n        mappings[SDLK_LCTRL] = JUMPKEY;\n        mappings[SDLK_LALT] = FIREKEY;\n        mappings[SDLK_SPACE] = PREVWPNKEY;\n        mappings[SDLK_LSHIFT] = NEXTWPNKEY;\n        mappings[SDLK_BACKSPACE] = INVENTORYKEY;\n        mappings[SDLK_RETURN] = MAPSYSTEMKEY;\n#elif _MOTOMAGX\n        mappings[SDLK_PLUS] = JUMPKEY;\n        mappings[SDLK_RETURN] = FIREKEY;\n        mappings[SDLK_0] = PREVWPNKEY;\n        mappings[SDLK_8] = NEXTWPNKEY;\n        mappings[SDLK_2] = INVENTORYKEY;\n        mappings[SDLK_5] = MAPSYSTEMKEY;\n#elif _MOTOEZX\n        mappings[SDLK_PLUS] = JUMPKEY;\n        mappings[SDLK_MINUS] = FIREKEY;\n        mappings[SDLK_d] = PREVWPNKEY;\n        mappings[SDLK_c] = NEXTWPNKEY;\n        mappings[SDLK_RETURN] = INVENTORYKEY;\n        mappings[SDLK_b] = MAPSYSTEMKEY;\n#else\n        mappings[SDLK_z] = JUMPKEY;\n        mappings[SDLK_x] = FIREKEY;\n        mappings[SDLK_a] = PREVWPNKEY;\n        mappings[SDLK_s] = NEXTWPNKEY;\n        mappings[SDLK_q] = INVENTORYKEY;\n        mappings[SDLK_w] = MAPSYSTEMKEY;\n#endif\n\n#if defined(_MOTOMAGX) || defined(_MOTOEZX)\n        mappings[SDLK_PAUSE] = ESCKEY;\n#else\n        mappings[SDLK_ESCAPE] = ESCKEY;\n#endif\n\n        mappings[SDLK_F1] = F1KEY;\n        mappings[SDLK_F2] = F2KEY;\n        mappings[SDLK_F3] = F3KEY;\n        mappings[SDLK_F4] = F4KEY;\n        mappings[SDLK_F5] = F5KEY;\n        mappings[SDLK_F6] = F6KEY;\n        mappings[SDLK_F7] = F7KEY;\n        mappings[SDLK_F8] = F8KEY;\n        mappings[SDLK_F9] = F9KEY;\n        mappings[SDLK_F10] = F10KEY;\n        mappings[SDLK_F11] = F11KEY;\n        mappings[SDLK_F12] = F12KEY;\n#ifdef _MOTOMAGX\n        mappings[SDLK_HASH] = OPTIONS_KEY; // #\n#elif _MOTOEZX\n        mappings[SDLK_e] = OPTIONS_KEY; // Mod Key + Camera\n#else\n        mappings[SDLK_TAB] = OPTIONS_KEY;\n#endif\n\n#if !defined(_DINGUX) && !defined(_MOTOEZX) && !defined(_MOTOMAGX)\n        mappings[SDLK_SPACE] = FREEZE_FRAME_KEY;\n#else\n        mappings[SDLK_s] = FREEZE_FRAME_KEY;\n#endif\n\n#if !defined(_MOTOEZX)\n\t\tmappings[SDLK_c] = FRAME_ADVANCE_KEY;\n#else\n\t\tmappings[SDLK_i] = FRAME_ADVANCE_KEY;\n#endif\n\t\tmappings[SDLK_v] = DEBUG_FLY_KEY;\n\t}\n\t#endif\n\t\n\treturn 0;\n}\n\n\n// set the SDL key that triggers an input\nvoid input_remap(int keyindex, int sdl_key)\n{\n\tstat(\"input_remap(%d => %d)\", keyindex, sdl_key);\n\tint old_mapping = input_get_mapping(keyindex);\n\tif (old_mapping != -1)\n\t\tmappings[old_mapping] = 0xff;\n\t\n\tmappings[sdl_key] = keyindex;\n}\n\n// get which SDL key triggers a given input\nint input_get_mapping(int keyindex)\n{\nint i;\n\n\tfor(i=0;i<=SDLK_LAST;i++)\n\t{\n\t\tif (mappings[i] == keyindex)\n\t\t\treturn i;\n\t}\n\t\n\treturn -1;\n}\n\nconst char *input_get_name(int index)\n{\nstatic const char *input_names[] =\n{\n\t\"left\", \"right\", \"up\", \"down\",\n\t\"jump\", \"fire\", \"pervious wpn\", \"next wpn\",\n\t\"inventory\", \"map\",\n\t\"escape\",\n    \"f1\", \"f2\", \"f3\", \"f4\", \"f5\", \"f6\", \"f7\", \"f8\", \"f9\", \"f10\", \"f11\", \"f12\",\n    \"options key\", \"freeze frame\", \"frame advance\", \"debug fly\"\n};\n\n\tif (index < 0 || index >= INPUT_COUNT)\n\t\treturn \"invalid\";\n\t\n\treturn input_names[index];\n}\n\nvoid input_set_mappings(int *array)\n{\n\tmemset(mappings, 0xff, sizeof(mappings));\n\tfor(int i=0;i<INPUT_COUNT;i++)\n\t\tmappings[array[i]] = i;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid input_poll(void)\n{\nSDL_Event evt;\nint ino, key;\n#if !defined(_MOTOEZX)\n\twhile(SDL_PollEvent(&evt))\n#else\n\twhile(EZX_SDL_PollEvent(&evt))\n#endif\n\t{\n\t\tswitch(evt.type)\n\t\t{\n\t\t\tcase SDL_KEYDOWN:\n\t\t\tcase SDL_KEYUP:\n\t\t\t{\n\t\t\t\tkey = evt.key.keysym.sym;\n\t\t\t\t\n\t\t\t\t#ifndef __SDLSHIM__\n\t\t\t\tstatic uint8_t shiftstates = 0;\n\t\t\t\textern bool freezeframe;\n\t\t\t\t\n\t\t\t\tif (console.IsVisible() && !IsNonConsoleKey(key))\n\t\t\t\t{\n\t\t\t\t\tif (key == SDLK_LSHIFT)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (evt.type == SDL_KEYDOWN)\n\t\t\t\t\t\t\tshiftstates |= LEFTMASK;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tshiftstates &= ~LEFTMASK;\n\t\t\t\t\t}\n\t\t\t\t\telse if (key == SDLK_RSHIFT)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (evt.type == SDL_KEYDOWN)\n\t\t\t\t\t\t\tshiftstates |= RIGHTMASK;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tshiftstates &= ~RIGHTMASK;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tint ch = key;\n\t\t\t\t\t\tif (shiftstates != 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tch = toupper(ch);\n\t\t\t\t\t\t\tif (ch == '.') ch = '>';\n\t\t\t\t\t\t\tif (ch == '-') ch = '_';\n\t\t\t\t\t\t\tif (ch == '/') ch = '?';\n\t\t\t\t\t\t\tif (ch == '1') ch = '!';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n                        if (evt.type == SDL_KEYDOWN)\n                            console.HandleKey(ch);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tconsole.HandleKeyRelease(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t#endif\t// __SDLSHIM__\n\t\t\t\t{\n\t\t\t\t\tino = mappings[key];\n\t\t\t\t\tif (ino != 0xff)\n\t\t\t\t\t\tinputs[ino] = (evt.type == SDL_KEYDOWN);\n\t\t\t\t\t\n\t\t\t\t\tif (evt.type == SDL_KEYDOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (Replay::IsPlaying() && ino <= LASTCONTROLKEY)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstat(\"user interrupt - stopping playback of replay\");\n\t\t\t\t\t\t\tReplay::end_playback();\n\t\t\t\t\t\t\tmemset(inputs, 0, sizeof(inputs));\n\t\t\t\t\t\t\tinputs[ino] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t#ifndef __SDLSHIM__\n\t\t\t\t\t\tif (key == '`')\t\t// bring up console\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!freezeframe)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsound(SND_SWITCH_WEAPON);\n\t\t\t\t\t\t\t\tconsole.SetVisible(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t#endif\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlast_sdl_key = key;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase SDL_QUIT:\n\t\t\t{\n\t\t\t\tinputs[ESCKEY] = true;\n\t\t\t\tgame.running = false;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n// keys that we don't want to send to the console\n// even if the console is up.\nstatic int IsNonConsoleKey(int key)\n{\nstatic const int nosend[] = { SDLK_LEFT, SDLK_RIGHT, 0 };\n\n\tfor(int i=0;nosend[i];i++)\n\t\tif (key == nosend[i])\n\t\t\treturn true;\n\t\n\treturn false;\n}\n\n\nvoid input_close(void)\n{\n\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic const int buttons[] = { JUMPKEY, FIREKEY, 0 };\n\nbool buttondown(void)\n{\n\tfor(int i=0;buttons[i];i++)\n\t{\n\t\tif (inputs[buttons[i]])\n\t\t\treturn 1;\n\t}\n\treturn 0;\n}\n\nbool buttonjustpushed(void)\n{\n\tfor(int i=0;buttons[i];i++)\n\t{\n\t\tif (inputs[buttons[i]] && !lastinputs[buttons[i]])\n\t\t\treturn 1;\n\t}\n\t\n\treturn 0;\n}\n\nbool justpushed(int k)\n{\n\treturn (inputs[k] && !lastinputs[k]);\n}\n\n\n\n\n\n"
  },
  {
    "path": "input.fdh",
    "content": "//hash:62c25ddc\n//automatically generated by Makegen\n\n/* located in input.cpp */\n\n//---------------------[referenced from input.cpp]-------------------//\nbool input_init(void);\nvoid input_remap(int keyindex, int sdl_key);\nint input_get_mapping(int keyindex);\nconst char *input_get_name(int index);\nvoid input_set_mappings(int *array);\nvoid input_poll(void);\nstatic int IsNonConsoleKey(int key);\nvoid input_close(void);\nbool buttondown(void);\nbool buttonjustpushed(void);\nbool justpushed(int k);\n\n\n/* located in sound/sound.cpp */\n\n//---------------------[referenced from input.cpp]-------------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//---------------------[referenced from input.cpp]-------------------//\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "input.h",
    "content": "\n#ifndef _INPUT_H\n#define _INPUT_H\n\nenum INPUTS\n{\n\tLEFTKEY, RIGHTKEY, UPKEY, DOWNKEY,\n\tJUMPKEY, FIREKEY,\n\tPREVWPNKEY, NEXTWPNKEY,\n\tINVENTORYKEY, MAPSYSTEMKEY,\n\t\n\tESCKEY,\n\tF1KEY,\n\tF2KEY,\n\tF3KEY,\n\tF4KEY,\n\tF5KEY,\n\tF6KEY,\n\tF7KEY,\n    F8KEY,\n    F9KEY,\n    F10KEY,\n    F11KEY,\n    F12KEY,\n\n    OPTIONS_KEY,\n    FREEZE_FRAME_KEY,\n    FRAME_ADVANCE_KEY,\n    DEBUG_FLY_KEY,\n\n    INPUT_COUNT\n};\n\n#define LASTCONTROLKEY\t\tMAPSYSTEMKEY\n\n#define DEBUG_GOD_KEY\t\tF1KEY\n#define DEBUG_MOVE_KEY\t\tF2KEY\n#define DEBUG_SAVE_KEY\t\tF4KEY\n#define FFWDKEY\t\t\t\tF5KEY\n\nextern bool inputs[INPUT_COUNT];\nextern bool lastinputs[INPUT_COUNT];\nextern int last_sdl_key;\n\n#endif\n"
  },
  {
    "path": "intro/intro.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"../ai/stdai.h\"\n#include \"intro.fdh\"\n\nstatic int blanktimer;\n#define EXIT_DELAY\t\t\t\t20\t\t// delay between intro and title screen\n\nbool intro_init(int param)\n{\n\tmusic(0);\n\tfade.set_full(FADE_OUT);\n\t\n\tgame.switchstage.mapno = STAGE_KINGS;\n\tgame.switchstage.playerx = 0;\n\tgame.switchstage.playery = 0;\n\tgame.switchstage.eventonentry = 100;\n\tplayer->hide = true;\n\t\n\treturn 0;\n}\n\nvoid intro_tick()\n{\n\tif (blanktimer > 0)\n\t{\n\t\tClearScreen(BLACK);\n\t\t\n\t\tif (--blanktimer == 0)\n\t\t\tgame.setmode(GM_TITLE);\n\t\treturn;\n\t}\n\t\n\tgame_tick_normal();\n\tplayer->y = 0;\n\t\n\t// when script ends with WAI9999, detect it and move on to title screen\n\tScriptInstance *script = GetCurrentScriptInstance();\n\tif ((script && script->delaytimer == 9999) || buttonjustpushed())\n\t{\n\t\tStopScripts();\n\t\tblanktimer = EXIT_DELAY;\n\t}\n\t\n\t// lower time for startup\n\tif (script && script->delaytimer && script->ip == 5)\n\t{\n\t\tgame.showmapnametime = 0;\n\t\tif (script->delaytimer > 20)\n\t\t\tscript->delaytimer = 20;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nINITFUNC(AIRoutines)\n{\n\tONTICK(OBJ_INTRO_KINGS, ai_intro_kings);\n\tONTICK(OBJ_INTRO_CROWN, ai_intro_crown);\n\tONTICK(OBJ_INTRO_DOCTOR, ai_intro_doctor);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// misery/balrog in bubble\nvoid ai_intro_kings(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\t\n\t\t\tif (o->dir == LEFT)\n\t\t\t{\n\t\t\t\to->timer = 25;\n\t\t\t\to->y -= 0x640;\n\t\t\t}\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif (++o->timer >= 50)\n\t\t\t{\n\t\t\t\to->timer = 0;\n\t\t\t\to->timer2 ^= 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer2)\n\t\t\t{\n\t\t\t\to->y += 0x40;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->y -= 0x40;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n// demon crown on throne\nvoid ai_intro_crown(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->x += (8 << CSF);\n\t\t\to->y += (14 << CSF);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\tif ((++o->timer % 8) == 1)\n\t\t\t{\n\t\t\t\teffect(o->x + random(-8<<CSF, 8<<CSF),\n\t\t\t\t\t\to->y + (8<<CSF),\n\t\t\t\t\t\t   EFFECT_GHOST_SPARKLE);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nvoid ai_intro_doctor(Object *o)\n{\n\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->y -= (8 << CSF);\n\t\t\to->state = 1;\n\t\t}\n\t\tcase 1:\n\t\t{\n\t\t\to->frame = 0;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// chuckle; facing screen\n\t\t{\n\t\t\to->state = 11;\n\t\t\to->frame = 0;\n\t\t\to->animtimer = 0;\n\t\t\to->timer2 = 0;\n\t\t}\n\t\tcase 11:\n\t\t{\n\t\t\tANIMATE_FWD(6);\n\t\t\tif (o->frame > 1)\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\tif (++o->timer2 > 7)\n\t\t\t\t\to->state = 1;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// walk\n\t\t{\n\t\t\to->state = 21;\n\t\t\to->frame = 2;\n\t\t\to->animtimer = 0;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tANIMATE(10, 2, 5);\n\t\t\to->x += 0x100;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\t// face away\n\t\t{\n\t\t\to->frame = 6;\n\t\t\to->state = 31;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 40:\t// chuckle; facing away\n\t\t{\n\t\t\to->state = 41;\n\t\t\to->frame = 6;\n\t\t\to->animtimer = 0;\n\t\t\to->timer2 = 0;\n\t\t}\n\t\tcase 41:\n\t\t{\n\t\t\tANIMATE_FWD(6);\n\t\t\tif (o->frame > 7)\n\t\t\t{\n\t\t\t\to->frame = 6;\n\t\t\t\tif (++o->timer2 > 7)\n\t\t\t\t\to->state = 30;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "intro/intro.fdh",
    "content": "//hash:9527a9cb\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//------------------[referenced from intro/intro.cpp]----------------//\nvoid game_tick_normal(void);\n\n\n/* located in caret.cpp */\n\n//------------------[referenced from intro/intro.cpp]----------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in tsc.cpp */\n\n//------------------[referenced from intro/intro.cpp]----------------//\nScriptInstance *GetCurrentScriptInstance();\nvoid StopScripts(void);\n\n\n/* located in input.cpp */\n\n//------------------[referenced from intro/intro.cpp]----------------//\nbool buttonjustpushed(void);\n\n\n/* located in intro/intro.cpp */\n\n//------------------[referenced from intro/intro.cpp]----------------//\nbool intro_init(int param);\nvoid intro_tick();\nvoid ai_intro_kings(Object *o);\nvoid ai_intro_crown(Object *o);\nvoid ai_intro_doctor(Object *o);\n\n\n/* located in sound/sound.cpp */\n\n//------------------[referenced from intro/intro.cpp]----------------//\nvoid music(int songno);\n\n\n/* located in common/misc.cpp */\n\n//------------------[referenced from intro/intro.cpp]----------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "intro/intro.h",
    "content": "\n#ifndef _INTRO_H\n#define _INTRO_H\n\n\nbool intro_init(int param);\nvoid intro_tick();\n\n#endif\n"
  },
  {
    "path": "intro/title.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"title.fdh\"\n\n// music and character selections for the different Counter times\nstatic struct\n{\n\tuint32_t timetobeat;\n\tint sprite;\n\tint songtrack;\n} titlescreens[] =\n{\n\t(3*3000),\tSPR_CS_SUE,    2,\t\t// 3 mins\t- Sue & Safety\n\t(4*3000),\tSPR_CS_KING,   41,\t\t// 4 mins\t- King & White\n\t(5*3000),\tSPR_CS_TOROKO, 40,\t\t// 5 mins\t- Toroko & Toroko's Theme\n\t(6*3000),\tSPR_CS_CURLY,  36,\t\t// 6 mins\t- Curly & Running Hell\n\t0xFFFFFFFF, SPR_CS_MYCHAR, 24\t\t// default\n};\n\n// artifical fake \"loading\" delay between selecting an option and it being executed,\n// because it actually doesn't look good if we respond instantly.\n#define SELECT_DELAY\t\t\t30\n#define SELECT_LOAD_DELAY\t\t20\t\t// delay when leaving the multisave Load dialog\n#define SELECT_MENU_DELAY\t\t8\t\t// delay from Load to load menu\n\nstatic struct\n{\n\tint sprite;\n\tint cursel;\n\tint selframe, seltimer;\n\tint selchoice, seldelay;\n\tint kc_pos;\n\tbool in_multiload;\n\t\n\tuint32_t besttime;\t\t// Nikumaru display\n} title;\n\n\nbool title_init(int param)\n{\n\tmemset(&title, 0, sizeof(title));\n\tgame.switchstage.mapno = 0;\n\tgame.switchstage.eventonentry = 0;\n\tgame.showmapnametime = 0;\n\ttextbox.SetVisible(false);\n\t\n\tif (niku_load(&title.besttime))\n\t\ttitle.besttime = 0xffffffff;\n\t\n\t// select a title screen based on Nikumaru time\n\tint t;\n\tfor(t=0;;t++)\n\t{\n\t\tif (title.besttime < titlescreens[t].timetobeat || \\\n\t\t\ttitlescreens[t].timetobeat == 0xffffffff)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\ttitle.sprite = titlescreens[t].sprite;\n\n    music(titlescreens[t].songtrack);\n\t\n\tif (AnyProfileExists())\n\t\ttitle.cursel = 1;\t// Load Game\n\telse\n\t\ttitle.cursel = 0;\t// New Game\n\t\n\treturn 0;\n}\n\nvoid title_tick()\n{\n\tif (!title.in_multiload)\n\t{\n\t\tif (title.seldelay > 0)\n\t\t{\n\t\t\tClearScreen(BLACK);\n\t\t\t\n\t\t\ttitle.seldelay--;\n\t\t\tif (!title.seldelay)\n\t\t\t\tselectoption(title.selchoice);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\thandle_input();\n\t\tdraw_title();\n\t}\n\telse\n\t{\n\t\tClearScreen(BLACK);\n\t\t\n\t\tif (!textbox.SaveSelect.IsVisible())\n\t\t{\t// selection was made, and settings.last_save_slot is now set appropriately\n\t\t\t\n\t\t\tsound(SND_MENU_SELECT);\n\t\t\t\n\t\t\ttextbox.SetVisible(false);\n\t\t\ttitle.selchoice = 1;\n\t\t\ttitle.seldelay = SELECT_LOAD_DELAY;\n\t\t\ttitle.in_multiload = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextbox.Draw();\n\t\t}\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void selectoption(int index)\n{\n\tswitch(index)\n\t{\n\t\tcase 0:\t\t// New\n\t\t{\n            music(0);\n\t\t\t\n\t\t\tgame.switchstage.mapno = NEW_GAME_FROM_MENU;\n\t\t\tgame.setmode(GM_NORMAL);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 1:\t\t// Load\n\t\t{\n\t\t\tmusic(0);\n\t\t\t\n\t\t\tgame.switchstage.mapno = LOAD_GAME_FROM_MENU;\n\t\t\tgame.setmode(GM_NORMAL);\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// Load Menu (multisave)\n\t\t{\n\t\t\ttextbox.SetVisible(true);\n\t\t\ttextbox.SaveSelect.SetVisible(true, SS_LOADING);\n\t\t\ttitle.in_multiload = true;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nstatic void handle_input()\n{\n\tif (justpushed(DOWNKEY))\n\t{\n\t\tsound(SND_MENU_MOVE);\n\t\tif (++title.cursel >= sprites[SPR_MENU].nframes)\n\t\t\ttitle.cursel = 0;\n\t}\n\telse if (justpushed(UPKEY))\n\t{\n\t\tsound(SND_MENU_MOVE);\n\t\tif (--title.cursel < 0)\n\t\t\ttitle.cursel = sprites[SPR_MENU].nframes - 1;\n\t}\n\t\n\tif (buttonjustpushed())\n\t{\n\t\tsound(SND_MENU_SELECT);\n\t\tint choice = title.cursel;\n\t\t\n\t\t// handle case where user selects Load but there is no savefile,\n\t\t// or the last_save_file is deleted.\n\t\tif (title.cursel == 1)\n\t\t{\n\t\t\tif (!ProfileExists(settings->last_save_slot))\n\t\t\t{\n\t\t\t\tbool foundslot = false;\n\t\t\t\tfor(int i=0;i<MAX_SAVE_SLOTS;i++)\n\t\t\t\t{\n\t\t\t\t\tif (ProfileExists(i))\n\t\t\t\t\t{\n\t\t\t\t\t\tstat(\"Last save file %d missing. Defaulting to %d instead.\", settings->last_save_slot, i);\n\t\t\t\t\t\tsettings->last_save_slot = i;\n\t\t\t\t\t\tfoundslot = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// there are no save files. Start a new game instead.\n\t\t\t\tif (!foundslot)\n\t\t\t\t{\n\t\t\t\t\tstat(\"No save files found. Starting new game instead.\");\n\t\t\t\t\tchoice = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (choice == 1 && settings->multisave)\n\t\t{\n\t\t\ttitle.selchoice = 2;\n\t\t\ttitle.seldelay = SELECT_MENU_DELAY;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttitle.selchoice = choice;\n\t\t\ttitle.seldelay = SELECT_DELAY;\n\t\t\tmusic(0);\n\t\t}\n\t}\n\t\n\trun_konami_code();\n}\n\nstatic void draw_title()\n{\n\t// background is dk grey, not pure black\n\tClearScreen(0x20, 0x20, 0x20);\n\t\n\t// top logo\n\tint tx = (SCREEN_WIDTH / 2) - (sprites[SPR_TITLE].w / 2) - 2;\n    draw_sprite(tx, 40, SPR_TITLE);\n\n#ifdef _L10N_CP1251\n    const char t_new[2][11] = {\n        \"\\xCD\\xEE\\xE2\\xE0\\xFF\\xA0\\xE8\\xE3\\xF0\\xE0\", // New Game in CP1251, Russian\n        \"\\xC7\\xE0\\xE3\\xF0\\xF3\\xE7\\xE8\\xF2\\xFC\"      // Load Game in CP1251, Russian\n    };\n#endif\n\n\t// draw menu\n\tint cx = (SCREEN_WIDTH / 2) - (sprites[SPR_MENU].w / 2) - 8;\n\tint cy = (SCREEN_HEIGHT / 2) + 8;\n\tfor(int i=0;i<sprites[SPR_MENU].nframes;i++)\n    {\n#ifdef _L10N_CP1251\n        font_draw(cx, cy, t_new[i > 0], 6);\n#else\n        draw_sprite(cx, cy, SPR_MENU, i);\n#endif\n\t\tif (i == title.cursel)\n\t\t{\n            draw_sprite(cx - 16, cy - 1, title.sprite, title.selframe);\n\t\t}\n\t\t\n        cy += (sprites[SPR_MENU].h + 4);\n\t}\n\t\n\t// animate character\n\tif (++title.seltimer > 8)\n\t{\n\t\ttitle.seltimer = 0;\n\t\tif (++title.selframe >= sprites[title.sprite].nframes)\n\t\t\ttitle.selframe = 0;\n\t}\n\t\n\t// accreditation\n\tcx = (SCREEN_WIDTH / 2) - (sprites[SPR_PIXEL_FOREVER].w / 2);\n\tint acc_y = SCREEN_HEIGHT - 48;\n\tdraw_sprite(cx, acc_y, SPR_PIXEL_FOREVER);\n\t\n\t// version\n    static const char *VERSION = \"NXEngine v. 1.0.0.4 | Rev 4\";\n    static const int SPACING = 5;\n\tint wd = GetFontWidth(VERSION, SPACING);\n\tcx = (SCREEN_WIDTH / 2) - (wd / 2);\n\tfont_draw(cx, acc_y + sprites[SPR_PIXEL_FOREVER].h + 4, VERSION, SPACING);\n\t\n\t// draw Nikumaru display\n\tif (title.besttime != 0xffffffff)\n\t\tniku_draw(title.besttime, true);\n}\n\n\n\nstatic int kc_table[] = { UPKEY, UPKEY, DOWNKEY, DOWNKEY,\n\t\t\t\t\t\t  LEFTKEY, RIGHTKEY, LEFTKEY, RIGHTKEY, -1 };\n\nvoid run_konami_code()\n{\n\tif (justpushed(UPKEY) || justpushed(DOWNKEY) || \\\n\t\tjustpushed(LEFTKEY) || justpushed(RIGHTKEY))\n\t{\n\t\tif (justpushed(kc_table[title.kc_pos]))\n\t\t{\n\t\t\ttitle.kc_pos++;\n\t\t\tif (kc_table[title.kc_pos] == -1)\n\t\t\t{\n\t\t\t\tsound(SND_MENU_SELECT);\n\t\t\t\ttitle.kc_pos = 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttitle.kc_pos = 0;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "intro/title.fdh",
    "content": "//hash:0cc16f11\n//automatically generated by Makegen\n\n/* located in profile.cpp */\n\n//------------------[referenced from intro/title.cpp]----------------//\nbool AnyProfileExists();\nbool ProfileExists(int num);\n\n\n/* located in statusbar.cpp */\n\n//------------------[referenced from intro/title.cpp]----------------//\nvoid niku_draw(int value, bool force_white);\n\n\n/* located in input.cpp */\n\n//------------------[referenced from intro/title.cpp]----------------//\nbool justpushed(int k);\nbool buttonjustpushed(void);\n\n\n/* located in niku.cpp */\n\n//------------------[referenced from intro/title.cpp]----------------//\nbool niku_load(uint32_t *value_out);\n\n\n/* located in intro/title.cpp */\n\n//------------------[referenced from intro/title.cpp]----------------//\nbool title_init(int param);\nvoid title_tick();\nstatic void selectoption(int index);\nstatic void handle_input();\nstatic void draw_title();\nvoid run_konami_code();\n\n\n/* located in graphics/font.cpp */\n\n//------------------[referenced from intro/title.cpp]----------------//\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in sound/sound.cpp */\n\n//------------------[referenced from intro/title.cpp]----------------//\nvoid music(int songno);\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//------------------[referenced from intro/title.cpp]----------------//\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "intro/title.h",
    "content": "\n#ifndef _TITLE_H\n#define _TITLE_H\n\n\nbool title_init(int param);\nvoid title_tick();\n\n#endif\n"
  },
  {
    "path": "inventory.cpp",
    "content": "\n// the in-game inventory screen\n\n#include \"nx.h\"\n#include \"inventory.h\"\n#include \"inventory.fdh\"\n\n#define ARMS_X\t\t\t10\n#define ARMS_Y\t\t\t8\n\n#define ITEMS_X\t\t\t10\n#define ITEMS_Y\t\t\t60\n\nstatic stInventory inv;\n\n// can't enter Inven if\n//  * script is running\n//  * fade is in progress\n//  * player is dead\n\n// param is passed as 1 when returning from Map System.\nbool inventory_init(int param)\n{\n\tmemset(&inv, 0, sizeof(inv));\n\t\n\tinv.curselector = &inv.armssel;\n\tinv.armssel.cursel = RefreshInventoryScreen();\n\tinv.curselector->lastsel = -9999;\t\t// run the script first time\n\t\n\t// returning from map system?\n\tif (param == 1)\n\t{\n\t\tinv.curselector = &inv.itemsel;\n\t\t\n\t\t// highlight Map System\n\t\tfor(int i=0;i<inv.itemsel.nitems;i++)\n\t\t{\n\t\t\tif (inv.itemsel.items[i] == 2)\n\t\t\t{\n\t\t\t\tinv.curselector->cursel = i;\n\t\t\t\t// textbox NOT up until they move the selector\n\t\t\t\tinv.curselector->lastsel = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n\n\nvoid inventory_tick(void)\n{\n\t// run the selectors\n\tRunSelector(inv.curselector);\n\t\n\t// draw\n\tDrawScene();\n\tDrawInventory();\n\ttextbox.Draw();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// reload which items & guns are available.\n// reset the cursor for the current selector.\n// return the slot corresponding to the current weapon.\nint RefreshInventoryScreen(void)\n{\nint i;\nint curwpn = 0;\n\t\n\tif (game.mode != GM_INVENTORY)\n\t\treturn 0;\n\t\n\tinv.w = 244;\n\tinv.h = 152;\n\tinv.x = (SCREEN_WIDTH / 2) - (inv.w / 2);\n#ifndef _480X272 // 480x272 widescreen fix\n\tinv.y = 8;\n#else\n    inv.y = 30;\n#endif\n\t\n\t// find current weapon and count # items for armssel selector\n\tinv.armssel.items[0] = 0;\t\t// show \"no weapon\" in case of no weapon\n\tinv.armssel.nitems = 0;\n\tfor(i=1;i<WPN_COUNT;i++)\n\t{\n\t\tif (!player->weapons[i].hasWeapon) continue;\n\t\t\n\t\tif (player->curWeapon == i) curwpn = inv.armssel.nitems;\n\t\tinv.armssel.items[inv.armssel.nitems++] = i;\n\t}\n\t\n\tinv.armssel.spacing_x = 40;\n\tinv.armssel.spacing_y = 0;\n\tinv.armssel.sprite = SPR_SELECTOR_ARMS;\n\tinv.armssel.sound = SND_SWITCH_WEAPON;\n\tinv.armssel.scriptbase = 1000;\n\tinv.armssel.rowlen = inv.armssel.nitems;\n\t\n\t// setup itemsel...\n\tinv.itemsel.nitems = player->ninventory;\n\tinv.itemsel.items[0] = 0;\t\t// show \"no item\" in case of no items\n\tfor(i=0;i<player->ninventory;i++)\n\t\tinv.itemsel.items[i] = player->inventory[i];\n\t\n\tinv.itemsel.spacing_x = sprites[SPR_ITEMIMAGE].w;\n\tinv.itemsel.spacing_y = sprites[SPR_ITEMIMAGE].h + 2;\n\tinv.itemsel.sprite = SPR_SELECTOR_ITEMS;\n\tinv.itemsel.sound = SND_MENU_MOVE;\n\tinv.itemsel.rowlen = 6;\n\tinv.itemsel.scriptbase = 5000;\n\t\n\tinv.curselector->cursel = 0;\n\t// after an item has been used don't bring up the script of whatever item\n\t// the selector is moved to\n\tinv.curselector->lastsel = inv.curselector->cursel;\n\treturn curwpn;\n}\n\nvoid UnlockInventoryInput(void)\n{\n\tif (inv.lockinput)\n\t\tinv.lockinput = false;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nstatic void DrawInventory(void)\n{\nint x, y, w, i, c;\n\n\t// draw the box\n\tTextBox::DrawFrame(inv.x, inv.y, inv.w, inv.h);\n\t\n\t// - draw the weapons ----\n\tx = inv.x + ARMS_X;\n\ty = inv.y + ARMS_Y;\n\tdraw_sprite(x, y, SPR_TEXT_ARMS, 0, 0);\n\ty += sprites[SPR_TEXT_ARMS].h;\n\t\n\tDrawSelector(&inv.armssel, x, y);\n\t\n\t// draw the arms\n\tfor(w=1;w<WPN_COUNT;w++)\n\t{\n\t\tif (!player->weapons[w].hasWeapon) continue;\n\t\t\n\t\tdraw_sprite(x+1, y+1, SPR_ARMSICONS, w, 0);\n\t\tDrawWeaponLevel(x+1, y+16, w);\n\t\tDrawWeaponAmmo(x+1, y+16+8, w);\n\t\t\n\t\tx += inv.armssel.spacing_x;\n\t}\n\t\n\t// - draw the items ----\n\tx = inv.x + ITEMS_X;\n\ty = inv.y + ITEMS_Y;\n\tdraw_sprite(x, y, SPR_TEXT_ITEMS, 0, 0);\n\ty += sprites[SPR_TEXT_ITEMS].h;\n\t\n\tDrawSelector(&inv.itemsel, x, y);\n\t\n\tc = 0;\n\tfor(i=0;i<inv.itemsel.nitems;i++)\n\t{\n\t\tdraw_sprite(x, y, SPR_ITEMIMAGE, inv.itemsel.items[i], 0);\n\t\t\n\t\tx += inv.itemsel.spacing_x;\n\t\t\n\t\tif (++c >= inv.itemsel.rowlen)\n\t\t{\n\t\t\tx = inv.x + ITEMS_X;\n\t\t\ty += inv.itemsel.spacing_y;\n\t\t\tc = 0;\n\t\t}\n\t}\n}\n\nstatic void RunSelector(stSelector *selector)\n{\nint nrows;\nint currow, curcol;\nchar toggle = 0;\n\n\tif (inv.lockinput)\n\t{\n\t\tif (GetCurrentScript()==-1) inv.lockinput = 0;\n\t\telse return;\n\t}\n\t\n\tif (selector->nitems)\n\t{\n\t\tnrows = (selector->nitems - 1) / selector->rowlen;\n\t\tcurrow = (selector->cursel / selector->rowlen);\n\t\tcurcol = (selector->cursel % selector->rowlen);\n\t}\n\telse\n\t{\n\t\tnrows = currow = curcol = 0;\n\t}\n\t\n\tif (justpushed(LEFTKEY))\n\t{\n\t\tsound(selector->sound);\n\t\t\n\t\t// at beginning of row?\n\t\tif (curcol == 0)\n\t\t{\t// wrap to end of row\n\t\t\tif (currow < nrows)\n\t\t\t\tselector->cursel += (selector->rowlen - 1);\n\t\t\telse if (selector->nitems > 0)\n\t\t\t\tselector->cursel = selector->nitems - 1;\n\t\t}\n\t\telse selector->cursel--;\n\t}\n\t\n\tif (justpushed(RIGHTKEY))\n\t{\n\t\tsound(selector->sound);\n\t\t\n\t\t// at end of row?\n\t\tif (curcol==selector->rowlen-1 || selector->cursel+1 >= selector->nitems)\n\t\t{\t// wrap to beginning of row\n\t\t\tselector->cursel = (currow * selector->rowlen);\n\t\t}\n\t\telse selector->cursel++;\n\t}\n\t\n\tif (justpushed(DOWNKEY))\n\t{\n\t\t// on last row?\n\t\tif (currow >= nrows) toggle = 1;\n\t\telse\n\t\t{\n\t\t\tselector->cursel += selector->rowlen;\n\t\t\t\n\t\t\t// don't go past last item\n\t\t\tif (selector->cursel >= selector->nitems)\n\t\t\t\tselector->cursel = (selector->nitems - 1);\n\t\t\t\t\n\t\t\tsound(selector->sound);\n\t\t}\n\t}\n\t\n\tif (justpushed(UPKEY))\n\t{\n\t\t// on top row?\n\t\tif (currow == 0) toggle = 1;\n\t\telse\n\t\t{\n\t\t\tselector->cursel -= selector->rowlen;\n\t\t\tsound(selector->sound);\n\t\t}\n\t}\n\t\n\t// switch to other selector\n\tif (toggle)\n\t{\n\t\tif (selector == &inv.itemsel)\n\t\t{\n\t\t\tselector = &inv.armssel;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tselector = &inv.itemsel;\n\t\t}\n\t\t\n\t\tinv.curselector = selector;\n\t\t\n\t\tsound(selector->sound);\n\t\tselector->lastsel = -9999;\n\t}\n\t\n\t// bring up scripts\n\tif (selector->cursel != selector->lastsel)\n\t{\n\t\tselector->lastsel = selector->cursel;\n\t\t\n\t\tStartScript(selector->items[selector->cursel] + selector->scriptbase, SP_ARMSITEM);\n\t}\n\t\n\t\n\tif (selector == &inv.armssel)\t\t// selecting a weapon\n\t{\n\t\tif (buttonjustpushed())\n\t\t{\t// select the new weapon\n\t\t\tweapon_slide(LEFT, selector->items[selector->cursel]);\n\t\t\tExitInventory();\n\t\t}\n\t}\n\telse\t\t\t\t\t\t\t\t\t// selecting an item\n\t{\n\t\tif (justpushed(JUMPKEY))\n\t\t{\t// bring up \"more info\" or \"equip\" script for this item\n\t\t\tStartScript(selector->items[selector->cursel] + selector->scriptbase + 1000, SP_ARMSITEM);\n\t\t\tinv.lockinput = 1;\n\t\t}\n\t\t\n\t\tif (justpushed(INVENTORYKEY) || justpushed(FIREKEY))\n\t\t\tExitInventory();\n\t}\n}\n\nstatic void ExitInventory(void)\n{\n\tStopScripts();\n\tgame.setmode(GM_NORMAL);\n\tmemset(inputs, 0, sizeof(inputs));\n}\n\n\n\nstatic void DrawSelector(stSelector *selector, int x, int y)\n{\nint selx, sely;\nint xsel, ysel;\n\n\tif (selector == inv.curselector)\n\t{\n\t\t// flash the box\n\t\tif (++selector->animtimer > 1)\n\t\t{\n\t\t\tselector->animtimer = 0;\n\t\t\tselector->flashstate ^= 1;\n\t\t}\n\t}\n\telse\n\t{\t// permanently dim\n\t\tselector->flashstate = 1;\n\t\tselector->animtimer = 99;\t\t// light up immediately upon becoming active\n\t}\n\t\n\tif (selector->rowlen)\n\t{\n\t\txsel = (selector->cursel % selector->rowlen);\n\t\tysel = (selector->cursel / selector->rowlen);\n\t}\n\telse xsel = ysel = 0;\n\t\n\tselx = x + (xsel * selector->spacing_x);\n\tsely = y + (ysel * selector->spacing_y);\n\tdraw_sprite(selx, sely, selector->sprite, selector->flashstate, 0);\n}\n\n"
  },
  {
    "path": "inventory.fdh",
    "content": "//hash:4e75e7a3\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//-------------------[referenced from inventory.cpp]-----------------//\nvoid DrawScene(void);\n\n\n/* located in statusbar.cpp */\n\n//-------------------[referenced from inventory.cpp]-----------------//\nvoid DrawWeaponLevel(int x, int y, int wpn);\nvoid DrawWeaponAmmo(int x, int y, int wpn);\nvoid weapon_slide(int dir, int newwpn);\n\n\n/* located in tsc.cpp */\n\n//-------------------[referenced from inventory.cpp]-----------------//\nint GetCurrentScript(void);\nScriptInstance *StartScript(int scriptno, int pageno);\nvoid StopScripts(void);\n\n\n/* located in input.cpp */\n\n//-------------------[referenced from inventory.cpp]-----------------//\nbool justpushed(int k);\nbool buttonjustpushed(void);\n\n\n/* located in inventory.cpp */\n\n//-------------------[referenced from inventory.cpp]-----------------//\nbool inventory_init(int param);\nvoid inventory_tick(void);\nint RefreshInventoryScreen(void);\nvoid UnlockInventoryInput(void);\nstatic void DrawInventory(void);\nstatic void RunSelector(stSelector *selector);\nstatic void ExitInventory(void);\nstatic void DrawSelector(stSelector *selector, int x, int y);\n\n\n/* located in sound/sound.cpp */\n\n//-------------------[referenced from inventory.cpp]-----------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "inventory.h",
    "content": "\n#ifndef _INVENTORY_H\n#define _INVENTORY_H\n\n#define MAXLISTLEN\t\t100\n\nstruct stSelector\n{\n\tuchar flashstate, animtimer;\n\t\n\tint spacing_x, spacing_y;\n\tint cursel, lastsel;\n\tint sprite;\n\tint nitems;\n\tint sound;\n\tint rowlen;\n\t\n\tint scriptbase;\n\tint items[MAXLISTLEN];\n};\n\nstruct stInventory\n{\n\tint x, y, w, h;\n\t\n\tstSelector armssel;\n\tstSelector itemsel;\n\tstSelector *curselector;\n\t\n\tchar lockinput;\n};\n\n\nbool inventory_init(int param);\nvoid inventory_tick(void);\n\nenum INVENTORY\n{\n\tITEM_ARTHURS_KEY = 1,\n\tITEM_MAP_SYSTEM,\n\tITEM_STANTAS_KEY,\n\tITEM_SILVER_LOCKET,\n\tITEM_BEAST_FANG,\n\tITEM_LIFE_CAPSULE,\n\tITEM_ID_CARD,\n\tITEM_JELLYFISH_JUICE,\n\tITEM_RUSTY_KEY,\n\tITEM_GUM_KEY,\n\tITEM_GUM_BASE,\n\tITEM_CHARCOAL,\n\tITEM_EXPLOSIVE,\n\tITEM_PUPPY,\n\tITEM_LIFE_POT,\n\tITEM_CUREALL,\n\tITEM_CLINIC_KEY,\n\tITEM_BOOSTER08,\n\tITEM_ARMS_BARRIER,\n\tITEM_TURBOCHARGE,\n\tITEM_AIRTANK,\n\tITEM_COUNTER,\n\tITEM_BOOSTER20,\n\tITEM_MIMIGA_MASK,\n\tITEM_TELEPORTER_KEY,\n\tITEM_SUES_LETTER,\n\tITEM_CONTROLLER,\n\tITEM_BROKEN_SPRINKLER,\n\tITEM_SPRINKLER,\n\tITEM_TOW_ROPE,\n\tITEM_CLAY_FIGURE_MEDAL,\n\tITEM_LITTLE_MAN,\n\tITEM_MUSHROOM_BADGE,\n\tITEM_MA_PIGNON,\n\tITEM_CURLYS_UNDERWEAR,\n\tITEM_ALIEN_MEDAL,\n\tITEM_CHACOS_LIPSTICK,\n\tITEM_WHIMSICAL_STAR,\n\tITEM_IRON_BOND\n};\n\n#endif\n"
  },
  {
    "path": "l10n_strings.h",
    "content": "#ifndef L10N_STRINGS_H\n#define L10N_STRINGS_H\n\n#ifdef _L10N_CP1251\n// Russian Win1251 Strings\nconst char LC_RES[] =               \"\\xD0\\xE0\\xE7\\xF0\\xE5\\xF8\\xE5\\xED\\xE8\\xE5\" \": \";\nconst char LC_KEYS[] =              \"\\xD3\\xEF\\xF0\\xE0\\xE2\\xEB\\xE5\\xED\\xE8\\xE5\";\nconst char LC_REPLAY[] =            \"\\xCF\\xEE\\xE2\\xF2\\xEE\\xF0\\xFB\";\nconst char LC_DEBUG[] =             \"\\xCC\\xE5\\xED\\xFE\" \" \" \"\\xEE\\xF2\\xEB\\xE0\\xE4\\xEA\\xE8\";\nconst char LC_DEBUG_KEYS[] =        \"\\xC2\\xEA\\xEB\\xFE\\xF7\\xE8\\xF2\\xFC\" \" Debug-\" \"\\xEA\\xEB\\xE0\\xE2\\xE8\\xF8\\xE8\";\nconst char LC_SAVE_SLOTS[] =        \"\\xD1\\xEB\\xEE\\xF2\\xFB\" \" \" \"\\xF1\\xEE\\xF5\\xF0\\xE0\\xED\\xE5\\xED\\xE5\\xE9\" \": \";\nconst char LC_MUSIC[] =             \"\\xCC\\xF3\\xE7\\xFB\\xEA\\xE0\" \": \";\nconst char LC_SOUND[] =             \"\\xC7\\xE2\\xF3\\xEA\" \": \";\n\nconst char LC_FULLSCREEN_DIS[] =    \"\\xCF\\xEE\\xEB\\xED\\xEE\\xFD\\xEA\\xF0\\xE0\\xED\\xED\\xFB\\xE9\" \" \"\n                                    \"\\xF0\\xE5\\xE6\\xE8\\xEC\" \" \" \"\\xEE\\xF2\\xEA\\xEB\\xFE\\xF7\\xE5\\xED\";\nconst char LC_FULLSCREEN_CON[] =    \"\\xF7\\xE5\\xF0\\xE5\\xE7\" \" \" \"\\xEA\\xEE\\xED\\xF1\\xEE\\xEB\\xFC\";\nconst char LC_RES_FAILED_320[] =    \"\\xCE\\xF8\\xE8\\xE1\\xEA\\xE0\" \" \"\n                                    \"\\xE8\\xE7\\xEC\\xE5\\xED\\xE5\\xED\\xE8\\xFF\" \" \"\n                                    \"\\xF0\\xE0\\xE7\\xF0\\xE5\\xF8\\xE5\\xED\\xE8\\xFF\" \" \"\n                                    \"\\xED\\xE0\" \" \" \"320x240\";\nconst char LC_RES_FAILED[] =        \"\\xCE\\xF8\\xE8\\xE1\\xEA\\xE0\" \" \"\n                                    \"\\xE8\\xE7\\xEC\\xE5\\xED\\xE5\\xED\\xE8\\xFF\" \" \"\n                                    \"\\xF0\\xE0\\xE7\\xF0\\xE5\\xF8\\xE5\\xED\\xE8\\xFF\" \" \";\n\nconst char LC_FPS[] =               \"\\xCF\\xEE\\xEA\\xE0\\xE7\\xE0\\xF2\\xFC\" \" \" \"FPS\";\nconst char LC_GODMODE[] =           \"\\xC2\\xEA\\xEB\\xFE\\xF7\\xE8\\xF2\\xFC\" \" \" \"\\xED\\xE5\\xF3\\xFF\\xE7\\xE2\\xE8\\xEC\\xEE\\xF1\\xF2\\xFC\";\nconst char LC_BOXES[] =             \"\\xD0\\xE8\\xF1\\xEE\\xE2\\xE0\\xF2\\xFC\" \" \" \"\\xE1\\xEE\\xEA\\xF1\\xFB\";\nconst char LC_ADDEXP[] =            \"\\xC4\\xEE\\xE1\\xE0\\xE2\\xE8\\xF2\\xFC\" \" +1 XP\";\nconst char LC_SAVE_NOW[] =          \"\\xD1\\xEE\\xF5\\xF0\\xE0\\xED\\xE8\\xF2\\xFC\" \" \" \"\\xE8\\xE3\\xF0\\xF3\" \" \" \"\\xF1\\xE5\\xE9\\xF7\\xE0\\xF1\";\n\nconst char LC_ON[] =                \"\\xC2\\xEA\\xEB\";\nconst char LC_OFF[] =               \"\\xC2\\xFB\\xEA\\xEB\";\nconst char LC_BOSS_ONLY[] =         \"\\xD2\\xEE\\xEB\\xFC\\xEA\\xEE\" \" \" \"\\xED\\xE0\" \" \" \"\\xE1\\xEE\\xF1\\xF1\\xE0\\xF5\";\n\nconst char LC_NO_RPL[] =            \"[\" \"\\xED\\xE5\\xF2\" \" \" \"\\xEF\\xEE\\xE2\\xF2\\xEE\\xF0\\xEE\\xE2\" \"]\";\nconst char LC_PLAY[] =              \"\\xC8\\xE3\\xF0\\xE0\\xF2\\xFC\";\nconst char LC_KEEP[] =              \"\\xD1\\xEE\\xF5\\xF0\\xE0\\xED\\xE8\\xF2\\xFC\";\nconst char LC_FAIL_LOAD_HEADER[] =  \"\\xCE\\xF8\\xE8\\xE1\\xEA\\xE0\" \" \"\n                                    \"\\xE7\\xE0\\xE3\\xF0\\xF3\\xE7\\xEA\\xE8\" \" \"\n                                    \"\\xE7\\xE0\\xE3\\xEE\\xEB\\xEE\\xE2\\xEA\\xE0\" \" \";\n\nconst char LC_FAIL_WRITE_HEADER[] = \"\\xCE\\xF8\\xE8\\xE1\\xEA\\xE0\" \" \"\n                                    \"\\xE7\\xE0\\xEF\\xE8\\xF1\\xE8\" \" \"\n                                    \"\\xE7\\xE0\\xE3\\xEE\\xEB\\xEE\\xE2\\xEA\\xE0\" \".\";\n\nconst char LC_KB_LEFT[] =           \"\\xC2\\xEB\\xE5\\xE2\\xEE\";\nconst char LC_KB_RIGHT[] =          \"\\xC2\\xEF\\xF0\\xE0\\xE2\\xEE\";\nconst char LC_KB_UP[] =             \"\\xC2\\xE2\\xE5\\xF0\\xF5\";\nconst char LC_KB_DOWN[] =           \"\\xC2\\xED\\xE8\\xE7\";\nconst char LC_KB_JUMP[] =           \"\\xCF\\xF0\\xFB\\xE6\\xEE\\xEA\";\nconst char LC_KB_FIRE[] =           \"\\xCE\\xE3\\xEE\\xED\\xFC\";\nconst char LC_KB_WPN_PREV[] =       \"\\xCF\\xF0\\xE5\\xE4\" \". \"\n                                    \"\\xEE\\xF0\\xF3\\xE6\\xE8\\xE5\";\nconst char LC_KB_WPN_NEXT[] =       \"\\xD1\\xEB\\xE5\\xE4\" \". \"\n                                    \"\\xEE\\xF0\\xF3\\xE6\\xE8\\xE5\";\nconst char LC_KB_INV[] =            \"\\xC8\\xED\\xE2\\xE5\\xED\\xF2\\xE0\\xF0\\xFC\";\nconst char LC_KB_MAP[] =            \"\\xCA\\xE0\\xF0\\xF2\\xE0\";\nconst char LC_KB_NEW_KEY[] =        \"\\xCD\\xE0\\xE6\\xEC\\xE8\\xF2\\xE5\" \" \"\n                                    \"\\xED\\xEE\\xE2\\xF3\\xFE\" \" \"\n                                    \"\\xEA\\xEB\\xE0\\xE2\\xE8\\xF8\\xF3\" \" \"\n                                    \"\\xE4\\xEB\\xFF\" \":\";\nconst char LC_KB_BUSY[] =           \"\\xCA\\xEB\\xE0\\xE2\\xE8\\xF8\\xE0\" \" \"\n                                    \"\\xF3\\xE6\\xE5\" \" \"\n                                    \"\\xE8\\xF1\\xEF\\xEE\\xEB\\xFC\\xE7\\xF3\\xE5\\xF2\\xF1\\xFF\" \" \"\n                                    \"\\xED\\xE0\" \":\";\n\nconst char LC_RETURN[] =            \"\\xC2\\xEE\\xE7\\xE2\\xF0\\xE0\\xF2\";\nconst char LC_FULLSCREEN[] =        \"\\xCF\\xEE\\xEB\\xED\\xFB\\xE9\" \" \" \"\\xFD\\xEA\\xF0\\xE0\\xED\";\n\nconst char LC_PS_QUIT[] =           \":\" \"\\xC2\\xFB\\xF5\\xEE\\xE4\";\nconst char LC_PS_RESUME[] =         \":\" \"\\xC2\\xEE\\xE7\\xE2\\xF0\\xE0\\xF2\";\nconst char LC_PS_RESET[] =          \":\" \"\\xD1\\xE1\\xF0\\xEE\\xF1\";\nconst char LC_PS_OPTIONS[] =        \":\" \"\\xCE\\xEF\\xF6\\xE8\\xE8\";\n#else\nconst char LC_RES[] = \"Resolution: \";\nconst char LC_KEYS[] = \"Controls\";\nconst char LC_REPLAY[] = \"Replay\";\nconst char LC_DEBUG[] = \"Debug Menu\";\nconst char LC_DEBUG_KEYS[] = \"Enable Debug Keys\";\nconst char LC_SAVE_SLOTS[] = \"Save Slots: \";\nconst char LC_MUSIC[] = \"Music: \";\nconst char LC_SOUND[] = \"Sound: \";\n\nconst char LC_FULLSCREEN_DIS[] = \"Fullscreen disabled via\";\nconst char LC_FULLSCREEN_CON[] = \"inhibit-fullscreen console setting\";\nconst char LC_RES_FAILED_320[] = \"Failed change resolution to 320x240\";\nconst char LC_RES_FAILED[] = \"Resolution change failed\";\n\nconst char LC_FPS[] = \"Show FPS\";\nconst char LC_GODMODE[] = \"Enable GodMode\";\nconst char LC_BOXES[] = \"Draw Boxes\";\nconst char LC_ADDEXP[] = \"Add +1 XP\";\nconst char LC_SAVE_NOW[] = \"Save now\";\n\nconst char LC_ON[] = \"On\";\nconst char LC_OFF[] = \"Off\";\nconst char LC_BOSS_ONLY[] = \"Boss Only\";\n\nconst char LC_NO_RPL[] = \"[no replays yet]\";\nconst char LC_PLAY[] = \"Play\";\nconst char LC_KEEP[] = \"Keep\";\nconst char LC_FAIL_LOAD_HEADER[] = \"Failed to load header.\";\nconst char LC_FAIL_WRITE_HEADER[] = \"Failed to write header.\";\n\nconst char LC_KB_LEFT[] = \"Left\";\nconst char LC_KB_RIGHT[] = \"Right\";\nconst char LC_KB_UP[] = \"Up\";\nconst char LC_KB_DOWN[] = \"Down\";\nconst char LC_KB_JUMP[] = \"Jump\";\nconst char LC_KB_FIRE[] = \"Fire\";\nconst char LC_KB_WPN_PREV[] = \"Wpn Prev\";\nconst char LC_KB_WPN_NEXT[] = \"Wpn Next\";\nconst char LC_KB_INV[] = \"Inventory\";\nconst char LC_KB_MAP[] = \"Map\";\nconst char LC_KB_NEW_KEY[] = \"Press new key for:\";\nconst char LC_KB_BUSY[] = \"Key already in use by:\";\n\nconst char LC_RETURN[] = \"Return\";\nconst char LC_FULLSCREEN[] = \"Fullscreen\";\n\nconst char LC_PS_QUIT[] = \":Quit\";\nconst char LC_PS_RESUME[] = \":Resume\";\nconst char LC_PS_RESET[] = \":Reset\";\nconst char LC_PS_OPTIONS[] = \":Options\";\n#endif\n\n#endif // L10N_STRINGS_H\n"
  },
  {
    "path": "main.cpp",
    "content": "#ifdef __HAIKU__\n#include <libgen.h>\n#include <sys/stat.h>\n#include <FindDirectory.h>\n#endif\n\n#include \"nx.h\"\n\n#ifdef _SDL_MIXER\n#include <SDL/SDL_mixer.h>\n#endif\n\n#include <stdarg.h>\n#include <unistd.h>\n#include \"graphics/safemode.h\"\n#include \"main.fdh\"\n\nconst char *data_dir = \"data\";\nconst char *stage_dir = \"data/Stage\";\nconst char *pic_dir = \"endpic\";\nconst char *nxdata_dir = \".\";\n\nint fps = 0;\nstatic int fps_so_far = 0;\nstatic uint32_t fpstimer = 0;\n\n#define GAME_WAIT\t\t\t(1000/GAME_FPS)\t// sets framerate\n#define VISFLAGS\t\t\t(SDL_APPACTIVE | SDL_APPINPUTFOCUS)\nint framecount = 0;\nbool freezeframe = false;\nint flipacceltime = 0;\n\nint main(int argc, char *argv[])\n{\n\n#ifdef __HAIKU__\n    char *haikuPath = getHaikuSettingsPath();\n    // To make it able to start from Tracker\n    chdir(dirname(argv[0]));\n    char path[PATH_MAX];\n    strcpy(path, haikuPath);\n    strcat(path, \"replay\");\n    mkdir(haikuPath, 0755);\n    mkdir(path, 0755);\n#endif\n\nbool inhibit_loadfade = false;\nbool error = false;\nbool freshstart;\n\n#ifndef __HAIKU__\n    SetLogFilename(\"debug.txt\");\n#else\n    char logfile[PATH_MAX];\n    strcpy(logfile, haikuPath);\n    strcat(logfile, \"debug.txt\");\n    SetLogFilename(logfile);\n    free(haikuPath);\n#endif\n\n    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0)\n    {\n        staterr(\"ack, sdl_init failed: %s.\", SDL_GetError());\n        return 1;\n    }\n\tatexit(SDL_Quit);\n\t\n\t// start up inputs first thing because settings_load may remap them\n\tinput_init();\n\t\n\t// load settings, or at least get the defaults,\n\t// so we know the initial screen resolution.\n\tsettings_load();\n\t\n\tif (Graphics::init(settings->resolution)) { staterr(\"Failed to initialize graphics.\"); return 1; }\n\tif (font_init()) { staterr(\"Failed to load font.\"); return 1; }\n\t\n\t//speed_test();\n\t//return 1;\n\t\n\t#ifdef CONFIG_DATA_EXTRACTOR\n\tif (!settings->files_extracted)\n\t{\n\t\tif (extract_main())\n\t\t{\n\t\t\tGraphics::close();\n\t\t\tfont_close();\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tsettings->files_extracted = true;\n\t\t\tsettings_save();\n\t\t}\n\t}\n\t#endif\n\t\n\tif (check_data_exists())\n\t{\n\t\treturn 1;\n\t}\n\t\n\t//Graphics::ShowLoadingScreen();\n\tif (sound_init()) { fatal(\"Failed to initialize sound.\"); return 1; }\n\tif (trig_init()) { fatal(\"Failed trig module init.\"); return 1; }\n\t\n\tif (tsc_init()) { fatal(\"Failed to initialize script engine.\"); return 1; }\n\tif (textbox.Init()) { fatal(\"Failed to initialize textboxes.\"); return 1; }\n\tif (Carets::init()) { fatal(\"Failed to initialize carets.\"); return 1; }\n\t\n\tif (game.init()) return 1;\n\tgame.setmode(GM_NORMAL);\n\t// set null stage just to have something to do while we go to intro\n\tgame.switchstage.mapno = 0;\n\t\n\t//#define REPLAY\n\t#ifdef REPLAY\n\t\tgame.switchstage.mapno = START_REPLAY;\n\t\t//Replay::set_ffwd(6000);\n\t\t//Replay::set_stopat(3500);\n\t\tgame.switchstage.param = 1;\n\t#else\n\t\t//game.switchstage.mapno = LOAD_GAME;\n\t\t//game.pause(GP_OPTIONS);\n\t\t\n\t\tif (settings->skip_intro && file_exists(GetProfileName(settings->last_save_slot)))\n\t\t\tgame.switchstage.mapno = LOAD_GAME;\n\t\telse\n\t\t\tgame.setmode(GM_INTRO);\n\t#endif\n\t\n\t// for debug\n\tif (game.paused) { game.switchstage.mapno = 0; game.switchstage.eventonentry = 0; }\n\tif (game.switchstage.mapno == LOAD_GAME) inhibit_loadfade = true;\n\t\n\tgame.running = true;\n\tfreshstart = true;\n\t\n\tstat(\"Entering main loop...\");\n\t#ifdef __SDLSHIM__\n\t\tset_console_visible(false);\n\t#endif\n\t\n\t//speed_test();\n\t//return 1;\n\t\n\twhile(game.running)\n\t{\n\t\t// SSS/SPS persists across stage transitions until explicitly\n\t\t// stopped, or you die & reload. It seems a bit risky to me,\n\t\t// but that's the spec.\n\t\tif (game.switchstage.mapno >= MAPNO_SPECIALS)\n\t\t{\n\t\t\tStopLoopSounds();\n\t\t}\n\t\t\n\t\t// enter next stage, whatever it may be\n\t\tif (game.switchstage.mapno == LOAD_GAME || \\\n\t\t\tgame.switchstage.mapno == LOAD_GAME_FROM_MENU)\n\t\t{\n\t\t\tif (game.switchstage.mapno == LOAD_GAME_FROM_MENU)\n\t\t\t\tfreshstart = true;\n\t\t\t\n\t\t\tstat(\"= Loading game =\");\n\t\t\tif (game_load(settings->last_save_slot))\n\t\t\t{\n\t\t\t\tfatal(\"savefile error\");\n\t\t\t\tgoto ingame_error;\n\t\t\t}\n\t\t\t\n\t\t\tReplay::OnGameStarting();\n\t\t\t\n\t\t\tif (!inhibit_loadfade) fade.Start(FADE_IN, FADE_CENTER);\n\t\t\telse inhibit_loadfade = false;\n\t\t}\n\t\telse if (game.switchstage.mapno == START_REPLAY)\n\t\t{\n\t\t\tstat(\">> beginning replay '%s'\", GetReplayName(game.switchstage.param));\n\t\t\t\n\t\t\tStopScripts();\n\t\t\tif (Replay::begin_playback(GetReplayName(game.switchstage.param)))\n\t\t\t{\n\t\t\t\tfatal(\"error starting playback\");\n\t\t\t\tgoto ingame_error;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (game.switchstage.mapno == NEW_GAME || \\\n\t\t\t\tgame.switchstage.mapno == NEW_GAME_FROM_MENU)\n\t\t\t{\n\t\t\t\tbool show_intro = (game.switchstage.mapno == NEW_GAME_FROM_MENU);\n\t\t\t\tInitNewGame(show_intro);\n\t\t\t}\n\t\t\t\n\t\t\t// slide weapon bar on first intro to Start Point\n\t\t\tif (game.switchstage.mapno == STAGE_START_POINT && \\\n\t\t\t\tgame.switchstage.eventonentry == 91)\n\t\t\t{\n\t\t\t\tfreshstart = true;\n\t\t\t}\n\t\t\t\n\t\t\t// switch maps\n\t\t\tif (load_stage(game.switchstage.mapno)) goto ingame_error;\n\t\t\t\n\t\t\tplayer->x = (game.switchstage.playerx * TILE_W) << CSF;\n\t\t\tplayer->y = (game.switchstage.playery * TILE_H) << CSF;\n\t\t}\n\t\t\n\t\t// start the level\n\t\tif (game.initlevel()) return 1;\n\t\t\n\t\tif (freshstart)\n\t\t\tweapon_introslide();\n\t\t\n\t\tgameloop();\n\t\tgame.stageboss.OnMapExit();\n\t\tfreshstart = false;\n\t}\n\t\nshutdown: ;\n\tReplay::close();\n\tgame.close();\n\tCarets::close();\n\t\n\tGraphics::close();\n\tinput_close();\n\tfont_close();\n\tsound_close();\n\ttsc_close();\n\ttextbox.Deinit();\n\treturn error;\n\t\ningame_error: ;\n\tstat(\"\");\n\tstat(\" ************************************************\");\n\tstat(\" * An in-game error occurred. Game shutting down.\");\n\tstat(\" ************************************************\");\n\terror = true;\n\tgoto shutdown;\n}\n\n\nvoid gameloop(void)\n{\nint32_t nexttick = 0;\n\n\tgame.switchstage.mapno = -1;\n\t\n\twhile(game.running && game.switchstage.mapno < 0)\n\t{\n\t\t// get time until next tick\n\t\tint32_t curtime = SDL_GetTicks();\n\t\tint32_t timeRemaining = nexttick - curtime;\n\t\t\n\t\tif (timeRemaining <= 0 || game.ffwdtime)\n\t\t{\n\t\t\trun_tick();\n\t\t\t\n\t\t\t// try to \"catch up\" if something else on the system bogs us down for a moment.\n\t\t\t// but if we get really far behind, it's ok to start dropping frames\n\t\t\tif (game.ffwdtime)\n\t\t\t\tgame.ffwdtime--;\n\t\t\t\n\t\t\tnexttick = curtime + GAME_WAIT;\n\t\t\t\n\t\t\t// pause game if window minimized\n\t\t\tif ((SDL_GetAppState() & VISFLAGS) != VISFLAGS)\n\t\t\t{\n\t\t\t\tAppMinimized();\n\t\t\t\tnexttick = 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// don't needlessly hog CPU, but don't sleep for entire\n\t\t\t// time left, some CPU's/kernels will fall asleep for\n\t\t\t// too long and cause us to run slower than we should\n\t\t\ttimeRemaining /= 2;\n\t\t\tif (timeRemaining)\n\t\t\t\tSDL_Delay(timeRemaining);\n\t\t}\n\t}\n}\n\nstatic inline void run_tick()\n{\nstatic bool can_tick = true;\nstatic bool last_freezekey = false;\nstatic bool last_framekey = false;\nstatic int frameskip = 0;\n\n\tinput_poll();\n\t\n\t// input handling for a few global things\n\tif (justpushed(ESCKEY))\n\t{\n\t\tif (settings->instant_quit)\n\t\t{\n\t\t\tgame.running = false;\n\t\t}\n\t\telse if (!game.paused)\t\t// no pause from Options\n\t\t{\n\t\t\tgame.pause(GP_PAUSED);\n\t\t}\n\t}\n#if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX)\n    else if (justpushed(OPTIONS_KEY))\n#else\n    else if (justpushed(F3KEY))\n#endif\n\t{\n\t\tgame.pause(GP_OPTIONS);\n\t}\n\t\n\t// freeze frame\n\tif (settings->enable_debug_keys)\n\t{\n\t\tif (inputs[FREEZE_FRAME_KEY] && !last_freezekey)\n\t\t{\n\t\t\tcan_tick = true;\n\t\t\tfreezeframe ^= 1;\n\t\t\tframecount = 0;\n\t\t}\n\t\t\n\t\tif (inputs[FRAME_ADVANCE_KEY] && !last_framekey)\n\t\t{\n\t\t\tcan_tick = true;\n\t\t\tif (!freezeframe)\n\t\t\t{\n\t\t\t\tfreezeframe = 1;\n\t\t\t\tframecount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tlast_freezekey = inputs[FREEZE_FRAME_KEY];\n\t\tlast_framekey = inputs[FRAME_ADVANCE_KEY];\n\t}\n\t\n\t// fast-forward key (F5)\n\tif (inputs[FFWDKEY] && (settings->enable_debug_keys || Replay::IsPlaying()))\n\t{\n\t\tgame.ffwdtime = 2;\n\t}\n\t\n\tif (can_tick)\n\t{\n\t\tgame.tick();\n\t\t\n\t\tif (freezeframe)\n\t\t{\n\t\t\tchar buf[1024];\n\t\t\tsprintf(buf, \"[] Tick %d\", framecount++);\n\t\t\tfont_draw_shaded(4, (SCREEN_HEIGHT-GetFontHeight()-4), buf, 0, &greenfont);\n\t\t\tcan_tick = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tReplay::DrawStatus();\n\t\t}\n\t\t\n\t\tif (settings->show_fps)\n\t\t{\n\t\t\tupdate_fps();\n\t\t}\n\t\t\n\t\tif (!flipacceltime)\n\t\t{\n\t\t\t//platform_sync_to_vblank();\n\t\t\tscreen->Flip();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tflipacceltime--;\n\t\t\tif (--frameskip < 0)\n\t\t\t{\n\t\t\t\tscreen->Flip();\n\t\t\t\tframeskip = 256;\n\t\t\t}\n\t\t}\n\t\t\n\t\tmemcpy(lastinputs, inputs, sizeof(lastinputs));\n\t}\n\telse\n\t{\t// frame is frozen; don't hog CPU\n\t\tSDL_Delay(20);\n\t}\n\t\n\t// immediately after a game tick is when we have the most amount of time before\n\t// the game needs to run again. so now's as good a time as any for some\n\t// BGM audio processing, wouldn't you say?\n\torg_run();\n}\n\nvoid update_fps()\n{\n\tfps_so_far++;\n\t\n\tif ((SDL_GetTicks() - fpstimer) >= 500)\n\t{\n\t\tfpstimer = SDL_GetTicks();\n\t\tfps = (fps_so_far << 1);\n\t\tfps_so_far = 0;\n\t}\n\t\n\tchar fpstext[64];\n\tsprintf(fpstext, \"%d fps\", fps);\n\t\n\tint x = (SCREEN_WIDTH - 4) - GetFontWidth(fpstext, 0, true);\n\tfont_draw_shaded(x, 4, fpstext, 0, &greenfont);\n}\n\n\nvoid InitNewGame(bool with_intro)\n{\n\tstat(\"= Beginning new game =\");\n\t\n\tmemset(game.flags, 0, sizeof(game.flags));\n\tmemset(game.skipflags, 0, sizeof(game.skipflags));\n\ttextbox.StageSelect.ClearSlots();\n\t\n\tgame.quaketime = game.megaquaketime = 0;\n\tgame.showmapnametime = 0;\n\tgame.debug.god = 0;\n\tgame.running = true;\n\tgame.frozen = false;\n\t\n\t// fully re-init the player object\n\tObjects::DestroyAll(true);\n\tgame.createplayer();\n\t\n\tplayer->maxHealth = 3;\n\tplayer->hp = player->maxHealth;\n\t\n\tgame.switchstage.mapno = STAGE_START_POINT;\n\tgame.switchstage.playerx = 10;\n\tgame.switchstage.playery = 8;\n\tgame.switchstage.eventonentry = (with_intro) ? 200 : 91;\n\t\n\tfade.set_full(FADE_OUT);\n}\n\n\nvoid AppMinimized(void)\n{\n\tstat(\"Game minimized or lost focus--pausing...\");\n\n#ifdef _SDL_MIXER\n    Mix_Pause(-1);\n    Mix_PauseMusic();\n#else\n    SDL_PauseAudio(1);\n#endif\n\t\n\tfor(;;)\n\t{\n\t\tif ((SDL_GetAppState() & VISFLAGS) == VISFLAGS)\n\t\t{\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tinput_poll();\n\t\tSDL_Delay(20);\n\t}\n#ifdef _SDL_MIXER\n    Mix_Resume(-1);\n    Mix_ResumeMusic();\n#else\n    SDL_PauseAudio(0);\n#endif\n\tstat(\"Focus regained, resuming play...\");\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void fatal(const char *str)\n{\n\tstaterr(\"fatal: '%s'\", str);\n\t\n\tif (!safemode::init())\n\t{\n\t\tsafemode::moveto(SM_UPPER_THIRD);\n\t\tsafemode::print(\"Fatal Error\");\n\t\t\n\t\tsafemode::moveto(SM_CENTER);\n\t\tsafemode::print(\"%s\", str);\n\t\t\n\t\tsafemode::run_until_key();\n\t\tsafemode::close();\n\t}\n}\n\nstatic bool check_data_exists()\n{\nchar fname[MAXPATHLEN];\n\n\tsprintf(fname, \"%s/npc.tbl\", data_dir);\n\tif (file_exists(fname)) return 0;\n\t\n\tif (!safemode::init())\n\t{\n\t\tsafemode::moveto(SM_UPPER_THIRD);\n\t\tsafemode::print(\"Fatal Error\");\n\t\t\n\t\tsafemode::moveto(SM_CENTER);\n\t\tsafemode::print(\"Missing \\\"%s\\\" directory.\", data_dir);\n\t\tsafemode::print(\"Please copy it over from a Doukutsu installation.\");\n\t\t\n\t\tsafemode::run_until_key();\n\t\tsafemode::close();\n\t}\n\t\n\treturn 1;\n}\n\nvoid visible_warning(const char *fmt, ...)\n{\nva_list ar;\nchar buffer[80];\n\n\tva_start(ar, fmt);\n\tvsnprintf(buffer, sizeof(buffer), fmt, ar);\n\tva_end(ar);\n\t\n\tconsole.Print(buffer);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n#ifdef __SDLSHIM__\n\nvoid speed_test(void)\n{\n\tSDL_Rect textrect;\n\t\n\tuint32_t end = 0;\n\tfps = 0;\n\t\n\tClearScreen(255, 0, 0);\n\t\n\tgame.running = true;\n\twhile(game.running)\n\t{\n\t\tif (SDL_GetTicks() >= end)\n\t\t{\n\t\t\tSDLS_VRAMSurface->h = 320;\n\t\t\tSDLS_VRAMSurface->cliprect.h = 320;\n\t\t\ttextrect.x = 5;\n\t\t\ttextrect.y = 250;\n\t\t\ttextrect.w = 100;\n\t\t\ttextrect.h = 10;\n\t\t\tSDL_FillRect(SDLS_VRAMSurface, &textrect, 0);\n\t\t\t\n\t\t\tchar buffer[80];\n\t\t\tsprintf(buffer, \"%d fps \", fps);\n\t\t\tdirect_text_draw(5, 250, buffer);\n\t\t\tSDLS_VRAMSurface->h = 240;\n\t\t\tSDLS_VRAMSurface->cliprect.h = 240;\n\t\t\t\n\t\t\tinput_poll();\n\t\t\t\n\t\t\tfps = 0;\n\t\t\tend = SDL_GetTicks() + 1000;\n\t\t}\n\t\t\n\t\tscreen->Flip();\n\t\tfps++;\n\t}\n}\n\n#else\n\nvoid speed_test(void)\n{\n\tSDL_Rect textrect;\n\tSDL_Surface *vram = screen->GetSDLSurface();\n\tint click = 0;\n\t\n\tuint32_t end = 0;\n\tfps = 0;\n\t\n\tSDL_FillRect(vram, NULL, SDL_MapRGB(vram->format, 255, 0, 0));\n\tint c = 0;\n\t\n\tgame.running = true;\n\twhile(game.running)\n\t{\n\t\t//SDL_FillRect(vram, NULL, c ^= 255);\n\t\t\n\t\tif (SDL_GetTicks() >= end)\n\t\t{\n\t\t\tstat(\"%d fps\", fps);\n\t\t\tfps = 0;\n\t\t\tend = SDL_GetTicks() + 1000;\n\t\t\t\n\t\t\tif (++click > 3)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tscreen->Flip();\n\t\tfps++;\n\t}\n}\n\n#endif\n\n\n\nvoid org_test_miniloop(void)\n{\nuint32_t start = 0, curtime;\nuint32_t counter;\n\n\tstat(\"Starting org test\");\n\t\n\tfont_draw(5, 5, \"ORG test in progress...\", 0, &greenfont);\n\tfont_draw(5, 15, \"Logging statistics to nx.log\", 0, &greenfont);\n\tfont_draw(5, 25, \"Press any button to quit\", 0, &greenfont);\n\tscreen->Flip();\n\t\n\tmusic_set_enabled(1);\n\tmusic(32);\n\t\n\tlast_sdl_key = -1;\n\t\n\tfor(;;)\n\t{\n\t\torg_run();\n\t\t\n\t\tif (++counter > 1024)\n\t\t{\n\t\t\tcounter = 0;\n\t\t\t\n\t\t\tcurtime = SDL_GetTicks();\n\t\t\tif ((curtime - start) >= 100)\n\t\t\t{\n\t\t\t\tstart = curtime;\n\t\t\t\tinput_poll();\n\t\t\t\t\n\t\t\t\tif (last_sdl_key != -1)\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid SDL_Delay(int ms)\n{\n\tusleep(ms * 1000);\n}\n\n#ifdef __HAIKU__\nchar *getHaikuSettingsPath() {\n\tchar path[PATH_MAX];\n\tfind_directory(B_USER_SETTINGS_DIRECTORY, -1, false, path, sizeof(path));\n\tstrcat(path, \"/NXEngine/\");\n\treturn strdup(path);\n}\n#endif\n"
  },
  {
    "path": "main.fdh",
    "content": "//hash:5e5b9413\n//automatically generated by Makegen\n\n/* located in main.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nvoid gameloop(void);\nstatic inline void run_tick();\nvoid update_fps();\nvoid InitNewGame(bool with_intro);\nvoid AppMinimized(void);\nstatic void fatal(const char *str);\nstatic bool check_data_exists();\nvoid visible_warning(const char *fmt, ...);\nvoid speed_test(void);\nvoid speed_test(void);\nvoid org_test_miniloop(void);\nvoid SDL_Delay(int ms);\n\n\n/* located in game.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nbool game_load(Profile *p);\n\n\n/* located in map.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nbool load_stage(int stage_no);\n\n\n/* located in profile.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nconst char *GetProfileName(int num);\n\n\n/* located in settings.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nbool settings_load(Settings *setfile);\nbool settings_save(Settings *setfile);\n\n\n/* located in statusbar.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nvoid weapon_introslide();\n\n\n/* located in tsc.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nbool tsc_init(void);\nvoid StopScripts(void);\nvoid tsc_close(void);\n\n\n/* located in input.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nbool input_init(void);\nvoid input_close(void);\nvoid input_poll(void);\nbool justpushed(int k);\n\n\n/* located in replay.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nconst char *GetReplayName(int slotno, char *buffer);\n\n\n/* located in trig.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nchar trig_init(void);\n\n\n/* located in graphics/font.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nbool font_init(void);\nvoid font_close(void);\nint font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font);\nint GetFontHeight();\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nvoid direct_text_draw(int x, int y, const char *text);\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in sound/sound.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nbool sound_init(void);\nvoid StopLoopSounds(void);\nvoid sound_close(void);\nvoid music_set_enabled(int newstate);\nvoid music(int songno);\n\n\n/* located in sound/org.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nvoid org_run(void);\n\n\n/* located in extract/extract.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nint extract_main();\n\n\n/* located in common/stat.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nvoid SetLogFilename(const char *fname);\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//---------------------[referenced from main.cpp]--------------------//\nbool file_exists(const char *fname);\n\n"
  },
  {
    "path": "map.cpp",
    "content": "\n#include \"nx.h\"\n#include \"map.h\"\n#include \"map.fdh\"\n\nstMap map;\n\nMapRecord stages[MAX_STAGES];\nint num_stages;\n\n#define MAX_BACKDROPS\t\t\t32\nNXSurface *backdrop[MAX_BACKDROPS];\n\n// for FindObject--finding NPC's by ID2\nObject *ID2Lookup[65536];\n\nunsigned char tilecode[MAX_TILES];\t\t\t// tile codes for every tile in current tileset\nunsigned int tileattr[MAX_TILES];\t\t\t// tile attribute bits for every tile in current tileset\nunsigned int tilekey[MAX_TILES];\t\t\t// mapping from tile codes -> tile attributes\n\n\n// load stage \"stage_no\", this entails loading the map (pxm), enemies (pxe), tileset (pbm),\n// tile attributes (pxa), and script (tsc).\nbool load_stage(int stage_no)\n{\nchar stage[MAXPATHLEN];\nchar fname[MAXPATHLEN];\n\n\tstat(\" >> Entering stage %d: '%s'.\", stage_no, stages[stage_no].stagename);\n\tgame.curmap = stage_no;\t\t// do it now so onspawn events will have it\n\t\n    if (use_palette)\n\t{\n\t\tpalette_reset();\n\t\tSprites::FlushSheets();\n\t\tmap_flush_graphics();\n    }\n\n\tif (Tileset::Load(stages[stage_no].tileset))\n\t\treturn 1;\n\t\n\t// get the base name of the stage without extension\n\tconst char *mapname = stages[stage_no].filename;\n\tif (!strcmp(mapname, \"lounge\")) mapname = \"Lounge\";\n\tsprintf(stage, \"%s/%s\", stage_dir, mapname);\n\t\n\tsprintf(fname, \"%s.pxm\", stage);\n\tif (load_map(fname)) return 1;\n\t\n\tsprintf(fname, \"%s/%s.pxa\", stage_dir, tileset_names[stages[stage_no].tileset]);\n\tif (load_tileattr(fname)) return 1;\n\t\n\tsprintf(fname, \"%s.pxe\", stage);\n\tif (load_entities(fname)) return 1;\n\t\n\tsprintf(fname, \"%s.tsc\", stage);\n\tif (tsc_load(fname, SP_MAP) == -1) return 1;\n\t\n\tmap_set_backdrop(stages[stage_no].bg_no);\n\tmap.scrolltype = stages[stage_no].scroll_type;\n\tmap.motionpos = 0;\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// load a PXM map\nbool load_map(const char *fname)\n{\nFILE *fp;\nint x, y;\n\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"load_map: no such file: '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\tif (!fverifystring(fp, \"PXM\"))\n\t{\n\t\tstaterr(\"load_map: invalid map format: '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\tmemset(&map, 0, sizeof(map));\n\t\n\tfgetc(fp);\n\tmap.xsize = fgeti(fp);\n\tmap.ysize = fgeti(fp);\n\n\tif (map.xsize > MAP_MAXSIZEX || map.ysize > MAP_MAXSIZEY)\n\t{\n\t\tstaterr(\"load_map: map is too large -- size %dx%d but max is %dx%d\", map.xsize, map.ysize, MAP_MAXSIZEX, MAP_MAXSIZEY);\n\t\tfclose(fp);\n\t\treturn 1;\n\t}\n\telse\n\t{\n\t\tstat(\"load_map: level size %dx%d\", map.xsize, map.ysize);\n\t}\n\t\n\tfor(y=0;y<map.ysize;y++)\n\tfor(x=0;x<map.xsize;x++)\n\t{\n\t\tmap.tiles[x][y] = fgetc(fp);\n\t}\n\t\n    fclose(fp);\n\n#ifdef _480X272 // 480x272 widescreen fix\n    if (map.xsize * TILE_W<SCREEN_WIDTH && map.ysize * TILE_W<SCREEN_HEIGHT) {\n        map.maxxscroll = (((map.xsize * TILE_W) - (SCREEN_WIDTH - 80)) - 8) << CSF;\n        map.maxyscroll = (((map.ysize * TILE_H) - (SCREEN_HEIGHT - 16)) - 8) << CSF;\n    } else if (map.xsize * TILE_W<SCREEN_WIDTH) {\n        if (x == 25) { // MazeI\n            map.maxxscroll = (((map.xsize * TILE_W) - (SCREEN_WIDTH - 48)) - 8) << CSF;\n            map.maxyscroll = (((map.ysize * TILE_H) - SCREEN_HEIGHT) - 8) << CSF;\n        } else { // Others\n            map.maxxscroll = (((map.xsize * TILE_W) - (SCREEN_WIDTH - 80)) - 8) << CSF;\n            map.maxyscroll = (((map.ysize * TILE_H) - SCREEN_HEIGHT) - 8) << CSF;\n        }\n    } else if (map.ysize * TILE_W<SCREEN_HEIGHT) {\n        map.maxxscroll = (((map.xsize * TILE_W) - SCREEN_WIDTH) - 8) << CSF;\n        map.maxyscroll = (((map.ysize * TILE_H) - (SCREEN_HEIGHT - 16)) - 8) << CSF;\n    } else {\n        map.maxxscroll = (((map.xsize * TILE_W) - SCREEN_WIDTH) - 8) << CSF;\n        map.maxyscroll = (((map.ysize * TILE_H) - SCREEN_HEIGHT) - 8) << CSF;\n    }\n#else\n    map.maxxscroll = (((map.xsize * TILE_W) - SCREEN_WIDTH) - 8) << CSF;\n    map.maxyscroll = (((map.ysize * TILE_H) - SCREEN_HEIGHT) - 8) << CSF;\n#endif\n\n\tstat(\"load_map: '%s' loaded OK! - %dx%d\", fname, map.xsize, map.ysize);\n\treturn 0;\n}\n\n\n// load a PXE (entity list for a map)\nbool load_entities(const char *fname)\n{\nFILE *fp;\nint i;\nint nEntities;\n\n\t// gotta destroy all objects before creating new ones\n\tObjects::DestroyAll(false);\n\tFloatText::ResetAll();\n\t\n\tstat(\"load_entities: reading in %s\", fname);\n\t// now we can load in the new objects\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"load_entities: no such file: '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\tif (!fverifystring(fp, \"PXE\"))\n\t{\n\t\tstaterr(\"load_entities: not a PXE: '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\tfgetc(fp);\n\tnEntities = fgetl(fp);\n\t\n\tfor(i=0;i<nEntities;i++)\n\t{\n\t\tint x = fgeti(fp);\n\t\tint y = fgeti(fp);\n\t\tint id1 = fgeti(fp);\n\t\tint id2 = fgeti(fp);\n\t\tint type = fgeti(fp);\n\t\tint flags = fgeti(fp);\n\t\t\n\t\tint dir = (flags & FLAG_FACES_RIGHT) ? RIGHT : LEFT;\n\t\t\n\t\t//lprintf(\" %d:   [%d, %d]\\t id1=%d\\t id2=%d   Type %d   flags %04x\\n\", i, x, y, id1, id2, type, flags);\n\t\t\n\t\t// most maps have apparently garbage entities--invisible do-nothing objects??\n\t\t// i dunno but no point in spawning those...\n\t\tif (type || id1 || id2 || flags)\n\t\t{\n\t\t\tbool addobject = false;\n\t\t\t\n\t\t\t// check if object is dependent on a flag being set/not set\n\t\t\tif (flags & FLAG_APPEAR_ON_FLAGID)\n\t\t\t{\n\t\t\t\tif (game.flags[id1])\n\t\t\t\t{\n\t\t\t\t\taddobject = true;\n\t\t\t\t\tstat(\" -- Appearing object %02d (%s) because flag %d is set\", id2, DescribeObjectType(type), id1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (flags & FLAG_DISAPPEAR_ON_FLAGID)\n\t\t\t{\n\t\t\t\tif (!game.flags[id1])\n\t\t\t\t{\n\t\t\t\t\taddobject = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstat(\" -- Disappearing object %02d (%s) because flag %d is set\", id2, DescribeObjectType(type), id1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\taddobject = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (addobject)\n\t\t\t{\n\t\t\t\t// hack for chests (can we do this elsewhere?)\n\t\t\t\tif (type == OBJ_CHEST_OPEN) y++;\n\t\t\t\t\n\t\t\t\tObject *o = CreateObject((x * TILE_W) << CSF, \\\n\t\t\t\t\t\t\t\t\t\t (y * TILE_H) << CSF, type,\n\t\t\t\t\t\t\t\t\t\t 0, 0, dir, NULL, CF_NO_SPAWN_EVENT);\n\t\t\t\t\n\t\t\t\to->id1 = id1;\n\t\t\t\to->id2 = id2;\n\t\t\t\to->flags |= flags;\n\t\t\t\t\n\t\t\t\tID2Lookup[o->id2] = o;\n\t\t\t\t\n\t\t\t\t// now that it's all set up, execute OnSpawn,\n\t\t\t\t// since we didn't do it in CreateObject.\n\t\t\t\to->OnSpawn();\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//stat(\"load_entities: loaded %d objects\", nEntities);\n\tfclose(fp);\n\treturn 0;\n}\n\n/*const int ta[] =\n{ 0, TA_SOLID, TA_SOLID, TA_SOLID, TA_SOLID,\n  TA_SLOPE_BACK1|TA_FOREGROUND, TA_SLOPE_BACK2|TA_FOREGROUND, TA_SLOPE_FWD1|TA_FOREGROUND, TA_SLOPE_FWD2|TA_FOREGROUND,\n  TA_FOREGROUND, 0,0,0, TA_FOREGROUND,TA_FOREGROUND,TA_FOREGROUND, 0, TA_SOLID, TA_SOLID, TA_FOREGROUND, TA_FOREGROUND,\n  TA_SOLID,TA_SOLID,TA_SOLID,TA_SOLID,TA_FOREGROUND,0,0,0,TA_FOREGROUND,TA_FOREGROUND,TA_FOREGROUND,\n  0,TA_SOLID,TA_FOREGROUND,TA_DESTROYABLE|TA_SOLID,TA_SOLID,TA_FOREGROUND,TA_FOREGROUND,TA_FOREGROUND,TA_FOREGROUND,TA_FOREGROUND,TA_SLOPE_CEIL_BACK1|TA_FOREGROUND,TA_SOLID,TA_SOLID,TA_SLOPE_CEIL_FWD2|TA_FOREGROUND,TA_SLOPE_FWD1|TA_FOREGROUND,TA_SLOPE_FWD2|TA_FOREGROUND,\n  TA_FOREGROUND,TA_FOREGROUND,TA_SLOPE_CEIL_FWD1|TA_FOREGROUND,TA_SLOPE_CEIL_FWD2|TA_FOREGROUND,TA_SLOPE_CEIL_BACK1|TA_FOREGROUND,TA_SLOPE_CEIL_BACK2|TA_FOREGROUND,TA_FOREGROUND,TA_FOREGROUND,TA_FOREGROUND,0,0,TA_SOLID,TA_SOLID,TA_FOREGROUND,TA_SOLID,TA_SOLID,\n  TA_SOLID,TA_SOLID,TA_FOREGROUND|TA_SLOPE_BACK1,TA_SLOPE_BACK2|TA_FOREGROUND,TA_SLOPE_FWD1|TA_FOREGROUND,TA_SLOPE_FWD2|TA_FOREGROUND,TA_SPIKES,TA_SPIKES,TA_SPIKES,TA_SPIKES,0,TA_SOLID,TA_SOLID,0,TA_SOLID,TA_SOLID,\n  0,TA_SOLID,0,TA_SOLID,TA_SOLID,0,0,0,0,0,0,TA_SOLID,TA_SOLID,TA_SOLID,TA_SOLID,TA_SOLID,\n  TA_SOLID,TA_FOREGROUND,TA_FOREGROUND,0,0,0,0,0,0,0,0,0,TA_SOLID,TA_SOLID,TA_SOLID,TA_SOLID\n};\n\tmemset(tileattr, 0, sizeof(tileattr));\n\tmemcpy(&tileattr, &ta, sizeof(ta));\n*/\n\n// loads a pxa (tileattr) file\nbool load_tileattr(const char *fname)\n{\nFILE *fp;\nint i;\nunsigned char tc;\n\n\tmap.nmotiontiles = 0;\n\t\n\tstat(\"load_pxa: reading in %s\", fname);\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"load_pxa: no such file: '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\tfor(i=0;i<256;i++)\n\t{\n\t\ttc = fgetc(fp);\n\t\ttilecode[i] = tc;\n\t\ttileattr[i] = tilekey[tc];\n\t\t//stat(\"Tile %02x   TC %02x    Attr %08x   tilekey[%02x] = %08x\", i, tc, tileattr[i], tc, tilekey[tc]);\n\t\t\n\t\tif (tc == 0x43)\t// destroyable block - have to replace graphics\n\t\t{\n\t\t\tCopySpriteToTile(SPR_DESTROYABLE, i, 0, 0);\n\t\t}\n\t\t\n\t\t// add water currents to animation list\n\t\tif (tileattr[i] & TA_CURRENT)\n\t\t{\n\t\t\tmap.motiontiles[map.nmotiontiles].tileno = i;\n\t\t\tmap.motiontiles[map.nmotiontiles].dir = CVTDir(tc & 3);\n\t\t\tmap.motiontiles[map.nmotiontiles].sprite = SPR_WATER_CURRENT;\n\t\t\t\n\t\t\tmap.nmotiontiles++;\n\t\t\tstat(\"Added tile %02x to animation list, tc=%02x\", i, tc);\n\t\t}\n\t}\n\t\n\tfclose(fp);\n\treturn 0;\n}\n\nbool load_stages(void)\n{\nFILE *fp;\n\n\tfp = fileopen(\"stage.dat\", \"rb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"%s(%d): failed to open stage.dat\", __FILE__, __LINE__);\n\t\tnum_stages = 0;\n\t\treturn 1;\n\t}\n\t\n\tnum_stages = fgetc(fp);\n\n\t// Dirty hack for packed structs\n\tint size_of_MapRecord = sizeof(MapRecord().filename) + sizeof(MapRecord().stagename) + 6;\n\n\tfor(int i=0;i<num_stages;i++) {\n\t\tfread(&stages[i], size_of_MapRecord, 1, fp);\n\t}\n\t\n\treturn 0;\n}\n\n\nbool initmapfirsttime(void)\n{\nFILE *fp;\nint i;\n\n\tstat(\"initmapfirsttime: loading tilekey.dat.\");\n\tif (!(fp = fileopen(\"tilekey.dat\", \"rb\")))\n\t{\n\t\tstaterr(\"tilekey.dat is missing!\");\n\t\treturn 1;\n\t}\n\t\n\tfor(i=0;i<256;i++)\n\t\ttilekey[i] = fgetl(fp);\n\t\n\tfclose(fp);\n\treturn load_stages();\n}\n\nvoid initmap(void)\n{\n\tmap_focus(NULL);\n\tmap.parscroll_x = map.parscroll_y = 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// backdrop_no \t- backdrop # to switch to\nvoid map_set_backdrop(int backdrop_no)\n{\n\tif (!LoadBackdropIfNeeded(backdrop_no))\n\t\tmap.backdrop = backdrop_no;\n}\n\n\nvoid map_draw_backdrop(void)\n{\nint x, y;\n\n\tif (!backdrop[map.backdrop])\n\t{\n\t\tLoadBackdropIfNeeded(map.backdrop);\n\t\tif (!backdrop[map.backdrop])\n\t\t\treturn;\n\t}\n\t\n\tswitch(map.scrolltype)\n\t{\n\t\tcase BK_FIXED:\n            map.parscroll_x = 0;\n            map.parscroll_y = 0;\n\t\tbreak;\n\t\t\n\t\tcase BK_FOLLOWFG:\n            map.parscroll_x = (map.displayed_xscroll >> CSF);\n            map.parscroll_y = (map.displayed_yscroll >> CSF);\n\t\tbreak;\n\t\t\n\t\tcase BK_PARALLAX:\n            map.parscroll_y = (map.displayed_yscroll >> CSF) / 2;\n            map.parscroll_x = (map.displayed_xscroll >> CSF) / 2;\n\t\tbreak;\n\t\t\n\t\tcase BK_FASTLEFT:\t\t// Ironhead\n\t\t\tmap.parscroll_x += 6;\n\t\t\tmap.parscroll_y = 0;\n\t\tbreak;\n\t\t\n\t\tcase BK_FASTLEFT_LAYERS:\n\t\tcase BK_FASTLEFT_LAYERS_NOFALLLEFT:\n\t\t{\n\t\t\tDrawFastLeftLayered();\n\t\t\treturn;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BK_HIDE:\n\t\tcase BK_HIDE2:\n\t\tcase BK_HIDE3:\n        {\n            if (game.curmap == STAGE_KINGS)\t\t// intro cutscene\n                ClearScreen(BLACK);\n            else\n                ClearScreen(DK_BLUE);\n\t\t}\n\t\treturn;\n\t\t\n\t\tdefault:\n\t\t\tmap.parscroll_x = map.parscroll_y = 0;\n\t\t\tstaterr(\"map_draw_backdrop: unhandled map scrolling type %d\", map.scrolltype);\n\t\tbreak;\n\t}\n\t\n    map.parscroll_x %= backdrop[map.backdrop]->Width();\n    map.parscroll_y %= backdrop[map.backdrop]->Height();\n    int w = backdrop[map.backdrop]->Width();\n    int h = backdrop[map.backdrop]->Height();\n\t\n\tfor(y=0;y<SCREEN_HEIGHT+map.parscroll_y; y+=h)\n\t{\n\t\tfor(x=0;x<SCREEN_WIDTH+map.parscroll_x; x+=w)\n\t\t{\n\t\t\tDrawSurface(backdrop[map.backdrop], x - map.parscroll_x, y - map.parscroll_y);\n\t\t}\n    }\n}\n\n// blit OSide's BK_FASTLEFT_LAYERS\nstatic void DrawFastLeftLayered(void)\n{\n#ifndef _480X272 // 480x272 widescreen fix\n    static const int layer_ys[] = { 80, 122, 145, 176, 240 };\n#else\n    static const int layer_ys[] = { 80, 122, 145, 176, 272 };\n#endif\n\nstatic const int move_spd[] = { 0,    1,   2,   4,   8 };\nint nlayers = 5;\nint y1, y2;\nint i, x;\n\n\tif (--map.parscroll_x <= -(SCREEN_WIDTH*2))\n\t\tmap.parscroll_x = 0;\n\t\n\ty1 = x = 0;\n\tfor(i=0;i<nlayers;i++)\n\t{\n\t\ty2 = layer_ys[i];\n\t\t\n        if (i)\t// not the static moon layer?\n        {\n\t\t\tx = (map.parscroll_x * move_spd[i]) >> 1;\n\t\t\tx %= SCREEN_WIDTH;\n\t\t}\n\t\t\n\t\tBlitPatternAcross(backdrop[map.backdrop], x, y1, y1, (y2-y1)+1);\n\t\ty1 = (y2 + 1);\n    }\n}\n\n\n// loads a backdrop into memory, if it hasn't already been loaded\nstatic bool LoadBackdropIfNeeded(int backdrop_no)\n{\nchar fname[MAXPATHLEN];\n\n\t// load backdrop now if it hasn't already been loaded\n    if (!backdrop[backdrop_no])\n\t{\n\t\t// use chromakey (transparency) on bkwater, all others don't\n\t\tbool use_chromakey = (backdrop_no == 8);\n\n#ifdef _480X272 // 480x272 widescreen fix\n        if (backdrop_no == 9) {\n            if (sprintf(fname, \"%s/%s.pbm\", data_dir, \"bkMoon480fix\") < 0) {\n                staterr(\"Error opening bkMoon480fix file\");\n            }\n        } else if (backdrop_no == 10) {\n            if (sprintf(fname, \"%s/%s.pbm\", data_dir, \"bkFog480fix\")) {\n                staterr(\"Error opening bkFog480fix file\");\n            }\n        }   else {\n            sprintf(fname, \"%s/%s.pbm\", data_dir, backdrop_names[backdrop_no]);\n        }\n#else\n        sprintf(fname, \"%s/%s.pbm\", data_dir, backdrop_names[backdrop_no]);\n#endif\n\t\tbackdrop[backdrop_no] = NXSurface::FromFile(fname, use_chromakey);\n\t\tif (!backdrop[backdrop_no])\n\t\t{\n\t\t\tstaterr(\"Failed to load backdrop '%s'\", fname);\n\t\t\treturn 1;\n\t\t}\n    }\n\t\n\treturn 0;\n}\n\nvoid map_flush_graphics()\n{\nint i;\n\n\tfor(i=0;i<MAX_BACKDROPS;i++)\n\t{\n\t\tdelete backdrop[i];\n\t\tbackdrop[i] = NULL;\n\t}\n\t\n\t// re-copy star files\n\tfor(i=0;i<256;i++)\n\t{\n\t\tif (tilecode[i] == 0x43)\n\t\t{\n\t\t\tCopySpriteToTile(SPR_DESTROYABLE, i, 0, 0);\n\t\t}\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// draw rising/falling water from eg Almond etc\nvoid map_drawwaterlevel(void)\n{\n// water_sfc: 16 tall at 0\n// just under: 16 tall at 32\n// main tile: 32 tall at 16 (yes, overlapping)\nint water_x, water_y;\n\n    if (!map.waterlevelobject)\n\t\treturn;\n\t\n    water_x = -(map.displayed_xscroll >> CSF);\n\twater_x %= SCREEN_WIDTH;\n\t\n    water_y = (map.waterlevelobject->y >> CSF) - (map.displayed_yscroll >> CSF);\n\t\n\t// draw the surface and just under the surface\n\tBlitPatternAcross(backdrop[map.backdrop], water_x, water_y, 0, 16);\n\twater_y += 16;\n\t\n\tBlitPatternAcross(backdrop[map.backdrop], water_x, water_y, 32, 16);\n\twater_y += 16;\n\t\n\t// draw the rest of the pattern all the way down\n\twhile(water_y < (SCREEN_HEIGHT-1))\n\t{\n\t\tBlitPatternAcross(backdrop[map.backdrop], water_x, water_y, 16, 32);\n\t\twater_y += 32;\n    }\n}\n\n\n// draw the map.\n// \tif foreground = TA_FOREGROUND, draws the foreground tile layer.\n//  if foreground = 0, draws backdrop and background tiles.\nvoid map_draw(uint8_t foreground)\n{\nint x, y;\nint mapx, mapy;\nint blit_x, blit_y, blit_x_start;\nint scroll_x, scroll_y;\n\n    scroll_x = (map.displayed_xscroll >> CSF);\n    scroll_y = (map.displayed_yscroll >> CSF);\n\t\n    /*\n    printf(\"(%d)x(%d):\\t:\", map.displayed_xscroll, map.displayed_yscroll);\n    printf(\"(%d)x(%d):\\t:\", map.maxxscroll, map.maxyscroll);\n    printf(\"(%d)x(%d)\\n\", map.xsize, map.ysize);\n    printf(\"%dx%d\\n\", map.displayed_xscroll >> CSG, map.displayed_yscroll >> CSG);\n    */\n\n    mapx = (scroll_x / TILE_W);\n    mapy = (scroll_y / TILE_H);\n\t\n\tblit_y = -(scroll_y % TILE_H);\n    blit_x_start = -(scroll_x % TILE_W);\n\t\n\t// MAP_DRAW_EXTRA_Y etc is 1 if resolution is changed to\n\t// something not a multiple of TILE_H.\n\n    for(y=0; y <= (SCREEN_HEIGHT / TILE_H)+MAP_DRAW_EXTRA_Y; y++)\n    {\n        blit_x = blit_x_start;\n\n        for(x=0; x <= (SCREEN_WIDTH / TILE_W)+MAP_DRAW_EXTRA_X; x++)\n        {\n            int t = map.tiles[mapx+x][mapy+y];\n            if ((tileattr[t] & TA_FOREGROUND) == foreground)\n                draw_tile(blit_x, blit_y, t);\n\n            blit_x += TILE_W;\n        }\n\n        blit_y += TILE_H;\n    }\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// map scrolling code\nvoid scroll_normal(void)\n{\nconst int scroll_adj_rate = (0x2000 / map.scrollspeed);\n\t\n\t// how many pixels to let player stray from the center of the screen\n\t// before we start scrolling. high numbers let him reach closer to the edges,\n\t// low numbers keep him real close to the center.\n    #define P_VARY_FROM_CENTER\t\t\t(64 << CSF)\n\t\n\tif (player->dir == LEFT)\n\t{\n\t\tmap.scrollcenter_x -= scroll_adj_rate;\n\t\tif (map.scrollcenter_x < -P_VARY_FROM_CENTER)\n\t\t\tmap.scrollcenter_x = -P_VARY_FROM_CENTER;\n\t}\n\telse\n\t{\n\t\tmap.scrollcenter_x += scroll_adj_rate;\n\t\tif (map.scrollcenter_x > P_VARY_FROM_CENTER)\n\t\t\tmap.scrollcenter_x = P_VARY_FROM_CENTER;\n\t}\n\t\n\t// compute where the map \"wants\" to be\n    map.target_x = (player->CenterX() + map.scrollcenter_x) - ((SCREEN_WIDTH / 2) << CSF);\n\t\n\t// Y scrolling\n\tif (player->lookscroll == UP)\n\t{\n\t\tmap.scrollcenter_y -= scroll_adj_rate;\n\t\tif (map.scrollcenter_y < -P_VARY_FROM_CENTER) map.scrollcenter_y = -P_VARY_FROM_CENTER;\n\t}\n\telse if (player->lookscroll == DOWN)\n\t{\n\t\tmap.scrollcenter_y += scroll_adj_rate;\n\t\tif (map.scrollcenter_y > P_VARY_FROM_CENTER) map.scrollcenter_y = P_VARY_FROM_CENTER;\n\t}\n\telse\n\t{\n\t\tif (map.scrollcenter_y <= -scroll_adj_rate)\n\t\t{\n\t\t\tmap.scrollcenter_y += scroll_adj_rate;\n\t\t}\n\t\telse if (map.scrollcenter_y >= scroll_adj_rate)\n\t\t{\n\t\t\tmap.scrollcenter_y -= scroll_adj_rate;\n\t\t}\n\t}\n\t\n    map.target_y = (player->CenterY() + map.scrollcenter_y) - ((SCREEN_HEIGHT / 2) << CSF);\n}\n\nvoid map_scroll_do(void)\n{\n\tbool doing_normal_scroll = false;\n\t\n\tif (!map.scroll_locked)\n\t{\n\t\tif (map.focus.has_target)\n\t\t{\t// FON command\n\t\t\t// this check makes it so if we <FON on an object which\n\t\t\t// gets destroyed, the scroll stays locked at the last known\n\t\t\t// position of the object.\n\t\t\tif (map.focus.target)\n\t\t\t{\n\t\t\t\tObject *t = map.focus.target;\n\t\t\t\t\n\t\t\t\t// Generally we want to focus on the center of the object, not it's UL corner.\n\t\t\t\t// But a few objects (Cage in mimiga village) have offset drawpoints\n\t\t\t\t// that affect the positioning of the scene. If the object has a drawpoint,\n\t\t\t\t// we'll assume it's in an appropriate position, otherwise, we'll try to find\n\t\t\t\t// the center ourselves.\n\t\t\t\tif (sprites[t->sprite].frame[t->frame].dir[t->dir].drawpoint.equ(0, 0))\n\t\t\t\t{\n                    map.target_x = map.focus.target->CenterX() - ((SCREEN_WIDTH / 2) << CSF);\n                    map.target_y = map.focus.target->CenterY() - ((SCREEN_HEIGHT / 2) << CSF);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n                    map.target_x = map.focus.target->x - ((SCREEN_WIDTH / 2) << CSF);\n                    map.target_y = map.focus.target->y - ((SCREEN_HEIGHT / 2) << CSF);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!player->hide)\n\t\t\t{\n\t\t\t\tscroll_normal();\n\t\t\t\t\n\t\t\t\tif (!inputs[DEBUG_MOVE_KEY] || !settings->enable_debug_keys)\n\t\t\t\t\tdoing_normal_scroll = true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tmap.real_xscroll += (map.target_x - map.real_xscroll) / map.scrollspeed;\n\tmap.real_yscroll += (map.target_y - map.real_yscroll) / map.scrollspeed;\n\t\n\tmap.displayed_xscroll = (map.real_xscroll + map.phase_adj);\n\tmap.displayed_yscroll = map.real_yscroll;\t// we don't compensate on Y, because player falls > 2 pixels per frame\n\t\n\tif (doing_normal_scroll)\n\t{\n\t\trun_phase_compensator();\n\t\t//dump_phase_data();\n\t}\n\telse\n\t{\n\t\tmap.phase_adj -= MAP_PHASE_ADJ_SPEED;\n\t\tif (map.phase_adj < 0) map.phase_adj = 0;\n\t}\n\t\n\tmap_sanitycheck();\n\t\n\t// do quaketime after sanity check so quake works in\n\t// small levels like Shack.\n\tif (game.quaketime)\n\t{\n\t\tif (!map.scroll_locked)\n\t\t{\n\t\t\tint pushx, pushy;\n\t\t\t\n\t\t\tif (game.megaquaketime)\t\t// Ballos fight\n\t\t\t{\n\t\t\t\tgame.megaquaketime--;\n                pushx = random(-5, 5) << CSF;\n                pushy = random(-3, 3) << CSF;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n                pushx = random(-1, 1) << CSF;\n                pushy = random(-1, 1) << CSF;\n\t\t\t}\n\t\t\t\n\t\t\tmap.real_xscroll += pushx;\n\t\t\tmap.real_yscroll += pushy;\n\t\t\tmap.displayed_xscroll += pushx;\n\t\t\tmap.displayed_yscroll += pushy;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// quake after IronH battle...special case cause we don't\n\t\t\t// want to show the walls of the arena.\n\t\t\tint pushy = random(-0x500, 0x500);\n\t\t\t\n\t\t\tmap.real_yscroll += pushy;\n\t\t\tif (map.real_yscroll < 0) map.real_yscroll = 0;\n            if (map.real_yscroll > (15 << CSF)) map.real_yscroll = (15 << CSF);\n\t\t\t\n\t\t\tmap.displayed_yscroll += pushy;\n\t\t\tif (map.displayed_yscroll < 0) map.displayed_yscroll = 0;\n            if (map.displayed_yscroll > (15 << CSF)) map.displayed_yscroll = (15 << CSF);\n\t\t}\n\t\t\n\t\tgame.quaketime--;\n    }\n}\n\n// this attempts to prevent jitter most visible when the player is walking on a\n// long straight stretch. the jitter occurs because map.xscroll and player->x\n// tend to be out-of-phase, and thus cross over pixel boundaries at different times.\n// what we do here is try to tweak/fudge the displayed xscroll value by up to 512 subpixels\n// (1 real pixel), so that it crosses pixel boundaries on exactly the same frame as\n// the player does.\nvoid run_phase_compensator(void)\n{\n\tint displayed_phase_offs = (map.displayed_xscroll - player->x) % 512;\n\t\n\tif (displayed_phase_offs != 0)\n\t{\n\t\tint phase_offs = abs(map.real_xscroll - player->x) % 512;\n\t\t//debug(\"%d\", phase_offs);\n\t\t\n\t\t// move phase_adj towards phase_offs; phase_offs is how far\n\t\t// out of sync we are with the player and so once we reach it\n\t\t// we will compensating exactly.\n\t\tif (map.phase_adj < phase_offs)\n\t\t{\n\t\t\tmap.phase_adj += MAP_PHASE_ADJ_SPEED;\n\t\t\tif (map.phase_adj > phase_offs)\n\t\t\t\tmap.phase_adj = phase_offs;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmap.phase_adj -= MAP_PHASE_ADJ_SPEED;\n\t\t\tif (map.phase_adj < phase_offs)\n\t\t\t\tmap.phase_adj = phase_offs;\n\t\t}\n\t}\n}\n\n// debug function\nvoid dump_phase_data()\n{\n\tint phase_offs = abs(map.real_xscroll - player->x) % 512;\n\tint final_phase = abs(map.displayed_xscroll - player->x) % 512;\n\tdebug(\"phase_offs: %d\", phase_offs);\n\tdebug(\"\");\n\tdebug(\"real xscroll: %d\", map.real_xscroll);\n\tdebug(\"displayed xscroll: %d\", map.displayed_xscroll);\n\tdebug(\"difference: %d\", map.real_xscroll - map.displayed_xscroll);\n\tdebug(\"\");\n\tdebug(\"phase_adj: %d\", map.phase_adj);\n\tdebug(\"final_phase: %d\", final_phase);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// scroll position sanity checking\nvoid map_sanitycheck(void)\n{\n    #define MAP_BORDER_AMT\t\t(8<<CSF)\n\tif (map.real_xscroll < MAP_BORDER_AMT) map.real_xscroll = MAP_BORDER_AMT;\n\tif (map.real_yscroll < MAP_BORDER_AMT) map.real_yscroll = MAP_BORDER_AMT;\n\tif (map.real_xscroll > map.maxxscroll) map.real_xscroll = map.maxxscroll;\n\tif (map.real_yscroll > map.maxyscroll) map.real_yscroll = map.maxyscroll;\n\t\n\tif (map.displayed_xscroll < MAP_BORDER_AMT) map.displayed_xscroll = MAP_BORDER_AMT;\n\tif (map.displayed_yscroll < MAP_BORDER_AMT) map.displayed_yscroll = MAP_BORDER_AMT;\n\tif (map.displayed_xscroll > map.maxxscroll) map.displayed_xscroll = map.maxxscroll;\n\tif (map.displayed_yscroll > map.maxyscroll) map.displayed_yscroll = map.maxyscroll;\n}\n\n\nvoid map_scroll_jump(int x, int y)\n{\n    map.target_x = x - ((SCREEN_WIDTH / 2) << CSF);\n    map.target_y = y - ((SCREEN_HEIGHT / 2) << CSF);\n\tmap.real_xscroll = map.target_x;\n\tmap.real_yscroll = map.target_y;\n\t\n\tmap.displayed_xscroll = map.real_xscroll;\n\tmap.displayed_yscroll = map.real_yscroll;\n\tmap.phase_adj = 0;\n\t\n\tmap.scrollcenter_x = map.scrollcenter_y = 0;\n\tmap_sanitycheck();\n}\n\n// lock the scroll in it's current position. the target position will not change,\n// however if the scroll is moved off the target (really only a quake could do this)\n// the map will still seek it's old position.\nvoid map_scroll_lock(bool lockstate)\n{\n\tmap.scroll_locked = lockstate;\n\tif (lockstate)\n\t{\t// why do we do this?\n\t\tmap.real_xscroll = map.target_x;\n\t\tmap.real_yscroll = map.target_y;\n\t}\n}\n\n// set the map focus and scroll speed.\n// if o is specified, focuses on that object.\n// if o is NULL, focuses on the player.\nvoid map_focus(Object *o, int spd)\n{\n\tmap.focus.target = o;\n\tmap.focus.has_target = (o != NULL);\n\t\n\tmap.scrollspeed = spd;\n\tmap.scroll_locked = false;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// change tile at x,y into newtile while optionally spawning smoke clouds and boomflash\nvoid map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind)\n{\n\tif (x < 0 || y < 0 || x >= map.xsize || y >= map.ysize)\n\t\treturn;\n\t\n\tmap.tiles[x][y] = newtile;\n\t\n    int xa = ((x * TILE_W) + (TILE_W / 2)) << CSF;\n    int ya = ((y * TILE_H) + (TILE_H / 2)) << CSF;\n\tSmokeXY(xa, ya, nclouds, TILE_W/2, TILE_H/2, push_behind);\n\t\n\tif (boomflash)\n\t\teffect(xa, ya, EFFECT_BOOMFLASH);\n}\n\n\n\nconst char *map_get_stage_name(int mapno)\n{\n\tif (mapno == STAGE_KINGS)\n\t\treturn \"\";//Studio Pixel Presents\";\n\t\n\treturn stages[mapno].stagename;\n}\n\n// show map name for \"ticks\" ticks\nvoid map_show_map_name()\n{\n\tgame.mapname_x = (SCREEN_WIDTH / 2) - (GetFontWidth(map_get_stage_name(game.curmap), 0) / 2);\n\tgame.showmapnametime = 120;\n}\n\nvoid map_draw_map_name(void)\n{\n\tif (game.showmapnametime)\n\t{\n\t\tfont_draw(game.mapname_x, 84, map_get_stage_name(game.curmap), 0, &shadowfont);\n\t\tgame.showmapnametime--;\n\t}\n}\n\n\n// animate all motion tiles\nvoid AnimateMotionTiles(void)\n{\nint i;\nint x_off, y_off;\n\n\tfor(i=0;i<map.nmotiontiles;i++)\n\t{\n\t\tswitch(map.motiontiles[i].dir)\n\t\t{\n\t\t\tcase LEFT: y_off = 0; x_off = map.motionpos; break;\n\t\t\tcase RIGHT: y_off = 0; x_off = (TILE_W - map.motionpos); break;\n\t\t\t\n\t\t\tcase UP: x_off = 0; y_off = map.motionpos; break;\n\t\t\tcase DOWN: x_off = 0; y_off = (TILE_H - map.motionpos); break;\n\t\t\t\n\t\t\tdefault: x_off = y_off = 0; break;\n\t\t}\n\t\t\n\t\tCopySpriteToTile(map.motiontiles[i].sprite, map.motiontiles[i].tileno, x_off, y_off);\n\t}\n\t\n\tmap.motionpos += 2;\n\tif (map.motionpos >= TILE_W) map.motionpos = 0;\n}\n\n\n// attempts to find an object with id2 matching the given value else returns NULL\nObject *FindObjectByID2(int id2)\n{\n\tObject *result = ID2Lookup[id2];\n\t\n\tif (result)\n\t\tstaterr(\"FindObjectByID2: ID2 %04d found: type %s; coords: (%d, %d)\", id2, DescribeObjectType(ID2Lookup[id2]->type), ID2Lookup[id2]->x>>CSF,ID2Lookup[id2]->y>>CSF);\n\telse\n\t\tstaterr(\"FindObjectByID2: no such object %04d\", id2);\n\t\n\treturn result;\n}\n\n"
  },
  {
    "path": "map.fdh",
    "content": "//hash:5a715c2e\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nbool load_stage(int stage_no);\nbool load_map(const char *fname);\nbool load_entities(const char *fname);\nbool load_tileattr(const char *fname);\nbool load_stages(void);\nbool initmapfirsttime(void);\nvoid initmap(void);\nvoid map_set_backdrop(int backdrop_no);\nvoid map_draw_backdrop(void);\nstatic void DrawFastLeftLayered(void);\nstatic bool LoadBackdropIfNeeded(int backdrop_no);\nvoid map_flush_graphics();\nvoid map_drawwaterlevel(void);\nvoid map_draw(uint8_t foreground);\nvoid scroll_normal(void);\nvoid map_scroll_do(void);\nvoid run_phase_compensator(void);\nvoid dump_phase_data();\nvoid map_sanitycheck(void);\nvoid map_scroll_jump(int x, int y);\nvoid map_scroll_lock(bool lockstate);\nvoid map_focus(Object *o, int spd);\nvoid map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind);\nconst char *map_get_stage_name(int mapno);\nvoid map_show_map_name();\nvoid map_draw_map_name(void);\nvoid AnimateMotionTiles(void);\nObject *FindObjectByID2(int id2);\n\n\n/* located in platform.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in caret.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in tsc.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nbool tsc_load(const char *fname, int pageno);\nint CVTDir(int csdir);\n\n\n/* located in debug.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nconst char *DescribeObjectType(int type);\nvoid debug(const char *fmt, ...);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in graphics/font.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in graphics/palette.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nvoid palette_reset(void);\n\n\n/* located in common/stat.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//----------------------[referenced from map.cpp]--------------------//\nbool fverifystring(FILE *fp, const char *str);\nuint16_t fgeti(FILE *fp);\nuint32_t fgetl(FILE *fp);\nint random(int min, int max);\n\n"
  },
  {
    "path": "map.h",
    "content": "\n#ifndef _MAP_H\n#define _MAP_H\n\n#define MAX_MOTION_TILES\t\t\t20\n\n#define MAP_MAXSIZEX\t\t\t\t300\n#define MAP_MAXSIZEY\t\t\t\t256\n\n#define MAP_PHASE_ADJ_SPEED\t\t\t64\n\n// this macro returns true if the current stage is spec'd to use the specified NPC spriteset.\n#define DoesCurrentStageUseSpriteset(SET) \\\n\t( stages[game.curmap].NPCset1==SET || stages[game.curmap].NPCset2==SET )\n\n#define MAPX(X)\t\t( ( (X) * TILE_W ) << CSF )\n#define MAPY(Y)\t\t( ( (Y) * TILE_H ) << CSF )\n\nstruct stMap\n{\n\tint xsize, ysize;\n\tint displayed_xscroll, displayed_yscroll;\n\tint maxxscroll, maxyscroll;\n\tint parscroll_x, parscroll_y;\n\t\n\tint real_xscroll, real_yscroll;\n\tint phase_adj;\n\t\n\tint target_x, target_y;\n\t\n\tint scrollcenter_x, scrollcenter_y;\n\tint scrollspeed;\n\tbool scroll_locked;\n\t\n\t\n\tuint8_t backdrop;\t\t\t// backdrop # in use\n\tint scrolltype;\t\t\t\t// backdrop scroll type\n\t\n\tObject *waterlevelobject; \t// object controlling water level (for maps with rising water)\n\tint wlforcestate;\t\t\t// set by Core--modifies the state of the water level object\n\tint wlstate;\t\t\t\t// set by WaterLevel object--reports it's current state\n\t\n\t// for FON, FOM script commands\n\tstruct\n\t{\n\t\tObject *target;\n\t\tbool has_target;\n\t} focus;\n\t\n\t// motion tiles used in Waterway and Main Artery--these tiles use\n\t// a sprite as their image data and pan the sprite across them in a specified direction\n\tstruct\n\t{\n\t\tint tileno;\t\t\t\t\t// tile # to animate\n\t\tuchar dir;\t\t\t\t\t// direction of scrolling\n\t\tint sprite;\t\t\t\t\t// sprite # containing image data\n\t} motiontiles[MAX_MOTION_TILES];\n\tint nmotiontiles;\n\tint motionpos;\n\t\n\tunsigned char tiles[MAP_MAXSIZEX][MAP_MAXSIZEY];\n};\n\nextern stMap map;\n\nvoid map_focus(Object *o, int spd = 16);\n\n// background scrolling types\n#define BK_FIXED\t\t\t0\t\t// backdrop does not scroll\n#define BK_PARALLAX\t\t\t1\t\t// bk is parallax scroll\n#define BK_FOLLOWFG\t\t\t2\t\t// scrolls, but is 1:1 with foreground\n#define BK_HIDE\t\t\t\t3\t\t// draw #000021 blue instead of a graphic\n#define BK_HIDE2\t\t\t4\t\t// identical to BK_HIDE\n#define BK_FASTLEFT\t\t\t5\t\t// fast scroll left, items falling left (ironhead battle)\n#define BK_FASTLEFT_LAYERS\t6\t\t// fast scroll left w/ layers, items falling left (Outer Wall)\n#define BK_FASTLEFT_LAYERS_NOFALLLEFT\t7\t// fast left w/ layers, but items don't fall left (Balcony)\n#define BK_HIDE3\t\t\t8\t\t// identical to BK_HIDE\n\n#define MAX_TILES\t\t\t256\t\t\t\t// max # of different kinds of tiles per tileset\n\n// these flag constants come from the stage data somewhere I believe\n// (don't remember for sure) so they should stay constant.\n#define TA_SOLID_PLAYER\t\t0x00001\t\t\t// solid to player\n#define TA_SOLID_NPC\t\t0x00002\t\t\t// solid to npc's, enemies and enemy shots\n#define TA_SOLID_SHOT\t\t0x00004\t\t\t// solid to player's shots\n#define TA_SOLID\t\t\t(TA_SOLID_PLAYER | TA_SOLID_SHOT | TA_SOLID_NPC)\n#define TA_HURTS_PLAYER\t\t0x00010\t\t\t// this tile hurts the player -10hp\n#define TA_FOREGROUND\t\t0x00020\t\t\t// tile is drawn in front of sprites\n#define TA_DESTROYABLE\t\t0x00040\t\t\t// tile is destroyable if player shoots it\n#define TA_WATER\t\t\t0x00080\t\t\t// tile is water/underwater\n\n#define TA_CURRENT\t\t\t0x00100\t\t\t// blows player (tilecode checked to see which direction)\n#define TA_SLOPE\t\t\t0x00200\t\t\t// is a slope (the tilecode is checked to see what kind)\n\nextern uint8_t tilecode[MAX_TILES];\nextern uint32_t tileattr[MAX_TILES];\nextern uint32_t tilekey[256];\nextern Object *ID2Lookup[65536];\n\nvoid AnimateMotionTiles(void);\n\nvoid map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds=4, bool boomflash=false, Object *push_behind=NULL);\n\n// map names and info from stage.dat\n#include \"maprecord.h\"\n\n// backdrop and tileset names\n#include \"stagedata.h\"\n\n// needed if resolution is changed to a non-multiple of the tile size\n#if (((SCREEN_WIDTH / TILE_W) * TILE_W) != SCREEN_WIDTH)\n\t#define MAP_DRAW_EXTRA_X\t1\n#else\n    #define MAP_DRAW_EXTRA_X\t0\n#endif\n\n#if (((SCREEN_HEIGHT / TILE_H) * TILE_H) != SCREEN_HEIGHT)\n\t#define MAP_DRAW_EXTRA_Y\t1\n#else\n    #define MAP_DRAW_EXTRA_Y\t0\n#endif\n\n#endif\n"
  },
  {
    "path": "map_system.cpp",
    "content": "\n// the Map System\n#include \"nx.h\"\n#include \"map_system.h\"\n#include \"map_system.fdh\"\n\n#define MS_EXPANDING\t\t0\n#define MS_DISPLAYED\t\t1\n#define MS_CONTRACTING\t\t2\n\n// # of frames in the expand/contract animation\n#define EXPAND_LENGTH\t\t8\n\n#define BANNER_TOP\t\t\t7\n#define BANNER_BTM\t\t\t23\n\nstatic struct\n{\n\tNXSurface *sfc;\t\t\t// surface for the map image\n\t\n\tint x, y;\t\t\t\t// the position of the upper-left corner of the image\n\tint w, h;\t\t\t\t// size of image\n\t\n\tint expandframe;\t\t// for expand/contract effect\n\tint current_row;\t\t// scan down effect\n\t\n\tint px, py;\t\t\t\t// the position of the you-are-here dot\n\tint timer;\t\t\t\t// for the flashing\n\t\n\tint state;\t\t\t\t// expanding, displayed, contracting\n\tint return_gm;\t\t\t// game mode to return to\n\t\n\tconst char *bannertext;\n\tint textx, texty;\n\t\n\tbool lastbuttondown;\n} ms;\n\n\nbool ms_init(int return_to_mode)\n{\n\tmemset(&ms, 0, sizeof(ms));\n\tms.return_gm = return_to_mode;\n\tms.lastbuttondown = true;\n\tms.w = map.xsize;\n\tms.h = map.ysize;\n\t\n\t// create the surface\n\tms.sfc = new NXSurface(ms.w, ms.h);\n\tms.sfc->FillRect(0, 0, ms.w, ms.h, DK_BLUE);\n\t\n\tms.x = (SCREEN_WIDTH / 2) - (ms.w / 2);\n\tms.y = (SCREEN_HEIGHT / 2) - (ms.h / 2);\n\t\n\t// where will we put the dot?\n\tms.px = ms.x + ((player->x >> CSF) / TILE_W);\n\tms.py = ms.y + ((player->y >> CSF) / TILE_H);\n\t\n\tms.bannertext = stages[game.curmap].stagename;\n\tms.textx = (SCREEN_WIDTH / 2) - (GetFontWidth(ms.bannertext, 0) / 2);\n\tms.texty = BANNER_TOP+3;\n\t\n\treturn 0;\n}\n\nvoid ms_close(void)\n{\n\tmemset(inputs, 0, sizeof(inputs));\n\tdelete ms.sfc;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ms_tick(void)\n{\n\tDrawScene();\n\tdraw_banner();\n\t\n\tif (ms.state == MS_EXPANDING)\n\t{\n\t\tms.expandframe++;\n\t\t\n\t\tif (ms.expandframe > EXPAND_LENGTH)\n\t\t\tms.state = MS_DISPLAYED;\n\t\telse\n\t\t\tdraw_expand();\n\t}\n\t\n\tif (ms.state == MS_DISPLAYED)\n\t{\n\t\t// scan down effect\n\t\tif (ms.current_row < map.ysize)\n\t\t{\n\t\t\tdraw_row(ms.current_row++);\n\t\t\t\n\t\t\tif (ms.current_row < map.ysize)\n\t\t\t\tdraw_row(ms.current_row++);\n\t\t}\n\t\t\n\t\t// draw map\n\t\tDrawRect(ms.x - 1, ms.y - 1, ms.x + ms.w, ms.y + ms.h, DK_BLUE);\n\t\tDrawSurface(ms.sfc, ms.x, ms.y);\n\t\t\n\t\t// you-are-here dot\n\t\tif (++ms.timer & 8)\n\t\t\tdraw_sprite(ms.px, ms.py, SPR_MAP_PIXELS, 4);\n\t\t\n\t\t// dismissal\n\t\tif (ms.lastbuttondown)\n\t\t{\n\t\t\tif (!buttondown())\n\t\t\t\tms.lastbuttondown = false;\n\t\t}\n\t\telse if (buttondown())\n\t\t{\n\t\t\tms.state = MS_CONTRACTING;\n\t\t}\n\t}\n\telse if (ms.state == MS_CONTRACTING)\n\t{\n\t\tms.expandframe--;\n\t\t\n\t\tif (ms.expandframe <= 0)\n\t\t{\n\t\t\tint param = (ms.return_gm == GM_INVENTORY) ? 1 : 0;\n\t\t\tgame.setmode(ms.return_gm, param);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdraw_expand();\n\t\t}\n\t}\n}\n\n\n\n// expand/contract effect\nstatic void draw_expand(void)\n{\nint x1, y1, x2, y2;\n\n\tint wd = (map.xsize * ms.expandframe) / EXPAND_LENGTH;\n\tint ht = (map.ysize * ms.expandframe) / EXPAND_LENGTH;\n\t\n\tx1 = (SCREEN_WIDTH / 2)  - (wd / 2);\n\ty1 = (SCREEN_HEIGHT / 2) - (ht / 2);\n\tx2 = (SCREEN_WIDTH / 2)  + (wd / 2);\n\ty2 = (SCREEN_HEIGHT / 2) + (ht / 2);\n\t\n\tFillRect(x1, y1, x2, y2, DK_BLUE);\n}\n\n\nstatic void draw_banner(void)\n{\n\tFillRect(0, BANNER_TOP, SCREEN_WIDTH, BANNER_BTM, NXColor(0, 0, 0));\n\tfont_draw(ms.textx, ms.texty, ms.bannertext, 0);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// draw the specified row of map onto the spritesheet\n// the colors for the map system are not actually plotted as pixels,\n// but exist as 1x1 sprites on the TextBox spritesheet.\nstatic void draw_row(int y)\n{\nint x;\n\n\tGraphics::SetDrawTarget(ms.sfc);\n\t\n\tfor(x=0;x<map.xsize;x++)\n\t{\n\t\tint tc = tilecode[map.tiles[x][y]];\n\t\tdraw_sprite(x, y, SPR_MAP_PIXELS, get_color(tc));\n\t}\n\t\n\tGraphics::SetDrawTarget(screen);\n}\n\n\nstatic int get_color(int tilecode)\n{\n\tswitch(tilecode)\n\t{\n\t\tcase 0:\n\t\t\treturn 0;\n\t\t\n\t\tcase 0x01:\n\t\tcase 0x02:\n\t\tcase 0x40:\n\t\tcase 0x44:\n\t\tcase 0x51:\n\t\tcase 0x52:\n\t\tcase 0x55:\n\t\tcase 0x56:\n\t\tcase 0x60:\n\t\tcase 0x71:\n\t\tcase 0x72:\n\t\tcase 0x75:\n\t\tcase 0x76:\n\t\tcase 0x80:\n\t\tcase 0x81:\n\t\tcase 0x82:\n\t\tcase 0x83:\n\t\tcase 0xA0:\n\t\tcase 0xA1:\n\t\tcase 0xA2:\n\t\tcase 0xA3:\n\t\t\treturn 1;\n\t\t\n\t\tcase 0x43:\n\t\tcase 0x50:\n\t\tcase 0x53:\n\t\tcase 0x54:\n\t\tcase 0x57:\n\t\tcase 0x63:\n\t\tcase 0x70:\n\t\tcase 0x73:\n\t\tcase 0x74:\n\t\tcase 0x77:\n\t\t\treturn 2;\n\t\t\n\t\tdefault:\n\t\t\treturn 3;\n\t}\n}\n\n\n"
  },
  {
    "path": "map_system.fdh",
    "content": "//hash:ade0b838\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//------------------[referenced from map_system.cpp]-----------------//\nvoid DrawScene(void);\n\n\n/* located in input.cpp */\n\n//------------------[referenced from map_system.cpp]-----------------//\nbool buttondown(void);\n\n\n/* located in map_system.cpp */\n\n//------------------[referenced from map_system.cpp]-----------------//\nbool ms_init(int return_to_mode);\nvoid ms_close(void);\nvoid ms_tick(void);\nstatic void draw_expand(void);\nstatic void draw_banner(void);\nstatic void draw_row(int y);\nstatic int get_color(int tilecode);\n\n\n/* located in graphics/font.cpp */\n\n//------------------[referenced from map_system.cpp]-----------------//\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n"
  },
  {
    "path": "map_system.h",
    "content": "\n#ifndef _MAPSYSTEM_H\n#define _MAPSYSTEM_H\n\n\nbool ms_init(int param);\nvoid ms_tick(void);\nvoid ms_close(void);\n\n#endif\n"
  },
  {
    "path": "maprecord.h",
    "content": "\n#ifndef _MAPRECORD_H\n#define _MAPRECORD_H\n\n#define MAX_STAGES\t\t120\nstruct MapRecord\n{\n\tchar filename[32];\n\tchar stagename[35];\n\t\n\tuint8_t tileset;\n\tuint8_t bg_no;\n\tuint8_t scroll_type;\n\tuint8_t bossNo;\n\tuint8_t NPCset1;\n\tuint8_t NPCset2;\n};\nextern MapRecord stages[MAX_STAGES];\nextern int num_stages;\n\n#define STAGE_SAND\t\t\t\t\t10\n#define STAGE_START_POINT\t\t\t13\n#define STAGE_IRONH\t\t\t\t\t31\n#define STAGE_BOULDER_CHAMBER\t\t44\n#define STAGE_MAZE_M\t\t\t\t45\n#define STAGE_ALMOND\t\t\t\t47\n#define STAGE_WATERWAY\t\t\t\t48\n#define STAGE_KINGS_TABLE\t\t\t65\n#define STAGE_HELL1\t\t\t\t\t80\n#define STAGE_HELL2\t\t\t\t\t81\n#define STAGE_HELL3\t\t\t\t\t82\n#define STAGE_HELL4\t\t\t\t\t84\n#define STAGE_HELL42\t\t\t\t85\n#define STAGE_STATUE_CHAMBER\t\t86\n#define STAGE_SEAL_CHAMBER\t\t\t87\n#define STAGE_SEAL_CHAMBER_2\t\t92\n#define STAGE_CORRIDOR\t\t\t\t88\n#define STAGE_KINGS\t\t\t\t\t72\t\t// intro\n\n#endif\n"
  },
  {
    "path": "niku.cpp",
    "content": "\n#include <stdio.h>\n#include <stdint.h>\n#include \"niku.fdh\"\n\n/*\n\t290.rec contains the tick value 4 times, followed by the 4 byte key\n\tto decrypt each instance, for a total of 20 bytes.\n*/\n\n// load the contents of 290.rec and store in value_out. Returns 0 on success.\n// If there is no such file or an error occurs, writes 0 to value_out.\nbool niku_load(uint32_t *value_out)\n{\nFILE *fp;\nuint8_t buffer[20];\nuint32_t *result = (uint32_t *)buffer;\nint i, j;\n\n\tconst char *fname = getfname();\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstat(\"niku_load: couldn't open file '%s'\", fname);\n\t\tif (value_out) *value_out = 0;\n\t\treturn 1;\n\t}\n\t\n\tfread(buffer, 20, 1, fp);\n\tfclose(fp);\n\t\n\tfor(i=0;i<4;i++)\n\t{\n\t\tuint8_t key = buffer[i+16];\n\t\t\n\t\tj = i * 4;\n\t\tbuffer[j] -= key;\n\t\tbuffer[j+1] -= key;\n\t\tbuffer[j+2] -= key;\n\t\tbuffer[j+3] -= (key / 2);\n\t}\n\t\n\tif ((result[0] != result[1]) || \\\n\t\t(result[0] != result[2]) || \\\n\t\t(result[0] != result[3]))\n\t{\n\t\tstat(\"niku_load: value mismatch; '%s' corrupt\", fname);\n\t\tif (value_out) *value_out = 0;\n\t}\n\telse\n\t{\n\t\tstat(\"niku_load: loaded value 0x%x from %s\", *result, fname);\n\t\tif (value_out) *value_out = *result;\n\t}\n\t\n\treturn 0;\n}\n\n// save the timestamp in value to 290.rec.\nbool niku_save(uint32_t value)\n{\nuint8_t buf_byte[20];\nuint32_t *buf_dword = (uint32_t *)buf_byte;\n\n\t// place values\n\tbuf_dword[0] = value;\n\tbuf_dword[1] = value;\n\tbuf_dword[2] = value;\n\tbuf_dword[3] = value;\n\t\n\t// generate keys\n\tbuf_byte[16] = random(0, 255);\n\tbuf_byte[17] = random(0, 255);\n\tbuf_byte[18] = random(0, 255);\n\tbuf_byte[19] = random(0, 255);\n\t\n\t// encode each copy\n\tfor(int i=0;i<4;i++)\n\t{\n\t\tuint8_t *ptr = (uint8_t *)&buf_dword[i];\n\t\tuint8_t key = buf_byte[i+16];\n\t\t\n\t\tptr[0] += key;\n\t\tptr[1] += key;\n\t\tptr[2] += key;\n\t\tptr[3] += key / 2;\n\t}\n\t\n\tconst char *fname = getfname();\n\tFILE *fp = fileopen(fname, \"wb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"niku_save: failed to open '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\tfwrite(buf_byte, 20, 1, fp);\n\tfclose(fp);\n\t\n\tstat(\"niku_save: wrote value 0x%08x\", value);\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic const char *getfname()\n{\n\t// might do stuff with sprintf here to place it in other subdirectories, etc.\n\t// is just here for expansion.\n\treturn \"290.rec\";\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "niku.fdh",
    "content": "//hash:1da713cd\n//automatically generated by Makegen\n\n/* located in platform.cpp */\n\n//---------------------[referenced from niku.cpp]--------------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in niku.cpp */\n\n//---------------------[referenced from niku.cpp]--------------------//\nbool niku_load(uint32_t *value_out);\nbool niku_save(uint32_t value);\nstatic const char *getfname();\n\n\n/* located in common/stat.cpp */\n\n//---------------------[referenced from niku.cpp]--------------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//---------------------[referenced from niku.cpp]--------------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "nx.h",
    "content": "\n#ifndef _NX_H\n#define _NX_H\n\n#include <SDL/SDL.h>\n#include <stdio.h>\n#include <ctype.h>\n//#include <sys/param.h>\n//#include <limits.h>\n\n#include \"config.h\"\n#include \"common/basics.h\"\n#include \"common/BList.h\"\n#include \"common/StringList.h\"\n#include \"common/DBuffer.h\"\n#include \"common/DString.h\"\n#include \"common/InitList.h\"\n\n#include \"graphics/graphics.h\"\n#include \"graphics/tileset.h\"\n#include \"graphics/sprites.h\"\ntypedef SIFPoint\tPoint;\nusing namespace Graphics;\nusing Sprites::draw_sprite;\nusing Sprites::draw_sprite_at_dp;\nusing Sprites::draw_sprite_clipped;\nusing Sprites::draw_sprite_clip_width;\nusing Sprites::draw_sprite_chopped;\nusing Sprites::draw_sprite_repeating_x;\nusing Sprites::create_spritesheet;\nusing Sprites::get_spritesheet;\nusing Tileset::draw_tile;\n\n#define CSF\t\t\t\t9\n\nclass Object;\n\n// don't use this, use fileopen() instead.\n// some platforms are retarded and need special workarounds (read: WinCE)\n#pragma\tGCC poison\t\tfopen\nFILE *fileopen(const char *fname, const char *mode);\n\n#include \"trig.h\"\n#include \"autogen/sprites.h\"\n#include \"dirnames.h\"\n#include \"TextBox/TextBox.h\"\n#include \"graphics/font.h\"\n\n#include \"input.h\"\n#include \"tsc.h\"\n#include \"stageboss.h\"\n#include \"ai/ai.h\"\n#include \"map.h\"\n#include \"statusbar.h\"\n#include \"floattext.h\"\n#include \"object.h\"\n#include \"ObjManager.h\"\n#include \"console.h\"\n#include \"debug.h\"\n#include \"game.h\"\n#include \"caret.h\"\n#include \"screeneffect.h\"\n#include \"settings.h\"\n#include \"slope.h\"\n#include \"player.h\"\n#include \"p_arms.h\"\n#include \"replay.h\"\n#include \"platform.h\"\n\n#include \"sound/sound.h\"\n\nconst char *strhex(int value);\n\n#ifdef __HAIKU__\nchar *getHaikuSettingsPath();\n#endif\n\n#endif\n"
  },
  {
    "path": "nx.rc",
    "content": "IDI_ICON1 ICON DISCARDABLE \"nx.ico\"\n"
  },
  {
    "path": "nx_icon.h",
    "content": "/* GIMP RGBA C-Source image dump (nx_icon.h) */\n\nstatic const struct {\n  unsigned int \t width;\n  unsigned int \t height;\n  unsigned int \t bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */\n  unsigned char\t pixel_data[32 * 32 * 4 + 1];\n} WINDOW_TITLE_ICON = {\n  32, 32, 4,\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\"\n  \"\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\"\n  \"\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\"\n  \"\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\"\n  \"\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\373\\360\\351\\300\\240\\200\\377\\340\\240@\\377\\340\\300@\\377\\340\\300\"\n  \"@\\377\\340\\300@\\377\\340\\300@\\377\\340\\300@\\377\\340\\300@\\377\\340\\300@\\377\\340\"\n  \"\\300@\\377\\340\\300@\\377\\340\\300@\\377\\340\\300@\\377\\340\\300@\\377\\340\\340@\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\"\n  \"\\377\\373\\360\\351\\300\\334\\300\\373\\300\\200@\\377\\300\\200@\\377\\340\\300\\0\\377\"\n  \"\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\"\n  \"\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\"\n  \"\\0\\377\\340\\300@\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\337\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\373\\360\\351\\300\\240\\200\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\"\n  \"\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\340\\240\\0\\377\\340\\300\\0\\377\\340\\300\"\n  \"\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\"\n  \"\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\340\\200\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\\377\\373\\360\\351\\377\\373\"\n  \"\\360\\351\\377\\377\\377\\337\\377\\373\\360\\351\\300\\200@\\377\\300\\200@\\377\\300\\200\"\n  \"@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\240@\\377\\340\"\n  \"\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\"\n  \"\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300@\\377\"\n  \"\\377\\373\\360\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\"\n  \"\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\\300\\340\"\n  \"@\\377\\240\\340\\0\\377\\377\\373\\360\\377\\377\\373\\360\\377\\300\\200@\\377\\300\\200\"\n  \"@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\"\n  \"\\200@\\377\\300\\200@\\377\\340\\240\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\"\n  \"\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\"\n  \"\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\340\\200\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\337\\240\\340@\\377\\240\\340\\0\\377\\377\\373\\360\\377\\377\\373\\360\\377\\300\\200\"\n  \"@\\377\\300\\200@\\377\\300\\240\\200\\377\\240\\200@\\377\\240`@\\377\\240`@\\377\\240`\"\n  \"@\\377\\300\\200@\\377\\300\\240\\200\\377\\340\\300@\\377\\340\\340@\\377\\340\\300@\\377\"\n  \"\\340\\300@\\377\\300\\300@\\377\\300\\300@\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\"\n  \"\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\340\\200\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\337\\200\\240@\\377`\\240@\\377\\377\\373\\360\\377\\377\\373\\360\\377\\300\\200@\"\n  \"\\377\\240\\200@\\377\\200\\300\\300\\377`\\200\\200\\377@\\40@\\377@\\40@\\377\\40\\0@\\377\"\n  \"\\240\\240\\244\\377\\377\\377\\377\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\377\"\n  \"\\377\\377\\377\\373\\360\\377\\200\\300\\300\\377\\200\\300\\300\\377\\340\\300\\0\\377\\340\"\n  \"\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\300\\0\\377\\340\\340\\200\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\337\\240\\300\\200\\377\\240\\300\\200\\377\\300\\334\\300\"\n  \"\\377\\300\\300\\300\\377\\300\\200@\\377\\300\\240\\200\\377\\300\\334\\300\\377\\200\\240\"\n  \"\\300\\377\\40\\0\\200\\377`@\\200\\377\\200`\\200\\377\\300\\300\\300\\377\\377\\373\\360\"\n  \"\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\246\"\n  \"\\312\\360\\377\\240\\300\\300\\377\\240\\200\\200\\377\\240\\200@\\377\\300\\300@\\377\\300\"\n  \"\\300@\\377\\340\\300\\0\\377\\340\\300@\\377\\300\\334\\300\\377\\377\\373\\360\\377\\377\"\n  \"\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\373\\360\\351`\\240@\\377`\\240@\\377\\300\\200@\\377\\340\\240\\200\"\n  \"\\377\\377\\373\\360\\377\\246\\312\\360\\377\\0\\0\\377\\377\\200\\200\\300\\377\\377\\377\"\n  \"\\377\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\"\n  \"\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\0\\0\\377\"\n  \"\\377\\0\\0\\377\\377`\\300\\300\\377\\240\\300\\200\\377\\340\\300\\0\\377\\300\\300\\0\\377\"\n  \"\\240\\240\\0\\377\\300\\300\\200\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\373\\360\\351\\200\\300\\200\"\n  \"\\377`\\240@\\377\\300\\200@\\377\\340\\240\\200\\377\\377\\373\\360\\377\\246\\312\\360\\377\"\n  \"\\0\\0\\377\\377\\200\\200\\300\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\"\n  \"\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\"\n  \"\\373\\360\\377\\377\\373\\360\\377\\0\\0\\377\\377\\0\\0\\377\\377\\246\\312\\360\\377\\300\"\n  \"\\334\\300\\377\\240\\300@\\377\\300\\300@\\377\\300\\300\\200\\377\\300\\300\\200\\377\\340\"\n  \"\\340\\200\\377\\377\\373\\360\\377\\377\\377\\377\\377\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\373\\360\\351`\\300\\200\\377`\\300\\200\\377\\300\\200@\\377\\340\"\n  \"\\240\\200\\377\\377\\373\\360\\377\\246\\312\\360\\377\\0\\0\\377\\377``\\300\\377\\377\\373\"\n  \"\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\"\n  \"\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\0\\0\\377\"\n  \"\\377\\0\\0\\377\\377\\377\\377\\377\\377\\300\\334\\300\\377@\\300\\200\\377\\240\\300\\300\"\n  \"\\377\\377\\377\\377\\377\\300\\300\\200\\377\\200\\200\\0\\377\\340\\340\\200\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\\300\\334\"\n  \"\\300\\373\\300\\334\\300\\373\\300\\200@\\377\\300\\240\\200\\377\\377\\373\\360\\377\\377\"\n  \"\\373\\360\\377\\200\\200\\300\\377\\246\\312\\360\\377\\377\\373\\360\\377\\377\\373\\360\"\n  \"\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\"\n  \"\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\246\\312\\360\\377\\240\\240\\300\"\n  \"\\377\\340\\300\\200\\377\\340\\300\\200\\377\\300\\334\\300\\377\\300\\334\\300\\377\\377\"\n  \"\\377\\377\\377\\300\\334\\300\\377\\340\\340\\200\\377\\377\\373\\360\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\373\\360\\351\\300\\200@\\377\\300\\240\\200\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\373\\360\\377\\300\"\n  \"\\200@\\377\\340\\240\\200\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\373\\360\"\n  \"\\351\\300\\200@\\377\\300\\200@\\377\\340\\240\\200\\377\\340\\240\\200\\377\\340\\240\\200\"\n  \"\\377\\340\\240\\200\\377\\340\\240\\200\\377\\340\\240\\200\\377\\340\\240\\200\\377\\300\"\n  \"\\300\\300\\377\\240\\300\\300\\377\\300\\300\\200\\377\\340\\240\\200\\377\\340\\240\\200\"\n  \"\\377\\340\\240\\200\\377\\340\\240\\200\\377\\340\\240\\200\\377\\300\\200@\\377\\340\\240\"\n  \"\\200\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\\377\\337\"\n  \"\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\373\\360\\351\\300\\200@\\377\"\n  \"\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200\"\n  \"@\\377\\300\\200@\\377\\300\\200@\\377\\200\\240\\200\\377\\200\\300\\300\\377\\240\\200@\"\n  \"\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\"\n  \"\\200@\\377\\340\\240\\200\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\337\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\373\\360\\351\\300\"\n  \"\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\"\n  \"\\300\\200@\\377\\340\\300\\200\\377\\377\\373\\360\\377\\340\\200\\200\\377\\300`@\\377\\240\"\n  \"\\240\\244\\377\\240\\240\\244\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200\"\n  \"@\\377\\300\\200@\\377\\340\\240\\200\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\373\\360\"\n  \"\\351\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\\300\"\n  \"\\200@\\377\\300\\200@\\377\\300\\300\\300\\377\\377\\377\\377\\377\\340\\200\\200\\377\\340\"\n  \"@@\\377\\240\\240\\244\\377\\200\\300\\300\\377\\300\\200@\\377\\300\\200@\\377\\300\\200\"\n  \"@\\377\\300\\200@\\377\\300\\200@\\377\\340\\240\\200\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\373\\360\\351\\300\\200@\\377\\300\\240@\\377\\377\\373\\360\\377\\300\\300\\300\\377\"\n  \"\\300\\200@\\377\\340\\240\\200\\377\\377\\373\\360\\377\\340\\240\\200\\377\\340`@\\377\\340\"\n  \"@@\\377\\340@@\\377\\340@@\\377\\300`@\\377\\300\\200@\\377\\300\\200@\\377\\300\\200@\\377\"\n  \"\\300\\200@\\377\\300\\200@\\377\\340\\240\\200\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\373\\360\\351\\300\\240@\\377\\340\\240\\200\\377\\377\\377\\377\\377\\300\\334\\300\\377\"\n  \"\\300\\200@\\377\\340\\300\\200\\377\\377\\377\\377\\377\\340\\240\\200\\377\\340@@\\377\\340\"\n  \"`@\\377\\340`@\\377\\340`@\\377\\340`@\\377\\300\\200@\\377\\300\\240@\\377\\300\\240@\\377\"\n  \"\\300\\240@\\377\\300\\200@\\377\\340\\240\\200\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\337\\377\\373\\360\\351\\377\\373\\360\\351\\377\\377\\377\\337\\377\\377\\377\"\n  \"\\337\\377\\373\\360\\351\\377\\373\\360\\351\\377\\373\\360\\377\\300\\334\\300\\377\\200\"\n  \"\\240\\300\\377\\300\\334\\300\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\"\n  \"\\377\\377\\373\\360\\377\\377\\373\\360\\377\\377\\373\\360\\351\\377\\373\\360\\351\\377\"\n  \"\\373\\360\\351\\377\\373\\360\\351\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\"\n  \"\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\337\\377\\373\\360\\377\\300\\334\\300\\377\\240\\300\\300\\377\\300\\334\\300\"\n  \"\\377\\300\\334\\300\\377\\300\\334\\300\\377\\300\\334\\300\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\\377\\373\\360\\377\\377\\373\\360\"\n  \"\\377\\377\\377\\377\\377\\300`\\200\\377\\240\\40@\\377\\240\\40@\\377\\240@@\\377\\377\\373\"\n  \"\\360\\377\\377\\373\\360\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\\377\\373\\360\\377\"\n  \"\\377\\373\\360\\377\\300\\300\\300\\377\\300@\\200\\377\\240\\40@\\377\\240\\40@\\377\\240\"\n  \"\\40@\\377\\377\\373\\360\\377\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\\377\\377\\377\\337\"\n  \"\\377\\377\\377\\377\\300\\200\\200\\377\\240\\0@\\377\\240\\40@\\377\\240\\40@\\377\\240\\40\"\n  \"@\\377\\240\\40@\\377\\377\\373\\360\\377\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\\377\"\n  \"\\373\\360\\377\\340\\240\\300\\377\\300`\\200\\377\\240\\40@\\377\\240\\40@\\377\\240\\40\"\n  \"@\\377\\300`\\200\\377\\300\\200\\200\\377\\377\\373\\360\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\337\\340\\240\\300\\377\\240\\0@\\377\\240\\40@\\377\\240\\40@\\377\\240\\40@\\377\"\n  \"\\240\\40@\\377\\377\\373\\360\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\337\\240\\240\\244\\377`\\40@\\377`\\40@\\377`\\40@\\377`\\40\"\n  \"@\\377`\\40@\\377\\240\\200\\200\\377\\240\\240\\244\\377\\240\\240\\244\\377\\240\\240\\244\"\n  \"\\377\\377\\373\\360\\377\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\337\\240\\240\\244\\377\\40\\0@\\377@\\40@\\377@\\40@\\377@\\40\"\n  \"@\\377@\\40@\\377\\40\\0@\\377\\40\\0@\\377\\40\\0@\\377@\\40@\\377\\377\\373\\360\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\"\n  \"\\300\\334\\300\\377\\300\\240\\300\\377\\300\\240\\300\\377\\300\\240\\300\\377\\300\\240\"\n  \"\\300\\377\\300\\240\\300\\377\\300\\240\\300\\377\\300\\240\\300\\377\\300\\240\\300\\377\"\n  \"\\300\\300\\300\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\"\n  \"\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\"\n  \"\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\"\n  \"\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\337\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\\377\"\n  \"\\377\\377\\377\\377\\377\\377\\377\\337\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\"\n  \"\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\\377\\377\\377\\0\",\n};\n\n"
  },
  {
    "path": "object.cpp",
    "content": "\n#include \"nx.h\"\n#include \"common/llist.h\"\n#include \"object.fdh\"\n\n// deletes the specified object, or well, marks it to be deleted.\n// it's not actually freed till the end of the tick.\nvoid Object::Delete()\n{\nObject * const &o = this;\n\n\tif (o->deleted)\n\t\treturn;\n\t\n\t// make sure no pointers are pointing at us\n\tDisconnectGamePointers();\n\t\n\t// show any damage waiting to be added NOW instead of later\n\tif (o->DamageWaiting > 0)\n\t{\n\t\tDamageText->AddQty(o->DamageWaiting);\n\t\to->DamageWaiting = 0;\n\t}\n\t\n\t// set it's id1 flag, required for some scripts\n\tgame.flags[o->id1] = true;\n\t\n\t// mark it for deletion at end of loop\n\t// (can't delete now as it may invalidate pointers--we don't know where we were called from)\n\to->deleted = true;\n}\n\nvoid Object::Destroy()\n{\nObject * const &o = this;\n\n\t// make sure no pointers are pointing at us\n\tDisconnectGamePointers();\n\t// delete associated floaty text as soon as it's animation is done\n\tDamageText->ObjectDestroyed = true;\n\t\n\t// if any objects are linked to this obj then unlink them\n\tObject *link;\n\tfor(link = firstobject; link; link = link->next)\n\t{\n\t\tif (link->linkedobject == o)\n\t\t\tlink->linkedobject = NULL;\n\t}\n\t\n\t// remove from list and free\n\tLL_REMOVE(o, prev, next, firstobject, lastobject);\n\tLL_REMOVE(o, lower, higher, lowestobject, highestobject);\n\tif (o == player) player = NULL;\n\t\n\tdelete o;\n}\n\n// checks all the games pointers that point to an object\n// record and disconnects them if they are pointing at object o.\n// used in preparation to delete the object.\n// protects against dangling pointers.\nvoid Object::DisconnectGamePointers()\n{\nObject * const &o = this;\n\n\tif (o == player->riding) player->riding = NULL;\n\tif (o == player->lastriding) player->lastriding = NULL;\n\tif (o == player->cannotride) player->cannotride = NULL;\n\tif (o == game.bossbar.object) game.bossbar.object = NULL;\t// any enemy with a boss bar\n\tif (o == game.stageboss.object) game.stageboss.object = NULL;\t// the stage boss\n\tif (o == map.focus.target) map.focus.target = NULL;\n\tif (o == ID2Lookup[this->id2]) ID2Lookup[this->id2] = NULL;\n\tif (o == map.waterlevelobject) map.waterlevelobject = NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Object::SetType(int type)\n{\nObject * const &o = this;\n\n\to->type = type;\n\to->sprite = objprop[type].sprite;\n\to->hp = objprop[type].initial_hp;\n\to->damage = objprop[o->type].damage;\n\to->frame = 0;\n\t\n\t// apply nxflags to new object type!\n\t// (did this so toroko would handle slopes properly in Gard cutscene)\n\to->nxflags = objprop[type].defaultnxflags;\n\t\n\t// apply defaultflags to new object type, but NOT ALL defaultflags.\n\t// otherwise <CNP's _WILL_ get messed up.\n\tconst static int flags_to_keep = \\\n\t\t(FLAG_SCRIPTONTOUCH | FLAG_SCRIPTONDEATH | FLAG_SCRIPTONACTIVATE | \\\n\t\t FLAG_APPEAR_ON_FLAGID | FLAG_DISAPPEAR_ON_FLAGID | \\\n\t\t FLAG_FACES_RIGHT);\n\t\n\tuint32_t keep = (o->flags & flags_to_keep);\n\to->flags = (objprop[type].defaultflags & ~flags_to_keep) | keep;\n\t\n\t//stat(\"new flags: %04x\", o->flags);\n\t\n\t// setup default clipping extents, in case object turns on clip_enable\n\tif (!o->clip_enable)\n\t\to->ResetClip();\n}\n\nvoid Object::ChangeType(int type)\n{\nObject * const &o = this;\n\n\tint oldsprite = o->sprite;\n\t\n\to->state = 0;\n\to->substate = 0;\n\to->frame = 0;\n\to->timer = 0;\n\to->timer2 = 0;\n\to->animtimer = 0;\n\t\n\tSetType(type);\n\t\n\t// adjust position so spawn points of old object and new object line up\n\to->x >>= CSF; o->x <<= CSF;\n\to->y >>= CSF; o->y <<= CSF;\n\to->x += (sprites[oldsprite].spawn_point.x << CSF);\n\to->y += (sprites[oldsprite].spawn_point.y << CSF);\n\to->x -= (sprites[this->sprite].spawn_point.x << CSF);\n\to->y -= (sprites[this->sprite].spawn_point.y << CSF);\n\t\n\t// added this for when you pick up the puppy in the Deserted House in SZ--\n\t// makes objects <CNPed during a <PRI initialize immediately instead of waiting\n\t// for <PRI to be released.\n\tif (game.frozen)\n\t{\n\t\tOnTick();\n\t\tOnAftermove();\n\t}\n\t\n\t// Sprites appearing out of an OBJ_NULL should generally go to the top of the z-order.\n\t// this was originally added so that the Doctor would appear in front of the core\n\t// when he teleports in at end of Almond battle (it's since been used in a lot of\n\t// other places though).\n\tif (oldsprite == SPR_NULL)\n\t{\n\t\tBringToFront();\n\t}\n\t\n\tOnSpawn();\n}\n\n// moves an object to the top of the Z-order,\n// so that it is drawn in front of all other objects.\nvoid Object::BringToFront()\n{\n\tLL_REMOVE(this, lower, higher, lowestobject, highestobject);\n\tLL_ADD_END(this, lower, higher, lowestobject, highestobject);\n}\n\n// move an object in the z-order to just below object \"behind\".\nvoid Object::PushBehind(Object *behind)\n{\n\tif (behind == this)\n\t\treturn;\n\t\n\tLL_REMOVE(this, lower, higher, lowestobject, highestobject);\n\tLL_INSERT_BEFORE(this, behind, lower, higher, lowestobject, highestobject);\n}\n\nvoid Object::PushBehind(int objtype)\n{\n\tObject *target = Objects::FindByType(objtype);\n\tif (target)\n\t\tPushBehind(target);\n\telse\n\t\tstaterr(\"PushBehind: could not find any objects of type %s\", DescribeObjectType(objtype));\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// for each point in pointlist, treats the point as a CSF'ed offset\n// within the object's sprite. Then checks the attributes of the tile\n// under each point. Returns an attribute mask containing the cumulative\n// attributes of all the tiles under each point in the list.\n//\n// if tile is non-null, it is set to the tile type of the last tile checked.\nuint32_t Object::GetAttributes(const Point *pointlist, int npoints, int *tile)\n{\nint tileno = 0;\nuint32_t attr = 0;\n\n\tint xoff = (this->x >> CSF);\n\tint yoff = (this->y >> CSF);\n\t\n\tfor(int i=0;i<npoints;i++)\n\t{\n\t\tint x = (xoff + pointlist[i].x) / TILE_W;\n\t\tint y = (yoff + pointlist[i].y) / TILE_H;\n\t\t\n\t\tif (x >= 0 && y >= 0 && x < map.xsize && y < map.ysize)\n\t\t{\n\t\t\ttileno = map.tiles[x][y];\n\t\t\tattr |= tileattr[tileno];\n\t\t}\n\t}\n\t\n\t// also go underwater if we go under the variable waterlevel in Almond\n\tif (map.waterlevelobject && (this->y + (2<<CSF)) > map.waterlevelobject->y)\n\t{\n\t\tattr |= TA_WATER;\n\t}\n\t\n\tif (tile) *tile = tileno;\n\treturn attr;\n}\n\n// for each point in pointlist, treats the point as a CSF'ed offset\n// within the object's sprite. The tile under each position is checked\n// to see if it's attributes contain one or more of the attributes\n// specified in attrmask.\n//\n// If any of the points match, returns 1, and optionally returns\n// the map coordinates of the first matched tile in tile_x/y.\nbool Object::CheckAttribute(const Point *pointlist, int npoints, uint32_t attrmask,\n\t\t\t\t\t\t\tint *tile_x, int *tile_y)\n{\nint x, y, xoff, yoff;\n\n\txoff = (this->x >> CSF);\n\tyoff = (this->y >> CSF);\n\t\n\tfor(int i=0;i<npoints;i++)\n\t{\n\t\tx = (xoff + pointlist[i].x) / TILE_W;\n\t\ty = (yoff + pointlist[i].y) / TILE_H;\n\t\t\n\t\tif (x >= 0 && y >= 0 && x < map.xsize && y < map.ysize)\n\t\t{\n\t\t\tif ((tileattr[map.tiles[x][y]] & attrmask) != 0)\n\t\t\t{\n\t\t\t\tif (tile_x) *tile_x = x;\n\t\t\t\tif (tile_y) *tile_y = y;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn false;\n}\n\n// treats each point in pointlist as an offset within the object, and returns\n// true if any of the points intersect with object o2's solidbox.\nbool Object::CheckSolidIntersect(Object *other, const Point *pointlist, int npoints)\n{\nint x, y;\nint ox, oy, o2x, o2y;\nSIFSprite *s2 = other->Sprite();\n\t\n\tox = (this->x >> CSF);\n\toy = (this->y >> CSF);\n\to2x = (other->x >> CSF);\n\to2y = (other->y >> CSF);\n\t\n\tfor(int i=0;i<npoints;i++)\n\t{\n\t\tx = ox + pointlist[i].x;\n\t\ty = oy + pointlist[i].y;\n\t\t\n\t\tif (x >= (o2x + s2->solidbox.x1) && x <= (o2x + s2->solidbox.x2))\n\t\t{\n\t\t\tif (y >= (o2y + s2->solidbox.y1) && y <= (o2y + s2->solidbox.y2))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn false;\n}\n\n\n// update the blocked states of object o.\n// updatemask specifies which states are in need of updating.\nvoid Object::UpdateBlockStates(uint8_t updatemask)\n{\nObject * const &o = this;\nSIFSprite *sprite = Sprite();\nint mask = GetBlockingType();\n\n\tif (updatemask & LEFTMASK)\n\t{\n\t\to->blockl = CheckAttribute(&sprite->block_l, mask);\n\t\t\n\t\t// for objects which don't follow slope, have them see the slope as a wall so they\n\t\t// won't just go right through it (looks really weird)\n\t\tif (!(o->nxflags & NXFLAG_FOLLOW_SLOPE))\n\t\t{\n\t\t\tif (!o->blockl)\n\t\t\t\to->blockl = IsSlopeAtPointList(o, &sprite->block_l);\n\t\t}\n\t}\n\t\n\tif (updatemask & RIGHTMASK)\n\t{\n\t\to->blockr = CheckAttribute(&sprite->block_r, mask);\n\t\t\n\t\t// for objects which don't follow slope, have them see the slope as a wall so they\n\t\t// won't just go right through it (looks really weird).\n\t\tif (!(o->nxflags & NXFLAG_FOLLOW_SLOPE))\n\t\t{\n\t\t\tif (!o->blockr)\n\t\t\t\to->blockr = IsSlopeAtPointList(o, &sprite->block_r);\n\t\t}\n\t}\n\t\n\tif (updatemask & UPMASK)\n\t{\n\t\to->blocku = CheckAttribute(&sprite->block_u, mask);\n\t\tif (!o->blocku) o->blocku = CheckBoppedHeadOnSlope(o) ? 1 : 0;\n\t}\n\t\n\tif (updatemask & DOWNMASK)\n\t{\n\t\to->blockd = CheckAttribute(&sprite->block_d, mask);\n\t\tif (!o->blockd) o->blockd = CheckStandOnSlope(o) ? 1 : 0;\n\t}\n\t\n\t// have player be blocked by objects with FLAG_SOLID_BRICK set\n\tif (o == player)\n\t\to->SetBlockForSolidBrick(updatemask);\n}\n\n// called from UpdateBlockedStates used w/ player.\n// sets the object's block/l/r/u/d flags if it is in contact with a SOLID_BRICK object.\nvoid Object::SetBlockForSolidBrick(uint8_t updatemask)\n{\nSIFSprite *thissprite = this->Sprite();\nObject *o;\n\n\t// no need to check blockpoints that are already set\n\tif (this->blockl) updatemask &= ~LEFTMASK;\n\tif (this->blockr) updatemask &= ~RIGHTMASK;\n\tif (this->blocku) updatemask &= ~UPMASK;\n\tif (this->blockd) updatemask &= ~DOWNMASK;\n\t\n\tFOREACH_OBJECT(o)\n\t{\n\t\tif (!(o->flags & FLAG_SOLID_BRICK)) continue;\n\t\t\n\t\tif (updatemask & LEFTMASK)\n\t\t{\n\t\t\tif (this->CheckSolidIntersect(o, &thissprite->block_l))\n\t\t\t{\n\t\t\t\tthis->blockl = BLOCKED_OBJECT;\t// value of 2 instead of 1\n\t\t\t\tupdatemask &= ~LEFTMASK;\t\t// no need to keep checking\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (updatemask & RIGHTMASK)\n\t\t{\n\t\t\tif (this->CheckSolidIntersect(o, &thissprite->block_r))\n\t\t\t{\n\t\t\t\tthis->blockr = BLOCKED_OBJECT;\n\t\t\t\tupdatemask &= ~RIGHTMASK;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (updatemask & UPMASK)\n\t\t{\n\t\t\tif (this->CheckSolidIntersect(o, &thissprite->block_u))\n\t\t\t{\n\t\t\t\tthis->blocku = BLOCKED_OBJECT;\n\t\t\t\tupdatemask &= ~UPMASK;\n\t\t\t\t\n\t\t\t\tif (this == player)\n\t\t\t\t\tplayer->bopped_object = o;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (updatemask & DOWNMASK)\n\t\t{\n\t\t\tif (this->CheckSolidIntersect(o, &thissprite->block_d))\n\t\t\t{\n\t\t\t\tthis->blockd = BLOCKED_OBJECT;\n\t\t\t\tupdatemask &= ~DOWNMASK;\n\t\t\t\t\n\t\t\t\tif (this == player)\n\t\t\t\t\tplayer->riding = o;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// given an object, returns which tile attribute affects it's blocked state.\nint Object::GetBlockingType()\n{\nObject * const &o = this;\n\n\tif (o == player)\n\t\treturn TA_SOLID_PLAYER;\n\t\n\tif (o->type >= OBJ_SHOTS_START && \\\n\t\to->type <= OBJ_SHOTS_END)\n\t{\n\t\t// Bubbler L1 can't pass tile 44.\n\t\tif (o->type == OBJ_BUBBLER12_SHOT && o->shot.level == 0)\n\t\t\treturn (TA_SOLID_SHOT | TA_SOLID_NPC);\n\t\t\n\t\treturn TA_SOLID_SHOT;\n\t}\n\t\n\tif (o->flags & FLAG_IGNORETILE44)\n\t\treturn TA_SOLID_PLAYER;\n\t\n\treturn TA_SOLID_NPC;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// tries to move the object in the X direction by the given amount.\n// returns nonzero if the object was blocked.\nbool Object::apply_xinertia(int inertia)\n{\nObject * const &o = this;\n\n\tif (inertia == 0)\n\t\treturn 0;\n\t\n\tif (o->flags & FLAG_IGNORE_SOLID)\n\t{\n\t\to->x += inertia;\n\t\treturn 0;\n\t}\n\t\n\t// only apply inertia one pixel at a time so we have\n\t// proper hit detection--prevents objects traveling at\n\t// high speed from becoming embedded in walls\n\tif (inertia > 0)\n\t{\n\t\twhile(inertia > (1<<CSF))\n\t\t{\n\t\t\tif (movehandleslope(o, (1<<CSF))) return 1;\n\t\t\tinertia -= (1<<CSF);\n\t\t\t\n\t\t\to->UpdateBlockStates(RIGHTMASK);\n\t\t}\n\t}\n\telse if (inertia < 0)\n\t{\n\t\twhile(inertia < -(1<<CSF))\n\t\t{\n\t\t\tif (movehandleslope(o, -(1<<CSF))) return 1;\n\t\t\tinertia += (1<<CSF);\n\t\t\t\n\t\t\to->UpdateBlockStates(LEFTMASK);\n\t\t}\n\t}\n\t\n\t// apply any remaining inertia\n\tif (inertia)\n\t\tmovehandleslope(o, inertia);\n\t\n\treturn 0;\n}\n\n// tries to move the object in the Y direction by the given amount.\n// returns nonzero if the object was blocked.\nbool Object::apply_yinertia(int inertia)\n{\nObject * const &o = this;\n\n\tif (inertia == 0)\n\t\treturn 0;\n\t\n\tif (o->flags & FLAG_IGNORE_SOLID)\n\t{\n\t\to->y += inertia;\n\t\treturn 0;\n\t}\n\t\n\t// only apply inertia one pixel at a time so we have\n\t// proper hit detection--prevents objects traveling at\n\t// high speed from becoming embedded in walls\n\tif (inertia > 0)\n\t{\n\t\tif (o->blockd) return 1;\n\t\t\n\t\twhile(inertia > (1<<CSF))\n\t\t{\n\t\t\to->y += (1<<CSF);\n\t\t\tinertia -= (1<<CSF);\n\t\t\t\n\t\t\to->UpdateBlockStates(DOWNMASK);\n\t\t\tif (o->blockd) return 1;\n\t\t}\n\t}\n\telse if (inertia < 0)\n\t{\n\t\tif (o->blocku) return 1;\n\t\t\n\t\twhile(inertia < -(1<<CSF))\n\t\t{\n\t\t\to->y -= (1<<CSF);\n\t\t\tinertia += (1<<CSF);\n\t\t\t\n\t\t\to->UpdateBlockStates(UPMASK);\n\t\t\tif (o->blocku) return 1;\n\t\t}\n\t}\n\t\n\t// apply any remaining inertia\n\tif (inertia)\n\t\to->y += inertia;\n\t\n\treturn 0;\n}\n\n\n// handles a moving object with \"FLAG_SOLID_BRICK\" set\n// pushing the player as it moves.\nvoid Object::PushPlayerOutOfWay(int xinertia, int yinertia)\n{\nObject * const &o = this;\n\n\tif (xinertia)\n\t{\n\t\t// give a bit of a gap where they must be--i.e. don't push them if they're right\n\t\t// at the top or the bottom of the brick: needed when he rides it and falls off, then it\n\t\t// turns around and touches him again. in that case what we actually want to do is push him\n\t\t// to the top, not push him side-to-side.\n\t\tif ((player->SolidBottom() - (2<<CSF)) > o->SolidTop() &&\\\n\t\t\t(player->SolidTop() + (2<<CSF)) < o->SolidBottom())\n\t\t{\n\t\t\tif (xinertia > 0 && player->SolidRight() > o->SolidRight() && solidhitdetect(o, player))\n\t\t\t{\t// pushing player right\n\t\t\t\tif (player->blockr)\n\t\t\t\t{\t// squish!\n\t\t\t\t\thurtplayer(o->smushdamage);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// align player's blockl grid with our right side\n\t\t\t\t\tplayer->x = o->SolidRight() - (sprites[player->sprite].block_l[0].x << CSF);\n\t\t\t\t\t\n\t\t\t\t\t// get player a xinertia equal to our own. You can see this\n\t\t\t\t\t// with the moving blocks in Labyrinth H.\n\t\t\t\t\tplayer->xinertia = xinertia;\n\t\t\t\t\tplayer->x += -player->xinertia;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (xinertia < 0 && player->SolidLeft() < o->SolidLeft() && solidhitdetect(o, player))\n\t\t\t{\t// pushing player left\n\t\t\t\tif (player->blockl)\n\t\t\t\t{\t// squish!\n\t\t\t\t\thurtplayer(o->smushdamage);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// align player's blockr grid with our left side\n\t\t\t\t\tplayer->x = o->SolidLeft() - (sprites[player->sprite].block_r[0].x << CSF);\n\t\t\t\t\t\n\t\t\t\t\t// get player a xinertia equal to our own. You can see this\n\t\t\t\t\t// with the moving blocks in Labyrinth H.\n\t\t\t\t\tplayer->xinertia = xinertia;\n\t\t\t\t\tplayer->x += -player->xinertia;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (yinertia < 0)\n\t{\n\t\tif (player->blocku && player->riding == o)\t// smushed into ceiling!\n\t\t\thurtplayer(o->smushdamage);\n\t}\n\telse if (yinertia > 0)\t// object heading downwards?\n\t{\n\t\t// player riding object down\n\t\tif (player->riding == o)\n\t\t{\n\t\t\tif (player->yinertia >= 0)\t\t// don't do this if he's trying to jump away\n\t\t\t{\n\t\t\t\t// align player's blockd grid with our top side so player\n\t\t\t\t// doesn't perpetually fall.\n\t\t\t\tplayer->y = o->SolidTop() - (sprites[player->sprite].block_d[0].y << CSF);\n\t\t\t}\n\t\t}\n\t\telse if (player->Top() >= o->CenterY() && solidhitdetect(o, player))\t// underneath object\n\t\t{\n\t\t\t// push him down if he's underneath us and we're going faster than he is.\n\t\t\tif (yinertia >= player->yinertia)\n\t\t\t{\n\t\t\t\tif (player->blockd)\t\t// squished into floor!\n\t\t\t\t\thurtplayer(o->smushdamage);\n\t\t\t\t\n\t\t\t\t// align his blocku grid with our bottom side\n\t\t\t\tplayer->y = o->SolidBottom() - (sprites[player->sprite].block_u[0].y << CSF);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// snap the object down to the nearest solid tile.\n// the object must have at least one blockd point for this to work.\nvoid Object::SnapToGround()\n{\nObject * const &o = this;\n\n\tuint32_t flags = o->flags;\n\to->flags &= ~FLAG_IGNORE_SOLID;\n\t\n\tUpdateBlockStates(DOWNMASK);\n\tapply_yinertia(SCREEN_HEIGHT << CSF);\n\t\n\to->flags = flags;\n\to->blockd = true;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// deals the specified amount of damage to the object,\n// and kills it if it's hitpoints reach 0.\n//\n// It is valid to deal 0 damage. The trails of the Spur do this\n// to keep the enemy shaking and making noise for as long as\n// it's in the beam.\n//\n// shot is an optional parameter specifying a pointer to\n// the shot that hit the object, and is used to spawn\n// blood spatter at the correct location.\nvoid Object::DealDamage(int dmg, Object *shot)\n{\nObject * const &o = this;\n\n\tif (o->flags & FLAG_INVULNERABLE)\n\t\treturn;\n\t\n\to->hp -= dmg;\n\t\n\tif (o->flags & FLAG_SHOW_FLOATTEXT)\n\t\to->DamageWaiting += dmg;\n\t\n\tif (o->hp > 0)\n\t{\n\t\tif (o->shaketime < objprop[o->type].shaketime - 2)\n\t\t{\n\t\t\to->shaketime = objprop[o->type].shaketime;\n\t\t\t\n\t\t\tif (objprop[o->type].hurt_sound)\n\t\t\t\tsound(objprop[o->type].hurt_sound);\n\t\t\t\n\t\t\tif (shot)\n\t\t\t\teffect(shot->CenterX(), shot->CenterY(), EFFECT_BLOODSPLATTER);\n\t\t}\n\t}\n\telse\n\t{\n\t\to->Kill();\n\t}\n}\n\n// kills the specified object, performing whatever action is\n// applicable to that, such as spawning powerups or running scripts.\nvoid Object::Kill()\n{\nObject * const &o = this;\n\n\to->hp = 0;\n\to->flags &= ~FLAG_SHOOTABLE;\n\t\n\t// auto disappear the bossbar if we have just killed a boss\n\tif (o == game.bossbar.object)\n\t\tgame.bossbar.defeated = true;\n\t\n\t// if a script is set to run on death, run it instead of the usual explosion\n\tif (o->flags & FLAG_SCRIPTONDEATH)\n\t{\n\t\to->OnDeath();\n\t\tStartScript(o->id2);\n\t}\n\telse\n\t{\n\t\t// should spawn the smokeclouds first, for z-order reasons\n\t\tSmokeClouds(o, objprop[o->type].death_smoke_amt, 8, 8);\n\t\teffect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH);\n\t\t\n\t\tif (objprop[o->type].death_sound)\n\t\t\tsound(objprop[o->type].death_sound);\n\t\t\n\t\tif (objprop[o->type].ai_routines.ondeath)\n\t\t{\n\t\t\to->OnDeath();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSpawnPowerups();\n\t\t\to->Delete();\n\t\t}\n\t}\n}\n\n\n// spawn the powerups you get when you kill an enemy\nvoid Object::SpawnPowerups()\n{\nObject * const &o = this;\nint objectType, bonusType;\n\n\tif (!objprop[o->type].xponkill)\n\t\treturn;\n\t\n\tbonusType = random(1, 5);\n\tif (bonusType >= 3)\n\t{\n\t\tSpawnXP(objprop[o->type].xponkill);\n\t\treturn;\n\t}\n\t\n\tif (bonusType == 2 && \\\n\t\t(player->weapons[WPN_MISSILE].hasWeapon || \\\n\t\t player->weapons[WPN_SUPER_MISSILE].hasWeapon))\n\t{\n\t\tobjectType = OBJ_MISSILE;\n\t}\n\telse\n\t{\n\t\tobjectType = OBJ_HEART;\n\t}\n\t\n\t// upgrade to big 3-cluster versions of powerups\n\t// for big enemies.\n\tif (objprop[o->type].xponkill > 6)\n\t{\n\t\tif (objectType == OBJ_HEART)\n\t\t{\n\t\t\tobjectType = OBJ_HEART3;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tobjectType = OBJ_MISSILE3;\n\t\t}\n\t}\n\t\n\t// create the powerup\n\tObject *powerup = CreateObject(o->CenterX(), o->CenterY(), objectType);\n\tpowerup->x -= (powerup->Width() / 2);\n\tpowerup->y -= (powerup->Height() / 2);\n\t\n\tpowerup->state = 1;\t\t\t// make it animate\n}\n\n\n// spawn the given quantity of XP at the center of the object.\n// amt indicates the total number of XP points to spawn.\n// these will be collated into the appropriate sizes of XP triangles.\nvoid Object::SpawnXP(int amt)\n{\nObject * const &o = this;\n\n\tint x = o->CenterX();\n\tint y = o->CenterY();\n\t\n\twhile(amt > 0)\n\t{\n\t\tObject *xp = CreateObject(x, y, OBJ_XP);\n\t\txp->xinertia = random(-0x200, 0x200);\n\t\t\n\t\tif (amt >= XP_LARGE_AMT)\n\t\t{\n\t\t\txp->sprite = SPR_XP_LARGE;\n\t\t\tamt -= XP_LARGE_AMT;\n\t\t}\n\t\telse if (amt >= XP_MED_AMT)\n\t\t{\n\t\t\txp->sprite = SPR_XP_MED;\n\t\t\tamt -= XP_MED_AMT;\n\t\t}\n\t\telse\n\t\t{\n\t\t\txp->sprite = SPR_XP_SMALL;\n\t\t\tamt -= XP_SMALL_AMT;\n\t\t}\n\t\t\n\t\t// center the sprite at the center of the object\n\t\txp->x -= (xp->Width() / 2);\n\t\txp->y -= (xp->Height() / 2);\n\t\t\n\t\txp->UpdateBlockStates(ALLDIRMASK);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Object::RunAI()\n{\nObject * const &o = this;\n\n\to->OnTick();\n\t\n\t// trigger touch-activated scripts.\n\t// it actually only triggers once his centerline touches the object.\n\t// see the passageway between the Throne Room and Kings Table for a\n\t// clear example of the correct coordinates.\n\tif (o->flags & FLAG_SCRIPTONTOUCH)\n\t{\n\t\tif (pdistlx(8<<CSF))\n\t\t{\n\t\t\tint y = player->y + (6 << CSF);\n\t\t\t\n\t\t\t// player->riding check is for fans in Final Cave\n\t\t\tif ((y > o->Top() && y < o->Bottom()) || player->riding == o)\n\t\t\t{\n\t\t\t\tif (GetCurrentScript() == -1 &&\t\t// no override other scripts\n\t\t\t\t\tgame.switchstage.mapno == -1)\t// no repeat exec after <TRA\n\t\t\t\t{\n\t\t\t\t\tstat(\"On-touch script %d triggered\", o->id2);\n\t\t\t\t\tStartScript(o->id2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n// deals contact damage to player of o->damage, if applicable.\nvoid Object::DealContactDamage()\n{\nObject * const &o = this;\n\n\t// no contact damage to player while scripts running\n\tif (GetCurrentScript() != -1 || player->inputs_locked)\n\t\treturn;\n\t\n\tif (!(o->flags & FLAG_NOREARTOPATTACK))\n\t{\n\t\thurtplayer(o->damage);\n\t\treturn;\n\t}\n\t\n\t// else, the no rear/top attack flag is set, so only\n\t// frontal or bottom contact are harmful to the player\n\tswitch(o->GetAttackDirection())\n\t{\n\t\tcase -1:\t// head-on\n\t\t\thurtplayer(o->damage);\n\t\tbreak;\n\t\t\n\t\tcase LEFT:\t// rear attack, p to left\n\t\t\tif (player->xinertia > -0x100)\n\t\t\t\tplayer->xinertia = -0x100;\n\t\tbreak;\n\t\t\n\t\tcase RIGHT:\t// rear attack, p to right\n\t\t\tif (player->xinertia < 0x100)\n\t\t\t\tplayer->xinertia = 0x100;\n\t\tbreak;\n\t}\n}\n\n// subfunction of HandleContactDamage. On entry, we assume that the player\n// is in contact with this object, and that the object is trying to deal\n// damage to him.\n// returns the type of attack:\n//\t- UP\ta top attack (player hit top of object)\n//\t- LEFT\trear attack, player to left\n//\t- RIGHT\trear attack, player to right\n//\t- -1\thead-on or bottom attack\nint Object::GetAttackDirection()\n{\nObject * const &o = this;\nconst int VARIANCE = (5 << CSF);\n\n\tif (player->riding == o)\n\t\treturn UP;\n\t\n\tif (player->Bottom() <= (o->Top() + VARIANCE))\n\t\treturn UP;\n\t\n\t// (added for X treads) if the object is moving, then the \"front\"\n\t// for purposes of this flag is the direction it's moving in.\n\t// if it's still, the \"front\" is the actual direction it's facing.\n\tint rtdir = o->dir;\n\tif (o->xinertia > 0) rtdir = RIGHT;\n\tif (o->xinertia < 0) rtdir = LEFT;\n\t\n\tif (rtdir == RIGHT)\n\t{\n\t\tif (player->Right() <= (o->Left() + VARIANCE))\n\t\t\treturn RIGHT;\n\t}\n\telse if (rtdir == LEFT)\t\t// the double check makes sense, what if o->dir was UP or DOWN\n\t{\n\t\tif (player->Left() >= (o->Right() - VARIANCE))\n\t\t\treturn LEFT;\n\t}\n\t\n\treturn -1;\n}\n\nvoid Object::MoveAtDir(int dir, int speed)\n{\n\tthis->xinertia = 0;\n\tthis->yinertia = 0;\n\t\n\tswitch(dir)\n\t{\n\t\tcase LEFT:  this->xinertia = -speed; break;\n\t\tcase RIGHT: this->xinertia = speed; break;\n\t\tcase UP:\tthis->yinertia = -speed; break;\n\t\tcase DOWN:  this->yinertia = speed; break;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// animate over a list of frames, where the frames need not be consecutive.\n// every speed ticks we will display a new frame from framelist.\n// this function requires initilization of animframe and animtimer.\nvoid Object::animate_seq(int speed, const int *framelist, int nframes)\n{\nObject * const &o = this;\n\n\tif (++o->animtimer > speed)\n\t{\n\t\to->animtimer = 0;\n\t\to->animframe++;\n\t}\n\t\n\tif (o->animframe >= nframes)\n\t\to->animframe = 0;\n\t\n\to->frame = framelist[o->animframe];\n}\n\n// used by objects in Maze M, this hints to curly's AI that the object is attacking.\nvoid Object::CurlyTargetHere(int mintime, int maxtime)\n{\nObject * const &o = this;\n\n\tgame.curlytarget.x = o->CenterX();\n\tgame.curlytarget.y = o->CenterY();\n\tgame.curlytarget.timeleft = random(mintime, maxtime);\n}\n\n// reset the objects clip-extent fields (tp effects etc) to their defaults.\n// i.e. such that if clip_enable were to be turned on it would have no immediate effect.\nvoid Object::ResetClip()\n{\nObject * const &o = this;\n\n\to->clipx1 = o->clipy1 = 0;\n\to->clipx2 = sprites[o->sprite].w;\n\to->clipy2 = sprites[o->sprite].h;\n}\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Object::OnTick()\n{\n\tif (objprop[this->type].ai_routines.ontick)\n\t\t(*objprop[this->type].ai_routines.ontick)(this);\n}\n\nvoid Object::OnAftermove()\n{\n\tif (objprop[this->type].ai_routines.aftermove)\n\t\t(*objprop[this->type].ai_routines.aftermove)(this);\n}\n\nvoid Object::OnSpawn()\n{\n\tif (objprop[this->type].ai_routines.onspawn)\n\t\t(*objprop[this->type].ai_routines.onspawn)(this);\n}\n\nvoid Object::OnDeath()\n{\n\tif (objprop[this->type].ai_routines.ondeath)\n\t\t(*objprop[this->type].ai_routines.ondeath)(this);\n}\n\n\n"
  },
  {
    "path": "object.fdh",
    "content": "//hash:65781cc6\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nbool solidhitdetect(Object *o1, Object *o2);\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in slope.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nbool IsSlopeAtPointList(Object *o, SIFPointList *points);\nint CheckBoppedHeadOnSlope(Object *o);\nint CheckStandOnSlope(Object *o);\nbool movehandleslope(Object *o, int xinertia);\n\n\n/* located in player.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nvoid hurtplayer(int damage);\n\n\n/* located in tsc.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nScriptInstance *StartScript(int scriptno, int pageno);\nint GetCurrentScript(void);\n\n\n/* located in debug.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nconst char *DescribeObjectType(int type);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//--------------------[referenced from object.cpp]-------------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "object.h",
    "content": "\n#ifndef _OBJECT_H\n#define _OBJECT_H\n\n// used in SpawnXP\n#define XP_SMALL_AMT\t\t\t1\n#define XP_MED_AMT\t\t\t\t5\n#define XP_LARGE_AMT\t\t\t20\n\nclass Object\n{\npublic:\n\tvirtual ~Object() { }\t\t// REQUIRED for subclasses (e.g. Player)\n\t\n\tvoid SetType(int type);\n\tvoid ChangeType(int type);\n\tvoid BringToFront();\n\tvoid PushBehind(Object *behind);\n\tvoid PushBehind(int objtype);\n\t\n\t// --------------------------------------- hit detection w/ map\n\t\n\tuint32_t GetAttributes(const Point *pointlist, int npoints, int *tile = NULL);\n\t\n\tbool CheckAttribute(const Point *pointlist, int npoints, uint32_t attrmask, \\\n\t\t\t\t\t\tint *tile_x = NULL, int *tile_y = NULL);\n\t\n\tbool CheckSolidIntersect(Object *other, const Point *pointlist, int npoints);\n\t\n\t// --------------------------------------- overridden convenience versions of above\n\t\n\tbool CheckAttribute(SIFPointList *points, uint32_t attrmask, int *tile_x = NULL, int *tile_y = NULL)\n\t{\n\t\treturn CheckAttribute(&points->point[0], points->count, attrmask, tile_x, tile_y);\n\t}\n\t\n\tuint32_t GetAttributes(SIFPointList *points, int *tile = NULL)\n\t{\n\t\treturn GetAttributes(&points->point[0], points->count, tile);\n\t}\n\t\n\tbool CheckSolidIntersect(Object *other, SIFPointList *points)\n\t{\n\t\treturn CheckSolidIntersect(other, &points->point[0], points->count);\n\t}\n\t\n\t// ---------------------------------------\n\t\n\tvoid UpdateBlockStates(uint8_t updatemask);\n\tvoid SetBlockForSolidBrick(uint8_t updatemask);\n\tint GetBlockingType();\n\t\n\t// ---------------------------------------\n\t\n\tbool apply_xinertia(int inertia);\n\tbool apply_yinertia(int inertia);\n\tvoid PushPlayerOutOfWay(int xinertia, int yinertia);\n\tvoid SnapToGround();\n\t\n\t// ---------------------------------------\n\t\n\tvoid DealDamage(int dmg, Object *shot = NULL);\n\tvoid Kill();\n\tvoid SpawnPowerups();\n\tvoid SpawnXP(int amt);\n\t\n\t// ---------------------------------------\n\t\n\tvoid RunAI();\n\tvoid DealContactDamage();\n\tint GetAttackDirection();\n\t\n\tvoid OnTick();\n\tvoid OnAftermove();\n\tvoid OnSpawn();\n\tvoid OnDeath();\n\t\n\t// ---------------------------------------\n\t\n\tvoid animate_seq(int speed, const int *framelist, int nframes);\n\tvoid CurlyTargetHere(int mintime = 80, int maxtime = 100);\n\tvoid ResetClip();\n\tvoid MoveAtDir(int dir, int speed);\n\t\n\t// ---------------------------------------\n\t\n\tvoid Delete();\t\t\t// mark for deletion at end of frame\n\tvoid Destroy();\t\t\t// delete immediately\n\tvoid DisconnectGamePointers();\n\t\n\t// ---------------------------------------\n\t\n\tint Width();\n\tint Height();\n\t\n\tint BBoxWidth();\n\tint BBoxHeight();\n\t\n\tint CenterX();\n\tint CenterY();\n\t\n\tint Left();\n\tint Right();\n\tint Top();\n\tint Bottom();\n\t\n\tint SolidLeft();\n\tint SolidRight();\n\tint SolidTop();\n\tint SolidBottom();\n\t\n\tint ActionPointX();\n\tint ActionPointY();\n\tint ActionPoint2X();\n\tint ActionPoint2Y();\n\tint DrawPointX();\n\tint DrawPointY();\n\t\n\tSIFSprite *Sprite();\n\t\n\t// ---------------------------------------\n\t\n\tint type;\t\t\t\t\t\t\t\t// object's type\n\tint sprite;\t\t\t\t\t\t\t\t// sprite # to use with object\n\tint frame;\t\t\t\t\t\t\t\t// frame of sprite to display\n\t\n\tint x, y;\n\tint xinertia, yinertia;\n\tuint8_t dir;\n\t\n\tint hp;\t\t\t\t\t\t\t\t\t// remaining health\n\tint damage;\t\t\t\t\t\t\t\t// if != 0 does this much damage to player on touch\n\tint state;\t\t\t\t\t\t\t\t// AI state\n\tint substate;\t\t\t\t\t\t\t// state of current \"common/shared\" AI routine\n\tint dirparam;\t\t\t\t\t\t\t// for ANP's that use the dir as an extra parameter: see tsc.cpp: SetCSDir\n\t\n\t// if the object has FLAG_SOLID_BRICK set, this is how much damage it does to the\n\t// player if it runs him into a wall or the ceiling/floor.\n\tint smushdamage;\n\t\n\t// for enemies' \"shaking\" effect when hurt\n\tint shaketime;\n\tint display_xoff;\n\t\n\t// rising damage points\n\tFloatText *DamageText;\n\t// tracks amount of damage dealt quickly, while the objects is still shaking from\n\t// previous shots. displaying this damage is postponed until the enemy stops shaking.\n\tint DamageWaiting;\n\t\n\t// for teleportation and other effects\n\tbool clip_enable;\n\tint clipx1, clipx2;\n\tint clipy1, clipy2;\n\t\n\t// for use by AI\n\tint timer, timer2, timer3;\n\tint animtimer;\n\tint animframe;\n\tint blinktimer;\n\tint xmark, ymark;\n\tint xmark2, ymark2;\n\tuint8_t angle, angleoffset;\t\t\t\t// used for a few such as skullstep\n\tint speed;\n\tint savedhp;\n\t\n\tuint32_t flags;\t\t\t\t\t\t\t// NPC flags (from .pxe)\n\tuint32_t nxflags;\t\t\t\t\t\t// NXEngine-specific flags\n\tuint16_t id1, id2;\t\t\t\t\t\t// object identifiers (from .pxe)\n\t\n\tbool onscreen;\t\t\t\t\t\t\t// true if currently onscreen (lags 1 frame behind)\n\tbool invisible;\t\t\t\t\t\t\t// if true the object will NOT be rendered (but still does collision checking)\n\t\n\t// flags which are set if an object is touching a wall, ceiling, or floor\n\t// they're addressable either by the array or individually.\n\t#define BLOCKED_MAP\t\t1\n\t#define BLOCKED_OBJECT\t2\n\tunion {\n\t\tstruct { uint8_t blockr, blockl, blocku, blockd; };\n\t\tuint8_t block[4];\n\t};\n\tunion {\n\t\tstruct { uint8_t lastblockr, lastblockl, lastblocku, lastblockd; };\n\t\tuint8_t lastblock[4];\n\t};\n\t\n\t// if true, object has been deleted and should be freed before next tick\n\tbool deleted;\n\t\n\t// the dual-layered linked-list. one list is order of creation is the\n\t// order AI routines are run in, the other is the z-order and is the\n\t// order the objects are drawn in.\n\tObject *prev, *next;\n\tObject *lower, *higher;\n\t\n\tObject *linkedobject;\n\t\n\t// AI variables used for specific AI functions\n\tunion\n\t{\n\t\t// for player shots (not enemy shots)\n\t\tstruct\n\t\t{\n\t\t\tint ttl;\t\t\t// frames left till shot times out; sets range\n\t\t\tint dir;\t\t\t// direction shot was fired in, LEFT RIGHT UP DOWN.\n\t\t\tint damage;\t\t\t// damage dealt per hit\n\t\t\t\n\t\t\tint btype;\t\t\t// bullet type\n\t\t\tint level;\t\t\t// weapon level (0, 1, or 2)\n\t\t\t\n\t\t\t// missile boom spawner used w/ player missiles\n\t\t\tstruct\n\t\t\t{\n\t\t\t\tint range;\n\t\t\t\tint booms_left;\n\t\t\t} boomspawner;\n\t\t} shot;\n\t\t\n\t\tstruct\n\t\t{\n\t\t\tint bultype;\n\t\t\tint nlayers;\n\t\t\tint wave_amt;\n\t\t} mgun;\n\t\t\n\t\tstruct\n\t\t{\t// if 1 on an OBJ_CARRIED_OBJECT then object faces in OPPOSITE direction of carrier\n\t\t\tbool flip;\n\t\t} carry;\n\t\t\n\t\tstruct\n\t\t{\n\t\t\tint jumpheight, jumpgrav;\n\t\t\tint falldmg;\n\t\t\tbool canfly;\n\t\t} critter;\n\t\t\n\t\tstruct\n\t\t{\n\t\t\tint blockedtime;\n\t\t\tint reachptimer;\n\t\t\tint tryjumptime;\n\t\t\tint impjumptime;\n\t\t\tuchar impjump;\n\t\t\tuchar look;\n\t\t\tint gunsprite;\n\t\t\tint changedirtimer;\n\t\t\tbool spawned_watershield;\n\t\t} curly;\n\t\t\n\t\tstruct\n\t\t{\n\t\t\tbool left_ground;\n\t\t} toro;\n\t\t\n\t\tstruct\n\t\t{\n\t\t\tObject *carried_by;\n\t\t} sue;\n\t\t\n\t\tstruct\n\t\t{\n\t\t\tbool smoking;\n\t\t\tint smoketimer;\n\t\t} balrog;\n\t\t\n\t\tstruct\n\t\t{\n\t\t\tbool fireattack;\n\t\t} igor;\n\t\t\n\t\tstruct\n\t\t{\n\t\t\tbool is_horizontal;\n\t\t\tint x1, y1, x2, y2;\n\t\t} hvt;\t// hvtrigger\n\t\t\n\t\tstruct\n\t\t{\n\t\t\tObject *layers[4];\n\t\t} cloud;\n\t};\n};\n\n\ninline int Object::Width()\t\t\t{ return (sprites[this->sprite].w << CSF); }\ninline int Object::Height()\t\t\t{ return (sprites[this->sprite].h << CSF); }\n\ninline int Object::BBoxWidth()\t\t{ return (((sprites[this->sprite].bbox.x2 - sprites[this->sprite].bbox.x1) + 1) << CSF); }\ninline int Object::BBoxHeight()\t\t{ return (((sprites[this->sprite].bbox.y2 - sprites[this->sprite].bbox.y1) + 1) << CSF); }\n\ninline int Object::CenterX()\t\t{ return (this->x + (Width() / 2)) - DrawPointX(); }\ninline int Object::CenterY()\t\t{ return (this->y + (Height() / 2)) - DrawPointY(); }\n\ninline int Object::Left()\t\t\t{ return (this->x + (sprites[this->sprite].bbox.x1 << CSF)); }\ninline int Object::Right()\t\t\t{ return (this->x + (sprites[this->sprite].bbox.x2 << CSF)); }\ninline int Object::Top()\t\t\t{ return (this->y + (sprites[this->sprite].bbox.y1 << CSF)); }\ninline int Object::Bottom()\t\t\t{ return (this->y + (sprites[this->sprite].bbox.y2 << CSF)); }\n\ninline int Object::SolidLeft()\t\t{ return (this->x + (sprites[this->sprite].solidbox.x1 << CSF)); }\ninline int Object::SolidRight()\t\t{ return (this->x + (sprites[this->sprite].solidbox.x2 << CSF)); }\ninline int Object::SolidTop()\t\t{ return (this->y + (sprites[this->sprite].solidbox.y1 << CSF)); }\ninline int Object::SolidBottom()\t{ return (this->y + (sprites[this->sprite].solidbox.y2 << CSF)); }\n\ninline int Object::ActionPointX()\t{ return (this->x + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint.x << CSF)); }\ninline int Object::ActionPointY()\t{ return (this->y + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint.y << CSF)); }\ninline int Object::ActionPoint2X()\t{ return (this->x + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint2.x << CSF)); }\ninline int Object::ActionPoint2Y()\t{ return (this->y + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint2.y << CSF)); }\n\ninline int Object::DrawPointX()\t\t{ return (sprites[this->sprite].frame[this->frame].dir[this->dir].drawpoint.x << CSF); }\ninline int Object::DrawPointY()\t\t{ return (sprites[this->sprite].frame[this->frame].dir[this->dir].drawpoint.y << CSF); }\n\ninline SIFSprite *Object::Sprite()\t{ return &sprites[this->sprite]; }\n\n\n// game objects\n\n#define OBJ_NULL\t\t\t\t\t0\n\n#define OBJ_XP\t\t\t\t\t\t1\n#define OBJ_BEHEMOTH\t\t\t\t2\n#define OBJ_SMOKE_CLOUD\t\t\t\t4\n#define OBJ_CRITTER_HOPPING_GREEN\t5\n#define OBJ_BEETLE_GREEN\t\t\t6\n#define OBJ_BASIL\t\t\t\t\t7\n#define OBJ_BEETLE_FREEFLY\t\t\t8\n#define OBJ_BALROG_DROP_IN\t\t\t9\n#define OBJ_IGOR_SHOT\t\t\t\t11\n#define OBJ_BALROG\t\t\t\t\t12\n#define OBJ_FORCEFIELD\t\t\t\t13\n#define OBJ_SANTAS_KEY\t\t\t\t14\n#define OBJ_CHEST_CLOSED\t\t\t15\n#define OBJ_SAVE_POINT\t\t\t\t16\n#define OBJ_RECHARGE\t\t\t\t17\n#define OBJ_DOOR\t\t\t\t\t18\n#define OBJ_BALROG_BUST_IN\t\t\t19\n#define OBJ_COMPUTER\t\t\t\t20\n#define OBJ_CHEST_OPEN\t\t\t\t21\n#define OBJ_TELEPORTER\t\t\t\t22\n#define OBJ_TELEPORTER_LIGHTS\t\t23\n#define OBJ_POWER_CRITTER\t\t\t24\n#define OBJ_EGG_ELEVATOR\t\t\t25\t\t// lift platform in Egg Observation Room\n#define OBJ_BAT_CIRCLE\t\t\t\t26\n#define OBJ_BIG_SPIKE\t\t\t\t27\n#define OBJ_CRITTER_FLYING\t\t\t28\t\t// cyan critters from grasstown\n#define OBJ_CHTHULU\t\t\t\t\t29\n#define OBJ_HERMIT_GUNSMITH\t\t\t30\n#define OBJ_BAT_HANG\t\t\t\t31\n#define OBJ_LIFE_CAPSULE\t\t\t32\n#define OBJ_BALROG_SHOT_BOUNCE\t\t33\n#define OBJ_BED\t\t\t\t\t\t34\n#define OBJ_MANNAN\t\t\t\t\t35\n#define OBJ_BALROG_BOSS_FLYING\t\t36\n#define OBJ_SIGNPOST\t\t\t\t37\n#define OBJ_FIREPLACE\t\t\t\t38\n#define OBJ_SAVE_SIGN\t\t\t\t39\n#define OBJ_SANTA\t\t\t\t\t40\t\t// NPC Santa\n#define OBJ_DOOR_BUSTED\t\t\t\t41\t\t// door of shack after balrog breaks it\n#define OBJ_SUE\t\t\t\t\t\t42\n#define OBJ_CHALKBOARD\t\t\t\t43\n#define OBJ_POLISH\t\t\t\t\t44\n#define OBJ_POLISHBABY\t\t\t\t45\n#define OBJ_HVTRIGGER\t\t\t\t46\n#define OBJ_SANDCROC\t\t\t\t47\n#define OBJ_SKULLHEAD\t\t\t\t49\n#define OBJ_SKELETON_SHOT\t\t\t50\t\t// bones fired by skullhead_carried & skeleton\n#define OBJ_CROWWITHSKULL\t\t\t51\n#define OBJ_BLUE_ROBOT_SITTING\t\t52\n#define OBJ_SKULLSTEP_FOOT\t\t\t53\n#define OBJ_SKULLSTEP\t\t\t\t54\n#define OBJ_KAZUMA\t\t\t\t\t55\n#define OBJ_BEETLE_BROWN\t\t\t56\n#define OBJ_CROW\t\t\t\t\t57\n#define OBJ_GIANT_BEETLE\t\t\t58\t\t// Basu\n#define OBJ_DOOR_ENEMY\t\t\t\t59\t\t// attacking exit door from First Cave\n#define OBJ_TOROKO\t\t\t\t\t60\n#define OBJ_KING\t\t\t\t\t61\n#define OBJ_KAZUMA_AT_COMPUTER\t\t62\n#define OBJ_TOROKO_SHACK\t\t\t63\t\t// scared toroko attacking in Shack\n#define OBJ_CRITTER_HOPPING_BLUE\t64\t\t// from First Cave\n#define OBJ_BAT_BLUE\t\t\t\t65\t\t// from First Cave\n#define OBJ_MISERYS_BUBBLE\t\t\t66\t\t// misery's bubble that takes Toroko away in Shack\n#define OBJ_MISERY_FLOAT\t\t\t67\n#define OBJ_BALROG_BOSS_RUNNING\t\t68\n#define OBJ_MUSHROOM_ENEMY\t\t\t69\n#define OBJ_HIDDEN_SPARKLE\t\t\t70\n#define OBJ_CHINFISH\t\t\t\t71\n#define OBJ_SPRINKLER\t\t\t\t72\n#define OBJ_WATER_DROPLET\t\t\t73\n#define OBJ_JACK\t\t\t\t\t74\t\t// guards cemetary door in Village\n#define OBJ_KANPACHI_FISHING\t\t75\n#define OBJ_YAMASHITA_FLOWERS\t\t76\t\t// flowers grown in Yamashita Farm\n#define OBJ_YAMASHITA_PAVILION\t\t77\t\t// Sandaime's Pavilion from Yamashita Farm\n#define OBJ_POT\t\t\t\t\t\t78\n#define OBJ_MAHIN\t\t\t\t\t79\t\t// from village\n#define OBJ_GRAVEKEEPER\t\t\t\t80\t\t// man with knife in Mimiga Graveyard\n#define OBJ_GIANT_MUSHROOM_ENEMY\t81\n#define OBJ_MISERY_STAND\t\t\t82\n#define OBJ_NPC_IGOR\t\t\t\t83\n#define OBJ_GIANT_BEETLE_SHOT\t\t84\n#define OBJ_TERMINAL\t\t\t\t85\n#define OBJ_MISSILE\t\t\t\t\t86\n#define OBJ_HEART\t\t\t\t\t87\n#define OBJ_BOSS_IGOR\t\t\t\t88\n#define OBJ_BOSS_IGOR_DEFEATED\t\t89\n#define OBJ_CAGE\t\t\t\t\t91\n#define OBJ_SUE_AT_COMPUTER\t\t\t92\n#define OBJ_CHACO\t\t\t\t\t93\n#define OBJ_GIANT_JELLY\t\t\t\t94\n#define OBJ_JELLY\t\t\t\t\t95\n#define OBJ_FAN_LEFT\t\t\t\t96\n#define OBJ_FAN_UP\t\t\t\t\t97\n#define OBJ_FAN_RIGHT\t\t\t\t98\n#define OBJ_FAN_DOWN\t\t\t\t99\n#define OBJ_GRATE\t\t\t\t\t100\n#define OBJ_POWERCOMP\t\t\t\t101\n#define OBJ_POWERSINE\t\t\t\t102\n#define OBJ_MANNAN_SHOT\t\t\t\t103\n#define OBJ_FROG\t\t\t\t\t104\n#define OBJ_HEY\t\t\t\t\t\t105\t\t// \"Hey!\" balloon\n#define OBJ_HEY_SPAWNER\t\t\t\t106\t\t// creates \"Hey!\" ballons\n#define OBJ_MALCO\t\t\t\t\t107\n#define OBJ_BALFROG_SHOT\t\t\t108\n#define OBJ_MALCO_BROKEN\t\t\t109\n#define OBJ_MINIFROG\t\t\t\t110\n#define OBJ_PTELOUT\t\t\t\t\t111\t\t// player teleporting out (using teleporter)\n#define OBJ_PTELIN\t\t\t\t\t112\t\t// player teleporting in (using teleporter)\n#define OBJ_PROFESSOR_BOOSTER\t\t113\n#define OBJ_PRESS\t\t\t\t\t114\n#define OBJ_FRENZIED_MIMIGA\t\t\t115\n#define OBJ_RED_PETALS\t\t\t\t116\t\t// scattered around beds\n#define OBJ_CURLY\t\t\t\t\t117\t\t// curly (npc)\n#define OBJ_CURLY_BOSS\t\t\t\t118\t\t// curly (boss)\n#define OBJ_TABLECHAIRS\t\t\t\t119\t\t// table & chairs\n#define OBJ_MIMIGAC1\t\t\t\t120\t\t// curly's mimigas\n#define OBJ_MIMIGAC2\t\t\t\t121\t\t// curly's mimigas\n#define OBJ_MIMIGAC_ENEMY\t\t\t122\t\t// fighting mimigas during 1st boss fight in sand zone\n#define OBJ_CURLYBOSS_SHOT\t\t\t123\n#define OBJ_SUNSTONE\t\t\t\t124\n#define OBJ_HIDDEN_POWERUP\t\t\t125\n#define OBJ_PUPPY_RUN\t\t\t\t126\n#define OBJ_PUPPY_WAG\t\t\t\t130\n#define OBJ_PUPPY_SLEEP\t\t\t\t131\n#define OBJ_PUPPY_BARK\t\t\t\t132\n#define OBJ_JENKA\t\t\t\t\t133\n#define OBJ_ARMADILLO\t\t\t\t134\n#define OBJ_SKELETON\t\t\t\t135\n#define OBJ_PUPPY_CARRY\t\t\t\t136\n#define OBJ_LARGEDOOR_FRAME\t\t\t137\n#define OBJ_LARGEDOOR\t\t\t\t138\n#define OBJ_DOCTOR\t\t\t\t\t139\n#define OBJ_TOROKO_FRENZIED\t\t\t140\n#define OBJ_TOROKO_BLOCK\t\t\t141\n#define OBJ_TOROKO_FLOWER\t\t\t142\n#define OBJ_JENKA_COLLAPSED\t\t\t143\n#define OBJ_TOROKO_TELEPORT_IN\t\t144\n#define OBJ_KINGS_SWORD\t\t\t\t145\t\t// sticks to linkedobject\n#define OBJ_LIGHTNING\t\t\t\t146\n#define OBJ_CRITTER_SHOOTING_PURPLE\t147\n#define OBJ_CRITTER_SHOT\t\t\t148\n#define OBJ_BLOCK_MOVEH\t\t\t\t149\n#define OBJ_NPC_PLAYER\t\t\t\t150\t\t// the player as an NPC in cutscenes\n#define OBJ_BLUE_ROBOT\t\t\t\t151\n#define OBJ_SHUTTER_STUCK\t\t\t152\n#define OBJ_GAUDI\t\t\t\t\t153\n#define OBJ_GAUDI_DYING\t\t\t\t154\n#define OBJ_GAUDI_FLYING\t\t\t155\n#define OBJ_GAUDI_FLYING_SHOT\t\t156\n#define OBJ_BLOCK_MOVEV\t\t\t\t157\n#define OBJ_X_FISHY_MISSILE\t\t\t158\t\t// homing fish projectiles fired by Monster X\n#define OBJ_X_DEFEATED\t\t\t\t159\t\t// cat that falls out after defeating X\n#define OBJ_POOH_BLACK\t\t\t\t160\t\t// clinic ghost\n#define OBJ_POOH_BLACK_BUBBLE\t\t161\n#define OBJ_POOH_BLACK_DYING\t\t162\n#define OBJ_DR_GERO\t\t\t\t\t163\t\t// from labyrinth clinic\n#define OBJ_NURSE_HASUMI\t\t\t164\t\t// from labyrinth clinic\n#define OBJ_CURLY_COLLAPSED\t\t\t165\n#define OBJ_GAUDI_SHOPKEEP\t\t\t166\t\t// aka Chaba, at table in labyrinth shop\n#define OBJ_BOOSTER_FALLING\t\t\t167\t\t// professor booster falling after Labyrinth\n#define OBJ_BOULDER\t\t\t\t\t168\t\t// large boulder in the Boulder Chamber\n#define OBJ_BALROG_BOSS_MISSILES\t169\t\t// balrog boss in Boulder Chamber\n#define OBJ_BALROG_MISSILE\t\t\t170\n#define OBJ_FIREWHIRR\t\t\t\t171\n#define OBJ_FIREWHIRR_SHOT\t\t\t172\n#define OBJ_GAUDI_ARMORED\t\t\t173\n#define OBJ_GAUDI_ARMORED_SHOT\t\t174\n#define OBJ_GAUDI_EGG\t\t\t\t175\n#define OBJ_BUYOBUYO_BASE\t\t\t176\n#define OBJ_BUYOBUYO\t\t\t\t177\n#define OBJ_MINICORE_SHOT\t\t\t178\n#define OBJ_CORE_GHOSTIE\t\t\t179\n#define OBJ_CURLY_AI\t\t\t\t180\n#define OBJ_CAI_GUN\t\t\t\t\t181\n#define OBJ_CAI_MGUN\t\t\t\t182\n#define OBJ_CAI_WATERSHIELD\t\t\t183\n#define OBJ_SHUTTER_BIG\t\t\t\t184\n#define OBJ_SHUTTER\t\t\t\t\t185\n#define OBJ_ALMOND_LIFT\t\t\t\t186\n#define OBJ_FUZZ_CORE\t\t\t\t187\n#define OBJ_FUZZ\t\t\t\t\t188\n#define OBJ_ALMOND_ROBOT\t\t\t190\n#define OBJ_WATERLEVEL\t\t\t\t191\t\t// controls water level in Almond\n#define OBJ_MOTORBIKE\t\t\t\t192\n#define OBJ_MOTORBIKE_BROKEN\t\t193\n#define OBJ_BLUE_ROBOT_REMAINS\t\t194\n#define OBJ_GRATING\t\t\t\t\t195\n#define OBJ_MOTION_WALL\t\t\t\t196\t\t// top & bottom wall during Ironhead battle\n#define OBJ_IRONH_FISHY\t\t\t\t197\t\t// fishies in IronH battle\n#define OBJ_IRONH_SHOT\t\t\t\t198\n#define OBJ_FAN_DROPLET\t\t\t\t199\t\t// air or water current (from fans and Waterway)\n#define OBJ_DRAGON_ZOMBIE\t\t\t200\n#define OBJ_DRAGON_ZOMBIE_DEAD\t\t201\n#define OBJ_DRAGON_ZOMBIE_SHOT\t\t202\n#define OBJ_CRITTER_HOPPING_AQUA\t203\n#define OBJ_FALLING_SPIKE_SMALL\t\t204\n#define OBJ_FALLING_SPIKE_LARGE\t\t205\n#define OBJ_COUNTER_BOMB\t\t\t206\n#define OBJ_COUNTER_BOMB_NUMBER\t\t207\n#define OBJ_GIANT_BEETLE_2\t\t\t208\n#define OBJ_BEETLE_FREEFLY_2\t\t210\n#define OBJ_SPIKE_SMALL\t\t\t\t211\n#define OBJ_SKY_DRAGON\t\t\t\t212\t\t// kazuma's nice dragon (npc)\n#define OBJ_NIGHT_SPIRIT\t\t\t213\n#define OBJ_NIGHT_SPIRIT_SHOT\t\t214\n#define OBJ_SANDCROC_OSIDE\t\t\t215\t\t// from outer wall\n#define OBJ_PIXEL_CAT\t\t\t\t216\t\t// hidden pixel the cat from oside aka \"debug kitty\"\n#define OBJ_ITOH\t\t\t\t\t217\n#define OBJ_CORE_BLAST\t\t\t\t218\n#define OBJ_BUBBLE_SPAWNER\t\t\t219\n#define OBJ_MIMIGA_FARMER_STANDING\t220\t\t// from plantation, doesn't move\n#define OBJ_MIMIGA_FARMER_WALKING\t221\t\t// from plantation, walks back and forth\n#define OBJ_JAIL_GRATING\t\t\t222\n#define OBJ_MOMORIN\t\t\t\t\t223\n#define OBJ_CHIE\t\t\t\t\t224\t\t// plantation lounge\n#define OBJ_MEGANE\t\t\t\t\t225\t\t// plantation lounge (you give him the sprinkler)\n#define OBJ_KANPACHI_STANDING\t\t226\t\t// standing version, plantation lounge\n#define OBJ_BUCKET\t\t\t\t\t227\t\t// kanpachi's fishing bucket\n#define OBJ_DROLL_GUARD\t\t\t\t228\t\t// droll that stomps you in Teleporter Room\n#define OBJ_RED_FLOWERS_SPROUTS\t\t229\n#define OBJ_RED_FLOWERS_BLOOMING\t230\n#define OBJ_ROCKET\t\t\t\t\t231\t\t// ...that you ride up to Last Cave\n#define OBJ_ORANGEBELL\t\t\t\t232\t\t// bat swarm from Plantation\n#define OBJ_ORANGEBELL_BABY\t\t\t233\n#define OBJ_RED_FLOWERS_PICKED\t\t234\n#define OBJ_FLOWERS_PENS1\t\t\t234\t\t// picked red flowers in lower-right corner of Arthur's House\n#define OBJ_MIDORIN\t\t\t\t\t235\n#define OBJ_GUNFISH\t\t\t\t\t236\n#define OBJ_GUNFISH_SHOT\t\t\t237\n#define OBJ_PROXIMITY_PRESS_HOZ\t\t238\t\t// horizontal-moving presses along rocket path\n#define OBJ_MIMIGA_CAGE\t\t\t\t239\n#define OBJ_MIMIGA_JAILED\t\t\t240\t\t// mimigas in jail2\n#define OBJ_CRITTER_HOPPING_RED\t\t241\n#define OBJ_RED_BAT\t\t\t\t\t242\n#define OBJ_RED_BAT_SPAWNER\t\t\t243\n#define OBJ_LAVA_DRIP\t\t\t\t244\n#define OBJ_LAVA_DRIP_SPAWNER\t\t245\t\t// for example at entrance to last cave (hidden)\n#define OBJ_PROXIMITY_PRESS_VERT\t246\n#define OBJ_BOSS_MISERY\t\t\t\t247\n#define OBJ_MISERY_SHOT\t\t\t\t248\n#define OBJ_MISERY_PHASE\t\t\t249\t\t// 2 used in teleport effect\n#define OBJ_MISERY_BALL\t\t\t\t250\n#define OBJ_BLACK_LIGHTNING\t\t\t251\n#define OBJ_MISERY_RING\t\t\t\t252\n#define OBJ_XP_CAPSULE\t\t\t\t253\n#define OBJ_HELICOPTER\t\t\t\t254\t\t// Balcony helicopter\n#define OBJ_HELICOPTER_BLADE\t\t255\n#define OBJ_DOCTOR_CROWNED\t\t\t256\n#define OBJ_RED_CRYSTAL\t\t\t\t257\n#define OBJ_MIMIGA_SLEEPING\t\t\t258\t\t// plantation lounge\n#define OBJ_CURLY_CARRIED\t\t\t259\t\t// curly being carried via Tow Rope\n#define OBJ_MIMIGA_CAGED\t\t\t260\t\t// from Kings Table\n#define OBJ_CHIE_CAGED\t\t\t\t261\t\t// from Kings Table\n#define OBJ_CHACO_CAGED\t\t\t\t262\t\t// from Kings Table\n#define OBJ_BOSS_DOCTOR\t\t\t\t263\n#define OBJ_DOCTOR_SHOT\t\t\t\t264\t\t// wave shot\n#define OBJ_DOCTOR_SHOT_TRAIL\t\t265\n#define OBJ_DOCTOR_BLAST\t\t\t266\t\t// his explosion of red bouncy shots\n#define OBJ_BOSS_DOCTOR_FRENZIED\t267\t\t// Muscle Doctor\n#define OBJ_IGOR_BALCONY\t\t\t268\t\t// \"igor\"-like big Ravil on Balcony\n#define OBJ_DOCTOR_BAT\t\t\t\t269\t\t// orange bats spawned by Doctor 2\n#define OBJ_RED_ENERGY\t\t\t\t270\t\t// used by Doctor 2 and Undead Core cutscene\n#define OBJ_IRONH_BRICK\t\t\t\t271\n#define OBJ_BRICK_SPAWNER\t\t\t272\n#define OBJ_DROLL_SHOT\t\t\t\t273\n#define OBJ_DROLL\t\t\t\t\t274\n#define OBJ_PUPPY_ITEMS\t\t\t\t275\t\t// wagging puppy such as that gives you life capsule\n#define OBJ_RED_DEMON\t\t\t\t276\t\t// middle-boss in Last Cave Hidden\n#define OBJ_RED_DEMON_SHOT\t\t\t277\n#define OBJ_LITTLE_FAMILY\t\t\t278\t\t// Little Man, and also used for his family\n#define OBJ_FALLING_BLOCK\t\t\t279\t\t// from Misery and Hell B1\n#define OBJ_SUE_TELEPORT_IN\t\t\t280\n#define OBJ_DOCTOR_GHOST\t\t\t281\t\t// doctor as red energy\n#define OBJ_UDMINI_PLATFORM\t\t\t282\t\t// undead minicore (platforms)\n#define OBJ_MISERY_FRENZIED\t\t\t283\t\t// for Final Battle transformed by DOCTOR_GHOST\n#define OBJ_SUE_FRENZIED\t\t\t284\t\t// for Final Battle transformed by DOCTOR_GHOST\n#define OBJ_UD_SPINNER\t\t\t\t285\n#define OBJ_UD_SPINNER_TRAIL\t\t286\n#define OBJ_UD_SMOKE\t\t\t\t287\n#define OBJ_UD_PELLET\t\t\t\t288\t\t// undead core pellet/rock shot\n#define OBJ_MISERY_CRITTER\t\t\t289\n#define OBJ_MISERY_BAT\t\t\t\t290\n#define OBJ_UD_MINICORE_IDLE\t\t291\n#define OBJ_QUAKE\t\t\t\t\t292\n#define OBJ_UD_BLAST\t\t\t\t293\n#define OBJ_FALLING_BLOCK_SPAWNER\t294\n#define OBJ_CLOUD\t\t\t\t\t295\n#define OBJ_CLOUD_SPAWNER\t\t\t296\t\t// clouds from prtFall (ending sequence)\n#define OBJ_INTRO_DOCTOR\t\t\t298\t\t// from intro\n#define OBJ_INTRO_KINGS\t\t\t\t299\t\t// balrog/misery in bubble (from intro)\n#define OBJ_INTRO_CROWN\t\t\t\t300\t\t// Demon Crown (from intro)\n#define OBJ_MISERY_MISSILE\t\t\t301\n#define OBJ_SCROLL_CONTROLLER\t\t302\t\t// <FON on it and you can do various tricks with controlling the scrolling\n#define OBJ_SANTA_CAGED\t\t\t\t307\t\t// from Kings Table\n#define OBJ_GAUDI_PATIENT\t\t\t304\t\t// credits\n#define OBJ_BABY_PUPPY\t\t\t\t305\t\t// credits\n#define OBJ_BALROG_MEDIC\t\t\t306\t\t// credits\n#define OBJ_STUMPY\t\t\t\t\t308\n#define OBJ_BUTE_FLYING\t\t\t\t309\n#define OBJ_BUTE_SWORD\t\t\t\t310\n#define OBJ_BUTE_ARCHER\t\t\t\t311\n#define OBJ_BUTE_ARROW\t\t\t\t312\n#define OBJ_MA_PIGNON\t\t\t\t313\n#define OBJ_MA_PIGNON_ROCK\t\t\t314\n#define OBJ_MA_PIGNON_CLONE\t\t\t315\n#define OBJ_BUTE_DYING\t\t\t\t316\n#define OBJ_MESA\t\t\t\t\t317\n#define OBJ_MESA_DYING\t\t\t\t318\n#define OBJ_MESA_BLOCK\t\t\t\t319\n#define OBJ_CURLY_CARRIED_SHOOTING\t320\n#define OBJ_CCS_GUN\t\t\t\t\t321\t\t// OBJ_CURLY_CARRIED_SHOOTING: her gun\n#define OBJ_DELEET\t\t\t\t\t322\n#define OBJ_BUTE_FALLING\t\t\t323\n#define OBJ_BUTE_SPAWNER\t\t\t324\n#define OBJ_HP_LIGHTNING\t\t\t325\t\t// lightning shot & charging from Heavy Press\n#define OBJ_TURNING_HUMAN\t\t\t326\t\t// Itoh/Sue turning human (credits)\n#define OBJ_AHCHOO\t\t\t\t\t327\n#define OBJ_TRANSMOGRIFIER\t\t\t328\t\t// credits\n#define OBJ_BUILDING_FAN\t\t\t329\t\t// credits\n#define OBJ_ROLLING\t\t\t\t\t330\n#define OBJ_BALLOS_BONE\t\t\t\t331\n#define OBJ_BALLOS_BONE_SPAWNER\t\t332\n#define OBJ_BALLOS_TARGET\t\t\t333\n#define OBJ_STRAINING\t\t\t\t334\t\t// \"straining\" effect used in Boulder Chamber cutscene\n#define OBJ_IKACHAN\t\t\t\t\t335\n#define OBJ_IKACHAN_SPAWNER\t\t\t336\n#define OBJ_NUMAHACHI\t\t\t\t337\t\t// in Plantation version of Statue Room\n#define OBJ_GREEN_DEVIL\t\t\t\t338\n#define OBJ_GREEN_DEVIL_SPAWNER\t\t339\n#define OBJ_BALLOS_PRIEST\t\t\t340\t\t// form #1 in Seal Chamber\n#define OBJ_BALLOS_SMILE\t\t\t341\t\t// his closed face that smiles at start of battle\n#define OBJ_BALLOS_ROTATOR\t\t\t342\t\t// 3rd/4th form spiky rotators\n#define OBJ_BALLOS_BODY_2\t\t\t343\t\t// time-limited body?\n#define OBJ_BALLOS_EYE_2\t\t\t344\t\t// time-limited closed eyes?\n#define OBJ_BALLOS_SKULL\t\t\t345\t\t// falling skulls during 3rd form\n#define OBJ_BALLOS_PLATFORM\t\t\t346\t\t// platforms for 4th form\n#define OBJ_HOPPY\t\t\t\t\t347\n#define OBJ_BALLOS_SPIKES\t\t\t348\n#define OBJ_STATUE_BASE\t\t\t\t349\t\t// statues in Statue Room (actionable base)\n#define OBJ_BUTE_ARCHER_RED\t\t\t350\n#define OBJ_STATUE\t\t\t\t\t351\t\t// statues in Statue Room\n#define OBJ_THE_CAST\t\t\t\t352\t\t// friends that surround player at end of credits\n#define OBJ_BUTE_SWORD_RED\t\t\t353\n#define OBJ_WALL_COLLAPSER\t\t\t354\t\t// post-Ballos cutscene\n#define OBJ_BALROG_PASSENGER\t\t355\t\t// Player/Curly when rescued from Seal Chamber by Balrog\n#define OBJ_BALROG_FLYING\t\t\t356\t\t// best-ending flying-in-clouds cutscene\n#define OBJ_PUPPY_GHOST\t\t\t\t357\t\t// Ballos's dog in Corridor/ostep\n#define OBJ_MISERY_WIND\t\t\t\t358\t\t// seen in best-ending credits\n#define OBJ_DROPLET_SPAWNER\t\t\t359\t\t// spawns small falling water drips from e.g. resevoir\n#define OBJ_THANK_YOU\t\t\t\t360\t\t// credits\n#define OBJ_BALFROG\t\t\t\t\t363\n\n// NXEngine defined objects --\n#define OBJ_PLAYER\t\t\t\t\t400\n#define OBJ_HEART3\t\t\t\t\t401\t\t// i'm sure there must be...\n#define OBJ_MISSILE3\t\t\t\t402\t\t// ...a real object number for these???\n#define OBJ_LAVA_DROPLET\t\t\t403\t\t// don't know real objnum for this either\n\n#define OBJ_SKULLHEAD_CARRIED\t\t404\t\t// skullhead when carried by a crow\n#define OBJ_BBOX_PUPPET\t\t\t\t405\t\t// used to form non-square/irregular bboxes\n#define OBJ_SMOKE_DROPPER\t\t\t406\t\t// used by CMP script command\n\n// Core (Almond)\n#define OBJ_CORE_CONTROLLER\t\t\t410\n#define OBJ_CORE_FRONT\t\t\t\t411\n#define OBJ_CORE_BACK\t\t\t\t412\n#define OBJ_CORE_MARKER\t\t\t\t413\n#define OBJ_MINICORE\t\t\t\t414\n\n\n// player bullets\n#define OBJ_SHOTS_START\t\t\t\t420\n\n#define OBJ_POLAR_SHOT\t\t\t\t420\t\t// polar-star type player shot (or machine gun L1)\n#define OBJ_MGUN_SPAWNER\t\t\t421\t\t// object dropped by MGun that handles firing it\n#define OBJ_MGUN_LEADER\t\t\t\t422\t\t// leading \"layer\" of Machine Gun L2 & 3\n#define OBJ_MGUN_TRAIL\t\t\t\t423\t\t// \"tail\" of Machine Gun L2 & 3\n#define OBJ_MGUN_L1_SHOT\t\t\t424\t\t// level 1 machine gun, AI identical to polar star\n#define OBJ_MISSILE_SHOT\t\t\t425\t\t// missile fired by Missile Launcher\n#define OBJ_SUPERMISSILE_SHOT\t\t426\t\t// missile fired by Super Missile Launcher\n#define OBJ_MISSILE_BOOM_SPAWNER\t427\t\t// spawns boomflashes for missile launcher\n#define OBJ_FIREBALL1\t\t\t\t428\n#define OBJ_FIREBALL23\t\t\t\t429\n#define OBJ_FIREBALL_TRAIL\t\t\t430\n#define OBJ_BLADE12_SHOT\t\t\t431\n#define OBJ_BLADE3_SHOT\t\t\t\t432\n#define OBJ_BLADE_SLASH\t\t\t\t433\n#define OBJ_SNAKE1_SHOT\t\t\t\t434\n#define OBJ_SNAKE23_SHOT\t\t\t435\n#define OBJ_SNAKE_TRAIL\t\t\t\t436\n#define OBJ_NEMESIS_SHOT\t\t\t437\n#define OBJ_NEMESIS_SHOT_CURLY\t\t438\t\t// for counting her shots separately in Hell\n#define OBJ_BUBBLER12_SHOT\t\t\t439\n#define OBJ_BUBBLER3_SHOT\t\t\t440\n#define OBJ_BUBBLER_SHARP\t\t\t441\t\t// sharp-looking \"launched\" shot from Bubbler L3\n#define OBJ_SPUR_SHOT\t\t\t\t442\n#define OBJ_SPUR_TRAIL\t\t\t\t443\n#define OBJ_WHIMSICAL_STAR\t\t\t444\n\n#define OBJ_SHOTS_END\t\t\t\t449\n\n\n#define OBJ_OMEGA_BODY\t\t\t\t450\n#define OBJ_OMEGA_LEG\t\t\t\t451\n#define OBJ_OMEGA_STRUT\t\t\t\t452\n#define OBJ_OMEGA_SHOT\t\t\t\t453\n\n#define OBJ_IRONH\t\t\t\t\t455\n\n// Monster X\n#define OBJ_X_MAINOBJECT\t\t\t460\n#define OBJ_X_BODY\t\t\t\t\t461\n#define OBJ_X_TREAD\t\t\t\t\t462\n#define OBJ_X_INTERNALS\t\t\t\t463\n#define OBJ_X_DOOR\t\t\t\t\t464\n#define OBJ_X_TARGET\t\t\t\t465\n#define OBJ_X_FISHY_SPAWNER\t\t\t466\n\n#define OBJ_SISTERS_HEAD\t\t\t470\n#define OBJ_SISTERS_BODY\t\t\t471\n#define OBJ_SISTERS_MAIN\t\t\t472\n\n#define OBJ_UDCORE_MAIN\t\t\t\t480\n#define OBJ_UDCORE_FRONT\t\t\t481\n#define OBJ_UDCORE_BACK\t\t\t\t482\n#define OBJ_UDCORE_FACE\t\t\t\t483\n#define OBJ_UDMINI_ROTATOR\t\t\t484\n#define OBJ_UDMINI_BBOX\t\t\t\t485\n\n#define OBJ_HEAVY_PRESS\t\t\t\t490\n#define OBJ_HEAVY_PRESS_SHIELD\t\t491\n\n#define OBJ_BALLOS_MAIN\t\t\t\t500\n#define OBJ_BALLOS_BODY\t\t\t\t501\n#define OBJ_BALLOS_EYE\t\t\t\t502\n\n#define OBJ_LAST\t\t\t\t\t512\n\n\n#endif\n"
  },
  {
    "path": "p_arms.cpp",
    "content": "\n#include \"nx.h\"\n#include \"p_arms.fdh\"\n\nstatic Object *FireSimpleBullet(int otype, int btype, int xoff=0, int yoff=0);\nstatic int empty_timer = 0;\n\nstruct BulletInfo\n{\n\tint sprite;\t\t\t\t// sprite to use\n\tint level;\t\t\t\t// specify what level weapon is at when it fires this shot type\n\tint frame;\t\t\t\t// specify which frame within sprite\n\tuint8_t makes_star;\t\t// 1=make star effect, 2=make star but add x inertia to position\n\tint timetolive;\t\t\t// shot range\n\tint damage;\t\t\t\t// damage dealt per tick of contact with enemy\n\tint speed;\t\t\t\t// speed of shot\n\tuint8_t manualsetup;\t// 1= no auto setup at all, 2= don't use separate vert sprite\n\tuint8_t sound;\t\t\t// specify firing sound\n};\n\nBulletInfo bullet_table[] =\n{\n//\t\tsprite\t\t\t  lvl  frm st ttl dmg spd  manset      sound\n\tSPR_SHOT_POLARSTAR, \t0,  0, 1, 8,   1, 0x1000, 0, SND_POLAR_STAR_L1_2,\t\t// polarstar l1\n\tSPR_SHOT_POLARSTAR, \t1,  1, 1, 12,  2, 0x1000, 0, SND_POLAR_STAR_L1_2,\t\t// polarstar l2\n\tSPR_SHOT_POLARSTAR_L3, \t2,  0, 1, 16,  4, 0x1000, 0, SND_POLAR_STAR_L3,\t\t// polarstar l3\n\t\n\tSPR_SHOT_MGUN_L1, \t\t0,  0, 1, 20,  2, 0x1000, 0, SND_POLAR_STAR_L1_2,\t\t// mgun l1\n\t\n\tSPR_SHOT_MGUN_L2,\t\t1,  0, 1, 20,  4, 0x1000, 0, SND_POLAR_STAR_L1_2,\t\t// mgun l2, white piece\n\tSPR_SHOT_MGUN_L2,\t\t1,  1, 0, 21,  0, 0x1000, 0, 0,\t\t\t\t\t\t// mgun l2, blue piece\n\tSPR_SHOT_MGUN_L2,\t\t1,  2, 0, 22,  0, 0x1000, 0, 0,\t\t\t\t\t\t// mgun l2, dark piece\n\t\n\tSPR_SHOT_MGUN_L3LEAD,\t2,  0, 1, 20,  6, 0x1000, 0, SND_POLAR_STAR_L3,\t\t// mgun l3\n\tSPR_SHOT_MGUN_L3TAIL,\t2,  0, 0, 21,  0, 0x1000, 0, 0,\t\t\t\t\t\t// the very long...\n\tSPR_SHOT_MGUN_L3TAIL,\t2,  1, 0, 22,  0, 0x1000, 0, 0,\t\t\t\t\t\t// ...4 piece trail...\n\tSPR_SHOT_MGUN_L3TAIL,\t2,  2, 0, 23,  0, 0x1000, 0, 0,\t\t\t\t\t\t// ...of the level 3...\n\tSPR_SHOT_MGUN_L3TAIL,\t2,  3, 0, 24,  0, 0x1000, 0, 0,\t\t\t\t\t\t// ...machine gun\n\t\n\t// damage for missiles is set inside missile.cpp\n\tSPR_SHOT_MISSILE1,\t\t0,  0, 1, 50,  0, 0x0000, 0, SND_POLAR_STAR_L1_2,\t// missile level 1\n\tSPR_SHOT_MISSILE2,\t\t1,  0, 1, 65,  0, 0x0000, 0, SND_POLAR_STAR_L1_2,\t// missile level 2\n\tSPR_SHOT_MISSILE3,\t\t2,  0, 1, 90,  0, 0x0000, 0, SND_POLAR_STAR_L1_2,\t// missile level 3\n\t\n\tSPR_SHOT_SUPERMISSILE13,0,  0, 1, 30,  0, 0x0000, 0, SND_POLAR_STAR_L1_2,\t// supermissile l1\n\tSPR_SHOT_SUPERMISSILE2,\t1,  0, 1, 40,  0, 0x0000, 0, SND_POLAR_STAR_L1_2,\t// supermissile l2\n\tSPR_SHOT_SUPERMISSILE13,2,  0, 1, 40,  0, 0x0000, 0, SND_POLAR_STAR_L1_2,\t// supermissile l3\n\t\n\t// damages are doubled because fireball can hit twice before dissipating\n\tSPR_SHOT_FIREBALL1,\t\t0,  0, 1, 100, 2, 0x0000, 1, SND_FIREBALL,\t\t// fireball l1\n\tSPR_SHOT_FIREBALL23,\t1,  0, 1, 100, 3, 0x0000, 1, SND_FIREBALL,\t\t// fireball l2\n\tSPR_SHOT_FIREBALL23,\t2,  0, 1, 100, 3, 0x0000, 1, SND_FIREBALL,\t\t// fireball l3\n\t\n\tSPR_SHOT_BLADE_L1,\t\t0,  0, 0, 29, 15, 0x800,  0, SND_FIREBALL,\t\t// Blade L1\n\tSPR_SHOT_BLADE_L2,\t\t1,  0, 0, 17, 6,  0x800,  0, SND_FIREBALL,\t\t// Blade L2\n\tSPR_SHOT_BLADE_L3,\t\t2,  0, 0, 30, 1,  0x800,  0, SND_FIREBALL,\t\t// Blade L3\n\t\n\tSPR_SHOT_SNAKE_L1,\t\t0,  0, 1, 20, 4,  0x600,  2, SND_SNAKE_FIRE,\t// Snake L1\n\tSPR_SHOT_FIREBALL23,\t1,\t0, 1, 23, 6,  0x200,  2, SND_SNAKE_FIRE,\t// Snake L2\n\tSPR_SHOT_FIREBALL23,\t2,\t0, 1, 30, 8,  0x200,  2, SND_SNAKE_FIRE,\t// Snake L3\n\t\n\tSPR_SHOT_NEMESIS_L1,\t0,  0, 2, 20, 12, 0x1000, 0, SND_NEMESIS_FIRE,\n\tSPR_SHOT_NEMESIS_L2,\t1,  0, 2, 20, 6,  0x1000, 0, SND_POLAR_STAR_L3,\n\tSPR_SHOT_NEMESIS_L3,\t2,  0, 2, 20, 1,  0x555,  0, 0,\t\t// 1/3 speed\n\t\n\tSPR_SHOT_BUBBLER_L1,\t0,\t0, 1, 40, 1,  0x600,  2, SND_BUBBLER_FIRE,\n\tSPR_SHOT_BUBBLER_L2,\t1,\t0, 1, 60, 2,  0x600,  2, SND_BUBBLER_FIRE,\n\tSPR_SHOT_BUBBLER_L3,\t2,\t0, 1, 100,2,  0x600,  2, SND_BUBBLER_FIRE,\n\t\n\t// Spur also messes with it's damage at runtime; see spur.cpp for details.\n\tSPR_SHOT_POLARSTAR,\t\t0,\t0, 1, 30, 4,  0x1000, 0, SND_SPUR_FIRE_1,\n\tSPR_SHOT_POLARSTAR,\t\t1,\t1, 1, 30, 8,  0x1000, 0, SND_SPUR_FIRE_2,\n\tSPR_SHOT_POLARSTAR_L3,\t2,  0, 0, 30, 12, 0x1000, 0, SND_SPUR_FIRE_3,\n\t\n\t// Curly's Nemesis from Hell (OBJ_CURLY_CARRIED_SHOOTING)\n\tSPR_SHOT_NEMESIS_L1,\t0,  0, 1, 20, 12, 0x1000, 0, SND_NEMESIS_FIRE,\n\t\n\t0, 0, 0, 0, 0, 0, 0\n};\n\n\n// resets anything like charging states etc on player re-init (Player::Init)\nvoid PResetWeapons()\n{\n\tWeapon *spur = &player->weapons[WPN_SPUR];\n\tspur->chargetimer = 0;\n\tspur->level = 0;\n\tspur->xp = 0;\n\t\n\tinit_whimstar(&player->whimstar);\n}\n\n\nvoid PDoWeapons(void)\n{\n\t// switching weapons. have to check for inputs_frozen since justpushed\n\t// reads inputs[] directly, not pinputs[].\n\tif (!player->inputs_locked)\n\t{\n\t\tif (justpushed(PREVWPNKEY)) stat_PrevWeapon();\n\t\tif (justpushed(NEXTWPNKEY)) stat_NextWeapon();\n\t}\n\t\n\t// firing weapon\n\tif (pinputs[FIREKEY])\n\t{\n\t\tFireWeapon();\n\t\tRunWeapon(true);\n\t}\n\telse\n\t{\n\t\tRunWeapon(false);\n\t}\n\t\n\tPHandleSpur();\n\trun_whimstar(&player->whimstar);\n\t\n\tif (empty_timer)\n\t\tempty_timer--;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// called when player is trying to fire the current weapon\n// i.e. the fire button is down.\nvoid FireWeapon(void)\n{\nWeapon *curweapon = &player->weapons[player->curWeapon];\nint level = curweapon->level;\n\n\t// check if we can fire\n\tif (curweapon->firerate[level] != 0)\n\t{\t// rapid/fully-auto fire\n\t\t// decremented in RunWeapon()\n\t\tif (curweapon->firetimer)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcurweapon->firetimer = curweapon->firerate[level];\n\t\t}\n\t}\n\telse\n\t{\t// else must push key for each shot\n\t\tif (lastpinputs[FIREKEY])\n\t\t\treturn;\n\t}\n\t\n\t// check if we have enough ammo\n\tif (curweapon->maxammo > 0 && curweapon->ammo <= 0)\n\t{\n\t\tsound(SND_GUN_CLICK);\n\t\tif (empty_timer <= 0)\n\t\t{\n\t\t\teffect(player->CenterX(), player->CenterY(), EFFECT_EMPTY);\n\t\t\tempty_timer = 50;\n\t\t}\n\t\t\n\t\treturn;\n\t}\n\t\n\t// subtract ammo\n\tif (curweapon->ammo)\n\t\tcurweapon->ammo--;\n\t\n\t// fire!!\n\tswitch(player->curWeapon)\n\t{\n\t\tcase WPN_NONE: break;\n\t\t\n\t\tcase WPN_POLARSTAR:\n\t\t\tPFirePolarStar(level);\n\t\tbreak;\n\t\t\n\t\tcase WPN_FIREBALL:\n\t\t\tPFireFireball(level);\n\t\tbreak;\n\t\t\n\t\tcase WPN_MGUN:\n\t\t\tPFireMachineGun(level);\n\t\tbreak;\n\t\t\n\t\tcase WPN_MISSILE:\n\t\tcase WPN_SUPER_MISSILE:\n\t\t\tPFireMissile(level, (player->curWeapon == WPN_SUPER_MISSILE));\n\t\tbreak;\n\t\t\n\t\tcase WPN_BLADE:\n\t\t\tPFireBlade(level);\n\t\tbreak;\n\t\t\n\t\tcase WPN_SNAKE:\n\t\t\tPFireSnake(level);\n\t\tbreak;\n\t\t\n\t\tcase WPN_NEMESIS:\n\t\t\tPFireNemesis(level);\n\t\tbreak;\n\t\t\n\t\tcase WPN_BUBBLER:\n\t\t\tPFireBubbler(level);\n\t\tbreak;\n\t\t\n\t\tcase WPN_SPUR:\n\t\t\tPFireSpur();\n\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\tconsole.Print(\"FireWeapon: cannot fire unimplemented weapon %d\", player->curWeapon);\n\t\t\tsound(SND_BONK_HEAD);\n\t\tbreak;\n\t}\n}\n\n\n// \"run\" the current weapon.\n// firing = 1 if fire key is currently down, and 0 if it is not.\nvoid RunWeapon(bool firing)\n{\nWeapon *curweapon = &player->weapons[player->curWeapon];\nint level = curweapon->level;\n\n\t// bubbler L1 has recharge but not rapid fire,\n\t// so it recharges even if the key is held down.\n\tif (firing && !curweapon->firerate[level] && lastpinputs[FIREKEY])\n\t\tfiring = false;\n\t\n\t// recharge machine gun when it's not firing or it's not selected\n\tif ((curweapon->rechargerate[level]) && \\\n\t\t(curweapon->ammo < curweapon->maxammo) && \\\n\t\t!firing)\n\t{\n\t\t// start recharging ammo\n\t\tint rate = curweapon->rechargerate[level];\n\t\tif ((player->equipmask & EQUIP_TURBOCHARGE) && player->curWeapon == WPN_MGUN)\n\t\t{\n\t\t\trate = 2;\n\t\t}\n\t\t\n\t\t// it's greater than OR EQUAL TO, so that we can have rate=0 be no recharge.\n\t\t// Otherwise there would be no value that recharges every frame.\n\t\tif (++curweapon->rechargetimer >= rate)\n\t\t{\n\t\t\tcurweapon->rechargetimer = 0;\n\t\t\tcurweapon->ammo++;\n\t\t}\n\t}\n\t\n\tfor(int i=0;i<WPN_COUNT;i++)\n\t{\n\t\tif (player->weapons[i].firetimer)\n\t\t\tplayer->weapons[i].firetimer--;\n\t\t\n\t\tif ((i != player->curWeapon) || \\\n\t\t\t(player->weapons[i].ammo >= player->weapons[i].maxammo) || \\\n\t\t\tfiring)\n\t\t{\n\t\t\tplayer->weapons[i].rechargetimer = 0;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// set up the specified bullet to be a shot of type btype\n// (note: shared by Curly sand-zone boss)\nvoid SetupBullet(Object *shot, int x, int y, int btype, int dir)\n{\n\tconst BulletInfo *info = &bullet_table[btype];\n\t\n\tshot->sprite = info->sprite;\n\tshot->frame = info->frame;\n\tshot->shot.ttl = info->timetolive;\n\tshot->shot.damage = info->damage;\n\tshot->shot.level = info->level;\n\tshot->shot.btype = btype;\n\tshot->shot.dir = dir;\n\tshot->nxflags |= NXFLAG_NO_RESET_YINERTIA;\n\t\n\tif (game.debug.infinite_damage)\n\t\tshot->shot.damage = 255;\n\t\n\tif (info->sound)\n\t\tsound(info->sound);\n\t\n\tif (info->makes_star == 1)\n\t\teffect(x, y, EFFECT_STARPOOF);\n\t\n\tif (info->manualsetup != 1)\n\t{\n\t\tswitch(dir)\n\t\t{\n\t\t\tcase LEFT:\n\t\t\t\tshot->xinertia = -info->speed;\n\t\t\t\tshot->dir = LEFT;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase RIGHT:\n\t\t\t\tshot->xinertia = info->speed;\n\t\t\t\tshot->dir = RIGHT;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase UP:\n\t\t\t\tshot->yinertia = -info->speed;\n\t\t\t\tshot->dir = RIGHT;\n\t\t\t\tif (info->manualsetup != 2) { shot->sprite++; }\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase DOWN:\n\t\t\t\tshot->yinertia = info->speed;\n\t\t\t\tshot->dir = LEFT;\n\t\t\t\tif (info->manualsetup != 2) { shot->sprite++; }\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (info->makes_star == 2)\n\t\t\teffect(x+shot->xinertia/2, y, EFFECT_STARPOOF);\n\t\t\n\t\t// have to do this because inertia will get applied later in the tick before the first\n\t\t// time it's drawn so it won't actually appear where we put it if we don't\n\t\tx -= shot->xinertia;\n\t\ty -= shot->yinertia;\n\t}\n\t\n\t// put shot center at [x,y],\n\t// this also centers it within starpoof\n\tshot->x = x - (shot->Width() / 2);\n\tshot->y = y - (shot->Height() / 2);\n}\n\n\n// fire a basic, single bullet\nstatic Object *FireSimpleBullet(int otype, int btype, int xoff, int yoff)\n{\nint x, y, dir;\n\n\t// get location to fire from\n\tGetPlayerShootPoint(&x, &y);\n\tx += xoff;\n\ty += yoff;\n\t\n\t// create the shot\n\tObject *shot = CreateObject(0, 0, otype);\n\t\n\t// set up the shot\n\tif (player->look)\n\t\tdir = player->look;\n\telse\n\t\tdir = player->dir;\n\t\n\tSetupBullet(shot, x, y, btype, dir);\n\treturn shot;\n}\n\n// fires a bullet at an offset from the exact center of the player's shoot point.\n// FireSimpleBullet can do this too-- but it's xoff/yoff is absolute. This function\n// takes a parameter for when you are shooting right and extrapolates out the other\n// directions from that. ALSO, xoff/yoff on FireSimpleBullet moves the star;\n// this function does not.\nstatic Object *FireSimpleBulletOffset(int otype, int btype, int xoff, int yoff)\n{\nint dir;\n\n\tif (player->look)\n\t\tdir = player->look;\n\telse\n\t\tdir = player->dir;\n\t\n\tswitch(dir)\n\t{\n\t\tcase RIGHT: break;\t// already in format for RIGHT frame\n\t\tcase LEFT: xoff = -xoff; break;\n\t\tcase UP: SWAP(xoff, yoff); yoff = -yoff; break;\n\t\tcase DOWN: SWAP(xoff, yoff); break;\n\t}\n\t\n\tObject *shot = FireSimpleBullet(otype, btype);\n\tshot->x += xoff;\n\tshot->y += yoff;\n\t\n\treturn shot;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void PFirePolarStar(int level)\n{\n\t// at level 3 only two shots per screen permitted\n\tif (level < 2 || CountObjectsOfType(OBJ_POLAR_SHOT) < 2)\n\t{\n\t\tint xoff;\n\t\tif (level == 2) xoff = -5<<CSF; else xoff = -4<<CSF;\n\t\t\n\t\tFireSimpleBulletOffset(OBJ_POLAR_SHOT, B_PSTAR_L1+level, xoff, 0);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// handles firing the Machine Gun\nstatic void PFireMachineGun(int level)\n{\nObject *shot;\nint x, y;\n\n\tint dir = (player->look) ? player->look : player->dir;\n\t\n\tif (level == 0)\n\t{\t// level 1 is real easy! no frickin' layers!!\n\t\tshot = FireSimpleBullet(OBJ_POLAR_SHOT, B_MGUN_L1, 0, 0);\n\t\tshot->dir = dir;\n\t\t\n\t\tif (player->look)\n\t\t\tshot->xinertia = random(-0xAA, 0xAA);\n\t\telse\n\t\t\tshot->yinertia = random(-0xAA, 0xAA);\n\t}\n\telse\n\t{\n\t\t// drop an OBJ_MGUN_SHOOTER object to fire the layers (trail) of the MGun blast.\n\t\tGetPlayerShootPoint(&x, &y);\n\t\tFireLevel23MGun(x, y, level, dir);\n\t}\n\t\n\t// do machine-gun flying\n\tif (player->look==DOWN && level==2)\n\t{\n\t\tPMgunFly();\n\t}\n}\n\n// fire a level 2 or level 3 MGun blast from position x,y.\n// Broken out here into a seperate sub so OBJ_CURLY_AI can use it also.\nvoid FireLevel23MGun(int x, int y, int level, int dir)\n{\nstatic const uchar no_layers[] = { 1, 3, 5 };\nstatic const int bultype_table[] = { 0, B_MGUN_L2, B_MGUN_L3 };\nObject *shot;\n\n\t// note: this relies on the player AI running before the entity AI...which it does...\n\t// so leave it that way, else he wouldn't actually fire for 1 additional frame\n\tshot = CreateObject(x, y, OBJ_MGUN_SPAWNER);\n\t\n\tshot->dir = dir;\n\tshot->mgun.bultype = bultype_table[level];\n\tshot->mgun.nlayers = no_layers[level];\n\tshot->mgun.wave_amt = random(-0xAA, 0xAA);\n\tshot->invisible = true;\n}\n\n\n// handles flying when shooting down using Machine Gun at Level 3\nvoid PMgunFly(void)\n{\n\tif (player->yinertia > 0)\n\t{\n\t\tplayer->yinertia >>= 1;\n\t}\n\t\n\tif (player->yinertia > -0x400)\n\t{\n\t\tplayer->yinertia -= 0x200;\n\t\tif (player->yinertia < -0x400) player->yinertia = -0x400;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// fire the missile launcher.\n// level: 0 - 2: weapon level from 1 - 3\n// is_super: bool: true if the player is firing the Super Missile Launcher\nstatic void PFireMissile(int level, bool is_super)\n{\nObject *o;\nint xoff, yoff;\n\n\tint object_type = (!is_super) ? OBJ_MISSILE_SHOT : OBJ_SUPERMISSILE_SHOT;\n\t\n\t// can only fire one missile at once on L1,\n\t// two missiles on L2, and two sets of three missiles on L3.\n\tstatic const uint8_t max_missiles_at_once[] = { 1, 2, 6 };\n\tif (CountObjectsOfType(object_type) >= max_missiles_at_once[level])\n\t{\n\t\t// give back the previously-decremented ammo so they don't lose it (hack)\n\t\tplayer->weapons[player->curWeapon].ammo++;\n\t\treturn;\n\t}\n\t\n\tint bullet_type = (!is_super) ? B_MISSILE_L1 : B_SUPER_MISSILE_L1;\n\tbullet_type += level;\n\t\n\t// level 1 & 2 fires just one missile\n\tFireSimpleBulletOffset(object_type, bullet_type, -4<<CSF, 0);\n\t\n\t// level 3 fires three missiles, they wave, and are \"offset\",\n\t// so if it's level 3 fire two more missiles.\n\tif (level == 2)\n\t{\n\t\t//\t\t\t\t\t\t\t\t\t norm\t super\n\t\tstatic const int recoil_upper[] = { 0x500,  0xd00 };\n\t\tstatic const int recoil_lower[] = { 0x700,  0x600 };\n\t\t\n\t\tif (player->look==DOWN || player->look==UP) { xoff = (4<<CSF); yoff = 0; }\n\t\t\t\t\t\t\t\t\t\t\t   else { yoff = (4<<CSF); xoff = 0; }\n\t\t\n\t\t// this one is higher\n\t\to = FireSimpleBullet(object_type, bullet_type, -xoff, -yoff);\n\t\tif (o->shot.dir==LEFT) \t\t o->xinertia = recoil_upper[is_super];\n\t\telse if (o->shot.dir==RIGHT) o->xinertia = -recoil_upper[is_super];\n\t\telse if (o->shot.dir==UP) \t o->yinertia = recoil_upper[is_super];\n\t\telse \t\t\t\t\t\t o->yinertia = -recoil_upper[is_super];\n\t\t\n\t\t// this one is lower\n\t\to = FireSimpleBullet(object_type, bullet_type, xoff, yoff);\n\t\tif (o->shot.dir==LEFT) \t\t o->xinertia = recoil_lower[is_super];\n\t\telse if (o->shot.dir==RIGHT) o->xinertia = -recoil_lower[is_super];\n\t\telse if (o->shot.dir==UP) \t o->yinertia = recoil_lower[is_super];\n\t\telse \t\t\t\t\t\t o->yinertia = -recoil_lower[is_super];\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void PFireFireball(int level)\n{\nstatic const int object_types[] = { OBJ_FIREBALL1, OBJ_FIREBALL23, OBJ_FIREBALL23 };\nstatic uchar max_fireballs[] = { 2, 3, 4 };\nint count;\n\n\tcount = (CountObjectsOfType(OBJ_FIREBALL1) + CountObjectsOfType(OBJ_FIREBALL23));\n\tif (count >= max_fireballs[level])\n\t{\n\t\treturn;\n\t}\n\t\n\t// the 8px offset fires the shot just a tiny bit behind the player--\n\t// you can't see the difference but it makes the shot correctly bounce if\n\t// you shoot while flat up against a wall, instead of embedding the fireball\n\t// in the wall.\n\tObject *fb = FireSimpleBulletOffset(object_types[level], B_FIREBALL1 + level, -8<<CSF, 0);\n\tfb->dir = player->dir;\n\tfb->nxflags &= ~NXFLAG_NO_RESET_YINERTIA;\n\t\n\tswitch(fb->shot.dir)\n\t{\n\t\tcase LEFT: fb->xinertia = -0x400; break;\n\t\tcase RIGHT: fb->xinertia = 0x400; break;\n\t\t\n\t\tcase UP:\n\t\t\tfb->xinertia = player->xinertia + ((player->dir==RIGHT) ? 128 : -128);\n\t\t\tif (player->xinertia) fb->dir = (player->xinertia > 0) ? RIGHT:LEFT;\n\t\t\tfb->yinertia = -0x5ff;\n\t\tbreak;\n\t\t\n\t\tcase DOWN:\n\t\t\tfb->xinertia = player->xinertia;\n\t\t\tif (player->xinertia) fb->dir = (player->xinertia > 0) ? RIGHT:LEFT;\n\t\t\tfb->yinertia = 0x5ff;\n\t\tbreak;\n\t}\n\n}\n\nstatic void PFireBlade(int level)\n{\n\tint numblades = CountObjectsOfType(OBJ_BLADE12_SHOT) + CountObjectsOfType(OBJ_BLADE3_SHOT);\n\tif (numblades >= 1) return;\n\t\n\tint dir = (player->look) ? player->look : player->dir;\n\t\n\tint x = player->CenterX();\n\tint y = player->CenterY();\n\t\n\tif (level == 2)\n\t{\n\t\tif (dir == RIGHT || dir == LEFT)\n\t\t{\n\t\t\ty -= (3 << CSF);\n\t\t\tx += (dir == LEFT) ? (3 << CSF) : -(3 << CSF);\n\t\t}\n\t}\n\telse\n\t{\n\t\tswitch(dir)\n\t\t{\n\t\t\tcase RIGHT: x -= (6 << CSF); y -= (3 << CSF); break;\n\t\t\tcase LEFT:  x += (6 << CSF); y -= (3 << CSF); break;\n\t\t\tcase UP:    y += (6 << CSF); break;\n\t\t\tcase DOWN:  y -= (6 << CSF); break;\n\t\t}\n\t}\n\t\n\tObject *shot = CreateObject(x, y, (level != 2) ? OBJ_BLADE12_SHOT : OBJ_BLADE3_SHOT);\n\tSetupBullet(shot, x, y, B_BLADE_L1+level, dir);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void PFireSnake(int level)\n{\n\tif (level == 2)\n\t{\n\t\tint count = (CountObjectsOfType(OBJ_SNAKE1_SHOT) + \\\n\t\t\t\t\t CountObjectsOfType(OBJ_SNAKE23_SHOT));\n\t\t\n\t\tif (count >= 4)\n\t\t\treturn;\n\t}\n\t\n\tint object_type = (level == 0) ? OBJ_SNAKE1_SHOT : OBJ_SNAKE23_SHOT;\n\tFireSimpleBulletOffset(object_type, B_SNAKE_L1+level, -5<<CSF, 0);\n}\n\n\nstatic void PFireNemesis(int level)\n{\n\tif (CountObjectsOfType(OBJ_NEMESIS_SHOT) >= 2)\n\t\treturn;\n\t\n\tFireSimpleBullet(OBJ_NEMESIS_SHOT, B_NEMESIS_L1+level);\n}\n\n\nstatic void PFireBubbler(int level)\n{\nstatic const int max_bubbles[] = { 4, 16, 16 };\n\n\tint count = CountObjectsOfType(OBJ_BUBBLER12_SHOT) + \\\n\t\t\t\tCountObjectsOfType(OBJ_BUBBLER3_SHOT);\n\t\n\tif (count >= max_bubbles[level])\n\t\treturn;\n\t\n\tint objtype = (level != 2) ? OBJ_BUBBLER12_SHOT : OBJ_BUBBLER3_SHOT;\n\tFireSimpleBulletOffset(objtype, B_BUBBLER_L1+level, -4<<CSF, 0);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// Spur fires an initial shot of Polar Star L3, then charges\n// as long as key is down. Fires when key released.\n// Released at L1: nothing\n// Released at L2: thin beam\n// Released at L3: dual beam\n// Released at Max: thick beam\n//\n// Initial shot is not fired if key is held on a different weapon\n// and then weapon is switched to spur.\n\n// fires the regular Polar Star shot when you first push button\nstatic void PFireSpur(void)\n{\n\tif (can_fire_spur())\n\t\tFireSimpleBulletOffset(OBJ_POLAR_SHOT, B_PSTAR_L3, -4<<CSF, 0);\n}\n\n// fires and handles charged shots\nstatic void PHandleSpur(void)\n{\nstatic const int FLASH_TIME = 10;\nWeapon *spur = &player->weapons[WPN_SPUR];\n\n\tif (player->curWeapon != WPN_SPUR)\n\t{\n\t\tspur->level = 0;\n\t\tspur->xp = 0;\n\t\treturn;\n\t}\n\t\n\tif (pinputs[FIREKEY])\n\t{\n\t\tif (!IsWeaponMaxed())\n\t\t{\n\t\t\tint amt = (player->equipmask & EQUIP_TURBOCHARGE) ? 3 : 2;\n\t\t\tAddXP(amt, true);\n\t\t\t\n\t\t\tif (IsWeaponMaxed())\n\t\t\t{\n\t\t\t\tsound(SND_SPUR_MAXED);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tspur->chargetimer++;\n\t\t\t\tif (spur->chargetimer & 2)\n\t\t\t\t{\n\t\t\t\t\tsound(SND_SPUR_CHARGE_1 + spur->level);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t// keep flashing even once at max\n\t\t\tstatusbar.xpflashcount = FLASH_TIME;\n\t\t\t\n\t\t\tif (player->equipmask & EQUIP_WHIMSTAR)\n\t\t\t\tadd_whimstar(&player->whimstar);\n\t\t}\n\t}\n\telse\n\t{\n\t\tif (spur->chargetimer)\n\t\t{\n\t\t\tif (spur->level > 0 && can_fire_spur())\n\t\t\t{\n\t\t\t\tint level = IsWeaponMaxed() ? 2 : (spur->level - 1);\n\t\t\t\tFireSimpleBulletOffset(OBJ_SPUR_SHOT, B_SPUR_L1+level, -4<<CSF, 0);\n\t\t\t}\n\t\t\t\n\t\t\tspur->chargetimer = 0;\n\t\t}\n\t\t\n\t\tspur->level = 0;\n\t\tspur->xp = 0;\n\t}\n\t\n\tif (statusbar.xpflashcount > FLASH_TIME)\n\t\tstatusbar.xpflashcount = FLASH_TIME;\n\n}\n\nstatic bool can_fire_spur(void)\n{\n\tif (CountObjectsOfType(OBJ_SPUR_SHOT))\n\t\treturn false;\n\t\n\treturn true;\n}\n\n// returns true if the current weapon has full xp at level 3 (is showing \"Max\")\nstatic bool IsWeaponMaxed(void)\n{\n\tWeapon *wpn = &player->weapons[player->curWeapon];\n\treturn (wpn->level == 2) && (wpn->xp == wpn->max_xp[2]);\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "p_arms.fdh",
    "content": "//hash:0b443ff1\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in caret.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in player.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nvoid GetPlayerShootPoint(int *x_out, int *y_out);\n\n\n/* located in playerstats.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nvoid AddXP(int xp, bool quiet);\n\n\n/* located in p_arms.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nvoid PResetWeapons();\nvoid PDoWeapons(void);\nvoid FireWeapon(void);\nvoid RunWeapon(bool firing);\nvoid SetupBullet(Object *shot, int x, int y, int btype, int dir);\nstatic Object *FireSimpleBullet(int otype, int btype, int xoff, int yoff);\nstatic Object *FireSimpleBulletOffset(int otype, int btype, int xoff, int yoff);\nstatic void PFirePolarStar(int level);\nstatic void PFireMachineGun(int level);\nvoid FireLevel23MGun(int x, int y, int level, int dir);\nvoid PMgunFly(void);\nstatic void PFireMissile(int level, bool is_super);\nstatic void PFireFireball(int level);\nstatic void PFireBlade(int level);\nstatic void PFireSnake(int level);\nstatic void PFireNemesis(int level);\nstatic void PFireBubbler(int level);\nstatic void PFireSpur(void);\nstatic void PHandleSpur(void);\nstatic bool can_fire_spur(void);\nstatic bool IsWeaponMaxed(void);\n\n\n/* located in statusbar.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nvoid stat_PrevWeapon(bool quiet);\nvoid stat_NextWeapon(bool quiet);\n\n\n/* located in input.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nbool justpushed(int k);\n\n\n/* located in ai/weapons/whimstar.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nvoid init_whimstar(WhimsicalStar *wh);\nvoid run_whimstar(WhimsicalStar *wh);\nvoid add_whimstar(WhimsicalStar *wh);\n\n\n/* located in sound/sound.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nvoid sound(int snd);\n\n\n/* located in common/misc.cpp */\n\n//--------------------[referenced from p_arms.cpp]-------------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "p_arms.h",
    "content": "\n#ifndef _P_ARMS_H\n#define _P_ARMS_H\n\n// player->weapons[] array\nenum\n{\n\tWPN_NONE \t\t\t= 0,\n\tWPN_SNAKE\t\t\t= 1,\n\tWPN_POLARSTAR\t\t= 2,\n\tWPN_FIREBALL\t\t= 3,\n\tWPN_MGUN\t\t\t= 4,\n\tWPN_MISSILE\t\t\t= 5,\n\tWPN_BUBBLER\t\t\t= 7,\n\tWPN_BLADE\t\t\t= 9,\n\tWPN_SUPER_MISSILE \t= 10,\n\tWPN_NEMESIS\t\t\t= 12,\n\tWPN_SPUR\t\t\t= 13,\n\t\n\tWPN_COUNT\t\t\t= 14\n};\n\n// stored inside player structure\nstruct Weapon\n{\n\tbool hasWeapon;\t\t\t// true if player has this weapon\n\tint xp, max_xp[3];\t\t// current XP, & max XP per level\n\tuint8_t level;\t\t\t// current level (0=L1 1=L2 2=L3)\n\tint ammo;\t\t\t\t// current ammo (0 = n/a)\n\tint maxammo;\t\t\t// max ammo (0 = unlimited)\n\t\n\t// for rapid fire weapons. if firerate = 0, must push for each shot.\n\tint firetimer;\n\tint firerate[3];\n\t\n\t// for recharging weapons\n\tint rechargetimer;\n\tint rechargerate[3];\n\t\n\t// for charged-shot weapons (Spur)\n\tint chargetimer;\n\t\n\tvoid SetFireRate(int l1, int l2, int l3)\n\t{\n\t\tfirerate[0] = l1;\n\t\tfirerate[1] = l2;\n\t\tfirerate[2] = l3;\n\t}\n\t\n\tvoid SetRechargeRate(int l1, int l2, int l3)\n\t{\n\t\trechargerate[0] = l1;\n\t\trechargerate[1] = l2;\n\t\trechargerate[2] = l3;\n\t}\n};\n\n// shot types for SetupBullet.\n// matches the order of bullet_table.\nenum\n{\n\tB_PSTAR_L1,\n\tB_PSTAR_L2,\n\tB_PSTAR_L3,\n\t\n\tB_MGUN_L1,\n\tB_MGUN_L2,\n\tB_MGUN_L2P2,\n\tB_MGUN_L2P3,\n\t\n\tB_MGUN_L3,\n\tB_MGUN_L3P2,\n\tB_MGUN_L3P3,\n\tB_MGUN_L3P4,\n\tB_MGUN_L3P5,\n\t\n\tB_MISSILE_L1,\n\tB_MISSILE_L2,\n\tB_MISSILE_L3,\n\t\n\tB_SUPER_MISSILE_L1,\n\tB_SUPER_MISSILE_L2,\n\tB_SUPER_MISSILE_L3,\n\t\n\tB_FIREBALL1,\n\tB_FIREBALL2,\n\tB_FIREBALL3,\n\t\n\tB_BLADE_L1,\n\tB_BLADE_L2,\n\tB_BLADE_L3,\n\t\n\tB_SNAKE_L1,\n\tB_SNAKE_L2,\n\tB_SNAKE_L3,\n\t\n\tB_NEMESIS_L1,\n\tB_NEMESIS_L2,\n\tB_NEMESIS_L3,\n\t\n\tB_BUBBLER_L1,\n\tB_BUBBLER_L2,\n\tB_BUBBLER_L3,\n\t\n\tB_SPUR_L1,\n\tB_SPUR_L2,\n\tB_SPUR_L3,\n\t\n\tB_CURLYS_NEMESIS,\n\t\n\tB_LAST\n};\n\n#endif\n"
  },
  {
    "path": "pause/dialog.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"dialog.h\"\n#include \"dialog.fdh\"\n#include \"../l10n_strings.h\"\n\nusing namespace Options;\nextern FocusStack optionstack;\n\n#ifdef _480X272 // 480x272 widescreen fix\n#define DLG_X\t\t((SCREEN_WIDTH / 2) - 110)\n#define DLG_Y\t\t((SCREEN_HEIGHT / 2) - 90)\n#define DLG_W\t\t240\n#define DLG_H\t\t180\n#else\n#define DLG_X\t\t((SCREEN_WIDTH / 2) - 88)\n#define DLG_Y\t\t((SCREEN_HEIGHT / 2) - 90)\n#define DLG_W\t\t190\n#define DLG_H\t\t180\n#endif\n\n#define REPEAT_WAIT\t30\n#define REPEAT_RATE\t4\n\nDialog::Dialog()\n{\n\tonclear = NULL;\n\tondismiss = NULL;\n\t\n\tfCoords.x = DLG_X;\n\tfCoords.y = DLG_Y;\n\tfCoords.w = DLG_W;\n\tfCoords.h = DLG_H;\n\tfTextX = (fCoords.x + 48);\n\t\n\tfCurSel = 0;\n\tfNumShown = 0;\n\tfRepeatTimer = 0;\n\t\n\toptionstack.AddItem(this);\n}\n\nDialog::~Dialog()\n{\n\tfor(int i=0;ODItem *item = ItemAt(i);i++)\n\t\tdelete item;\n\t\n\toptionstack.RemoveItem(this);\n}\n\nvoid Dialog::SetSize(int w, int h)\n{\n\tfCoords.w = w;\n\tfCoords.h = h;\n\tfCoords.x = ((DLG_W / 2) - (w / 2)) + DLG_X;\n\tfCoords.y = ((DLG_H / 2) - (h / 2)) + DLG_Y;\n\tfTextX = (fCoords.x + 34);\n}\n\nvoid Dialog::offset(int xd, int yd)\n{\n\tfCoords.x += xd;\n\tfCoords.y += yd;\n\tfTextX += xd;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nODItem *Dialog::AddItem(const char *text, \\\n\t\t\t\t\t\tvoid (*activate)(ODItem *, int), \\\n\t\t\t\t\t\tvoid (*update)(ODItem *),\\\n\t\t\t\t\t\tint id, int type)\n{\n\tODItem *item = new ODItem;\n\tmemset(item, 0, sizeof(ODItem));\n\t\n\tstrcpy(item->text, text);\n\t\n\titem->activate = activate;\n\titem->update = update;\n\titem->id = id;\n\titem->type = type;\n\t\n\tfItems.AddItem(item);\n\t\n\tif (update)\n\t\t(*update)(item);\n\t\n\treturn item;\n}\n\nODItem *Dialog::AddSeparator()\n{\n\treturn AddItem(\"\", NULL, NULL, -1, OD_SEPARATOR);\n}\n\nODItem *Dialog::AddDismissalItem(const char *text)\n{\n    if (!text) text = LC_RETURN;\n\treturn AddItem(text, NULL, NULL, -1, OD_DISMISS);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Dialog::Draw()\n{\n\tTextBox::DrawFrame(fCoords.x, fCoords.y, fCoords.w, fCoords.h);\n\t\n\tint x = fTextX;\n\tint y = (fCoords.y + 18);\n\tfor(int i=0;;i++)\n\t{\n\t\tODItem *item = (ODItem *)fItems.ItemAt(i);\n\t\tif (!item) break;\n\t\t\n\t\tif (i < fNumShown)\n\t\t\tDrawItem(x, y, item);\n\t\t\n\t\tif (i == fCurSel)\n\t\t\tdraw_sprite(x - 16, y, SPR_WHIMSICAL_STAR, 1);\n\t\t\n\t\ty += GetFontHeight();\n\t}\n\t\n\tif (fNumShown < 99)\n\t\tfNumShown++;\n}\n\nvoid Dialog::DrawItem(int x, int y, ODItem *item)\n{\nchar text[132];\n\n\tstrcpy(text, item->text);\n\tstrcat(text, item->suffix);\n\t\n\t// for replay times\n\t// comes first because it can trim the text on the left side if needed\n\tif (item->raligntext[0])\n\t{\n\t\tint rx = (fCoords.x + fCoords.w) - 10;\n\t\trx -= GetFontWidth(item->raligntext, 5);\n\t\tfont_draw(rx, y, item->raligntext, 5);\n\t\t\n\t\t// ... ellipses if too long\n\t\tint maxx = (rx - 4);\n\t\t//FillRect(maxx, 0, maxx, SCREEN_HEIGHT, 0,255,0);\n\t\tfor(;;)\n\t\t{\n\t\t\tint wd = GetFontWidth(text, 0);\n\t\t\tif (x+wd < maxx) break;\n\t\t\t\n\t\t\tint len = strlen(text);\n\t\t\tif (len <= 3) { *text = 0; break; }\n\t\t\t\n\t\t\ttext[len-1] = 0;\n\t\t\ttext[len-2] = '.';\n\t\t\ttext[len-3] = '.';\n\t\t\ttext[len-4] = '.';\n\t\t}\n\t}\n\t\n\tfont_draw(x, y, text, 0);\n\t\n\t// for key remaps\n\tif (item->righttext[0])\n\t{\n\t\tfont_draw((fCoords.x + fCoords.w) - 62, y, item->righttext, 0);\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Dialog::RunInput()\n{\n\tif (inputs[UPKEY] || inputs[DOWNKEY])\n\t{\n\t\tint dir = (inputs[DOWNKEY]) ? 1 : -1;\n\t\t\n\t\tif (!fRepeatTimer)\n\t\t{\n\t\t\tfRepeatTimer = (lastinputs[UPKEY] || lastinputs[DOWNKEY]) ? REPEAT_RATE : REPEAT_WAIT;\n\t\t\tsound(SND_MENU_MOVE);\n\t\t\t\n\t\t\tint nitems = fItems.CountItems();\n\t\t\tfor(;;)\n\t\t\t{\n\t\t\t\tfCurSel += dir;\n\t\t\t\tif (fCurSel < 0) fCurSel = (nitems - 1);\n\t\t\t\t\t\t\telse fCurSel %= nitems;\n\t\t\t\t\n\t\t\t\tODItem *item = ItemAt(fCurSel);\n\t\t\t\tif (item && item->type != OD_SEPARATOR) break;\n\t\t\t}\n\t\t}\n\t\telse fRepeatTimer--;\n\t}\n\telse fRepeatTimer = 0;\n\t\n\t\n\tif (buttonjustpushed() || justpushed(RIGHTKEY) || justpushed(LEFTKEY))\n\t{\n\t\tint dir = (!inputs[LEFTKEY] || buttonjustpushed() || justpushed(RIGHTKEY)) ? 1 : -1;\n\t\t\n\t\tODItem *item = ItemAt(fCurSel);\n\t\tif (item)\n\t\t{\n\t\t\tif (item->type == OD_DISMISS)\n\t\t\t{\n\t\t\t\tif (dir > 0)\n\t\t\t\t{\n\t\t\t\t\tsound(SND_MENU_MOVE);\n\t\t\t\t\tif (ondismiss) (*ondismiss)();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (item->activate)\n\t\t\t{\n\t\t\t\t(*item->activate)(item, dir);\n\t\t\t\t\n\t\t\t\tif (item->update)\n\t\t\t\t\t(*item->update)(item);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/*if (justpushed(ESCKEY))\n\t{\n\t\tDismiss();\n\t\treturn;\n\t}*/\n}\n\nvoid Dialog::SetSelection(int sel)\n{\n\tif (sel < 0) sel = fItems.CountItems();\n\tif (sel >= fItems.CountItems()) sel = (fItems.CountItems() - 1);\n\t\n\tfCurSel = sel;\n}\n\n\nvoid Dialog::Dismiss()\n{\n\tdelete this;\n}\n\nvoid Dialog::Refresh()\n{\n\tfor(int i=0;ODItem *item = ItemAt(i);i++)\n\t{\n\t\tif (item->update)\n\t\t\t(*item->update)(item);\n\t}\n}\n\nvoid Dialog::Clear()\n{\n\tif (onclear)\n\t\t(*onclear)();\n\t\n\tfor(int i=0;ODItem *item = ItemAt(i);i++)\n\t\tdelete item;\n\t\n\tfItems.MakeEmpty();\n\tfNumShown = 0;\n\tfCurSel = 0;\n}\n\n\n\n\n"
  },
  {
    "path": "pause/dialog.fdh",
    "content": "//hash:fd95fe73\n//automatically generated by Makegen\n\n/* located in tsc.cpp */\n\n//-----------------[referenced from pause/dialog.cpp]----------------//\nvoid Clear();\n\n\n/* located in input.cpp */\n\n//-----------------[referenced from pause/dialog.cpp]----------------//\nbool buttonjustpushed(void);\nbool justpushed(int k);\n\n\n/* located in graphics/font.cpp */\n\n//-----------------[referenced from pause/dialog.cpp]----------------//\nint GetFontHeight();\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from pause/dialog.cpp]----------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "pause/dialog.h",
    "content": "\n#ifndef _DIALOG_H\n#define _DIALOG_H\n\n#include \"../common/BList.h\"\n#include \"options.h\"\nnamespace Options {\n\nclass ODItem;\n\nenum OD_TYPES\n{\n\tOD_CHOICE,\n\tOD_SEPARATOR,\n\tOD_DISMISS\n};\n\nclass Dialog : public FocusHolder\n{\npublic:\n\tDialog();\n\t~Dialog();\n\t\n\tODItem *AddItem(const char *text, \\\n\t\t\t\t\tvoid (*activate)(ODItem *, int)=NULL, \\\n\t\t\t\t\tvoid (*update)(ODItem *)=NULL, int id=-1, int type=OD_CHOICE);\n\tODItem *AddSeparator();\n\tODItem *AddDismissalItem(const char *text = NULL);\n\t\n\tvoid Draw();\n\tvoid RunInput();\n\tvoid Dismiss();\n\tvoid Clear();\n\tvoid Refresh();\n\t\n\tvoid SetSize(int w, int h);\n\tvoid offset(int xd, int yd);\n\tODItem *ItemAt(int index) { return (ODItem *)fItems.ItemAt(index); }\n\t\n\tvoid SetSelection(int sel);\n\tint GetSelection() { return fCurSel; }\n\tvoid ShowFull() { fNumShown = 99; }\n\t\n\tvoid (*onclear)();\n\tvoid (*ondismiss)();\n\t\nprivate:\n\tvoid DrawItem(int x, int y, ODItem *item);\n\t\n\tint fCurSel;\n\tint fNumShown;\t\t\t// for text-draw animation on entry\n\tint fRepeatTimer;\n\tBList fItems;\n\t\n\tstruct { int x, y, w, h; } fCoords;\n\tint fTextX;\n\tbool fDismissOnFocus;\n};\n\n\nstruct ODItem\n{\n\tchar text[100];\n\tchar suffix[32];\n\tchar righttext[64];\n\tchar raligntext[32];\n\tint type, id;\n\t\n\tvoid (*update)(ODItem *item);\n\tvoid (*activate)(ODItem *item, int dir);\n};\n\n}\n\n#endif\n"
  },
  {
    "path": "pause/message.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"message.h\"\n#include \"message.fdh\"\nusing namespace Options;\nextern FocusStack optionstack;\nextern int last_sdl_key;\t// from inputs.cpp\n\n#define MESSAGE_X\t\t((SCREEN_WIDTH / 2) - 112)\n#define MESSAGE_Y\t\t((SCREEN_HEIGHT / 2) - 30)\n#define MESSAGE_W\t\t244\n#define MESSAGE_H\t\t48\n\nMessage::Message(const char *msg, const char *msg2)\n{\n\trawKeyReturn = NULL;\n\ton_dismiss = NULL;\n\tlast_sdl_key = -1;\n\t\n\tfMsg = strdup(msg);\n\tfMsg2 = strdup(msg2 ? msg2 : \"\");\n\t\n\tfMsgX = MESSAGE_X + ((MESSAGE_W / 2) - (GetFontWidth(fMsg, 0) / 2));\n\t\n\tif (fMsg2[0])\n\t{\n\t\tfMsgY = MESSAGE_Y + 10;\n\t\tfMsg2X = MESSAGE_X + ((MESSAGE_W / 2) - (GetFontWidth(fMsg2, 0) / 2));\n\t\tfMsg2Y = fMsgY + GetFontHeight() + 4;\n\t\tfShowDelay = 0;\n\t}\n\telse\n\t{\n\t\tfMsgY = (MESSAGE_Y + ((MESSAGE_H / 2) - (GetFontHeight() / 2))) - 1;\n\t\tfShowDelay = 4;\n\t}\n\t\n\toptionstack.AddItem(this);\n}\n\nMessage::~Message()\n{\n\toptionstack.RemoveItem(this);\n\tfree(fMsg);\n\tfree(fMsg2);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Message::Draw()\n{\n\tTextBox::DrawFrame(MESSAGE_X, MESSAGE_Y, MESSAGE_W, MESSAGE_H);\n\t\n\tif (fShowDelay > 0)\n\t{\n\t\tfShowDelay--;\n\t\treturn;\n\t}\n\t\n\tfont_draw(fMsgX, fMsgY, fMsg, 0);\n\t\n\tif (fMsg2[0])\n\t\tfont_draw(fMsg2X, fMsg2Y, fMsg2, 0);\n}\n\n\nvoid Message::RunInput()\n{\n\tif (last_sdl_key != -1)\n\t{\n\t\tif (rawKeyReturn) *rawKeyReturn = last_sdl_key;\n\t\tif (on_dismiss)   (*on_dismiss)(this);\n\t\t\n\t\tdelete this;\n\t}\n}\n\n\n\n\n"
  },
  {
    "path": "pause/message.fdh",
    "content": "//hash:b11f32f6\n//automatically generated by Makegen\n\n/* located in graphics/font.cpp */\n\n//-----------------[referenced from pause/message.cpp]---------------//\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint GetFontHeight();\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n"
  },
  {
    "path": "pause/message.h",
    "content": "\n#ifndef _MESSAGE_H\n#define _MESSAGE_H\n\n#include \"options.h\"\nnamespace Options {\n\nclass Message : public FocusHolder\n{\npublic:\n\tMessage(const char *msg, const char *msg2 = NULL);\n\t~Message();\n\t\n\tvoid Draw();\n\tvoid RunInput();\n\t\n\tint *rawKeyReturn;\n\tvoid (*on_dismiss)(Message *msg);\n\t\nprivate:\n\tchar *fMsg, *fMsg2;\n\tint fMsgX, fMsgY;\n\tint fMsg2X, fMsg2Y;\n\t\n\tint fShowDelay;\n};\n\n\n}\n\n#endif\n"
  },
  {
    "path": "pause/objects.cpp",
    "content": "\n// A miniature implementation of the object manager.\n// It runs the little \"mascots\" that come on the screen after a while in the options menu.\n#include \"../nx.h\"\n#include \"../common/llist.h\"\n#include \"options.h\"\n#include \"objects.fdh\"\nusing namespace Options;\n\nObject *firstobj, *lastobj;\n\n#define OC_CONTROLLER\t\t0\n#define OC_QUOTE\t\t\t1\n#define OC_IKACHAN\t\t\t2\n\nvoid Options::init_objects()\n{\n\tfirstobj = NULL;\n\tlastobj = NULL;\n\tcreate_object(0, 0, OC_CONTROLLER);\n}\n\nvoid Options::close_objects()\n{\n\tObject *o = firstobj;\n\twhile(o)\n\t{\n\t\tObject *next = o->next;\n\t\tdelete o;\n\t\to = next;\n\t}\n\t\n\tfirstobj = lastobj = NULL;\n}\n\nvoid Options::run_and_draw_objects(void)\n{\nvoid (*ai_routine[])(Object *) = {\n\tai_oc_controller,\n\tai_oc_quote,\n\tai_oc_ikachan\n};\n\n\t// draw character\n\tObject *o = firstobj;\n\twhile(o)\n\t{\n\t\t(*ai_routine[o->type])(o);\n\t\tObject *next = o->next;\n\t\t\n\t\t// cull deleted\n\t\tif (o->deleted)\n\t\t{\n\t\t\tLL_REMOVE(o, prev, next, firstobj, lastobj);\n\t\t\tdelete o;\n\t\t}\n\t\telse if (o->sprite != SPR_NULL)\n\t\t{\n\t\t\to->x += o->xinertia;\n\t\t\to->y += o->yinertia;\n\t\t\t\n\t\t\tdraw_sprite(o->x >> CSF, o->y >> CSF, o->sprite, o->frame, o->dir);\n\t\t}\n\t\t\n\t\to = next;\n\t}\n}\n\nObject *Options::create_object(int x, int y, int type)\n{\nstatic Object ZERO;\n\n\tObject *o = new Object;\n\t*o = ZERO;\n\t\n\to->x = x;\n\to->y = y;\n\to->type = type;\n\tLL_ADD_END(o, prev, next, firstobj, lastobj);\n\t\n\treturn o;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void ai_oc_controller(Object *o)\n{\n\t//AIDEBUG;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\t\t// init\n\t\t{\n\t\t\to->timer = 400;\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\tcase 1:\t\t// delay before next event\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = (++o->timer2 * 10);\n\t\t\t\to->timer = 0;\n\t\t\t\t\n\t\t\t\tif (o->timer2 >= 2)\n\t\t\t\t\to->timer2 = 0;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 10:\t// quote\n\t\t{\n\t\t\tcreate_object(0, 0, OC_QUOTE);\n\t\t\to->timer = 1100;\n\t\t\to->state = 1;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\t// ikachans\n\t\t{\n\t\t\to->timer++;\n\t\t\t\n\t\t\t// current\n\t\t\t/*if (o->timer < 175)\n\t\t\t{\n\t\t\t\tif ((o->timer % 6) == 1)\n\t\t\t\t\tcreate_object(-16<<CSF, random(-16, SCREEN_HEIGHT) << CSF, OC_CURRENT);\n\t\t\t}*/\n\t\t\t\n\t\t\tif (o->timer <= 150)\n\t\t\t{\n\t\t\t\tif ((o->timer % 10) == 1)\n\t\t\t\t\tcreate_object(-16<<CSF, random(-16, SCREEN_HEIGHT) << CSF, OC_IKACHAN);\n\t\t\t}\n\t\t\t\n\t\t\tif (o->timer > 300)\n\t\t\t\to->state = 0;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nstatic void ai_oc_quote(Object *o)\n{\n\t//AIDEBUG;\n\t\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->xmark  = (SCREEN_WIDTH - 50) << CSF;\n\t\t\to->xmark2 = (SCREEN_WIDTH + 10) << CSF;\n\t\t\t\n\t\t\to->x = o->xmark2;\n\t\t\to->y = (SCREEN_HEIGHT - sprites[o->sprite].h - 8) << CSF;\n\t\t\to->dir = LEFT;\n\t\t\t\n\t\t\to->sprite = SPR_OC_QUOTE;\n\t\t\to->state = 20;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 20:\n\t\t{\n\t\t\to->dir = LEFT;\n\t\t\to->timer = 0;\n\t\t\to->animtimer = 2;\n\t\t\to->state = 21;\n\t\t}\n\t\tcase 21:\n\t\t{\n\t\t\tif (o->x > o->xmark)\n\t\t\t{\n\t\t\t\tANIMATE(8, 0, 3);\n\t\t\t\tXMOVE(0x100);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\to->frame = 0;\n\t\t\t\to->xinertia = 0;\n\t\t\t\t\n\t\t\t\tif (++o->timer > 20)\n\t\t\t\t{\n\t\t\t\t\to->state = 22;\n\t\t\t\t\to->timer = 0;\n\t\t\t\t\to->frame = 4;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\tcase 22:\n\t\t{\n\t\t\to->timer++;\n\t\t\tif (o->timer == 100) o->frame = 0;\n\t\t\tif (o->timer > 130)\n\t\t\t{\n\t\t\t\to->state = 30;\n\t\t\t\to->timer = 0;\n\t\t\t\to->dir = RIGHT;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 30:\n\t\t{\n\t\t\tANIMATE(8, 0, 3);\n\t\t\tXMOVE(0x100);\n\t\t\t\n\t\t\tif (o->x > o->xmark2)\n\t\t\t\to->deleted = true;\n\t\t}\n\t\tbreak;\n\t}\n}\n\n\nstatic void ai_oc_ikachan(Object *o)\n{\n\tswitch(o->state)\n\t{\n\t\tcase 0:\n\t\t{\n\t\t\to->state = 1;\n\t\t\to->timer = random(3, 20);\n\t\t\to->sprite = SPR_IKACHAN;\n\t\t}\n\t\tcase 1:\t\t// he pushes ahead\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = 2;\n\t\t\t\to->timer = random(10, 50);\n\t\t\t\to->frame = 1;\n\t\t\t\to->xinertia = 0x600;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 2:\t\t// after a short time his tentacles look less whooshed-back\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = 3;\n\t\t\t\to->timer = random(40, 50);\n\t\t\t\to->frame = 2;\n\t\t\t\to->yinertia = random(-0x100, 0x100);\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase 3:\t\t// gliding\n\t\t{\n\t\t\tif (--o->timer <= 0)\n\t\t\t{\n\t\t\t\to->state = 1;\n\t\t\t\to->timer = 0;\n\t\t\t\to->frame = 0;\n\t\t\t}\n\t\t\t\n\t\t\to->xinertia -= 0x10;\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (o->x > SCREEN_WIDTH<<CSF)\n\t\to->deleted = true;\n}\n\n/*\nstatic void ai_oc_current(Object *o)\n{\n\to->sprite = SPR_WATER_DROPLET;\n\to->frame = random(0, 4);\n\t\n\to->xinertia = 0x400;\n\t\n\tif (o->x > SCREEN_WIDTH<<CSF)\n\t\to->deleted = true;\n}\n*/\n\n\n"
  },
  {
    "path": "pause/objects.fdh",
    "content": "//hash:721c5ba0\n//automatically generated by Makegen\n\n/* located in pause/objects.cpp */\n\n//-----------------[referenced from pause/objects.cpp]---------------//\nstatic void ai_oc_controller(Object *o);\nstatic void ai_oc_quote(Object *o);\nstatic void ai_oc_ikachan(Object *o);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from pause/objects.cpp]---------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "pause/options.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"../replay.h\"\n#include \"options.h\"\n#include \"dialog.h\"\n#include \"message.h\"\n#include \"../l10n_strings.h\"\n\nusing namespace Options;\n\n#include \"options.fdh\"\n\nFocusStack optionstack;\n\n#define SLIDE_SPEED\t\t\t\t32\n#define SLIDE_DIST\t\t\t\t(3 * SLIDE_SPEED)\n\nstatic struct\n{\n\tDialog *dlg, *subdlg;\n\tDialog *dismiss_on_focus;\n\tint mm_cursel;\n\tbool InMainMenu;\n\tint xoffset;\n\t\n\tint selected_replay;\n\tint remapping_key, new_sdl_key;\n} opt;\n\n\nbool options_init(int retmode)\n{\n\tmemset(&opt, 0, sizeof(opt));\n\tOptions::init_objects();\n\topt.dlg = new Dialog;\n\t\n\topt.xoffset = SLIDE_DIST;\n\topt.dlg->offset(-SLIDE_DIST, 0);\n\t\n\tEnterMainMenu();\n\topt.dlg->ondismiss = DialogDismissed;\n\topt.dlg->ShowFull();\n\n#if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX)\n    inputs[OPTIONS_KEY] = 0;\n#else\n    inputs[F3KEY] = 0;\n#endif\n\n    sound(SND_MENU_MOVE);\n\treturn 0;\n}\n\nvoid options_close()\n{\n\tOptions::close_objects();\n\twhile(FocusHolder *fh = optionstack.ItemAt(0))\n\t\tdelete fh;\n\t\n\tsettings_save();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid options_tick()\n{\nint i;\nFocusHolder *fh;\n\n#if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX)\n    if (justpushed(OPTIONS_KEY))\n#else\n    if (justpushed(F3KEY))\n#endif\n\t{\n\t\tgame.pause(0);\n\t\treturn;\n\t}\n\t\n\tClearScreen(BLACK);\n\tOptions::run_and_draw_objects();\n\t\n\tfh = optionstack.ItemAt(optionstack.CountItems() - 1);\n\tif (fh)\n\t{\n\t\tfh->RunInput();\n\t\tif (game.paused != GP_OPTIONS) return;\n\t\t\n\t\tfh = optionstack.ItemAt(optionstack.CountItems() - 1);\n\t\tif (fh == opt.dismiss_on_focus && fh)\n\t\t{\n\t\t\topt.dismiss_on_focus = NULL;\n\t\t\tdelete fh;\n\t\t}\n\t}\n\t\n\tfor(i=0;;i++)\n\t{\n\t\tfh = optionstack.ItemAt(i);\n\t\tif (!fh) break;\n\t\t\n\t\tfh->Draw();\n\t}\n\t\n\tif (opt.xoffset > 0)\n\t{\n\t\topt.dlg->offset(SLIDE_SPEED, 0);\n\t\topt.xoffset -= SLIDE_SPEED;\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid DialogDismissed()\n{\n\tif (opt.InMainMenu)\n\t{\n\t\tmemset(inputs, 0, sizeof(inputs));\n\t\tgame.pause(false);\n\t}\n\telse\n\t{\n\t\tEnterMainMenu();\n\t}\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void EnterMainMenu()\n{\nDialog *dlg = opt.dlg;\n\n\tdlg->Clear();\n\t\n    dlg->AddItem(LC_RES, _res_change, _res_get);\n    dlg->AddItem(LC_KEYS, EnterControlsMenu);\n    dlg->AddItem(LC_REPLAY, EnterReplayMenu);\n\t\n\tdlg->AddSeparator();\n#if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX)\n    dlg->AddItem(LC_DEBUG, EnterDebugMenu);\n#else\n    dlg->AddItem(LC_DEBUG_KEYS, _debug_change, _debug_get);\n#endif\n    dlg->AddItem(LC_SAVE_SLOTS, _save_change, _save_get);\n\t\n\tdlg->AddSeparator();\n\t\n    dlg->AddItem(LC_MUSIC, _music_change, _music_get);\n    dlg->AddItem(LC_SOUND, _sound_change, _sound_get);\n\t\n\tdlg->AddSeparator();\n\tdlg->AddDismissalItem();\n\t\n\tdlg->SetSelection(opt.mm_cursel);\n\tdlg->onclear = LeavingMainMenu;\n\topt.InMainMenu = true;\n}\n\nvoid LeavingMainMenu()\n{\n\topt.mm_cursel = opt.dlg->GetSelection();\n\topt.dlg->onclear = NULL;\n\topt.InMainMenu = false;\n}\n\nvoid _res_get(ODItem *item)\n{\n\tconst char **reslist = Graphics::GetResolutions();\n\t\n\tif (settings->resolution < 0 || \\\n\t\tsettings->resolution >= count_string_list(reslist))\n\t{\n\t\titem->suffix[0] = 0;\n\t}\n\telse\n    {\n#if defined (_480X272) || defined (_320X240)\n        strcpy(item->suffix, reslist[0]);\n#else\n        strcpy(item->suffix, reslist[settings->resolution]);\n#endif\n\t}\n}\n\n\nvoid _res_change(ODItem *item, int dir)\n{\nconst char **reslist = Graphics::GetResolutions();\nint numres = count_string_list(reslist);\nint newres;\n\n\tsound(SND_DOOR);\n\t\n\tnewres = (settings->resolution + dir);\n\tif (newres >= numres) newres = 0;\n\tif (newres < 0) newres = (numres - 1);\n\t\n\t// because on my computer, a SDL bug causes switching to fullscreen to\n\t// not restore the resolution properly on exit, and it keeps messing up all\n\t// the windows when I press it accidently.\n\tif (newres == 0 && settings->inhibit_fullscreen)\n\t{\n        new Message(LC_FULLSCREEN_DIS, LC_FULLSCREEN_CON);\n\t\tsound(SND_GUN_CLICK);\n\t\treturn;\n\t}\n#if (defined(_L10N_CP1251) && (!defined (_480X272) || !defined (_320X240))) || defined(__HAIKU__) // L10N Hack\n    if (newres == 1) {\n        new Message(LC_RES_FAILED_320);\n        return;\n    }\n#endif\n    if (!Graphics::SetResolution(newres, true))\n\t{\n#if defined (_480X272) || defined (_320X240)\n        settings->resolution = 0;\n#else\n        settings->resolution = newres;\n#endif\n\t}\n\telse\n\t{\n        new Message(LC_RES_FAILED);\n\t\tsound(SND_GUN_CLICK);\n    }\n}\n\n/************ DEBUG MENU ************/\nstatic void EnterDebugMenu(ODItem *item, int dir)\n{\n    Dialog *dlg = opt.dlg;\n    dlg->Clear();\n\n    sound(SND_MENU_MOVE);\n\n    dlg->AddItem(LC_FPS, _fps_change, _fps_get);\n    dlg->AddItem(LC_GODMODE, _godmode, _godmode_get);\n    dlg->AddItem(LC_BOXES, _drawBoxes, _drawBoxes_get);\n\n    dlg->AddSeparator();\n\n    dlg->AddItem(LC_ADDEXP, _add_xp);\n    dlg->AddItem(LC_SAVE_NOW, _save_now);\n    // dlg->AddItem(\"Disable Debug Features\", _disable_debug);\n\n    dlg->AddSeparator();\n\n    dlg->AddDismissalItem();\n}\n\nvoid _godmode(ODItem *item, int dir)\n{\n    if (!(settings->enable_debug_keys)) {\n        settings->enable_debug_keys = true;\n    }\n    game.debug.god ^= 1;\n    sound(SND_MENU_SELECT);\n}\n\nvoid _godmode_get(ODItem *item)\n{\n    static const char *strs[] = { \"\", \" =\" };\n    strcpy(item->suffix, strs[game.debug.god]);\n}\n\nvoid _fps_change(ODItem *item, int dir)\n{\n    settings->show_fps ^= 1;\n    sound(SND_MENU_SELECT);\n}\n\nvoid _fps_get(ODItem *item)\n{\n    static const char *strs[] = { \"\", \" =\" };\n    strcpy(item->suffix, strs[settings->show_fps]);\n}\n\nvoid _save_now(ODItem *item, int dir)\n{\n    game_save(settings->last_save_slot);\n    sound(SND_MENU_SELECT);\n    console.Print(\"Game saved.\");\n}\n\nvoid _drawBoxes(ODItem *item, int dir)\n{\n    if (!(settings->enable_debug_keys)) {\n        settings->enable_debug_keys = true;\n    }\n    game.debug.DrawBoundingBoxes ^= 1;\n    sound(SND_MENU_SELECT);\n}\n\nvoid _drawBoxes_get(ODItem *item)\n{\n    static const char *strs[] = { \"\", \" =\" };\n    strcpy(item->suffix, strs[game.debug.DrawBoundingBoxes]);\n}\n\nvoid _add_xp(ODItem *item, int dir)\n{\n    AddXP(1);\n}\n\nvoid _disable_debug(ODItem *item, int dir)\n{\n    if(settings->enable_debug_keys) {\n        game.debug.god = false;\n        game.debug.DrawBoundingBoxes = false;\n        settings->enable_debug_keys = false;\n        settings->show_fps = false;\n        sound(SND_MENU_SELECT);\n    }\n}\n\n/************ END DEBUG MENU ************/\n\nvoid _debug_change(ODItem *item, int dir)\n{\n\tsettings->enable_debug_keys ^= 1;\n\tsound(SND_MENU_SELECT);\n}\n\nvoid _debug_get(ODItem *item)\n{\n\tstatic const char *strs[] = { \"\", \" =\" };\n\tstrcpy(item->suffix, strs[settings->enable_debug_keys]);\n}\n\n\nvoid _save_change(ODItem *item, int dir)\n{\n\tsettings->multisave ^= 1;\n\tsound(SND_MENU_MOVE);\n}\n\nvoid _save_get(ODItem *item)\n{\n\tstatic const char *strs[] = { \"1\", \"5\" };\n\tstrcpy(item->suffix, strs[settings->multisave]);\n}\n\n\nvoid _sound_change(ODItem *item, int dir)\n{\n\tsettings->sound_enabled ^= 1;\n\tsound(SND_MENU_SELECT);\n}\n\nvoid _sound_get(ODItem *item)\n{\n    static const char *strs[] = { LC_OFF, LC_ON };\n\tstrcpy(item->suffix, strs[settings->sound_enabled]);\n}\n\nvoid _music_change(ODItem *item, int dir)\n{\n\tmusic_set_enabled((settings->music_enabled + 1) % 3);\n\tsound(SND_MENU_SELECT);\n}\n\nvoid _music_get(ODItem *item)\n{\n    static const char *strs[] = { LC_OFF, LC_ON, LC_BOSS_ONLY };\n\tstrcpy(item->suffix, strs[settings->music_enabled]);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void EnterReplayMenu(ODItem *item, int dir)\n{\nDialog *dlg = opt.dlg;\nReplaySlotInfo slot;\nbool have_replays = false;\n\n\tdlg->Clear();\n\tsound(SND_MENU_MOVE);\n\t\n\tfor(int i=0;i<MAX_REPLAYS;i++)\n\t{\n\t\tReplay::GetSlotInfo(i, &slot);\n\t\t\n\t\tif (slot.status != RS_UNUSED)\n\t\t{\n\t\t\tconst char *mapname = map_get_stage_name(slot.hdr.stageno);\n\t\t\tdlg->AddItem(mapname, EnterReplaySubmenu, _upd_replay, i);\n\t\t\thave_replays = true;\n\t\t}\n\t}\n\t\n\tif (!have_replays)\n        dlg->AddDismissalItem(LC_NO_RPL);\n\t\n\tdlg->AddSeparator();\n\tdlg->AddDismissalItem();\n}\n\nvoid _upd_replay(ODItem *item)\n{\nReplaySlotInfo slot;\n\n\tReplay::GetSlotInfo(item->id, &slot);\n\t\n\tReplay::FramesToTime(slot.hdr.total_frames, &item->raligntext[1]);\n\titem->raligntext[0] = (slot.hdr.locked) ? '=':' ';\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid EnterReplaySubmenu(ODItem *item, int dir)\n{\n\topt.selected_replay = item->id;\n\tsound(SND_MENU_MOVE);\n\t\n\topt.subdlg = new Dialog;\n\topt.subdlg->SetSize(80, 60);\n\t\n    opt.subdlg->AddItem(LC_PLAY, _play_replay);\n    opt.subdlg->AddItem(LC_KEEP, _keep_replay);\n}\n\n\nvoid _keep_replay(ODItem *item, int dir)\n{\nchar fname[MAXPATHLEN];\nReplayHeader hdr;\n\n\tGetReplayName(opt.selected_replay, fname);\n\t\n\tif (Replay::LoadHeader(fname, &hdr))\n\t{\n        new Message(LC_FAIL_LOAD_HEADER);\n\t\tsound(SND_GUN_CLICK);\n\t\topt.dismiss_on_focus = opt.subdlg;\n\t\treturn;\n\t}\n\t\n\thdr.locked ^= 1;\n\t\n\tif (Replay::SaveHeader(fname, &hdr))\n\t{\n        new Message(LC_FAIL_WRITE_HEADER);\n\t\tsound(SND_GUN_CLICK);\n\t\topt.dismiss_on_focus = opt.subdlg;\n\t\treturn;\n\t}\n\t\n\tsound(SND_MENU_MOVE);\n\topt.subdlg->Dismiss();\n\topt.dlg->Refresh();\n}\n\n\nvoid _play_replay(ODItem *item, int dir)\n{\n\tgame.switchstage.param = opt.selected_replay;\n\tgame.switchmap(START_REPLAY);\n\t\n\tgame.setmode(GM_NORMAL);\n\tgame.pause(false);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void EnterControlsMenu(ODItem *item, int dir)\n{\nDialog *dlg = opt.dlg;\n\n\tdlg->Clear();\n\tsound(SND_MENU_MOVE);\n\t\n    dlg->AddItem(LC_KB_LEFT, _edit_control, _upd_control, LEFTKEY);\n    dlg->AddItem(LC_KB_RIGHT, _edit_control, _upd_control, RIGHTKEY);\n    dlg->AddItem(LC_KB_UP, _edit_control, _upd_control, UPKEY);\n    dlg->AddItem(LC_KB_DOWN, _edit_control, _upd_control, DOWNKEY);\n\t\n#ifndef _L10N_CP1251\n\tdlg->AddSeparator();\n#endif\n\t\n    dlg->AddItem(LC_KB_JUMP, _edit_control, _upd_control, JUMPKEY);\n    dlg->AddItem(LC_KB_FIRE, _edit_control, _upd_control,  FIREKEY);\n    dlg->AddItem(LC_KB_WPN_PREV, _edit_control, _upd_control, PREVWPNKEY);\n    dlg->AddItem(LC_KB_WPN_NEXT, _edit_control, _upd_control, NEXTWPNKEY);\n    dlg->AddItem(LC_KB_INV, _edit_control, _upd_control, INVENTORYKEY);\n    dlg->AddItem(LC_KB_MAP, _edit_control, _upd_control, MAPSYSTEMKEY);\n\t\n#ifndef _L10N_CP1251\n\tdlg->AddSeparator();\n#endif\n\tdlg->AddDismissalItem();\n}\n\nstatic void _upd_control(ODItem *item)\n{\n\tint keysym = input_get_mapping(item->id);\n\tconst char *keyname = SDL_GetKeyName((SDLKey)keysym);\n\t\n\tmaxcpy(item->righttext, keyname, sizeof(item->righttext) - 1);\n}\n\nstatic void _edit_control(ODItem *item, int dir)\n{\nMessage *msg;\n\n\topt.remapping_key = item->id;\n\topt.new_sdl_key = -1;\n\t\n    msg = new Message(LC_KB_NEW_KEY, input_get_name(opt.remapping_key));\n\tmsg->rawKeyReturn = &opt.new_sdl_key;\n\tmsg->on_dismiss = _finish_control_edit;\n\t\n\tsound(SND_DOOR);\n}\n\nstatic void _finish_control_edit(Message *msg)\n{\nint inputno = opt.remapping_key;\nint new_sdl_key = opt.new_sdl_key;\nint i;\n\n\tif (input_get_mapping(inputno) == new_sdl_key)\n\t{\n\t\tsound(SND_MENU_MOVE);\n\t\treturn;\n\t}\n\t\n\t// check if key is already in use\n\tfor(i=0;i<INPUT_COUNT;i++)\n\t{\n\t\tif (i != inputno && input_get_mapping(i) == new_sdl_key)\n\t\t{\n            new Message(LC_KB_BUSY, input_get_name(i));\n\t\t\tsound(SND_GUN_CLICK);\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\tinput_remap(inputno, new_sdl_key);\n\tsound(SND_MENU_SELECT);\n\topt.dlg->Refresh();\n}\n"
  },
  {
    "path": "pause/options.fdh",
    "content": "//hash:7ce8659a\n//automatically generated by Makegen\n\n/* located in map.cpp */\n\n//-----------------[referenced from pause/options.cpp]---------------//\nconst char *map_get_stage_name(int mapno);\n\n\n/* located in settings.cpp */\n\n//-----------------[referenced from pause/options.cpp]---------------//\nbool settings_save(Settings *setfile);\n\n\n/* located in tsc.cpp */\n\n//-----------------[referenced from pause/options.cpp]---------------//\nvoid Clear();\n\n\n/* located in input.cpp */\n\n//-----------------[referenced from pause/options.cpp]---------------//\nbool justpushed(int k);\nint input_get_mapping(int keyindex);\nconst char *input_get_name(int index);\nvoid input_remap(int keyindex, int sdl_key);\n\n\n/* located in replay.cpp */\n\n//-----------------[referenced from pause/options.cpp]---------------//\nconst char *GetReplayName(int slotno, char *buffer);\n\n\n/* located in pause/options.cpp */\n\n//-----------------[referenced from pause/options.cpp]---------------//\nbool options_init(int retmode);\nvoid options_close();\nvoid options_tick();\nvoid DialogDismissed();\nstatic void EnterMainMenu();\nvoid LeavingMainMenu();\nvoid _res_get(ODItem *item);\nvoid _res_change(ODItem *item, int dir);\n\nstatic void EnterDebugMenu(ODItem *item, int dir);\nvoid _godmode(ODItem *item, int dir);\nvoid _godmode_get(ODItem *item);\nvoid _fps_change(ODItem *item, int dir);\nvoid _fps_get(ODItem *item);\nvoid _save_now(ODItem *item, int dir);\nvoid _drawBoxes(ODItem *item, int dir);\nvoid _drawBoxes_get(ODItem *item);\nvoid _add_xp(ODItem *item, int dir);\n\nvoid _debug_change(ODItem *item, int dir);\nvoid _debug_get(ODItem *item);\nvoid _save_change(ODItem *item, int dir);\nvoid _save_get(ODItem *item);\nvoid _sound_change(ODItem *item, int dir);\nvoid _sound_get(ODItem *item);\nvoid _music_change(ODItem *item, int dir);\nvoid _music_get(ODItem *item);\nvoid _disable_debug(ODItem *item, int dir);\nstatic void EnterReplayMenu(ODItem *item, int dir);\nvoid _upd_replay(ODItem *item);\nvoid EnterReplaySubmenu(ODItem *item, int dir);\nvoid _keep_replay(ODItem *item, int dir);\nvoid _play_replay(ODItem *item, int dir);\nstatic void EnterControlsMenu(ODItem *item, int dir);\nstatic void _upd_control(ODItem *item);\nstatic void _edit_control(ODItem *item, int dir);\nstatic void _finish_control_edit(Message *msg);\n\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from pause/options.cpp]---------------//\nvoid sound(int snd);\nvoid music_set_enabled(int newstate);\n\n\n/* located in common/misc.cpp */\n\n//-----------------[referenced from pause/options.cpp]---------------//\nint count_string_list(const char *list[]);\nvoid maxcpy(char *dst, const char *src, int maxlen);\n\n"
  },
  {
    "path": "pause/options.h",
    "content": "\n#ifndef _OPTIONS_H\n#define _OPTIONS_H\n\nnamespace Options\n{\n\t// class for something like a dialog box that can hold the focus.\n\t// there is a stack of them. everyone in the stack is drawn,\n\t// and the topmost one receives HandleKey events.\n\tclass FocusHolder\n\t{\n\tpublic:\n\t\tvirtual ~FocusHolder() { }\n\t\t\n\t\tvirtual void Draw() = 0;\n\t\tvirtual void RunInput() = 0;\n\t};\n\t\n\t\n\tclass FocusStack : public BList\n\t{\n\tpublic:\n\t\tFocusHolder *ItemAt(int index) { return (FocusHolder *)BList::ItemAt(index); }\n\t};\n\t\n\t\n\tvoid init_objects();\n\tvoid close_objects();\n\tvoid run_and_draw_objects(void);\n\tObject *create_object(int x, int y, int type);\n\n};\t// end namespace\n\n\nbool options_init(int param);\nvoid options_tick(void);\nvoid options_close(void);\n\n#endif\n"
  },
  {
    "path": "pause/pause.cpp",
    "content": "\n#include \"../nx.h\"\n#include \"pause.fdh\"\n#include \"../l10n_strings.h\"\n\nbool pause_init(int param)\n{\n\tmemset(lastinputs, 1, sizeof(lastinputs));\n\treturn 0;\n}\n\nvoid pause_tick()\n{\n#ifdef _DINGUX\n    ClearScreen(DK_BLUE);\n    const char *strMenu = \"Select:Quit / B:Resume / A:Reset\";\n    int cx = (SCREEN_WIDTH / 2) - (GetFontWidth(strMenu, 0) / 2) - 4;\n    int cy = (SCREEN_HEIGHT / 2) - GetFontHeight();\n    int f3wd = font_draw(cx, cy, \"Select\", 0);\n    int f3wd1 = font_draw(f3wd + cx, cy, LC_PS_QUIT, 0, &bluefont);\n    int f3wd2 = font_draw(f3wd1 + f3wd + cx,  cy, \" / B\", 0);\n    int f3wd3 = font_draw(f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESUME, 0, &bluefont);\n    int f3wd4 = font_draw(f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, \" / A\", 0);\n    font_draw(f3wd4 + f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESET, 0, &bluefont);\n#elif _MOTOMAGX\n    ClearScreen(DK_BLUE);\n    const char *strMenu = \"Camera:Quit / Center:Resume / Vol+:Reset\";\n    int cx = (SCREEN_WIDTH / 2) - (GetFontWidth(strMenu, 0) / 2) - 4;\n    int cy = (SCREEN_HEIGHT / 2) - GetFontHeight();\n    int f3wd = font_draw(cx, cy, \"Camera\", 0);\n    int f3wd1 = font_draw(f3wd + cx, cy, LC_PS_QUIT, 0, &bluefont);\n    int f3wd2 = font_draw(f3wd1 + f3wd + cx,  cy, \" / Center\", 0);\n    int f3wd3 = font_draw(f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESUME, 0, &bluefont);\n    int f3wd4 = font_draw(f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, \" / Vol+\", 0);\n    font_draw(f3wd4 + f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESET, 0, &bluefont);\n#elif _MOTOEZX\n    ClearScreen(DK_BLUE);\n    const char *strMenu = \"Camera:Quit / Vol-:Resume / Vol+:Reset\";\n    int cx = (SCREEN_WIDTH / 2) - (GetFontWidth(strMenu, 0) / 2) - 4;\n    int cy = (SCREEN_HEIGHT / 2) - GetFontHeight();\n    int f3wd = font_draw(cx, cy, \"Camera\", 0);\n    int f3wd1 = font_draw(f3wd + cx, cy, LC_PS_QUIT, 0, &bluefont);\n    int f3wd2 = font_draw(f3wd1 + f3wd + cx,  cy, \" / Vol-\", 0);\n    int f3wd3 = font_draw(f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESUME, 0, &bluefont);\n    int f3wd4 = font_draw(f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, \" / Vol+\", 0);\n    font_draw(f3wd4 + f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESET, 0, &bluefont);\n#elif defined(_L10N_CP1251) && !defined(_DINGUX) && !defined(_MOTOMAGX) && !defined(_MOTOEZX)\n    ClearScreen(BLACK);\n    const char *strMenu = \"ESC:Quit / F1:Resume / F2:Reset\";\n    int cx = (SCREEN_WIDTH / 2) - (GetFontWidth(strMenu, 0) / 2) - 4;\n    int cy = (SCREEN_HEIGHT / 2) - GetFontHeight();\n    int f3wd = font_draw(cx, cy, \"ESC\", 0);\n    int f3wd1 = font_draw(f3wd + cx, cy, LC_PS_QUIT, 0, &bluefont);\n    int f3wd2 = font_draw(f3wd1 + f3wd + cx,  cy, \" / F1\", 0);\n    int f3wd3 = font_draw(f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESUME, 0, &bluefont);\n    int f3wd4 = font_draw(f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, \" / F2\", 0);\n    font_draw(f3wd4 + f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESET, 0, &bluefont);\n#else\n    ClearScreen(BLACK);\n    int cx = (SCREEN_WIDTH / 2) - (sprites[SPR_RESETPROMPT].w / 2);\n    int cy = (SCREEN_HEIGHT / 2) - (sprites[SPR_RESETPROMPT].h / 2);\n    int f3wd = 0;\n    draw_sprite(cx, cy, SPR_RESETPROMPT);\n#endif\n\n#ifdef _DINGUX\n    const char *str = \"L:Options\";\n    cx = (SCREEN_WIDTH / 2) - (GetFontWidth(str, 0) / 2) - 4;\n    cy = (SCREEN_HEIGHT - 8) - GetFontHeight();\n    f3wd = font_draw(cx, cy, \"L\", 0);\n#elif _MOTOMAGX\n    const char *str = \"#:Options\";\n    cx = (SCREEN_WIDTH / 2) - (GetFontWidth(str, 0) / 2) - 4;\n    cy = (SCREEN_HEIGHT - 8) - GetFontHeight();\n    f3wd = font_draw(cx, cy, \"#\", 0);\n#elif _MOTOEZX\n    const char *str = \"Mod + Camera:Options\";\n    cx = (SCREEN_WIDTH / 2) - (GetFontWidth(str, 0) / 2) - 4;\n    cy = (SCREEN_HEIGHT - 8) - GetFontHeight();\n    f3wd = font_draw(cx, cy, \"Mod + Camera\", 0);\n#else\n    const char *str = \"F3:Options\";\n    cx = (SCREEN_WIDTH / 2) - (GetFontWidth(str, 0) / 2) - 4;\n    cy = (SCREEN_HEIGHT - 8) - GetFontHeight();\n    f3wd = font_draw(cx, cy, \"F3\", 0);\n#endif\n    font_draw(cx + f3wd, cy, LC_PS_OPTIONS, 0, &bluefont);\n\t\n#if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX)\n#define F1KEY FIREKEY\n#define F2KEY JUMPKEY\n#endif\n\n\t// resume\n\tif (justpushed(F1KEY))\n\t{\n\t\tlastinputs[F1KEY] = true;\n\t\tgame.pause(false);\n\t\treturn;\n\t}\n\t\n\t// reset\n\tif (justpushed(F2KEY))\n\t{\n\t\tlastinputs[F2KEY] = true;\n\t\tgame.reset();\n\t\treturn;\n\t}\n\t\n\t// exit\n\tif (justpushed(ESCKEY))\n\t{\n\t\tlastinputs[ESCKEY] = true;\n\t\tgame.running = false;\n\t\treturn;\n\t}\n}\n\n"
  },
  {
    "path": "pause/pause.fdh",
    "content": "//hash:f8b50229\n//automatically generated by Makegen\n\n/* located in input.cpp */\n\n//------------------[referenced from pause/pause.cpp]----------------//\nbool justpushed(int k);\n\n\n/* located in pause/pause.cpp */\n\n//------------------[referenced from pause/pause.cpp]----------------//\nbool pause_init(int param);\nvoid pause_tick();\n\n\n/* located in graphics/font.cpp */\n\n//------------------[referenced from pause/pause.cpp]----------------//\nint GetFontWidth(const char *text, int spacing, bool is_shaded);\nint GetFontHeight();\nint font_draw(int x, int y, const char *text, int spacing, NXFont *font);\n\n"
  },
  {
    "path": "pause/pause.h",
    "content": "\n#ifndef _PAUSE_H\n#define _PAUSE_H\n\n\nbool pause_init(int retmode);\nvoid pause_tick(void);\n\n#endif\n"
  },
  {
    "path": "platform/EZX/EZX_SDL_PollEvent.cpp",
    "content": "#include \"EZX_SDL_PollEvent.h\"\n\n#include <SDL/SDL_mixer.h>\n\nSDL_AudioSpec EZX_SDL_obtained;\nbool EZX_SDL_qAudioSuspend;\n\nvoid EZX_SDL_mix_CloseAudio(void);\n\nint EZX_SDL_PollEvent(SDL_Event *event)\n{\n    int result = SDL_PollEvent(event);\n    if (!result) {\n        return 0;\n    }\n    if (event->type == SDL_ACTIVEEVENT) {\n        if (event->active.state == SDL_APPINPUTFOCUS && !event->active.gain) {\n            EZX_SDL_mix_SuspendAudio(); // Use SDL_mixer\n            for (;;) {\n                result = SDL_WaitEvent(event);\n                if (!result) {\n                    continue;\n                }\n                if (event->type == SDL_QUIT) {\n                    return 1;\n                }\n                if (event->type != SDL_ACTIVEEVENT) {\n                    continue;\n                }\n                if (event->active.state == SDL_APPINPUTFOCUS && event->active.gain) {\n                    EZX_SDL_mix_ResumeAudio(); // Use SDL_mixer\n                    return 1;\n                }\n            }\n        }\n    }\n    return result;\n}\n\n// Audio through SDL\nvoid EZX_SDL_SuspendAudio()\n{\n    SDL_CloseAudio();\n    EZX_SDL_qAudioSuspend = true;\n}\n\nint EZX_SDL_ResumeAudio()\n{\n    if (SDL_OpenAudio(&EZX_SDL_obtained, NULL) < 0) {\n        return -1;\n    }\n    SDL_PauseAudio(0);\n    EZX_SDL_qAudioSuspend = false;\n    return 0;\n}\n\n// Audio through SDL_mixer\nvoid EZX_SDL_mix_SuspendAudio()\n{\n    Mix_SuspendAudio();\n}\n\nint EZX_SDL_mix_ResumeAudio()\n{\n    int result = Mix_ResumeAudio();\n    if (result == (-1)) {\n        EZX_SDL_mix_CloseAudio();\n        return (-1);\n    }\n}\n\nvoid EZX_SDL_mix_CloseAudio(void)\n{\n    Mix_CloseAudio();\n}\n"
  },
  {
    "path": "platform/EZX/EZX_SDL_PollEvent.h",
    "content": "#ifndef EZX_SDL_POLLEVENT\n#define EZX_SDL_POLLEVENT\n\n#include <SDL/SDL.h>\n\nint EZX_SDL_PollEvent(SDL_Event *event);\n\n// Audio through SDL\nvoid EZX_SDL_SuspendAudio();\nint EZX_SDL_ResumeAudio();\n\n// Audio through SDL_mixer\nvoid EZX_SDL_mix_SuspendAudio();\nint EZX_SDL_mix_ResumeAudio();\n\n#endif // EZX_SDL_POLLEVENT\n"
  },
  {
    "path": "platform/EZX/NXEngine.desktop",
    "content": "[Desktop Entry]\nName=Cave Story\nVersion=1.0.0.4-Rev4\nDescription=Cave Story is a freeware platform-adventure video game released in 2004 for the PC. It was developed over five years by Daisuke \"Pixel\" Amaya in his free time. Cave Story features 2D platform mechanics and is a homage to the classic games the developer played in his youth, such as Metroid.\nAuthor=Cave Story: Daisuke \"Pixel\" Amaya; NXEngine: Caitlin \"rogueeve\" Shaw.\nComment=Ported to EZX (A1200, A1600, E2, E6) by EXL, 16-FEB-2015\nVendor=forum.motofan.ru\nExec=run.sh\nBigIcon=icon_ezx_big.png\nIcon=icon_ezx_small.png\nType=Application\nCategory=Games\nShared=2\n"
  },
  {
    "path": "platform/EZX/run.sh",
    "content": "#!/bin/bash\n\nhere=`echo $0 | sed -e 's/\\/'$(basename $0)'$//'`; if [ \"$here\" = \"`basename $0`\" ]; then here=\"`pwd`\"; fi\n. /home/native/.profile\nGAMES=/mmc/mmca1/games\napp=\"nx.ezx\"\nexport HOME=$here\nmkdir -p $GAMES/logs\n\nif [ -f $GAMES/gamesrc ]; then\n   . $GAMES/gamesrc\nelse\n   export LD_LIBRARY_PATH=$GAMES/lib:$LD_LIBRARY_PATH\n   #export SDL_QT_INVERT_ROTATION=1\nfi\n\ncd $here\nif [ ! -f \"$here/$app\" ]; then\n\techo \"ERROR: The application binary is missing!\" > $GAMES/logs/$app.log 2>&1\n\texit 1\nfi\n\nsleep 1\n\nexec $here/$app > $GAMES/logs/$app.log 2>&1\n"
  },
  {
    "path": "platform/Haiku/NXEngine.sh",
    "content": "#!/bin/bash\nif [[ `locale -l` == ru* ]] ;\nthen\n    EXE=\"`finddir B_SYSTEM_APPS_DIRECTORY`/NXEngine/RUS/Cave Story\"\nelse\n    EXE=\"`finddir B_SYSTEM_APPS_DIRECTORY`/NXEngine/ENG/Cave Story\"\nfi\n\"$EXE\" $@\n"
  },
  {
    "path": "platform/Haiku/nxengine.rdef.in",
    "content": "resource app_flags B_SINGLE_LAUNCH;\n\nresource app_version {\n\tmajor  = @MAJOR@,\n\tmiddle = @MIDDLE@,\n\tminor  = @MINOR@,\n\n\tvariety = B_APPV_FINAL,\n\tinternal = 0,\n\n\tshort_info = \"NXEngine\",\n\tlong_info = \"@LONG_INFO@\"\n};\n\nresource app_signature \"@APP_SIGNATURE@\";\n\nresource vector_icon array {\n\t$\"6E6369660803A9BDC503A9824A03DAEFDE030110010394A7AD038A9DA0032946\"\n\t$\"560501020A20284E284C264C262C282C282A5A2A5A2C5C2C5C2E5E2E5E4C5C4C\"\n\t$\"5C4E5A4E5A5058505854565456564A564A4E3E4E3E523C523C543A543A562E56\"\n\t$\"2E523052304E0A043030305050505030390A0701001001158402040A00010102\"\n\t$\"40C000000000000000400000C78000C3FFFF0A010101023A0000000000000000\"\n\t$\"400000470000C400000A010101023A00000000000000004000004A8000C40000\"\n\t$\"0A020101023C00000000000000003C000046000048C0000A020101023C000000\"\n\t$\"00000000003C00004A400048C0000A020101023800000000000000003A00004A\"\n\t$\"50004940000A020101023800000000000000003A00004AF0004940000A020101\"\n\t$\"023800000000000000003A00004640004940000A020101023800000000000000\"\n\t$\"003A00004860004940000A020101023800000000000000003A000047400048C0\"\n\t$\"000A020101023800000000000000003A00004A900048C0000A03010102380000\"\n\t$\"0000000000003BFFFF47400048C0000A030101023800000000000000003BFFFF\"\n\t$\"4A900048C0000A030101023C000000000000000037FFFF4A3FFF48A0000A0301\"\n\t$\"01023C000000000000000037FFFF45FFFF48A0000A0301010238000000000000\"\n\t$\"000037FFFF463FFF48E0000A0301010238000000000000000037FFFF485FFF48\"\n\t$\"E0000A0301010238000000000000000037FFFF4A4FFF48E0000A030101023800\"\n\t$\"0000000000000037FFFF4AEFFF48E0000A030101023E80000000000000003A00\"\n\t$\"00467FFF4A20000A030101023E0000000000000000380000477FFF4A70000A05\"\n\t$\"01010238000000000000000038000046400048A0000A05010102380000000000\"\n\t$\"00000038000048600048A0000A050101023800000000000000003800004A5000\"\n\t$\"48A0000A050101023800000000000000003800004AF00048A0000A0401010238\"\n\t$\"00000000000000003800004AD00048E0000A0401010238000000000000000038\"\n\t$\"00004A700048E0000A0401010238000000000000000038000048200048E0000A\"\n\t$\"0401010238000000000000000038000046C00048E0000A040101023800000000\"\n\t$\"000000003800004640004740000A050101023800000000000000003800004580\"\n\t$\"0046C0000A060101023800000000000000003800004480004A90000A06010102\"\n\t$\"3800000000000000003800004B30004A90000A06010102380000000000000000\"\n\t$\"3800004B30004640000A0001010238000000000000000038000047C00048E000\"\n\t$\"0A000101023800000000000000003800004AB00048E0000A0601010238000000\"\n\t$\"00000000003F80004580000822220A06010102408000000000000000380000C6\"\n\t$\"800046C0000A020101023800000000000000003FC000448000C300000A020101\"\n\t$\"023800000000000000003FC0004B3000C300000A0201010240C0000000000000\"\n\t$\"00B80000C780004740000A0601010240C000000000000000B80000C780004AF0\"\n\t$\"000A060101023D8000000000000000BA00004640004B40000A060101023C0000\"\n\t$\"000000000000B800004800004B50000A060101023D0000000000000000B80000\"\n\t$\"4600004B70000A060101023D0000000000000000BC80004A40004BB0000A0601\"\n\t$\"0102380000000000000000C0A0004B50004C48000A0601010238000000000000\"\n\t$\"0000C060004B70004C18000A06010102380000000000000000C020004B90004B\"\n\t$\"F0000A06010102380000000000000000BFC0004BB0004BB0000A020101023C00\"\n\t$\"00000000000000B8000044FFFF4AD0000A000101023C0000000000000000B800\"\n\t$\"004680004B50000A000101023C8000000000000000B800004A50004B50000A02\"\n\t$\"0101023C8000000000000000B800004A50004AD0000A01010102380000000000\"\n\t$\"0000003DC0004B900047E0000A030101023800000000000000003E5FFF4B7000\"\n\t$\"46E000\"\n};\n"
  },
  {
    "path": "platform/Linux/vbesync.c",
    "content": "\n#include <stdio.h>\n#include <fcntl.h>\n\n#if 0\n#include <libdrm/drm.h>\n#endif\n\n#include <errno.h>\n#define DRM_VBLANK_RELATIVE\t\t0x1\n#if 0\nvoid platform_sync_to_vblank(void)\n{\nstatic char initilized = 0;\nstatic int fd;\nint ret;\n\n\tif (!initilized)\n\t{\n\t\tinitilized = 1;\n\t\t\n\t\tprintf(\"Linux vbesync: opening DRM card interface...\\n\");\n\t\tfd = open(\"/dev/dri/card0\", O_RDWR);\n\t\tif (fd == -1)\n\t\t{\n\t\t\tprintf(\"Failed to open DRM interface; sync-to-vblank will not be done.\\n\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tprintf(\"Linux vbesync: DRM-based sync-to-vblank activated.\\n\");\n\t}\n\telse if (fd == -1)\n\t{\n\t\treturn;\n\t}\n\t\n\tdrm_wait_vblank_t vbl;\n\t\n\tvbl.request.type = DRM_VBLANK_RELATIVE;\n\tvbl.request.sequence = 1;\n\t\n\tdo\n\t{\n\t\tret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl);\n\t\tvbl.request.type &= ~DRM_VBLANK_RELATIVE;\n\t}\n\twhile(ret && errno == EINTR);\n\t\n}\n#endif\n"
  },
  {
    "path": "platform/Linux/vbesync.fdh",
    "content": "//hash:3d032dcf\n//automatically generated by Makegen\n\n/* located in platform/Linux/vbesync.c */\n\n//-------------[referenced from platform/Linux/vbesync.c]------------//\nvoid platform_sync_to_vblank(void);\n\n"
  },
  {
    "path": "platform.cpp",
    "content": "\n#include <SDL.h>\n#include <stdio.h>\n#include \"config.h\"\n#include \"platform.fdh\"\n\n#ifndef __SDLSHIM__\n\nFILE *fileopen(const char *fname, const char *mode)\n{\n\treturn fopen(fname, mode);\n}\n\n#else\n\nFILE *fileopen(const char *fname, const char *mode)\n{\n\treturn SDLS_fopen(fname, mode);\n}\n\n#endif\n\n"
  },
  {
    "path": "platform.fdh",
    "content": "//hash:19a15e6b\n//automatically generated by Makegen\n\n/* located in platform.cpp */\n\n//-------------------[referenced from platform.cpp]------------------//\nFILE *fileopen(const char *fname, const char *mode);\nFILE *fileopen(const char *fname, const char *mode);\n\n"
  },
  {
    "path": "platform.h",
    "content": "\n#ifndef _PLATFORM_H\n#define _PLATFORM_H\n\nextern \"C\"\n{\n\tvoid platform_sync_to_vblank(void);\n};\n\n\n\n#endif\n"
  },
  {
    "path": "player.cpp",
    "content": "\n#include \"nx.h\"\n#include \"inventory.h\"\n#include \"playerstats.fdh\"\n#include \"player.fdh\"\n\nPlayer *player = NULL;\nstatic void InitWeapon(int wpn, int l1, int l2, int l3, int maxammo=0);\n\nbool pinputs[INPUT_COUNT];\nbool lastpinputs[INPUT_COUNT];\n\nvoid PInitFirstTime()\n{\n\tplayer->dir = RIGHT;\n\tplayer->hp = player->maxHealth = 3;\n\tplayer->nxflags |= NXFLAG_FOLLOW_SLOPE;\n\t\n\tplayer->ninventory = 0;\n\t\n\tmemset(player->weapons, 0, sizeof(player->weapons));\n\t\n\tInitWeapon(WPN_POLARSTAR, \t\t10, 20, 10);\n\tInitWeapon(WPN_MGUN, \t\t\t30, 40, 10, 100);\n\tInitWeapon(WPN_MISSILE,\t\t\t10, 20, 10, 10);\n\tInitWeapon(WPN_FIREBALL,\t\t10, 20, 20);\n\tInitWeapon(WPN_BLADE,\t\t\t15, 18, 0);\n\tInitWeapon(WPN_BUBBLER,\t\t\t10, 20, 5);\n\tInitWeapon(WPN_SUPER_MISSILE,\t30, 60, 10, 10);\n\tInitWeapon(WPN_SNAKE,\t\t\t30, 40, 16);\n\tInitWeapon(WPN_SPUR,\t\t\t40, 60, 200);\n\tInitWeapon(WPN_NEMESIS,\t\t\t1,  1,  0);\n\t\n\tplayer->weapons[WPN_MGUN].SetFireRate(6, 6, 6);\n\tplayer->weapons[WPN_MGUN].SetRechargeRate(5, 5, 5);\n\t\n\tplayer->weapons[WPN_BUBBLER].SetFireRate(0, 7, 7);\n\tplayer->weapons[WPN_BUBBLER].SetRechargeRate(20, 1, 1);\n\t\n\tplayer->curWeapon = WPN_NONE;\n\t\n\tif (player->XPText) delete player->XPText;\n\tplayer->XPText = new FloatText(SPR_WHITENUMBERS);\n\t\n\t// initialize player repel points\n\tPInitRepel();\n}\n\n\nstatic void InitWeapon(int wpn, int l1, int l2, int l3, int maxammo)\n{\n\tplayer->weapons[wpn].max_xp[0] = l1;\n\tplayer->weapons[wpn].max_xp[1] = l2;\n\tplayer->weapons[wpn].max_xp[2] = l3;\n\tplayer->weapons[wpn].maxammo = maxammo;\n}\n\n\nvoid InitPlayer(void)\n{\n\tplayer->lookaway = false;\n\tplayer->walking = false;\n\tplayer->dead = false;\n\tplayer->drowned = false;\n\tplayer->disabled = false;\n\t\n\tplayer->hurt_time = 0;\n\tplayer->hurt_flash_state = 0;\n\tplayer->water_shield_frame = 0;\n\tplayer->movementmode = MOVEMODE_NORMAL;\n\tplayer->inputs_locked_lasttime = true;\n\t\n\tplayer->booststate = BOOST_OFF;\n\tplayer->lastbooststate = BOOST_OFF;\n\tplayer->boosterfuel = BOOSTER_FUEL_QTY;\n\t\n\tplayer->xinertia = 0;\n\tplayer->yinertia = 0;\n\t\n\tplayer->riding = NULL;\n\tplayer->lastriding = NULL;\n\tplayer->cannotride = NULL;\n\t\n\tplayer->DamageText->Reset();\n\tplayer->XPText->Reset();\n\tstatusbar.xpflashcount = 0;\n\t\n\tPResetWeapons();\n\tPSelectSprite();\n\t\n\t// this prevents a splash if we start underwater, and prevents us\n\t// from drowning immediately since our air isn't yet set up\n\tplayer->touchattr = TA_WATER;\n\tplayer->airleft = 1000;\n\tplayer->airshowtimer = 0;\n}\n\nPlayer::~Player()\n{\n\tif (XPText)\n\t{\n\t\tdelete XPText;\n\t\tXPText = NULL;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid HandlePlayer(void)\n{\n\t// freeze player for the split-second between <TRA to a new map and the\n\t// start of the on-entry script for that map. (Fixes: player could shoot during\n    // end sequence if he holds key down).\n\tif (game.switchstage.mapno != -1)\n\t\treturn;\n\t\n\tPUpdateInput();\n\t\n\tif (!player->dead)\n\t{\n\t\tPHandleAttributes();\t\t\t// handle special tile attributes\n\t\tPHandleSolidMushyObjects();\t\t// handle objects like bugs marked \"solid / mushy\"\n\t\t\n\t\tPDoWeapons();\t// p_arms.cpp\n\t\tPDoHurtFlash();\n\t\t\n\t\tswitch((inputs[DEBUG_MOVE_KEY] && settings->enable_debug_keys) ? MOVEMODE_DEBUG : \\\n\t\t\t   player->movementmode)\n\t\t{\n\t\t\tcase MOVEMODE_NORMAL:\n\t\t\t{\n\t\t\t\tPDoBooster();\n\t\t\t\tPDoBoosterEnd();\n\t\t\t\tPDoWalking();\n\t\t\t\tPDoLooking();\n\t\t\t\tPDoJumping();\n\t\t\t\tPDoFalling();\n\t\t\t\tPSelectFrame();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase MOVEMODE_ZEROG:\t\t// Ironhead battle/UNI 1\n\t\t\t{\n\t\t\t\tPHandleZeroG();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase MOVEMODE_DEBUG:\n\t\t\t{\n\t\t\t\tplayer->xinertia = player->yinertia = 0;\n\t\t\t\tplayer->blockl = player->blockr = player->blockd = player->blocku = 0;\n\t\t\t\t\n\t\t\t\tif (inputs[DOWNKEY]) player->y += 0x1000;\n\t\t\t\tif (inputs[UPKEY]) player->y -= 0x1000;\n                if (inputs[LEFTKEY]) { player->x -= 0x1000; player->dir = LEFT; }\n                if (inputs[RIGHTKEY]) { player->x += 0x1000; player->dir = RIGHT; }\n\t\t\t\t\n\t\t\t\tmap_scroll_jump(player->x, player->y);\n\t\t\t\t\n\t\t\t\tplayer->frame = 2;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tplayer->xinertia = player->yinertia = 0;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// handle some special features, like damage and bouncy, of\n\t\t// 100% solid objects such as moving blocks. It's put at the end\n\t\t// so that we can see the desired inertia of the player before\n\t\t// it's canceled out by any block points that are set. That way\n\t\t// we can tell if the player is trying to move into it.\n\t\tPHandleSolidBrickObjects();\n\t}\n\t\n\t// apply inertia\n\tPDoPhysics();\n\t\n\t// thud sound when land on some objects\n\tif (player->riding && !player->lastriding &&\n\t\t(player->riding->nxflags & NXFLAG_THUD_ON_RIDING))\n\t{\n\t\tsound(SND_THUD);\n\t}\n}\n\n// player aftermove routine\nvoid HandlePlayer_am(void)\n{\n\t//debug(\"xinertia: %s\", strhex(player->xinertia));\n\t//debug(\"yinertia: %s\", strhex(player->yinertia));\n\t//debug(\"booststate: %d\", player->booststate);\n\t//debug(\"y: %d\", player->y>>CSF);\n\t//debug(\"riding %x\", player->riding);\n\t//debug(\"block: %d%d%d%d\", player->blockl, player->blockr, player->blocku, player->blockd);\n\t\n\t// if player is riding some sort of platform apply it's inertia to him\n\tif (player->riding)\n\t{\n\t\tplayer->apply_xinertia(player->riding->xinertia);\n\t\tplayer->apply_yinertia(player->riding->yinertia);\n\t}\n\t\n\t// keep player out of blocks \"SMB1 style\"\n\tPDoRepel();\n\t\n\t// handle landing and bonking head\n\tif (player->blockd && player->yinertia > 0)\n\t{\n\t\tif (player->yinertia > 0x400 && !player->hide)\n\t\t\tsound(SND_THUD);\n\t\t\n\t\tplayer->yinertia = 0;\n\t\tplayer->jumping = 0;\n\t}\n\telse if (player->blocku && player->yinertia < 0)\n\t{\n\t\t// he behaves a bit differently when bonking his head on a\n\t\t// solid-brick object vs. bonking his head on the map.\n\t\t\n\t\t// bonk-head star effect\n\t\tif (player->yinertia < -0x200 && !player->hide && \\\n\t\t\tplayer->blocku == BLOCKED_MAP)\n\t\t{\n\t\t\tsound(SND_BONK_HEAD);\n\t\t\teffect(player->CenterX(), player->y, EFFECT_BONKPLUS);\n\t\t}\n\t\t\n\t\t// bounces off ceiling with booster 0.8\n\t\tif (player->booststate == BOOST_08)\n\t\t{\n\t\t\tplayer->yinertia = 0x200;\n\t\t}\n\t\telse if (player->bopped_object && player->bopped_object->yinertia != 0)\n\t\t{\n\t\t\t// no clear yinertia when bop head on OBJ_BLOCK_MOVEV in labyrinth.\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayer->yinertia = 0;\n\t\t}\n\t\t\n\t\tplayer->jumping = false;\n\t}\n\t\n\tplayer->lastwalking = player->walking;\n\tplayer->lastriding = player->riding;\n\tplayer->inputs_locked_lasttime = player->inputs_locked;\n\tmemcpy(lastpinputs, pinputs, sizeof(lastpinputs));\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid PDoPhysics(void)\n{\n\tif (player->xinertia > 0x5ff)  player->xinertia = 0x5ff;\n\tif (player->xinertia < -0x5ff) player->xinertia = -0x5ff;\n\tif (player->yinertia > 0x5ff)  player->yinertia = 0x5ff;\n\tif (player->yinertia < -0x5ff) player->yinertia = -0x5ff;\n\t\n\tif (player->blockd && player->yinertia > 0)\n\t\tplayer->yinertia = 0;\n\t\n\tplayer->apply_yinertia(player->yinertia);\n\t\n\t// if xinertia is less than the decel speed then maintain the value but don't actually\n\t// move anything. It seems a bit odd...but that's the best I can figure to make it\n\t// behave like the original.\n\tif (player->xinertia > player->decelspeed || player->xinertia < -player->decelspeed)\n\t{\n\t\tplayer->apply_xinertia(player->xinertia);\n\t}\n}\n\nvoid PUpdateInput(void)\n{\nint i;\n\n\tif (player->inputs_locked || player->disabled)\n\t{\n\t\tmemset(pinputs, 0, sizeof(pinputs));\n\t}\n\telse\n\t{\n\t\tmemcpy(pinputs, inputs, sizeof(pinputs));\n\t\t\n\t\t// prevent jumping/shooting when leaving a messagebox\n\t\tif (player->inputs_locked_lasttime)\n\t\t{\n\t\t\tfor(i=0;i<INPUT_COUNT;i++)\n\t\t\t\tlastpinputs[i] |= pinputs[i];\n\t\t}\n\t\t\n\t\t// allow entering inventory\n\t\tif (justpushed(INVENTORYKEY))\n\t\t{\n\t\t\tif (!game.frozen && !player->dead && GetCurrentScript() == -1)\n\t\t\t{\n\t\t\t\tgame.setmode(GM_INVENTORY);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Map System\n\t\tif (justpushed(MAPSYSTEMKEY) && (FindInventory(ITEM_MAP_SYSTEM) != -1))\n\t\t{\n\t\t\tif (!game.frozen && !player->dead && GetCurrentScript() == -1)\n\t\t\t{\n\t\t\t\tif (fade.getstate() == FS_NO_FADE && game.switchstage.mapno == -1)\n\t\t\t\t{\n\t\t\t\t\tgame.setmode(GM_MAP_SYSTEM, game.mode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n// handles tile attributes of tiles player is touching\nvoid PHandleAttributes(void)\n{\nstatic const Point pattrpoints[] = { {8, 8}, {8, 14} };\nstatic const Point hurt_bottom_attrpoint =   {8, 7};\nunsigned int attr;\nint tile;\n\n\t// get attributes of tiles player it touching.\n\t// first, we'll check the top pattrpoint alone; this is the point at\n\t// which you go underwater, when that point is lower than the water level.\n\t// ** There is a spot in Labyrinth W just after the Shop where the positioning\n\t// of this point is a minor element in the gameplay, and so it must be set\n\t// correctly. If set too high you will not be underwater after climbing up the\n\t// small slope and you can just jump over the wall that you shouldn't be able to.\n\tattr = player->GetAttributes(&pattrpoints[0], 1, &tile);\n\t\n\t// water handler -- water uses only the top pattrpoint\n\tif (attr & TA_WATER)\n\t{\n\t\t// check if we just entered the water\n\t\tif (!(player->touchattr & TA_WATER))\n\t\t{\n\t\t\t// splash on entering water quick enough\n\t\t\tif ((player->yinertia > 0x200 && !player->blockd) || \\\n\t\t\t\t(player->xinertia < -0x200 || player->xinertia > 0x200))\n\t\t\t{\n\t\t\t\tint x = player->CenterX();\n\t\t\t\tint y = player->CenterY();\n\t\t\t\tint splashtype = !(player->touchattr & TA_HURTS_PLAYER) ? \\\n\t\t\t\t\t\t\t\t\tOBJ_WATER_DROPLET : OBJ_LAVA_DROPLET;\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<8;i++)\n\t\t\t\t{\n\t\t\t\t\tObject *o = CreateObject(x + (random(-8, 8) << CSF), y, splashtype);\n\t\t\t\t\to->xinertia = random(-0x200, 0x200) + player->xinertia;\n\t\t\t\t\to->yinertia = random(-0x200, 0x80) - (player->yinertia >> 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsound(SND_SPLASH);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// setup physics constants for water\n\t\tplayer->walkspeed = 0x196;\n\t\tplayer->fallspeed = 0x2ff;\n\t\t\n\t\tplayer->fallaccel = 0x28;\n\t\tplayer->jumpfallaccel = 0x10;\n\t\t\n\t\tplayer->walkaccel = 0x2a;\n\t\tplayer->jumpwalkaccel = 0x10;\n\t\t\n\t\tplayer->decelspeed = 0x19;\n\t\t// was set at 0x280 but I believe that makes it impossible to clear one of the long\n\t\t// spike jumps in River\n\t\tplayer->jumpvelocity = 0x2c0;\n\t\t\n\t\t// decrement air left\n\t\tif (player->equipmask & EQUIP_AIRTANK)\n\t\t{\n\t\t\tplayer->airleft = 1000;\n\t\t\tplayer->airshowtimer = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayer->airshowtimer = 60;\n\t\t\tif (!player->drowned)\n\t\t\t{\n\t\t\t\tif (!player->inputs_locked) player->airleft--;\n\t\t\t\t\n\t\t\t\tif (player->airleft <= 0 && !game.debug.god)\n\t\t\t\t{\t// player drowned\n\t\t\t\t\t// if flag 4000 is set, then we do not drown, but are in the Almond\n\t\t\t\t\t// level after Core battle, and should instead execute script 1100.\n\t\t\t\t\tif (game.flags[4000])\n\t\t\t\t\t{\t// \"your senses dim and the world grows dark\"\n\t\t\t\t\t\tStartScript(1100);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t// nope sorry buddy, no such luck this time\n\t\t\t\t\t\tObject *o = CreateObject(player->x, player->y, OBJ_NULL);\n\t\t\t\t\t\to->sprite = SPR_PDROWNED;\n\t\t\t\t\t\to->dir = player->dir;\n\t\t\t\t\t\t\n\t\t\t\t\t\tkillplayer(SCRIPT_DROWNED);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tplayer->drowned = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t// setup normal physics constants\n\t\tplayer->walkspeed = 0x32c;////0x030e;\n\t\tplayer->fallspeed = 0x5ff;\n\t\t\n\t\tplayer->fallaccel = 0x50;\n\t\tplayer->jumpfallaccel = 0x20;\n\t\t\n\t\tplayer->walkaccel = 0x55;\n\t\tplayer->jumpwalkaccel = 0x20;\n\t\t\n\t\tplayer->decelspeed = 0x33;\n\t\tplayer->jumpvelocity = 0x500;\n\t\t\n\t\t// reset air supply\n\t\tplayer->airleft = 1000;\n\t\tif (player->airshowtimer) player->airshowtimer--;\n\t}\n\t\n\t// add in the bottom pattrpoint, but don't let it set the \"water\" bit.\n\t// only the top pattrpoint can set \"water\".\n\tattr |= (player->GetAttributes(&pattrpoints[1], 1, &tile) & ~TA_WATER);\n\n\t// If the tile has \"hurt\" bit, we recheck it with the the different bottom attrpoint.\n\t// This fixes bottom spikes in water level, last cave... Standart bottom attrpoint\n\t// allows intersection with spike only for 1 pixel, but origianl game allows 8 pixels\n\t// of safe intersection.\n\tif (attr & TA_HURTS_PLAYER)\n\t{\n\t\tattr &= ~TA_HURTS_PLAYER;\n\t\tattr |= (player->GetAttributes(&hurt_bottom_attrpoint, 1, &tile) & ~TA_WATER);\n\t}\n\t\n\tif (attr & TA_HURTS_PLAYER)\n\t\thurtplayer(10);\n\t\n\t// water current/wind:\n\t// for water currents--get the sum total of several points on the player to see\n\t// all the directions he's getting blown around at (support multiple directions)\n\tDoWaterCurrents();\n\tplayer->touchattr = attr;\n}\n\n// handes player being blown around by water currents\nvoid DoWaterCurrents(void)\n{\nstatic Point currentpoints[] = { {7, 8},\n\t\t\t\t\t\t\t\t {1, 2}, {1, 8}, {1, 14},\n\t\t\t\t\t\t\t\t {7, 2}, {7, 14},\n\t\t\t\t\t\t\t\t {15,2}, {15, 8}, {15, 14} };\nint i;\nstatic const int current_dir[] = { LEFTMASK, UPMASK, RIGHTMASK, DOWNMASK };\nuint8_t currentmask;\nint tile;\n\n\t// check each point in currentpoints[] for a water current, and if found,\n\t// add it to the list of directions we're being blown\n\tcurrentmask = 0;\n\tfor(i=0;i<9;i++)\n\t{\n\t\t//DebugCrosshair(player->x+(currentpoints[i].x<<CSF),player->y+(currentpoints[i].y<<CSF), 255,0,0);\n\t\t\n\t\tif (player->GetAttributes(&currentpoints[i], 1, &tile) & TA_CURRENT)\n\t\t{\n\t\t\tcurrentmask |= current_dir[tilecode[tile] & 3];\n\t\t}\n\t\t\n\t\t// if the center point (the first one) has no current, then don't\n\t\t// bother checking the rest. as during 90% of the game you are NOT underwater.\n\t\tif (!currentmask) return;\n\t}\n\t\n\t// these constants are very critical for Waterway to work properly.\n\t// please be careful with them.\n\tif (currentmask & LEFTMASK)  player->xinertia -= 0x88;\n\tif (currentmask & RIGHTMASK) player->xinertia += 0x88;\n\tif (currentmask & UPMASK)    player->yinertia -= 0x80;\n\tif (currentmask & DOWNMASK)  player->yinertia += 0x50;\n}\n\n\nvoid PDoWalking(void)\n{\nint walk_accel;\nint limit;\n\t\n\twalk_accel = (player->blockd) ? player->walkaccel : player->jumpwalkaccel;\n\t\n\t// walking/moving\n\tif (pinputs[LEFTKEY] || pinputs[RIGHTKEY])\n\t{\n\t\t// we check both without an else so that both keys down=turn right & walk in place\n\t\tif (pinputs[LEFTKEY])\n\t\t{\n\t\t\tplayer->walking = true;\n\t\t\tplayer->dir = LEFT;\n\t\t\t\n\t\t\tif (player->xinertia > -player->walkspeed)\n\t\t\t{\n\t\t\t\tplayer->xinertia -= walk_accel;\n\t\t\t\t\n\t\t\t\tif (player->xinertia < -player->walkspeed)\n\t\t\t\t\tplayer->xinertia = -player->walkspeed;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (pinputs[RIGHTKEY])\n\t\t{\n\t\t\tplayer->walking = true;\n\t\t\tplayer->dir = RIGHT;\n\t\t\t\n\t\t\tif (player->xinertia < player->walkspeed)\n\t\t\t{\n\t\t\t\tplayer->xinertia += walk_accel;\n\t\t\t\t\n\t\t\t\tif (player->xinertia > player->walkspeed)\n\t\t\t\t\tplayer->xinertia = player->walkspeed;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (player->walking && !player->lastwalking)\n\t\t\tplayer->walkanimframe = 1;\n\t}\n\telse\n\t{\n\t\tplayer->walking = false;\n\t\tplayer->walkanimframe = 0;\n\t\tplayer->walkanimtimer = 0;\n\t\t// tap sound when stopped walking\n\t\tif (player->lastwalking && player->blockd)\n\t\t\tsound(SND_PLAYER_WALK);\n\t}\n\t\n\t// deceleration\n\tif (player->blockd && player->yinertia >= 0)\n\t{\t// deceleration on ground...\n\t\t// always move towards zero at decelspeed\n\t\tif (player->xinertia > 0)\n\t\t{\n\t\t\tif (player->blockr && !pinputs[RIGHTKEY])\n\t\t\t{\n\t\t\t\tplayer->xinertia = 0;\n\t\t\t}\n\t\t\telse if (player->xinertia > player->decelspeed)\n\t\t\t{\n\t\t\t\tplayer->xinertia -= player->decelspeed;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tplayer->xinertia = 0;\n\t\t\t}\n\t\t}\n\t\telse if (player->xinertia < 0)\n\t\t{\n\t\t\tif (player->blockl && !pinputs[LEFTKEY])\n\t\t\t{\n\t\t\t\tplayer->xinertia = 0;\n\t\t\t}\n\t\t\telse if (player->xinertia < -player->decelspeed)\n\t\t\t{\n\t\t\t\tplayer->xinertia += player->decelspeed;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tplayer->xinertia = 0;\n\t\t\t}\n\t\t}\n\t}\n\telse\t\t// deceleration in air...\n\t{\n\t\t// implements 2 things\n\t\t//\t1) if player partially hits a brick while in air, his inertia is lesser after he passes it\n\t\t//\t2) but, if he's trying to turn around, let him! don't \"stick\" him to it just because\n\t\t//\t\tof a high inertia when he hit it\n\t\tif (player->blockr)\n\t\t{\n\t\t\tlimit = (player->dir == RIGHT) ? 0x180 : 0;\n\t\t\tif (player->xinertia > limit) player->xinertia = limit;\n\t\t}\n\t\t\n\t\tif (player->blockl)\n\t\t{\n\t\t\tlimit = (player->dir == LEFT) ? -0x180 : 0;\n\t\t\tif (player->xinertia < limit) player->xinertia = limit;\n\t\t}\n\t}\n}\n\nvoid PDoFalling(void)\n{\n\tif (player->disabled)\n\t\treturn;\n\t\n\tif (player->booststate)\n\t\treturn;\n\t\n\tif (game.curmap == STAGE_KINGS_TABLE && \\\n\t\tfade.getstate() == FS_FADING)\n\t\treturn;\n\t\n\t// needed to be able to see the falling blocks during\n\t// good-ending Helicopter cutscene (otherwise your\n\t// invisible character falls and the blocks spawn too low).\n\tif (player->hide)\n\t{\n\t\tplayer->xinertia = 0;\n\t\tplayer->yinertia = 0;\n\t\treturn;\n\t}\n\t\n\t// use jump gravity as long as Jump Key is down and we're moving up,\n\t// regardless of whether a jump was ever actually initiated.\n\t// this is for the fans that blow up--you can push JUMP to climb higher.\n\tif (player->yinertia < 0 && pinputs[JUMPKEY])\n\t{\t// use jump gravity\n\t\tif (player->yinertia < player->fallspeed)\n\t\t{\n\t\t\tplayer->yinertia += player->jumpfallaccel;\n\t\t\tif (player->yinertia > player->fallspeed) player->yinertia = player->fallspeed;\n\t\t}\n\t}\n\telse\n\t{\t// use normal gravity\n\t\tif (player->yinertia < player->fallspeed)\n\t\t{\n\t\t\tplayer->yinertia += player->fallaccel;\n\t\t\tif (player->yinertia > player->fallspeed) player->yinertia = player->fallspeed;\n\t\t}\n\t\t\n\t\t// if we no longer qualify for jump gravity then the jump is over\n\t\tplayer->jumping = 0;\n\t}\n}\n\n\nvoid PDoJumping(void)\n{\n\t// jumping\n\tif (pinputs[JUMPKEY] && !lastpinputs[JUMPKEY])\n\t{\n\t\tif (player->blockd)\n\t\t{\n\t\t\tif (!player->jumping)\n\t\t\t{\n\t\t\t\tplayer->jumping = true;\n\t\t\t\tplayer->yinertia -= player->jumpvelocity;\n\t\t\t\tsound(SND_PLAYER_JUMP);\n\t\t\t}\n\t\t}\n\t\telse if ((player->equipmask & (EQUIP_BOOSTER08 | EQUIP_BOOSTER20)))\n\t\t{\n\t\t\tPStartBooster();\n\t\t}\n\t}\n}\n\n\nvoid PDoLooking(void)\n{\nint lookscroll_want;\nint i, key;\n\n\t// looking/aiming up and down\n\tplayer->look = lookscroll_want = 0;\n\t\n\tif (pinputs[DOWNKEY])\n\t{\n\t\tif (!player->blockd)\n\t\t{\n\t\t\tplayer->look = DOWN;\n\t\t}\n\t\telse if (!lastpinputs[DOWNKEY])\n\t\t{\t// activating scripts/talking to NPC's\n\t\t\t\n\t\t\tif (!player->walking && !player->lookaway && \\\n\t\t\t\t!pinputs[JUMPKEY] && !pinputs[FIREKEY])\n\t\t\t{\n\t\t\t\tif (!inputs[DEBUG_MOVE_KEY] || !settings->enable_debug_keys)\n\t\t\t\t{\n\t\t\t\t\tplayer->lookaway = true;\n\t\t\t\t\tplayer->xinertia = 0;\n\t\t\t\t\tPTryActivateScript();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// can still scroll screen down while standing, even though\n\t\t// it doesn't show any different frame.\n\t\tlookscroll_want = DOWN;\n\t}\n\t\n\tif (pinputs[UPKEY])\n\t{\n\t\tplayer->look = lookscroll_want = UP;\n\t}\n\t\n\t// when looking, pause a second to be sure they really want to do it\n\t// before triggering any real screen scrolling\n\tif (player->lookscroll != lookscroll_want)\n\t{\n\t\tif (player->lookscroll_timer >= 4 || !lookscroll_want)\n\t\t{\n\t\t\tplayer->lookscroll = lookscroll_want;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayer->lookscroll_timer++;\n\t\t}\n\t}\n\telse\n\t{\n\t\tplayer->lookscroll_timer = 0;\n\t}\n\t\n\t// deactivation of lookaway\n\tif (player->lookaway)\n\t{\n\t\t// keys which deactivate lookaway when you are facing away from player\n\t\tstatic const signed char actionkeys[] = \\\n\t\t\t{ LEFTKEY, RIGHTKEY, UPKEY, JUMPKEY, FIREKEY, -1 };\n\t\t\n\t\t// stop looking away if any keys are pushed\n\t\tfor(i=0;;i++)\n\t\t{\n\t\t\tkey = actionkeys[i];\n\t\t\tif (key == -1) break;\n\t\t\t\n\t\t\tif (pinputs[key])\n\t\t\t{\n\t\t\t\tplayer->lookaway = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!player->blockd)\n\t\t\tplayer->lookaway = false;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// called when the player has just turned on the booster\nvoid PStartBooster(void)\n{\n\tif (player->boosterfuel <= 0)\n\t\treturn;\n\t\n\t// booster 2.0 lets you pick a direction and tacks inertia\n\t// solid in that direction when first activated\n\tif ((player->equipmask & EQUIP_BOOSTER20))\n\t{\n\t\t// default boost direction if no key is pressed\n\t\tplayer->booststate = BOOST_UP;\n\t\t\n\t\t// in order of precedence\n\t\tif (inputs[LEFTKEY] || inputs[RIGHTKEY])\n\t\t\tplayer->booststate = BOOST_HOZ;\n\t\t\n\t\tif (inputs[DOWNKEY])\n\t\t\tplayer->booststate = BOOST_DOWN;\n\t\t\n\t\tif (inputs[UPKEY])\n\t\t\tplayer->booststate = BOOST_UP;\n\t\t\n\t\t// set initial inertia full on\n\t\tif (player->booststate == BOOST_UP || player->booststate == BOOST_DOWN)\n\t\t\tplayer->xinertia = 0;\n\t\t\n\t\tswitch(player->booststate)\n\t\t{\n\t\t\tcase BOOST_UP:\n\t\t\t\tplayer->yinertia = -0x5ff;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase BOOST_DOWN:\n\t\t\t\tplayer->yinertia = 0x5ff;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase BOOST_HOZ:\n\t\t\t{\n\t\t\t\tplayer->yinertia = 0;\n\t\t\t\t\n\t\t\t\tif (inputs[LEFTKEY])\n\t\t\t\t\tplayer->xinertia = -0x5ff;\n\t\t\t\telse\n\t\t\t\t\tplayer->xinertia = 0x5ff;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n\t\tplayer->booststate = BOOST_08;\n\t\t\n\t\t// help it overcome gravity\n\t\tif (player->yinertia > 0x100)\n\t\t\tplayer->yinertia >>= 1;\n\t}\n\t\n\tPBoosterSmokePuff();\n}\n\n// called every tick to run the booster\nvoid PDoBooster(void)\n{\n\t/*static const char *statedesc[] = { \"OFF\", \"UP\", \"DN\", \"HOZ\", \"0.8\" };\n\tdebug(\"fuel: %d\", player->boosterfuel);\n\tdebug(\"booststate: %s\", statedesc[player->booststate]);\n\tdebug(\"xinertia: %d\", player->xinertia);\n\tdebug(\"yinertia: %d\", player->yinertia);*/\n\t\n\tif (!(player->equipmask & (EQUIP_BOOSTER08 | EQUIP_BOOSTER20)))\n\t{\n\t\tplayer->booststate = BOOST_OFF;\n\t\treturn;\n\t}\n\t\n\tif (!pinputs[JUMPKEY])\n\t{\n\t\tplayer->booststate = BOOST_OFF;\n\t\t\n\t\tif (player->blockd)\n\t\t\tplayer->boosterfuel = BOOSTER_FUEL_QTY;\n\t\t\n\t\treturn;\n\t}\n\t\n\tif (!player->booststate)\n\t\treturn;\n\t\n\t// player seems to want it active...check the fuel\n\tif (player->boosterfuel <= 0)\n\t{\n\t\tplayer->booststate = BOOST_OFF;\n\t\treturn;\n\t}\n\telse\n\t{\n\t\tplayer->boosterfuel--;\n\t}\n\t\n\t// ok so then, booster is active right now\n\tbool sputtering = false;\n\t\n\tswitch(player->booststate)\n\t{\n\t\tcase BOOST_HOZ:\n\t\t{\n\t\t\tif ((player->dir == LEFT && player->blockl) || \\\n\t\t\t\t(player->dir == RIGHT && player->blockr))\n\t\t\t{\n\t\t\t\tplayer->yinertia = -0x100;\n\t\t\t}\n\t\t\t\n\t\t\t// this probably isn't the right way to do this, but this\n\t\t\t// bit makes the hurt-hop work if you get hit during a sideways boost\n\t\t\t//if (player->hitwhileboosting)\n\t\t\t//\tplayer->yinertia = -0x400;\n\t\t\t\n\t\t\tif (player->dir == LEFT)  player->xinertia -= 0x20;\n\t\t\tif (player->dir == RIGHT) player->xinertia += 0x20;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BOOST_UP:\n\t\t{\n\t\t\tplayer->yinertia -= 0x20;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BOOST_DOWN:\n\t\t{\n\t\t\tplayer->yinertia += 0x20;\n\t\t}\n\t\tbreak;\n\t\t\n\t\tcase BOOST_08:\n\t\t{\n\t\t\t// top speed and sputtering\n\t\t\tif (player->yinertia < -0x400)\n\t\t\t{\n\t\t\t\tplayer->yinertia += 0x20;\n\t\t\t\tsputtering = true;\t// no sound/smoke this frame\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tplayer->yinertia -= 0x20;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\t// don't land if we booster through a one-tile high corridor,\n\t// but do land if we're, well, landing on something (yinertia not negative).\n\t// must be done after booster inertia applied to work properly.\n\t// for 1) there's a place in the village next to Mahin that is good for testing this,\n\t// for 2) the gaps in outer wall by the little house.\n\tif (player->blockd)\n\t{\n\t\tif (player->yinertia < 0)\n\t\t\tplayer->blockd = false;\n\t\telse\n\t\t{\n\t\t\tplayer->booststate = BOOST_OFF;\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t// smoke and sound effects\n\tif ((player->boosterfuel % 3) == 1 && !sputtering)\n\t{\n\t\tPBoosterSmokePuff();\n\t}\n}\n\n// called every tick just after PDoBooster returns.\n// tones down player's inertia a bit once the Booster 2.0 stops firing\nvoid PDoBoosterEnd()\n{\n\t// put here to be sure it catches all the different ways the Booster can get turned off\n\t//if (!player->booststate)\n\t\t//player->hitwhileboosting = false;\n\t\n\tif (player->booststate != player->lastbooststate)\n\t{\n\t\tif (player->booststate == BOOST_OFF && (player->equipmask & EQUIP_BOOSTER20))\n\t\t{\n\t\t\tswitch(player->lastbooststate)\n\t\t\t{\n\t\t\t\tcase BOOST_HOZ:\n\t\t\t\t\tplayer->xinertia >>= 1;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase BOOST_UP:\n\t\t\t\t\tplayer->yinertia >>= 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// in the original touching a slope while boosting horizontally\n\t// disables the booster. In that case, we don't want to half the xinertia,\n\t// which is why it's here.\n\t//if (player->booststate == BOOST_HOZ && CheckStandOnSlope(player))\n\t\t//player->booststate = BOOST_OFF;\n\t\n\tplayer->lastbooststate = player->booststate;\n}\n\n// spawn a Booster smoke puff\nvoid PBoosterSmokePuff()\n{\n\t// these are the directions the SMOKE is traveling, not the player\n\t//                                 RT   LT    UP    DN\n\tstatic const int smoke_xoffs[] = { 10,   4,   7,    7  };\n\tstatic const int smoke_yoffs[] = { 10,  10,   0,   14  };\n\tint smokedir;\n\t\n\tswitch(player->booststate)\n\t{\n\t\tcase BOOST_HOZ: smokedir = (player->dir ^ 1); break;\n\t\tcase BOOST_UP:\tsmokedir = DOWN; break;\n\t\tcase BOOST_DOWN:smokedir = UP; break;\n\t\tcase BOOST_08:\tsmokedir = DOWN; break;\n\t\tdefault:\t\treturn;\n\t}\n\t\n\tint x = player->x + (smoke_xoffs[smokedir] << CSF);\n\tint y = player->y + (smoke_yoffs[smokedir] << CSF);\n\t\n\tCaret *smoke = effect(x, y, EFFECT_SMOKETRAIL_SLOW);\n\tsmoke->MoveAtDir(smokedir, 0x200);\n\t\n\tsound(SND_BOOSTER);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// handle some special characteristics of solid-brick objects,\n// such as bouncy and damage. Unlike with FLAG_SOLID_MUSHY; the\n// block/l/r/u/d flags for these objects have already been set in\n// UpdateBlockStates, so we don't have to worry about those.\nvoid PHandleSolidBrickObjects(void)\n{\nint i;\nSIFSprite *sprite = player->Sprite();\nObject *o;\n\n\t// calculate total inertia of player--this is needed so that\n\t// the forcefields in the Monster X arena will damage you if\n\t// the treads carry you into them.\n\tint p_xinertia = player->xinertia;\n\tint p_yinertia = player->yinertia;\n\tif (player->riding)\n\t{\n\t\tp_xinertia += player->riding->xinertia;\n\t\tp_yinertia += player->riding->yinertia;\n\t}\n\t\n\tfor(i=0;i<nOnscreenObjects;i++)\n\t{\n\t\to = onscreen_objects[i];\n\t\tif (!(o->flags & FLAG_SOLID_BRICK)) continue;\n\t\t\n\t\t// left, right, and up contact damage\n\t\tif (o->damage > 0)\n\t\t{\n\t\t\tif (player->blockl && player->CheckSolidIntersect(o, &sprite->block_l))\n\t\t\t{\n\t\t\t\tif (p_xinertia < 0 || o->xinertia > 0)\n\t\t\t\t\to->DealContactDamage();\n\t\t\t}\n\t\t\t\n\t\t\tif (player->blockr && player->CheckSolidIntersect(o, &sprite->block_r))\n\t\t\t{\n\t\t\t\tif (p_xinertia > 0 || o->xinertia < 0)\n\t\t\t\t\to->DealContactDamage();\n\t\t\t}\n\t\t\t\n\t\t\tif (player->blocku && player->CheckSolidIntersect(o, &sprite->block_u))\n\t\t\t{\n\t\t\t\tif (p_yinertia < 0 || o->yinertia > 0)\n\t\t\t\t\to->DealContactDamage();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// stuff for when you are standing on it\n\t\tif (player->blockd && player->CheckSolidIntersect(o, &sprite->block_d))\n\t\t{\n\t\t\tif (o->damage && (player->yinertia >= 0 || o->yinertia < 0))\n\t\t\t\to->DealContactDamage();\n\t\t\t\n\t\t\t// don't do weird glitchy shit if we jump while being carried upward\n\t\t\t// by an object moving faster than us. handles if you jump while flying\n\t\t\t// momorin's rocket.\n\t\t\tif (player->yinertia < 0 && o->yinertia < player->yinertia)\n\t\t\t\tplayer->yinertia = 0;\n\t\t\t\n\t\t\t// handle FLAG_BOUNCY--used eg by treads on Monster X when tipped up\n\t\t\tif (o->flags & FLAG_BOUNCY)\n\t\t\t{\n\t\t\t\tif (player->yinertia > (o->yinertia - 0x200))\n\t\t\t\t\tplayer->yinertia = (o->yinertia - 0x200);\n\t\t\t}\n\t\t\telse if (o->yinertia <= player->yinertia)\n\t\t\t{\n\t\t\t\t// snap his Y right on top if it\n\t\t\t\tplayer->y = o->SolidTop() - (sprites[player->sprite].block_d[0].y << CSF);\n\t\t\t}\n\t\t}\n\t}\n}\n\n\nvoid PHandleSolidMushyObjects(void)\n{\n\tfor(int i=0;i<nOnscreenObjects;i++)\n\t{\n\t\tObject *o = onscreen_objects[i];\n\t\t\n\t\tif (o->flags & FLAG_SOLID_MUSHY)\n\t\t\tPRunSolidMushy(o);\n\t}\n}\n\n// handle \"solid mushy\" objects, such as bugs. These objects are solid but not 100% super\n// solid like a brick. Their solidity is more of an \"it repels the player\" kind of way.\n// NOTE: This is also responsible for the horizontal motion you see when hit by many kinds\n// of enemies. The hurtplayer damage routine makes you hop vertically, but it is this that\n// throws you away horizontally.\nvoid PRunSolidMushy(Object *o)\n{\n\t// cache these, so we're not calling the same functions over and over again\n\tconst int p_left = player->SolidLeft();\n\tconst int p_right = player->SolidRight();\n\tconst int p_top = player->SolidTop();\n\tconst int p_bottom = player->SolidBottom();\n\t\n\tconst int o_left = o->SolidLeft();\n\tconst int o_right = o->SolidRight();\n\tconst int o_top = o->SolidTop();\n\tconst int o_bottom = o->SolidBottom();\n\t\n\tstatic const int MUSHY_MARGIN = (3<<CSF);\n\tstatic const int STAND_MARGIN = (1<<CSF);\n\tstatic const int REPEL_FORCE = 0x200;\n\t\n\t// hitting sides of object\n\tif ((p_top < (o_bottom - MUSHY_MARGIN)) && (p_bottom > (o_top + MUSHY_MARGIN)))\n\t{\n\t\t// left side\n\t\tif ((p_right > o_left) && (p_right < o->CenterX()))\n\t\t{\n\t\t\tif (player->xinertia > -REPEL_FORCE)\n\t\t\t\tplayer->xinertia -= REPEL_FORCE;\n\t\t}\n\t\t\n\t\t// right side\n\t\tif ((p_left < o_right) && (p_left > o->CenterX()))\n\t\t{\n\t\t\tif (player->xinertia < REPEL_FORCE)\n\t\t\t\tplayer->xinertia += REPEL_FORCE;\n\t\t}\n\t}\n\t\n\t// bonking head on object or standing on object\n\t\n\t// to tell if we are within horizontal bounds to be standing on the object,\n\t// we will check if we have NOT FALLEN OFF the object.\n\tif (p_left > (o_right - STAND_MARGIN) || p_right < (o_left + STAND_MARGIN))\n\t{ }\n\telse\n\t{\n\t\t// standing on object\n\t\tif (p_bottom >= o_top && p_bottom <= o->CenterY())\n\t\t{\n\t\t\tif (o->flags & FLAG_BOUNCY)\n\t\t\t{\n\t\t\t\tif (player->yinertia > (o->yinertia - 0x200))\n\t\t\t\t\tplayer->yinertia = (o->yinertia - 0x200);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// force to top of sprite if we're REALLY far into it\n\t\t\t\tint em_fline = o->SolidTop() + (3 << CSF);\n\t\t\t\tif (player->SolidBottom() > em_fline)\n\t\t\t\t{\n\t\t\t\t\tint over_amt = (em_fline - player->SolidBottom());\n\t\t\t\t\tint dec_amt = (3 << CSF);\n\t\t\t\t\t\n\t\t\t\t\tif (over_amt < dec_amt) dec_amt = over_amt;\n\t\t\t\t\tif (dec_amt < (1<<CSF)) dec_amt = (1<<CSF);\n\t\t\t\t\t\n\t\t\t\t\tplayer->apply_yinertia(-dec_amt);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tplayer->blockd = true;\n\t\t\t\tplayer->riding = o;\n\t\t\t}\n\t\t}\n\t\telse if (p_top < o_bottom && p_top > o->CenterY())\n\t\t{\n\t\t\t// hit bottom of object with head\n\t\t\tif (player->yinertia < 0)\n\t\t\t\tplayer->yinertia = 0;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// does \"damage\" points of damage to the player\n// if even_if_controls_locked is true the damage is\n// dealt even if the player's input is locked.\nvoid hurtplayer(int damage)\n{\n\tif (damage == 0) return;\n\tif (!player || !player->hp) return;\n\tif (settings->enable_debug_keys && (game.debug.god || inputs[DEBUG_MOVE_KEY])) return;\n\t\n\tif (player->hurt_time)\n\t\treturn;\n\t\n\tif (player->hide)\n\t\treturn;\n\t\n\tplayer->hp -= damage;\n\tplayer->DamageText->AddQty(damage);\n\t\n\tplayer->lookaway = 0;\n\tplayer->hurt_time = 128;\n\t\n\tif (player->equipmask & EQUIP_WHIMSTAR)\n\t\tremove_whimstar(&player->whimstar);\n\t\n\t//if (player->booststate)\n\t\t//player->hitwhileboosting = true;\n\t\n\tif (player->hp <= 0)\n\t{\n\t\tsound(SND_PLAYER_DIE);\n\t\tSmokeClouds(player, 64, 16, 16);\n\t\t\n\t\tkillplayer(SCRIPT_DIED);\n\t}\n\telse\n\t{\n\t\tsound(SND_PLAYER_HURT);\n\t\t\n\t\t// hop\n\t\tif (player->movementmode != MOVEMODE_ZEROG)\n\t\t\tplayer->yinertia = -0x400;\n\t}\n\t\n\t// decrement weapon XP.\n\tif (player->equipmask & EQUIP_ARMS_BARRIER)\n\t\tSubXP(damage);\n\telse\n\t\tSubXP(damage * 2);\n}\n\n// set the player state to \"dead\" and execute script \"script\"\nvoid killplayer(int script)\n{\n\tReplay::end_record();\n\tReplay::end_playback();\n\t\n\tplayer->hp = 0;\n\tplayer->dead = true;\n\tplayer->hide = true;\n\tplayer->xinertia = 0;\n\tplayer->yinertia = 0;\n\tplayer->riding = NULL;\t\t\t// why exactly did I say this? i dunno, but not touching for safety\n\tStopLoopSounds();\t\t\t\t// important for Almond\n\tStartScript(script);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// this is basically a replacement for most of the player code,\n// used when the player is in <UNI0001 (the Ironhead battle).\nvoid PHandleZeroG(void)\n{\n\tif (!player->inputs_locked)\n\t{\n\t\tif (inputs[LEFTKEY] || inputs[RIGHTKEY])\n\t\t{\n\t\t\tif (inputs[LEFTKEY])  player->xinertia -= 0x100;\n\t\t\tif (inputs[RIGHTKEY]) player->xinertia += 0x100;\n\t\t}\n\t\telse\n\t\t{\t// decel\n\t\t\tif (player->xinertia < 0x80 || player->xinertia > -0x80)\n\t\t\t{\n\t\t\t\tplayer->xinertia = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tplayer->xinertia += (player->xinertia > 0) ? -0x80 : 0x80;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (inputs[UPKEY] || inputs[DOWNKEY])\n\t\t{\n\t\t\tif (inputs[UPKEY]) player->yinertia -= 0x100;\n\t\t\tif (inputs[DOWNKEY]) player->yinertia += 0x100;\n\t\t}\n\t\telse\n\t\t{\t// decel\n\t\t\tif (player->yinertia < 0x80 || player->yinertia > -0x80)\n\t\t\t{\n\t\t\t\tplayer->yinertia = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tplayer->xinertia += (player->xinertia > 0) ? -0x80 : 0x80;\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\t// decel for when inputs locked after victory\n\t\tif (player->xinertia < 0x80 && player->xinertia > -0x40)\n\t\t{\n\t\t\tplayer->xinertia = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayer->xinertia += (player->xinertia > 0) ? -0x80 : 0x80;\n\t\t}\n\t\t\n\t\tif (player->yinertia < 0x80 && player->yinertia > -0x40)\n\t\t{\n\t\t\tplayer->yinertia = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayer->yinertia += (player->yinertia > 0) ? -0x80 : 0x80;\n\t\t}\n\t}\n\t\n\tif (player->xinertia > 0x400)  player->xinertia = 0x400;\n\tif (player->xinertia < -0x400) player->xinertia = -0x400;\n\tif (player->yinertia > 0x400)  player->yinertia = 0x400;\n\tif (player->yinertia < -0x400) player->yinertia = -0x400;\n\t\n\tplayer->frame = (player->yinertia > 0) ? 1 : 2;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid PInitRepel(void)\n{\nconst int s = SPR_MYCHAR;\nint i;\n\n\tplayer->nrepel_l = sprites[s].block_l.count;\n\tplayer->nrepel_r = sprites[s].block_r.count;\n\tplayer->nrepel_d = sprites[s].block_d.count;\n\tplayer->nrepel_u = sprites[s].block_u.count;\n\t\n\tfor(i=0;i<player->nrepel_l;i++)\n\t{\n\t\tplayer->repel_l[i].x = sprites[s].block_l[i].x + 1;\n\t\tplayer->repel_l[i].y = sprites[s].block_l[i].y;\n\t}\n\t\n\tfor(i=0;i<player->nrepel_r;i++)\n\t{\n\t\tplayer->repel_r[i].x = sprites[s].block_r[i].x - 1;\n\t\tplayer->repel_r[i].y = sprites[s].block_r[i].y;\n\t}\n\t\n\tfor(i=0;i<player->nrepel_d;i++)\n\t{\n\t\tplayer->repel_d[i].x = sprites[s].block_d[i].x;\n\t\tplayer->repel_d[i].y = sprites[s].block_d[i].y - 1;\n\t}\n\t\n\tfor(i=0;i<player->nrepel_u;i++)\n\t{\n\t\tplayer->repel_u[i].x = sprites[s].block_u[i].x;\n\t\tplayer->repel_u[i].y = sprites[s].block_u[i].y + 1;\n\t}\n}\n\n// the player's block points are assymetrical--block u/d are closer together than block l/r.\n// So it's quite possible to get e.g. your blockl points embedded in a wall by\n// falling off the top of it. This function implements a SMB1-style \"repel\" that\n// allows this to happen but then pushes the player out of the block over the next\n// few frames.\nvoid PDoRepel(void)\n{\n\t// since this function is called from the aftermove, regular player->blockl etc\n\t// won't be updated until the following frame, so we always check the attributes\n\t// directly here.\n\tstatic const int REPEL_SPEED =\t(1<<CSF);\n\t\n\tif (settings->enable_debug_keys && inputs[DEBUG_MOVE_KEY])\n\t\treturn;\n\t\n\t// pushes player out of walls if he become embedded in them, ala Super Mario 1.\n\t// this can happen for example because his R,L block points are further out than\n\t// his D block points so it's possible to fall really close to a block and\n\t// embed the R or L points further into the block than they should be\n\tif (player->CheckAttribute(player->repel_r, player->nrepel_r, TA_SOLID_PLAYER))\n\t{\n\t\tif (!player->CheckAttribute(&sprites[player->sprite].block_l, TA_SOLID_PLAYER))\n\t\t{\n\t\t\tplayer->x -= REPEL_SPEED;\n\t\t\t//debug(\"REPEL [to left]\");\n\t\t}\n\t}\n\t\n\tif (player->CheckAttribute(player->repel_l, player->nrepel_l, TA_SOLID_PLAYER))\n\t{\n\t\tif (!player->CheckAttribute(&sprites[player->sprite].block_r, TA_SOLID_PLAYER))\n\t\t{\n\t\t\tplayer->x += REPEL_SPEED;\n\t\t\t//debug(\"REPEL [to right]\");\n\t\t}\n\t}\n\t\n\t// vertical repel doesn't happen normally, but if we get embedded in a\n\t// block somehow, it can happen.\n\t/*\n\t// do repel down\n\tif (player->CheckAttribute(player->repel_u, player->nrepel_u, TA_SOLID_PLAYER))\n\t{\n\t\tif (!player->CheckAttribute(&sprites[player->sprite].block_d, TA_SOLID_PLAYER))\n\t\t{\n\t\t\tplayer->y += REPEL_SPEED;\n\t\t\t//debug(\"REPEL [down]\");\n\t\t}\n\t}\n\t\n\t// do repel up\n\tif (player->CheckAttribute(player->repel_d, player->nrepel_d, TA_SOLID_PLAYER))\n\t{\n\t\tif (!player->CheckAttribute(&sprites[player->sprite].block_u, TA_SOLID_PLAYER))\n\t\t{\n\t\t\tplayer->y -= REPEL_SPEED;\n\t\t\t//debug(\"REPEL [up]\");\n\t\t}\n\t}\n\t*/\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// called when you press down.\n// Tries to find an SCRIPTONACTIVATE object you are standing near and activate it.\n// if it can't find anything to activate, spawns the \"question mark\" effect.\nvoid PTryActivateScript()\n{\n\tif (RunScriptAtX(player->CenterX()))\n\t\treturn;\n\t\n\tif (player->dir == RIGHT)\n\t{\n\t\tif (RunScriptAtX(player->Right()) || RunScriptAtX(player->Left()))\n\t\t\treturn;\n\t}\n\telse\n\t{\n\t\tif (RunScriptAtX(player->Left()) || RunScriptAtX(player->Right()))\n\t\t\treturn;\n\t}\n\t\n\t// e.g. Plantation Rocket\n\tif (player->riding && (player->riding->flags & FLAG_SCRIPTONACTIVATE))\n\t{\n\t\tStartScript(player->riding->id2);\n\t\treturn;\n\t}\n\t\n\teffect(player->CenterX(), player->CenterY(), EFFECT_QMARK);\n}\n\nstatic bool RunScriptAtX(int x)\n{\n\tif (RunScriptAtLocation(x, player->y + (8 << CSF)) || \\\n\t\tRunScriptAtLocation(x, player->y + (14 << CSF)) || \\\n\t\tRunScriptAtLocation(x, player->y + (2 << CSF)))\n\t{\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}\n\nstatic bool RunScriptAtLocation(int x, int y)\n{\n\t// top-to-bottom scan\n\tfor(int i=nOnscreenObjects-1; i>=0; i--)\n\t{\n\t\tObject *o = onscreen_objects[i];\n\t\t\n\t\tif (o->flags & FLAG_SCRIPTONACTIVATE)\n\t\t{\n\t\t\tif (x >= o->Left() && x <= o->Right() && \\\n\t\t\t\ty >= o->Top() && y <= o->Bottom())\n\t\t\t{\n\t\t\t\tStartScript(o->id2);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn false;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// does the invincibility flash when the player has recently been hurt\nvoid PDoHurtFlash(void)\n{\n\t// note that hurt_flash_state is NOT cleared when timer reaches 0,\n\t// but this is ok because the number of blinks are and always should be even.\n\t// (if not it wouldn't look right when he unhurts).\n\tif (player->hurt_time)\n\t{\n\t\tplayer->hurt_time--;\n\t\tplayer->hurt_flash_state = (player->hurt_time & 2);\n\t}\n}\n\n// decides which player frame to show\nvoid PSelectFrame(void)\n{\n\tif (player->lookaway)\n\t{\t// looking away\n\t\tplayer->frame = 11;\n\t}\n\telse if (!player->blockd || player->yinertia < 0)\n\t{\t// jumping/falling\n\t\tplayer->frame = (player->yinertia > 0) ? 1 : 2;\n\t}\n\telse if (player->walking)\n\t{\t// do walk animation\n\t\tstatic const uint8_t pwalkanimframes[] = { 0, 1, 0, 2 };\n\t\t\n\t\tif (++player->walkanimtimer >= 5)\n\t\t{\n\t\t\tplayer->walkanimtimer = 0;\n\t\t\tif (++player->walkanimframe >= 4) player->walkanimframe = 0;\n\t\t\tif (pwalkanimframes[player->walkanimframe]==0) sound(SND_PLAYER_WALK);\n\t\t}\n\t\t\n\t\tplayer->frame = pwalkanimframes[player->walkanimframe];\n\t}\n\telse\n\t{\t// standing\n\t\tplayer->frame = 0;\n\t}\n\t\n\t// switch frames to \"up\" or \"down\" versions if we're looking\n\tif (player->look)\n\t{\n\t\tif (player->look == UP)\n\t\t{\n\t\t\tif (!player->blockd || player->yinertia < 0)\n\t\t\t\tplayer->frame = 4;\n\t\t\telse\n\t\t\t\tplayer->frame += 3;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tplayer->frame += 6;\n\t\t}\n\t}\n\t\n\t// mimiga mask support-- it would be better to make equipmask private,\n\t// and funnel all player->equipmask changes through a setter function,\n\t// then I'd feel safe doing this only when equipped items are changed.\n\tPSelectSprite();\n}\n\n// mimiga mask support\nvoid PSelectSprite(void)\n{\n\tplayer->sprite = (player->equipmask & EQUIP_MIMIGA_MASK) ? \\\n\t\t\t\t\tSPR_MYCHAR_MIMIGA : SPR_MYCHAR;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// returns the sprite and frame # to be used for drawing the given weapon\nvoid GetSpriteForGun(int wpn, int look, int *spr, int *frame)\n{\nint s;\n\t\n\tswitch(wpn)\n\t{\n\t\tcase WPN_SUPER_MISSILE: s = SPR_SUPER_MLAUNCHER; break;\n\t\tcase WPN_NEMESIS: s = SPR_NEMESIS; break;\n\t\tcase WPN_BUBBLER: s = SPR_BUBBLER; break;\n\t\tcase WPN_SPUR: s = SPR_SPUR; break;\n\t\t\n\t\tdefault:\n\t\t\ts = SPR_WEAPONS_START + (wpn * 2);\n\t\tbreak;\n\t}\n\t\n\tif (look)\n\t{\n\t\ts++;\n\t\t*frame = (look == DOWN);\n\t}\n\telse\n\t{\n\t\t*frame = 0;\n\t}\n\t\n\t*spr = s;\n}\n\n\n// returns the point that a player's shot should be centered on when firing\nvoid GetPlayerShootPoint(int *x_out, int *y_out)\n{\nint spr, frame;\nint x, y;\n\n\tGetSpriteForGun(player->curWeapon, player->look, &spr, &frame);\n\t\n\t// we have to figure out where the gun is being carried, then figure out where the\n\t// gun's sprite is drawn relative to that, then finally we can offset in the\n\t// shoot point of the gun's sprite.\n\tx = player->x + (sprites[player->sprite].frame[player->frame].dir[player->dir].actionpoint.x << CSF);\n\tx -= sprites[spr].frame[frame].dir[player->dir].drawpoint.x << CSF;\n\tx += sprites[spr].frame[frame].dir[player->dir].actionpoint.x << CSF;\n\t\n\ty = player->y + (sprites[player->sprite].frame[player->frame].dir[player->dir].actionpoint.y << CSF);\n\ty -= sprites[spr].frame[frame].dir[player->dir].drawpoint.y << CSF;\n\ty += sprites[spr].frame[frame].dir[player->dir].actionpoint.y << CSF;\n\t\n\t*x_out = x;\n\t*y_out = y;\n}\n\n// draws the player\nvoid DrawPlayer(void)\n{\nint scr_x, scr_y;\n\n\tif (player->hide || player->disabled)\n\t\treturn;\n\t\n\t// keep his floattext position linked--do NOT update this if he is hidden\n\t// so that floattext doesn't follow him after he dies.\n\tplayer->DamageText->UpdatePos(player);\n\tplayer->XPText->UpdatePos(player);\n\t\n    // get screen position to draw him at\n    scr_x = (player->x >> CSF) - (map.displayed_xscroll >> CSF);\n    scr_y = (player->y >> CSF) - (map.displayed_yscroll >> CSF);\n\n\t// draw his gun\n\tif (player->curWeapon != WPN_NONE && player->curWeapon != WPN_BLADE)\n\t{\n\t\tint spr, frame;\n\t\tGetSpriteForGun(player->curWeapon, player->look, &spr, &frame);\n\t\t\n\t\t// draw the gun at the player's Action Point. Since guns have their Draw Point set\n\t\t// to point at their handle, this places the handle in the player's hand.\n\t\tdraw_sprite_at_dp(scr_x + sprites[player->sprite].frame[player->frame].dir[player->dir].actionpoint.x, \\\n\t\t\t\t\t\t  scr_y + sprites[player->sprite].frame[player->frame].dir[player->dir].actionpoint.y, \\\n\t\t\t\t\t\t  spr, frame, player->dir);\n\t}\n\t\n\t// draw the player sprite\n\tif (!player->hurt_flash_state)\n\t{\n\t\tdraw_sprite(scr_x, scr_y, player->sprite, player->frame, player->dir);\n\t\t\n\t\t// draw the air bubble shield if we have it on\n\t\tif (((player->touchattr & TA_WATER) && (player->equipmask & EQUIP_AIRTANK)) || \\\n\t\t\tplayer->movementmode == MOVEMODE_ZEROG)\n\t\t{\n\t\t\tdraw_sprite_at_dp(scr_x, scr_y, SPR_WATER_SHIELD, \\\n\t\t\t\t\t\t\t  player->water_shield_frame, player->dir);\n\t\t\t\n\t\t\tif (++player->water_shield_timer > 1)\n\t\t\t{\n\t\t\t\tplayer->water_shield_frame ^= 1;\n\t\t\t\tplayer->water_shield_timer = 0;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tif (player->equipmask & EQUIP_WHIMSTAR)\n\t\tdraw_whimstars(&player->whimstar);\n}\n\n\n"
  },
  {
    "path": "player.fdh",
    "content": "//hash:ff06af60\n//automatically generated by Makegen\n\n/* located in ObjManager.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nvoid map_scroll_jump(int x, int y);\n\n\n/* located in caret.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in player.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nvoid PInitFirstTime();\nstatic void InitWeapon(int wpn, int l1, int l2, int l3, int maxammo);\nvoid InitPlayer(void);\nvoid HandlePlayer(void);\nvoid HandlePlayer_am(void);\nvoid PDoPhysics(void);\nvoid PUpdateInput(void);\nvoid PHandleAttributes(void);\nvoid DoWaterCurrents(void);\nvoid PDoWalking(void);\nvoid PDoFalling(void);\nvoid PDoJumping(void);\nvoid PDoLooking(void);\nvoid PStartBooster(void);\nvoid PDoBooster(void);\nvoid PDoBoosterEnd();\nvoid PBoosterSmokePuff();\nvoid PHandleSolidBrickObjects(void);\nvoid PHandleSolidMushyObjects(void);\nvoid PRunSolidMushy(Object *o);\nvoid hurtplayer(int damage);\nvoid killplayer(int script);\nvoid PHandleZeroG(void);\nvoid PInitRepel(void);\nvoid PDoRepel(void);\nvoid PTryActivateScript();\nstatic bool RunScriptAtX(int x);\nstatic bool RunScriptAtLocation(int x, int y);\nvoid PDoHurtFlash(void);\nvoid PSelectFrame(void);\nvoid PSelectSprite(void);\nvoid GetSpriteForGun(int wpn, int look, int *spr, int *frame);\nvoid GetPlayerShootPoint(int *x_out, int *y_out);\nvoid DrawPlayer(void);\n\n\n/* located in playerstats.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nvoid SubXP(int xp, bool quiet);\n\n\n/* located in p_arms.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nvoid PResetWeapons();\nvoid PDoWeapons(void);\n\n\n/* located in tsc.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nint GetCurrentScript(void);\nScriptInstance *StartScript(int scriptno, int pageno);\n\n\n/* located in input.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nbool justpushed(int k);\n\n\n/* located in ai/weapons/whimstar.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nvoid remove_whimstar(WhimsicalStar *wh);\nvoid draw_whimstars(WhimsicalStar *wh);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nvoid SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in sound/sound.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nvoid sound(int snd);\nvoid StopLoopSounds(void);\n\n\n/* located in common/misc.cpp */\n\n//--------------------[referenced from player.cpp]-------------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "player.h",
    "content": "\n#ifndef _PLAYER_H\n#define _PLAYER_H\n\n#include \"p_arms.h\"\n#include \"ai/weapons/whimstar.h\"\n#define MAX_INVENTORY\t\t42\n\nclass Player : public Object\n{\npublic:\n\tvirtual ~Player();\n\t\n\t// current physics constants (change when you go underwater, etc)\n\tint fallspeed, walkspeed;\n\tint fallaccel, jumpfallaccel;\n\tint walkaccel, jumpwalkaccel;\n\tint decelspeed;\n\tint jumpvelocity;\n\t\n\t// attributes player is touching: water etc\n\tuint32_t touchattr;\n\t\n\tint airleft;\t\t\t\t// remaining air (is scaled x10)\n\tint airshowtimer;\t\t\t// used for blinking \"100\" when coming out of water\n\t\n\tbool walking, lastwalking;\n\tint walkanimframe;\n\tint walkanimtimer;\n\t\n\tbool jumping;\t\t\t\t// 1 if jump physics are enabled\n\t\n\tuint8_t look;\t\t\t\t// 0 = not looking, UP = looking up, DOWN = looking down\n\tuint8_t lookscroll;\t\t\t// which way the screen should scroll because of a look\n\tuint8_t lookscroll_timer;\t// delays a moment before scrolling when player pushes UP/DOWN\n\t\n\tbool inputs_locked;\t\t\t// if 1, the controls are turned off (player can't control his sprite)\n\tbool inputs_locked_lasttime;\n\t\n\tbool dead;\t\t\t\t\t// deactivates player AI...do we really need this?\n\tbool hide;\t\t\t\t\t// if 1, player and his statusbar is invisible\n\tbool drowned;\t\t\t\t// if 1, player drowning code has been activated\n\t// if 1, player is invisible and controls unresponsive\n\t// but statusbar still shown.\n\tbool disabled;\n\t\n\tbool lookaway;\t\t\t\t// 1 makes him look away from screen (eg when you push DOWN)\n\t\n\tint inventory[MAX_INVENTORY];\t\t// list of inventory items we have\n\tint ninventory;\t\t\t\t\t\t// how many objects are in inventory[]\n\t\n\tObject *riding;\t\t\t\t// if non-null, he is \"riding\" this object (used for solidity)\n\tObject *lastriding;\t\t\t// for thud sound\n\t// if non-null then this points at an object for which ->riding cannot be set.\n\t// This is used when a platform you are riding tries to push you into the ceiling\n\t// and so the engine deals with it by having you fall through the platform instead.\n\tObject *cannotride;\n\t// object if any that caused player's blocku to be set\n\tObject *bopped_object;\n\t\n\t// <UNI mode--used with Ironhead battle\n\tint movementmode;\n\t\n\t// how much fuel you have left in the Booster for this jump\n\tint boosterfuel;\n\tint booststate;\t\t\t\t// one of BoosterDir enum\n\tint lastbooststate;\n\tbool hitwhileboosting;\t\t// bit of a hack, to make hurthop work\n\t\n\t// controls \"+xx\" floattext numbers when you gain XP\n\tFloatText *XPText;\n\t\n\tWeapon weapons[WPN_COUNT];\n\tint curWeapon;\n\t\n\tint maxHealth;\t\t\t\t\t// max health\n\t\n\tint hurt_time;\t\t\t\t\t// timer for blinks after getting hit\n\tbool hurt_flash_state;\t\t\t// if 1, player is invisible because he's blinking\n\t\n\t// when displaying the water bubble (air tank item) this is the frame shown\n\tuint8_t water_shield_frame;\n\tuint8_t water_shield_timer;\n\t\n\t// items equipped\n\tuint16_t equipmask;\n\tWhimsicalStar whimstar;\n\t\n\t// additional \"block\" points placed further in than the real block points.\n\t// if these make it inside a block the player is \"pushed\" out of the block.\n\t// they can get inside the block because his R/L points are further out than his\n\t// D/U points because of his odd shape.\n\tPoint repel_l[8];\n\tPoint repel_r[8];\n\tPoint repel_u[8];\n\tPoint repel_d[8];\n\tint nrepel_l, nrepel_r, nrepel_u, nrepel_d;\n};\n\nextern Player *player;\nextern bool pinputs[INPUT_COUNT];\nextern bool lastpinputs[INPUT_COUNT];\n\nenum PMoveModes\n{\n\tMOVEMODE_NORMAL = 0,\n\tMOVEMODE_ZEROG  = 1,\n\tMOVEMODE_DEBUG  = 2\n};\n\n// how much fuel you start out with in the Booster on each jump.\n// (for both 0.8 and 2.0)\n#define BOOSTER_FUEL_QTY\t50\n\nenum BoosterState\n{\n\tBOOST_OFF = 0,\n\tBOOST_UP,\n\tBOOST_DOWN,\n\tBOOST_HOZ,\n\tBOOST_08\n};\n\n#define EQUIP_BOOSTER08\t\t0x01\n#define EQUIP_MAP\t\t\t0x02\n#define EQUIP_ARMS_BARRIER\t0x04\n#define EQUIP_TURBOCHARGE\t0x08\n#define EQUIP_AIRTANK\t\t0x10\n#define EQUIP_BOOSTER20\t\t0x20\n#define EQUIP_MIMIGA_MASK\t0x40\n#define EQUIP_WHIMSTAR\t\t0x80\n#define EQUIP_NIKUMARU\t\t0x100\n\nvoid AddXP(int xp, bool quiet = false);\nvoid SubXP(int xp, bool quiet = false);\n\n#endif\n"
  },
  {
    "path": "playerstats.cpp",
    "content": "\n#include \"nx.h\"\n#include \"playerstats.fdh\"\n\n\nvoid AddHealth(int hp)\n{\n\tplayer->hp += hp;\n\tif (player->hp > player->maxHealth) player->hp = player->maxHealth;\n}\n\nvoid AddXP(int xp, bool quiet)\n{\nWeapon *weapon = &player->weapons[player->curWeapon];\nbool leveled_up = false;\n\n\tweapon->xp += xp;\n\t\n\t// leveling up...\n\twhile(weapon->xp > weapon->max_xp[weapon->level])\n\t{\n\t\tif (weapon->level < 2)\n\t\t{\n\t\t\tweapon->xp -= weapon->max_xp[weapon->level];\n\t\t\tweapon->level++;\n\t\t\tleveled_up = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tweapon->xp = weapon->max_xp[weapon->level];\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tstatusbar.xpflashcount = 30;\n\t\n\tif (player->curWeapon == WPN_SPUR)\n\t\tleveled_up = false;\n\t\n\tif (!quiet)\n\t{\n\t\tif (!player->hide)\n\t\t{\n\t\t\tif (leveled_up)\n\t\t\t{\n\t\t\t\tsound(SND_LEVEL_UP);\n\t\t\t\teffect(player->CenterX(), player->CenterY(), EFFECT_LEVELUP);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsound(SND_GET_XP);\n\t\t\t}\n\t\t}\n\t\t\n\t\tplayer->XPText->AddQty(xp);\n\t}\n}\n\nvoid SubXP(int xp, bool quiet)\n{\nWeapon *weapon = &player->weapons[player->curWeapon];\nbool leveled_down = false;\n\n\tweapon->xp -= xp;\n\t\n\t// leveling down...\n\twhile(weapon->xp < 0)\n\t{\n\t\tif (weapon->level > 0)\n\t\t{\n\t\t\tweapon->level--;\n\t\t\tweapon->xp += weapon->max_xp[weapon->level];\n\t\t\tleveled_down = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tweapon->xp = 0;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tif (player->curWeapon == WPN_SPUR)\n\t\tleveled_down = false;\n\t\n\tif (leveled_down && !quiet && !player->hide)\n\t{\n\t\teffect(player->CenterX(), player->CenterY(), EFFECT_LEVELDOWN);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// add an item to the inventory list (generates an error msg if inventory is full)\nvoid AddInventory(int item)\n{\n\tif (player->ninventory+1 >= MAX_INVENTORY)\n\t\t{ staterr(\"<<<AddInventory: inventory is full>>\"); game.running = 0; return; }\n\t\n\tplayer->inventory[player->ninventory++] = item;\n\tsound(SND_GET_ITEM);\n\tRefreshInventoryScreen();\n}\n\n// remove an item from the inventory list (does nothing if it's not in there)\nvoid DelInventory(int item)\n{\nint slot;\nint i;\n\n\tfor(;;)\n\t{\n\t\tslot = FindInventory(item);\n\t\tif (slot == -1) break;\n\t\t\n\t\tfor(i=slot;i<player->ninventory-1;i++)\n\t\t{\n\t\t\tplayer->inventory[i] = player->inventory[i+1];\n\t\t}\n\t\tplayer->ninventory--;\n\t}\n\t\n\tRefreshInventoryScreen();\n}\n\n// find which slot an item is in (returns -1 if player does not have it)\nint FindInventory(int item)\n{\n\treturn CheckInventoryList(item, player->inventory, player->ninventory);\n}\n\n// checks if the inventory list given contains the given item.\n// if so, returns the index of the item. if not, returns -1.\nint CheckInventoryList(int item, int *list, int nitems)\n{\nint i;\n\n\tfor(i=0;i<nitems;i++)\n\t\tif (list[i] == item) return i;\n\t\n\treturn -1;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// AM+ command.\n// adds \"ammo\" ammo to the specified weapons ammo and maxammo,\n// and if you don't have it already, gives it to you.\nvoid GetWeapon(int wpn, int ammo)\n{\n\tif (!player->weapons[wpn].hasWeapon)\n\t{\n\t\tplayer->weapons[wpn].ammo = 0;\t// will be filled to full by AddAmmo below\n\t\tplayer->weapons[wpn].maxammo = ammo;\n\t\tplayer->weapons[wpn].level = 0;\n\t\tplayer->weapons[wpn].xp = 0;\n\t\tplayer->weapons[wpn].hasWeapon = true;\n\t\tplayer->curWeapon = wpn;\n\t}\n\telse\n\t{\t// missile capacity powerups\n\t\tplayer->weapons[wpn].maxammo += ammo;\n\t}\n\t\n\tAddAmmo(wpn, ammo);\n\tsound(SND_GET_ITEM);\n}\n\n// AM- command. Drops specified weapon.\nvoid LoseWeapon(int wpn)\n{\n\tplayer->weapons[wpn].hasWeapon = false;\n\t\n\t// lost current weapon?\n\tif (wpn == player->curWeapon)\n\t{\n\t\t// in case he has no weapons left at all\n\t\tplayer->curWeapon = WPN_NONE;\n\t\t\n\t\t// find a new weapon for him\n\t\tfor(int i=0;i<WPN_COUNT;i++)\n\t\t{\n\t\t\tif (player->weapons[i].hasWeapon)\n\t\t\t{\n\t\t\t\tplayer->curWeapon = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\n// TAM command.\nvoid TradeWeapon(int oldwpn, int newwpn, int ammo)\n{\nint oldcurwpn = player->curWeapon;\n\n\t// ammo 0 = no change; used when you get missiles are upgraded to Super Missiles\n\tif (ammo == 0)\n\t\tammo = player->weapons[oldwpn].maxammo;\n\t\n\tGetWeapon(newwpn, ammo);\n\tLoseWeapon(oldwpn);\n\t\n\t// switch to new weapon if the weapon traded was the\n\t// one we were using. Otherwise, don't change current weapon.\n\tif (oldwpn == oldcurwpn)\n\t\tplayer->curWeapon = newwpn;\n\telse\n\t\tplayer->curWeapon = oldcurwpn;\n}\n\n// adds \"ammo\" ammo to the specified weapon, but doesn't go over the limit.\nvoid AddAmmo(int wpn, int ammo)\n{\n\tplayer->weapons[wpn].ammo += ammo;\n\tif (player->weapons[wpn].ammo > player->weapons[wpn].maxammo)\n\t\tplayer->weapons[wpn].ammo = player->weapons[wpn].maxammo;\n}\n\n// sets all weapons to max ammo. AE+ command.\nvoid RefillAllAmmo(void)\n{\n\tfor(int i=0;i<WPN_COUNT;i++)\n\t{\n\t\tif (player->weapons[i].hasWeapon)\n\t\t\tplayer->weapons[i].ammo = player->weapons[i].maxammo;\n\t}\n}\n\n"
  },
  {
    "path": "playerstats.fdh",
    "content": "//hash:7a858c13\n//automatically generated by Makegen\n\n/* located in caret.cpp */\n\n//------------------[referenced from playerstats.cpp]----------------//\nCaret *effect(int x, int y, int effectno);\n\n\n/* located in playerstats.cpp */\n\n//------------------[referenced from playerstats.cpp]----------------//\nvoid AddHealth(int hp);\nvoid AddXP(int xp, bool quiet);\nvoid SubXP(int xp, bool quiet);\nvoid AddInventory(int item);\nvoid DelInventory(int item);\nint FindInventory(int item);\nint CheckInventoryList(int item, int *list, int nitems);\nvoid GetWeapon(int wpn, int ammo);\nvoid LoseWeapon(int wpn);\nvoid TradeWeapon(int oldwpn, int newwpn, int ammo);\nvoid AddAmmo(int wpn, int ammo);\nvoid RefillAllAmmo(void);\n\n\n/* located in inventory.cpp */\n\n//------------------[referenced from playerstats.cpp]----------------//\nint RefreshInventoryScreen(void);\n\n\n/* located in sound/sound.cpp */\n\n//------------------[referenced from playerstats.cpp]----------------//\nvoid sound(int snd);\n\n\n/* located in common/stat.cpp */\n\n//------------------[referenced from playerstats.cpp]----------------//\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "profile.cpp",
    "content": "\n#include \"nx.h\"\n#include \"profile.h\"\n#include \"profile.fdh\"\n\n#define PF_WEAPONS_OFFS\t\t0x38\n#define PF_CURWEAPON_OFFS\t0x24\n#define PF_INVENTORY_OFFS\t0xD8\n#define PF_TELEPORTER_OFFS\t0x158\n#define PF_FLAGS_OFFS\t\t0x218\n\n#define MAX_WPN_SLOTS\t\t8\n#define MAX_TELE_SLOTS\t\t8\n\n// load savefile #num into the given Profile structure.\nbool profile_load(const char *pfname, Profile *file)\n{\nint i, curweaponslot;\nFILE *fp;\n\n\tstat(\"Loading profile from %s...\", pfname);\n\tmemset(file, 0, sizeof(Profile));\n\t\n\tfp = fileopen(pfname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"profile_load: unable to open '%s'\", pfname);\n\t\treturn 1;\n\t}\n\t\n\tif (!fverifystring(fp, \"Do041220\"))\n\t{\n\t\tstaterr(\"profile_load: invalid savegame format: '%s'\", pfname);\n\t\tfclose(fp);\n\t\treturn 1;\n\t}\n\t\n\tfile->stage = fgetl(fp);\n\tfile->songno = fgetl(fp);\n\t\n\tfile->px = fgetl(fp);\n\tfile->py = fgetl(fp);\n\tfile->pdir = CVTDir(fgetl(fp));\n\t\n\tfile->maxhp = fgeti(fp);\n\tfile->num_whimstars = fgeti(fp);\n\tfile->hp = fgeti(fp);\n\t\n\tfgeti(fp);\t\t\t\t\t\t// unknown value\n\tcurweaponslot = fgetl(fp);\t\t// current weapon (slot, not number, converted below)\n\tfgetl(fp);\t\t\t\t\t\t// unknown value\n\tfile->equipmask = fgetl(fp);\t// equipped items\n\t\n\t// load weapons\n\tfseek(fp, PF_WEAPONS_OFFS, SEEK_SET);\n\tfor(i=0;i<MAX_WPN_SLOTS;i++)\n\t{\n\t\tint type = fgetl(fp);\n\t\tif (!type) break;\n        if (type < 0 || type >= WPN_COUNT) {\n            staterr(\"profile_load: invalid weapon type %d\", type);\n            break;\n        }\n\t\t\n\t\tint level = fgetl(fp);\n\t\tint xp = fgetl(fp);\n\t\tint maxammo = fgetl(fp);\n\t\tint ammo = fgetl(fp);\n\t\t\n\t\tfile->weapons[type].hasWeapon = true;\n\t\tfile->weapons[type].level = (level - 1);\n\t\tfile->weapons[type].xp = xp;\n\t\tfile->weapons[type].ammo = ammo;\n\t\tfile->weapons[type].maxammo = maxammo;\n\t\t\n\t\tif (i == curweaponslot)\n\t\t{\n\t\t\tfile->curWeapon = type;\n\t\t}\n\t}\n\t\n\t// load inventory\n\tfile->ninventory = 0;\n\tfseek(fp, PF_INVENTORY_OFFS, SEEK_SET);\n\tfor(i=0;i<MAX_INVENTORY;i++)\n\t{\n\t\tint item = fgetl(fp);\n\t\tif (!item) break;\n\t\t\n\t\tfile->inventory[file->ninventory++] = item;\n\t}\n\t\n\t// load teleporter slots\n\tfile->num_teleslots = 0;\n\tfseek(fp, PF_TELEPORTER_OFFS, SEEK_SET);\n\tfor(i=0;i<NUM_TELEPORTER_SLOTS;i++)\n\t{\n\t\tint slotno = fgetl(fp);\n\t\tint scriptno = fgetl(fp);\n\t\tif (slotno == 0) break;\n\t\t\n\t\tfile->teleslots[file->num_teleslots].slotno = slotno;\n\t\tfile->teleslots[file->num_teleslots].scriptno = scriptno;\n\t\tfile->num_teleslots++;\n\t}\n\t\n\t// load flags\n\tfseek(fp, PF_FLAGS_OFFS, SEEK_SET);\n\tif (!fverifystring(fp, \"FLAG\"))\n\t{\n\t\tstaterr(\"profile_load: missing 'FLAG' marker\");\n\t\tfclose(fp);\n\t\treturn 1;\n\t}\n\t\n\tfresetboolean();\n\tfor(i=0;i<NUM_GAMEFLAGS;i++)\n\t{\n\t\tfile->flags[i] = fbooleanread(fp);\n\t}\n\t\n\tfclose(fp);\n\treturn 0;\n}\n\n\nbool profile_save(const char *pfname, Profile *file)\n{\nFILE *fp;\nint i;\n\n\t//stat(\"Writing saved game to %s...\", pfname);\n\tfp = fileopen(pfname, \"wb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"profile_save: unable to open %s\", pfname);\n\t\treturn 1;\n\t}\n\t\n\tfputstringnonull(\"Do041220\", fp);\n\t\n\tfputl(file->stage, fp);\n\tfputl(file->songno, fp);\n\t\n\tfputl(file->px, fp);\n\tfputl(file->py, fp);\n\tfputl((file->pdir == RIGHT) ? 2:0, fp);\n\t\n\tfputi(file->maxhp, fp);\n\tfputi(file->num_whimstars, fp);\n\tfputi(file->hp, fp);\n\t\n\tfseek(fp, 0x2C, SEEK_SET);\n\tfputi(file->equipmask, fp);\n\t\n\t// save weapons\n\tfseek(fp, PF_WEAPONS_OFFS, SEEK_SET);\n\tint slotno = 0, curweaponslot = 0;\n\t\n\tfor(i=0;i<WPN_COUNT;i++)\n\t{\n\t\tif (file->weapons[i].hasWeapon)\n\t\t{\n\t\t\tfputl(i, fp);\n\t\t\tfputl(file->weapons[i].level + 1, fp);\n\t\t\tfputl(file->weapons[i].xp, fp);\n\t\t\tfputl(file->weapons[i].maxammo, fp);\n\t\t\tfputl(file->weapons[i].ammo, fp);\n\t\t\t\n\t\t\tif (i == file->curWeapon)\n\t\t\t\tcurweaponslot = slotno;\n\t\t\t\n\t\t\tslotno++;\n\t\t\tif (slotno >= MAX_WPN_SLOTS) break;\n\t\t}\n\t}\n\t\n\tif (slotno < MAX_WPN_SLOTS)\n\t\tfputl(0, fp);\t// 0-type weapon: terminator\n\t\n\t// go back and save slot no of current weapon\n\tfseek(fp, PF_CURWEAPON_OFFS, SEEK_SET);\n\tfputl(curweaponslot, fp);\n\t\n\t// save inventory\n\tfseek(fp, PF_INVENTORY_OFFS, SEEK_SET);\n\tfor(i=0;i<file->ninventory;i++)\n\t{\n\t\tfputl(file->inventory[i], fp);\n\t}\n\t\n\tfputl(0, fp);\n\t\n\t// write teleporter slots\n\tfseek(fp, PF_TELEPORTER_OFFS, SEEK_SET);\n\tfor(i=0;i<MAX_TELE_SLOTS;i++)\n\t{\n\t\tif (i < file->num_teleslots)\n\t\t{\n\t\t\tfputl(file->teleslots[i].slotno, fp);\n\t\t\tfputl(file->teleslots[i].scriptno, fp);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfputl(0, fp);\n\t\t\tfputl(0, fp);\n\t\t}\n\t}\n\t\n\t// write flags\n\tfseek(fp, PF_FLAGS_OFFS, SEEK_SET);\n\tfputstringnonull(\"FLAG\", fp);\n\t\n\tfresetboolean();\n\tfor(i=0;i<NUM_GAMEFLAGS;i++)\n\t{\n\t\tfbooleanwrite(file->flags[i], fp);\n\t}\n\t\n\tfbooleanflush(fp);\n\t\n\tfclose(fp);\n\treturn 0;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// returns the filename for a save file given it's number\nconst char *GetProfileName(int num)\n{\n#ifndef __HAIKU__\n\tif (num == 0)\n\t\treturn \"profile.dat\";\n\telse\n\t\treturn stprintf(\"profile%d.dat\", num+1);\n#else\n\tchar path[PATH_MAX];\n\tchar *haikuPath = getHaikuSettingsPath();\n\tstrcpy(path, haikuPath);\n\tif (num == 0) {\n\t\tstrcat(path, \"profile.dat\");\n\t} else {\n\t\tstrcat(path, \"profile%d.dat\");\n\t}\n\tfree(haikuPath);\n\treturn stprintf(path, num+1);\n#endif\n}\n\n// returns whether the given save file slot exists\nbool ProfileExists(int num)\n{\n\treturn file_exists(GetProfileName(num));\n}\n\nbool AnyProfileExists()\n{\n\tfor(int i=0;i<MAX_SAVE_SLOTS;i++)\n\t\tif (ProfileExists(i)) return true;\n\t\n\treturn false;\n}\n\n\n\n"
  },
  {
    "path": "profile.fdh",
    "content": "//hash:efab372e\n//automatically generated by Makegen\n\n/* located in profile.cpp */\n\n//--------------------[referenced from profile.cpp]------------------//\nbool profile_load(const char *pfname, Profile *file);\nbool profile_save(const char *pfname, Profile *file);\nconst char *GetProfileName(int num);\nbool ProfileExists(int num);\nbool AnyProfileExists();\n\n\n/* located in platform.cpp */\n\n//--------------------[referenced from profile.cpp]------------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in tsc.cpp */\n\n//--------------------[referenced from profile.cpp]------------------//\nint CVTDir(int csdir);\n\n\n/* located in common/stat.cpp */\n\n//--------------------[referenced from profile.cpp]------------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//--------------------[referenced from profile.cpp]------------------//\nbool fverifystring(FILE *fp, const char *str);\nuint32_t fgetl(FILE *fp);\nuint16_t fgeti(FILE *fp);\nvoid fresetboolean(void);\nchar fbooleanread(FILE *fp);\nvoid fputstringnonull(const char *buf, FILE *fp);\nvoid fputl(uint32_t word, FILE *fp);\nvoid fputi(uint16_t word, FILE *fp);\nvoid fbooleanwrite(char bit, FILE *fp);\nvoid fbooleanflush(FILE *fp);\nchar *stprintf(const char *fmt, ...);\nbool file_exists(const char *fname);\n\n"
  },
  {
    "path": "profile.h",
    "content": "\n#ifndef _PROFILE_H\n#define _PROFILE_H\n\n// how many bytes of data long a profile.dat is.\n// used by the replays which use the regular profile functions\n// to write a savefile then tack their own data onto the end.\n#define PROFILE_LENGTH\t\t0x604\n\nstruct Profile\n{\n\tint stage;\n\tint songno;\n\tint px, py, pdir;\n\tint hp, maxhp, num_whimstars;\n\tuint32_t equipmask;\n\t\n\tint curWeapon;\n\tstruct\n\t{\n\t\tbool hasWeapon;\n\t\tint level;\n\t\tint xp;\n\t\tint ammo, maxammo;\n\t} weapons[WPN_COUNT];\n\t\n\tint inventory[MAX_INVENTORY];\n\tint ninventory;\n\t\n\tbool flags[NUM_GAMEFLAGS];\n\t\n\tstruct\n\t{\n\t\tint slotno;\n\t\tint scriptno;\n\t} teleslots[NUM_TELEPORTER_SLOTS];\n\tint num_teleslots;\n};\n\n#endif\n"
  },
  {
    "path": "replay.cpp",
    "content": "\n#include <time.h>\n#include \"nx.h\"\n#include \"replay.h\"\n#include \"profile.h\"\n#include \"replay.fdh\"\nusing namespace Replay;\n\n#define REPLAY_MAGICK\t\t0xC322\nstatic ReplayRecording rec;\nstatic ReplayPlaying play;\n\nstatic int next_ffwdto = 0;\nstatic int next_stopat = 0;\nstatic bool next_accel = false;\nextern int flipacceltime;\n\n// begin recording a replay into the given file,\n// creating the save-profile section from the current game state.\nbool Replay::begin_record(const char *fname)\n{\nFILE *fp;\nProfile profile;\n\n\tend_record();\n\tmemset(&rec, 0, sizeof(rec));\n\t\n\tstat(\"begin_record('%s')\", fname);\n\t\n\t// grab a savefile record of the game state and write it at the start of the file\n\t// just like a regular profile.dat.\n\tif (game_save(&profile)) return 1;\n\tif (profile_save(fname, &profile)) return 1;\n\t\n\tfp = fileopen(fname, \"r+\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"begin_record: failed to open file %s\", fname);\n\t\treturn 1;\n\t}\n\t\n\tfseek(fp, PROFILE_LENGTH, SEEK_SET);\t// seek to end of profile data\n\t\n\trec.hdr.magick = REPLAY_MAGICK;\n\trec.hdr.randseed = getrand();\n\trec.hdr.locked = false;\n\trec.hdr.total_frames = 0;\n\trec.hdr.createstamp = (uint64_t)time(NULL);\n\trec.hdr.stageno = game.curmap;\n\tmemcpy(&rec.hdr.settings, &normal_settings, sizeof(Settings));\n\t\n\tfwrite(&rec.hdr, sizeof(ReplayHeader), 1, fp);\n\t\n\trec.fp = fp;\n\tseedrand(rec.hdr.randseed);\n\t\n\tfputl('MARK', fp);\n\trec.fb.SetFile(fp);\n\trec.fb.SetBufferSize(256);\n\trec.fb.Dump();\n\treturn 0;\n}\n\nbool Replay::end_record()\n{\n\tif (!IsRecording())\n\t\treturn 1;\n\t\n\t// flush final RLE run\n\twrite_record(rec.lastkeys, rec.runlength, &rec.fb);\n\trec.runlength = 0;\n\trec.fb.Flush();\n\trec.fb.SetFile(NULL);\n\t\n\tfputc('!', rec.fp);\n\tfputl('STOP', rec.fp);\n\t\n\t// go back and save the header again so we have total_frames correct.\n\tfseek(rec.fp, PROFILE_LENGTH, SEEK_SET);\n\tfwrite(&rec.hdr, sizeof(ReplayHeader), 1, rec.fp);\n\tfclose(rec.fp);\n\t\n\tstat(\"end_record(): wrote %d frames\", rec.hdr.total_frames);\n\tmemset(&rec, 0, sizeof(rec));\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// load the save-game contained with the given replay and begin playback.\nbool Replay::begin_playback(const char *fname)\n{\nFILE *fp;\nProfile profile;\n\n\tend_playback();\n\tmemset(&play, 0, sizeof(play));\n\t\n\tstat(\"begin_playback('%s')\", fname);\n\t\n\tif (profile_load(fname, &profile))\n\t\treturn 1;\n\t\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"begin_playback: failed to open file %s\", fname);\n\t\treturn 1;\n\t}\n\t\n\tfseek(fp, PROFILE_LENGTH, SEEK_SET);\t// seek to end of profile data\n\tfread(&play.hdr, sizeof(ReplayHeader), 1, fp);\n\t\n\tif (play.hdr.magick != REPLAY_MAGICK)\n\t{\n\t\tstaterr(\"begin_playback: magick mismatch on file '%s' (%x shouldbe %x)\", fname, play.hdr.magick, REPLAY_MAGICK);\n\t\treturn 1;\n\t}\n\t\n\t// undo settings we don't want to apply during the replay\n\tmemcpy(&replay_settings, &play.hdr.settings, sizeof(Settings));\n\treplay_settings.resolution = normal_settings.resolution;\n\treplay_settings.sound_enabled = normal_settings.sound_enabled;\n\treplay_settings.music_enabled = normal_settings.music_enabled;\n\t\n\tgame_load(&profile);\n\tseedrand(play.hdr.randseed);\n\t\n\tif (fgetl(fp) != 'MARK')\n\t{\n\t\tconsole.Print(\"Replay fail MARK\");\n\t\treturn 1;\n\t}\n\t\n\t// debug stuff for replaying at startup from main.cpp\n\tplay.ffwdto = next_ffwdto;\n\tnext_ffwdto = 0;\n\t\n\tplay.stopat = next_stopat;\n\tnext_stopat = 0;\n\t\n\tplay.ffwd_accel = next_accel;\n\tnext_accel = 0;\n\t\n\tplay.fp = fp;\n//\tdump_replay();\n\treturn 0;\n}\n\nbool Replay::end_playback()\n{\n\tif (!IsPlaying()) return 1;\n\t\n\tfclose(play.fp);\n\tplay.fp = NULL;\n\t\n\tmemset(inputs, 0, sizeof(inputs));\n\tplay.termtimer = 110;\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// run record and playback.\n// * inputs states can be recorded to the file.\n// * inputs can be injected into the array from the file.\nvoid Replay::run()\n{\n\t//debug(\"%d %d\", IsPlaying(), IsRecording());\n\t\n\tif (IsPlaying())\n\t{\n\t\tsettings = &replay_settings;\n\t\trun_playback();\n\t}\n\telse\n\t{\n\t\tsettings = &normal_settings;\n\t}\n\t\n\tif (IsRecording())\n\t\trun_record();\n}\n\n\n// record incoming inputs states to the record_fp.\nvoid Replay::run_record()\n{\n\trec.hdr.total_frames++;\n\tuint32_t keys = EncodeBits(inputs, INPUT_COUNT);\n\t\n\tif (keys != rec.lastkeys)\n\t{\n\t\tif (rec.runlength != 0)\n\t\t{\n\t\t\twrite_record(rec.lastkeys, rec.runlength, &rec.fb);\n\t\t\trec.runlength = 0;\n\t\t}\n\t\t\n\t\trec.lastkeys = keys;\n\t}\n\t\n\trec.runlength++;\n}\n\nstatic void Replay::run_playback()\n{\n\tplay.elapsed_frames++;\n\t\n\tif (play.stopat && play.elapsed_frames >= play.stopat)\n\t{\n\t\tend_playback();\n\t\treturn;\n\t}\n\t\n\tif (play.ffwdto && play.elapsed_frames < play.ffwdto)\n\t{\n\t\tgame.ffwdtime = 2;\n\t\tif (play.ffwd_accel)\n\t\t\tflipacceltime = 2;\t// global variable from main; disables screen->Flip()\n\t}\n\t\n\t// RLE decoding\n\tif (play.runlength == 0)\n\t{\n\t\tif (read_record(&play.keys, &play.runlength, play.fp))\n\t\t{\n\t\t\tend_playback();\n\t\t\tplay.keys = 0;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tplay.elapsed_records++;\n\t}\n\t\n\tplay.runlength--;\n\t\n\tdebug(\"keys: %08x\", play.keys);\n\tdebug(\"runlength: %d\", play.runlength);\n\tdebug(\"frame: %d\", play.elapsed_frames);\n\tdebug(\"record: %d\", play.elapsed_records);\n\t//debug(\"frames left: %d\", (play.hdr.total_frames - play.elapsed_frames));\n\t\n\tbool keys[INPUT_COUNT];\n\tDecodeBits(play.keys, keys, INPUT_COUNT);\n\t\n\t// which recorded inputs should be applied\n\tstatic const int list[] =\n\t{\n\t\tLEFTKEY, RIGHTKEY, UPKEY, DOWNKEY,\n\t\tJUMPKEY, FIREKEY, PREVWPNKEY, NEXTWPNKEY,\n\t\tINVENTORYKEY, MAPSYSTEMKEY,\n\t\tDEBUG_MOVE_KEY, DEBUG_GOD_KEY, DEBUG_FLY_KEY,\n\t\t-1\n\t};\n\t\n\tfor(int i=0;list[i] != -1;i++)\n\t{\n\t\tint key = list[i];\n\t\tinputs[key] = keys[key];\n\t}\n\t\n\treturn;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void write_record(uint32_t keys, uint32_t runlength, FileBuffer *fb)\n{\n\tfb->Write8('[');\n\tfb->Write32(keys);\n\tfb->Write8(':');\n\tfb->Write32(runlength);\n\tfb->Write8(']');\n}\n\nstatic bool read_record(uint32_t *keys, uint32_t *runlength, FILE *fp)\n{\n\tchar ch = fgetc(fp);\n\tif (ch == '!') return REC_END;\n\t\n\tif (feof(fp))\n\t{\n\t\tconsole.Print(\"unexpected end of file\");\n\t\treturn REC_ERR;\n\t}\n\t\n\tif (ch != '[')\n\t{\n\t\tconsole.Print(\"replay field fail [\");\n\t\treturn REC_ERR;\n\t}\n\t\n\t*keys = fgetl(fp);\n\t\n\tif (fgetc(fp) != ':')\n\t{\n\t\tconsole.Print(\"replay field fail :\");\n\t\treturn REC_ERR;\n\t}\n\t\n\t*runlength = fgetl(fp);\n\t\n\tif (fgetc(fp) != ']')\n\t{\n\t\tconsole.Print(\"replay field fail ]\");\n\t\treturn REC_ERR;\n\t}\n\t\n\treturn REC_OK;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// draw the playback status \"tape\"\nvoid Replay::DrawStatus()\n{\nstatic const int TAPE_CHARS = 10;\nstatic const int x = 4;\nchar buf[40];\nint tapepos;\n\n\tif (!IsPlaying() || game.paused)\n\t{\n\t\tif (play.termtimer > 0)\n\t\t{\n\t\t\tplay.termtimer--;\n\t\t\tconst char *str = ((play.termtimer % 40) >= 20) ? \"> PLAYBACK TERMINATED <\":\">                     <\";\n\t\t\t\n\t\t\tint y = (SCREEN_HEIGHT - 3) - (GetFontHeight() * 2);\n\t\t\tfont_draw_shaded(x, y, str, 0, &greenfont);\n\t\t}\n\t\t\n\t\treturn;\n\t}\n\t\n\t// ask for one more char in length than we actually have, this makes it\n\t// so the tape gets all-the-way filled up near the end (otherwise, the only time\n\t// it'd be fully filled is on the very last frame, so we wouldn't ever see it).\n\ttapepos = GetPlaybackPosition(TAPE_CHARS + 1);\n\tif (tapepos > TAPE_CHARS) tapepos = TAPE_CHARS;\n\t\n\t// > PLAY : 00000\n\t//   [>>>>>>>>>>]\n\tbuf[0] = '['; buf[TAPE_CHARS+1] = ']'; buf[TAPE_CHARS+2] = 0;\n\tmemset(&buf[1], ' ', TAPE_CHARS);\n\tmemset(&buf[1], '>', tapepos);\n\t\n\tint y = (SCREEN_HEIGHT - 3) - GetFontHeight();\n\tfont_draw_shaded(x, y, buf, 0, &greenfont);\n\t\n\tconst char *mode = ((play.elapsed_frames % 40) < 20) ? \"PLAY\" : \"    \";\n\tif (game.ffwdtime) mode = \"FFWD\";\n\tsprintf(buf, \"> %s : %05d\", mode, play.elapsed_frames);\n\t\n\ty -= GetFontHeight();\n\tfont_draw_shaded(x, y, buf, 0, &greenfont);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// called from main after a game is loaded or a new game is begun.\nvoid Replay::OnGameStarting()\n{\n\tstat(\"Replay::OnGameStarting()\");\n\t\n\tif (!IsPlaying())\n\t\tbegin_record_next();\n}\n\n\nbool Replay::begin_record_next()\n{\n\tint slot = GetAvailableSlot();\n\tif (slot == -1)\n\t{\n\t\tstat(\"begin_record_next: all slots locked; not recording a replay\");\n\t\treturn 1;\n\t}\n\t\n\tstat(\"begin_record_next: starting record to slot %d\", slot);\n\treturn begin_record(GetReplayName(slot));\n}\n\n\nstatic int Replay::GetAvailableSlot(void)\n{\nReplaySlotInfo slotinfo[MAX_REPLAYS];\nReplaySlotInfo *unlocked[MAX_REPLAYS];\nint i, numUnlocked;\n\n\t// get info for all slots.\n\t// try to find a slot that isn't used yet, if we can, take the first one.\n\tfor(i=MAX_REPLAYS-1;i>=0;i--)\n\t{\n\t\tGetSlotInfo(i, &slotinfo[i]);\n\t\t//stat(\"Read status of slot %d: [ %d ]\", i, slotinfo[i].status);\n\t\t\n\t\tif (slotinfo[i].status == RS_UNUSED)\n\t\t\treturn i;\n\t}\n\t\n\t// nope, the easy way out didn't work because all the replay slots\n\t// have at least something in them. so, get a list of all unlocked files.\n\tnumUnlocked = 0;\n\tfor(i=0;i<MAX_REPLAYS;i++)\n\t{\n\t\tif (slotinfo[i].status == RS_UNLOCKED)\n\t\t\tunlocked[numUnlocked++] = &slotinfo[i];\n\t}\n\t\n\t// if the unlocked list has 0 entries then all slots are both in use and locked.\n\t// we fail. return.\n\tif (numUnlocked == 0)\n\t\treturn -1;\n\t\n\t// delete the file in the highest-numbered slot.\n\tremove(unlocked[--numUnlocked]->filename);\n\tunlocked[numUnlocked]->status = RS_UNUSED;\n\t\n\t// assign new filenames to all the files in the list, working downward\n\t// from the highest-numbered slot. The going backwards also ensures there\n\t// can't be any conflicts while we're in the middle of this.\n\tint nextslot = (MAX_REPLAYS - 1);\n\tfor(i=numUnlocked-1;i>=0;i--)\n\t{\n\t\t// skip over locked slots\n\t\twhile(slotinfo[nextslot].status == RS_LOCKED)\n\t\t\tnextslot--;\n\t\t\n\t\tconst char *newfilename = GetReplayName(nextslot);\n\t\trename(unlocked[i]->filename, newfilename);\n\t\tstrcpy(unlocked[i]->filename, newfilename);\n\t\t\n\t\tnextslot--;\n\t}\n\t\n\t// now take the first unused slot. we're sure that there is one this time.\n\tfor(i=0;i<MAX_REPLAYS;i++)\n\t{\n\t\tif (!file_exists(GetReplayName(i)))\n\t\t\treturn i;\n\t}\n\t\n\tstaterr(\"GetAvailableSlot: deleted one but still none available???\");\n\treturn -1;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n// returns locked/unlocked/available status and filename info for the given replay slot.\nvoid Replay::GetSlotInfo(int slotno, ReplaySlotInfo *slot)\n{\n\tGetReplayName(slotno, slot->filename);\n\t\n\tif (LoadHeader(slot->filename, &slot->hdr) || \\\n\t\tslot->hdr.magick != REPLAY_MAGICK)\n\t{\n\t\tslot->status = RS_UNUSED;\n\t\tslot->filename[0] = 0;\n\t}\n\telse\n\t{\n\t\tslot->status = (slot->hdr.locked) ? RS_LOCKED : RS_UNLOCKED;\n\t}\n}\n\n\nconst char *GetReplayName(int slotno, char *buffer)\n{\n\tif (!buffer) buffer = GetStaticStr();\n#ifndef __HAIKU__\n\tsprintf(buffer, \"replay/rep%d.dat\", slotno);\n#else\n\tchar path[PATH_MAX];\n\tchar *haikuPath = getHaikuSettingsPath();\n\tstrcpy(path, haikuPath);\n\tstrcat(path, \"replay/rep%d.dat\");\n\tsprintf(buffer, path, slotno);\n\tfree(haikuPath);\n#endif\n\treturn buffer;\n}\n\nbool Replay::LoadHeader(const char *fname, ReplayHeader *hdr)\n{\nFILE *fp;\n\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"LoadHeader: can't open file '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\tfseek(fp, PROFILE_LENGTH, SEEK_SET);\t// seek to end of profile data\n\tfread(hdr, sizeof(ReplayHeader), 1, fp);\n\t\n\tfclose(fp);\n\treturn 0;\n}\n\nbool Replay::SaveHeader(const char *fname, ReplayHeader *hdr)\n{\nFILE *fp;\n\n\tfp = fileopen(fname, \"r+\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"SaveHeader: can't open file '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\tfseek(fp, PROFILE_LENGTH, SEEK_SET);\t// seek to end of profile data\n\tfwrite(hdr, sizeof(ReplayHeader), 1, fp);\n\t\n\tfclose(fp);\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// converts a framecount value into a textual total time.\nvoid Replay::FramesToTime(int framecount, char *buffer)\n{\nint mins, secs;\n\n\tsecs = (framecount / GAME_FPS);\n\tmins = (secs / 60);\n\tsecs = (secs % 60);\n\tif (mins > 99) mins = 99;\n\t\n\tsprintf(buffer, \"[%02d:%02d]\", mins, secs);\n}\n\n// returns a value between 0 and max which is like a percentage\n// of where we are on the \"tape\" (only works during playback).\nint Replay::GetPlaybackPosition(int max)\n{\n\tif (play.elapsed_frames >= play.hdr.total_frames)\n\t\treturn max;\n\t\n\tdouble ratio = ((double)max / (double)play.hdr.total_frames);\n\treturn (int)((double)play.elapsed_frames * ratio);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool Replay::IsRecording()\n{\n\treturn (rec.fp != NULL);\n}\n\nbool Replay::IsPlaying()\n{\n\treturn (play.fp != NULL);\n}\n\nvoid Replay::close()\n{\n\tend_record();\n\tend_playback();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid Replay::set_ffwd(int frame, bool accel)\n{\n\tif (IsPlaying())\n\t{\n\t\tplay.ffwdto = frame;\n\t\tplay.ffwd_accel = accel;\n\t}\n\telse\n\t{\n\t\tnext_ffwdto = frame;\n\t\tnext_accel = accel;\n\t}\n}\n\nvoid Replay::set_stopat(int frame)\n{\n\tif (IsPlaying())\n\t\tplay.stopat = frame;\n\telse\n\t\tnext_stopat = frame;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// shoves an array of bool values up to 32 entries long into a uint32.\nstatic uint32_t Replay::EncodeBits(bool *values, int nvalues)\n{\nuint32_t result = 0;\nuint32_t mask = 1;\n\n\tfor(int i=0;i<nvalues;i++)\n\t{\n\t\tif (values[i]) result |= mask;\n\t\tmask <<= 1;\n\t}\n\t\n\treturn result;\n}\n\n// pulls apart a uint32 created by EncodeBits back into a bool array.\nvoid Replay::DecodeBits(uint32_t value, bool *array, int len)\n{\nuint32_t mask = 1;\nint i;\n\n\tfor(i=0;i<len;i++)\n\t{\n\t\tarray[i] = (value & mask) ? 1 : 0;\n\t\tmask <<= 1;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic void dump_replay()\n{\n\tstat(\"=== Header ===\");\n\tstat(\"magick: %04x (%s)\", play.hdr.magick, (play.hdr.magick == REPLAY_MAGICK) ? \"correct\" : \"not correct\");\n\tstat(\"randseed: %08x\", play.hdr.randseed);\n\tstat(\"locked: %d\", play.hdr.locked);\n\tstat(\"total_frames: %d (%d secs)\", play.hdr.total_frames, play.hdr.total_frames / 50);\n\tstat(\"stageno: %d (%s)\", play.hdr.stageno, map_get_stage_name(play.hdr.stageno));\n\tstat(\"createstamp: %010llx\", play.hdr.createstamp);\n\tstat(\"=== End Header ===\");\n\tstat(\"\");\n\t\n\tstat(\"resolution: %d\", play.hdr.settings.resolution);\n\tstat(\"last_save_slot: %d\", play.hdr.settings.last_save_slot);\n\tstat(\"multisave: %d\", play.hdr.settings.multisave);\n\t/*int resolution;\n\tint last_save_slot;\n\tbool multisave;\n\tbool files_extracted;\n\tbool show_fps;\n\tbool displayformat;\n\t\n\tbool enable_debug_keys;\n\tbool sound_enabled;\n\tint music_enabled;\n\t\n\tbool instant_quit;\n\tbool emulate_bugs;\n\tbool no_quake_in_hell;\n\tbool inhibit_fullscreen;\n\t\n\tbool skip_intro;*/\n\t\n\t//exit(1);\n\t\n\t/*stat(\"Inputs:\");\n\tfor(int i=0;i<INPUT_COUNT;i++)\n\t{\n\t\tstat(\"  %08x  %08x\", play.hdr.settings.input_mappings[i], input_get_mapping(i));\n\t}*/\n\t\n\tfseek(play.fp, ftell(play.fp) - 0x2b, SEEK_SET);\t// 0x6a9\n\tstat(\"First Read %08x\", fgetl(play.fp));\n\tstat(\"Starting read at offset %04x\", ftell(play.fp));\n\t//exit(1);\n\t\n\t//exit(1);\n\t//int offset = 1;\n\t//fseek(play.fp, ftell(play.fp)+offset, SEEK_SET);\n\t\n\tint total_frames = 0;\n\tint record = 0;\n\tuint32_t lastkeys = 0xffffffff;\n\twhile(!feof(play.fp))\n\t{\n\t\tuint32_t keys = fgetl(play.fp);\n\t\tuint32_t runlength = fgetl(play.fp);\n\t\tif (runlength == 0xffffffff || feof(play.fp)) break;\n\t\ttotal_frames += runlength;\n\t\t\n\t\tstat(\"%04d  len %08x:  keys %08x     offset %08x\", record++, runlength, keys, ftell(play.fp)-8);\n\t\t\n\t\tif (keys == lastkeys)\n\t\t{\n\t\t\tstaterr(\" -- impossible key repeat\");\n\t\t\tif (runlength < 0x200000) break;\n\t\t}\n\t\t\n\t\tif (runlength >= 0x200000)\n\t\t{\n\t\t\tstaterr(\" -- bogus runlength %08x\", runlength);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tlastkeys = keys;\n\t}\n\t\n\t//total_frames--;\n\tstat(\"total frames count: %d\", total_frames);\n\tstat(\"frames reported: %d\", play.hdr.total_frames);\n\texit(1);\n}\n\n\n"
  },
  {
    "path": "replay.fdh",
    "content": "//hash:afdce1d2\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//--------------------[referenced from replay.cpp]-------------------//\nbool game_save(Profile *p);\nbool game_load(Profile *p);\n\n\n/* located in map.cpp */\n\n//--------------------[referenced from replay.cpp]-------------------//\nconst char *map_get_stage_name(int mapno);\n\n\n/* located in profile.cpp */\n\n//--------------------[referenced from replay.cpp]-------------------//\nbool profile_save(const char *pfname, Profile *file);\nbool profile_load(const char *pfname, Profile *file);\n\n\n/* located in platform.cpp */\n\n//--------------------[referenced from replay.cpp]-------------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in replay.cpp */\n\n//--------------------[referenced from replay.cpp]-------------------//\nstatic void write_record(uint32_t keys, uint32_t runlength, FileBuffer *fb);\nstatic bool read_record(uint32_t *keys, uint32_t *runlength, FILE *fp);\nconst char *GetReplayName(int slotno, char *buffer);\nstatic void dump_replay();\n\n\n/* located in debug.cpp */\n\n//--------------------[referenced from replay.cpp]-------------------//\nvoid debug(const char *fmt, ...);\n\n\n/* located in graphics/font.cpp */\n\n//--------------------[referenced from replay.cpp]-------------------//\nint GetFontHeight();\nint font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font);\n\n\n/* located in common/stat.cpp */\n\n//--------------------[referenced from replay.cpp]-------------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//--------------------[referenced from replay.cpp]-------------------//\nuint32_t getrand();\nvoid seedrand(uint32_t newseed);\nvoid fputl(uint32_t word, FILE *fp);\nuint32_t fgetl(FILE *fp);\nbool file_exists(const char *fname);\nchar *GetStaticStr(void);\n\n"
  },
  {
    "path": "replay.h",
    "content": "\n#ifndef _REPLAY_H\n#define _REPLAY_H\n\n#include \"common/FileBuffer.h\"\n#define MAX_REPLAYS\t\t\t\t8\t// how many automatic replays to save\n\n#define REC_OK\t\t0\n#define REC_ERR\t\t1\n#define REC_END\t\t2\nstruct ReplayHeader\n{\n\tuint16_t magick;\n\tuint32_t randseed;\n\tbool locked;\n\tint total_frames;\n\tint stageno;\n\tuint64_t createstamp;\n\tSettings settings;\n};\n\nstruct ReplayRecording\n{\n\tReplayHeader hdr;\n\tFileBuffer fb;\n\t\n\tuint32_t lastkeys;\n\tuint32_t runlength;\n\tFILE *fp;\n};\n\nstruct ReplayPlaying\n{\n\tReplayHeader hdr;\n\t\n\tuint32_t keys;\n\tuint32_t runlength;\n\tint elapsed_frames;\n\tint elapsed_records;\n\tFILE *fp;\n\t\n\tint ffwdto, ffwd_accel;\n\tint stopat;\n\t\n\tint termtimer;\t\t// blinks \"TERMINATED\" after replay ends\n};\n\nenum RS_Status\n{\n\tRS_UNUSED,\t\t// there is no file in this slot\n\tRS_UNLOCKED,\t// there is an unlocked file in this slot\n\tRS_LOCKED\t\t// there is a locked file in this slot\n};\n\nstruct ReplaySlotInfo\n{\n\tchar filename[MAXPATHLEN];\t// filename of the replay for this slot, if there is one\n\tint status;\t\t\t\t\t// status of this slot\n\tReplayHeader hdr;\t\t\t// header from slot\n};\n\n\nnamespace Replay\n{\n\tbool begin_record(const char *fname);\n\tbool end_record();\n\t\n\tbool begin_playback(const char *fname);\n\tbool end_playback();\n\t\n\tvoid run();\n\tvoid close();\n\t\n\tvoid OnGameStarting();\n\tbool begin_record_next();\n\t\n\tbool IsRecording();\n\tbool IsPlaying();\n\tvoid DrawStatus();\n\t\n\tvoid set_ffwd(int frame, bool accel=true);\n\tvoid set_stopat(int frame);\n\t\n\t\n\tbool LoadHeader(const char *fname, ReplayHeader *hdr);\n\tbool SaveHeader(const char *fname, ReplayHeader *hdr);\n\t\n\tvoid GetSlotInfo(int slotno, ReplaySlotInfo *slot);\n\tvoid FramesToTime(int framecount, char *buffer);\n\tint GetPlaybackPosition(int max);\n\t\n\tstatic uint32_t EncodeBits(bool *values, int nvalues);\n\tstatic void DecodeBits(uint32_t value, bool *array, int len);\n\t\n\tstatic void run_record();\n\tstatic void run_playback();\n\t\n\tstatic int GetAvailableSlot(void);\n};\n\n\nconst char *GetReplayName(int slotno, char *buffer = NULL);\n\n#endif\n"
  },
  {
    "path": "screeneffect.cpp",
    "content": "\n#include \"nx.h\"\n#include \"screeneffect.h\"\n#include \"screeneffect.fdh\"\n\nSE_FlashScreen flashscreen;\nSE_Starflash starflash;\nSE_Fade fade;\n\n/*\nvoid c------------------------------() {}\n*/\n\n// FlashScreen simply flashes the screen white several times,\n// and is used in various places, such as when Misery casts spells.\nvoid SE_FlashScreen::Start(void)\n{\n\ttimer = -1;\n\tflashes_left = 5;\n\tflashstate = true;\n\t\n\tenabled = true;\n}\n\nvoid SE_FlashScreen::Draw(void)\n{\n\tif (++timer >= 2)\n\t{\n\t\ttimer = 0;\n\t\tflashstate ^= 1;\n\t\t\n\t\tif (!flashstate)\n\t\t{\n\t\t\tif (--flashes_left <= 0)\n\t\t\t\tenabled = false;\n\t\t}\n\t}\n\t\n\tif (flashstate)\n\t\tClearScreen(0xff, 0xff, 0xff);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// Starflash is a full-screen white explosion in the shape of a '+',\n// used when some bosses are defeated.\n\nvoid SE_Starflash::Start(int x, int y)\n{\n\tsound(SND_EXPLOSION1);\n\tenabled = true;\n\tstate = 0;\n\tcenterx = x;\n\tcentery = y;\n\tsize = speed = 0;\n}\n\nvoid SE_Starflash::Draw(void)\n{\nSE_Starflash * const &star = this;\nint scr_x1, scr_y1, scr_x2, scr_y2;\nint rel_x, rel_y;\n\n\tif (state == 0)\n\t{\t// flash getting bigger\n\t\tstar->speed += (1 << CSF);\n\t\tstar->size += star->speed;\n\t}\n\telse\n\t{\t// flash getting smaller\n\t\tstar->size -= (star->size >> 3);\n\t\t\n\t\tif (star->size < 255)\n\t\t{\n\t\t\tenabled = false;\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t// draw the flash\n\trel_x = (star->centerx - map.displayed_xscroll);\n\trel_y = (star->centery - map.displayed_yscroll);\n\t\n\t// draw a horizontal bar\n\tscr_y1 = (rel_y - star->size) >> CSF;\n\tscr_y2 = (rel_y + star->size) >> CSF;\n\tFillRect(0, scr_y1, SCREEN_WIDTH, scr_y2, 255, 255, 255);\n\t\n\tif (star->state == 0)\n\t{\n\t\t// draw a vertical bar\n\t\tscr_x1 = (rel_x - starflash.size) >> CSF;\n\t\tscr_x2 = (rel_x + starflash.size) >> CSF;\n\t\tFillRect(scr_x1, 0, scr_x2, SCREEN_HEIGHT, 255, 255, 255);\n\t\t\n\t\t// once it's big enough, switch to making it smaller\n\t\tif (star->size > (1280<<CSF))\n\t\t{\n\t\t\tstar->size = (SCREEN_HEIGHT << CSF);\n\t\t\tstar->state = 1;\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n#define FADE_LAST_FRAME\t\t15\n\t\n// Fade is the fade-in/out used on every stage transistion/TRA.\n// Unlike other effects, it is drawn underneath the textboxes and Nikumaru counter,\n// and so isn't drawn from ScreenEffects::Draw().\n\nSE_Fade::SE_Fade()\n{\n\tstate = FS_NO_FADE;\n\tenabled = false;\n}\n\n// start a fade in or out.\n// fadedir: either FADE_IN or FADE_OUT\n// sweepdir: direction to \"sweep\" the fade\n// spr: the sprite to use for the fading\nvoid SE_Fade::Start(int fadedir, int sweepdir, int spr)\n{\n\tif (fadedir == FADE_OUT)\n\t{\n\t\t// when fading out, the directions are reversed\n\t\tswitch(sweepdir)\n\t\t{\n\t\t\tcase FADE_LEFT:  sweepdir = FADE_RIGHT; break;\n\t\t\tcase FADE_RIGHT: sweepdir = FADE_LEFT; break;\n\t\t\tcase FADE_UP:    sweepdir = FADE_DOWN; break;\n\t\t\tcase FADE_DOWN:  sweepdir = FADE_UP; break;\n\t\t}\n\t}\n\t\n\tstate = FS_FADING;\n\tenabled = true;\n\t\n\tfade.sprite = spr;\n\t\n\tfade.fadedir = fadedir;\n\tfade.sweepdir = sweepdir;\n\tfade.curframe = (fadedir == FADE_OUT) ? -FADE_LAST_FRAME : FADE_LAST_FRAME;\n}\n\n\nvoid SE_Fade::Draw(void)\n{\nint x, y;\n\n\t#define DRAW_VCOLUMN\t\\\n\t{\t\\\n\t\tif (frame >= 0)\t\t\t\t\\\n\t\t{\t\t\t\t\t\t\t\\\n\t\t\tif (frame > FADE_LAST_FRAME) frame = FADE_LAST_FRAME;\t\\\n\t\t\t\\\n\t\t\tfor(y=0;y<SCREEN_HEIGHT;y+=16)\t\t\t\t\t\t\t\\\n\t\t\t\tdraw_sprite(x, y, fade.sprite, frame);\t\t\\\n\t\t}\t\t\\\n\t}\n\t\n\t#define DRAW_HROW\t\\\n\t{\t\\\n\t\tif (frame >= 0)\t\t\t\t\\\n\t\t{\t\t\t\t\t\t\t\\\n\t\t\tif (frame > FADE_LAST_FRAME) frame = FADE_LAST_FRAME;\t\\\n\t\t\t\\\n\t\t\tfor(x=0;x<SCREEN_WIDTH;x+=16)\t\t\t\t\t\t\t\\\n\t\t\t\tdraw_sprite(x, y, fade.sprite, frame);\t\t\\\n\t\t}\t\t\\\n\t}\n\t\n\tif (state == FS_NO_FADE)\n\t{\n\t\treturn;\n\t}\n\telse if (state == FS_FADED_OUT)\n\t{\n\t\tClearScreen(DK_BLUE);\n\t\treturn;\n\t}\n\t\n\tint frame = fade.curframe;\n\tswitch(fade.sweepdir)\n\t{\n\t\tcase FADE_RIGHT:for(x=0;x<SCREEN_WIDTH;x+=16)\t   \t{ DRAW_VCOLUMN; frame++; }\tbreak;\n\t\tcase FADE_LEFT: for(x=SCREEN_WIDTH-1;x>=-16;x-=16)  { DRAW_VCOLUMN; frame++; }\tbreak;\n\t\tcase FADE_DOWN: for(y=0;y<SCREEN_HEIGHT;y+=16)\t  \t{ DRAW_HROW; frame++; }\tbreak;\n\t\tcase FADE_UP: \tfor(y=SCREEN_HEIGHT-1;y>=-16;y-=16) { DRAW_HROW; frame++; }\tbreak;\n\t\t\n\t\tcase FADE_CENTER:\n\t\t{\n\t\t\tint startframe = fade.curframe;\n\t\t\tint centerx = (SCREEN_WIDTH/2)-8;\n\t\t\tint centery = (SCREEN_HEIGHT/2)-8;\n\t\t\t\n\t\t\tfor(x=0;x<centerx+16;x+=16)\n\t\t\t{\n\t\t\t\tframe = startframe;\n\t\t\t\t\n\t\t\t\tfor(y=0;y<centery+16;y+=16)\n\t\t\t\t{\n\t\t\t\t\tif (frame >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (frame > FADE_LAST_FRAME) frame = FADE_LAST_FRAME;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdraw_sprite(centerx+x, centery+y, fade.sprite, frame);\n\t\t\t\t\t\tdraw_sprite(centerx-x, centery+y, fade.sprite, frame);\n\t\t\t\t\t\tdraw_sprite(centerx+x, centery-y, fade.sprite, frame);\n\t\t\t\t\t\tdraw_sprite(centerx-x, centery-y, fade.sprite, frame);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tframe++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstartframe++;\n\t\t\t}\n\t\t}\n\t\tbreak;\n\t}\n\t\n\tif (fade.fadedir == FADE_OUT)\n\t{\n\t\tfade.curframe++;\n\t\tif (fade.curframe > FADE_LAST_FRAME)\n\t\t\tstate = FS_FADED_OUT;\n\t}\n\telse\n\t{\t// fading in--terminate fade when done\n\t\tfade.curframe--;\n\t\tif (fade.curframe < -20)\n\t\t{\n\t\t\tstate = FS_NO_FADE;\n\t\t\tenabled = false;\n\t\t}\n\t}\n}\n\nvoid SE_Fade::set_full(int dir)\n{\n\tif (dir == FADE_OUT)\n\t{\n\t\tstate = FS_FADED_OUT;\n\t\t\n\t\tfade.fadedir = FADE_OUT;\n\t\tfade.sweepdir = FADE_RIGHT;\t\t\t// doesn't matter\n\t\tfade.curframe = FADE_LAST_FRAME;\n\t\tfade.sprite = SPR_FADE_DIAMOND;\n\t}\n\telse\n\t{\n\t\tstate = FS_NO_FADE;\n\t\tenabled = false;\n\t}\n}\n\nint SE_Fade::getstate(void)\n{\n\treturn this->state;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid ScreenEffects::Draw(void)\n{\n    if (starflash.enabled)\n\t\tstarflash.Draw();\n\t\n\tif (flashscreen.enabled)\n        flashscreen.Draw();\n}\n\nvoid ScreenEffects::Stop()\n{\n\tstarflash.enabled = false;\n\tflashscreen.enabled = false;\n}\n"
  },
  {
    "path": "screeneffect.fdh",
    "content": "//hash:a8ebd728\n//automatically generated by Makegen\n\n/* located in sound/sound.cpp */\n\n//-----------------[referenced from screeneffect.cpp]----------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "screeneffect.h",
    "content": "\n#ifndef _SCREENEFFECT_H\n#define _SCREENEFFECT_H\n\n\n// screeneffects are a simple draw overlay used w/ things such as flashes and such.\nclass ScreenEffect\n{\npublic:\n\tScreenEffect() { enabled = false; }\n\tvirtual ~ScreenEffect() { }\n\tvirtual void Draw() = 0;\n\t\n\tbool enabled;\n\t\nprotected:\n\tint state;\n\tint timer;\n};\n\n\n// FlashScreen simply flashes the screen white several times,\n// and is used in various places such as when Misery casts spells.\nstruct SE_FlashScreen : public ScreenEffect\n{\n\tvoid Start();\n\tvoid Draw();\n\t\n\tint flashes_left;\n\tbool flashstate;\n};\n\n\n// Starflash is a full-screen white explosion in the shape of a '+',\n// used when some bosses are defeated.\nstruct SE_Starflash : public ScreenEffect\n{\n\tvoid Start(int x, int y);\n\tvoid Draw();\n\t\n\tint centerx, centery;\n\tint size, speed;\n};\n\n\n// Fade is the fade-in/out used on every stage transistion/TRA.\nstruct SE_Fade : public ScreenEffect\n{\n\tSE_Fade();\n\t\n\tvoid Start(int fadedir, int dir, int spr=SPR_FADE_DIAMOND);\n\tvoid Draw(void);\n\tvoid set_full(int dir);\n\tint getstate(void);\n\n\tstruct\n\t{\n\t\tint fadedir;\n\t\tint sweepdir;\n\t\tint curframe;\n\t\tint sprite;\n\t} fade;\n};\n\n#define FADE_IN\t\t\t0\n#define FADE_OUT\t\t1\n\n// these directions correspond to the FAI/FAO parameters.\n#define FADE_LEFT\t\t0\n#define FADE_UP\t\t\t1\n#define FADE_RIGHT\t\t2\n#define FADE_DOWN\t\t3\n#define FADE_CENTER\t\t4\n\n#define FS_NO_FADE\t\t0\t\t// no fade is active\n#define FS_FADING\t\t1\t\t// currently fading in or out\n#define FS_FADED_OUT\t2\t\t// completely faded out\n\n\nnamespace ScreenEffects\n{\n\tvoid Draw(void);\n\tvoid Stop();\n};\n\n\nextern SE_FlashScreen flashscreen;\nextern SE_Starflash starflash;\nextern SE_Fade fade;\n\n#endif\n\n"
  },
  {
    "path": "settings.cpp",
    "content": "\n#include <SDL.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdint.h>\n#include <string.h>\n#include \"settings.h\"\n#include \"replay.h\"\n#include \"settings.fdh\"\n#include \"nx.h\"\n\nconst char *setfilename = \"settings.dat\";\nconst uint16_t SETTINGS_VERSION = 0x1602;\t\t// serves as both a version and magic\n\nSettings normal_settings;\nSettings replay_settings;\nSettings *settings = &normal_settings;\n\n\nbool settings_load(Settings *setfile)\n{\n\tif (!setfile) setfile = &normal_settings;\n\t\n\tif (tryload(settings))\n\t{\n\t\tstat(\"No saved settings; using defaults.\");\n\t\t\n\t\tmemset(setfile, 0, sizeof(Settings));\n#if defined (_480X272) || defined (_320X240)\n        setfile->resolution = 0;\t\t// 640x480 Windowed, should be safe value\n#else\n        setfile->resolution = 2;\n#endif\n\t\tsetfile->last_save_slot = 0;\n\t\tsetfile->multisave = true;\n\t\t\n\t\tsetfile->enable_debug_keys = false;\n\t\tsetfile->sound_enabled = true;\n        setfile->music_enabled = 1;\t// both Boss and Regular music\n\t\t\n\t\tsetfile->instant_quit = false;\n\t\tsetfile->emulate_bugs = false;\n\t\tsetfile->no_quake_in_hell = false;\n\t\tsetfile->inhibit_fullscreen = false;\n#ifndef __HAIKU__\n\t\tsetfile->files_extracted = false;\n#else\n\t\tsetfile->files_extracted = true;\n#endif\n\t\t\n\t\t// I found that 8bpp->32bpp blits are actually noticably faster\n\t\t// than 32bpp->32bpp blits on several systems I tested. Not sure why\n\t\t// but calling SDL_DisplayFormat seems to actually be slowing things\n\t\t// down. This goes against established wisdom so if you want it back on,\n\t\t// run \"displayformat 1\" in the console and restart.\n\t\tsetfile->displayformat = false;\n\t\t\n\t\treturn 1;\n\t}\n\telse\n\t{\n\t\t#ifdef __SDLSHIM__\n\t\t\tstat(\"settings_load(): Hey FIXME!!!\");\n\t\t\tsettings->show_fps = true;\n\t\t#else\n\t\t\tinput_set_mappings(settings->input_mappings);\n\t\t#endif\n\t}\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nstatic bool tryload(Settings *setfile)\n{\nFILE *fp;\n\n\tstat(\"Loading settings...\");\n\n#ifdef __HAIKU__\n\tchar path[PATH_MAX];\n\tchar *haikuPath = getHaikuSettingsPath();\n\tstrcpy(path, haikuPath);\n\tstrcat(path, setfilename);\n\tfree(haikuPath);\n\tfp = fileopen(path, \"rb\");\n#else\n\tfp = fileopen(setfilename, \"rb\");\n#endif\n\tif (!fp)\n\t{\n\t\tstat(\"Couldn't open file %s.\", setfilename);\n\t\treturn 1;\n\t}\n\t\n\tsetfile->version = 0;\n\tfread(setfile, sizeof(Settings), 1, fp);\n\tif (setfile->version != SETTINGS_VERSION)\n\t{\n\t\tstat(\"Wrong settings version %04x.\", setfile->version);\n\t\treturn 1;\n\t}\n\t\n\tfclose(fp);\n\treturn 0;\n}\n\n\nbool settings_save(Settings *setfile)\n{\nFILE *fp;\n\n\tif (!setfile)\n\t\tsetfile = &normal_settings;\n\t\n\tstat(\"Writing settings...\");\n#ifdef __HAIKU__\n\tchar path[PATH_MAX];\n\tchar *haikuPath = getHaikuSettingsPath();\n\tstrcpy(path, haikuPath);\n\tstrcat(path, setfilename);\n\tfree(haikuPath);\n\tfp = fileopen(path, \"wb\");\n#else\n\tfp = fileopen(setfilename, \"wb\");\n#endif\n\tif (!fp)\n\t{\n\t\tstat(\"Couldn't open file %s.\", setfilename);\n\t\treturn 1;\n\t}\n\t\n\tfor(int i=0;i<INPUT_COUNT;i++)\n\t\tsetfile->input_mappings[i] = input_get_mapping(i);\n\t\n\tsetfile->version = SETTINGS_VERSION;\n\tfwrite(setfile, sizeof(Settings), 1, fp);\n\t\n\tfclose(fp);\n\treturn 0;\n}\n\n\n\n\n"
  },
  {
    "path": "settings.fdh",
    "content": "//hash:db8bcb16\n//automatically generated by Makegen\n\n/* located in settings.cpp */\n\n//-------------------[referenced from settings.cpp]------------------//\nbool settings_load(Settings *setfile);\nstatic bool tryload(Settings *setfile);\nbool settings_save(Settings *setfile);\n\n\n/* located in platform.cpp */\n\n//-------------------[referenced from settings.cpp]------------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in input.cpp */\n\n//-------------------[referenced from settings.cpp]------------------//\nvoid input_set_mappings(int *array);\nint input_get_mapping(int keyindex);\n\n\n/* located in common/stat.cpp */\n\n//-------------------[referenced from settings.cpp]------------------//\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "settings.h",
    "content": "\n#ifndef _SETTINGS_H\n#define _SETTINGS_H\n\n#include \"input.h\"\n\nstruct Settings\n{\n\tuint16_t version;\n\tint resolution;\n\tint last_save_slot;\n\tbool multisave;\n\tbool files_extracted;\n\tbool show_fps;\n\tbool displayformat;\n\t\n\tbool enable_debug_keys;\n\tbool sound_enabled;\n\tint music_enabled;\n\t\n\tbool instant_quit;\n\tbool emulate_bugs;\n\tbool no_quake_in_hell;\n\tbool inhibit_fullscreen;\n\t\n\tbool skip_intro;\n\tint reserved[8];\n\t\n\tint input_mappings[INPUT_COUNT];\n};\n\nbool settings_load(Settings *settings=NULL);\nbool settings_save(Settings *settings=NULL);\n\nextern Settings *settings;\nextern Settings normal_settings;\nextern Settings replay_settings;\n\n\n#endif\n"
  },
  {
    "path": "siflib/sectSprites.cpp",
    "content": "\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"../common/DBuffer.h\"\n#include \"../common/bufio.h\"\n\n#include \"sectSprites.h\"\n#include \"sectSprites.fdh\"\n\n\nint SIFSpritesSect::GetSpriteCount(const uint8_t *data, int datalen)\n{\n\tconst uint8_t *data_end = data + (datalen - 1);\n\treturn read_U16(&data, data_end);\n}\n\n\nbool SIFSpritesSect::Decode(const uint8_t *data, int datalen, \\\n\t\t\t\t\t\t  SIFSprite *sprites, int *nsprites_out, int maxsprites)\n{\nconst uint8_t *data_end = data + (datalen - 1);\nint i, f, nsprites;\n\t\n\tnsprites = read_U16(&data, data_end);\n\tif (nsprites_out) *nsprites_out = nsprites;\n\t\n\tif (nsprites >= maxsprites)\n\t{\n\t\tstaterr(\"SIFSpritesSect::Decode: too many sprites in file (nsprites=%d, maxsprites=%d)\", nsprites, maxsprites);\n\t\treturn 1;\n\t}\n\t\n\tstat(\"SIFSpritesSect: loading %d sprites\", nsprites);\n\tfor(i=0;i<nsprites;i++)\n\t{\n\t\tif (data > data_end)\n\t\t{\n\t\t\tstaterr(\"SIFSpritesSect::Decode: section corrupt: overran end of data\");\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t// read sprite-level fields\n\t\tsprites[i].w = read_U8(&data, data_end);\n\t\tsprites[i].h = read_U8(&data, data_end);\n\t\tsprites[i].spritesheet = read_U8(&data, data_end);\n\t\t\n\t\tsprites[i].nframes = read_U8(&data, data_end);\n\t\tsprites[i].ndirs = read_U8(&data, data_end);\n\t\t\n\t\tif (sprites[i].ndirs > SIF_MAX_DIRS)\n\t\t{\n\t\t\tstaterr(\"SIFSpritesSect::Decode: SIF_MAX_DIRS exceeded on sprite %d (ndirs=%d)\", i, sprites[i].ndirs);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tLoadRect(&sprites[i].bbox, &data, data_end);\n\t\tLoadRect(&sprites[i].solidbox, &data, data_end);\n\t\t\n\t\tLoadPoint(&sprites[i].spawn_point, &data, data_end);\n\t\t\n\t\tLoadPointList(&sprites[i].block_l, &data, data_end);\n\t\tLoadPointList(&sprites[i].block_r, &data, data_end);\n\t\tLoadPointList(&sprites[i].block_u, &data, data_end);\n\t\tLoadPointList(&sprites[i].block_d, &data, data_end);\n\t\t\n\t\t// malloc enough space to hold the specified number\n\t\t// of apple fritters, i mean, frames.\n\t\tsprites[i].frame = (SIFFrame *)malloc(sizeof(SIFFrame) * sprites[i].nframes);\n\t\t\n\t\t// then load all frames\n\t\tfor(f=0;f<sprites[i].nframes;f++)\n\t\t{\n\t\t\tif (LoadFrame(&sprites[i].frame[f], sprites[i].ndirs, &data, data_end))\n\t\t\t\treturn 1;\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n\nbool SIFSpritesSect::LoadFrame(SIFFrame *frame, int ndirs, \\\n\t\t\t\t\tconst uint8_t **data, const uint8_t *data_end)\n{\n\t// sets defaults for un-specified/default fields\n\tmemset(frame, 0, sizeof(SIFFrame));\n\t\n\tfor(int d=0;d<ndirs;d++)\n\t{\n\t\tSIFDir *dir = &frame->dir[d];\n\t\tLoadPoint(&dir->sheet_offset, data, data_end);\n\t\t\n\t\tint t;\n\t\tfor(;;)\n\t\t{\n\t\t\tt = read_U8(data, data_end);\n\t\t\tif (t == S_DIR_END) break;\n\t\t\t\n\t\t\tswitch(t)\n\t\t\t{\n\t\t\t\tcase S_DIR_DRAW_POINT: LoadPoint(&dir->drawpoint, data, data_end); break;\n\t\t\t\tcase S_DIR_ACTION_POINT: LoadPoint(&dir->actionpoint, data, data_end); break;\n\t\t\t\tcase S_DIR_ACTION_POINT_2: LoadPoint(&dir->actionpoint2, data, data_end); break;\n\t\t\t\t\n\t\t\t\tcase S_DIR_PF_BBOX:\n\t\t\t\t\tLoadRect(&dir->pf_bbox, data, data_end);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tstat(\"SIFSpriteSect::LoadFrame: encountered unknown optional field type %d\", t);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SIFSpritesSect::LoadRect(SIFRect *rect, const uint8_t **data, const uint8_t *data_end)\n{\n\trect->x1 = (int16_t)read_U16(data, data_end);\n\trect->y1 = (int16_t)read_U16(data, data_end);\n\trect->x2 = (int16_t)read_U16(data, data_end);\n\trect->y2 = (int16_t)read_U16(data, data_end);\n}\n\nvoid SIFSpritesSect::LoadPoint(SIFPoint *pt, const uint8_t **data, const uint8_t *data_end)\n{\n\tpt->x = (int16_t)read_U16(data, data_end);\n\tpt->y = (int16_t)read_U16(data, data_end);\n}\n\nvoid SIFSpritesSect::LoadPointList(SIFPointList *lst, const uint8_t **data, const uint8_t *data_end)\n{\n\tlst->count = read_U8(data, data_end);\n\tif (lst->count > SIF_MAX_BLOCK_POINTS)\n\t{\n\t\tstaterr(\"SIFSpritesSect::LoadPointList: too many block points (%d, max=%d)\", lst->count, SIF_MAX_BLOCK_POINTS);\n\t\treturn;\n\t}\n\t\n\tfor(int i=0;i<lst->count;i++)\n\t{\n\t\tlst->point[i].x = (int16_t)read_U16(data, data_end);\n\t\tlst->point[i].y = (int16_t)read_U16(data, data_end);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nuint8_t *SIFSpritesSect::Encode(SIFSprite *sprites, int nsprites, int *datalen_out)\n{\nDBuffer buf;\nint i, f;\n\n\tbuf.Append16(nsprites);\n\t\n\tfor(i=0;i<nsprites;i++)\n\t{\n\t\tbuf.Append8(sprites[i].w);\n\t\tbuf.Append8(sprites[i].h);\n\t\tbuf.Append8(sprites[i].spritesheet);\n\t\t\n\t\tbuf.Append8(sprites[i].nframes);\n\t\tbuf.Append8(sprites[i].ndirs);\n\t\t\n\t\tSaveRect(&sprites[i].bbox, &buf);\n\t\tSaveRect(&sprites[i].solidbox, &buf);\n\t\t\n\t\tSavePoint(&sprites[i].spawn_point, &buf);\n\t\t\n\t\tSavePointList(&sprites[i].block_l, &buf);\n\t\tSavePointList(&sprites[i].block_r, &buf);\n\t\tSavePointList(&sprites[i].block_u, &buf);\n\t\tSavePointList(&sprites[i].block_d, &buf);\n\t\t\n\t\tfor(f=0;f<sprites[i].nframes;f++)\n\t\t{\n\t\t\tSaveFrame(&sprites[i].frame[f], sprites[i].ndirs, &buf);\n\t\t}\n\t}\n\t\n\tif (datalen_out) *datalen_out = buf.Length();\n\treturn buf.TakeData();\n}\n\n\nvoid SIFSpritesSect::SaveFrame(SIFFrame *frame, int ndirs, DBuffer *out)\n{\n\tfor(int d=0;d<ndirs;d++)\n\t{\n\t\tSIFDir *dir = &frame->dir[d];\n\t\t\n\t\tSavePoint(&dir->sheet_offset, out);\n\t\tSaveOptionalPoint(S_DIR_DRAW_POINT, &dir->drawpoint, out);\n\t\tSaveOptionalPoint(S_DIR_ACTION_POINT, &dir->actionpoint, out);\n\t\tSaveOptionalPoint(S_DIR_ACTION_POINT_2, &dir->actionpoint2, out);\n\t\tSaveOptionalRect(S_DIR_PF_BBOX, &dir->pf_bbox, out);\n\t\t\n\t\tout->Append8(S_DIR_END);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SIFSpritesSect::SaveRect(SIFRect *rect, DBuffer *out)\n{\n\tout->Append16((uint16_t)rect->x1);\n\tout->Append16((uint16_t)rect->y1);\n\tout->Append16((uint16_t)rect->x2);\n\tout->Append16((uint16_t)rect->y2);\n}\n\nvoid SIFSpritesSect::SavePoint(SIFPoint *pt, DBuffer *out)\n{\n\tout->Append16((uint16_t)pt->x);\n\tout->Append16((uint16_t)pt->y);\n}\n\nvoid SIFSpritesSect::SavePointList(SIFPointList *lst, DBuffer *out)\n{\n\tout->Append8(lst->count);\n\tfor(int i=0;i<lst->count;i++)\n\t{\n\t\tout->Append16((uint16_t)lst->point[i].x);\n\t\tout->Append16((uint16_t)lst->point[i].y);\n\t}\n}\n\nvoid SIFSpritesSect::SaveOptionalPoint(int type, SIFPoint *pt, DBuffer *out)\n{\n\tif (!pt->equ(0, 0))\n\t{\n\t\tout->Append8(type);\n\t\tSavePoint(pt, out);\n\t}\n}\n\nvoid SIFSpritesSect::SaveOptionalRect(int type, SIFRect *rect, DBuffer *out)\n{\n\tif (!rect->equ(0, 0, 0, 0))\n\t{\n\t\tout->Append8(type);\n\t\tSaveRect(rect, out);\n\t}\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "siflib/sectSprites.fdh",
    "content": "//hash:99f5c088\n//automatically generated by Makegen\n\n/* located in common/bufio.cpp */\n\n//--------------[referenced from siflib/sectSprites.cpp]-------------//\nuint16_t read_U16(const uint8_t **data, const uint8_t *data_end);\nuint8_t read_U8(const uint8_t **data, const uint8_t *data_end);\n\n\n/* located in common/stat.cpp */\n\n//--------------[referenced from siflib/sectSprites.cpp]-------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "siflib/sectSprites.h",
    "content": "\n#ifndef _SECT_SPRITES_H\n#define _SECT_SPRITES_H\n\n// this decodes and encodes the main sprites[] array of SIFSprite structures.\n\nclass DBuffer;\n#include \"sif.h\"\n\n\nclass SIFSpritesSect\n{\npublic:\n\t// get how many sprites are in the file. You can call this first if you need\n\t// to know how big to make the array.\n\tstatic int GetSpriteCount(const uint8_t *data, int datalen);\n\t\n\t// decode from a SIF_SECTION_SPRITES and use the resultant data to fill in\n\t// an array of SIFSprite structures pointed to by sprites.\n\tstatic bool Decode(const uint8_t *data, int datalen, \\\n\t\t\t\t\tSIFSprite *sprites, int *nsprites_out, int maxsprites);\n\t\n\t// read sprites out of the given array of SIFSprite structures and generate\n\t// a SIF_SECTION_SPRITES record.\n\tstatic uint8_t *Encode(SIFSprite *sprites, int nsprites, int *datalen_out);\n\t\n\t\nprivate:\n\tstatic void LoadRect(SIFRect *rect, const uint8_t **data, const uint8_t *data_end);\n\tstatic void LoadPoint(SIFPoint *pt, const uint8_t **data, const uint8_t *data_end);\n\tstatic void LoadPointList(SIFPointList *lst, const uint8_t **data, const uint8_t *data_end);\n\tstatic bool LoadFrame(SIFFrame *frame, int ndirs, const uint8_t **data, const uint8_t *data_end);\n\t\n\tstatic void SaveRect(SIFRect *rect, DBuffer *out);\n\tstatic void SavePoint(SIFPoint *pt, DBuffer *out);\n\tstatic void SavePointList(SIFPointList *lst, DBuffer *out);\n\tstatic void SaveOptionalPoint(int type, SIFPoint *pt, DBuffer *out);\n\tstatic void SaveOptionalRect(int type, SIFRect *rect, DBuffer *out);\n\tstatic void SaveFrame(SIFFrame *frame, int ndirs, DBuffer *out);\n\t\n};\n\n\n// field types within SIFDir which are optional\nenum\n{\n\tS_DIR_END,\t\t\t\t\t\t\t// ends section list\n\t\n\tS_DIR_DRAW_POINT,\t\t\t\t\t// default is [0,0]\n\tS_DIR_ACTION_POINT,\t\t\t\t\t// default is [0,0]\n\tS_DIR_ACTION_POINT_2,\t\t\t\t// default is [0,0]\n\tS_DIR_PF_BBOX\t\t\t\t\t\t// default is no per-frame bbox, or rather [0,0]-[0,0]\n};\n\n#endif\n"
  },
  {
    "path": "siflib/sectStringArray.cpp",
    "content": "\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"../common/DBuffer.h\"\n#include \"../common/DString.h\"\n#include \"../common/bufio.h\"\n#include \"../common/StringList.h\"\n\n#include \"sectStringArray.h\"\n#include \"sectStringArray.fdh\"\n\n\n// decode the raw section data into the given StringList object\nbool SIFStringArraySect::Decode(const uint8_t *data, int datalen, StringList *out)\n{\nconst uint8_t *data_end = data + (datalen - 1);\nint i, nstrings;\n\n\tnstrings = read_U16(&data, data_end);\n\tfor(i=0;i<nstrings;i++)\n\t{\n\t\tif (data > data_end)\n\t\t{\n\t\t\tstaterr(\"SIFStringArraySect::Decode: section corrupt: overran end of data\");\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tDString string;\n\t\tReadPascalString(&data, data_end, &string);\n\t\t\n\t\tout->AddString(string.String());\n\t}\n\t\n\treturn 0;\n}\n\n\n\nuint8_t *SIFStringArraySect::Encode(StringList *strings, int *datalen_out)\n{\nDBuffer buf;\n\n\tif (strings->CountItems() > 65535)\n\t{\n\t\tstaterr(\"SIFStringArraySect::Encode: too many strings in list\");\n\t\treturn NULL;\n\t}\n\t\n\tbuf.Append16(strings->CountItems());\n\tfor(int i=0;;i++)\n\t{\n\t\tconst char *str = strings->StringAt(i);\n\t\tif (!str) break;\n\t\t\n\t\tWritePascalString(str, &buf);\n\t}\n\t\n\tif (datalen_out) *datalen_out = buf.Length();\n\treturn buf.TakeData();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SIFStringArraySect::ReadPascalString(const uint8_t **data, const uint8_t *data_end, DString *out)\n{\n\tint len = read_U8(data, data_end);\n\tif (len == 255) len = read_U16(data, data_end);\n\t\n\tout->Clear();\n\tfor(int i=0;i<len;i++)\n\t{\n\t\tout->AppendChar(read_U8(data, data_end));\n\t}\n}\n\nvoid SIFStringArraySect::WritePascalString(const char *str, DBuffer *out)\n{\n\tint len = strlen(str);\n\tif (len > 65535) len = 65535;\n\t\n\tif (len < 255)\n\t{\n\t\tout->Append8(len);\n\t}\n\telse\n\t{\n\t\tout->Append8(0xff);\n\t\tout->Append16(len);\n\t}\n\t\n\tfor(int j=0;j<len;j++)\n\t\tout->Append8(str[j]);\n}\n\n\n\n\n"
  },
  {
    "path": "siflib/sectStringArray.fdh",
    "content": "//hash:89fa228c\n//automatically generated by Makegen\n\n/* located in tsc.cpp */\n\n//------------[referenced from siflib/sectStringArray.cpp]-----------//\nvoid Clear();\n\n\n/* located in common/bufio.cpp */\n\n//------------[referenced from siflib/sectStringArray.cpp]-----------//\nuint16_t read_U16(const uint8_t **data, const uint8_t *data_end);\nuint8_t read_U8(const uint8_t **data, const uint8_t *data_end);\n\n\n/* located in common/stat.cpp */\n\n//------------[referenced from siflib/sectStringArray.cpp]-----------//\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "siflib/sectStringArray.h",
    "content": "\n#ifndef _SECT_STRINGARRAY_H\n#define _SECT_STRINGARRAY_H\n\nclass StringList;\nclass DString;\nclass DBuffer;\n\n// the SectStringArray handler decodes sif sections which consist of an array\n// of pascal strings. This includes SIF_SECTION_SHEETS and SIF_SECTION_DIRECTORY.\n\nclass SIFStringArraySect\n{\npublic:\n\tstatic bool Decode(const uint8_t *data, int datalen, StringList *out);\n\tstatic uint8_t *Encode(StringList *strings, int *datalen_out);\n\t\n\tstatic void ReadPascalString(const uint8_t **data, const uint8_t *data_end, DString *out);\n\tstatic void WritePascalString(const char *str, DBuffer *out);\n};\n\n\n#endif\n"
  },
  {
    "path": "siflib/sif.cpp",
    "content": "\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <stdint.h>\n\n#include \"sif.h\"\n#include \"sifloader.h\"\n#include \"sectSprites.h\"\n#include \"sectStringArray.h\"\n#include \"sif.fdh\"\n\n// safely make some vars sane while still staying POD\nvoid SIFSprite::Init()\n{\n\tframe = NULL;\n}\n\n// completely zero ALL vars\nvoid SIFSprite::Zero()\n{\n\tmemset(this, 0, sizeof(SIFSprite));\n}\n\nvoid SIFSprite::FreeData()\n{\n\tif (frame)\n\t{\n\t\tfree(frame);\n\t\tframe = NULL;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SIFSprite::CopyFrom(SIFSprite *other)\n{\n\t*this = *other;\n\t\n\t// whoops though, we can't share the frame pointer, so create a new copy of that\n\tint copy_size = (nframes * sizeof(SIFFrame));\n\t\n\tframe = (SIFFrame *)malloc(copy_size);\n\tmemcpy(frame, other->frame, copy_size);\n}\n\n\nSIFSprite *SIFSprite::Duplicate()\n{\n\tSIFSprite *spr = (SIFSprite *)malloc(sizeof(SIFSprite));\n\tspr->CopyFrom(this);\n\t\n\treturn spr;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SIFSprite::AddFrame(SIFFrame *newframe)\n{\n\tint frameno = nframes;\n\tSetNumFrames(nframes + 1);\n\tmemcpy(&frame[frameno], newframe, sizeof(SIFFrame));\n}\n\nvoid SIFSprite::InsertFrame(SIFFrame *newframe, int insertbefore)\n{\n\tif (insertbefore < 0) return;\n\tif (insertbefore >= nframes - 1)\n\t{\n\t\tAddFrame(newframe);\n\t\treturn;\n\t}\n\t\n\t// copy newframe now--if it's a pointer to one of our own frames, it might get\n\t// invalidated in a moment when SetNumFrames realloc's.\n\tSIFFrame insertframe = *newframe;\n\t\n\tSetNumFrames(nframes + 1);\n\t\n\tint copy_len = ((nframes - 1) - insertbefore) * sizeof(SIFFrame);\n\tmemmove(&frame[insertbefore+1], &frame[insertbefore], copy_len);\n\t\n\tframe[insertbefore] = insertframe;\n}\n\nvoid SIFSprite::DeleteFrame(int index)\n{\n\tif (index < 0 || index >= nframes)\n\t\treturn;\n\t\n\tif (index < (nframes - 1))\n\t{\n\t\tint copy_len = ((nframes - 1) - index) * sizeof(SIFFrame);\n\t\tmemmove(&frame[index], &frame[index+1], copy_len);\n\t}\n\t\n\tSetNumFrames(nframes - 1);\n}\n\nvoid SIFSprite::SetNumFrames(int newcount)\n{\n\tif (newcount == nframes) return;\n\t\n\tint required_size = (sizeof(SIFFrame) * newcount);\n\tif (frame) frame = (SIFFrame *)realloc(frame, required_size);\n\t\t  else frame = (SIFFrame *)malloc(required_size);\n\t\n\tif (newcount > nframes)\n\t{\n\t\tint blank_size = (newcount - nframes) * sizeof(SIFFrame);\n\t\tmemset(&frame[nframes], 0, blank_size);\n\t}\n\t\n\tnframes = newcount;\n\treturn;\n}\n\nSIFDir *SIFSprite::dir(int f, int d)\n{\n\tif (f < 0 || f >= nframes) return NULL;\n\tif (d < 0 || d >= ndirs) return NULL;\n\tif (frame == NULL) return NULL;\n\t\n\treturn &frame[f].dir[d];\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n\n\n\n"
  },
  {
    "path": "siflib/sif.fdh",
    "content": "//hash:00000000\n//automatically generated by Makegen\n"
  },
  {
    "path": "siflib/sif.h",
    "content": "\n#ifndef _SIF_H\n#define _SIF_H\n\n#include \"../common/misc.fdh\"\t// stprintf\n\n// a sprite has certain settings global to the whole sprite.\n// each sprite also contains a certain number of frames.\n// each frame contains one or more directions, for example for when that\n// frame is facing left or right, and sometimes up or down.\n// the number of directions is settable per-sprite, but each frame in\n// a given sprite always has the same number of directions.\n\n// this layout is somewhat wasteful of memory what with all static allocations and few pointers\n// or dynamically-sized substructures. the reason I did it this way is for speed; hoping the\n// tradeoff in memory will mean less indirections to access the sprite data, which is generally\n// read several times per frame per sprite.\n\n#define SIF_MAX_DIRS\t\t\t4\n#define SIF_MAX_BLOCK_POINTS\t4\n\nstruct SIFPoint\n{\n\tint16_t x, y;\n\t\n\tvoid set(int x, int y)\n\t{\n\t\tthis->x = x;\n\t\tthis->y = y;\n\t}\n\t\n\tvoid offset(int dx, int dy)\n\t{\n\t\tx += dx;\n\t\ty += dy;\n\t}\n\t\n\tbool equ(int x, int y)\n\t{\n\t\treturn (this->x == x && this->y == y);\n\t}\n\t\n\tconst char *ToString()\n\t{\n\t\treturn stprintf(\"[%d, %d]\", this->x, this->y);\n\t}\n\t\n\tbool operator== (const SIFPoint &other) const\n\t{\n\t\treturn (this->x == other.x && this->y == other.y);\n\t}\n\t\n\tbool operator!= (const SIFPoint &other) const\n\t{\n\t\treturn (this->x != other.x || this->y != other.y);\n\t}\n};\n\nstruct SIFRect\n{\n\tint16_t x1, y1, x2, y2;\n\t\n\tvoid set(int x1, int y1, int x2, int y2)\n\t{\n\t\tthis->x1 = x1;\n\t\tthis->y1 = y1;\n\t\tthis->x2 = x2;\n\t\tthis->y2 = y2;\n\t}\n\t\n\tvoid offset(int dx, int dy)\n\t{\n\t\tx1 += dx; y1 += dy;\n\t\tx2 += dx; y2 += dy;\n\t}\n\t\n\tbool equ(int x1, int y1, int x2, int y2)\n\t{\n\t\treturn (this->x1 == x1 && this->y1 == y1 && \\\n\t\t\t\tthis->x2 == x2 && this->y2 == y2);\n\t}\n\t\n\tconst char *ToString()\n\t{\n\t\treturn stprintf(\"[%d, %d] - [%d, %d]\", this->x1, this->y1, this->x2, this->y2);\n\t}\n\t\n\tbool operator== (const SIFRect &other) const\n\t{\n\t\treturn (x1 == other.x1 && y1 == other.y1 && \\\n\t\t\t\tx2 == other.x2 && y2 == other.y2);\n\t}\n\t\n\tbool operator!= (const SIFRect &other) const\n\t{\n\t\treturn (x1 != other.x1 || y1 != other.y1 || \\\n\t\t\t\tx2 != other.x2 || y2 != other.y2);\n\t}\n};\n\nstruct SIFPointList\n{\n\tSIFPoint point[SIF_MAX_BLOCK_POINTS];\n\tint count;\n\t\n\tSIFPoint& operator[] (const int nIndex)\n\t{\n\t\treturn point[nIndex];\n\t}\n\t\n\tbool operator== (const SIFPointList &other) const\n\t{\n\t\tif (other.count != count)\n\t\t\treturn false;\n\t\t\n\t\tfor(int i=0;i<count;i++)\n\t\t\tif (point[i] != other.point[i]) return false;\n\t\t\n\t\treturn true;\n\t}\n\t\n\tbool operator!= (const SIFPointList &other) const\n\t{\n\t\treturn !(*this == other);\n\t}\n\t\n\tvoid offset(int dx, int dy)\n\t{\n\t\tfor(int i=0;i<count;i++)\n\t\t{\n\t\t\tpoint[i].x += dx;\n\t\t\tpoint[i].y += dy;\n\t\t}\n\t}\n};\n\n\nstruct SIFDir\n{\n\t// the offset on the sprite sheet where this frame is located.\n\tSIFPoint sheet_offset;\n\t\n\t// when a sprite is drawn, it's sprite will be offset such that this pixel is\n\t// placed at the (x,y) coordinates that were given for the sprite to be drawn at.\n\t// i.e., it's a \"hot point\".\n\t// this also offsets the bounding boxes and blockl/r/u/d points but not the\n\t// action points or spawn point.\n\t// it is not super-well tested and isn't intended to be frequently used on objects which\n\t// interact with the world or are solid, etc. mostly it is for use with objects\n\t// such as the caret effects etc, so that their o->x & o->y can represent their center\n\t// point instead of their upper-left corner.\n\tSIFPoint drawpoint;\n\t\n\t//\ta pixel of \"noteworthiness\" on the sprite.\n\t//  * for Player: position he holds his gun at\n\t//  * for Guns: position to spawn the shots at\n\t//\t* for everything else: whatever they want it for\n\tSIFPoint actionpoint;\n\t\n\t// optional secondary action point\n\tSIFPoint actionpoint2;\n\t\n\t// optional additional/extra per-frame/dir bbox\n\t// (has no effect to engine, it's just metadata. but object AI can copy the\n\t//  per-frame bbox over the real bbox when changing the frame).\n\tSIFRect pf_bbox;\n};\n\nstruct SIFFrame\n{\n\tSIFDir dir[SIF_MAX_DIRS];\n};\n\n// a design goal here is that this structure MUST STAY POD so\n// no virtuals, constructors, classes for members or anything else\n// dodgy that might endanger that. we should able to zero out a SIFSprite\n// with memset and worry about nothing. yes it has a few member functions\n// but those are just a syntactical detail and should be harmless.\nstruct SIFSprite\n{\n\tvoid Init();\n\tvoid Zero();\n\tvoid FreeData();\n\t\n\tvoid AddFrame(SIFFrame *newframe);\n\tvoid InsertFrame(SIFFrame *newframe, int insertbefore);\n\tvoid DeleteFrame(int index);\n\tvoid SetNumFrames(int newcount);\n\tSIFDir *dir(int frame, int dir);\n\t\n\tvoid CopyFrom(SIFSprite *other);\n\tSIFSprite *Duplicate();\n\t\n\t// ---------------------------------------\n\t\n\tint w, h;\n\tuint8_t spritesheet;\t// # of spritesheet sprite is located on\n\t\n\tint nframes;\n\tint ndirs;\n\tSIFFrame *frame;\n\t\n\tSIFRect bbox;\t\t\t// bounding box for hit detection with other sprites\n\tSIFRect solidbox;\t\t// bounding box for solidity w/ other objects\n\tSIFRect slopebox;\t\t// bounding box for moving up and down slopes (generated at runtime)\n\t\n\t// when an object is spawned or changed from one type to another, this point is subtracted\n\t// from it's x,y coordinates, so that this point ends up being centered on the given x,y coords.\n\tSIFPoint spawn_point;\n\t\n\t// points to check for setting the corresponding block vars on the object\n\t// (which determine whether it's blocked on that side by a solid wall or object).\n\tSIFPointList block_l;\n\tSIFPointList block_r;\n\tSIFPointList block_u;\n\tSIFPointList block_d;\n};\n\n\n#endif\n"
  },
  {
    "path": "siflib/sifloader.cpp",
    "content": "\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"sifloader.h\"\n#include \"sifloader.fdh\"\n\n#define SIF_MAGICK\t'SIF2'\t\t// SIF magick and version denotation; first 4 bytes of file\n\nSIFLoader::SIFLoader()\n{\n\tfFP = NULL;\n}\n\nSIFLoader::~SIFLoader()\n{\n\tClearIndex();\n\tif (fFP) fclose(fFP);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid SIFLoader::ClearIndex()\n{\n\tfor(int i=0;;i++)\n\t{\n\t\tSIFIndexEntry *entry = (SIFIndexEntry *)fIndex.ItemAt(i);\n\t\tif (!entry) break;\n\t\t\n\t\tif (entry->data) free(entry->data);\n\t\tdelete entry;\n\t}\n\t\n\tfIndex.MakeEmpty();\n}\n\nvoid SIFLoader::CloseFile()\n{\n\tClearIndex();\n\t\n\tif (fFP)\n\t{\n\t\tfclose(fFP);\n\t\tfFP = NULL;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool SIFLoader::LoadHeader(const char *filename)\n{\nFILE *fp;\nuint32_t magick;\n\n\tClearIndex();\n\t\n\tif (fFP) fclose(fFP);\n\tfp = fFP = fileopen(filename, \"rb\");\n\t\n\tif (!fp)\n\t{\n\t\tstaterr(\"SIFLoader::LoadHeader: failed to open file '%s'\", filename);\n\t\treturn 1;\n\t}\n\t\n\tif ((magick = fgetl(fp)) != SIF_MAGICK)\n\t{\n\t\tstaterr(\"SIFLoader::LoadHeader: magick check failed--this isn't a SIF file or is wrong version?\");\n\t\tstaterr(\" (expected %08x, got %08x)\", SIF_MAGICK, magick);\n\t\treturn 1;\n\t}\n\t\n\tint nsections = fgetc(fp);\n\tstat(\"SIFLoader::LoadHeader: read index of %d sections\", nsections);\n\t\n\tfor(int i=0;i<nsections;i++)\n\t{\n\t\tSIFIndexEntry *entry = new SIFIndexEntry;\n\t\t\n\t\tentry->type = fgetc(fp);\t\t// section type\n\t\tentry->foffset = fgetl(fp);\t\t// absolute offset in file\n\t\tentry->length = fgetl(fp);\t\t// length of section data\n\t\tentry->data = NULL;\t\t\t\t// we won't load it until asked\n\t\t\n\t\tfIndex.AddItem(entry);\n\t\t//stat(\"  - Sect%02d @ %04x\", entry->type, entry->foffset);\n\t}\n\t\n\t// ..leave file handle open, its ok\n\treturn 0;\n}\n\n// load into memory and return a pointer to the section of type 'type',\n// or NULL if the file doesn't have a section of that type.\nuint8_t *SIFLoader::FindSection(int type, int *length_out)\n{\n\t// try and find the section in the index\n\tfor(int i=0;;i++)\n\t{\n\t\tSIFIndexEntry *entry = (SIFIndexEntry *)fIndex.ItemAt(i);\n\t\tif (!entry) break;\n\t\t\n\t\tif (entry->type == type)\n\t\t{\t// got it!\n\t\t\t\n\t\t\t// haven't loaded it yet? need to fetch it from file?\n\t\t\tif (!entry->data)\n\t\t\t{\n\t\t\t\tif (!fFP)\n\t\t\t\t{\n\t\t\t\t\tstaterr(\"SIFLoader::FindSection: entry found and need to load it, but file handle closed\");\n\t\t\t\t\tif (length_out) *length_out = 0;\n\t\t\t\t\treturn NULL;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstat(\"Loading SIF section %d from address %04x\", type, entry->foffset);\n\t\t\t\t\n\t\t\t\tentry->data = (uint8_t *)malloc(entry->length);\n\t\t\t\tfseek(fFP, entry->foffset, SEEK_SET);\n\t\t\t\tfread(entry->data, entry->length, 1, fFP);\n\t\t\t}\n\t\t\t\n\t\t\tif (length_out) *length_out = entry->length;\n\t\t\treturn entry->data;\n\t\t}\n\t}\n\t\n\tif (length_out) *length_out = 0;\n\treturn NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool SIFLoader::BeginSave()\n{\n\tfTotalDataAdded = 0;\n\tif (fFP) { fclose(fFP); fFP = NULL; }\n\tClearIndex();\n\treturn 0;\n}\n\nbool SIFLoader::AddSection(int type, uint8_t *data, int datalen)\n{\n\tSIFIndexEntry *entry = new SIFIndexEntry;\n\t\n\tentry->type = type;\n\tentry->foffset = fTotalDataAdded;\t\t// not including index tables or header, yet\n\tentry->length = datalen;\n\tentry->data = data;\n\t\n\tfTotalDataAdded += datalen;\n\tfIndex.AddItem(entry);\n\treturn 0;\n}\n\nbool SIFLoader::EndSave(const char *filename)\n{\nFILE *fp;\n\n\tfp = fileopen(filename, \"wb\");\n\tif (!fp)\n\t{\n\t\tstat(\"SIFLoader::EndSave: failed to open '%s' for writing\", filename);\n\t\treturn 1;\n\t}\n\t\n\t// write header-header\n\tfputl(SIF_MAGICK, fp);\n\tfputc(fIndex.CountItems(), fp);\n\t\n\t// compute fianl length of index table so we can write the correct foffsets\n\tint indexlen = 5 + (fIndex.CountItems() * 9);\n\t\n\t// write index table\n\tfor(int i=0;;i++)\n\t{\n\t\tSIFIndexEntry *entry = (SIFIndexEntry *)fIndex.ItemAt(i);\n\t\tif (!entry) break;\n\t\t\n\t\tfputc(entry->type, fp);\n\t\tfputl(entry->foffset + indexlen, fp);\n\t\tfputl(entry->length, fp);\n\t}\n\t\n\t// save actual section data\n\tfor(int i=0;;i++)\n\t{\n\t\tSIFIndexEntry *entry = (SIFIndexEntry *)fIndex.ItemAt(i);\n\t\tif (!entry) break;\n\t\t\n\t\tfwrite(entry->data, entry->length, 1, fp);\n\t}\n\t\n\tfclose(fp);\n\treturn 0;\n}\n\n"
  },
  {
    "path": "siflib/sifloader.fdh",
    "content": "//hash:fa413049\n//automatically generated by Makegen\n\n/* located in platform.cpp */\n\n//---------------[referenced from siflib/sifloader.cpp]--------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in common/stat.cpp */\n\n//---------------[referenced from siflib/sifloader.cpp]--------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//---------------[referenced from siflib/sifloader.cpp]--------------//\nuint32_t fgetl(FILE *fp);\nvoid fputl(uint32_t word, FILE *fp);\n\n"
  },
  {
    "path": "siflib/sifloader.h",
    "content": "\n#ifndef _SIFLOADER_H\n#define _SIFLOADER_H\n\n//#include \"sif2.h\"\n#include \"../common/BList.h\"\n#define SIF_MAX_GROUPS\t\t\t255\t\t// limitation of SECTION_GROUPS format\n\n/*\n\tthe .sif file format is designed to hold a number of different sprite-related data\n\tand to be extensible while still being able to read older versions of the files.\n\t\n\tthe .sif file is essentially a container format, with individual subclasses to decode\n\teach specific section type.\n\t\n\tsections can then contain additional subsections.\n\t\n\tthe main section, SIF_SECTION_SPRITES, is an array of sprites. For each sprite entry,\n\tdata typecodes denote a variable in the SIFSprite structure and it's value. Any values\n\tnot mentioned are set to default values when loaded. Values set to defaults are not saved.\n\n*/\n\nenum\n{\n\tSIF_SECTION_SESSION,\t\t\t\t// holds SIFEdit session info such as last sprite edited\n\tSIF_SECTION_SHEETS,\t\t\t\t\t// filenames of spritesheets used by sprites\n\tSIF_SECTION_SPRITES,\t\t\t\t// main sprite array\n\tSIF_SECTION_NAMES,\t\t\t\t\t// names of sprites in array, minus the SPR_... prefix\n\tSIF_SECTION_GROUPS,\t\t\t\t\t// names of SIFEdit directories for grouping sprites\n\tSIF_SECTION_COMMENTS,\t\t\t\t// SIFEdit comments about sprites\n\tSIF_SECTION_PATHS,\t\t\t\t\t// things like base directory of sheets, for SIFEdit\n\tSIF_SECTION_DIRNAMES,\t\t\t\t// names/order of the SIFDir directions\n\t\n\tSIF_SECTION_COUNT\n};\n\n\n// section entries in the header index table\nstruct SIFIndexEntry\n{\n\tuint8_t type;\t\t\t// section typecode (SIF_SECTION_...)\n\tuint32_t foffset;\t\t// offset within file\n\tuint32_t length;\t\t// length of section data\n\tuint8_t *data;\t\t\t// the actual data, if it has already been loaded, else NULL\n};\n\n\nclass SIFLoader\n{\npublic:\n\tSIFLoader();\n\t~SIFLoader();\n\t\n\t// open a file handle to the given .sif and load the header and\n\t// section index into memory.\n\tbool LoadHeader(const char *filename);\n\t\n\t// return a pointer to the section data of type 'type',\n\t// or NULL if the file doesn't have a section of that type.\n\tuint8_t *FindSection(int type, int *length_out);\n\n//\t---------------------------------------\n//\tSIF-saving functions. You shouldn't use the same object for saving\n//\tas currently has a file loaded, just construct a new one.\n//  But it is safe to save over the same file you are referencing data\n//  from using the \"Load\" object; because the changes are finalized to disk\n//  until you call EndSave().\n\n\t// allocate memory etc to save a new file from provided data.\n\tbool BeginSave();\n\t\n\t// add a section to the SIF of the given type, containing the given data.\n\tbool AddSection(int type, uint8_t *data, int datalen);\n\t\n\t// finalize the changes and write them to disk in the given file.\n\tbool EndSave(const char *filename);\n\t\n//\t---------------------------------------\n\n\t// free any temporary memory and close the file handle.\n\tvoid CloseFile();\n\t\n\t\nprivate:\n\tvoid ClearIndex();\n\t\n\tBList fIndex;\t\t\t// index table from header (list of SIFIndexEntry)\n\tFILE *fFP;\t\t\t\t// open file handle\n\t\n\tuint32_t fTotalDataAdded;\t// for saving\n};\n\n\n#endif\n\n"
  },
  {
    "path": "slope.cpp",
    "content": "\n#include \"nx.h\"\n#include \"slope.fdh\"\n\n//#define DEBUG_SLOPE\nstatic SlopeTable slopetable[SLOPE_LAST+1];\n\n// creates the slope tables\nbool initslopetable(void)\n{\nint x, y, ya, mx;\nint curtable, opposing_table;\nint inverttable, invertfliptable;\nint flipmx, flipy;\n\n\tstat(\"initslopetable: generating slopetables.\");\n\tmemset(slopetable, 0, sizeof(slopetable));\n\t\n\tya = TILE_H-1;\n\tfor(x=0;x<TILE_W*2;x++)\n\t{\n\t\tif (x < TILE_W)\n\t\t{\n\t\t\tmx = x;\n\t\t\tcurtable = SLOPE_FWD1;\n\t\t\topposing_table = SLOPE_BACK2;\n\t\t\tinverttable = SLOPE_CEIL_BACK1;\n\t\t\tinvertfliptable = SLOPE_CEIL_FWD2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmx = x - TILE_W;\n\t\t\tcurtable = SLOPE_FWD2;\n\t\t\topposing_table = SLOPE_BACK1;\n\t\t\tinverttable = SLOPE_CEIL_BACK2;\n\t\t\tinvertfliptable = SLOPE_CEIL_FWD1;\n\t\t}\n\t\t\n\t\tfor(y=ya;y<TILE_H;y++)\n\t\t{\n\t\t\tflipmx = TILE_W-1-mx;\n\t\t\tflipy = TILE_H-1-y;\n\t\t\t\n\t\t\tslopetable[curtable].table[mx][y] = 1;\n\t\t\tslopetable[opposing_table].table[flipmx][y] = 1;\n\t\t\tslopetable[inverttable].table[mx][flipy] = 1;\n\t\t\tslopetable[invertfliptable].table[flipmx][flipy] = 1;\n\t\t}\n\t\t\n\t\tif (x & 1) ya--;\n\t}\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// X and Y are non-CSFd pixel coordinates relative to the upper-left of the map.\n// if the given pixel is inside of a slope, returns the slope type 1-8. else, returns 0.\nuint8_t ReadSlopeTable(int x, int y)\n{\nint mx, my;\nint slopetype;\nuint8_t t;\n\n\t#ifdef DEBUG_SLOPE\n\t\tDrawSlopeTablesOnTiles();\n\t#endif\n\t\n\t// convert coordinates into a tile and check if the tile is a slope tile\n\tmx = (x / TILE_W);\n\tmy = (y / TILE_H);\n\t\n\tif (mx < 0 || my < 0 || mx >= map.xsize || my >= map.ysize)\n\t\treturn 0;\n\t\n\tt = map.tiles[mx][my];\n\t\n\tif (tileattr[t] & TA_SLOPE)\n\t{\n\t\tslopetype = (tilecode[t] & 0x07) + 1;\t// extract slope type from tile code\n\t\t\n\t\t// get offset from the tile\n\t\tx %= TILE_W; y %= TILE_H;\n\t\t\n\t\tif (slopetable[slopetype].table[x][y])\n\t\t\treturn slopetype;\n\t}\n\t\n\treturn 0;\n}\n\n// returns true if any of the points in the given point list\n// are on the solid portion of a slope tile.\nbool IsSlopeAtPointList(Object *o, SIFPointList *points)\n{\nint x, y, i;\n\n\tfor(i=0;i<points->count;i++)\n\t{\n\t\tx = (o->x >> CSF) + points->point[i].x;\n\t\ty = (o->y >> CSF) + points->point[i].y;\n\t\tif (ReadSlopeTable(x, y)) return 1;\n\t}\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// returns nonzero (the slope type) if the object is standing on a slope.\nint CheckStandOnSlope(Object *o)\n{\nint x, y, st;\n\n\ty = (o->y >> CSF) + sprites[o->sprite].slopebox.y2 + 1;\n\tx = (o->x >> CSF);\n\t\n\tif ((st = ReadSlopeTable(x + sprites[o->sprite].slopebox.x1, y))) return st;\n\tif ((st = ReadSlopeTable(x + sprites[o->sprite].slopebox.x2, y))) return st;\n\t\n\treturn 0;\n}\n\n// returns nonzero (the slope type) if the objects blocku should be set\n// because of a ceiling slope.\nint CheckBoppedHeadOnSlope(Object *o)\n{\nint x, y, st;\n\n\ty = (o->y >> CSF) + sprites[o->sprite].slopebox.y1 - 1;\n\tx = (o->x >> CSF);\n\t\n\t// without this, you get stuck in the save area below Gum Door in Grasstown\n\t//if (o == player) y += 4;\n\t\n\tif ((st = ReadSlopeTable(x + sprites[o->sprite].slopebox.x1, y))) return st;\n\tif ((st = ReadSlopeTable(x + sprites[o->sprite].slopebox.x2, y))) return st;\n\t\n\treturn 0;\n}\n\n\n// move an object laterally, and have it climb slopes as it approaches them.\n// We also have to move the object down as it goes down the slope.\n// Otherwise, it would \"skip\" down the slope ungracefully.\n// returns 1 if the object was blocked by a wall.\nbool movehandleslope(Object *o, int xinertia)\n{\nint xoff, opposing_x;\nint newx, newy, oldy;\nchar blocked_wall;\n\n\tif (!xinertia) return 0;\n\t\n\t// for objects which don't follow slope, just treat the slope as a blockl/r\n\tif (!(o->nxflags & NXFLAG_FOLLOW_SLOPE))\n\t{\n\t\tif (xinertia > 0)\n\t\t{\n\t\t\tif (o->blockr) return 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (o->blockl) return 1;\n\t\t}\n\t\t\n\t\to->x += xinertia;\n\t\treturn 0;\n\t}\n\t\n\tnewx = o->x;\n\tnewy = o->y;\n\t\n\t// determine which side of the bounding box to use based on which way\n\t// we're traveling\n\tif (xinertia > 0)\n\t{\t// moving right (right side of slopebox hits slopes first)\n\t\topposing_x = sprites[o->sprite].slopebox.x1;\n\t\txoff = sprites[o->sprite].slopebox.x2;\n\t}\n\telse\n\t{\t// move left (left side of slopebox hits slopes first)\n\t\topposing_x = sprites[o->sprite].slopebox.x2;\n\t\txoff = sprites[o->sprite].slopebox.x1;\n\t}\n\t\n\t// check the opposing side at y+1 to see if we were standing on a slope before the move.\n\tuint8_t old_floor_slope, old_ceil_slope;\n\told_floor_slope = ReadSlopeTable((newx>>CSF) + opposing_x, \\\n\t\t\t\t\t\t\t\t\t (newy>>CSF) + sprites[o->sprite].slopebox.y2 + 1);\n\t\n\told_ceil_slope = ReadSlopeTable((newx>>CSF) + opposing_x, \\\n\t\t\t\t\t\t\t\t\t(newy>>CSF) + sprites[o->sprite].slopebox.y1 - 1);\n\t\n\t// move the object\n\tnewx += xinertia;\n\t\n\t// check the opposing side again and if now we're not standing any more,\n\t// we moved down the slope, so add +1 to the object's Y coordinate.\n\tif (old_floor_slope && !ReadSlopeTable((newx>>CSF) + opposing_x, \\\n\t\t\t\t\t\t\t\t\t\t(newy>>CSF) + sprites[o->sprite].slopebox.y2 + 1))\n\t{\n\t\tbool walking_down = false;\n\t\t\n\t\t// only trigger if it's the correct slope type so that we would be walking down it if\n\t\t// we were going in the direction we're going. prevents being shoved down 1px when\n\t\t// exiting the top of a slope.\n\t\tif (xinertia < 0)\n\t\t{\n\t\t\tif (old_floor_slope == SLOPE_FWD1 || \\\n\t\t\t\told_floor_slope == SLOPE_FWD2)\n\t\t\t{\n\t\t\t\twalking_down = true;\n\t\t\t}\n\t\t}\n\t\telse if (xinertia > 0)\n\t\t{\n\t\t\tif (old_floor_slope == SLOPE_BACK1 || \\\n\t\t\t\told_floor_slope == SLOPE_BACK2)\n\t\t\t{\n\t\t\t\twalking_down = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (walking_down)\n\t\t{\n\t\t\tnewy += (1<<CSF);\n\t\t}\n\t}\n\t\n\t// the same for ceiling slopes\n\tif (old_ceil_slope && !ReadSlopeTable((newx>>CSF) + opposing_x, \\\n\t\t\t\t\t\t\t\t\t\t(newy>>CSF) + sprites[o->sprite].slopebox.y1 - 1))\n\t{\n\t\tbool moveme = false;\n\t\t\n\t\tif (xinertia < 0)\n\t\t{\n\t\t\tif (old_ceil_slope == SLOPE_CEIL_BACK1 || \\\n\t\t\t\told_ceil_slope == SLOPE_CEIL_BACK2)\n\t\t\t{\n\t\t\t\tmoveme = true;\n\t\t\t}\n\t\t}\n\t\telse if (xinertia > 0)\n\t\t{\n\t\t\tif (old_ceil_slope == SLOPE_CEIL_FWD1 || \\\n\t\t\t\told_ceil_slope == SLOPE_CEIL_FWD2)\n\t\t\t{\n\t\t\t\tmoveme = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (moveme)\n\t\t{\t// moving down (actually up) the \"descending\" (closer to real ceil) portion\n\t\t\t// of a ceiling slope tile. Reverse of floor slope thingy above.\n\t\t\tnewy -= (1<<CSF);\n\t\t}\n\t}\n\t\n\t// check the coordinate and see if it's inside a slope tile.\n\t// if so, move the object up 1 Y pixel.\n\tuint8_t moved_into_ceil_slope = ReadSlopeTable((newx>>CSF) + xoff, \\\n\t\t\t\t\t\t\t\t\t(newy>>CSF) + sprites[o->sprite].slopebox.y1);\n\tif (moved_into_ceil_slope)\n\t{\n\t\tnewy += (1<<CSF);\n\t}\n\t\n\tuint8_t moved_into_floor_slope = ReadSlopeTable((newx>>CSF) + xoff, \\\n\t\t\t\t\t\t\t\t\t(newy>>CSF) + sprites[o->sprite].slopebox.y2);\n\tif (moved_into_floor_slope)\n\t{\n\t\tnewy -= (1<<CSF);\n\t}\n\t\n\t// can't move if blocked by a wall. but if we've moved up or down 1px, be sure and update\n\t// the blockr/l state before declaring we can't move--otherwise we can get stuck at the\n\t// top of a slope with the bottom blockr/l stuck at the top px of the adjacent solid tile.\n\toldy = o->y;\n\to->y = newy;\n\t\n\tif (xinertia > 0)\n\t{\n\t\tif (oldy != newy)\n\t\t\to->UpdateBlockStates(RIGHTMASK);\n\t\t\n\t\tblocked_wall = o->blockr;\n\t}\n\telse\n\t{\n\t\tif (oldy != newy)\n\t\t\to->UpdateBlockStates(LEFTMASK);\n\t\t\n\t\tblocked_wall = o->blockl;\n\t}\n\t\n\tif (blocked_wall)\n\t{\t// we can't actually move...so reset Y position\n\t\to->y = oldy;\n\t}\n\telse\n\t{\t// can move...complete the move by setting the X position too\n\t\to->x = newx;\n\t}\n\t\n\treturn blocked_wall;\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n#ifdef DEBUG_SLOPE\n// debug crap\n\nvoid DrawSlopeTablesOnTiles()\n{\n\tstatic int lastmap = -1;\n\t\n\tif (game.curmap != lastmap)\n\t{\n\t\tlastmap = game.curmap;\n\t\tfor(int i=0;i<256;i++)\n\t\t{\n\t\t\tif (tileattr[i] & TA_SLOPE)\n\t\t\t{\n\t\t\t\tDrawSlopeTableOnTile((tilecode[i]&7)+1, i);\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid DrawSlopeTableOnTile(int table, int tile)\n{\nSDL_Rect dstrect;\nint x, y;\nextern SDL_Surface *tileset;\n\n\tfor(y=0;y<TILE_H;y++)\n\t{\n\t\tfor(x=0;x<TILE_W;x++)\n\t\t{\n\t\t\tdstrect.x = (tile & 15) << 5;\n\t\t\tdstrect.y = (tile >> 4) << 5;\n\t\t\tdstrect.w = 2;\n\t\t\tdstrect.h = 2;\n\t\t\t\n\t\t\tdstrect.x += x*2;\n\t\t\tdstrect.y += y*2;\n\t\t\t\n\t\t\tif (slopetable[table].table[x][y])\n\t\t\t{\n\t\t\t\tif (table > 4)\t// floor slopes\n\t\t\t\t\tSDL_FillRect(tileset, &dstrect, SDL_MapRGB(tileset->format, 0, 255, 0));\n\t\t\t\telse\n\t\t\t\t\tSDL_FillRect(tileset, &dstrect, SDL_MapRGB(tileset->format, 255, 0, 0));\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid dumpslopetable(int t)\n{\nint x, y;\nchar buffer[80];\n\n\tstat(\"\\nDumping slope table %d:\", t);\n\tfor(y=0;y<TILE_H;y++)\n\t{\n\t\tfor(x=0;x<TILE_W;x++)\n\t\t{\n\t\t\tbuffer[x] = slopetable[t].table[x][y] + '0';\n\t\t}\n\t\tbuffer[x] = 0;\n\t\tstat(\"%s\", buffer);\n\t}\n}\n#endif\n"
  },
  {
    "path": "slope.fdh",
    "content": "//hash:e0b83590\n//automatically generated by Makegen\n\n/* located in slope.cpp */\n\n//---------------------[referenced from slope.cpp]-------------------//\nbool initslopetable(void);\nuint8_t ReadSlopeTable(int x, int y);\nbool IsSlopeAtPointList(Object *o, SIFPointList *points);\nint CheckStandOnSlope(Object *o);\nint CheckBoppedHeadOnSlope(Object *o);\nbool movehandleslope(Object *o, int xinertia);\nvoid DrawSlopeTablesOnTiles();\nvoid DrawSlopeTableOnTile(int table, int tile);\nvoid dumpslopetable(int t);\n\n\n/* located in common/stat.cpp */\n\n//---------------------[referenced from slope.cpp]-------------------//\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "slope.h",
    "content": "\n#ifndef _SLOPE_H\n#define _SLOPE_H\n\n// slope types\n#define SLOPE_CEIL_FWD1\t\t1\n#define SLOPE_CEIL_FWD2\t\t2\n#define SLOPE_CEIL_BACK1\t3\n#define SLOPE_CEIL_BACK2\t4\n\n#define SLOPE_BACK1\t\t\t5\n#define SLOPE_BACK2\t\t\t6\n#define SLOPE_FWD1\t\t\t7\n#define SLOPE_FWD2\t\t\t8\n\n#define SLOPE_LAST\t\t\t8\n\nstruct SlopeTable\n{\n\tuint8_t table[TILE_W][TILE_H];\n};\n\n#endif\n"
  },
  {
    "path": "sound/org.cpp",
    "content": "\n#include <SDL/SDL.h>\n\n#ifdef _SDL_MIXER\n#include <SDL/SDL_mixer.h>\n#endif\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <string.h>\n#include <math.h>\n\n#if defined(__MINGW32__) || defined(_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX) || defined(__GNUC_RH_RELEASE__)\n#define htole16(x) (x)\n#else\n#include <endian.h>\n#endif\n\n#include \"../common/basics.h\"\n#include \"org.h\"\n#include \"pxt.h\"\t\t\t// for loading drums\n#include \"sslib.h\"\t\t\t// SAMPLE_RATE\n#include \"org.fdh\"\n\n//#define QUIET\n#define DRUM_PXT\n\n#ifdef DRUM_PXT\n\t#define drumK\t\t22050\n#else\n\t#define drumK\t\t30050\n#endif\n\nstatic bool org_inited = false;\n\nstatic stNoteChannel note_channel[16];\n\nstatic stSong song;\n\nstatic int cache_ahead_time = 2000;\t\t// approximate number of ms to cache ahead (is rounded to a # of beats)\n\nstatic int buffer_beats;\t\t\t\t// # of beats to cache ahead in each buffer\nstatic int buffer_samples;\t\t\t\t// how many samples are in each outbuffer\nstatic int outbuffer_size_bytes;\t\t// length of each outbuffer, and of final_buffer, in bytes\n\nstatic struct\n{\n\tsigned short *samples;\t\t// pointer to the raw PCM sound data\n\tint firstbeat;\t\t\t\t// beat # of the first beat contained in this chunk\n} final_buffer[2];\n\nstatic uint8_t current_buffer;\nstatic bool buffers_full;\n\nstatic int OrgVolume;\n\nstatic struct\n{\n\tsigned short samples[256];\n} wavetable[100];\n\n#ifdef DRUM_PXT\n\t// sound effect numbers which correspond to the drums\n\tstatic const unsigned char drum_pxt[] =\n\t{\n\t\t0x96, 0, 0x97, 0, 0x9a, 0x98,\n\t\t0x99, 0, 0x9b, 0, 0, 0\n\t};\n#else\n\t// names of the WAV files to load for each drum slot\n\tstatic const char *drum_names[] =\n\t{\n\t\t\"Bass01\", \"Bass02\", \"Snare01\", \"Snare02\", \"Tom01\", \"HiClose\",\n\t\t\"HiOpen\", \"Crash\", \"Per01\", \"Per02\", \"Bass03\", \"Tom02\"\n\t};\n#endif\n\nstatic struct\n{\n\tsigned short *samples;\n\tint nsamples;\n} drumtable[NUM_DRUMS];\n\nstatic int pitch[NUM_NOTES];\n\n\nstatic void init_pitch(void)\n{\n\tstat(\"Calculating pitch scale...\");\n\t\n\tfor(int i=0;i<NUM_NOTES;i++)\n\t{\n\t\tpitch[i] = (int)(441.0*(pow(2.0,((i-19.0)/12.0))));\n\t}\n}\n\n\n// given an instrument pitch and a note, returns the sampling rate that the\n// wavetable sample should be played at in order to seem as if it is a recording of that note.\nstatic double GetNoteSampleRate(int note, int instrument_pitch)\n{\n\treturn ((instrument_pitch - 1000.0)/100.0 + pitch[note])*44100/1550;\n}\n\n// converts a time in milliseconds to that same time length in samples\nstatic int MSToSamples(int ms)\n{\n\treturn (int)(((double)SAMPLE_RATE / (double)1000) * (double)ms);\n}\n\n// converts a sample length to milliseconds\nstatic int SamplesToMS(int samples)\n{\n\treturn (int)(((double)samples * 1000) / SAMPLE_RATE);\n}\n\n\nstatic bool load_drumtable(const char *pxt_path)\t\t// pxt_path = the path where drum pxt files can be found\n{\nchar fname[80];\nint d;\nFILE *fp;\nstatic const char *drum_cache = \"drum.pcm\";\n#define DRUM_VERSION\t0x0001\nuint16_t version;\n\n\t#ifndef DRUM_PXT\n\t\tfor(d=0;d<NUM_DRUMS;d++)\n\t\t{\n\t\t\tsprintf(fname, \"./drums/%s.wav\", drum_names[d]);\n\t\t\tif (load_drum(fname, d)) return 1;\n\t\t}\n\t#else\n\t\t\n\t\t// try and load the drums from cache instead of synthing them\n\t\tfp = fileopen(drum_cache, \"rb\");\n\t\tif (fp)\n\t\t{\n\t\t\t// this also checks for correct endianness\n\t\t\tfread(&version, sizeof(version), 1, fp);\n\t\t\tif (version != DRUM_VERSION)\n\t\t\t{\n\t\t\t\tprintf(\"%s: version incorrect\\n\", drum_cache);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor(d=0;d<NUM_DRUMS;d++)\n\t\t\t\t{\n\t\t\t\t\tdrumtable[d].nsamples = fgetl(fp);\n\t\t\t\t\tdrumtable[d].samples = (signed short *)malloc(drumtable[d].nsamples * 2);\n\t\t\t\t\tfread(drumtable[d].samples, drumtable[d].nsamples*2, 1, fp);\n\t\t\t\t}\n\t\t\t\tfclose(fp);\n\t\t\t\tstat(\"-- Drums loaded from cache\");\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tstat(\"load_drumtable: cache gone; rebuilding drums...\");\n\t\t\n\t\tpxt_initsynth();\n\t\t\n\t\tfor(d=0;d<NUM_DRUMS;d++)\n\t\t{\n\t\t\tif (drum_pxt[d])\n\t\t\t{\n\t\t\t\tsprintf(fname, \"%sfx%02x.pxt\", pxt_path, drum_pxt[d]);\n\t\t\t\tif (load_drum_pxt(fname, d)) return 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// cache the drums for next time\n\t\tfp = fileopen(drum_cache, \"wb\");\n\t\tif (fp)\n\t\t{\n\t\t\tversion = DRUM_VERSION;\n\t\t\tfwrite(&version, sizeof(version), 1, fp);\n\t\t\tfor(d=0;d<NUM_DRUMS;d++)\n\t\t\t{\n\t\t\t\tfputl(drumtable[d].nsamples, fp);\n\t\t\t\tfwrite(drumtable[d].samples, drumtable[d].nsamples*2, 1, fp);\n\t\t\t}\n\t\t\tfclose(fp);\n\t\t}\n\t\t\n\t\tload_drumtable(pxt_path);\n\t#endif\n\t\n\t//for(d=0;d<256;d++) { lprintf(\"%d \", drumtable[0].samples[d]); if (d%32==0) lprintf(\"\\n\"); }\n\t//lprintf(\"\\n\");\n\t\n\treturn 0;\n}\n\n#ifndef DRUM_PXT\n\nstatic bool load_drum(char *fname, int d)\n{\nMix_Chunk *chunk;\nint i, read_pt;\nint left,right;\nsigned short *abuf;\n\n\t//stat(\"load_drum: loading %s into drum index %d\", fname, d);\n\tif (!(chunk = Mix_LoadWAV(fname)))\n\t{\n\t\tstaterr(\"Missing drum sample: '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\t//stat(\"chunk: %d bytes in chunk\", chunk->alen);\n\tdrumtable[d].nsamples = chunk->alen / 2 / 2;\t// 16-bit stereo sound\n\tdrumtable[d].samples = malloc(drumtable[d].nsamples * 2);\n\t\n\t#ifndef QUIET\n\t\tstat(\"drum0%X [%s]: %d samples\", d, fname, drumtable[d].nsamples);\n\t#endif\n\t\n\tread_pt = 0;\n\tabuf = (signed short *)chunk->abuf;\n\tfor(i=0;i<drumtable[d].nsamples;i++)\n\t{\n\t\tleft = abuf[read_pt++]; right = abuf[read_pt++];\n\t\t\n\t\tdrumtable[d].samples[i] = (left + right) / 2;\n\t\tdrumtable[d].samples[i] += drumtable[d].samples[i];\t\t// make drums louder--sounds better\n\t}\n\t\n\tMix_FreeChunk(chunk);\n\treturn 0;\n}\n\n#else\n\nstatic bool load_drum_pxt(char *fname, int d)\n{\nint i;\nsigned short sample;\nstPXSound snd;\n\n\tstat(\"load_drum: loading %s into drum index %d\", fname, d);\n\t\n\tif (pxt_load(fname, &snd)) return 1;\n\tpxt_Render(&snd);\n\t\n\tdrumtable[d].nsamples = snd.final_size;\n\tdrumtable[d].samples = (signed short *)malloc(snd.final_size * 2);\t\t// *2 - it is 16-bit\n\t\n\t#ifndef QUIET\n\t\tstat(\"drum0%X [%s]: %d samples\", d, fname, drumtable[d].nsamples);\n\t#endif\n\t\n\t// read data out of pxt's render result and put it into our drum sample table\n\tfor(i=0;i<drumtable[d].nsamples;i++)\n\t{\n\t\tsample = snd.final_buffer[i];\n\t\t//i'm upscaling the 8-bit value to 16-bit;\n\t\t//but this also sets volume of drums relative to music\n\t\tsample *= 200;\n\t\t\n\t\tdrumtable[d].samples[i] = sample;\n\t}\n\t\n\tFreePXTBuf(&snd);\n\treturn 0;\n}\n\n#endif\n\n\n\n\nstatic bool load_wavetable(const char *fname)\n{\nint wav, sampl;\nFILE *fp;\n#define BUF_SIZE\t\t(100 * 256)\nsigned char buffer[BUF_SIZE + 1];\nsigned char *ptr;\n\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstat(\"Unable to open wavetable.dat!!\");\n\t\treturn 1;\n\t}\n\t\n\tfread(buffer, BUF_SIZE, 1, fp);\n\tfclose(fp);\n\t\n\tptr = &buffer[0];\n\tfor(wav=0;wav<100;wav++)\n\t{\n\t\tfor(sampl=0;sampl<256;sampl++)\n\t\t{\n\t\t\t// 256 = (32768 / 128)-- convert to 16-bit\n\t\t\twavetable[wav].samples[sampl] = (signed short)((int)(*ptr++) << 8);\n\t\t}\n\t}\n\t\n\treturn 0;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nint org_init(const char *wavetable_fname, const char *drum_pxt_dir, int org_volume)\n{\nint i;\n\t\n\tSSReserveChannel(ORG_CHANNEL);\n\tOrgVolume = org_volume;\n\t\n\t// set all buffer pointers and things to NULL, so if something fails to load,\n\t// we won't crash on org_close.\n\tmemset(drumtable, 0, sizeof(drumtable));\n\tfor(i=0;i<16;i++) note_channel[i].outbuffer = NULL;\n\tfor(i=0;i<2;i++) final_buffer[i].samples = NULL;\n\t\n\tinit_pitch();\n\tif (load_wavetable(wavetable_fname)) return 1;\n\tif (load_drumtable(drum_pxt_dir)) return 1;\n\t\n\tsong.playing = false;\n\torg_inited = true;\n\treturn 0;\n}\n\n\nvoid org_close(void)\n{\nint d;\n\n\torg_stop();\n\tfree_buffers();\n\t\n\tfor(d=0;d<NUM_DRUMS;d++)\n\t\tif (drumtable[d].samples) free(drumtable[d].samples);\n}\n\n\nchar org_load(char *fname)\n{\nstatic const char *magic = \"Org-02\";\nchar buf[8];\nFILE *fp;\nint i, j;\n\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp) { visible_warning(\"org_load: no such file: '%s'\", fname); return 1; }\n\t\n\tfor(i=0;i<6;i++) { buf[i] = fgetc(fp); } buf[i] = 0;\n\tif (strcmp(buf, magic)) { visible_warning(\"org-load: not an org file (got '%s')\", buf); fclose(fp); return 1; }\n\tstat(\"%s: %s detected\", fname, magic);\n\t\n\tfseek(fp, 0x06, SEEK_SET);\n\t\n\tsong.ms_per_beat = fgeti(fp);\n\tsong.steps_per_bar = fgetc(fp);\n\tsong.beats_per_step = fgetc(fp);\n\tsong.loop_start = fgetl(fp);\n\tsong.loop_end = fgetl(fp);\n\t\n\t//song.ms_per_beat = 500;\n\t//song.loop_start = 64;\n\t\n\tif (song.loop_end < song.loop_start)\n\t{\n\t\tvisible_warning(\"org_load: loop end is before loop start\");\n\t\tfclose(fp);\n\t\treturn 1;\n\t}\n\t\n\t// compute how long the last beat of a note should be (it should not use up the whole beat)\n\tsong.ms_of_last_beat_of_note = song.ms_per_beat - (int)((double)song.ms_per_beat * 0.1);\n\t\n\t// not actually used in this module, but the larger program might want to know this\n\tsong.beats_per_bar = (song.beats_per_step * song.steps_per_bar);\n\t\n\t/*lprintf(\"tempo: %d ms/beat\\n\", song.ms_per_beat);\n\tlprintf(\"beats_per_step: %d\\n\", song.beats_per_step);\n\tlprintf(\"steps_per_bar: %d\\n\", song.steps_per_bar);\n\tlprintf(\"loop begins on beat %d\\n\", song.loop_start);\n\tlprintf(\"loop ends on beat %d\\n\", song.loop_end);*/\n\t\n\tfor(i=0;i<16;i++)\n\t{\n\t\tsong.instrument[i].pitch = fgeti(fp);\n\t\tsong.instrument[i].wave = fgetc(fp);\n\t\tsong.instrument[i].pi = fgetc(fp);\n\t\tsong.instrument[i].nnotes = fgeti(fp);\n\t\t\n\t\tif (song.instrument[i].nnotes >= MAX_SONG_LENGTH)\n\t\t{\n\t\t\tvisible_warning(\" * org_load: instrument %d has too many notes! (has %d, max %d)\", i, song.instrument[i].nnotes, MAX_SONG_LENGTH);\n\t\t\tfclose(fp);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t/*if (song.instrument[i].nnotes)\n\t\t{\n\t\t\tlprintf(\"Instrument %d: \", i);\n\t\t\tlprintf(\" Pitch: %d, \", song.instrument[i].pitch);\n\t\t\tlprintf(\" Wave: %d, \", song.instrument[i].wave);\n\t\t\tlprintf(\" Pi: %d, \", song.instrument[i].pi);\n\t\t\tlprintf(\" Nnotes: %d\\n\", song.instrument[i].nnotes);\n\t\t}*/\n\t\t\n\t\t// substitute unavailable drums\n\t\t// credits track for one, has Per02 set which CS didn't actually have, I don't think\n\t\tif (i >= 8)\n\t\t{\n\t\t\tswitch(song.instrument[i].wave)\n\t\t\t{\n\t\t\t\tcase 9: song.instrument[i].wave = 8; break;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfor(i=0;i<16;i++)\n\t{\n\t\tfor(j=0;j<song.instrument[i].nnotes;j++) song.instrument[i].note[j].beat = fgetl(fp);\n\t\tfor(j=0;j<song.instrument[i].nnotes;j++) song.instrument[i].note[j].note = fgetc(fp);\n\t\tfor(j=0;j<song.instrument[i].nnotes;j++) song.instrument[i].note[j].length = fgetc(fp);\n\t\tfor(j=0;j<song.instrument[i].nnotes;j++) song.instrument[i].note[j].volume = fgetc(fp);\n\t\tfor(j=0;j<song.instrument[i].nnotes;j++) song.instrument[i].note[j].panning = fgetc(fp);\n\t}\n\t\n\tfclose(fp);\n\treturn init_buffers();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\nstatic bool init_buffers(void)\n{\nint i;\n\n\t// free the old buffers, as we're probably going to change their size here in a sec\n\tfree_buffers();\n\t\n\t/* figure some stuff out real quick about buffer lengths --- */\n\t\n\t// convert the ms-per-beat stuff into samples\n\tsong.samples_per_beat = MSToSamples(song.ms_per_beat);\n\tsong.note_closing_samples = MSToSamples(song.ms_of_last_beat_of_note);\n\t// take the suggestion on cache ahead time (which is in ms) and figure out how many beats that is\n\tbuffer_beats = (cache_ahead_time / song.ms_per_beat) + 1;\n\tif (buffer_beats < 3) buffer_beats = 3;\n\t\n\t// now figure out how many samples that is.\n\tbuffer_samples = (buffer_beats * song.samples_per_beat);\n\t// now figure out how many bytes THAT is.\n\toutbuffer_size_bytes = buffer_samples * 2 * 2;\t\t// @ 16-bits, and stereo sound\n\t\n\t\n\t// initialize the per-channel output buffers\n\tfor(i=0;i<16;i++)\n\t{\n\t\tnote_channel[i].outbuffer = (signed short *)malloc(outbuffer_size_bytes);\n\t\tnote_channel[i].number = i;\n\t\t//memset(note_channel[i].outbuffer, 0, outbuffer_size_bytes);\n\t}\n\t\n\t// initialize the final (mixed) output buffers\n\tfor(i=0;i<2;i++)\n\t{\n\t\tfinal_buffer[i].samples = (signed short *)malloc(outbuffer_size_bytes);\n\t\t//memset(final_buffer[i].samples, 0, outbuffer_size_bytes);\n\t}\n\t\n\treturn 0;\n}\n\nstatic void free_buffers(void)\n{\nint i;\n\n\tfor(i=0;i<16;i++)\n\t\tif (note_channel[i].outbuffer) free(note_channel[i].outbuffer);\n\t\n\tfor(i=0;i<2;i++)\n\t\tif (final_buffer[i].samples) free(final_buffer[i].samples);\n}\n\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// start the currently-loaded track playing at beat startbeat.\nbool org_start(int startbeat)\n{\n\torg_stop();\t\t// stop any old music\n\t\n\t// set all the note-tracking stuff to starting values\n\tsong.beat = startbeat;\n\tsong.haslooped = false;\n\t\n\tfor(int i=0;i<16;i++)\n\t{\n\t\tsong.instrument[i].curnote = 0;\n\t\tnote_channel[i].volume = ORG_MAX_VOLUME;\n\t\tnote_channel[i].panning = ORG_PAN_CENTERED;\n\t\tnote_channel[i].length = 0;\n\t}\n\t\n\t// fill the first buffer and play it to jumpstart the playback cycle\n\t//lprintf(\" ** org_start: Jumpstarting buffer cycle\\n\");\n\t\n\tsong.playing = true;\n\tsong.fading = false;\n\t\n\tsong.volume = OrgVolume;\n\tSSSetVolume(ORG_CHANNEL, song.volume);\n\t\n\t// kickstart the first buffer\n\tcurrent_buffer = 0;\n\tgenerate_music();\n\tqueue_final_buffer();\n\tbuffers_full = 0;\t\t\t\t// tell org_run to generate the other buffer right away\n\t\n\treturn 0;\n}\n\n\n// pause/stop playback of the current song\nvoid org_stop(void)\n{\n\tif (song.playing)\n    {\n\n#ifdef _SDL_MIXER\n        Mix_HaltMusic();\n#endif\n\t\tsong.playing = false;\n\t\t// cancel whichever buffer is playing\n\t\tSSAbortChannel(ORG_CHANNEL);\n\t}\n}\n\nbool org_is_playing(void)\n{\n\treturn song.playing;\n}\n\nvoid org_set_playing(bool qPlay)\n{\n    song.playing = qPlay;\n}\n\n// resume a song paused with org_stop\n/*void org_resume(void)\n{\n\tif (!song.playing)\n\t{\n/*\t\tlprintf(\"restarting buffer %d\\n\", last_played_buffer);\n\t\t//StartOrgBuffer(last_played_buffer, &final_buffer[last_played_buffer].chunk);\n\t\tsong.playing = 1;\n\t\tsong.volume = ORG_VOLUME;*/\n/*\t}\n}*/\n\n\nvoid org_fade(void)\n{\n\tstat(\"org_fade\");\n#ifdef _SDL_MIXER\n    song.fading = false;\n#else\n\tsong.fading = true;\n#endif\n\tsong.last_fade_time = 0;\n}\n\nvoid org_set_volume(int newvolume)\n{\n\tif (newvolume != song.volume)\n\t{\n\t\tsong.volume = newvolume;\n\t\tSSSetVolume(ORG_CHANNEL, newvolume);\n\t}\n}\n\nstatic void runfade()\n{\n\tuint32_t curtime = SDL_GetTicks();\n\tif ((curtime - song.last_fade_time) >= 25)\n\t{\n\t\tint newvol = (song.volume - 1);\n\t\tif (newvol <= 0)\n\t\t{\n\t\t\tsong.fading = false;\n#ifndef _SDL_MIXER\n\t\t\torg_stop();\n#endif\n\t\t}\n\t\telse\n\t\t{\n\t\t\torg_set_volume(newvol);\n\t\t}\n\t\t\n\t\tsong.last_fade_time = curtime;\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// combines all of the individual channel output buffers into a single, final, buffer.\nstatic void mix_buffers(void)\n{\nint i, cursample, len;\nint mixed_sample;\nsigned short *final;\n\n//\tlprintf(\"mix_buffers: mixing channels into final_buffer[%d]\\n\", current_buffer);\n\t\n\t// go up to samples*2 because we're mixing the stereo audio output from calls to WAV_Synth\n\tlen = buffer_samples * 2;\n\tfinal = final_buffer[current_buffer].samples;\n\t\n\t//stat(\"mixing %d samples\", len);\n\tfor(cursample=0;cursample<len;cursample++)\n\t{\n\t\t// first mix instruments\n\t\tmixed_sample = note_channel[0].outbuffer[cursample];\n\t\tfor(i=1;i<16;i++) mixed_sample += note_channel[i].outbuffer[cursample];\n\t\t\n\t\tif (mixed_sample > 32767) mixed_sample = 32767;\n\t\telse if (mixed_sample < -32768) mixed_sample = -32768;\n\t\t\n\t\tfinal[cursample] = htole16(mixed_sample);\n\t}\n}\n\n// start whichever buffer is queued to play next, and flag the other one as needing\n// to be filled\nstatic void queue_final_buffer(void)\n{\n\tSSEnqueueChunk(ORG_CHANNEL, final_buffer[current_buffer].samples, buffer_samples,\n\t\t\t\t\t\tcurrent_buffer, OrgBufferFinished);\n\t\n\tcurrent_buffer ^= 1;\n}\n\n\n// callback from sslib when a buffer is finished playing.\nstatic void OrgBufferFinished(int channel, int buffer_no)\n{\n\tbuffers_full = false;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n\n// given a volume and a panning value, it returns three values\n// between 0 and 1.00 which are how much to scale:\n//\tthe whole sound (volume_ratio)\n//  just the left channel (volume_left_ratio)\n//  just the right channel (volume_right_ratio)\nstatic void ComputeVolumeRatios(int volume, int panning, double *volume_ratio, \\\n\t\t\t\t\t\t\t\tdouble *volume_left_ratio, double *volume_right_ratio)\n{\n\t*volume_ratio = ((double)volume / ORG_MAX_VOLUME);\n\t\n\t// get volume ratios for left and right channels (panning)\n\tif (panning < ORG_PAN_CENTERED)\n\t{\t// panning left (make right channel quieter)\n\t\t*volume_right_ratio = ((double)panning / ORG_PAN_CENTERED);\n\t\t*volume_left_ratio = 1.00f;\n\t}\n\telse if (panning > ORG_PAN_CENTERED)\n\t{\t// panning right (make left channel quieter)\n\t\t*volume_left_ratio = ((double)(ORG_PAN_FULL_RIGHT - panning) / ORG_PAN_CENTERED);\n\t\t*volume_right_ratio = 1.00f;\n\t}\n\telse\n\t{\t// perfectly centered (both channels get the full volume)\n\t\t*volume_left_ratio = 1.00f;\n\t\t*volume_right_ratio = 1.00f;\n\t}\n}\n\n\n// Interpolates a new sample from two samples which will be \"in-between\" the two samples.\n// if ratio is 0.00, it will return exactly sample1.\n// if ratio is 1.00, it will return exactly sample2.\n// and if ratio is something like 0.5, it will mix the samples together.\nstatic double Interpolate(int sample1, int sample2, double ratio)\n{\ndouble s1, s2;\n\ts1 = ((double)sample1 * (1.00f - ratio));\n\ts2 = ((double)sample2 * ratio);\n\treturn (s1 + s2);\n}\n\n\n// ensures that there are exactly desired_samples contained in the output buffer of instrument m.\n// if there are fewer samples than desired, the gap is filled with silence.\n// if there are more, the extra audio is truncated.\nstatic void ForceSamplePos(int m, int desired_samples)\n{\n\tif (note_channel[m].samples_so_far != desired_samples)\n\t{\n\t\tif (desired_samples > note_channel[m].samples_so_far)\n\t\t{\n\t\t\tsilence_gen(&note_channel[m], (desired_samples - note_channel[m].samples_so_far));\n\t\t}\n\t\telse\n\t\t{\t// this should NEVER actually happen!!\n\t\t\tstat(\"ForceSamplePos: WARNING: !!! truncated channel %d from %d to %d samples !!!\", m, note_channel[m].samples_so_far, desired_samples);\n\t\t\tnote_channel[m].samples_so_far = desired_samples;\n\t\t\tnote_channel[m].outpos = desired_samples * 2;\n\t\t}\n\t}\n}\n\n\n// adds num_samples samples of silence to the output buffer of channel \"m\".\nstatic void silence_gen(stNoteChannel *chan, int num_samples)\n{\nint clear_bytes;\n\n\t//stat(\"silence_gen: making %d samples of silence\", num_samples);\n\t\n\tclear_bytes = (num_samples * 2 * 2);\t\t// clear twice as many shorts as = num_samples\n\tmemset(&chan->outbuffer[chan->outpos], 0, clear_bytes);\n\t\n\tchan->samples_so_far += num_samples;\n\tchan->outpos += (num_samples * 2);\n}\n\n// -------------------\n// note_open\n// -------------------\n// initializes the synthesis of a new note.\n// chan: the instrument channel the note will play on\n// wave: the instrument no to play the note with\n// pitch: the pitch variation of the instrument as set in the org\n// note: the note # we'll be playing\n// total_ms: the maximum length the note will play for (controls buffer allocation length)\nstatic void note_open(stNoteChannel *chan, int wave, int pitch, int note)\n{\ndouble new_sample_rate;\n#define\tsamplK\t \t 11025\t\t// constant is original sampling rate of the samples in the wavetable\n\n\t// compute how quickly, or slowly, to play back the wavetable sample\n\tnew_sample_rate = GetNoteSampleRate(note, pitch);\n\tchan->sample_inc = (new_sample_rate / (double)samplK);\n\t\n\tchan->wave = wave;\n\tchan->phaseacc = 0;\n\t\n\t//lprintf(\"note_open: new note opened for channel %08x at sample_inc %.2f, using wave %d\\n\", chan, chan->sample_inc, chan->wave);\n}\n\n// -------------------\n// note_gen\n// -------------------\n// Adds num_samples worth of audio data to the channel at the current frequency, volume,\n// panning, and pitch settings, and at the note & wave spec'd in note_open.\nstatic void note_gen(stNoteChannel *chan, int num_samples)\n{\nint i;\ndouble audioval;\ndouble master_volume_ratio, volume_left_ratio, volume_right_ratio;\nint wave;\nunsigned char pos1, pos2;\ndouble iratio;\n\n\twave = chan->wave;\n\t\n\t// compute volume ratios; unlike drums we have to do this every time\n\t// since they can change in the middle of the note.\n\tComputeVolumeRatios(chan->volume, chan->panning,\n\t\t\t\t&master_volume_ratio, &volume_left_ratio, &volume_right_ratio);\n\t\n\t//statbuild(\"Entering note_gen with phaseacc=%.2f and sample_inc=%.2f\", chan->phaseacc, chan->sample_inc);\n\t//statbuild(\", using buffer %08x\\n\", chan->outbuffer);\n\t\n\t//stat(\"note_gen(%d, %d)\", chan->number, num_samples);\n\t\n\t// generate however many output samples we were asked for\n\tfor(i=0;i<num_samples;i++)\n\t{\n\t\t// interpolate a sample that's at the fractional \"phaseacc\" sample position in the wavetable form\n\t\tpos1 = (int)chan->phaseacc;\n\t\tpos2 = pos1 + 1;\t\t// since pos1&2 are chars, this wraps at 255\n\t\tiratio = chan->phaseacc - (int)chan->phaseacc;\n\t\t\n\t\taudioval = Interpolate(wavetable[wave].samples[pos1], wavetable[wave].samples[pos2], iratio);\n\t\taudioval *= master_volume_ratio;\n\t\t\n\t\tchan->outbuffer[chan->outpos++] = (int)(audioval * volume_left_ratio);\n\t\tchan->outbuffer[chan->outpos++] = (int)(audioval * volume_right_ratio);\n\t\tchan->samples_so_far++;\n\t\t\n\t\tchan->phaseacc += chan->sample_inc;\n\t\tif ((int)chan->phaseacc >= 256) chan->phaseacc -= 256;\n\t}\n}\n\n\n// -------------------\n// note_close\n// -------------------\n// ends a note smoothly by ensuring that it's wave stops near the 0-crossing point.\n// this avoids a slight popping noise which can be caused by abruptly moving from\n// a high sample value to a close-to-zero sample value.\n// returns the # of extra samples generated.\nstatic int note_close(stNoteChannel *chan)\n{\n\tif (chan->outpos == 0)\n\t\treturn 0;\n\t\n\tint samples_made = 0;\n\twhile(chan->samples_so_far < buffer_samples)\t// avoid potential buffer overflow\n\t{\n\t\t// get the value of the last sample in the buffer and check\n\t\t// if it's close enough to silence yet. if not, let the note\n\t\t// run on a teeny bit longer than it's supposed to until it's wave\n\t\t// hits the zero-crossing point, to avoid a click.\n\t\tint last_sample = chan->outbuffer[chan->outpos - 1];\n\t\tif (abs(last_sample) < 1000) break;\n\t\t\n\t\tnote_gen(chan, 1);\n\t\tsamples_made++;\n\t}\n\t\n\treturn samples_made;\n}\n\n\n// set up to make a drum noise using drum \"wave\" at note \"note\" on channel \"m_channel\".\n// the total number of samples the drum will last is returned.\nstatic int drum_open(int m_channel, int wave, int note)\n{\nstNoteChannel *chan = &note_channel[m_channel];\ndouble new_sample_rate;\nint gen_samples;\n\n\t//lprintf(\"drum_hit: playing drum %d[%s] on channel %d, note %02x volume %d panning %d\\n\", wave, drum_names[wave], m_channel, note, chan->volume, chan->panning);\n\t\n\tnew_sample_rate = GetNoteSampleRate(note, song.instrument[m_channel].pitch);\n\tchan->sample_inc = (new_sample_rate / (double)drumK);\n\t\n\t// get the new number of samples for the sound\n\tgen_samples = (int)((double)drumtable[wave].nsamples / chan->sample_inc);\n\t\n\t// precompute volume and panning values since they're the same over the length of the drum\n\tComputeVolumeRatios(chan->volume, chan->panning, &chan->master_volume_ratio, &chan->volume_left_ratio, &chan->volume_right_ratio);\n\t\n\tchan->wave = wave;\n\tchan->phaseacc = 0;\n\treturn gen_samples;\n}\n\n\n// generates \"num_samples\" of a drum noise previously set up via drum_open into the output\n// buffer of the channel.\nstatic void drum_gen(int m_channel, int num_samples)\n{\nstNoteChannel *chan = &note_channel[m_channel];\ndouble volume_ratio, volume_left_ratio, volume_right_ratio;\nint wave;\nint pos1, pos2;\ndouble iratio;\ndouble audioval;\nint i;\n\n\tvolume_ratio = chan->master_volume_ratio;\n\tvolume_left_ratio = chan->volume_left_ratio;\n\tvolume_right_ratio = chan->volume_right_ratio;\n\twave = chan->wave;\n\t\n\t//stat(\"drum_gen(%d, %d)\", m_channel, num_samples);\n\t\n\t// generate the drum sound\n\tfor(i=0;i<num_samples;i++)\n\t{\n\t\tpos1 = (int)chan->phaseacc;\n\t\tpos2 = pos1 + 1;\n\t\tif (pos2 >= drumtable[wave].nsamples) pos2 = pos1;\n\t\t\n\t\tiratio = chan->phaseacc - (int)chan->phaseacc;\n\t\t\n\t\taudioval = Interpolate(drumtable[wave].samples[pos1], drumtable[wave].samples[pos2], iratio);\n\t\taudioval *= volume_ratio;\n\t\t\n\t\tchan->outbuffer[chan->outpos++] = (signed short)(audioval * volume_left_ratio);\n\t\tchan->outbuffer[chan->outpos++] = (signed short)(audioval * volume_right_ratio);\n\t\tchan->samples_so_far++;\n\t\t\n\t\tchan->phaseacc += chan->sample_inc;\n\t\tif ((int)chan->phaseacc > drumtable[wave].nsamples)\n\t\t{\n\t\t\tstaterr(\" **ERROR-phaseacc ran over end of drumsample %.2f %d\", chan->phaseacc, drumtable[wave].nsamples);\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n\nvoid org_run(void)\n{\n\tif (!song.playing)\n\t\treturn;\n\t\n\t// keep both buffers queued. if one of them isn't queued, then it's time to\n\t// generate more music for it and queue it back on.\n\tif (!buffers_full)\n\t{\n\t\tgenerate_music();\t\t\t\t// generate more music into current_buffer\n\t\t\n\t\tqueue_final_buffer();\t\t\t// enqueue current_buffer and switch buffers\n\t\tbuffers_full = true;\t\t\t// both buffers full again until OrgBufferFinished called\n\t}\n\t\n\tif (song.fading) runfade();\n}\n\n\n// generate a buffer's worth of music and place it in the current final buffer.\nstatic void generate_music(void)\n{\nint m;\nint beats_left;\nint out_position;\n\n\t//stat(\"generate_music: cb=%d buffer_beats=%d\", current_buffer, buffer_beats);\n\t\n\t// save beat # of the first beat in buffer for calculating current beat for TrackFuncs\n\tfinal_buffer[current_buffer].firstbeat = song.beat;\n\t\n\t// clear all the channel buffers\n\tfor(m=0;m<16;m++)\n\t{\n\t\tnote_channel[m].samples_so_far = 0;\n\t\tnote_channel[m].outpos = 0;\n\t}\n\t\n\t//stat(\"generate_music: generating %d beats of music\\n\", buffer_beats);\n\tbeats_left = buffer_beats;\n\tout_position = 0;\n\t\n\twhile(beats_left)\n\t{\n\t\tout_position += song.samples_per_beat;\n\t\t\n\t\t// for each channel...\n\t\tfor(m=0;m<16;m++)\n\t\t{\n\t\t\t// generate any music that's supposed to go into the current beat\n\t\t\tNextBeat(m);\n\t\t\t// ensure that exactly one beat of samples was added to the channel by inserting silence\n\t\t\t// if needed. sometimes NextBeat may not actually generate a full beats worth, for\n\t\t\t// example if there was no note playing on the track, of if it was the last beat of a note.\n\t\t\tForceSamplePos(m, out_position);\n\t\t}\n\t\t\n\t\tif (++song.beat >= song.loop_end)\n\t\t{\n\t\t\tsong.beat = song.loop_start;\n\t\t\tsong.haslooped = true;\n\t\t\t\n\t\t\tfor(m=0;m<16;m++)\n\t\t\t{\n\t\t\t\tsong.instrument[m].curnote = song.instrument[m].loop_note;\n\t\t\t\tnote_channel[m].length = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tbeats_left--;\n\t}\n\t\n\tmix_buffers();\n}\n\n\n// generate up to a 1 beat worth of music from channel \"m\" at the song.beat cursor point.\n// it may generate less.\nstatic void NextBeat(int m)\n{\nstNoteChannel *chan = &note_channel[m];\nstInstrument *track = &song.instrument[m];\n//int volume, panning;\nstNote *note;\nint len;\n\n\t// add notes as long as instrument has notes left to add\n\tif (track->curnote < track->nnotes)\n\t{\n\t\tfor(;;)\n\t\t{\n\t\t\t// when we hit the loop start point, record the note we were on for later\n\t\t\tif (song.beat == song.loop_start)\n\t\t\t{\n\t\t\t\ttrack->loop_note = track->curnote;\n\t\t\t}\n\t\t\t\n\t\t\t// get a pointer to the note at current position in the song\n\t\t\tnote = &track->note[track->curnote];\n\t\t\t\n\t\t\t// skip ahead if the song got ahead of us somehow\n\t\t\tif (song.beat > note->beat)\n\t\t\t{\n\t\t\t\tif (++track->curnote >= track->nnotes)\n\t\t\t\t\treturn;\n\t\t\t}\n\t\t\telse break;\n\t\t}\n\t\t\n\t\t// 1st- start notes as we arrive at their beat\n\t\tif (song.beat == note->beat)\n\t\t{\n\t\t\t//stat(\" Beat/Note: %d/%d   Chan: %d   Note: %d  length=%d vol=%d pan=%d wave=%d\", song.beat, curnote, m, note->note, note->length, note->volume, note->panning, song.instrument[m].wave);\n\t\t\t\n\t\t\tif (note->volume != 0xff) chan->volume = note->volume;\n\t\t\tif (note->panning != 0xff) chan->panning = note->panning;\n\t\t\t\n\t\t\tif (note->note != 0xff)\n\t\t\t{\n\t\t\t\tif (m < 8)\n\t\t\t\t{\n\t\t\t\t\tnote_open(chan, track->wave, track->pitch, note->note);\n\t\t\t\t\tchan->length = note->length;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t// on percussion tracks the length works differently---drum_open returns the\n\t\t\t\t\t// number of samples the drum will take to finish playing.\n\t\t\t\t\tchan->length = drum_open(m, track->wave, note->note);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttrack->curnote++;\n\t\t}\n\t}\n\t\n\t// 2nd- generate any notes which are running\n\tif (chan->length)\n\t{\n\t\tif (m < 8)\n\t\t{\t// melody tracks\n\t\t\tif (track->pi)\n\t\t\t{\t// pi tracks always generate only 1024 samples for ANY note\n\t\t\t\tnote_gen(chan, 1024);\n\t\t\t\tchan->length = 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (chan->length > 1)\n\t\t\t\t{\t// generate a full beat of music\n\t\t\t\t\tnote_gen(chan, song.samples_per_beat);\n\t\t\t\t}\n\t\t\t\telse\t// generate only most of the beat--if there's a note immediately after\n\t\t\t\t{\t\t// this one they should not run together\n\t\t\t\t\tnote_gen(chan, song.note_closing_samples);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!--chan->length)\n\t\t\t\t{\n\t\t\t\t\tnote_close(chan);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t// percussion tracks\n\t\t\t// if less than a whole beats worth of samples is left to play on the drum, finish\n\t\t\t// whatever's left. Else generate only one beats worth right now.\n\t\t\tif (chan->length > song.samples_per_beat)\n\t\t\t\tlen = song.samples_per_beat;\n\t\t\telse\n\t\t\t\tlen = chan->length;\n\t\t\t\n\t\t\tdrum_gen(m, len);\n\t\t\t\n\t\t\tchan->length -= len;\n\t\t}\n\t}\n\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nint org_GetCurrentBeat(void)\n{\n\tif (SSChannelPlaying(ORG_CHANNEL))\n\t{\n\t\tint curbuffer;\n\t\tint elapsed;\n\t\tint sample_pos;\n\t\tint beat;\n\t\t\n\t\t// if we don't lockout the audio over both these calls, it's possible\n\t\t// for the first variable to be from one buffer and the second from another.\n\t\tSSLockAudio();\n\t\t{\n\t\t\tcurbuffer = SSGetCurUserData(ORG_CHANNEL);\n\t\t\tsample_pos = SSGetSamplePos(ORG_CHANNEL);\n\t\t}\n\t\tSSUnlockAudio();\n\t\t\n\t\telapsed = SamplesToMS(sample_pos);\n\t\t\n\t\tbeat = elapsed / song.ms_per_beat;\n\t\tbeat += final_buffer[curbuffer].firstbeat;\n\t\t// wrap at end of song\n\t\twhile(beat >= song.loop_end)\n\t\t\tbeat -= (song.loop_end - song.loop_start);\n\t\t\n\t\treturn beat;\n\t}\n\t\n\treturn -1;\n}\n\n// returns which org buffer is currently playing.\nint org_GetCurrentBuffer(void)\n{\n\tif (!SSChannelPlaying(ORG_CHANNEL)) return -1;\n\treturn SSGetCurUserData(ORG_CHANNEL);\n}\n\n\n// returns the musical name of an org note number\n/*char *org_GetNoteName(int note)\n{\nstatic char static_buffer[16];\nstatic const char *note_names[] =\n\t{ \"C\", \"C#\", \"D\", \"D#\", \"E\", \"F\", \"F#\", \"G\", \"G#\", \"A\", \"A#\", \"B\" };\n\t\n\tsprintf(static_buffer, \"%s%d\", \\\n\t\t\tnote_names[note % KEYS_OCTAVE], \\\n\t\t\tnote / KEYS_OCTAVE);\n\t\n\treturn static_buffer;\n}\n*/\n// returns true if a note is a sharp note\n/*bool org_IsSharp(int note)\n{\n\tstatic const bool sharps[] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 };\n\treturn (sharps[note % KEYS_OCTAVE]);\n}\n*/\n\n"
  },
  {
    "path": "sound/org.fdh",
    "content": "//hash:86bec1cb\n//automatically generated by Makegen\n\n/* located in main.cpp */\n\n//-------------------[referenced from sound/org.cpp]-----------------//\nvoid visible_warning(const char *fmt, ...);\n\n\n/* located in platform.cpp */\n\n//-------------------[referenced from sound/org.cpp]-----------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in sound/sslib.cpp */\n\n//-------------------[referenced from sound/org.cpp]-----------------//\nvoid SSReserveChannel(int c);\nvoid SSSetVolume(int c, int newvol);\nvoid SSAbortChannel(int c);\nint SSEnqueueChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int));\nchar SSChannelPlaying(int c);\nvoid SSLockAudio(void);\nint SSGetCurUserData(int c);\nint SSGetSamplePos(int c);\nvoid SSUnlockAudio(void);\n\n\n/* located in sound/org.cpp */\n\n//-------------------[referenced from sound/org.cpp]-----------------//\nstatic void init_pitch(void);\nstatic double GetNoteSampleRate(int note, int instrument_pitch);\nstatic int MSToSamples(int ms);\nstatic int SamplesToMS(int samples);\nstatic bool load_drumtable(const char *pxt_path);\nstatic bool load_drum(char *fname, int d);\nstatic bool load_drum_pxt(char *fname, int d);\nstatic bool load_wavetable(const char *fname);\nint org_init(const char *wavetable_fname, const char *drum_pxt_dir, int org_volume);\nvoid org_close(void);\nchar org_load(char *fname);\nstatic bool init_buffers(void);\nstatic void free_buffers(void);\nbool org_start(int startbeat);\nvoid org_stop(void);\nbool org_is_playing(void);\nvoid org_fade(void);\nvoid org_set_volume(int newvolume);\nstatic void runfade();\nstatic void mix_buffers(void);\nstatic void queue_final_buffer(void);\nstatic void OrgBufferFinished(int channel, int buffer_no);\nstatic void ComputeVolumeRatios(int volume, int panning, double *volume_ratio, double *volume_left_ratio, double *volume_right_ratio);\nstatic double Interpolate(int sample1, int sample2, double ratio);\nstatic void ForceSamplePos(int m, int desired_samples);\nstatic void silence_gen(stNoteChannel *chan, int num_samples);\nstatic void note_open(stNoteChannel *chan, int wave, int pitch, int note);\nstatic void note_gen(stNoteChannel *chan, int num_samples);\nstatic int note_close(stNoteChannel *chan);\nstatic int drum_open(int m_channel, int wave, int note);\nstatic void drum_gen(int m_channel, int num_samples);\nvoid org_run(void);\nstatic void generate_music(void);\nstatic void NextBeat(int m);\nint org_GetCurrentBeat(void);\nint org_GetCurrentBuffer(void);\n\n\n/* located in sound/pxt.cpp */\n\n//-------------------[referenced from sound/org.cpp]-----------------//\nchar pxt_initsynth(void);\nchar pxt_load(const char *fname, stPXSound *snd);\nchar pxt_Render(stPXSound *snd);\nvoid FreePXTBuf(stPXSound *snd);\n\n\n/* located in common/stat.cpp */\n\n//-------------------[referenced from sound/org.cpp]-----------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//-------------------[referenced from sound/org.cpp]-----------------//\nuint32_t fgetl(FILE *fp);\nvoid fputl(uint32_t word, FILE *fp);\nuint16_t fgeti(FILE *fp);\n\n"
  },
  {
    "path": "sound/org.h",
    "content": "\n#ifndef _ORG_H\n#define _ORG_H\n\n// SSChannel # to play the music on\n#define ORG_CHANNEL\t\t\t15\n\n// maximum possible volume of an org instrument (in the file)\n// i hear according to orgmaker you can't go higher than F8 but a few\n// songs actually do go all the way to FF.\n#define ORG_MAX_VOLUME\t\t255\n\n// which panning value is perfectly centered\n#define ORG_PAN_CENTERED\t6\n#define ORG_PAN_FULL_RIGHT\t(ORG_PAN_CENTERED + ORG_PAN_CENTERED)\n\n#define KEYS_OCTAVE\t\t\t12\n#define NUM_NOTES\t\t\t(8 * KEYS_OCTAVE)\t// range of note values: 00-this.\n#define NUM_DRUMS\t\t\t12\t\t\t\t\t// max # of drum instruments to load\n\n// if you care to know which music note an org note is, modulus it by\n// KEYS_OCTAVE and compare to the following constants.\n#define NOTE_C\t\t\t0\n#define NOTE_CS\t\t\t1\n#define NOTE_D\t\t\t2\n#define NOTE_DS\t\t\t3\n#define NOTE_E\t\t\t4\n#define NOTE_F\t\t\t5\n#define NOTE_FS\t\t\t6\n#define NOTE_G\t\t\t7\n#define NOTE_GS\t\t\t8\n#define NOTE_A\t\t\t9\n#define NOTE_AS\t\t\t10\n#define NOTE_B\t\t\t11\n\n#define MAX_SONG_LENGTH\t\t5000\t\t// max song length to allocate for, in notes\n\n\n// this handles the actual synthesis\nstruct stNoteChannel\n{\n\tsigned short *outbuffer;\n\t\n\t// position inside outbuffer (not the same as samples_so_far because org module outputs stereo.\n\t// outpos counts data, samples_so_far counts samples. samples_so_far=outpos*2)\n\tint outpos;\t\t\t\t// incs by 2 for each samples_so_far, one for left ch one for right ch\n\tint samples_so_far;\t\t// number of samples generated so far into outbuffer\n\t\n\tdouble phaseacc;\t\t// current read position inside wavetable sample\n\tdouble sample_inc;\t\t// speed at which to iterate over the wavetable waveform\n\t\n\t// for drums\n\tdouble master_volume_ratio, volume_left_ratio, volume_right_ratio;\n\t\n\tint wave;\t\t\t\t// index into wavetable (which instrument we're using)\n\tint volume;\t\t\t\t// last volume value sent to note_gen\n\tint panning;\t\t\t// last panning value sent to note_gen\n\tint length;\t\t\t\t// # of beats of the current note left to generate\n\t\n\tint number;\t\t\t\t// the chanel number of this channel\n};\n\n\nstruct stNote\n{\n\tint beat;\t\t\t// beat no. that note starts on\n\tuchar note;\t\t\t// 00 - 5F, starts on a C\n\tuchar length;\t\t// in beats\n\tuchar volume;\t\t// 00 - F8\n\tuchar panning;\t\t// 00 - 0C\n};\n\n// keeps track of instrument settings for a track\nstruct stInstrument\n{\n\tint pitch;\n\tint wave;\t\t\t\t// which wave (00-99) to use\n\t// if pi is set all notes on the channel play for 1024 samples regardless\n\t// of length or tempo settings. pi only has meaning on the instrument tracks.\n\tbool pi;\n\t\n\tint curnote;\t\t\t// current note (during playback)\n\tint loop_note;\t\t\t// used when looping back to the beginning of a song at beat loop_end\n\t\n\tint nnotes;\n\tstNote note[MAX_SONG_LENGTH];\n};\n\nstruct stSong\n{\n\tbool playing;\n\tint volume;\n\t\n\tint ms_per_beat, ms_of_last_beat_of_note;\n\tint beats_per_step;\n\tint steps_per_bar;\n\tint beats_per_bar;\t\t\t\t// == (beats_per_step * steps_per_bar)\n\t\n\tint samples_per_beat;\t\t\t// # of samples in each beat\n\tint note_closing_samples;\t\t// # of samples of note to generate at the last beat of a note\n\t\n\tint loop_start, loop_end;\n\t\n\tstInstrument instrument[16];\n\t\n\tint beat;\n\tchar haslooped;\n\t\n\tbool fading;\n\tuint32_t last_fade_time;\n};\n\n#endif\n\n"
  },
  {
    "path": "sound/pxt.cpp",
    "content": "\n// PXT sound file player\n// see bottom of file for info on how to use this module\n\n#ifdef _SDL_MIXER\n#include <SDL/SDL_mixer.h>\n\nMix_Chunk *mixChunk;\n#endif\n\n#include <stdio.h>\n#include <math.h>\t\t\t// for sin()\n#include <stdlib.h>\n#include <string.h>\n\n#include \"pxt.h\"\n#include \"sslib.h\"\n\n#include \"pxt.fdh\"\n\n#define MODEL_SIZE\t\t\t256\n\n// gets the next byte from wave \"wave\", scales it by the waves volume, and places result in \"out\".\n// x * (y / z) = (x * y) / z\n#define GETWAVEBYTE(wave, out)\t\\\n{\t\\\n\tif (wave->model_no != MOD_WHITE)\t\\\n\t{\t\t\\\n\t\tout = wave->model[(unsigned char)wave->phaseacc];\t\\\n\t}\t\t\\\n\telse\t\\\n\t{\t\\\n\t\tout = white[wave->white_ptr];\t\t\\\n\t\tif (++wave->white_ptr >= WHITE_LEN) wave->white_ptr = 0;\t\\\n\t}\t\\\n\tout *= wave->volume;\t\t\t\\\n\tout /= 64;\t\\\n}\n\n\n#define WHITE_LEN\t\t22050\nsigned char white[WHITE_LEN];\n\n// the final sounds ready to play (after pxt_PrepareToPlay)\nstatic struct\n{\n\tsigned short *buffer;\n\tint len;\n\tint loops_left;\n\tvoid (*DoneCallback)(int, int);\n\tint channel;\n} sound_fx[256];\nint load_top;\n\n\nstatic struct\n{\n\tunsigned char table[256];\n} wave[PXT_NO_MODELS];\n\n\nstatic unsigned int rng_seed = 0;\nstatic unsigned short rand_next(void)\n{\n\trng_seed *= 0x343fd;\n\trng_seed += 0x269ec3;\n\t\n\treturn (rng_seed >> 16) & 0x7fff;\n}\n\nstatic void GenerateSineModel(unsigned char *table)\n{\ndouble tpi = 6.283184000f;\ndouble ratio = 256.00f;\ndouble rat64 = 64.00f;\ndouble reg;\nint i;\n\n\tfor(i=0;i<256;i++)\n\t{\n\t\treg = (double)i;\n\t\treg *= tpi;\n\t\treg /= ratio;\n\t\treg = sin(reg);\n\t\treg *= rat64;\n\t\t\n\t\ttable[i] = (unsigned char)reg;\n\t}\n}\n\n\nstatic void GenerateTriangleModel(unsigned char *table)\n{\nint i, f;\n\n\tfor(i=0;i<64;i++) table[i] = i;\n\t\n\tf = 0;\n\tfor(;i<192;i++)\n\t{\n\t\ttable[i] = 0x40 - f;\n\t\tf++;\n\t}\n\t\n\tf = 0;\n\tfor(;i<256;i++)\n\t{\n\t\ttable[i] = f - 0x40;\n\t\tf++;\n\t}\n}\n\n\nstatic void GenerateSawUpModel(unsigned char *table)\n{\nint i;\n\n\tfor(i=0;i<256;i++)\n\t\ttable[i] = (i >> 1) - 0x40;\n}\n\n\nstatic void GenerateSawDownModel(unsigned char *table)\n{\nint i;\n\n\tfor(i=0;i<256;i++)\n\t\ttable[i] = 0x40 - (i >> 1);\n}\n\n\nstatic void GenerateSquareModel(unsigned char *table)\n{\nint i;\n\n\tfor(i=0;i<128;i++) table[i] = 0x40;\n\tfor(;i<256;i++) table[i] = -0x40;\n}\n\n\nstatic void GenerateRandModel(unsigned char *table)\n{\nint i;\nsigned char k;\n\n\trng_seed = 0;\n\t\n\tfor(i=0;i<256;i++)\n\t{\n\t\tk = (signed char)rand_next();\n\t\t\n\t\tif (k < 0) k++;\n\t\ttable[i] = k >> 1;\n\t}\n}\n\nvoid GenerateWhiteModel(void)\n{\nint i;\n\n\tseedrand(0xa42c1911);\n\t\n\tfor(i=0;i<WHITE_LEN;i++)\n\t\twhite[i] = random(-63, 63);\n}\n\nstatic void GeneratePulseModel(unsigned char *table)\n{\nint i;\n\n\tfor(i=0;i<192;i++) table[i] = 0x40;\n\tfor(;i<256;i++) table[i] = -0x40;\n}\n\n\n// generate the models so we can do synth\n// must call this before doing any rendering\nchar pxt_init(void)\n{\nstatic int inited = 0;\nint i;\n\n\tif (inited)\n\t{\n\t\tstaterr(\"pxt_init: pxt module already initilized\");\n\t\treturn 0;\n\t}\n\telse inited = 1;\n\t\n\tmemset(sound_fx, 0, sizeof(sound_fx));\n\tfor(i=0;i<256;i++) sound_fx[i].channel = -1;\n\t\n\treturn 0;\n}\n\nchar pxt_initsynth(void)\n{\nstatic int synth_inited = 0;\n\tif (synth_inited) return 0; else synth_inited = 1;\n\t\n\tGenerateSineModel(wave[MOD_SINE].table);\n\tGenerateTriangleModel(wave[MOD_TRI].table);\n\tGenerateSawUpModel(wave[MOD_SAWUP].table);\n\tGenerateSawDownModel(wave[MOD_SAWDOWN].table);\n\tGenerateSquareModel(wave[MOD_SQUARE].table);\n\tGenerateRandModel(wave[MOD_NOISE].table);\n\tGeneratePulseModel(wave[MOD_PULSE].table);\n\tGenerateWhiteModel();\n\treturn 0;\n}\n\nchar pxt_SetModel(stPXWave *pxwave, int m)\n{\n\tif (m >= 0 && m < PXT_NO_MODELS)\n\t{\n\t\tpxwave->model = (signed char *)wave[m].table;\n\t\tpxwave->model_no = m;\n\t\treturn 0;\n\t}\n\telse\n\t{\n\t\tstaterr(\"pxt_SetModel: invalid sound model '%d'\", m);\n\t\treturn 1;\n\t}\n}\n\n\n/*void cout(int val)\n{\nstatic int c = 0;\nchar buf[8];\nint i;\n\tsprintf(buf, \"%d\", val);\n\tfor(i=0;i<4-strlen(buf);i++) lprintf(\" \");\n\tlprintf(\"%s  \", buf);\n\t\n\tif (++c > 16) {c=0; lprintf(\"\\n\");}\n}\n\nvoid couthx(int val)\n{\nstatic int c = 0;\nchar buf[80];\nint i;\n\n\tsprintf(buf, \"%02x\", val);\n\ti = strlen(buf) - 2;\n\tlprintf(\"%s  \", &buf[i]);\n\t\n\tif (++c > 24) { c=0; lprintf(\"\\n\"); }\n}*/\n\n\n\n/*static void display_audio(signed char *buffer, int size_blocks, int centerline, int ysize, char *caption, char is_env, int r, int g, int b)\n{\ndouble ratio, yratio;\ndouble curpos;\nint x, y;\nint lastx, lasty;\nsigned char value;\nint wd = 315;\nint xoff = 2;\nchar buf[80];\n\n#define scale_sample(value)\t (centerline + (int)((double)value * yratio))\n\n\t//lprintf(\"display_audio: displaying buffer of len %d\\n\", size_blocks);\n\t\n\tratio = (double)size_blocks / (double)wd;\n\tyratio = (double)ysize / (double)(127+127);\n\t//lprintf(\"ratio = %.2f yratio = %.2f\\n\", ratio, yratio);\n\t\n\tDrawSDLLine(SCREEN_WIDTH/2, 0, SCREEN_WIDTH/2, SCREEN_HEIGHT, 18,18,18);\n\tDrawSDLLine(xoff, centerline, xoff+wd, centerline, 255,0,0);\n\ty = scale_sample(TOPAMP); DrawSDLLine(xoff, y, xoff+wd, y, 68,68,68);\n\ty = scale_sample(BTMAMP); DrawSDLLine(xoff, y, xoff+wd, y, 68,68,68);\n\t\n\tcurpos = 0;\n\tlastx = -1;\n\tfor(x=xoff;x<wd+xoff;x++)\n\t{\n\t\tvalue = buffer[(int)curpos];\n\t\tcurpos += ratio;\n\t\t\n\t\t// envelope is 0-63, so scale it to 0-127\n\t\tif (is_env) value = -value * 2;\n\t\t\n\t\ty = scale_sample(value);\n\t\t\n\t\tif (lastx==-1 || abs(lasty - y) < 2)\n\t\t{\n\t\t\tPlotSDLPixel(x, y, r,g,b);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDrawSDLLine(lastx, lasty, x, y, r,g,b);\n\t\t}\n\t\t\n\t\tlastx = x; lasty = y;\n\t}\n\t\n\tif (caption[0])\n\t{\n\t\tsprintf(buf, \" %s   len = %d\", caption, size_blocks);\n\t\tfont_draw_shaded(4, ((centerline+(ysize/2))-16), buf, 0, &greenfont);\n\t}\n\t\n\tflip();\n}\n\nvoid debugshowsound(stPXSound *snd)\n{\nuchar r[4] = { 250, 49,  250, 0 };\nuchar g[4] = { 250, 179, 127, 200 };\nuchar b[4] = { 0,   49,  127, 180 };\nint c;\nchar *capt1 = \"\", *capt2 = \"\";\n\n\tfor(c=3;c>=0;c--)\n\t{\n\t\tif (snd->chan[c].enabled)\n\t\t{\n\t\t\tdisplay_audio(snd->chan[c].buffer, snd->chan[c].size_blocks, 60, 80, capt1, 0,  r[c], g[c], b[c]);\n\t\t\tdisplay_audio(snd->chan[c].envbuffer, 256, 170, 80, capt2, 1,  r[c], g[c], b[c]);\n\t\t}\n\t\t\n\t\tif (c==1)\n\t\t{\n\t\t\tcapt1 = \"Output\";\n\t\t\tcapt2 = \"Envelope\";\n\t\t}\n\t}\n\t\n\tflip();\n}\n*/\n\n// sets the given envelope to default values\nvoid pxt_SetDefaultEnvelope(stPXEnvelope *env)\n{\n\tenv->initial = 63;\n\tenv->time[0] = 64;\n\tenv->time[1] = 128;\n\tenv->time[2] = 255;\n\tenv->val[0] = 63;\n\tenv->val[1] = 63;\n\tenv->val[2] = 63;\n}\n\n\n// generate a 256-byte envelope \"waveform\" containing volume adjustment values from 00-3f\n// in short it renders the envelope for a sound.\n// the envelope must be ready before CreateAudio can be used.\nvoid GenerateEnvelope(stPXEnvelope *env, char *buffer)\n{\ndouble curenv, envinc;\nint i;\n\n\tcurenv = env->initial;\n\tenvinc = (double)(env->val[0] - env->initial) / env->time[0];\n\tfor(i=0;i<env->time[0];i++)\n\t{\n\t\tbuffer[i] = (int)curenv;\n\t\tcurenv += envinc;\n\t}\n\t\n\tcurenv = env->val[0];\n\tenvinc = (double)(env->val[1] - env->val[0]) / (env->time[1] - env->time[0]);\n\tfor(;i<env->time[1];i++)\n\t{\n\t\tbuffer[i] = (int)curenv;\n\t\tcurenv += envinc;\n\t}\n\t\n\tcurenv = env->val[1];\n\tenvinc = (double)(env->val[2] - env->val[1]) / (env->time[2] - env->time[1]);\n\tfor(;i<env->time[2];i++)\n\t{\n\t\tbuffer[i] = (int)curenv;\n\t\tcurenv += envinc;\n\t}\n\t\n\t// fade to 0 volume if time_c is < end of sound, just like the pretty drawing in PixTone.\n\tenvinc = (double)(-1 - env->val[2]) / (256 - env->time[2]);\n\tcurenv = env->val[2];\n\tfor(;i<256;i++)\n\t{\n\t\tbuffer[i] = (int)curenv;\n\t\tcurenv += envinc;\n\t}\n}\n\n\n\n// added this for sound editing tools. it will render you a single PXWave,\n// that is a component of a PXSound, into a buffer you provide.\n// otherwise it's useless.\nvoid pxt_RenderPXWave(stPXWave *pxwave, signed char *buffer, int size_blocks)\n{\nint i, j, e;\nint output;\n\n\t// we generate twice the buf size and average it down afterwards for increased precision.\n\t// this is what pixtone does, and although I'm not sure if that's why; it really does\n\t// seem to make a slight quality increase\n\tsize_blocks *= 2;\n\tchar *tempbuffer = (char *)malloc(size_blocks);\n\t\n\t//lprintf(\"RenderPXWave: buffer len %d, repeat = %.2f\\n\", size_blocks, pxwave->repeat);\n\t\n\tpxwave->phaseinc = ((MODEL_SIZE * pxwave->repeat) / (double)size_blocks);\n\tpxwave->phaseacc = (double)pxwave->offset;\n\tpxwave->white_ptr = pxwave->offset;\n\t\n\tfor(i=0;i<size_blocks;i++)\n\t{\n\t\tGETWAVEBYTE(pxwave, output);\n\t\t\n\t\ttempbuffer[i] = output;\n\t\tpxwave->phaseacc += pxwave->phaseinc;\n\t}\n\t\n\t// average our doublesampled audio down into the final buffer\n\tfor(i=j=0;i<size_blocks;i+=2)\n\t{\n\t\te = tempbuffer[i] + tempbuffer[i+1];\n\t\te >>= 1;\n\t\tbuffer[j++] = e;\n\t}\n}\n\n\n// renders a sound channel.\n// call GenerateEnvelope first.\nstatic void CreateAudio(stPXChannel *chan)\n{\n// store all the commonly-used pointers\nstPXWave *main = &chan->main;\nstPXWave *pitch = &chan->pitch;\nstPXWave *pitch2 = &chan->pitch2;\nstPXWave *volume = &chan->volume;\nunsigned char *envbuffer = chan->envbuffer;\nint size_blocks = chan->size_blocks;\n// var defs\nint i, j;\nint output, bm, bm2, volmod;\ndouble phaseval;\nint e;\ndouble env_acc, env_inc;\n\n\t// we generate twice the buf size and average it down afterwards for increased precision.\n\t// this is what pixtone does, and although I'm not sure if that's why; it really does\n\t// seem to make a slight quality increase\n\tsize_blocks *= 2;\n\tsigned char *buffer = (signed char *)malloc(size_blocks);\n\t\n\t//lprintf(\"CreateAudio: buffer len %d, repeat = %.2f / %.2f\\n\", size_blocks, main->repeat, pitch->repeat);\n\t\n\t// calculate all the phaseinc's\n\tmain->phaseinc = ((MODEL_SIZE * main->repeat) / (double)size_blocks);\n\tpitch->phaseinc = ((MODEL_SIZE * pitch->repeat) / (double)size_blocks);\n\tpitch2->phaseinc = ((MODEL_SIZE * pitch2->repeat) / (double)size_blocks);\n\tvolume->phaseinc = ((MODEL_SIZE * volume->repeat) / (double)size_blocks);\n\tenv_inc = (MODEL_SIZE / (double)size_blocks);\n\t\n\t//lprintf(\"main phaseinc = %.6f\\n\", main->phaseinc);\n\t//lprintf(\"pitch phaseinc = %.6f\\n\", pitch->phaseinc);\n\t//lprintf(\"volume phaseinc = %.6f\\n\", volume->phaseinc);\n\t\n\t// set the starting positions\n\tmain->phaseacc = (double)main->offset;\n\tpitch->phaseacc = (double)pitch->offset;\n\tpitch2->phaseacc = (double)pitch2->offset;\n\tvolume->phaseacc = (double)volume->offset;\n\t\n\tmain->white_ptr = main->offset;\n\tpitch->white_ptr = pitch->offset;\n\tpitch2->white_ptr = pitch2->offset;\n\tvolume->white_ptr = volume->offset;\n\t\n\tenv_acc = 0;\n\t\n\tfor(i=0;i<size_blocks;i++)\n\t{\n\t\t// get next sample from the main waveform\n\t\tGETWAVEBYTE(main, output);\n\t\tGETWAVEBYTE(volume, volmod);\n\t\t\n\t\t// hack to allow inverting sign of MOD_PULSE-based volume modulators\n\t\t// by just raising the top over 128\n\t\tif (volume->model_no==MOD_PULSE)\n\t\t{\n\t\t\tif (volmod > 127 || volmod < -127)\n\t\t\t{\n\t\t\t\tif (volmod > 127)\n\t\t\t\t{\n\t\t\t\t\tvolmod = 256 - volmod;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tvolmod = -(256 - -volmod);\n\t\t\t\t}\n\t\t\t\tvolmod = -volmod;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// offset volume modulator such that it completely silences the sound at <= -0x40\n\t\tvolmod += 64;\n\t\tif (volmod < 0) volmod = 0;\n\t\t\n\t\t// apply volume modulator to main\n\t\toutput = (output * volmod) / 64;\n\t\t\n\t\t// apply the envelope\n\t\te = envbuffer[(unsigned char)env_acc];\n\t\toutput = (output * e) / 64;\n\t\t\n\t\t// save sample to output buffer\n\t\tbuffer[i] = output;\n\t\t\n\t\t\n\t\t// get next byte from the frequency modulator waveform\n\t\tGETWAVEBYTE(pitch, bm);\n\t\tGETWAVEBYTE(pitch2, bm2);\n\t\t\n\t\t// clip the values to a signed char if it's a pulse waveform...allows\n\t\t// switch it's signed from up/up/down to down/down/up just by taking\n\t\t// the top over 128. but for other waveforms we actually want the clipping\n\t\t// to not happen right in this case because A. it allows for making larger\n\t\t// range frequency sweeps than otherwise possible and B. pixtone has this\n\t\t// same \"glitch\" so it's a compatibility thing.\n\t\tif (pitch->model_no==MOD_PULSE) bm = (signed char)bm;\n\t\tif (pitch2->model_no==MOD_PULSE) bm2 = (signed char)bm2;\n\t\t\n\t\tbm += bm2;\n\t\t\n\t\t\n\t\tif (bm >= 0)\n\t\t{\t// when positive, every 32 clicks doubles the phaseinc.\n\t\t\t// this is actually \"phaseval = (mod / 32) * main->phaseinc;\" however\n\t\t\t// we lose precision by doing the division first, so this is equivalent:\n\t\t\tphaseval = ((double)bm * main->phaseinc) / 32;\n\t\t\t\n\t\t\t// phaseinc is sped up by phaseval\n\t\t\tmain->phaseacc += (main->phaseinc + phaseval);\n\t\t}\n\t\telse\n\t\t{\t// when negative, every 64 clicks half's the phaseinc.\n\t\t\t// this can be thought of as \"phaseval = (mod / 64) * (main->phaseinc * 0.5f);\" however\n\t\t\t// that doesn't actually work because of precision loss, so this instead:\n\t\t\tphaseval = ((double)(-bm) * main->phaseinc) / 128;\n\t\t\t\n\t\t\t// phaseinc is slowed down by phaseval\n\t\t\tmain->phaseacc += (main->phaseinc - phaseval);\n\t\t}\n\t\t\n\t\t\n\t\tpitch->phaseacc += pitch->phaseinc;\n\t\tpitch2->phaseacc += pitch2->phaseinc;\n\t\tvolume->phaseacc += volume->phaseinc;\n\t\t\n\t\tenv_acc += env_inc;\n\t\t// just to make certain the envelope never starts over from the beginning.\n\t\t// although it shouldn't; the precision on env_inc seems to be pretty good.\n\t\tif (env_acc > 255) env_acc = 255;\n\t\t\n\t\t// normally we would have to do this, but we don't as long as model_size is 256\n\t\t// and we cast phaseacc to an unsigned char when we do the lookup; it'll wrap by itself.\n\t\t// neat huh.\n\t\t//while(main->phaseacc >= MODEL_SIZE) main->phaseacc -= MODEL_SIZE;\n\t\t//while(pitch->phaseacc >= MODEL_SIZE) pitch->phaseacc -= MODEL_SIZE;\n\t}\n\t\n\t// average our doublesampled audio down into the final buffer\n\tsigned char *outbuffer = chan->buffer;\n\tfor(i=j=0;i<size_blocks;i+=2)\n\t{\n\t\te = buffer[i] + buffer[i+1];\n\t\te >>= 1;\n\t\toutbuffer[j++] = e;\n\t}\n}\n\n\n// allocate all the buffers needed for the given sound\nstatic char AllocBuffers(stPXSound *snd)\n{\nint topbufsize = 64;\nint i;\n\n\tFreePXTBuf(snd);\n\t\n\t// allocate buffers for each enabled channel\n\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t{\n\t\tif (snd->chan[i].enabled)\n\t\t{\n\t\t\tsnd->chan[i].buffer = (signed char *)malloc(snd->chan[i].size_blocks);\n\t\t\tif (!snd->chan[i].buffer)\n\t\t\t{\n\t\t\t\tstaterr(\"AllocBuffers (pxt): out of memory (1)!\");\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\t\n\t\t\tif (snd->chan[i].size_blocks > topbufsize)\n\t\t\t\ttopbufsize = snd->chan[i].size_blocks;\n\t\t}\n\t}\n\t\n\t// allocate the final buffer\n\tsnd->final_buffer = (signed char *)malloc(topbufsize);\n\tif (!snd->final_buffer)\n\t{\n\t\tstaterr(\"AllocBuffers (pxt): out of memory (2)!\");\n\t\treturn -1;\n\t}\n\t\n\tsnd->final_size = topbufsize;\n\t\n\treturn topbufsize;\n}\n\n\n// generate 8-bit signed PCM audio from a PXT sound, put it in it's final_buffer.\nchar pxt_Render(stPXSound *snd)\n{\nint i, s;\nsigned short mixed_sample;\nsigned short *middle_buffer;\nint bufsize;\n\n\tbufsize = AllocBuffers(snd);\n\tif (bufsize==-1) return 1;\t\t\t// error\n\t\n\t// --------------------------------\n\t//  render all the channels\n\t// --------------------------------\n\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t{\n\t\tif (snd->chan[i].enabled)\n\t\t{\n//\t\t\tmemset(snd->chan[i].buffer, 0, sizeof(snd->chan[i].buffer));\n\t\t\tGenerateEnvelope(&snd->chan[i].envelope, (char *)snd->chan[i].envbuffer);\n\t\t\tCreateAudio(&snd->chan[i]);\n\t\t}\n\t}\n\t\n\t// ----------------------------------------------\n\t//  mix the channels [generate final_buffer]\n\t// ----------------------------------------------\n\t//lprintf(\"final_size = %d final_buffer = %08x\\n\", snd->final_size, snd->final_buffer);\n\t\n\tmiddle_buffer = (signed short *)malloc(snd->final_size * 2);\n\tmemset(middle_buffer, 0, snd->final_size * 2);\n\t\n\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t{\n\t\tif (snd->chan[i].enabled)\n\t\t{\n\t\t\tfor(s=0;s<snd->chan[i].size_blocks;s++)\n\t\t\t{\n\t\t\t\tmiddle_buffer[s] += snd->chan[i].buffer[s];\n\t\t\t}\n\t\t}\n\t}\n\t\n\tfor(s=0;s<snd->final_size;s++)\n\t{\n\t\tmixed_sample = middle_buffer[s];\n\t\t\n\t\tif (mixed_sample > 127) mixed_sample = 127;\n\t\telse if (mixed_sample < -127) mixed_sample = -127;\n\t\t\n\t\tsnd->final_buffer[s] = (char)mixed_sample;\n\t}\n\t\n\tfree(middle_buffer);\n\treturn 0;\n}\n\n\n// get an already-rendered pxt 'snd' ready for sending to SDL_mixer.\n// converts the 8-bit signed audio to SDL_mixer's 16-bit stereo format and\n// sets up the Mix_Chunk.\nvoid pxt_PrepareToPlay(stPXSound *snd, int slot)\n{\nint value;\nint ap;\nint i;\nsigned char *buffer = snd->final_buffer;\nsigned short *outbuffer;\nint malc_size;\n\n\t// convert the buffer from 8-bit mono signed to 16-bit stereo signed\n\tmalc_size = (snd->final_size * 2 * 2);\n\toutbuffer = (signed short *)malloc(malc_size);\n\t\n\tfor(i=ap=0;i<snd->final_size;i++)\n\t{\n\t\tvalue = buffer[i];\n\t\tvalue *= 200;\n\t\t\n\t\toutbuffer[ap++] = value;\t\t// left ch\n\t\toutbuffer[ap++] = value;\t\t// right ch\n\t}\n\t\n\t\n\tsound_fx[slot].buffer = outbuffer;\n\tsound_fx[slot].len = snd->final_size;\n\t//lprintf(\"pxt ready to play in slot %d\\n\", slot);\n}\n\n// quick-and-dirty function to raise or lower the pitch of a sound.\n// I say quick-and-dirty because it also changes the length.\n// We need this for the \"SSS\" (Stream Sound) which is supposed to have\n// adjustable pitch.\nvoid pxt_ChangePitch(stPXSound *snd, double factor)\n{\nsigned char *inbuffer = snd->final_buffer;\nint insize = snd->final_size;\n\n\tint outsize = (int)((double)insize * factor);\n\tsigned char *outbuffer = (signed char *)malloc(outsize);\n\tif (factor == 0) factor = 0.001;\n\t\n\tfor(int i=0;i<outsize;i++)\n\t\toutbuffer[i] = inbuffer[(int)((double)i / factor)];\n\t\n\tfree(snd->final_buffer);\n\tsnd->final_buffer = outbuffer;\n\tsnd->final_size = outsize;\n}\n\n\n// begins playing the pxt in the given slot.\n// the SSChannel is returned.\n// on error, returns -1.\nint pxt_Play(int chan, int slot, char loop)\n{\n#ifdef _SDL_MIXER\n    if (mixChunk) {\n        pxt_chunk_free();\n    }\n\n    /* I don't know correct this way or no but it works! */\n    /* See https://github.com/EXL/NXEngine/blob/ddaf82dacc54aa7e45bf078c03ad19e6318e528e/sound/sslib.cpp#L157 for proper length in bytes. */\n    mixChunk = Mix_QuickLoad_RAW((Uint8 *)sound_fx[slot].buffer, sound_fx[slot].len * 2 * 2);\n\n    if(Mix_PlayChannel(chan, mixChunk, loop)==-1) {\n        stat(\"Mix_PlayChannel: %s\\n\",Mix_GetError());\n    }\n    return chan;\n#else\n    return pxt_PlayWithCallback(chan, slot, loop, NULL);\n#endif\n}\n\nint pxt_PlayWithCallback(int chan, int slot, char loop, void (*FinishedCB)(int, int))\n{\n\tif (sound_fx[slot].buffer)\n\t{\n\t\t// locking the audio here ensures that sound won't finish before we get down\n\t\t// below and finish setting it's params.\n\t\tSSLockAudio();\n\t\tif (loop)\n\t\t{\n\t\t\tchan = SSPlayChunk(chan, sound_fx[slot].buffer, sound_fx[slot].len, slot, pxtLooper);\n\t\t\tSSEnqueueChunk(chan, sound_fx[slot].buffer, sound_fx[slot].len, slot, pxtLooper);\n\t\t\t\n\t\t\tsound_fx[slot].loops_left = (loop==-1) ? -1 : (loop - 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchan = SSPlayChunk(chan, sound_fx[slot].buffer, sound_fx[slot].len, slot, pxtSoundDone);\n\t\t}\n\t\t\n\t\tsound_fx[slot].DoneCallback = FinishedCB;\n\t\tsound_fx[slot].channel = chan;\n\t\tSSUnlockAudio();\n\t\t\n\t\tif (chan < 0)\n\t\t{\n\t\t\tstaterr(\"pxt_Play: SSPlayChunk returned error\");\n\t\t}\n\t\treturn chan;\n\t}\n\telse\n\t{\n\t\tstaterr(\"pxt_Play: sound slot 0x%02x not rendered\", slot);\n\t\treturn -1;\n\t}\n}\n\nstatic void pxtSoundDone(int chan, int slot)\n{\n\tsound_fx[slot].channel = -1;\n\tif (sound_fx[slot].DoneCallback)\n\t{\n\t\t(*sound_fx[slot].DoneCallback)(chan, slot);\n\t}\n}\n\nstatic void pxtLooper(int chan, int slot)\n{\n\tif (sound_fx[slot].loops_left)\n\t{\n\t\tSSEnqueueChunk(chan, sound_fx[slot].buffer, sound_fx[slot].len, slot, pxtLooper);\n\t}\n\telse\n\t{\n\t\tpxtSoundDone(chan, slot);\n\t}\n\t\n\tif (sound_fx[slot].loops_left > 0) sound_fx[slot].loops_left--;\n}\n\nvoid pxt_Stop(int slot)\n{\t/// possible threading issues here? i'm not sure if it's important enough\n\t/// i don't want to lock the audio because i'm worried that when the sound is aborted\n\t/// it could end up being left locked during the user's sound done callback.\n\tif (sound_fx[slot].channel != -1)\n\t{\n#ifdef _SDL_MIXER\n    Mix_HaltChannel(sound_fx[slot].channel);\n#ifdef DEBUG\n    stat(\"Halt channel\");\n#endif\n#endif\n\t\tsound_fx[slot].loops_left = 0;\n\t\tSSAbortChannel(sound_fx[slot].channel);\n\t}\n}\n\nchar pxt_IsPlaying(int slot)\n{\n\treturn (sound_fx[slot].channel != -1);\n}\n\n\n// render all pxt files under \"path\" up to slot \"top\".\n// get them all ready to play in their sound slots.\n// if cache_name is specified the pcm audio data is cached under the given filename.\nchar pxt_LoadSoundFX(const char *path, const char *cache_name, int top)\n{\nchar fname[80];\nint slot;\nstPXSound snd;\nFILE *fp = NULL;\n\n\tstat(\"Loading Sound FX...\");\n\tload_top = top;\n\t\n\tif (cache_name)\n\t{\n\t\t// try to load the cache if we can\n\t\tif (LoadFXCache(cache_name, top) == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tfp = fopen(cache_name, \"wb\");\n\t\tif (!fp)\n\t\t{\n\t\t\tstaterr(\"LoadSoundFX: failed open: '%s'\", cache_name);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tfputl('PXC1', fp);\n\t\tfputi(top, fp);\n\t}\n\t\n\t// get ready to do synthesis\n\tpxt_initsynth();\n\t\n\tfor(slot=1;slot<=top;slot++)\n\t{\n\t\tsprintf(fname, \"%sfx%02x.pxt\", path, slot);\n\t\t\n\t\tif (pxt_load(fname, &snd)) continue;\n\t\t\n\t\tpxt_Render(&snd);\n\t\t\n\t\t// dirty hack; lower the pitch of the Stream Sounds\n\t\t// to match the way they actually sound in the game\n\t\t// with the SSS0400 command.\n\t\tif (slot == 40)\n\t\t\tpxt_ChangePitch(&snd, 5.0f);\n\t\tif (slot == 41)\n\t\t\tpxt_ChangePitch(&snd, 6.0f);\n\t\t\n\t\t// save the rendered audio to cache\n\t\tif (fp)\n\t\t{\n\t\t\tfputl(snd.final_size, fp);\n\t\t\tfputc(slot, fp);\n\t\t\tfwrite(snd.final_buffer, snd.final_size, 1, fp);\n\t\t}\n\t\t\n\t\t// upscale the sound to 16-bit for SDL_mixer then throw away the now unnecessary 8-bit data\n\t\tpxt_PrepareToPlay(&snd, slot);\n\t\tFreePXTBuf(&snd);\n\t}\n\t\n\tif (fp)\n\t{\n\t\tstat(\" - created %s; %d bytes\", cache_name, ftell(fp));\n\t\tfclose(fp);\n\t}\n\t\n\treturn 0;\n}\n\n\n// attempts to load all the PXT's out of the given cache file.\n// if succesful, returns 0.\nstatic char LoadFXCache(const char *fname, int top)\n{\nFILE *fp;\nint slot;\nstPXSound snd;\n\n\tfp = fopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstat(\"LoadFXCache: audio cache %s not exist\", fname);\n\t\treturn 1;\n\t}\n\t\n\tif (fgetl(fp) != 'PXC1')\n\t{\n\t\tstat(\"LoadFXCache: %s is incorrect format\", fname);\n\t\tfclose(fp);\n\t\treturn 1;\n\t}\n\t\n\tif (fgeti(fp) != top)\n\t{\n\t\tstat(\"LoadFXCache: # of sounds has changed since cache creation\");\n\t\tfclose(fp);\n\t\treturn 1;\n\t}\n\t\n\tint allocd_size = 0;\n\tsnd.final_buffer = NULL;\n\tint eof = 0;\n\t\n\tstat(\"LoadFXCache: restoring pxts from cache\");\n\tfor(;;)\n\t{\n\t\tsnd.final_size = fgetl(fp, &eof);\n\t\tif (eof) break;\n\t\tslot = fgetc(fp);\n\t\t\n\t\tif (snd.final_size > allocd_size)\n\t\t{\n\t\t\tallocd_size = (snd.final_size * 10);\n\t\t\t\n\t\t\tif (snd.final_buffer) free(snd.final_buffer);\n\t\t\tsnd.final_buffer = (signed char *)malloc(allocd_size);\n\t\t\tif (!snd.final_buffer)\n\t\t\t{\n\t\t\t\tstaterr(\"LoadFXCache: out of memory!\");\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfread(snd.final_buffer, snd.final_size, 1, fp);\n\t\tpxt_PrepareToPlay(&snd, slot);\n\t}\n\t\n\tload_top = slot;\n\tfree(snd.final_buffer);\n\treturn 0;\n}\n\nvoid pxt_freeSoundFX(void)\n{\nint i;\n\tfor(i=0;i<=load_top;i++)\n\t{\n\t\tif (sound_fx[i].buffer)\n\t\t{\n\t\t\tfree(sound_fx[i].buffer);\n\t\t\tsound_fx[i].buffer = NULL;\n\t\t}\n\t}\n}\n\nvoid pxt_FreeSound(int slot)\n{\n\tif (sound_fx[slot].buffer)\n\t{\n\t\tfree(sound_fx[slot].buffer);\n\t\tsound_fx[slot].buffer = NULL;\n\t}\n}\n\n/*\nchar pxt_init(void)\n{\nint start;\n\n\t//lprintf(\"Loading sound FX...\\n\");\n\tstart = SDL_GetTicks();\n\tif (LoadSoundFX(\"pxt/\", \"fx.pcm\", 0xa0)) return 1;\n\tlprintf(\"time = %d\\n\", SDL_GetTicks() - start);\n\t\n\tpxt_Play(0x1e);\n\t\n\tsnd = pxt_load(\"pxt/fx11.pxt\");\n\tif (snd)\n\t{\n\t\trender_pxt(snd);\n\t\t\n\t\tpxt_PrepareToPlay(snd, 4);\n\t\tpxt_Play(4);\n\t\t\n\t\tdebugshowsound(snd);\n\t}\n\t\n\treturn 0;\n}*/\n\n\n// free all the internal buffers of a PXSound\nvoid FreePXTBuf(stPXSound *snd)\n{\n\tif (snd)\n\t{\n\t\tint i;\n\t\t\n\t\t// free up the buffers\n\t\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t\t{\n\t\t\tif (snd->chan[i].buffer)\n\t\t\t{\n\t\t\t\tfree(snd->chan[i].buffer);\n\t\t\t\tsnd->chan[i].buffer = NULL;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (snd->final_buffer)\n\t\t{\n\t\t\tfree(snd->final_buffer);\n\t\t\tsnd->final_buffer = NULL;\n\t\t}\n\t}\n}\n\n\n\n// read a .pxt file into memory and return a stPXSound ready to be rendered.\nchar pxt_load(const char *fname, stPXSound *snd)\n{\nFILE *fp;\nchar ch;\nchar cc;\nint i;\nchar load_extended_section = 0;\n\n#define BRACK\t\t'{'\t\t// my damn IDE is borking up the Function List if i put this inline\n\n\tfp = fopen(fname, \"rb\");\n\tif (!fp) { staterr(\"pxt_load: file '%s' not found.\", fname); return 1; }\n\t\n\t//lprintf(\"pxt_load: reading %s...\\n\", fname);\n\t\n\t// set all buffers to non-existant and zero-length to start\n\tmemset(snd, 0, sizeof(stPXSound));\n\t\n\t\n\t// skip ahead in the file till we find the machine readable data, denoted by '{'\n\tif (ReadToBracket(fp)) return 1;\n\t\n\t// load all channels we find\n\tcc = 0;\n\tch = BRACK;\n\twhile(!feof(fp))\n\t{\n\t\tif (ch=='>')\t\t// extended section\n\t\t{\n\t\t\tload_extended_section = 1;\n\t\t\tbreak;\n\t\t}\n\t\telse if (ch==BRACK)\n\t\t{\t// opening a new channel\n\t\t\tif (cc >= PXT_NO_CHANNELS)\n\t\t\t{\n\t\t\t\tstaterr(\"pxt_load: sound '%s' contains too many channels!\", fname);\n\t\t\t\tgoto error;\n\t\t\t}\n\t\t\t\n\t\t\tsnd->chan[cc].enabled = fgeticsv(fp);\n\t\t\tsnd->chan[cc].size_blocks = fgeticsv(fp);\n\t\t\t\n\t\t\tif (LoadComponent(fp, &snd->chan[cc].main)) goto error;\n\t\t\tif (LoadComponent(fp, &snd->chan[cc].pitch)) goto error;\n\t\t\tif (LoadComponent(fp, &snd->chan[cc].volume)) goto error;\n\t\t\t\n\t\t\tsnd->chan[cc].envelope.initial = fgeticsv(fp);\n\t\t\tfor(i=0;i<PXENV_NUM_VERTICES;i++)\n\t\t\t{\n\t\t\t\tsnd->chan[cc].envelope.time[i] = fgeticsv(fp);\n\t\t\t\tsnd->chan[cc].envelope.val[i] = fgeticsv(fp);\n\t\t\t}\n\t\t\t\n\t\t\tcc++;\n\t\t}\n\t\t\n\t\tch = fgetc(fp);\n\t}\n\t\n\tif (load_extended_section)\n\t{\n\t\tstat(\"pxt_load: extended section found, loading it\");\n\t\tif (ReadToBracket(fp)) return 1;\n\t\tfor(cc=0;cc<PXT_NO_CHANNELS;cc++)\n\t\t{\n\t\t\tif (LoadComponent(fp, &snd->chan[cc].pitch2)) goto error;\n\t\t}\n\t}\n\telse\n\t{\n\t\t//stat(\"No extended section found; setting compatibility values.\");\n\t\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t\t{\n\t\t\tmemset(&snd->chan[i].pitch2, 0, sizeof(stPXWave));\n\t\t\tpxt_SetModel(&snd->chan[i].pitch2, 0);\n\t\t}\n\t}\n\t\n\t//stat(\"pxt_load: '%s' parsed ok\", fname);\n\tfclose(fp);\n\treturn 0;\n\t\nerror: ;\n\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t{\n\t\tif (snd->chan[i].buffer)\n\t\t{\n\t\t\tfree(snd->chan[i].buffer);\n\t\t\tsnd->chan[i].buffer = NULL;\n\t\t}\n\t}\n\tif (fp) fclose(fp);\n\t\n\treturn 1;\n}\n\nstatic char LoadComponent(FILE *fp, stPXWave *pxw)\n{\n\tif (pxt_SetModel(pxw, fgeticsv(fp))) return 1;\n\t\n\tpxw->repeat = fgetfcsv(fp);\n\tpxw->volume = fgeticsv(fp);\n\tpxw->offset = fgeticsv(fp);\n\treturn 0;\n}\n\nstatic char ReadToBracket(FILE *fp)\n{\nuchar ch;\n\n\tfor(;;)\n\t{\n\t\tch = fgetc(fp);\n\t\tif (ch==BRACK) break;\n\t\t\n\t\tif (feof(fp))\n\t\t{\n\t\t\tstaterr(\"pxt_load: file is in incorrect file format [failed to find '{']\");\n\t\t\tfclose(fp);\n\t\t\treturn 1;\n\t\t}\n\t}\n\treturn 0;\n}\n\n\nchar pxt_save(const char *fname, stPXSound *snd)\n{\nFILE *fp;\nint i, j;\n\n\tfp = fopen(fname, \"wb\");\n\tif (!fp)\n\t{\n\t\tstat(\"save_pxt: unable to open '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t{\n\t\tfprintf(fp, \"use  :%d\\r\\n\", snd->chan[i].enabled);\n\t\tfprintf(fp, \"size :%d\\r\\n\", snd->chan[i].size_blocks);\n\t\t\n\t\tSaveComponent(fp, \"main\", &snd->chan[i].main);\n\t\tSaveComponent(fp, \"pitch\", &snd->chan[i].pitch);\n\t\tSaveComponent(fp, \"volume\", &snd->chan[i].volume);\n\t\t\n\t\tfprintf(fp, \"initialY:%d\\r\\n\", snd->chan[i].envelope.initial);\n\t\tfor(j=0;j<PXENV_NUM_VERTICES;j++)\n\t\t{\n\t\t\tSaveEnvVertice(fp, &snd->chan[i].envelope, j);\n\t\t}\n\t\t\n\t\tfprintf(fp, \"\\r\\n\");\n\t}\n\t\n\t// save \"machine-readable\" section\n\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t{\n\t\tfprintf(fp, \"{\");\n\t\t\n\t\tfprintf(fp, \"%d,%d,\", snd->chan[i].enabled, snd->chan[i].size_blocks);\n\t\t\n\t\tSaveComponentMachine(fp, &snd->chan[i].main, 1);\n\t\tSaveComponentMachine(fp, &snd->chan[i].pitch, 1);\n\t\tSaveComponentMachine(fp, &snd->chan[i].volume, 1);\n\t\t\n\t\tfprintf(fp, \"%d,\", snd->chan[i].envelope.initial);\n\t\tfor(j=0;j<PXENV_NUM_VERTICES-1;j++)\n\t\t{\n\t\t\tfprintf(fp, \"%d,%d,\", snd->chan[i].envelope.time[j], snd->chan[i].envelope.val[j]);\n\t\t}\n\t\tfprintf(fp, \"%d,%d\", snd->chan[i].envelope.time[j], snd->chan[i].envelope.val[j]);\n\t\t\n\t\tfprintf(fp, \"},\\r\\n\");\n\t}\n\t\n\t// save \"extended\" section-- original PixTone seems really picky about\n\t// trying to put anything it doesn't know about into the normal section\n\t\n\t// machine readable pitch2\n\tfprintf(fp, \"\\r\\n-> {\");\n\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t{\n\t\tSaveComponentMachine(fp, &snd->chan[i].pitch2, (i+1<PXT_NO_CHANNELS));\n\t}\n\tfprintf(fp, \"},\\r\\n\");\n\t\n\t// machine readable extra envelope vertices\n\tfprintf(fp, \"-> {255,0,255,0,255,0,255,0},\\r\\n\");\n\t\n\t// human readable copy\n\tfprintf(fp, \"\\r\\n\");\n\tfor(i=0;i<PXT_NO_CHANNELS;i++)\n\t{\n\t\tSaveComponent(fp, \"pitch2\", &snd->chan[i].pitch);\n\t\tfprintf(fp, \"dx      :255\\r\\n\");\n\t\tfprintf(fp, \"dy      :0\\r\\n\");\n\t\tfprintf(fp, \"\\r\\n\");\n\t}\n\t\n\tfclose(fp);\n\tstat(\"pxt save ok '%s'\", fname);\n\treturn 0;\n}\n\n#ifdef _SDL_MIXER\nvoid pxt_chunk_free()\n{\n    Mix_FreeChunk(mixChunk);\n#ifdef DEBUG\n    stat(\"Chunk free!\");\n#endif\n}\n#endif\n\nstatic void SaveComponent(FILE *fp, const char *name, stPXWave *pxw)\n{\nchar spaces[40];\nint nspaces;\n\n\tnspaces = 6 - strlen(name);\n\tif (nspaces) memset(spaces, ' ', nspaces);\n\tspaces[nspaces] = 0;\n\t\n\tfprintf(fp, \"%s_model %s:%d\\r\\n\", name, spaces, pxw->model_no);\n\tfprintf(fp, \"%s_freq  %s:%.2f\\r\\n\", name, spaces, pxw->repeat);\n\tfprintf(fp, \"%s_top   %s:%d\\r\\n\", name, spaces, pxw->volume);\n\tfprintf(fp, \"%s_offset%s:%d\\r\\n\", name, spaces, pxw->offset);\n}\n\nstatic void SaveComponentMachine(FILE *fp, stPXWave *pxw, char trailcomma)\n{\n\tfprintf(fp, \"%d,%.2f,%d,%d\", pxw->model_no, pxw->repeat, pxw->volume, pxw->offset);\n\tif (trailcomma) fprintf(fp, \",\");\n}\n\nstatic void SaveEnvVertice(FILE *fp, stPXEnvelope *env, int v)\n{\n\tfprintf(fp, \"%cx      :%d\\r\\n\", v+'a', env->time[v]);\n\tfprintf(fp, \"%cy      :%d\\r\\n\", v+'a', env->val[v]);\n}\n\n/*\n\thow to use it--it's pretty easy\n\t\n\tFirst you have to load (parse) the pxt file you want to play.\n\tYou can do this with pxt_load() which will read a pxt file and set up your stPXSound\n\tstructure with the proper values as spec'd in the file.\n\t\n\tThen you must synthesize or *render* the sound. First make sure the synthesizer\n\tis initilized by calling pxt_init & pxt_initsynth.\n\t\n\tSend your stPXSound through render_pxt. Now it includes 8-bit signed PCM audio\n\tin final_buffer.\n\t\n\tBut maybe you want it in a format SDL_mixer can play easier? No problem, call pxt_PrepareToPlay.\n\tGive it your sound and a *slot number* from 0-255 which is like a sound id as would be used in\n\ta game. You can free (pxt_freebuffers) that old 8-bit data now if you like and in fact entirely\n\tthrow away the stPXSound as it has nothing to do with pxt_Play. When you're ready to\n\tplay the sound give pxt_Play the slot number you picked and it will return to you the\n\tSDL_mixer channel number if successful.\n\t\n\tOh yeah, you can also load a whole directory full of pxt's, up to some max slot #,\n\tby using pxt_LoadSoundFX. This function also has the bonus that first, you don't have to\n\tdo any of the above stuff, it does it all for you and you can just call pxt_Play straight away.\n\tSecondly, you can give it a filename for a cache file and it will cache all the sounds after\n\tit builds them so that they load quicker next time.\n*/\n\n"
  },
  {
    "path": "sound/pxt.fdh",
    "content": "//hash:4162bd25\n//automatically generated by Makegen\n\n/* located in sound/sslib.cpp */\n\n//-------------------[referenced from sound/pxt.cpp]-----------------//\nvoid SSLockAudio(void);\nint SSPlayChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int));\nint SSEnqueueChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int));\nvoid SSUnlockAudio(void);\nvoid SSAbortChannel(int c);\n\n\n/* located in sound/pxt.cpp */\n\n//-------------------[referenced from sound/pxt.cpp]-----------------//\nstatic unsigned short rand_next(void);\nstatic void GenerateSineModel(unsigned char *table);\nstatic void GenerateTriangleModel(unsigned char *table);\nstatic void GenerateSawUpModel(unsigned char *table);\nstatic void GenerateSawDownModel(unsigned char *table);\nstatic void GenerateSquareModel(unsigned char *table);\nstatic void GenerateRandModel(unsigned char *table);\nvoid GenerateWhiteModel(void);\nstatic void GeneratePulseModel(unsigned char *table);\nchar pxt_init(void);\nchar pxt_initsynth(void);\nchar pxt_SetModel(stPXWave *pxwave, int m);\nvoid pxt_SetDefaultEnvelope(stPXEnvelope *env);\nvoid GenerateEnvelope(stPXEnvelope *env, char *buffer);\nvoid pxt_RenderPXWave(stPXWave *pxwave, signed char *buffer, int size_blocks);\nstatic void CreateAudio(stPXChannel *chan);\nstatic char AllocBuffers(stPXSound *snd);\nchar pxt_Render(stPXSound *snd);\nvoid pxt_PrepareToPlay(stPXSound *snd, int slot);\nvoid pxt_ChangePitch(stPXSound *snd, double factor);\nint pxt_Play(int chan, int slot, char loop);\nint pxt_PlayWithCallback(int chan, int slot, char loop, void (*FinishedCB)(int, int));\nstatic void pxtSoundDone(int chan, int slot);\nstatic void pxtLooper(int chan, int slot);\nvoid pxt_Stop(int slot);\nchar pxt_IsPlaying(int slot);\nchar pxt_LoadSoundFX(const char *path, const char *cache_name, int top);\nstatic char LoadFXCache(const char *fname, int top);\nvoid pxt_freeSoundFX(void);\nvoid pxt_FreeSound(int slot);\nvoid FreePXTBuf(stPXSound *snd);\nchar pxt_load(const char *fname, stPXSound *snd);\nstatic char LoadComponent(FILE *fp, stPXWave *pxw);\nstatic char ReadToBracket(FILE *fp);\nchar pxt_save(const char *fname, stPXSound *snd);\nvoid pxt_chunk_free();\nstatic void SaveComponent(FILE *fp, const char *name, stPXWave *pxw);\nstatic void SaveComponentMachine(FILE *fp, stPXWave *pxw, char trailcomma);\nstatic void SaveEnvVertice(FILE *fp, stPXEnvelope *env, int v);\n\n\n/* located in common/stat.cpp */\n\n//-------------------[referenced from sound/pxt.cpp]-----------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//-------------------[referenced from sound/pxt.cpp]-----------------//\nvoid seedrand(uint32_t newseed);\nint random(int min, int max);\nvoid fputl(unsigned int word, FILE *fp);\nvoid fputi(unsigned short word, FILE *fp);\nunsigned int fgetl(FILE *fp);\nunsigned int fgetl(FILE *fp, int *eof);\nunsigned short fgeti(FILE *fp);\nint fgeticsv(FILE *fp);\ndouble fgetfcsv(FILE *fp);\n\n"
  },
  {
    "path": "sound/pxt.h",
    "content": "\n#ifndef _PXT_H\n#define _PXT_H\n\n#include \"../common/basics.h\"\n\n#define PXT_NO_CHANNELS\t\t\t4\n\nenum\n{\n\tMOD_SINE,\n\tMOD_TRI,\n\tMOD_SAWUP,\n\tMOD_SAWDOWN,\n\tMOD_SQUARE,\n\tMOD_NOISE,\n\tMOD_WHITE,\n\tMOD_PULSE,\n\t\n\tPXT_NO_MODELS\n};\n\ntypedef struct\n{\n\tsigned char *model;\t\t// ptr to model data\n\tuchar model_no;\t\t\t// index of model data (0-5, which wave[] model points to)\n\t\n\tdouble phaseacc;\n\tdouble phaseinc;\n\tdouble repeat;\t\t\t// pixtone calls it \"freq\"\n\tuchar volume;\t\t\t// pixtone calls it \"top\"\n\tuchar offset;\n\t\n\tint white_ptr;\t\t\t// like \"phaseacc\" but for MOD_WHITE (the odd one out)\n} stPXWave;\n\n#define PXENV_NUM_VERTICES\t\t3\ntypedef struct\n{\n\tint initial;\n\t\n\tint time[PXENV_NUM_VERTICES];\n\tint val[PXENV_NUM_VERTICES];\n} stPXEnvelope;\n\ntypedef struct\n{\n\tint size_blocks;\n\tchar enabled;\n\t\n\tstPXWave main;\n\tstPXWave pitch;\n\tstPXWave pitch2;\n\tstPXWave volume;\n\tstPXEnvelope envelope;\n\t\n\tunsigned char envbuffer[256];\n\tsigned char *buffer;\n} stPXChannel;\n\ntypedef struct\n{\n\tstPXChannel chan[PXT_NO_CHANNELS];\n\t\n\tsigned char *final_buffer;\n\tint final_size;\n} stPXSound;\n\n#endif\n\n"
  },
  {
    "path": "sound/sound.cpp",
    "content": "/* SOUND.C\n  PXT/SS/Org sound interface\n*/\n\n#include <stdio.h>\n#include <string.h>\n\n#ifdef _SDL_MIXER\n#include <SDL_mixer.h>\n\nMix_Music *music_xm;\n#endif\n\n#include \"../nx.h\"\n#include \"../settings.h\"\n#include \"pxt.h\"\n#include \"sound.h\"\n#include \"sound.fdh\"\n\n#define MUSIC_OFF\t\t0\n#define MUSIC_ON\t\t1\n#define MUSIC_BOSS_ONLY\t2\nstatic int lastsong = 0;\t\t// this holds the previous song, for <RMU\nstatic int cursong = 0;\n\n// there are more than this around 9b; those are drums and are loaded by the org module\n#define NUM_SOUNDS\t\t0x75\n#define ORG_VOLUME\t\t75\n\nconst char *org_names[] =\n{\n    NULL,\n    \"egg\", \"safety\", \"gameover\", \"gravity\", \"grasstown\", \"meltdown2\", \"eyesofflame\",\n    \"gestation\", \"town\", \"fanfale1\", \"balrog\", \"cemetary\", \"plant\", \"pulse\", \"fanfale2\",\n    \"fanfale3\", \"tyrant\", \"run\", \"jenka1\", \"labyrinth\", \"access\", \"oppression\", \"geothermal\",\n    \"theme\", \"oside\", \"heroend\", \"scorching\", \"quiet\", \"lastcave\", \"balcony\", \"charge\",\n    \"lastbattle\", \"credits\", \"zombie\", \"breakdow+n\", \"hell\", \"jenka2\", \"waterway\", \"seal\",\n    \"toroko\", \"white\", \"azarashi\", NULL\n};\n\nstatic const char bossmusic[] = { 4, 7, 10, 11, 15, 16, 17, 18, 21, 22, 31, 33, 35, 0 };\n\nstatic const char *pxt_dir = \"./pxt/\";\n\n#ifndef _SDL_MIXER\nstatic const char *org_dir = \"./org/\";\n#else\nstatic const char *xm_dir = \"./xm/\";\n#endif\n\nstatic const char *sndcache = \"sndcache.pcm\";\nstatic const char *org_wavetable = \"wavetable.dat\";\n\nbool sound_init(void)\n{\n    if (SSInit()) return 1;\n    if (pxt_init()) return 1;\n    if (pxt_LoadSoundFX(pxt_dir, sndcache, NUM_SOUNDS)) return 1;\n\n    if (org_init(org_wavetable, pxt_dir, ORG_VOLUME))\n    {\n        staterr(\"Music failed to initialize\");\n        return 1;\n    }\n\n    return 0;\n}\n\nvoid sound_close(void)\n{\n    pxt_freeSoundFX();\n    SSClose();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid sound(int snd)\n{\n    if (!settings->sound_enabled)\n        return;\n\n    pxt_Stop(snd);\n    pxt_Play(-1, snd, 0);\n}\n\nvoid sound_loop(int snd)\n{\n    if (!settings->sound_enabled)\n        return;\n\n    pxt_Play(-1, snd, -1);\n}\n\nvoid sound_stop(int snd)\n{\n    pxt_Stop(snd);\n}\n\nbool sound_is_playing(int snd)\n{\n    return pxt_IsPlaying(snd);\n}\n\n\nvoid StartStreamSound(int freq)\n{\n    // pxt_ChangePitch(SND_STREAM1, some_formula);\n    // pxt_ChangePitch(SND_STREAM2, some_other_formula);\n    sound_loop(SND_STREAM1);\n    sound_loop(SND_STREAM2);\n}\n\nvoid StartPropSound(void)\n{\n    sound_loop(SND_PROPELLOR);\n}\n\nvoid StopLoopSounds(void)\n{\n    sound_stop(SND_STREAM1);\n    sound_stop(SND_STREAM2);\n    sound_stop(SND_PROPELLOR);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid music(int songno)\n{\n    if (songno == cursong)\n        return;\n\n    lastsong = cursong;\n    cursong = songno;\n\n    stat(\" >> music(%d)\", songno);\n\n    if (songno != 0 && !should_music_play(songno, settings->music_enabled))\n    {\n        stat(\"Not playing track %d because music_enabled is %d\", songno, settings->music_enabled);\n        org_stop();\n        return;\n    }\n\n    start_track(songno);\n}\n\n\nbool should_music_play(int songno, int musicmode)\n{\n\n    /* if (game.mode == GM_TITLE || game.mode == GM_CREDITS)\n        return true; */\n\n    switch(musicmode)\n    {\n    case MUSIC_OFF: return false;\n    case MUSIC_ON:  return true;\n    case MUSIC_BOSS_ONLY:\n        return music_is_boss(songno);\n    }\n\n    return false;\n}\n\nbool music_is_boss(int songno)\n{\n    if (strchr(bossmusic, songno))\n        return true;\n    else\n        return false;\n}\n\nvoid music_set_enabled(int newstate)\n{\n    if (newstate != settings->music_enabled)\n    {\n        stat(\"music_set_enabled(%d)\", newstate);\n\n        settings->music_enabled = newstate;\n        bool play = should_music_play(cursong, newstate);\n\n        if (play != org_is_playing())\n        {\n            if (play)\n                start_track(cursong);\n            else\n                org_stop();\n        }\n    }\n}\n\nstatic void start_track(int songno)\n{\n    char fname[MAXPATHLEN];\n\n    if (songno == 0)\n    {\n        org_stop();\n        return;\n    }\n\n#ifdef _SDL_MIXER\n    if (music_xm) {\n        music_free();\n    }\n\n    strcpy(fname, xm_dir);\n    strcat(fname, org_names[songno]);\n    strcat(fname, \".xm\");\n\n    if(music_xm=Mix_LoadMUS(fname)) {\n        stat(\"openning %s file\\n\", fname);\n    }\n\n    bool qLooped = (songno == 3 || songno == 10 || songno == 15 || songno == 16);\n\n    if(Mix_PlayMusic(music_xm, (qLooped) ? 0 : -1) == -1) {\n        staterr(\"Error in Mix_PlayMusic!\");\n    }\n\n    org_set_playing(true);\n\n#else\n    strcpy(fname, org_dir);\n    strcat(fname, org_names[songno]);\n    strcat(fname, \".org\");\n\n    if (!org_load(fname))\n    {\n        org_start(0);\n    }\n#endif\n}\n\n#ifdef _SDL_MIXER\nvoid music_free()\n{\n    Mix_FreeMusic(music_xm);\n#ifdef DEBUG\n    stat(\"Music is free!\");\n#endif\n}\n#endif\n\nint music_cursong()\t\t{ return cursong; }\nint music_lastsong() \t{ return lastsong; }\n\n\n"
  },
  {
    "path": "sound/sound.fdh",
    "content": "//hash:7c81ee46\n//automatically generated by Makegen\n\n/* located in sound/sound.cpp */\n\n//------------------[referenced from sound/sound.cpp]----------------//\nbool sound_init(void);\nvoid sound_close(void);\nvoid sound(int snd);\nvoid sound_loop(int snd);\nvoid sound_stop(int snd);\nbool sound_is_playing(int snd);\nvoid StartStreamSound(int freq);\nvoid StartPropSound(void);\nvoid StopLoopSounds(void);\nvoid music(int songno);\nbool should_music_play(int songno, int musicmode);\nbool music_is_boss(int songno);\nvoid music_set_enabled(int newstate);\nstatic void start_track(int songno);\nvoid music_free();\nint music_cursong();\nint music_lastsong();\n\n\n/* located in sound/sslib.cpp */\n\n//------------------[referenced from sound/sound.cpp]----------------//\nchar SSInit(void);\nvoid SSClose(void);\n\n\n/* located in sound/org.cpp */\n\n//------------------[referenced from sound/sound.cpp]----------------//\nint org_init(const char *wavetable_fname, const char *drum_pxt_dir, int org_volume);\nvoid org_stop(void);\nbool org_is_playing(void);\nvoid org_set_playing(bool);\nchar org_load(char *fname);\nbool org_start(int startbeat);\n\n\n/* located in sound/pxt.cpp */\n\n//------------------[referenced from sound/sound.cpp]----------------//\nchar pxt_init(void);\nchar pxt_LoadSoundFX(const char *path, const char *cache_name, int top);\nvoid pxt_freeSoundFX(void);\nvoid pxt_Stop(int slot);\nint pxt_Play(int chan, int slot, char loop);\nchar pxt_IsPlaying(int slot);\nvoid pxt_chunk_free();\n\n/* located in common/stat.cpp */\n\n//------------------[referenced from sound/sound.cpp]----------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "sound/sound.h",
    "content": "//automatically generated by SoundList.vbp\n\n#define SND_MENU_MOVE\t\t1\n#define SND_MSG\t\t2\n#define SND_BONK_HEAD\t\t3\n#define SND_SWITCH_WEAPON\t\t4\n#define SND_MENU_PROMPT\t\t5\n#define SND_HOPPY_JUMP\t\t6\n#define SND_DOOR\t\t11\n#define SND_BLOCK_DESTROY\t\t12\n#define SND_GET_XP\t\t14\n#define SND_PLAYER_JUMP\t\t15\n#define SND_PLAYER_HURT\t\t16\n#define SND_PLAYER_DIE\t\t17\n#define SND_MENU_SELECT\t\t18\n#define SND_HEALTH_REFILL\t\t20\n#define SND_BUBBLE\t\t21\n#define SND_CHEST_OPEN\t\t22\n#define SND_THUD\t\t23\n#define SND_PLAYER_WALK\t\t24\n#define SND_FUNNY_EXPLODE\t\t25\n#define SND_QUAKE\t\t26\n#define SND_LEVEL_UP\t\t27\n#define SND_SHOT_HIT\t\t28\n#define SND_TELEPORT\t\t29\n#define SND_ENEMY_JUMP\t\t30\n#define SND_TINK\t\t\t31\n#define SND_POLAR_STAR_L1_2\t\t32\n#define SND_SNAKE_FIRE\t\t33\n#define SND_FIREBALL\t\t34\n#define SND_EXPLOSION1\t\t35\n#define SND_GUN_CLICK\t\t37\n#define SND_GET_ITEM\t\t38\n#define SND_EM_FIRE\t\t39\n#define SND_STREAM1\t\t40\n#define SND_STREAM2\t\t41\n#define SND_GET_MISSILE\t\t42\n#define SND_COMPUTER_BEEP\t\t43\n#define SND_MISSILE_HIT\t\t44\n#define SND_XP_BOUNCE\t\t45\n#define SND_IRONH_SHOT_FLY\t\t46\n#define SND_EXPLOSION2\t\t47\n#define SND_BUBBLER_FIRE\t\t48\n#define SND_POLAR_STAR_L3\t\t49\n#define SND_ENEMY_SQUEAK\t\t50\n#define SND_ENEMY_HURT\t\t51\n#define SND_ENEMY_HURT_BIG\t\t52\n#define SND_ENEMY_HURT_SMALL\t\t53\n#define SND_ENEMY_HURT_COOL\t\t54\n#define SND_ENEMY_SQUEAK2\t\t55\n#define SND_SPLASH\t\t56\n#define SND_ENEMY_DAMAGE\t\t57\n#define SND_PROPELLOR\t\t58\n#define SND_SPUR_CHARGE_1\t\t59\n#define SND_SPUR_CHARGE_2\t\t60\n#define SND_SPUR_CHARGE_3\t\t61\n#define SND_SPUR_FIRE_1\t\t\t62\n#define SND_SPUR_FIRE_2\t\t\t63\n#define SND_SPUR_FIRE_3\t\t\t64\n#define SND_SPUR_MAXED\t\t\t65\n#define SND_EXPL_SMALL\t\t70\n#define SND_LITTLE_CRASH\t\t71\n#define SND_BIG_CRASH\t\t72\n#define SND_BUBBLER_LAUNCH\t\t100\n#define SND_LIGHTNING_STRIKE\t\t101\n#define SND_JAWS\t\t102\n#define SND_CHARGE_GUN\t\t103\n#define SND_104\t\t104\n#define SND_PUPPY_BARK\t\t105\n#define SND_SLASH\t\t106\n#define SND_BLOCK_MOVE\t\t107\n#define SND_IGOR_JUMP\t\t108\n#define SND_CRITTER_FLY\t\t109\n#define SND_DROLL_SHOT_FLY\t\t110\n#define SND_MOTOR_RUN\t\t111\n#define SND_MOTOR_SKIP\t\t112\n#define SND_BOOSTER\t\t\t113\n#define SND_CORE_HURT\t\t114\n#define SND_CORE_THRUST\t\t115\n#define SND_CORE_CHARGE\t\t116\n#define SND_NEMESIS_FIRE\t117\n#define SND_150\t\t150\n#define SND_151\t\t151\n#define SND_152\t\t152\n#define SND_153\t\t153\n#define SND_154\t\t154\n#define SND_155\t\t155\n\n\n"
  },
  {
    "path": "sound/sslib.cpp",
    "content": "\n// Sound System\n// more or less, my own version of SDL_mixer\n\n#include <SDL/SDL.h>\n\n#ifdef _SDL_MIXER\n#include <SDL/SDL_mixer.h>\n#endif\n\n#include <stdio.h>\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n#include \"../common/basics.h\"\n\n#include \"sslib.h\"\n#include \"sslib.fdh\"\n#include \"sound.fdh\"\n\nstatic SSChannel channel[SS_NUM_CHANNELS];\n\nuint8_t *mixbuffer = NULL;\nint mix_pos;\n\nint lockcount = 0;\n\n\nchar SSInit(void)\n{\n    SDL_AudioSpec fmt, obtained;\n\n\t// Set 16-bit stereo audio at 22Khz\n\tfmt.freq = SAMPLE_RATE;\n    fmt.format = AUDIO_S16;\n    fmt.channels = 2;\n    fmt.samples = 512;\n\tfmt.callback = mixaudio;\n\tfmt.userdata = NULL;\n\t\n\t// Open the audio device and start playing sound!\n#ifdef _SDL_MIXER\n    if (Mix_OpenAudio(fmt.freq, fmt.format, fmt.channels, fmt.samples)) {\n        staterr(\"SS: Unable to open audio: %s\", SDL_GetError());\n        return 1;\n    }\n#else\n    if (SDL_OpenAudio(&fmt, &obtained) < 0)\n\t{\n\t\tstaterr(\"SS: Unable to open audio: %s\", SDL_GetError());\n\t\treturn 1;\n    }\n\t\n    if (obtained.format != fmt.format || \\\n\t\tobtained.channels != fmt.channels)\n\t{\n\t\tstaterr(\"SS: Failed to obtain the audio format I wanted\");\n\t\treturn 1;\n    }\n#endif\n\t\n\tmixbuffer = (uint8_t *)malloc(obtained.samples * obtained.channels * 2);\n\t\n\t// zero everything in all channels\n\tmemset(channel, 0, sizeof(channel));\n\tfor(int i=0;i<SS_NUM_CHANNELS;i++)\n\t\tchannel[i].volume = SDL_MIX_MAXVOLUME;\n\t\n\tstat(\"sslib: initilization was successful.\");\n\t\n\tlockcount = 0;\n#ifdef _SDL_MIXER\n    Mix_Pause(-1);\n#else\n    SDL_PauseAudio(0);\n#endif\n\treturn 0;\n}\n\nvoid SSClose(void)\n{\n#ifdef _SDL_MIXER\n    pxt_chunk_free();\n    music_free();\n    Mix_CloseAudio();\n#else\n    SDL_CloseAudio();\n#endif\n\tif (mixbuffer) free(mixbuffer);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// reserves a channel so that it will not be returned by SSFindFreeChannel and no\n// sounds will be allocated to it by SSEnqueueChunk with a -1 parameter.\n// thus, the channel can only be played on by explicitly playing a sound to it.\nvoid SSReserveChannel(int c)\n{\n\tchannel[c].reserved = 1;\n}\n\n// returns the first available channel that is not playing a sound.\n// if all chans are full, returns -1.\nint SSFindFreeChannel(void)\n{\nint i;\n\tfor(i=0;i<SS_NUM_CHANNELS;i++)\n\t{\n\t\tif (channel[i].head==channel[i].tail && !channel[i].reserved) return i;\n\t}\n\treturn -1;\n}\n\n// enqueue a chunk of sound to a channel.\n// c:\t\t\tchannel to play on, or pass -1 to automatically find a free one\n// buffer:\t\t16-bit S16 22050Hz audio data to play\n// len:\t\t\tbuffer length in stereo samples. len=1 means 4 bytes: *2 for 16-bit, and *2 for stereo.\n// userdata:\ta bit of application-defined data to associate with the chunk,\n// \t\t\t\tsuch as a game sound ID. this value will be passed to the FinishedCallback()\n//\t\t\t\twhen the chunk completes.\n// FinishedCB:\tan optional callback function to call when the chunk stops playing.\n//\n// returns:\t\tthe channel sound was started on, or -1 if failure.\nint SSEnqueueChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int))\n{\nSSChannel *chan;\nSSChunk *chunk;\n\n\tif (c >= SS_NUM_CHANNELS)\n\t{\n\t\tstaterr(\"SSEnqueueChunk: channel %d is higher than SS_NUM_CHANNELS\", c);\n\t\treturn -1;\n\t}\n\t\n\tSSLockAudio();\n\t\n\tif (c < 0) c = SSFindFreeChannel();\n\tif (c==-1)\n\t{\n\t\tstaterr(\"SSEnqueueChunk: no available sound channels!\");\n\t\tSSUnlockAudio();\n\t\treturn -1;\n\t}\n\t\n\tchan = &channel[c];\n\t\n\tchan->FinishedCB = FinishedCB;\n\t\n\tchunk = &chan->chunks[chan->tail];\n\tchunk->buffer = buffer;\n\tchunk->length = len;\t\t\t\t\t\t\t// in 16-bit stereo samples\n\tchunk->userdata = userdata;\n\t\n\tchunk->bytebuffer = (signed char *)buffer;\n\tchunk->bytelength = chunk->length * 2 * 2;\t\t// in bytes\n\t\n\tchunk->bytepos = 0;\n\t\n\t// advance tail pointer\n\tif (++chan->tail >= MAX_QUEUED_CHUNKS) chan->tail = 0;\n\t\n\tif (chan->tail==chan->head)\n\t{\n\t\tstaterr(\"SS: overqueued channel %d; Bad Things about to happen\", c);\n\t\tSSUnlockAudio();\n\t\treturn -1;\n\t}\n\tSSUnlockAudio();\n\t\n\t//stat(\"SSEnqueued buffer %d: %08x of %d bytes to channel %d (containing %d samples); UD %d\", loc, buffer, chunk->bytelength, c, len, chunk->userdata);\n    return c;\n}\n\n// works like SSEnqueueChunk, only it does not enqueue. Instead, if a sound\n// is already playing on the channel, it is stopped and the new sound takes it's place.\n// if c==-1, it acts identically to SSEnqueueChunk since a \"free channel\" by definition\n// has no existing sound to be affected by a queueing operation.\nint SSPlayChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int))\n{\n\tif (c != -1) SSAbortChannel(c);\n\t\n\treturn SSEnqueueChunk(c, buffer, len, userdata, FinishedCB);\n}\n\n// returns true if channel c is currently playing\nchar SSChannelPlaying(int c)\n{\nint result;\n\n\tSSLockAudio();\n\tresult = (channel[c].head != channel[c].tail);\n\tSSUnlockAudio();\n\t\n\treturn result;\n}\n\n// returns the userdata member of the currently playing chunk on channel c.\n// if channel c is not playing, the results are undefined.\nint SSGetCurUserData(int c)\n{\nint result;\n\n\tSSLockAudio();\n\t\n\tif (channel[c].head != channel[c].tail)\n\t{\n\t\tresult = (channel[c].chunks[channel[c].head].userdata);\n\t}\n\telse\n\t{\n\t\tstaterr(\"SSGetUserData: channel %d is not playing!\\n\", c);\n\t\tresult = -1;\n\t}\n\t\n\tSSUnlockAudio();\n\treturn result;\n}\n\n// returns the currently playing sample within the currently playing chunk\n// of channel c. If no chunk is playing, the results are undefined.\n// as with \"len\" parameter to SSEnqueueChunk, the count counts the two\n// components of a stereo sample as a single sample.\nint SSGetSamplePos(int c)\n{\nint result;\n\n\tSSLockAudio();\n\t\n\tif (channel[c].head != channel[c].tail)\n\t{\n\t\tresult = (channel[c].chunks[channel[c].head].bytepos / 4);\n\t}\n\telse\n\t{\n\t\tstaterr(\"SSGetSamplePos: channel %d is not playing!\", c);\n\t\tresult = -1;\n\t}\n\t\n\tSSUnlockAudio();\n\treturn result;\n}\n\n\n// if a sound is playing on channel c, stops it immediately.\n// if not, does nothing.\nvoid SSAbortChannel(int c)\n{\n\tSSLockAudio();\n\t\n\t/*if (c >= 0 && c < SS_NUM_CHANNELS)\n\t{\n\t\twhile(channel[c].head != channel[c].tail)\n\t\t{\n\t\t\tif (channel[c].FinishedCB)\n\t\t\t\t(*channel[c].FinishedCB)(c, channel[c].chunks[channel[c].head].userdata);\n\t\t\t\n\t\t\tif (++channel[c].head >= MAX_QUEUED_CHUNKS)\n\t\t\t\tchannel[c].head = 0;\n\t\t}\n\t}*/\n\tchannel[c].head = channel[c].tail;\n\t\n\tSSUnlockAudio();\n}\n\n\n// aborts all sounds with a userdata value matching \"ud\".\nvoid SSAbortChannelByUserData(int ud)\n{\nint c;\n\tSSLockAudio();\n\tfor(c=0;c<SS_NUM_CHANNELS;c++)\n\t{\n\t\tif (SSChannelPlaying(c) && SSGetCurUserData(c)==ud)\n\t\t\tSSAbortChannel(c);\n\t}\n\tSSUnlockAudio();\n}\n\n// changes the volume of a channel.\n// any currently playing chunks are immediately affected, and any future chunks queued\n// will have the new volume setting, until the SSSetVolume function is removed.\nvoid SSSetVolume(int c, int newvol)\n{\n\tSSLockAudio();\n\tchannel[c].volume = newvol;\n\tSSUnlockAudio();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// the effects of SSLockAudio are cumulative--calling it more than once will lock\n// the audio \"more\", and you have to call it the same numbers of times before it will unlock.\nvoid SSLockAudio(void)\n{\n#ifndef _SDL_MIXER\n    if (lockcount==0) SDL_LockAudio();\n#endif\n\tlockcount++;\n}\n\nvoid SSUnlockAudio(void)\n{\n    lockcount--;\n#ifndef _SDL_MIXER\n    if (!lockcount) SDL_UnlockAudio();\n#endif\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// add the contents of the chunk at head to the mix_buffer.\n// don't add more than bytes.\n// return the number of bytes that were added.\nstatic int AddBuffer(SSChannel *chan, int bytes)\n{\n\tSSChunk *chunk = &chan->chunks[chan->head];\n\t\n\tif (bytes > chunk->bytelength)\n\t{\n\t\tbytes = chunk->bytelength;\n\t}\n\t\n\t// don't copy past end of chunk\n\tif (chunk->bytepos+bytes > chunk->bytelength)\n\t{\n\t\t// add it to list of finished chunks\n\t\tchan->FinishedChunkUserdata[chan->nFinishedChunks++] = chunk->userdata;\n\t\t\n\t\t// only add what's left. and advance the head pointer to the next chunk.\n\t\tbytes = chunk->bytelength - chunk->bytepos;\n\t\tif (++chan->head >= MAX_QUEUED_CHUNKS) chan->head = 0;\n\t\t\n\t\t//stat(\"AddBuffer: reached end of chunk %d; new head is %d, and tail is %d\", c, chan->head, chan->tail);\n\t}\n\t\n//\tstat(\"%d: Channel %d: Copying %d bytes from chunk %d @ %08x -- pos=%d, len=%d\", SDL_GetTicks(), cnn, bytes, c, chunk->bytebuffer, chunk->bytepos, chunk->bytelength);\n\tmemcpy(&mixbuffer[mix_pos], &chunk->bytebuffer[chunk->bytepos], bytes);\n\tmix_pos += bytes;\n\tchunk->bytepos += bytes;\n\t\n\treturn bytes;\n}\n\n\nstatic void mixaudio(void *unused, uint8_t *stream, int len)\n{\nint bytes_copied;\nint bytestogo;\nint c;\nint i;\n\n\t// get data for all channels and add it to the mix\n\tfor(c=0;c<SS_NUM_CHANNELS;c++)\n\t{\n\t\tif (channel[c].head==channel[c].tail) continue;\n\t\t\n\t\tbytestogo = len;\n\t\tmix_pos = 0;\n\t\twhile(bytestogo > 0)\n\t\t{\n\t\t\tbytes_copied = AddBuffer(&channel[c], bytestogo);\n\t\t\tbytestogo -= bytes_copied;\n\t\t\t\n\t\t\tif (channel[c].head==channel[c].tail)\n\t\t\t{\t\t// ran out of chunks before buffer full\n\t\t\t\t// clear remaining portion of mixbuffer\n\t\t\t\tif (bytestogo)\n\t\t\t\t{\n\t\t\t\t\tmemset(&mixbuffer[mix_pos], 0, bytestogo);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSDL_MixAudio(stream, mixbuffer, len, channel[c].volume);\n\t}\n\t\n\t// tell any callbacks that had a chunk finish, that their chunk finished\n\tfor(c=0;c<SS_NUM_CHANNELS;c++)\n\t{\n\t\tif (channel[c].FinishedCB)\n\t\t{\n\t\t\tfor(i=0;i<channel[c].nFinishedChunks;i++)\n\t\t\t{\n\t\t\t\t//stat(\"Telling channel %d's handler that chunk %d finished\", c, channel[c].FinishedChunkUserdata[i]);\n\t\t\t\t(*channel[c].FinishedCB)(c, channel[c].FinishedChunkUserdata[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tchannel[c].nFinishedChunks = 0;\n\t}\n}\n"
  },
  {
    "path": "sound/sslib.fdh",
    "content": "//hash:56e7dcf5\n//automatically generated by Makegen\n\n/* located in sound/sslib.cpp */\n\n//------------------[referenced from sound/sslib.cpp]----------------//\nchar SSInit(void);\nvoid SSClose(void);\nvoid SSReserveChannel(int c);\nint SSFindFreeChannel(void);\nint SSEnqueueChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int));\nint SSPlayChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int));\nchar SSChannelPlaying(int c);\nint SSGetCurUserData(int c);\nint SSGetSamplePos(int c);\nvoid SSAbortChannel(int c);\nvoid SSAbortChannelByUserData(int ud);\nvoid SSSetVolume(int c, int newvol);\nvoid SSLockAudio(void);\nvoid SSUnlockAudio(void);\nstatic int AddBuffer(SSChannel *chan, int bytes);\nstatic void mixaudio(void *unused, uint8_t *stream, int len);\n\n\n/* located in common/stat.cpp */\n\n//------------------[referenced from sound/sslib.cpp]----------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n"
  },
  {
    "path": "sound/sslib.h",
    "content": "\n#ifndef _SSLIB_H\n#define _SSLIB_H\n\n#define SAMPLE_RATE\t\t\t22050\n#define MAX_QUEUED_CHUNKS\t\t(180 +1)\n#define SS_NUM_CHANNELS\t\t\t16\n\nstruct SSChunk\n{\n\tsigned short *buffer;\n\tint length;\n\t\n\tsigned char *bytebuffer;\t\t\t// same as bytebuffer but in BYTES\n\tint bytelength;\t\t\t\t\t\t// TOTAL length in BYTES\n\t\n\t// current read position. this is within bytebuffer and is in BYTES.\n\tint bytepos;\n\t\n\tint userdata;\t\t\t\t\t\t// user data to be sent to FinishedCallback when finished\n};\n\n\nstruct SSChannel\n{\n\tSSChunk chunks[MAX_QUEUED_CHUNKS];\n\tint head, tail;\n\t\n\tint volume;\n\tchar reserved;\t\t\t\t\t\t// if 1, can only be played on explicitly, not by passing -1\n\t\n\tint FinishedChunkUserdata[MAX_QUEUED_CHUNKS];\n\tint nFinishedChunks;\n\t\n\tvoid (*FinishedCB)(int channel, int chunkid);\n};\n\n#endif\n"
  },
  {
    "path": "stageboss.cpp",
    "content": "\n#include \"nx.h\"\n#include \"stageboss.fdh\"\n\n#include \"ai/boss/omega.h\"\n#include \"ai/boss/balfrog.h\"\n#include \"ai/boss/x.h\"\n#include \"ai/boss/core.h\"\n#include \"ai/boss/ironhead.h\"\n#include \"ai/boss/sisters.h\"\n#include \"ai/boss/undead_core.h\"\n#include \"ai/boss/heavypress.h\"\n#include \"ai/boss/ballos.h\"\n\n\nStageBossManager::StageBossManager()\n{\n\tfBoss = NULL;\n\tfBossType = BOSS_NONE;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool StageBossManager::SetType(int newtype)\n{\n\tstat(\"StageBossManager::SetType(%d)\", newtype);\n\t\n\tif (fBoss)\n\t{\n\t\tdelete fBoss;\n\t\tif (game.stageboss.object)\n\t\t{\n\t\t\tstaterr(\" ** warning: game.stageboss.object not properly cleaned up in OnMapExit\");\n\t\t\tgame.stageboss.object->Delete();\n\t\t\tgame.stageboss.object = NULL;\n\t\t}\n\t}\n\t\n\tfBossType = newtype;\n\tfBoss = NULL;\n\t\n\tswitch(newtype)\n\t{\n\t\tcase BOSS_NONE: break;\n\t\t\n\t\tcase BOSS_OMEGA: fBoss = new OmegaBoss; break;\n\t\tcase BOSS_BALFROG: fBoss = new BalfrogBoss; break;\n\t\tcase BOSS_MONSTER_X: fBoss = new XBoss; break;\n\t\tcase BOSS_CORE: fBoss = new CoreBoss; break;\n\t\tcase BOSS_IRONH: fBoss = new IronheadBoss; break;\n\t\tcase BOSS_SISTERS: fBoss = new SistersBoss; break;\n\t\tcase BOSS_UNDEAD_CORE: fBoss = new UDCoreBoss; break;\n\t\tcase BOSS_HEAVY_PRESS: fBoss = new HeavyPress; break;\n\t\tcase BOSS_BALLOS: fBoss = new BallosBoss; break;\n\t\t\n\t\tdefault:\n\t\t\tstaterr(\"StageBossManager::SetType: unhandled boss type %d\", newtype);\n\t\t\tfBossType = BOSS_NONE;\n\t\t\treturn 1;\n\t}\n\t\n\treturn 0;\n}\n\nint StageBossManager::Type()\n{\n\treturn fBossType;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid StageBossManager::OnMapEntry()\n{\n\tif (fBoss) fBoss->OnMapEntry();\n}\n\nvoid StageBossManager::OnMapExit()\n{\n\tif (fBoss) fBoss->OnMapExit();\n}\n\nvoid StageBossManager::Run()\n{\n\tif (fBoss) fBoss->Run();\n}\n\nvoid StageBossManager::RunAftermove()\n{\n\tif (fBoss) fBoss->RunAftermove();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid StageBossManager::SetState(int newstate)\n{\n\tif (fBoss)\n\t{\n\t\tfBoss->SetState(newstate);\n\t}\n\telse\n\t{\n\t\tstaterr(\"StageBossManager::SetState(%d): no stageboss object in existance!\", newstate);\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// these are default implementation, bosses can override them if they want to.\n\nvoid StageBoss::SetState(int newstate)\n{\n\tif (game.stageboss.object)\n\t{\n\t\tgame.stageboss.object->state = newstate;\n\t}\n\telse\n\t{\n\t\tstaterr(\"StageBoss::SetState(%d): no stageboss object!\", newstate);\n\t}\n}\n\n"
  },
  {
    "path": "stageboss.fdh",
    "content": "//hash:0fd34063\n//automatically generated by Makegen\n\n/* located in common/stat.cpp */\n\n//-------------------[referenced from stageboss.cpp]-----------------//\nvoid stat(const char *fmt, ...);\nvoid staterr(const char *fmt, ...);\n\n"
  },
  {
    "path": "stageboss.h",
    "content": "\n#ifndef _STAGEBOSS_H\n#define _STAGEBOSS_H\n\n// Stage Bosses are \"big\" boss enemies used in some stages.\n//\n// The stage boss class runs at a conceptual level \"above\"\n// normal AI routines, more like at the level of the game loop.\n//\n// This gives these complex bosses a good way to control more\n// things than just a single object (some bosses for example have\n// multiple parts which need to be coordinated, such as Omega).\n//\n// A pointer to the \"main\" object of a stage boss is stored by\n// the derived class at game.stageboss.object.\n//\n// The script command <BSL0000 refers to opening a boss bar\n// against game.stageboss.object.\n\nenum BossType\n{\n\tBOSS_NONE\t= 0x00,\n\t\n\tBOSS_OMEGA,\n\tBOSS_BALFROG,\n\tBOSS_MONSTER_X,\n\tBOSS_CORE,\n\tBOSS_IRONH,\n\tBOSS_SISTERS,\n\tBOSS_UNDEAD_CORE,\n\tBOSS_HEAVY_PRESS,\n\tBOSS_BALLOS\n};\n\n\nclass StageBoss\n{\npublic:\n\tvirtual void OnMapEntry() { }\n\tvirtual void OnMapExit() { }\n\t\n\t// called every tick (for logic only, please don't draw from here)\n\tvirtual void Run() { }\n\tvirtual void RunAftermove() { }\n\t\n\tvirtual void SetState(int newstate);\n};\n\n\nclass StageBossManager\n{\npublic:\n\tStageBossManager();\n\t\n\tbool SetType(int newtype);\n\tint Type();\n\t\n\t// safe interface to the current StageBoss instance\n\t// (they safely do nothing if called in a stage without a stage boss)\n\tvoid OnMapEntry();\n\tvoid OnMapExit();\n\tvoid Run();\n\tvoid RunAftermove();\n\t\n\tvoid SetState(int newstate);\n\t\n\t// pointer to the \"main object\" of a stage boss\n\t// (the one to show the boss bar for)\n\t// this is set by the derived class, and is cleared in OnMapExit\n\t// of the derived class and on a SetType().\n\tObject *object;\n\t\nprivate:\n\tStageBoss *fBoss;\n\tint fBossType;\n};\n\n\n\n\n#endif\n"
  },
  {
    "path": "stagedata.cpp",
    "content": "\n#include <stdio.h>\n#include <stdint.h>\n#include \"stagedata.h\"\n\nconst char *backdrop_names[] = {\n\t\"bk0\",\n\t\"bkBlue\",\n\t\"bkGreen\",\n\t\"bkBlack\",\n\t\"bkGard\",\n\t\"bkMaze\",\n\t\"bkGray\",\n\t\"bkRed\",\n    \"bkWater\",\n    \"bkMoon\",\n    \"bkFog\",\n    \"bkFall\",\n\tNULL\n};\n\nconst char *tileset_names[] = {\n\t\"0\",\n\t\"Pens\",\n\t\"Eggs\",\n\t\"EggX\",\n\t\"EggIn\",\n\t\"Store\",\n\t\"Weed\",\n\t\"Barr\",\n\t\"Maze\",\n\t\"Sand\",\n\t\"Mimi\",\n\t\"Cave\",\n\t\"River\",\n\t\"Gard\",\n\t\"Almond\",\n\t\"Oside\",\n\t\"Cent\",\n\t\"Jail\",\n\t\"White\",\n\t\"Fall\",\n\t\"Hell\",\n\t\"Labo\",\n\tNULL\n};\n\n"
  },
  {
    "path": "stagedata.fdh",
    "content": "//hash:00000000\n//automatically generated by Makegen\n"
  },
  {
    "path": "stagedata.h",
    "content": "\n#ifndef _STAGEDATA_H\n#define _STAGEDATA_H\n\n//#define NMAPS\t 120\n//extern MapRecord stages[NMAPS];\n\n#define NUM_BACKDROPS\t\t12\n#define NUM_TILESETS\t\t22\n\nextern const char *backdrop_names[];\nextern const char *tileset_names[];\n\n\n#define NPCSET_GUEST\t\t 0\n#define NPCSET_0\t\t 1\n#define NPCSET_EGGS1\t\t 2\n#define NPCSET_RAVIL\t\t 3\n#define NPCSET_WEED\t\t 4\n#define NPCSET_MAZE\t\t 5\n#define NPCSET_SAND\t\t 6\n#define NPCSET_OMG\t\t 7\n#define NPCSET_CEMET\t\t 8\n#define NPCSET_BLLG\t\t 9\n#define NPCSET_PLANT\t\t 10\n#define NPCSET_FROG\t\t 11\n#define NPCSET_CURLY\t\t 12\n#define NPCSET_STREAM\t\t 13\n#define NPCSET_IRONH\t\t 14\n#define NPCSET_TORO\t\t 15\n#define NPCSET_X\t\t 16\n#define NPCSET_DARK\t\t 17\n#define NPCSET_ALMO1\t\t 18\n#define NPCSET_EGGS2\t\t 19\n#define NPCSET_TWIND\t\t 20\n#define NPCSET_MOON\t\t 21\n#define NPCSET_CENT\t\t 22\n#define NPCSET_HERI\t\t 23\n#define NPCSET_RED\t\t 24\n#define NPCSET_MIZA\t\t 25\n#define NPCSET_DR\t\t 26\n#define NPCSET_ALMO2\t\t 27\n#define NPCSET_KINGS\t\t 28\n#define NPCSET_HELL\t\t 29\n#define NPCSET_PRESS\t\t 30\n#define NPCSET_PRIEST\t\t 31\n#define NPCSET_BALLOS\t\t 32\n#define NPCSET_ISLAND\t\t 33\n\n#endif\n\n"
  },
  {
    "path": "statusbar.cpp",
    "content": "\n#include \"nx.h\"\n#include \"statusbar.h\"\n#include \"statusbar.fdh\"\n\n#ifdef WIDESCREEN\n\t#define STATUS_X\t10\n\t#define STATUS_Y\t10\n#else\n\t#define STATUS_X\t16\n\t#define STATUS_Y\t16\n#endif\n\n#define HEALTH_X\t\t\t(STATUS_X+0)\n#define HEALTH_Y\t\t\t(STATUS_Y+24)\n#define HEALTHFILL_X\t\t(HEALTH_X+24)\n#define HEALTHFILL_Y\t\t(HEALTH_Y+1)\n#define HEALTHFILL_MAXLEN\t39\n\n#define WEAPONBAR_Y\t\t\t(STATUS_Y+1)\n#define CURWEAPON_X\t\t\t(STATUS_X+1)\n\n#define XPBAR_Y\t\t\t\t(STATUS_Y+16)\t\t// Y coordinate of \"XP\" area\n#define XPBAR_X\t\t\t\t(STATUS_X+24)\t\t// X of yellow XP bar\n\n#define AMMO_X\t\t\t\t(STATUS_X+32)\n#define AMMO_Y\t\t\t\t(STATUS_Y+0)\n\n#define NIKU_X\t\t\t\tSTATUS_X\n#define NIKU_Y\t\t\t\t8\n\n#define FRAME_XP_BAR\t\t0\t\t\t// empty bar frame\n#define FRAME_XP_FILL\t\t1\t\t\t// sprite to fill bar with\n#define FRAME_XP_FLASH\t\t2\t\t\t// white flashing when XP is gained\n#define FRAME_XP_MAX\t\t3\t\t\t// \"MAX\" when XP is at max on L3\n\n//int displayed_health = 0;\n//int healthdectimer = 0;\nStatusBar statusbar;\nstatic PercentBar PHealthBar;\n\n// the \"slide\" effect when changing weapons\nstruct stWeaponSlide\n{\n\tint lv_offset;\t\t\t\t\t// offset of XP bar\n\tint wpn_offset;\t\t\t\t\t// offset of weapon bar\n\tint ammo_offset;\t\t\t\t// offset of ammo, in addition to wpn_offset\n\tchar timer;\n\tint move_dir;\n\tint firstWeapon;\t\t\t\t// weapon to show as current weapon\n} slide;\n#define SLIDE_LV_OFFSET\t\t\t16\n#define SLIDE_TIMER_START\t\t5\n\n\nbool statusbar_init(void)\n{\n\tInitPercentBar(&PHealthBar, player->hp);\n\t\n\tmemset(&slide, 0, sizeof(slide));\n\tslide.firstWeapon = player->curWeapon;\n\treturn 0;\n}\n\n\nvoid DrawStatusBar(void)\n{\nint level, curxp, maxxp;\nint w, x;\nbool maxed_out;\n\n\t//debug(\"%08x\", game.bossbar.object);\n\t//debug(\"%s\", game.bossbar.defeated ? \"true\" : \"false\");\n\t\n\t// handle animations etc\n\tRunStatusBar();\n\t\n\t// draw boss bar\n\tif (game.bossbar.object && !game.bossbar.defeated)\n\t{\n\t\t#define BOSSBAR_W\t198\n\t\t// BOSS_X = 32 at normal resolution\n\t\t#define BOSS_X\t\t((SCREEN_WIDTH / 2) - (BOSSBAR_W / 2) - 29)\n\t\t#define BOSS_Y\t\t(SCREEN_HEIGHT-20)\n\t\tdraw_sprite(BOSS_X, BOSS_Y, SPR_TEXTBOX, 0, 0);\n\t\tdraw_sprite(BOSS_X, BOSS_Y+8, SPR_TEXTBOX, 2, 0);\n\t\tdraw_sprite(BOSS_X+8, BOSS_Y+4, SPR_BOSSHPICON, 0, 0);\n\t\t\n\t\t// e.g. bosses w/ multiple forms (Ballos)\n\t\tif (game.bossbar.object->hp > game.bossbar.starting_hp)\n\t\t\tgame.bossbar.starting_hp = game.bossbar.object->hp;\n\t\t\n\t\tRunPercentBar(&game.bossbar.bar, game.bossbar.object->hp);\n\t\tDrawPercentBar(&game.bossbar.bar, BOSS_X+40, BOSS_Y+5, game.bossbar.object->hp, game.bossbar.starting_hp, BOSSBAR_W);\n\t}\n\t\n\tif (game.frozen || player->inputs_locked) return;\n\tif (fade.getstate() != FS_NO_FADE) return;\n\t\n\tif (player->hp)\n\t{\n\t\tif (!player->hurt_flash_state)\n\t\t{\n\t\t\tif (!game.debug.god)\n\t\t\t{\n\t\t\t\t// -- draw the health bar -----------------------------\n\t\t\t\tdraw_sprite(HEALTH_X, HEALTH_Y, SPR_HEALTHBAR, 0, 0);\n\t\t\t\t\n\t\t\t\tDrawPercentBar(&PHealthBar, HEALTHFILL_X, HEALTHFILL_Y, player->hp, player->maxHealth, HEALTHFILL_MAXLEN);\n\t\t\t\t\n\t\t\t\t// draw the health in numbers\n\t\t\t\tDrawNumberRAlign(HEALTH_X+24, HEALTH_Y, SPR_WHITENUMBERS, PHealthBar.displayed_value);\n\t\t\t}\n\t\t\t\n\t\t\t// -- draw the XP bar ---------------------------------\n\t\t\tlevel = player->weapons[player->curWeapon].level;\n\t\t\tcurxp = player->weapons[player->curWeapon].xp;\n\t\t\tmaxxp = player->weapons[player->curWeapon].max_xp[level];\n\t\t\t\n\t\t\tif (player->curWeapon == WPN_NONE)\n\t\t\t{\n\t\t\t\tcurxp = 0;\n\t\t\t\tmaxxp = 1;\n\t\t\t}\n\t\t\t\n\t\t\t// draw XP bar and fill it\n\t\t\tdraw_sprite(XPBAR_X+slide.lv_offset, XPBAR_Y, SPR_XPBAR, FRAME_XP_BAR, 0);\n\t\t\t\n\t\t\tmaxed_out = ((curxp == maxxp) && level == 2);\n\t\t\tif (!maxed_out)\n\t\t\t\tDrawPercentage(XPBAR_X+slide.lv_offset, XPBAR_Y, SPR_XPBAR, FRAME_XP_FILL, curxp, maxxp, sprites[SPR_XPBAR].w);\n\t\t\t\n\t\t\t// draw the white flashing if we just got more XP\n\t\t\t// the time-left and flash-state are in separate variables--\n\t\t\t// otherwise the Spur will not flash XP bar\n\t\t\tif (statusbar.xpflashcount)\n\t\t\t{\n\t\t\t\tif (++statusbar.xpflashstate & 2)\n\t\t\t\t{\n\t\t\t\t\tdraw_sprite(XPBAR_X+slide.lv_offset, XPBAR_Y, SPR_XPBAR, FRAME_XP_FLASH, 0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstatusbar.xpflashcount--;\n\t\t\t}\n\t\t\telse statusbar.xpflashstate = 0;\n\t\t\t\n\t\t\t// draw \"MAX\"\n\t\t\tif (maxed_out)\n\t\t\t\tdraw_sprite(XPBAR_X+slide.lv_offset, XPBAR_Y, SPR_XPBAR, FRAME_XP_MAX, 0);\n\t\t\t\n\t\t\t// Level Number\n\t\t\tDrawWeaponLevel(HEALTH_X + slide.lv_offset, XPBAR_Y, player->curWeapon);\n\t\t}\n\t\t\n\t\t// -- draw the weapon bar -----------------------------\n\t\t// draw current weapon\n\t\tif (player->curWeapon != WPN_NONE)\n\t\t\tdraw_sprite(CURWEAPON_X + slide.wpn_offset, WEAPONBAR_Y, SPR_ARMSICONS, slide.firstWeapon, 0);\n\t\t\n\t\t// draw ammo, note we draw ammo of firstweapon NOT current weapon, for slide effect\n\t\tDrawWeaponAmmo((AMMO_X + slide.wpn_offset + slide.ammo_offset), AMMO_Y, slide.firstWeapon);\n\t\t\n\t\t// draw other weapons\n\t\tw = slide.firstWeapon;\n\t\tx = STATUS_X + 64 + slide.wpn_offset + 1;\n\t\tfor(;;)\n\t\t{\n\t\t\tif (++w >= WPN_COUNT) w = 0;\n\t\t\tif (w==slide.firstWeapon) break;\n\t\t\t\n\t\t\tif (player->weapons[w].hasWeapon)\n\t\t\t{\n\t\t\t\tdraw_sprite(x, WEAPONBAR_Y, SPR_ARMSICONS, w, RIGHT);\n\t\t\t\tx += 16;\n\t\t\t}\n\t\t}\n\t\t\n\t\tDrawAirLeft((SCREEN_WIDTH/2) - (5*8), ((SCREEN_HEIGHT)/2)-16);\n\t}\n}\n\nvoid DrawAirLeft(int x, int y)\n{\n\tif (player->airshowtimer)\n\t{\n\t\tdraw_sprite(x, y, SPR_AIR, (player->airleft%30 > 10) ? 0:1, RIGHT);\n\t\t\n\t\tif (player->airshowtimer%6 < 4)\n\t\t\tDrawNumber(x+32, y, player->airleft/10);\n\t}\n}\n\nvoid DrawWeaponAmmo(int x, int y, int wpn)\n{\n\t// draw slash\n\tif (!player->hurt_flash_state || game.mode != GM_NORMAL)\n\t{\n\t\tdraw_sprite(x, y+8, SPR_WHITENUMBERS, 11, 0);\n\t}\n\t\n\tif (!player->weapons[wpn].maxammo)\n\t{\t// ammo is \"not applicable\"\n\t\tx += 16;\n\t\tdraw_sprite(x, y, SPR_NAAMMO, 0, 0);\n\t\tdraw_sprite(x, y+8, SPR_NAAMMO, 0, 0);\n\t}\n\telse\n\t{\n\t\tDrawNumber(x, y, player->weapons[wpn].ammo);\n\t\tDrawNumber(x, y+8, player->weapons[wpn].maxammo);\n\t}\n}\n\nvoid DrawWeaponLevel(int x, int y, int wpn)\n{\n\tint level = (player->weapons[wpn].level + 1);\n\tif (wpn == WPN_NONE) level = 0;\n\t\n\tdraw_sprite(x, y, SPR_XPLEVELICON, 0, 0);\n\tdraw_sprite(x+16, y, SPR_WHITENUMBERS, level, 0);\n}\n\n\nstatic void RunStatusBar(void)\n{\n\t// handle slowly decreasing the health when player is hurt\n\t// note how it only decrements while it's actually visible--i thought that was a nice touch\n\tif (!player->hurt_flash_state)\n\t{\n\t\tRunPercentBar(&PHealthBar, player->hp);\n\t}\n\t\n\tif (game.frozen || player->inputs_locked) return;\n\tif (fade.getstate() != FS_NO_FADE) return;\n\t\n\t// sliding effect when changing weapons\n\tif (slide.lv_offset)\n\t{\t// next weapon\n\t\tslide.lv_offset += slide.move_dir;\n\t\tif (--slide.timer > 0)\n\t\t{\n\t\t\tslide.wpn_offset += slide.move_dir;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!slide.timer) slide.firstWeapon = player->curWeapon;\n\t\t\tslide.wpn_offset = slide.lv_offset;\n\t\t\tslide.ammo_offset = 0;\n\t\t}\n\t}\n\telse\n\t{\n\t\tslide.firstWeapon = player->curWeapon;\n\t}\n}\n\n\n// start the slide effect. if dir = LEFT, slides left (next weapon), if RIGHT does \"prev weapon\"\n// newwpn = the weapon to change to\nvoid weapon_slide(int dir, int newwpn)\n{\nint sign;\n\tif (slide.lv_offset) slide.firstWeapon = player->curWeapon;\t\t// if already sliding change immediately\n\tif (dir==RIGHT) sign = -1; else sign = 1;\n\t\n\tslide.lv_offset = SLIDE_LV_OFFSET * sign;\n\tslide.timer = SLIDE_TIMER_START;\n\tslide.ammo_offset = 16 * sign;\n\tslide.move_dir = -2 * sign;\n\tplayer->curWeapon = newwpn;\n}\n\n// the opening slide effect on load/new game\nvoid weapon_introslide()\n{\n\tif (player->curWeapon == WPN_NONE)\n\t{\n\t\tweapon_slide(LEFT, player->curWeapon);\n\t\treturn;\n\t}\n\t\n\tstat_PrevWeapon(true);\n\tslide.lv_offset = 0;\n\tstat_NextWeapon(true);\n}\n\n// switches to the next weapon in inventory\nvoid stat_NextWeapon(bool quiet)\n{\nint w;\n\n\tw = player->curWeapon;\n\tif (w == WPN_NONE) return;\n\t\n\tfor(;;)\n\t{\n\t\tif (++w >= WPN_COUNT) w = 0;\n\t\t\n\t\tif (player->weapons[w].hasWeapon || w == player->curWeapon)\n\t\t{\n\t\t\tif (!quiet) sound(SND_SWITCH_WEAPON);\n\t\t\tweapon_slide(LEFT, w);\n\t\t\treturn;\n\t\t}\n\t} while(w != player->curWeapon);\n}\n\n// switches to the previous weapon in inventory\nvoid stat_PrevWeapon(bool quiet)\n{\nint w;\n\n\tw = player->curWeapon;\n\tif (w == WPN_NONE) return;\n\t\n\tfor(;;)\n\t{\n\t\tif (--w < 0) w = WPN_COUNT-1;\n\t\t\n\t\tif (player->weapons[w].hasWeapon || w == player->curWeapon)\n\t\t{\n\t\t\tif (!quiet) sound(SND_SWITCH_WEAPON);\n\t\t\tweapon_slide(RIGHT, w);\n\t\t\treturn;\n\t\t}\n\t}\n}\n\n\nvoid InitPercentBar(PercentBar *bar, int starting_value)\n{\n\tPHealthBar.displayed_value = starting_value;\n\tPHealthBar.dectimer = 0;\n}\n\nvoid RunPercentBar(PercentBar *bar, int current_value)\n{\n\tif (current_value != bar->displayed_value)\n\t{\n\t\tif (current_value > bar->displayed_value)\n\t\t{\n\t\t\tbar->displayed_value = current_value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (++bar->dectimer > 0x1e)\n\t\t\t{\n\t\t\t\tbar->displayed_value--;\n\t\t\t}\n\t\t}\n\t}\n\telse bar->dectimer = 0;\n}\n\nvoid DrawPercentBar(PercentBar *bar, int x, int y, int curvalue, int maxvalue, int width)\n{\n\tif (bar->displayed_value != curvalue)\n\t\tDrawPercentage(x, y, SPR_HEALTHFILL, 1, bar->displayed_value, maxvalue, width);\n\t\t\n\tDrawPercentage(x, y, SPR_HEALTHFILL, 0, curvalue, maxvalue, width);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// draws number \"num\" at x,y.\n// leading zeroes are omitted, however, the space for them is still\n// skipped over (left blank). thus it always leaves space for 3 digits.\nvoid DrawNumber(int x, int y, int num)\n{\nstatic const int numtable[3] = { 1000, 100, 10 };\nint place, digit, total;\n\n\tif (num > 9999) num = 9999;\n\t\n\tplace = total = 0;\n\twhile(place < 3)\n\t{\n\t\tdigit = 0;\n\t\twhile(num >= numtable[place])\n\t\t{\n\t\t\tnum -= numtable[place];\n\t\t\tdigit++;\n\t\t}\n\t\t\n\t\ttotal += digit;\n\t\t\n\t\tif (total)\n\t\t\tdraw_sprite(x+(place*8), y, SPR_WHITENUMBERS, digit);\n\t\t\n\t\tplace++;\n\t}\n\t\n\tdraw_sprite(x+(3*8), y, SPR_WHITENUMBERS, num);\n}\n\n\nvoid DrawPercentage(int x, int y, int fill_sprite, int fsframe, int curvalue, int maxvalue, int width_at_max)\n{\n\tif (curvalue < 0) curvalue = 0;\n\tif (curvalue > 0 || maxvalue==0)\n\t{\n\t\tint fillwidth;\n\t\t\n\t\tif (curvalue >= maxvalue)\n\t\t{\n\t\t\tfillwidth = width_at_max;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfillwidth = (int)(((float)width_at_max / (float)maxvalue) * (float)curvalue);\n\t\t\tif (!fillwidth) return;\n\t\t}\n\t\t\n\t\tdraw_sprite_clip_width(x, y, fill_sprite, fsframe, fillwidth);\n\t}\n}\n\n// draws a given number using sprite 's' as the font\n// the numbers are drawn right-aligned to \"x\".\nvoid DrawNumberRAlign(int x, int y, int s, int num)\n{\nchar str[50];\nint i, len;\nint fontwidth = sprites[s].w;\n\n\tsprintf(str, \"%d\", num);\n\tx -= strlen(str) * fontwidth;\n\t\n\tlen = strlen(str);\n\tfor(i=0;i<len;i++)\n\t{\n\t\tdraw_sprite(x, y, s, str[i] - '0');\n\t\tx += fontwidth;\n\t}\n}\n\nvoid DrawTwoDigitNumber(int x, int y, int num)\n{\n\tDrawDigit(x+0, y, num/10);\n\tDrawDigit(x+8, y, num%10);\n}\n\nvoid DrawDigit(int x, int y, int digit)\n{\n\tdraw_sprite(x, y, SPR_WHITENUMBERS, digit);\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// Nikumaru Counter\nvoid niku_run()\n{\n\tif (player->equipmask & EQUIP_NIKUMARU)\n\t{\n\t\tif (!game.frozen && !player->inputs_locked)\n\t\t{\n\t\t\tif (game.counter < 300000)\t// 100'00\"0\n\t\t\t\tgame.counter++;\n\t\t}\n\t}\n\telse\n\t{\n\t\tgame.counter = 0;\n\t}\n}\n\nvoid niku_draw(int value, bool force_white)\n{\n\tint clkframe = (game.counter % 30) <= 10;\n\tif (game.frozen || player->inputs_locked || force_white) clkframe = 0;\n\t\n\tdraw_sprite(NIKU_X, NIKU_Y, SPR_NIKU_CLOCK, clkframe);\n\t\n\tint mins = (value / 3000);\t\t// the game runs at 50 fps\n\tint secs = (value / 50) % 60;\n\tint tens = (value / 5) % 10;\n\t\n\tDrawNumber(NIKU_X, NIKU_Y, mins);\n\tDrawTwoDigitNumber(NIKU_X+36, NIKU_Y, secs);\n\tDrawDigit(NIKU_X+56, NIKU_Y, tens);\n\t\n\tdraw_sprite(NIKU_X+30, NIKU_Y, SPR_NIKU_PUNC);\n}\n\n\n\n\n"
  },
  {
    "path": "statusbar.fdh",
    "content": "//hash:32c2827d\n//automatically generated by Makegen\n\n/* located in statusbar.cpp */\n\n//-------------------[referenced from statusbar.cpp]-----------------//\nbool statusbar_init(void);\nvoid DrawStatusBar(void);\nvoid DrawAirLeft(int x, int y);\nvoid DrawWeaponAmmo(int x, int y, int wpn);\nvoid DrawWeaponLevel(int x, int y, int wpn);\nstatic void RunStatusBar(void);\nvoid weapon_slide(int dir, int newwpn);\nvoid weapon_introslide();\nvoid stat_NextWeapon(bool quiet);\nvoid stat_PrevWeapon(bool quiet);\nvoid InitPercentBar(PercentBar *bar, int starting_value);\nvoid RunPercentBar(PercentBar *bar, int current_value);\nvoid DrawPercentBar(PercentBar *bar, int x, int y, int curvalue, int maxvalue, int width);\nvoid DrawNumber(int x, int y, int num);\nvoid DrawPercentage(int x, int y, int fill_sprite, int fsframe, int curvalue, int maxvalue, int width_at_max);\nvoid DrawNumberRAlign(int x, int y, int s, int num);\nvoid DrawTwoDigitNumber(int x, int y, int num);\nvoid DrawDigit(int x, int y, int digit);\nvoid niku_run();\nvoid niku_draw(int value, bool force_white);\n\n\n/* located in sound/sound.cpp */\n\n//-------------------[referenced from statusbar.cpp]-----------------//\nvoid sound(int snd);\n\n"
  },
  {
    "path": "statusbar.h",
    "content": "\n#ifndef _STATUSBAR_H\n#define _STATUSBAR_H\n\nstruct PercentBar\n{\n\tint displayed_value;\n\tint dectimer;\n};\n\nstruct StatusBar\n{\n\tint xpflashcount;\n\tint xpflashstate;\n};\n\nextern StatusBar statusbar;\nvoid niku_draw(int value, bool force_white=false);\n\nvoid stat_PrevWeapon(bool quiet=false);\nvoid stat_NextWeapon(bool quiet=false);\n\n#endif\n"
  },
  {
    "path": "tools/extractmapinfo.c",
    "content": "\n#include <stdio.h>\n#include <stdint.h>\n\n#define NMAPS\t\t\t95\n#define DATA_OFFSET\t\t0x937B0\n\ntypedef struct\n{\n\tchar tileset[32];\n\tchar filename[32];\n\tint scroll_type;\n\tchar background[32];\n\tchar NPCset1[32];\n\tchar NPCset2[32];\n\tuint8_t bossNo;\n\tchar caption[35];\n} MapRecord;\n\nMapRecord MapData[NMAPS];\n\ntypedef struct\n{\n\tchar files[NMAPS+1][32];\n\tint nfiles;\n} filelist;\n\nint FindFileInList(filelist *list, char *fname)\n{\nint i;\n\tfor(i=0;i<list->nfiles;i++)\n\t{\n\t\tif (!strcasecmp(list->files[i], fname))\n\t\t{\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\nvoid AddFileToList(filelist *list, char *fname)\n{\n\tif (FindFileInList(list, fname) != -1) return;\n\t\n\t//printf(\"Added '%s' to list at pos %d\\n\", fname, list->nfiles);\n\tstrcpy(list->files[list->nfiles], fname);\n\tlist->nfiles++;\n}\n\n\nint main(void)\n{\nfilelist bg, tileset, npcset;\nFILE *fp;\nint i, j;\nchar *comma;\nchar buf[256];\n\t\n\t// read data from exe\n\tfp = fopen(\"/data/win/Programs/Games/Cave Story Deluxe/CaveStory/Doukutsu.exe\", \"rb\");\n\tif (!fp) { printf(\"Failed opening exe\\n\"); return 1; }\n\t\n\t// load raw data into struct\n\tfseek(fp, DATA_OFFSET, SEEK_SET);\n\tfread(MapData, sizeof(MapRecord), NMAPS, fp);\n\tfclose(fp);\n\t\n\t// parse tileset and bg info and convert strings to numbers\n\tmemset(&bg, 0, sizeof(bg));\n\tmemset(&tileset, 0, sizeof(tileset));\n\tmemset(&npcset, 0, sizeof(npcset));\n\tfor(i=0;i<NMAPS;i++)\n\t{\n\t\tAddFileToList(&bg, MapData[i].background);\n\t\tAddFileToList(&tileset, MapData[i].tileset);\n\t\tAddFileToList(&npcset, MapData[i].NPCset1);\n\t\tAddFileToList(&npcset, MapData[i].NPCset2);\n\t}\n\t\n\t// output data to .c & .h file\n\tfp = fopen(\"../autogen/stagedata.h\", \"wb\");\n\t\n\tfprintf(fp, \"//auto-generated by extractmapinfo.c\\n\\n\");\n\tfprintf(fp, \"#define NMAPS\\t %d\\n\", NMAPS);\n\tfprintf(fp, \"typedef struct\\n\");\n\tfprintf(fp, \"{\\n\");\n\tfprintf(fp, \"\\tchar filename[32];\\n\");\n\tfprintf(fp, \"\\tchar stagename[35];\\n\\n\");\n\tfprintf(fp, \"\\tuint8_t tileset;\\n\");\n\tfprintf(fp, \"\\tuint8_t bg_no;\\n\");\n\tfprintf(fp, \"\\tuint8_t scroll_type;\\n\");\n\tfprintf(fp, \"\\tuint8_t bossNo;\\n\");\n\tfprintf(fp, \"\\tuint8_t NPCset1;\\n\");\n\tfprintf(fp, \"\\tuint8_t NPCset2;\\n\");\n\tfprintf(fp, \"} MapRecord;\\n\\n\");\n\t\n\tfprintf(fp, \"extern MapRecord stages[NMAPS];\\n\\n\");\n\t\n\tfprintf(fp, \"#define NUM_BACKDROPS\t\t%d\\n\", bg.nfiles);\n\tfprintf(fp, \"#define NUM_TILESETS\t\t%d\\n\\n\", tileset.nfiles);\n\t\n\tfprintf(fp, \"extern const char *backdrop_names[];\\n\");\n\tfprintf(fp, \"extern const char *tileset_names[];\\n\");\n\t\n\t// output the NPC spriteset constants\n\tfprintf(fp, \"\\n\\n\");\n\tfor(i=0;i<npcset.nfiles;i++)\n\t{\n\t\t// make the filename upper-case so it looks like a constant\n\t\tfor(j=strlen(npcset.files[i])-1;j>=0;j--)\n\t\t{\n\t\t\tnpcset.files[i][j] = toupper(npcset.files[i][j]);\n\t\t}\n\t\t\n\t\tfprintf(fp, \"#define NPCSET_%s\\t\\t %d\\n\", npcset.files[i], i);\n\t}\n\t\n\tfprintf(fp, \"\\n\");\n\tfclose(fp);\n\t\n\t\n\tfp = fopen(\"../autogen/stagedata.cpp\", \"wb\");\n\t\n\tfprintf(fp, \"//auto-generated by extractmapinfo.c\\n\\n\");\n\t\n\tfprintf(fp, \"#include <stdio.h>\\n\");\n\tfprintf(fp, \"#include <stdint.h>\\n\");\n\tfprintf(fp, \"#include \\\"stagedata.h\\\"\\n\\n\");\n\t\n\t// output the backdrop names\n\tfprintf(fp, \"const char *backdrop_names[] = {\\n\");\n\tfor(i=0;i<bg.nfiles;i++)\n\t{\n\t\tbg.files[i][0] = tolower(bg.files[i][0]);\t// fix case-sensitivity issue on UNIX filesystems\n\t\tfprintf(fp, \"\\t\\\"%s\\\",\\n\", bg.files[i]);\n\t}\n\tfprintf(fp, \"\\tNULL\\n};\\n\\n\");\n\t\n\t// output the tileset names\n\tfprintf(fp, \"const char *tileset_names[] = {\\n\");\n\tfor(i=0;i<tileset.nfiles;i++) { fprintf(fp, \"\\t\\\"%s\\\",\\n\", tileset.files[i]); }\n\tfprintf(fp, \"\\tNULL\\n};\\n\\n\");\n\t\n\t// finally output the map records\n\tfprintf(fp, \"MapRecord stages[NMAPS] = {\\n\");\n\t\n\tcomma = \",\";\n\tfor(i=0;i<NMAPS;i++)\n\t{\n\t\tif (i+1==NMAPS) comma = \"\";\n\t\t\n\t\tfprintf(fp, \"\\\"%s\\\", \\\"%s\\\", %d, %d, %d, %d, %d, %d%s\\n\", \\\n\t\t\tMapData[i].filename, \\\n\t\t\tMapData[i].caption, \\\n\t\t\tFindFileInList(&tileset, MapData[i].tileset), \\\n\t\t\tFindFileInList(&bg, MapData[i].background), \\\n\t\t\tMapData[i].scroll_type, \\\n\t\t\tMapData[i].bossNo, \\\n\t\t\tFindFileInList(&npcset, MapData[i].NPCset1), \\\n\t\t\tFindFileInList(&npcset, MapData[i].NPCset2), \\\n\t\t\tcomma);\n\t}\n\t\n\tfprintf(fp, \"};\\n\\n\");\n\tfclose(fp);\n\t\n\treturn 0;\n}\n\n\n"
  },
  {
    "path": "trig.cpp",
    "content": "\n#include <math.h>\n#include \"nx.h\"\n\n#include \"trig.fdh\"\n\nsigned int sin_table[256];\nsigned int tan_table[64];\n\n\nchar trig_init(void)\n{\nint degrees;\n\n// converts from 0-256 scale to 0-360 scale, then from degrees to radians\n\t#define PIBT \t((360.00f / 256.00f) * (3.14159265f / 180.00f))\n\t\n\tfor(degrees=0;degrees<256;degrees++)\n\t{\n\t\tsin_table[degrees] = (int)(sin((double)degrees * PIBT) * (1 << CSF));\n\t}\n\t\n\tfor(degrees=0;degrees<64;degrees++)\n\t{\n\t\ttan_table[degrees] = (int)(tan((double)degrees * PIBT) * (1 << 13));\n\t}\n\t\n\t//SetFullscreen(1);\n\treturn 0;\n}\n\n/*void trig_test(void)\n{\nint x, y;\nint x1, y1, x2, y2;\nint xdist, ydist;\nchar buf[80];\nint angle;\ndouble fratio;\nint ratio;\nchar k = 0;\nstatic int avx, avy;\nstatic int avtimer=0;\nstatic int avsx=80<<CSF, avsy=60<<CSF;\nstatic int avectx, avecty;\nstatic int lx=-1,ly=-1;\nstatic char firsttime = 1;\n\n\tif (firsttime)\n\t{\n\t\ttrig_init();\n\t\tSDL_WarpMouse(240<<1,64<<1);\n\t\tfirsttime = 0;\n\t}\n\t\n\tClearScreen();\n\t\n\tx1 = mouse.x;\n\ty1 = mouse.y;\n\tx2 = SCREEN_WIDTH/2;\n\ty2 = SCREEN_HEIGHT/2;\n\t\n\tangle = GetAngle(x1, y1, x2, y2);\n\t\n\t\n\tif (!avectx && !avecty) avtimer = 0;\n\tif (x1 > x2 && avx>>CSF < x2) k++;\n\tif (x1 < x2 && avx>>CSF > x2) k++;\n\tif (y1 > y2 && avy>>CSF < y2) k++;\n\tif (y1 < y2 && avy>>CSF > y2) k++;\n\tif (k >= 2) avtimer = 0;\n\tif (x1 != lx || y1 != ly) { lx=x1;ly=y1;avtimer=0; }\n\tavtimer--;\n\tif (avtimer < 0)\n\t{\n\t\tvector_from_angle(angle, 0xA0, &avectx, &avecty);\n\t\tavtimer = 650;\n\t\tavx = x1<<CSF; avy = y1<<CSF;\n\t}\n\tavx += avectx;\n\tavy += avecty;\n\t//angle *= 360;\n\t//angle /= 256;\n\t\n\tPlotCircle(x1, y1, 120, 250, 120, 0, 256, 7);\n\tPlotCircle(x2, y2, 200, 120, 0, 0, 256, 7);\n\t\n\tfratio = ((double)ydist / (double)xdist);\n\tif (fratio < 0) fratio = -fratio;\n\t\n\tDrawSDLLine(x1, y1, x2, y2, 200, 120, 0);\n\tDrawSDLLine(x1, y1, x1, y2, 200, 120, 0);\n\tDrawSDLLine(x1, y2, x2, y2, 200, 120, 0);\n\tsprintf(buf, \"%d\", xdist); font_draw((((x2-x1)/2)+x1)-(GetFontWidth(buf,0)/2), y2+8, buf, 0);\n\tsprintf(buf, \"%d\", ydist); font_draw(x1+8, (((y2-y1)/2)+y1)-4, buf, 0);\n\tsprintf(buf, \"%d\", angle); font_draw(x1-12-GetFontWidth(buf,0), y1-4, buf, 0);\n\tPlotCircle(x1-8-GetFontWidth(buf,0),y1,120,250,120,128,200,6);\n\tx = (x1+x2)/2; y = (y1+y2)/2; x+=4; y+=9;\n\tsprintf(buf, \"%.2f\", fratio); font_draw(x,y,buf,0);\n\ty+=8; sprintf(buf, \"%04x\", ratio); font_draw(x,y,buf,0);\n\tPlotCircle(avx>>CSF, avy>>CSF, 200, 120, 120, 0, 256, 6);\n\t\n\tflip();\n}\n\nvoid PlotCircle(int x, int y, uchar r, uchar g, uchar b, int start, int stop, int shift)\n{\nint ang;\nint xa, ya;\nuchar angle;\n\tfor(ang=start;ang<stop;ang+=2)\n\t{\n\t\tangle = ang; xa = sin_table[angle] >> shift;\n\t\tangle += 64; ya = sin_table[angle] >> shift;\n\t\t\n\t\tPlotSDLPixel(x+xa, y+ya, r, g, b);\n\t}\n}\n*/\n\n\n// given an angle and a speed, places the X and Y speeds in xs and ys.\n// note: the output values _ARE_ CSF'd, despite the >>= CSF done on them at the end.\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys)\n{\n\tif (ys)\n\t{\n\t\t*ys = sin_table[angle];\n\t\t*ys *= speed; *ys >>= CSF;\n\t}\n\t\n\tif (xs)\n\t{\n\t\tangle += 64;\t\t\t// wraps at 255 because it's a char\n\t\t*xs = sin_table[angle];\n\t\t\n\t\t// what's going on here is that when we calculated sin_table, we could not hold the\n\t\t// fractional (0-1.00f) values outputted from sin(), so we scaled them from 0-0x200.\n\t\t// so now we basically are >>= CSFing the value back to it's original 0-1.00, then\n\t\t// multiplying by speed. We're just doing it backwards so as the precision will stay.\n\t\t// which is ok because multiplication and division are on the same level of OoO.\n\t\t*xs *= speed; *xs >>= CSF;\n\t}\n}\n\nint xinertia_from_angle(uint8_t angle, int speed)\n{\n\tangle += 64;\n\tint xs = sin_table[angle];\n\txs *= speed; xs >>= CSF;\n\t\n\treturn xs;\n}\n\nint yinertia_from_angle(uint8_t angle, int speed)\n{\n\tint ys = sin_table[angle];\n\tys *= speed; ys >>= CSF;\n\t\n\treturn ys;\n}\n\n// give it your position and a target position, and it tells you what angle you should travel at.\nuint8_t GetAngle(int curx, int cury, int tgtx, int tgty)\n{\nint xdist, ydist;\nint ratio;\nint angle;\n\n\txdist = (tgtx - curx);\n\tydist = (tgty - cury);\n\t\n\tif (xdist==0)\n\t{\t// fixup for undefined slope\n\t\tif (tgty > cury) return 0x40;\t\t// straight down\n\t\treturn 0xC0;\t\t\t\t\t\t// straight up\n\t}\n\t\n\t// (ydist / xdist) * 512\t[scale it for integer floating point]\n\tratio = (abs(ydist) << 13) / abs(xdist);\n\t\n\tif (ratio > tan_table[63])\n\t{\n\t\tangle = 0x40;\n\t}\n\telse\n\t{\n\t\tfor(angle=0;angle<64;angle++)\n\t\t{\n\t\t\tif (tan_table[angle] >= ratio) break;\n\t\t}\n\t}\n\t\n\tif (curx > tgtx) angle = 0x80 - angle;\n\tif (cury > tgty) angle = 0x100 - angle;\n\treturn angle;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// convenience function.\n//  * spawn an object at o's action point.\n//  * launch it at the player at speed.\n//  * introduce \"rand_variance\" random error/variation into the launch angle.\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed)\n{\nObject *shot;\n\n\tshot = SpawnObjectAtActionPoint(o, objtype);\n\tThrowObjectAtPlayer(shot, rand_variance, speed);\n}\n\n\n// like EmFireAngledShot, but it's throws an already existing object\n// instead of spawning a new one\nvoid ThrowObjectAtPlayer(Object *o, int rand_variance, int speed)\n{\n\tThrowObject(o, player->x, player->y, rand_variance, speed);\n}\n\n// set the x&y inertia of object o so that it travels towards [destx,desty].\n// rand_variance is a random amount of inaccuracy, in 0-255 degrees, to introduce\n// into the toss.\n// speed is how quickly to throw the object, in CSF'd coordinates.\nvoid ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed)\n{\n\tuint8_t angle = GetAngle(o->x, o->y, destx, desty);\n\t\n\tif (rand_variance)\n\t\tangle += random(-rand_variance, rand_variance);\n\t\n\tThrowObjectAtAngle(o, angle, speed);\n}\n\n// toss object o along angle angle at speed speed\nvoid ThrowObjectAtAngle(Object *o, uint8_t angle, int speed)\n{\n\to->yinertia = (sin_table[angle] * speed) >> CSF;\n\tangle += 64;\n\to->xinertia = (sin_table[angle] * speed) >> CSF;\n}\n\n\n\n\n\n\n"
  },
  {
    "path": "trig.fdh",
    "content": "//hash:bef9350c\n//automatically generated by Makegen\n\n/* located in trig.cpp */\n\n//---------------------[referenced from trig.cpp]--------------------//\nchar trig_init(void);\nvoid vector_from_angle(uint8_t angle, int speed, int *xs, int *ys);\nint xinertia_from_angle(uint8_t angle, int speed);\nint yinertia_from_angle(uint8_t angle, int speed);\nuint8_t GetAngle(int curx, int cury, int tgtx, int tgty);\nvoid EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed);\nvoid ThrowObjectAtPlayer(Object *o, int rand_variance, int speed);\nvoid ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed);\nvoid ThrowObjectAtAngle(Object *o, uint8_t angle, int speed);\n\n\n/* located in ai/ai.cpp */\n\n//---------------------[referenced from trig.cpp]--------------------//\nObject *SpawnObjectAtActionPoint(Object *o, int otype);\n\n\n/* located in common/misc.cpp */\n\n//---------------------[referenced from trig.cpp]--------------------//\nint random(int min, int max);\n\n"
  },
  {
    "path": "trig.h",
    "content": "\nextern signed int sin_table[256];\n"
  },
  {
    "path": "tsc.cpp",
    "content": "\n// TSC script parser & executor\n\n#include \"nx.h\"\n#include \"common/DBuffer.h\"\n#include \"vararray.h\"\n#include \"tsc.h\"\n#include \"tsc.fdh\"\n\n#define TRACE_SCRIPT\n\n// which textbox options are enabled by the \"<TUR\" script command.\n#define TUR_PARAMS\t\t(TB_LINE_AT_ONCE | TB_VARIABLE_WIDTH_CHARS | TB_CURSOR_NEVER_SHOWN)\n\nstatic ScriptInstance curscript;\nstatic int lastammoinc = 0;\n\nstruct ScriptPage\n{\n\t// a variable-length array of pointers to compiled script code\n\t// for each script in the page; their indexes in this array\n\t// correspond to their script numbers.\n\tVarArray<DBuffer *> scripts;\n\t\n\tvoid Clear()\n\t{\n\t\tfor(int i=0;i<scripts.nitems;i++)\n\t\t\tdelete scripts.get(i);\t// it's safe to delete NULL, so no check here\n\t\t\n\t\tscripts.MakeEmpty();\n\t}\n};\n\nScriptPage script_pages[NUM_SCRIPT_PAGES];\n\n/*\nvoid c------------------------------() {}\n*/\n\nstruct TSCCommandTable\n{\n\tconst char *mnemonic;\n\tint nparams;\n};\n#include \"tsc_cmdtbl.h\"\n\nunsigned char codealphabet[] = { \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123+-\" };\nunsigned char letter_to_code[256];\nunsigned char mnemonic_lookup[32*32*32];\n\n\nstatic void GenLTC(void)\n{\nint i;\nuchar ch;\n\n\tmemset(letter_to_code, 0xff, sizeof(letter_to_code));\n\tfor(i=0;;i++)\n\t{\n\t\tif (!(ch = codealphabet[i])) break;\n\t\tletter_to_code[ch] = i;\n\t}\n\t\n\tmemset(mnemonic_lookup, 0xff, sizeof(mnemonic_lookup));\n\tfor(i=0;i<OP_COUNT;i++)\n\t{\n\t\tmnemonic_lookup[MnemonicToIndex(cmd_table[i].mnemonic)] = i;\n\t}\n}\n\nstatic int MnemonicToIndex(const char *str)\n{\nint l1, l2, l3;\n\n\tl1 = letter_to_code[(uint8_t)str[0]];\n\tl2 = letter_to_code[(uint8_t)str[1]];\n\tl3 = letter_to_code[(uint8_t)str[2]];\n\tif (l1==0xff || l2==0xff || l3==0xff) return -1;\n\t\n\treturn (l1 << 10) | (l2 << 5) | l3;\n}\n\nstatic int MnemonicToOpcode(char *str)\n{\n\tint index = MnemonicToIndex(str);\n\tif (index != -1)\n\t{\n\t\tindex = mnemonic_lookup[index];\n\t\tif (index != 0xff) return index;\n\t}\n\t\n\tstaterr(\"MnemonicToOpcode: No such command '%s'\", str);\n\treturn -1;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool tsc_init(void)\n{\nchar fname[MAXPATHLEN];\n\n\tGenLTC();\n\tcurscript.running = false;\n\tfor(int i=0;i<NUM_SCRIPT_PAGES;i++)\n\t\n\t// load the \"common\" TSC scripts available to all maps\n\tsprintf(fname, \"%s/Head.tsc\", data_dir);\n\tif (tsc_load(fname, SP_HEAD)) return 1;\n\t\n\t// load the inventory screen scripts\n\tsprintf(fname, \"%s/ArmsItem.tsc\", data_dir);\n\tif (tsc_load(fname, SP_ARMSITEM)) return 1;\n\t\n\t// load stage select/teleporter scripts\n\tsprintf(fname, \"%s/StageSelect.tsc\", data_dir);\n\tif (tsc_load(fname, SP_STAGESELECT)) return 1;\n\t\n\treturn 0;\n}\n\nvoid tsc_close(void)\n{\n\t// free all loaded scripts\n\tfor(int i=0;i<NUM_SCRIPT_PAGES;i++)\n\t\tscript_pages[i].Clear();\n}\n\n// load a tsc file and return the highest script # in the file\nbool tsc_load(const char *fname, int pageno)\n{\nScriptPage *page = &script_pages[pageno];\nint fsize;\nchar *buf;\nbool result;\n\n\tstat(\"tsc_load: loading '%s' to page %d\", fname, pageno);\n\tif (curscript.running && curscript.pageno == pageno)\n\t\tStopScript(&curscript);\n\t\n\tpage->Clear();\n\t\n\t// load the raw script text\n\tbuf = tsc_decrypt(fname, &fsize);\n\tif (!buf)\n\t{\n\t\tstaterr(\"tsc_load: failed to load file: '%s'\", fname);\n\t\treturn 1;\n\t}\n\t\n\t// now \"compile\" all the scripts in the TSC\n\t//int top_script = CompileScripts(buf, fsize, base);\n\tresult = tsc_compile(buf, fsize, pageno);\n\tfree(buf);\n\t\n\treturn result;\n}\n\n\nchar *tsc_decrypt(const char *fname, int *fsize_out)\n{\nFILE *fp;\nint fsize, i;\n\n\tfp = fileopen(fname, \"rb\");\n\tif (!fp)\n\t{\n\t\tstaterr(\"tsc_decrypt: no such file: '%s'!\", fname);\n\t\treturn NULL;\n\t}\n\t\n\tfseek(fp, 0, SEEK_END);\n\tfsize = ftell(fp);\n\tfseek(fp, 0, SEEK_SET);\n\t\n\t// load file\n\tchar *buf = (char *)malloc(fsize+1);\n\tfread(buf, fsize, 1, fp);\n\tbuf[fsize] = 0;\n\tfclose(fp);\n\t\n\t// get decryption key, which is actually part of the text\n\tint keypos = (fsize / 2);\n\tint key = buf[keypos];\n\t\n\t// everything EXCEPT the key is encrypted\n\tfor(i=0;i<keypos;i++) { buf[i] = (buf[i] - key); }\n\tfor(i++;i<fsize;i++)  { buf[i] = (buf[i] - key); }\n\t\n\tif (fsize_out) *fsize_out = fsize;\n\treturn buf;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// compile a tsc file--a set of scripts in raw text format--into 'bytecode',\n// and place the finished scripts into the given page.\nbool tsc_compile(const char *buf, int bufsize, int pageno)\n{\nScriptPage *page = &script_pages[pageno];\nconst char *buf_end = (buf + (bufsize - 1));\nDBuffer *script = NULL;\nchar cmdbuf[4] = { 0 };\n\n\t//stat(\"<> tsc_compile bufsize = %d pageno = %d\", bufsize, pageno);\n\t\n\twhile(buf <= buf_end)\n\t{\n\t\tchar ch = *(buf++);\n\t\t\n\t\tif (ch == '#')\n\t\t{\t// start of a scriptzz\n\t\t\tif (script)\n\t\t\t{\n\t\t\t\tscript->Append8(OP_END);\n\t\t\t\tscript = NULL;\n\t\t\t}\n\t\t\t\n\t\t\tint scriptno = ReadNumber(&buf, buf_end);\n\t\t\tif (scriptno >= 10000 || scriptno < 0)\n\t\t\t{\n\t\t\t\tstaterr(\"tsc_compile: invalid script number: %d\", scriptno);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\t// skip the CR after the script #\n\t\t\twhile(buf < buf_end)\n\t\t\t{\n\t\t\t\tif (*buf != '\\r' && *buf != '\\n') break;\n\t\t\t\tbuf++;\n\t\t\t}\n\t\t\t\n\t\t\t//stat(\"Parsing script #%04d\", scriptno);\n\t\t\tif (page->scripts.get(scriptno))\n\t\t\t{\n\t\t\t\tstaterr(\"tsc_compile WARNING: duplicate script #%04d; ignoring\", scriptno);\n\t\t\t\t// because script is left null, we'll ignore everything until we see another #\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tscript = new DBuffer;\n\t\t\t\tpage->scripts.put(scriptno, script);\n\t\t\t}\n\t\t}\n\t\telse if (ch == '<' && script)\n\t\t{\n\t\t\t// read the command type\n\t\t\tcmdbuf[0] = nextchar(&buf, buf_end);\n\t\t\tcmdbuf[1] = nextchar(&buf, buf_end);\n\t\t\tcmdbuf[2] = nextchar(&buf, buf_end);\n\t\t\t\n\t\t\tint cmd = MnemonicToOpcode(cmdbuf);\n\t\t\tif (cmd == -1) return 1;\n\t\t\t\n\t\t\t//stat(\"Command '%s', parameters %d\", cmdbuf, cmd_table[cmd].nparams);\n\t\t\tscript->Append8(cmd);\n\t\t\t\n\t\t\t// read all parameters expected by that command\n\t\t\tint nparams = cmd_table[cmd].nparams;\n\t\t\tfor(int i=0;i<nparams;i++)\n\t\t\t{\n\t\t\t\tint val = ReadNumber(&buf, buf_end);\n\t\t\t\t\n\t\t\t\tscript->Append8(val >> 8);\n\t\t\t\tscript->Append8(val & 0xff);\n\t\t\t\t\n\t\t\t\t// colon between params\n\t\t\t\tif (i < (nparams - 1))\n\t\t\t\t\tbuf++;\n\t\t\t}\n\t\t}\n\t\telse if (script)\n\t\t{\t// text for message boxes\n\t\t\tbuf--;\n\t\t\tscript->Append8(OP_TEXT);\n\t\t\tReadText(script, &buf, buf_end);\n\t\t}\n\t\t\n\t}\n\t\n\tif (script)\n\t\tscript->Append8(OP_END);\n\t\n\treturn 0;\n}\n\nstatic char nextchar(const char **buf, const char *buf_end)\n{\n\tif (*buf <= buf_end)\n\t\treturn *(*buf)++;\n\t\n\treturn 0;\n}\n\nstatic int ReadNumber(const char **buf, const char *buf_end)\n{\nstatic char num[5] = { 0 };\nint i = 0;\n\t\n\twhile(i < 4)\n\t{\n\t\tnum[i] = nextchar(buf, buf_end);\n\t\tif (!isdigit(num[i]))\n\t\t{\n\t\t\t(*buf)--;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\ti++;\n\t}\n\t\n\treturn atoi(num);\n}\n\nstatic void ReadText(DBuffer *script, const char **buf, const char *buf_end)\n{\n\twhile(*buf <= buf_end)\n\t{\n\t\tchar ch = nextchar(buf, buf_end);\n\t\tif (ch == '<' || ch == '#')\n\t\t{\n\t\t\t(*buf)--;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (ch != 10)\n\t\t\tscript->Append8(ch);\n\t}\n\t\n\tscript->Append8('\\0');\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nvoid RunScripts(void)\n{\n\tif (curscript.running)\n\t\tExecScript(&curscript);\n}\n\nvoid StopScripts(void)\n{\n\tif (curscript.running)\n\t\tStopScript(&curscript);\n}\n\nint GetCurrentScript(void)\n{\n\tif (curscript.running)\n\t\treturn curscript.scriptno;\n\t\n\treturn -1;\n}\n\nScriptInstance *GetCurrentScriptInstance()\n{\n\tif (curscript.running)\n\t\treturn &curscript;\n\t\n\treturn NULL;\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// returns a pointer to the executable data/bytecode of the given script.\n// handles looking on head, etc.\nconst uint8_t *FindScriptData(int scriptno, int pageno, int *page_out)\n{\nScriptPage *page = &script_pages[pageno];\nDBuffer *script;\n\n\tscript = page->scripts.get(scriptno);\n\tif (!script)\n\t{\n\t\tif (pageno != SP_HEAD)\n\t\t{\t// try to find the script in head.tsc\n\t\t\treturn FindScriptData(scriptno, SP_HEAD, page_out);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t}\n\t\n\tif (page_out) *page_out = pageno;\n\treturn script->Data();\n}\n\n\nScriptInstance *StartScript(int scriptno, int pageno)\n{\nconst uint8_t *program;\nint found_pageno;\n\n\tprogram = FindScriptData(scriptno, pageno, &found_pageno);\n\tif (!program)\n\t{\n\t\tstaterr(\"StartScript: no script at position #%04d page %d!\", scriptno, pageno);\n\t\treturn NULL;\n\t}\n\t\n\t// don't start regular map scripts (e.g. hvtrigger) if player is dead\n\tif (player->dead && found_pageno != SP_HEAD)\n\t{\n\t\tstat(\"Not starting script %d; player is dead\", scriptno);\n\t\treturn NULL;\n\t}\n\t\n\t// set the script\n\tmemset(&curscript, 0, sizeof(ScriptInstance));\n\t\n\tcurscript.program = program;\n\tcurscript.scriptno = scriptno;\n\tcurscript.pageno = found_pageno;\n\t\n\tcurscript.ynj_jump = -1;\n\tcurscript.running = true;\n\t\n\ttextbox.ResetState();\n\tstat(\"  - Started script %04d\", scriptno);\n\t\n\tRunScripts();\n\treturn &curscript;\n}\n\nvoid StopScript(ScriptInstance *s)\n{\n\tif (!s->running)\n\t\treturn;\n\t\n\ts->running = false;\n\tstat(\"  - Stopped script %04d\", s->scriptno);\n\t\n\t// TRA is really supposed to be a jump, not a script restart--\n\t// in that in maintains KEY/PRI across the stage transition.\n\t// Emulate this by leaving the script state alone until the\n\t// on-entry script starts.\n\tplayer->inputs_locked = false;\n\tgame.frozen = false;\n\tplayer->lookaway = false;\n\t\n\ttextbox.ResetState();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nbool JumpScript(int newscriptno, int pageno)\n{\nScriptInstance *s = &curscript;\n\n\tif (pageno == -1)\n\t\tpageno = s->pageno;\n\t\n\tstat(\"JumpScript: moving to script #%04d page %d\", newscriptno, pageno);\n\t\n\ts->program = FindScriptData(newscriptno, pageno, &s->pageno);\n\ts->scriptno = newscriptno;\n\ts->ip = 0;\n\t\n\tif (!s->program)\n\t{\n\t\tstaterr(\"JumpScript: missing script #%04d! Script terminated.\", newscriptno);\n\t\tStopScript(s);\n\t\treturn 1;\n\t}\n\t\n\ts->delaytimer = 0;\n\ts->waitforkey = false;\n\ts->wait_standing = false;\n\t\n\t// <EVE doesn't clear textbox mode or the face etc\n\tif (textbox.IsVisible())\n\t{\n\t\ttextbox.ClearText();\n\t\t\n\t\t// see entrance to Sacred Grounds when you have the Nikumaru Counter\n\t\t// to witness that EVE clears TUR.\n\t\ttextbox.SetFlags(TB_LINE_AT_ONCE, false);\n\t\ttextbox.SetFlags(TB_VARIABLE_WIDTH_CHARS, false);\n\t\ttextbox.SetFlags(TB_CURSOR_NEVER_SHOWN, false);\n\t}\n\t\n\treturn 0;\n}\n\nvoid ExecScript(ScriptInstance *s)\n{\nchar debugbuffer[256];\nint cmd;\nint val, parm[6];\nint i;\nObject *o;\nchar *mnemonic;\nchar *str;\nint cmdip;\n\n\t#define JUMP_IF(cond) \\\n\t{\t\\\n\t\tif (cond)\t\\\n\t\t{\t\\\n\t\t\tif (JumpScript(parm[1])) return;\t\\\n\t\t}\t\\\n\t}\n\t\n\t// pause script while FAI/FAO still working\n\tif (fade.getstate() == FS_FADING) return;\n\tif (game.mode == GM_ISLAND) return;\n\t\n\t// waiting for an answer from a Yes/No prompt?\n\tif (s->ynj_jump != -1)\n\t{\n\t\tif (textbox.YesNoPrompt.ResultReady())\n\t\t{\n\t\t\tif (textbox.YesNoPrompt.GetResult() == NO)\n\t\t\t\tJumpScript(s->ynj_jump);\n\t\t\t\n\t\t\ttextbox.YesNoPrompt.SetVisible(false);\n\t\t\ts->ynj_jump = -1;\n\t\t}\n\t\telse\n\t\t{\t// pause script until answer is receieved\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t// pause script while text is still displaying\n\tif (textbox.IsBusy()) return;\n\t\n\t// pause while NOD is in effect\n\tif (s->waitforkey)\n\t{\n\t\tif (s->nod_delay)\t// used to pause during <QUA without freezing textboxes in Hell\n\t\t{\n\t\t\ts->nod_delay--;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// if key was just pressed release nod.\n\t\t\t// check them separately to allow holding X while\n\t\t\t// tapping Z to keep text scrolling fast.\n\t\t\tif ((inputs[JUMPKEY] && !s->lastjump) || \\\n\t\t\t\t(inputs[FIREKEY] && !s->lastfire))\n\t\t\t{\n\t\t\t\t// hide the fact that the key was just pushed\n\t\t\t\t// so player doesn't jump/fire stupidly when dismissing textboxes\n\t\t\t\tlastinputs[JUMPKEY] |= inputs[JUMPKEY];\n\t\t\t\tlastinputs[FIREKEY] |= inputs[FIREKEY];\n\t\t\t\tlastpinputs[JUMPKEY] |= inputs[JUMPKEY];\n\t\t\t\tlastpinputs[FIREKEY] |= inputs[FIREKEY];\n\t\t\t\t\n\t\t\t\ts->waitforkey = false;\n\t\t\t\ttextbox.ShowCursor(false);\n\t\t\t}\n\t\t\t\n\t\t\ts->lastjump = inputs[JUMPKEY];\n\t\t\ts->lastfire = inputs[FIREKEY];\n\t\t}\n\t\t\n\t\t// if still on return\n\t\tif (s->waitforkey) return;\n\t}\n\t\n\t// pause scripts while WAI is in effect.\n\t// <WAI9999, used in inventory/stage-select screen, means forever.\n\tif (s->delaytimer)\n\t{\n\t\tif (s->delaytimer == 9999)\n\t\t{\n\t\t\tUnlockInventoryInput();\n\t\t}\n\t\telse\n\t\t{\n\t\t\ts->delaytimer--;\n\t\t}\n\t\t\n\t\treturn;\n\t}\n\t\n\t// pause while WAS (wait until standing) is in effect.\n\tif (s->wait_standing)\n\t{\n\t\tif (!player->blockd) return;\n\t\ts->wait_standing = false;\n\t}\n\t\n\t//stat(\"<> Entering script execution loop at ip = %d\", s->ip);\n\t\n\t// main execution loop\n\tfor(;;)\n\t{\n\t\tcmdip = s->ip++;\n\t\tcmd = s->program[cmdip];\n\t\tmnemonic = (char *)cmd_table[cmd].mnemonic;\n\t\t\n\t\tif (cmd != OP_TEXT)\n\t\t{\n\t\t\tsnprintf(debugbuffer, sizeof(debugbuffer), \"%04x <%s \", cmd, mnemonic);\n\t\t\tfor(i=0;i<cmd_table[cmd].nparams;i++)\n\t\t\t{\n\t\t\t\tval = ((int)s->program[s->ip++]) << 8;\n\t\t\t\tval |= s->program[s->ip++];\n\t\t\t\tparm[i] = val;\n\t\t\t\tsnprintf(debugbuffer, sizeof(debugbuffer), \"%s %04d\", debugbuffer, val);\n\t\t\t}\n\t\t}\n\t\t#ifdef TRACE_SCRIPT\n\t\telse\n\t\t{\n\t\t\tchar debugbuffer2[10000];\n\t\t\tcrtoslashn((char *)&s->program[s->ip], debugbuffer2);\n\t\t\tsnprintf(debugbuffer, sizeof(debugbuffer), \"TEXT  '%s'\", debugbuffer2);\n\t\t}\n\t\t\n\t\tif (cmd == OP_TEXT && !textbox.IsVisible() && !strcmp(debugbuffer, \"TEXT  '\\n'\")) { }\n\t\telse\n\t\t{\n\t\t\tstat(\"%04d:%d  %s\", s->scriptno, cmdip, debugbuffer);\n\t\t}\n\t\t#endif\n\t\t\n\t\tswitch(cmd)\n\t\t{\n\t\t\tcase OP_END: StopScript(s); return;\n\t\t\t\n\t\t\tcase OP_FAI: fade.Start(FADE_IN, parm[0], SPR_FADE_DIAMOND); return;\n\t\t\tcase OP_FAO: fade.Start(FADE_OUT, parm[0], SPR_FADE_DIAMOND); return;\n\t\t\tcase OP_FLA: flashscreen.Start(); break;\n\t\t\t\n\t\t\tcase OP_SOU: sound(parm[0]); break;\n\t\t\tcase OP_CMU: music(parm[0]); break;\n\t\t\tcase OP_RMU: music(music_lastsong()); break;\n\t\t\tcase OP_FMU: org_fade(); break;\n\t\t\t\n\t\t\tcase OP_SSS: StartStreamSound(parm[0]); break;\n\t\t\tcase OP_SPS: StartPropSound(); break;\n\t\t\t\n\t\t\tcase OP_CSS:\t// these seem identical-- either one will\n\t\t\tcase OP_CPS:\t// in fact stop the other.\n\t\t\t{\n\t\t\t\tStopLoopSounds();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\t// free menu selector in Inventory. It also undoes <PRI,\n\t\t\t// as can be seen at the entrance to Sacred Ground.\n\t\t\tcase OP_FRE:\n\t\t\t{\n\t\t\t\tgame.frozen = false;\n\t\t\t\tplayer->inputs_locked = false;\n\t\t\t\tUnlockInventoryInput();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_PRI:\t// freeze entire game (players + NPCs)\n\t\t\t{\n\t\t\t\tgame.frozen = true;\n\t\t\t\tplayer->inputs_locked = false;\n\t\t\t\tstatusbar.xpflashcount = 0;\t\t\t// looks odd if this happens after a long <PRI, even though it's technically correct\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_KEY:\t// lock players input but NPC/objects still run\n\t\t\t{\n\t\t\t\tgame.frozen = false;\n\t\t\t\tplayer->inputs_locked = true;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_MOV:\n\t\t\t\tplayer->x = (parm[0] * TILE_W) << CSF;\n\t\t\t\tplayer->y = (parm[1] * TILE_H) << CSF;\n\t\t\t\tplayer->xinertia = player->yinertia = 0;\n\t\t\t\tplayer->lookaway = false;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_UNI:\n\t\t\t\tplayer->movementmode = parm[0];\n\t\t\t\tmap_scroll_lock(parm[0]);\t\t// locks on anything other than 0\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_MNA:\t\t// show map name (as used on entry)\n\t\t\t\tmap_show_map_name();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_MLP:\t\t// bring up Map System\n\t\t\t\tgame.setmode(GM_MAP_SYSTEM, game.mode);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_TRA:\n\t\t\t{\n\t\t\t\tbool waslocked = (player->inputs_locked || game.frozen);\n\t\t\t\t\n\t\t\t\tstat(\"******* Executing <TRA to stage %d\", parm[0]);\n\t\t\t\tgame.switchstage.mapno = parm[0];\n\t\t\t\tgame.switchstage.eventonentry = parm[1];\n\t\t\t\tgame.switchstage.playerx = parm[2];\n\t\t\t\tgame.switchstage.playery = parm[3];\n\t\t\t\tStopScript(s);\n\t\t\t\t\n\t\t\t\tif (game.switchstage.mapno != 0)\n\t\t\t\t{\n\t\t\t\t\t// KEY is maintained across TRA as if the TRA\n\t\t\t\t\t// were a jump instead of a restart; but if the\n\t\t\t\t\t// game is in PRI then it is downgraded to a KEY.\n\t\t\t\t\t// See entrance to Yamashita Farm.\n\t\t\t\t\tif (waslocked)\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer->inputs_locked = true;\n\t\t\t\t\t\tgame.frozen = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_AMPLUS: GetWeapon(parm[0], parm[1]); lastammoinc = parm[1]; break;\n\t\t\tcase OP_AMMINUS: LoseWeapon(parm[0]); break;\n\t\t\tcase OP_TAM: TradeWeapon(parm[0], parm[1], parm[2]); break;\n\t\t\tcase OP_AMJ: JUMP_IF(player->weapons[parm[0]].hasWeapon); break;\n\t\t\t\n\t\t\tcase OP_ZAM:\t// drop all weapons to level 1\n\t\t\t{\n\t\t\t\tfor(int i=0;i<WPN_COUNT;i++)\n\t\t\t\t{\n\t\t\t\t\tplayer->weapons[i].xp = 0;\n\t\t\t\t\tplayer->weapons[i].level = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_EVE: JumpScript(parm[0]); break;\t\t// unconditional jump to event\n\t\t\t\n\t\t\tcase OP_FLPLUS: game.flags[parm[0]] = 1; break;\n\t\t\tcase OP_FLMINUS: game.flags[parm[0]] = 0; break;\n\t\t\tcase OP_FLJ: JUMP_IF(game.flags[parm[0]]); break;\n\t\t\t\n\t\t\tcase OP_ITPLUS: AddInventory(parm[0]); break;\n\t\t\tcase OP_ITMINUS: DelInventory(parm[0]); break;\n\t\t\tcase OP_ITJ: JUMP_IF((FindInventory(parm[0]) != -1)); break;\n\t\t\t\n\t\t\t// the PSelectSprite is a hack so when the Mimiga Mask is taken\n\t\t\t// it disappears immediately even though the game is in <PRI.\n\t\t\tcase OP_EQPLUS:\t player->equipmask |= parm[0]; PSelectSprite(); break;\n\t\t\tcase OP_EQMINUS: player->equipmask &= ~parm[0]; PSelectSprite(); break;\n\t\t\t\n\t\t\tcase OP_SKPLUS: game.skipflags[parm[0]] = 1; break;\n\t\t\tcase OP_SKMINUS: game.skipflags[parm[0]] = 0; break;\n\t\t\tcase OP_SKJ: JUMP_IF(game.skipflags[parm[0]]); break;\n\t\t\t\n\t\t\tcase OP_PSPLUS: textbox.StageSelect.SetSlot(parm[0], parm[1]); break;\n\t\t\t\n\t\t\tcase OP_NCJ:\n\t\t\t\tJUMP_IF(CountObjectsOfType(parm[0]) > 0);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_ECJ:\t// unused but valid\n\t\t\t\tJUMP_IF(FindObjectByID2(parm[0]));\n\t\t\tbreak;\n\t\t\t\n\t\t\t// life capsule--add to max life\n\t\t\tcase OP_MLPLUS:\n\t\t\t\tplayer->maxHealth += parm[0];\n\t\t\t\tplayer->hp = player->maxHealth;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_FON:\t// focus on NPC\n\t\t\t{\n\t\t\t\tif ((o = FindObjectByID2(parm[0])))\n\t\t\t\t{\n\t\t\t\t\tmap_focus(o, parm[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\tcase OP_FOB:\t// focus on boss\n\t\t\t{\n\t\t\t\tif (game.stageboss.object)\n\t\t\t\t\tmap_focus(game.stageboss.object, parm[1]);\n\t\t\t\telse\n\t\t\t\t\tstaterr(\"tsc: <FOB without stage boss\");\n\t\t\t}\n\t\t\tbreak;\n\t\t\tcase OP_FOM:\t// focus back to player (mychar)\n\t\t\t{\n\t\t\t\tmap_focus(NULL, parm[0]);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_DNA:\t// delete all objects of type parm1\n\t\t\t{\n\t\t\t\tObject *o = firstobject;\n\t\t\t\twhile(o)\n\t\t\t\t{\n\t\t\t\t\tif (o->type == parm[0]) o->Delete();\n\t\t\t\t\to = o->next;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_ANP: NPCDo(parm[0], parm[1], parm[2], DoANP); break;\n\t\t\tcase OP_CNP: NPCDo(parm[0], parm[1], parm[2], DoCNP); break;\n\t\t\tcase OP_DNP: NPCDo(parm[0], parm[1], parm[2], DoDNP); break;\n\t\t\t\n\t\t\tcase OP_MNP:\t// move object X to (Y,Z) with direction W\n\t\t\t\tif ((o = FindObjectByID2(parm[0])))\n\t\t\t\t{\n\t\t\t\t\tSetCSDir(o, parm[3]);\n\t\t\t\t\to->x = (parm[1] * TILE_W) << CSF;\n\t\t\t\t\to->y = (parm[2] * TILE_H) << CSF;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_BOA:\t// set boss state\n\t\t\t{\n\t\t\t\tgame.stageboss.SetState(parm[0]);\n\t\t\t}\n\t\t\tbreak;\n\t\t\tcase OP_BSL:\t// bring up boss bar\n\t\t\t{\n\t\t\t\tObject *target;\n\t\t\t\tif (parm[0] == 0)\n\t\t\t\t{\t// <BSL0000 means the stage boss\n\t\t\t\t\ttarget = game.stageboss.object;\n\t\t\t\t\tif (!game.stageboss.object)\n\t\t\t\t\t\tstaterr(\"<BSL0000 but no stage boss present\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttarget = FindObjectByID2(parm[0]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (target)\n\t\t\t\t{\n\t\t\t\t\tgame.bossbar.object = target;\n\t\t\t\t\tgame.bossbar.defeated = false;\n\t\t\t\t\tgame.bossbar.starting_hp = target->hp;\n\t\t\t\t\tgame.bossbar.bar.displayed_value = target->hp;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstaterr(\"Target of <BSL not found\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_MM0: player->xinertia = 0; break;\n\t\t\tcase OP_MYD: SetPDir(parm[0]); break;\n\t\t\tcase OP_MYB:\n\t\t\t{\n\t\t\t\tplayer->lookaway = 0;\n\t\t\t\tplayer->yinertia = -0x200;\n\t\t\t\tint dir = parm[0];\n\t\t\t\t\n\t\t\t\tif (dir >= 10)\t\t\t// bump away from the object in parm\n\t\t\t\t{\n\t\t\t\t\to = FindObjectByID2(dir);\n\t\t\t\t\tif (o)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (player->CenterX() > o->CenterX())\n\t\t\t\t\t\t\tdir = 0;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdir = 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (dir == 0)\n\t\t\t\t{\n\t\t\t\t\tplayer->dir = LEFT;\n\t\t\t\t\tplayer->xinertia = 0x200;\n\t\t\t\t}\n\t\t\t\telse if (dir == 2)\n\t\t\t\t{\n\t\t\t\t\tplayer->dir = RIGHT;\n\t\t\t\t\tplayer->xinertia = -0x200;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_WAI: s->delaytimer = parm[0]; return;\n\t\t\tcase OP_WAS: s->wait_standing = true; return;\t// wait until player has blockd\n\t\t\t\n\t\t\tcase OP_SMP: map.tiles[parm[0]][parm[1]]--; break;\n\t\t\t\n\t\t\tcase OP_CMP:\t// change map tile at x:y to z and create smoke\n\t\t\t{\n\t\t\t\tint x = parm[0];\n\t\t\t\tint y = parm[1];\n\t\t\t\tmap.tiles[x][y] = parm[2];\n\t\t\t\t\n\t\t\t\t// get smoke coords\n\t\t\t\tx = ((x * TILE_W) + (TILE_W / 2)) << CSF;\n\t\t\t\ty = ((y * TILE_H) + (TILE_H / 2)) << CSF;\n\t\t\t\t// when tiles are CMP'd during a PRI the smoke is not visible\n\t\t\t\t// until the game is released, so I came up with this scheme\n\t\t\t\t// to make that happen. See the \"you see a button\" destroyable\n\t\t\t\t// box on the 2nd level of Maze M.\n\t\t\t\tif (game.frozen)\n\t\t\t\t{\n\t\t\t\t\to = CreateObject(x, y, OBJ_SMOKE_DROPPER);\n\t\t\t\t\to->timer2 = 4;\t// amount of smoke\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSmokeXY(x, y, 4, TILE_W/2, TILE_H/2);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_QUA: s->nod_delay = game.quaketime = parm[0]; break;\n\t\t\t\n\t\t\tcase OP_LIPLUS: AddHealth(parm[0]); break;\n\t\t\tcase OP_AEPLUS: RefillAllAmmo(); break;\t\t// refills missiles\n\t\t\t\n\t\t\tcase OP_INI: game.switchstage.mapno = NEW_GAME; break;\t\t// restart game from beginning\n\t\t\tcase OP_STC: niku_save(game.counter); break;\n\t\t\t\n\t\t\tcase OP_SVP:\n\t\t\t{\n\t\t\t\tif (!settings->multisave)\n\t\t\t\t{\n\t\t\t\t\tif (!Replay::IsPlaying())\n\t\t\t\t\t\tgame_save(settings->last_save_slot);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextbox.SaveSelect.SetVisible(true, SS_SAVING);\n\t\t\t\t\ts->delaytimer = 9999;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\tcase OP_LDP:\n\t\t\t\tgame.switchstage.mapno = LOAD_GAME;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_HMC: player->hide = true; break;\n\t\t\tcase OP_SMC: player->hide = false; break;\n\t\t\t\n\t\t\t// ---------------------------------------\n\t\t\t\n\t\t\tcase OP_MSG:\t\t// bring up text box\n\t\t\t{\n\t\t\t\t// required for post-Ballos cutscene\n\t\t\t\ttextbox.SetFlags(TUR_PARAMS, false);\n\t\t\t\ttextbox.SetVisible(true, TB_DEFAULTS);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_MS2:\t\t// bring up text box, at top, with no border\n\t\t\t{\n\t\t\t\ttextbox.SetFace(0);\t\t// required for Undead Core intro\n\t\t\t\ttextbox.SetFlags(TUR_PARAMS, false);\n\t\t\t\ttextbox.SetVisible(true, TB_DRAW_AT_TOP | TB_NO_BORDER);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_MS3:\t\t// bring up text box, at top\n\t\t\t{\n\t\t\t\ttextbox.SetFlags(TUR_PARAMS, false);\n\t\t\t\ttextbox.SetVisible(true, TB_DRAW_AT_TOP);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_CLO:\t\t// dismiss text box.\n\t\t\t\ttextbox.SetVisible(false);\n\t\t\t\ttextbox.ClearText();\n\t\t\t\t// ...don't ResetState(), or it'll clear <FAC during Momorin dialog (Hideout)\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_TEXT:\t\t// text to be displayed\n\t\t\t{\n\t\t\t\tstr = (char *)&s->program[s->ip];\n\t\t\t\ts->ip += (strlen(str) + 1);\n\t\t\t\t\n\t\t\t\ttextbox.AddText(str);\n\t\t\t\t\n\t\t\t\t// must yield execution, because the message is busy now.\n\t\t\t\t// however, if the message contains only CR's, then we don't yield,\n\t\t\t\t// because CR's take no time to display.\n\t\t\t\tif (contains_non_cr(str))\n\t\t\t\t{\n\t\t\t\t\t//stat(\"<> Pausing script execution to display message.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t/*else\n\t\t\t\t{\n\t\t\t\t\tstat(\"<> Message is only CR's, continuing script...\");\n\t\t\t\t}*/\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_CLR:\t\t// erase all text in box\n\t\t\t\ttextbox.ClearText();\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_FAC:\t\t// set and slide in given character face\n\t\t\t\ttextbox.SetFace(parm[0]);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_NOD:\t\t// pause till user presses key\n\t\t\t{\n\t\t\t\tif (textbox.IsVisible())\n\t\t\t\t{\n\t\t\t\t\ts->waitforkey = true;\t// pause exec till key pressed\n\t\t\t\t\t// don't release immediately if keys already down\n\t\t\t\t\ts->lastjump = true;\n\t\t\t\t\ts->lastfire = true;\n\t\t\t\t\t\n\t\t\t\t\ttextbox.ShowCursor(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t\t\n\t\t\tcase OP_YNJ:\t\t// prompt Yes or No and jump to given script if No\n\t\t\t{\n\t\t\t\ttextbox.YesNoPrompt.SetVisible(true);\n\t\t\t\ts->ynj_jump = parm[0];\n\t\t\t\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_SAT:\t\t// disables typing animation\n\t\t\tcase OP_CAT:\t\t// unused synonym\n\t\t\t{\n\t\t\t\ttextbox.SetFlags(TB_LINE_AT_ONCE | TB_CURSOR_NEVER_SHOWN, true);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_TUR:\t\t// set text mode to that used for signs\n\t\t\t{\n\t\t\t\ttextbox.SetFlags(TUR_PARAMS, true);\n\t\t\t\ttextbox.SetCanSpeedUp(false);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_GIT:\t\t// show item graphic\n\t\t\t{\n\t\t\t\tif (parm[0] != 0)\n\t\t\t\t{\n\t\t\t\t\tint sprite, frame;\n\t\t\t\t\t\n\t\t\t\t\tif (parm[0] >= 1000)\n\t\t\t\t\t{\t// an item\n\t\t\t\t\t\tsprite = SPR_ITEMIMAGE;\n\t\t\t\t\t\tframe = (parm[0] - 1000);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t// a weapon\n\t\t\t\t\t\tsprite = SPR_ARMSICONS;\n\t\t\t\t\t\tframe = parm[0];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttextbox.ItemImage.SetSprite(sprite, frame);\n\t\t\t\t\ttextbox.ItemImage.SetVisible(true);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextbox.ItemImage.SetVisible(false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_NUM:\n\t\t\t{\t// seems to show the last value that was used with \"AM+\"\n\t\t\t\tchar buf[16];\n\t\t\t\tsprintf(buf, \"%d\", lastammoinc);\n\t\t\t\t\n\t\t\t\ttextbox.AddText(buf);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_SLP:\t// bring up teleporter menu\n\t\t\t{\n\t\t\t\ttextbox.StageSelect.SetVisible(true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_ESC:\n\t\t\t{\n\t\t\t\tStopScript(s);\n\t\t\t\tgame.reset();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\t// ---------------------------------------\n\t\t\t\n\t\t\t// trigger island-falling cinematic\n\t\t\t// if the parameter is 0, the island crashes (good ending);\n\t\t\t// if the parameter is 1, the island survives (best ending)\n\t\t\tcase OP_XX1:\n\t\t\t{\n\t\t\t\tgame.setmode(GM_ISLAND, parm[0]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_CRE:\n\t\t\t{\n\t\t\t\tgame.setmode(GM_CREDITS);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_SIL:\n\t\t\t\tcredit_set_image(parm[0]);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase OP_CIL:\n\t\t\t\tcredit_clear_image();\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tif (cmd < OP_COUNT)\n\t\t\t\t\tconsole.Print(\"- unimplemented opcode %s; script %04d halted.\", cmd_table[cmd].mnemonic, s->scriptno);\n\t\t\t\telse\n\t\t\t\t\tconsole.Print(\"- unimplemented opcode %02x; script %04d halted.\", cmd, s->scriptno);\n\t\t\t\t\n\t\t\t\tStopScript(s);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\nint CVTDir(int csdir)\n{\nconst int cdir_to_nxdir[4] = { LEFT, UP, RIGHT, DOWN };\n\n\tif (csdir >= 0 && csdir < 4)\n\t\treturn cdir_to_nxdir[csdir];\n\t\n\tstaterr(\"CVTDir: invalid direction %d, returning LEFT\", csdir);\n\treturn LEFT;\n}\n\nconst char *DescribeCSDir(int csdir)\n{\n\tswitch(csdir)\n\t{\n\t\tcase 0: return \"LEFT\";\n\t\tcase 1: return \"UP\";\n\t\tcase 2: return \"RIGHT\";\n\t\tcase 3: return \"DOWN\";\n\t\tcase 4: return \"FACE_PLAYER\";\n\t\tcase 5: return \"NO_CHANGE\";\n\t\tdefault: return stprintf(\"Invalid CS Dir %d\", csdir);\n\t}\n}\n\n// converts from a CS direction (0123 = left,up,right,down)\n// into a NXEngine direction (0123 = right,left,up,down),\n// and applies the converted direction to the object.\nvoid SetCSDir(Object *o, int csdir)\n{\n\tif (csdir < 4)\n\t{\n\t\to->dir = CVTDir(csdir);\n\t}\n\telse if (csdir == 4)\n\t{\t// face towards player\n\t\to->dir = (o->x >= player->x) ? LEFT : RIGHT;\n\t}\n\telse if (csdir == 5)\n\t{\t// no-change, used with e.g. ANP\n\t}\n\telse\n\t{\n\t\tstaterr(\"SetCSDir: warning: invalid direction %04d passed as dirparam only\", csdir);\n\t}\n\t\n\t// a few late-game objects, such as statues in the statue room,\n\t// use ANP/CNP's direction parameter as an extra generic parameter\n\t// to the object. I didn't feel it was safe to set a dir of say 200\n\t// in our engine as it may cause crashes somewhere if the sprite was\n\t// ever tried to be drawn using that dir. There's also the complication\n\t// that we're about to munge the requested values since our direction\n\t// constants don't have the same numerical values as CS's engine.\n\t// So is dirparam holds the raw value of the last dir that a script\n\t// tried to set.\n\to->dirparam = csdir;\n}\n\nvoid SetPDir(int d)\n{\n\tif (d == 3)\n\t{\t// look away\n\t\tplayer->lookaway = 1;\n\t}\n\telse\n\t{\n\t\tplayer->lookaway = 0;\n\t\t\n\t\tif (d < 10)\n\t\t{\t// set direction - left/right/up/down\n\t\t\tSetCSDir(player, d);\n\t\t}\n\t\telse\n\t\t{\t// face the object in parm\n\t\t\tObject *o;\n\t\t\t\n\t\t\tif ((o = FindObjectByID2(d)))\n\t\t\t{\n\t\t\t\tplayer->dir = (player->x > o->x) ? LEFT:RIGHT;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tplayer->xinertia = 0;\n\tPSelectFrame();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// call action_function on all NPCs with id2 matching \"id2\".\nvoid NPCDo(int id2, int p1, int p2, void (*action_function)(Object *o, int p1, int p2))\n{\n\t// make a list first, as during <CNP, changing the\n\t// object type may call BringToFront and break stuff\n\t// if there are multiple hits.\n\tObject *hits[MAX_OBJECTS], *o;\n\tint numhits = 0;\n\t\n\tFOREACH_OBJECT(o)\n\t{\n\t\tif (o->id2 == id2 && o != player)\n\t\t{\n\t\t\tif (numhits < MAX_OBJECTS)\n\t\t\t\thits[numhits++] = o;\n\t\t}\n\t}\n\t\n\tfor(int i=0;i<numhits;i++)\n\t\t(*action_function)(hits[i], p1, p2);\n\t\n}\n\nvoid DoANP(Object *o, int p1, int p2)\t\t// ANIMATE (set) object's state to p1 and set dir to p2\n{\n\t#ifdef TRACE_SCRIPT\n\t\tstat(\"ANP: Obj %08x (%s): setting state: %d and dir: %s\", \\\n\t\t\to, DescribeObjectType(o->type), p1, DescribeCSDir(p2));\n\t#endif\n\t\n\to->state = p1;\n\tSetCSDir(o, p2);\n}\n\nvoid DoCNP(Object *o, int p1, int p2)\t\t// CHANGE object to p1 and set dir to p2\n{\n\t#ifdef TRACE_SCRIPT\n\t\tstat(\"CNP: Obj %08x changing from %s to %s, new dir = %s\",\n\t\t\to, DescribeObjectType(o->type), DescribeObjectType(p1), DescribeCSDir(p2));\n\t#endif\n\t\n\t// Must set direction BEFORE changing type, so that the Carried Puppy object\n\t// gets priority over the direction to use while the game is <PRI'd.\n\tSetCSDir(o, p2);\n\to->ChangeType(p1);\n}\n\nvoid DoDNP(Object *o, int p1, int p2)\t\t// DELETE object\n{\n\t#ifdef TRACE_SCRIPT\n\t\tstat(\"DNP: %08x (%s) deleted\", o, DescribeObjectType(o->type));\n\t#endif\n\t\n\to->Delete();\n}\n\n/*\nvoid c------------------------------() {}\n*/\n\n// delimit real newlines in 'in' to \"\\n\"'s.\nvoid crtoslashn(const char *in, char *out)\n{\nint i, j;\n\n\tfor(i=j=0;in[i];i++)\n\t{\n\t\tif (in[i] == 13)\n\t\t{\n\t\t\tout[j++] = '\\\\';\n\t\t\tout[j++] = 'n';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tout[j++] = in[i];\n\t\t}\n\t}\n\t\n\tout[j] = 0;\n}\n\nbool contains_non_cr(const char *str)\n{\n\tfor(int i=0;str[i];i++)\n\t{\n\t\tif (str[i] != '\\r' && str[i] != '\\n')\n\t\t\treturn true;\n\t}\n\t\n\treturn false;\n}\n\n\n\n"
  },
  {
    "path": "tsc.fdh",
    "content": "//hash:a5b57e94\n//automatically generated by Makegen\n\n/* located in game.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nbool game_save(Profile *p);\n\n\n/* located in ObjManager.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nObject *CreateObject(int x, int y, int type);\n\n\n/* located in map.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid map_scroll_lock(bool lockstate);\nvoid map_show_map_name();\nObject *FindObjectByID2(int id2);\nvoid map_focus(Object *o, int spd);\n\n\n/* located in platform.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nFILE *fileopen(const char *fname, const char *mode);\n\n\n/* located in player.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid PSelectSprite(void);\nvoid PSelectFrame(void);\n\n\n/* located in playerstats.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid GetWeapon(int wpn, int ammo);\nvoid LoseWeapon(int wpn);\nvoid TradeWeapon(int oldwpn, int newwpn, int ammo);\nvoid AddInventory(int item);\nvoid DelInventory(int item);\nint FindInventory(int item);\nvoid AddHealth(int hp);\nvoid RefillAllAmmo(void);\n\n\n/* located in tsc.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid Clear();\nstatic void GenLTC(void);\nstatic int MnemonicToIndex(const char *str);\nstatic int MnemonicToOpcode(char *str);\nbool tsc_init(void);\nvoid tsc_close(void);\nbool tsc_load(const char *fname, int pageno);\nchar *tsc_decrypt(const char *fname, int *fsize_out);\nbool tsc_compile(const char *buf, int bufsize, int pageno);\nstatic char nextchar(const char **buf, const char *buf_end);\nstatic int ReadNumber(const char **buf, const char *buf_end);\nstatic void ReadText(DBuffer *script, const char **buf, const char *buf_end);\nvoid RunScripts(void);\nvoid StopScripts(void);\nint GetCurrentScript(void);\nScriptInstance *GetCurrentScriptInstance();\nconst uint8_t *FindScriptData(int scriptno, int pageno, int *page_out);\nScriptInstance *StartScript(int scriptno, int pageno);\nvoid StopScript(ScriptInstance *s);\nbool JumpScript(int newscriptno, int pageno);\nvoid ExecScript(ScriptInstance *s);\nint CVTDir(int csdir);\nconst char *DescribeCSDir(int csdir);\nvoid SetCSDir(Object *o, int csdir);\nvoid SetPDir(int d);\nvoid NPCDo(int id2, int p1, int p2, void (*action_function)(Object *o, int p1, int p2));\nvoid DoANP(Object *o, int p1, int p2);\nvoid DoCNP(Object *o, int p1, int p2);\nvoid DoDNP(Object *o, int p1, int p2);\nvoid crtoslashn(const char *in, char *out);\nbool contains_non_cr(const char *str);\n\n\n/* located in inventory.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid UnlockInventoryInput(void);\n\n\n/* located in debug.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nconst char *DescribeObjectType(int type);\n\n\n/* located in niku.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nbool niku_save(uint32_t value);\n\n\n/* located in ai/sym/smoke.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind);\n\n\n/* located in endgame/credits.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid credit_set_image(int imgno);\nvoid credit_clear_image();\n\n\n/* located in sound/sound.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid sound(int snd);\nvoid music(int songno);\nint music_lastsong();\nvoid StartStreamSound(int freq);\nvoid StartPropSound(void);\nvoid StopLoopSounds(void);\n\n\n/* located in sound/org.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid org_fade(void);\n\n\n/* located in common/stat.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nvoid staterr(const char *fmt, ...);\nvoid stat(const char *fmt, ...);\n\n\n/* located in common/misc.cpp */\n\n//----------------------[referenced from tsc.cpp]--------------------//\nchar *stprintf(const char *fmt, ...);\n\n"
  },
  {
    "path": "tsc.h",
    "content": "\n#ifndef _TSC_H\n#define _TSC_H\n\n// TSC running script instance; there is only ever one running at once\n// but I generalized it as if there might be more just for good style.\nstruct ScriptInstance\n{\n\tconst uint8_t *program;\t\t\t\t// compiled script code\n\tuint32_t ip;\t\t\t\t\t\t// instruction pointer\n\tbool running;\n\t\n\tint scriptno;\t\t\t\t\t\t// script # of active script\n\tint pageno;\t\t\t\t\t\t\t// ScriptPage/namespace # script is in\n\t\n\tint delaytimer;\t\t\t\t\t\t// time left on a <WAI delay\n\t\n\t// used with <NOD\n\tbool waitforkey;\n\tbool lastjump, lastfire;\n\tint nod_delay;\n\t\n\tint ynj_jump;\t\t\t\t\t\t// if != -1, a Yes/No choice is up, and this is the event # to jump to if they pick No.\n\t\n\tbool wait_standing;\t\t\t\t\t// if 1 pauses script until player touches ground\n};\n\n// script \"pages\", like namespaces, for the different tsc files\nenum ScriptPages\n{\n\tSP_HEAD,\t\t\t\t\t\t\t// head.tsc common scripts\n\tSP_MAP,\t\t\t\t\t\t\t\t// map scripts\n\tSP_ARMSITEM,\t\t\t\t\t\t// inventory screen\n\tSP_STAGESELECT,\t\t\t\t\t\t// scripts for Arthur's House teleporter\n\t\n\tNUM_SCRIPT_PAGES\n};\n\nScriptInstance *StartScript(int scriptno, int pageno=SP_MAP);\nvoid StopScript(ScriptInstance *s);\nbool JumpScript(int newscriptno, int pageno=-1);\n\n\n// globally-accessible scripts in head.tsc\n#define SCRIPT_NULL\t\t\t\t0\n#define SCRIPT_EMPTY\t\t\t1\t\t// displays a textbox that says \"Empty.\"\n#define SCRIPT_SAVE\t\t\t\t16\t\t// save-game script\n#define SCRIPT_REFILL\t\t\t17\t\t// health refill script\n#define SCRIPT_REST\t\t\t\t19\t\t// \"Do you want to rest?\"\n#define SCRIPT_MISSILE_LAUNCHER\t30\t\t// spiel about missile launcher when you first get it\n#define SCRIPT_DIED\t\t\t\t40\t\t// \"You have died. Would you like to retry?\"\n#define SCRIPT_DROWNED\t\t\t41\t\t// \"You have drowned. Would you like to retry?\"\n#define SCRIPT_NEVERSEENAGAIN\t42\t\t// \"You were never seen again. Would you like to retry?\"\n\n\n#define OP_AEPLUS\t0                  // 0, 0,\n#define OP_AMPLUS   1               // 2, 0,\n#define OP_AMMINUS  2                // 1, 0,\n#define OP_AMJ      3            // 2, 0,\n#define OP_ANP      4            // 3, 0,\n#define OP_BOA      5           // 1, 0,\n#define OP_BSL      6            // 1, 0,\n#define OP_CAT      7            // 0, 0,\n#define OP_CIL      8            // 0, 0,\n#define OP_CLO      9            // 0, 0,\n#define OP_CLR      10            // 0, 0,\n#define OP_CMP      11            // 3, 0,\n#define OP_CMU      12            // 1, 0,\n#define OP_CNP      13            // 3, 0,\n#define OP_CPS      14            // 0, 0,\n#define OP_CRE      15            // 0, 0,\n#define OP_CSS      16            // 0, 0,\n#define OP_DNA      17            // 1, 0,\n#define OP_DNP      18            // 1, 0,\n#define OP_ECJ      19            // 2, 0,\n#define OP_END      20            // 0, 0,\n#define OP_EQPLUS   21               // 1, 0,\n#define OP_EQMINUS  22                // 1, 0,\n#define OP_ESC      23            // 0, 0,\n#define OP_EVE      24            // 1, 0,\n#define OP_FAC      25            // 1, 0,\n#define OP_FAI      26            // 1, 0,\n#define OP_FAO      27            // 1, 0,\n#define OP_FLPLUS   28               // 1, 0,\n#define OP_FLMINUS  29                // 1, 0,\n#define OP_FLA      30            // 0, 0,\n#define OP_FLJ      31            // 2, 0,\n#define OP_FMU      32            // 0, 0,\n#define OP_FOB      33            // 2, 0,\n#define OP_FOM      34            // 1, 0,\n#define OP_FON      35            // 2, 0,\n#define OP_FRE      36            // 0, 0,\n#define OP_GIT      37            // 1, 0,\n#define OP_HMC      38            // 0, 0,\n#define OP_INI      39            // 0, 0,\n#define OP_INP      40            // 3, 0,\n#define OP_ITPLUS   41               // 1, 0,\n#define OP_ITMINUS  42                // 1, 0,\n#define OP_ITJ      43            // 2, 0,\n#define OP_KEY      44            // 0, 0,\n#define OP_LDP      45            // 0, 0,\n#define OP_LIPLUS   46               // 1, 0,\n#define OP_MLPLUS   47               // 1, 0,\n#define OP_MLP      48            // 0, 0,\n#define OP_MM0      49            // 0, 0,\n#define OP_MNA      50            // 0, 0,\n#define OP_MNP      51            // 4, 0,\n#define OP_MOV      52            // 2, 0,\n#define OP_MPPLUS   53               // 1, 0,\n#define OP_MPJ      54            // 1, 0,\n#define OP_MS2      55            // 0, 0,\n#define OP_MS3      56            // 0, 0,\n#define OP_MSG      57            // 0, 0,\n#define OP_MYB      58            // 1, 0,\n#define OP_MYD      59            // 1, 0,\n#define OP_NCJ      60            // 2, 0,\n#define OP_NOD      61            // 0, 0,\n#define OP_NUM      62            // 1, 0,\n#define OP_PRI      63            // 0, 0,\n#define OP_PSPLUS   64               // 2, 0,\n#define OP_QUA      65            // 1, 0,\n#define OP_RMU      66            // 0, 0,\n#define OP_SAT      67            // 0, 0,\n#define OP_SIL      68            // 1, 0,\n#define OP_SKPLUS   69               // 1, 0,\n#define OP_SKMINUS  70                // 1, 0,\n#define OP_SKJ      71            // 2, 0,\n#define OP_SLP      72            // 0, 0,\n#define OP_SMC      73            // 0, 0,\n#define OP_SMP      74            // 2, 0,\n#define OP_SNP      75            // 4, 0,\n#define OP_SOU      76            // 1, 0,\n#define OP_SPS      77            // 0, 0,\n#define OP_SSS      78            // 1, 0,\n#define OP_STC      79            // 0, 0,\n#define OP_SVP      80            // 0, 0,\n#define OP_TAM      81            // 3, 0,\n#define OP_TRA      82            // 4, 0,\n#define OP_TUR      83            // 0, 0,\n#define OP_UNI      84            // 1, 0,\n#define OP_UNJ      85            // 1, 0,\n#define OP_WAI      86            // 1, 0,\n#define OP_WAS      87            // 0, 0,\n#define OP_XX1      88            // 1, 0,\n#define OP_YNJ      89            // 1, 0,\n#define OP_ZAM      90            // 0, 0\n\n#define OP_COUNT\t91\n\n\n#define OP_TEXT\t\t0xfa\t\t// mine, denotes start of text\n\nint CVTDir(int csdir);\n\n#endif\n"
  },
  {
    "path": "tsc_cmdtbl.h",
    "content": "// #included by tsc.cpp\nconst TSCCommandTable cmd_table[] =\n{\n\t\"AE+\", 0,\n\t\"AM+\", 2,\n\t\"AM-\", 1,\n\t\"AMJ\", 2,\n\t\"ANP\", 3,\n\t\"BOA\", 1,\n\t\"BSL\", 1,\n\t\"CAT\", 0,\n\t\"CIL\", 0,\n\t\"CLO\", 0,\n\t\"CLR\", 0,\n\t\"CMP\", 3,\n\t\"CMU\", 1,\n\t\"CNP\", 3,\n\t\"CPS\", 0,\n\t\"CRE\", 0,\n\t\"CSS\", 0,\n\t\"DNA\", 1,\n\t\"DNP\", 1,\n\t\"ECJ\", 2,\n\t\"END\", 0,\n\t\"EQ+\", 1,\n\t\"EQ-\", 1,\n\t\"ESC\", 0,\n\t\"EVE\", 1,\n\t\"FAC\", 1,\n\t\"FAI\", 1,\n\t\"FAO\", 1,\n\t\"FL+\", 1,\n\t\"FL-\", 1,\n\t\"FLA\", 0,\n\t\"FLJ\", 2,\n\t\"FMU\", 0,\n\t\"FOB\", 2,\n\t\"FOM\", 1,\n\t\"FON\", 2,\n\t\"FRE\", 0,\n\t\"GIT\", 1,\n\t\"HMC\", 0,\n\t\"INI\", 0,\n\t\"INP\", 3,\n\t\"IT+\", 1,\n\t\"IT-\", 1,\n\t\"ITJ\", 2,\n\t\"KEY\", 0,\n\t\"LDP\", 0,\n\t\"LI+\", 1,\n\t\"ML+\", 1,\n\t\"MLP\", 0,\n\t\"MM0\", 0,\n\t\"MNA\", 0,\n\t\"MNP\", 4,\n\t\"MOV\", 2,\n\t\"MP+\", 1,\n\t\"MPJ\", 1,\n\t\"MS2\", 0,\n\t\"MS3\", 0,\n\t\"MSG\", 0,\n\t\"MYB\", 1,\n\t\"MYD\", 1,\n\t\"NCJ\", 2,\n\t\"NOD\", 0,\n\t\"NUM\", 1,\n\t\"PRI\", 0,\n\t\"PS+\", 2,\n\t\"QUA\", 1,\n\t\"RMU\", 0,\n\t\"SAT\", 0,\n\t\"SIL\", 1,\n\t\"SK+\", 1,\n\t\"SK-\", 1,\n\t\"SKJ\", 2,\n\t\"SLP\", 0,\n\t\"SMC\", 0,\n\t\"SMP\", 2,\n\t\"SNP\", 4,\n\t\"SOU\", 1,\n\t\"SPS\", 0,\n\t\"SSS\", 1,\n\t\"STC\", 0,\n\t\"SVP\", 0,\n\t\"TAM\", 3,\n\t\"TRA\", 4,\n\t\"TUR\", 0,\n\t\"UNI\", 1,\n\t\"UNJ\", 1,\n\t\"WAI\", 1,\n\t\"WAS\", 0,\n\t\"XX1\", 1,\n\t\"YNJ\", 1,\n\t\"ZAM\", 0,\n};\n"
  },
  {
    "path": "vararray.h",
    "content": "\n#ifndef _VARARRAY_H\n#define _VARARRAY_H\n\n#include <stdlib.h>\n\ntemplate <typename T>\nclass VarArray\n{\npublic:\n\tVarArray()\n\t{\n\t\tnitems = 0;\n\t\titems = NULL;\n\t}\n\t\n\t~VarArray()\n\t{\n\t\tif (items)\n\t\t\tfree(items);\n\t}\n\t\n\t// retrieves the item at index. if index is outside\n\t// the bounds of the array, returns 0/null.\n\tT get(int index)\n\t{\n\t\tif (index < 0 || index >= nitems)\n\t\t\treturn (T)0;\n\t\t\n\t\treturn items[index];\n\t}\n\t\n\t// put an item into the array at index.\n\t// if index is past the end of the array, the array is expanded.\n\tvoid put(int index, T value)\n\t{\n\t\tif (index >= 0)\n\t\t{\n\t\t\tEnsureAlloc(index + 1);\n\t\t\titems[index] = value;\n\t\t}\n\t}\n\t\n\t// make sure the array is big enough to contain up to allocnum items.\n\t// any unused items are initilized to 0/null.\n\tvoid EnsureAlloc(int allocnum)\n\t{\n\t\tif (allocnum > nitems)\n\t\t{\n\t\t\tif (items == NULL)\n\t\t\t\titems = (T *)malloc(sizeof(T) * allocnum);\n\t\t\telse\n\t\t\t\titems = (T *)realloc(items, (sizeof(T) * allocnum));\n\t\t\t\n\t\t\tmemset(&items[nitems], 0, ((allocnum - nitems) * sizeof(T)));\n\t\t\tnitems = allocnum;\n\t\t}\n\t}\n\t\n\t// convenience function to access it like an array.\n\t// however unlike put(), you cannot use it to expand the array--\n\t// if you try to use it to write outside the bounds of the array,\n\t// the value will simply be lost.\n\tT& operator[] (const int index)\n\t{\n\t\tif (index < 0 || index >= nitems)\n\t\t{\n\t\t\tstatic T ZERO_T;\n\t\t\tmemset(&ZERO_T, 0, sizeof(T));\n\t\t\treturn ZERO_T;\n\t\t}\n\t\t\n\t\treturn items[index];\n\t}\n\t\n\t// set the size of the array to 0 items.\n\tvoid MakeEmpty()\n\t{\n\t\tif (items)\n\t\t{\n\t\t\tfree(items);\n\t\t\titems = NULL;\n\t\t}\n\t\t\n\t\tnitems = 0;\n\t}\n\t\n\tint nitems;\n\t\nprivate:\n\tT *items;\n};\n\n\n\n\n#endif\n\n"
  },
  {
    "path": "xm/README_XM_MUSIC_DATA",
    "content": "Please download \"*.xm\"-music archive here:\n\nhttp://cloud.z-lab.me/public.php?service=files&t=13c2848f4959e54d68d97115f0b7ff27&download\n\nAnd unpack files into \"xm\" dir:\n\tmkdir xm && cd xm\n\tunzip ../xm.zip "
  }
]