Repository: EXL/NXEngine Branch: master Commit: 16bf776febef Files: 401 Total size: 2.1 MB Directory structure: gitextract_eo2jxfjt/ ├── .gitignore ├── DroidSM_Font_License.txt ├── ICON_AUTHOR ├── LICENSE ├── Makefile.dingux ├── Makefile.ezx ├── Makefile.haiku ├── Makefile.linux ├── Makefile.mingw32 ├── Makefile.motomagx ├── NXEngine.pro ├── ObjManager.cpp ├── ObjManager.fdh ├── ObjManager.h ├── README.md ├── TextBox/ │ ├── ItemImage.cpp │ ├── ItemImage.fdh │ ├── ItemImage.h │ ├── SaveSelect.cpp │ ├── SaveSelect.fdh │ ├── SaveSelect.h │ ├── StageSelect.cpp │ ├── StageSelect.fdh │ ├── StageSelect.h │ ├── TextBox.cpp │ ├── TextBox.fdh │ ├── TextBox.h │ ├── YesNoPrompt.cpp │ ├── YesNoPrompt.fdh │ └── YesNoPrompt.h ├── ai/ │ ├── IrregularBBox.cpp │ ├── IrregularBBox.fdh │ ├── IrregularBBox.h │ ├── ai.cpp │ ├── ai.fdh │ ├── ai.h │ ├── almond/ │ │ ├── almond.cpp │ │ ├── almond.fdh │ │ └── almond.h │ ├── balrog_common.cpp │ ├── balrog_common.fdh │ ├── balrog_common.h │ ├── boss/ │ │ ├── balfrog.cpp │ │ ├── balfrog.fdh │ │ ├── balfrog.h │ │ ├── ballos.cpp │ │ ├── ballos.fdh │ │ ├── ballos.h │ │ ├── core.cpp │ │ ├── core.fdh │ │ ├── core.h │ │ ├── heavypress.cpp │ │ ├── heavypress.fdh │ │ ├── heavypress.h │ │ ├── ironhead.cpp │ │ ├── ironhead.fdh │ │ ├── ironhead.h │ │ ├── omega.cpp │ │ ├── omega.fdh │ │ ├── omega.h │ │ ├── sisters.cpp │ │ ├── sisters.fdh │ │ ├── sisters.h │ │ ├── undead_core.cpp │ │ ├── undead_core.fdh │ │ ├── undead_core.h │ │ ├── x.cpp │ │ ├── x.fdh │ │ └── x.h │ ├── egg/ │ │ ├── egg.cpp │ │ ├── egg.fdh │ │ ├── egg2.cpp │ │ ├── egg2.fdh │ │ ├── igor.cpp │ │ └── igor.fdh │ ├── final_battle/ │ │ ├── balcony.cpp │ │ ├── balcony.fdh │ │ ├── doctor.cpp │ │ ├── doctor.fdh │ │ ├── doctor.h │ │ ├── doctor_common.cpp │ │ ├── doctor_common.fdh │ │ ├── doctor_frenzied.cpp │ │ ├── doctor_frenzied.fdh │ │ ├── final_misc.cpp │ │ ├── final_misc.fdh │ │ ├── misery.fdh │ │ ├── misery_battle.cpp │ │ ├── sidekicks.cpp │ │ └── sidekicks.fdh │ ├── first_cave/ │ │ ├── first_cave.cpp │ │ └── first_cave.fdh │ ├── hell/ │ │ ├── ballos_misc.cpp │ │ ├── ballos_misc.fdh │ │ ├── ballos_priest.cpp │ │ ├── ballos_priest.fdh │ │ ├── hell.cpp │ │ └── hell.fdh │ ├── last_cave/ │ │ ├── last_cave.cpp │ │ └── last_cave.fdh │ ├── maze/ │ │ ├── balrog_boss_missiles.cpp │ │ ├── balrog_boss_missiles.fdh │ │ ├── critter_purple.cpp │ │ ├── critter_purple.fdh │ │ ├── gaudi.cpp │ │ ├── gaudi.fdh │ │ ├── labyrinth_m.cpp │ │ ├── labyrinth_m.fdh │ │ ├── maze.cpp │ │ ├── maze.fdh │ │ ├── pooh_black.cpp │ │ └── pooh_black.fdh │ ├── npc/ │ │ ├── balrog.cpp │ │ ├── balrog.fdh │ │ ├── curly.cpp │ │ ├── curly.fdh │ │ ├── curly_ai.cpp │ │ ├── curly_ai.fdh │ │ ├── misery.fdh │ │ ├── misery_ai.cpp │ │ ├── npcguest.cpp │ │ ├── npcguest.fdh │ │ ├── npcplayer.cpp │ │ ├── npcplayer.fdh │ │ ├── npcregu.cpp │ │ └── npcregu.fdh │ ├── oside/ │ │ ├── oside.cpp │ │ └── oside.fdh │ ├── plantation/ │ │ ├── plantation.cpp │ │ └── plantation.fdh │ ├── sand/ │ │ ├── curly_boss.cpp │ │ ├── curly_boss.fdh │ │ ├── puppy.cpp │ │ ├── puppy.fdh │ │ ├── sand.cpp │ │ ├── sand.fdh │ │ ├── toroko_frenzied.cpp │ │ └── toroko_frenzied.fdh │ ├── stdai.h │ ├── sym/ │ │ ├── smoke.cpp │ │ ├── smoke.fdh │ │ ├── sym.cpp │ │ └── sym.fdh │ ├── village/ │ │ ├── balrog_boss_running.cpp │ │ ├── balrog_boss_running.fdh │ │ ├── ma_pignon.cpp │ │ ├── ma_pignon.fdh │ │ ├── village.cpp │ │ └── village.fdh │ ├── weapons/ │ │ ├── blade.cpp │ │ ├── blade.fdh │ │ ├── bubbler.cpp │ │ ├── bubbler.fdh │ │ ├── fireball.cpp │ │ ├── fireball.fdh │ │ ├── missile.cpp │ │ ├── missile.fdh │ │ ├── nemesis.cpp │ │ ├── nemesis.fdh │ │ ├── polar_mgun.cpp │ │ ├── polar_mgun.fdh │ │ ├── snake.cpp │ │ ├── snake.fdh │ │ ├── spur.cpp │ │ ├── spur.fdh │ │ ├── weapons.cpp │ │ ├── weapons.fdh │ │ ├── weapons.h │ │ ├── whimstar.cpp │ │ ├── whimstar.fdh │ │ └── whimstar.h │ └── weed/ │ ├── balrog_boss_flying.cpp │ ├── balrog_boss_flying.fdh │ ├── frenzied_mimiga.cpp │ ├── frenzied_mimiga.fdh │ ├── weed.cpp │ └── weed.fdh ├── autogen/ │ ├── AssignSprites.cpp │ ├── AssignSprites.fdh │ ├── asdefs.h │ ├── objnames.cpp │ ├── objnames.fdh │ ├── sprites.h │ └── stagedata.fdh ├── caret.cpp ├── caret.fdh ├── caret.h ├── common/ │ ├── BList.cpp │ ├── BList.fdh │ ├── BList.h │ ├── DBuffer.cpp │ ├── DBuffer.fdh │ ├── DBuffer.h │ ├── DString.cpp │ ├── DString.fdh │ ├── DString.h │ ├── FileBuffer.cpp │ ├── FileBuffer.fdh │ ├── FileBuffer.h │ ├── InitList.cpp │ ├── InitList.fdh │ ├── InitList.h │ ├── StringList.cpp │ ├── StringList.fdh │ ├── StringList.h │ ├── SupportDefs.h │ ├── basics.h │ ├── bufio.cpp │ ├── bufio.fdh │ ├── bufio.h │ ├── llist.h │ ├── misc.fdh │ ├── misc_comm.cpp │ ├── stat.cpp │ └── stat.fdh ├── config.h ├── console.cpp ├── console.fdh ├── console.h ├── data/ │ ├── bkFog480fix.pbm │ └── bkMoon480fix.pbm ├── debug.cpp ├── debug.fdh ├── debug.h ├── dirnames.h ├── endgame/ │ ├── CredReader.cpp │ ├── CredReader.fdh │ ├── CredReader.h │ ├── credits.cpp │ ├── credits.fdh │ ├── credits.h │ ├── island.cpp │ ├── island.fdh │ ├── island.h │ ├── misc.fdh │ └── misc_end.cpp ├── extract/ │ ├── crc.cpp │ ├── crc.fdh │ ├── extract.cpp │ ├── extract.fdh │ ├── extractfiles.cpp │ ├── extractfiles.fdh │ ├── extractpxt.cpp │ ├── extractpxt.fdh │ ├── extractstages.cpp │ └── extractstages.fdh ├── floattext.cpp ├── floattext.fdh ├── floattext.h ├── game.cpp ├── game.fdh ├── game.h ├── graphics/ │ ├── fbdev.cpp │ ├── fbdev.fdh │ ├── font.cpp │ ├── font.fdh │ ├── font.h │ ├── graphics.cpp │ ├── graphics.fdh │ ├── graphics.h │ ├── nxsurface.cpp │ ├── nxsurface.fdh │ ├── nxsurface.h │ ├── palette.cpp │ ├── palette.fdh │ ├── palette.h │ ├── safemode.cpp │ ├── safemode.fdh │ ├── safemode.h │ ├── sprites.cpp │ ├── sprites.fdh │ ├── sprites.h │ ├── tileset.cpp │ ├── tileset.fdh │ └── tileset.h ├── imgsrc/ │ ├── bkFog-src.psd │ └── bkMoon-src.psd ├── input.cpp ├── input.fdh ├── input.h ├── intro/ │ ├── intro.cpp │ ├── intro.fdh │ ├── intro.h │ ├── title.cpp │ ├── title.fdh │ └── title.h ├── inventory.cpp ├── inventory.fdh ├── inventory.h ├── l10n_strings.h ├── main.cpp ├── main.fdh ├── map.cpp ├── map.fdh ├── map.h ├── map_system.cpp ├── map_system.fdh ├── map_system.h ├── maprecord.h ├── niku.cpp ├── niku.fdh ├── nx.h ├── nx.rc ├── nx_icon.h ├── object.cpp ├── object.fdh ├── object.h ├── p_arms.cpp ├── p_arms.fdh ├── p_arms.h ├── pause/ │ ├── dialog.cpp │ ├── dialog.fdh │ ├── dialog.h │ ├── message.cpp │ ├── message.fdh │ ├── message.h │ ├── objects.cpp │ ├── objects.fdh │ ├── options.cpp │ ├── options.fdh │ ├── options.h │ ├── pause.cpp │ ├── pause.fdh │ └── pause.h ├── platform/ │ ├── EZX/ │ │ ├── EZX_SDL_PollEvent.cpp │ │ ├── EZX_SDL_PollEvent.h │ │ ├── NXEngine.desktop │ │ └── run.sh │ ├── Haiku/ │ │ ├── Balrog_V3_opt │ │ ├── Balrog_V3_opt.hvif │ │ ├── NXEngine.sh │ │ └── nxengine.rdef.in │ └── Linux/ │ ├── vbesync.c │ └── vbesync.fdh ├── platform.cpp ├── platform.fdh ├── platform.h ├── player.cpp ├── player.fdh ├── player.h ├── playerstats.cpp ├── playerstats.fdh ├── profile.cpp ├── profile.fdh ├── profile.h ├── replay.cpp ├── replay.fdh ├── replay.h ├── screeneffect.cpp ├── screeneffect.fdh ├── screeneffect.h ├── settings.cpp ├── settings.fdh ├── settings.h ├── siflib/ │ ├── sectSprites.cpp │ ├── sectSprites.fdh │ ├── sectSprites.h │ ├── sectStringArray.cpp │ ├── sectStringArray.fdh │ ├── sectStringArray.h │ ├── sif.cpp │ ├── sif.fdh │ ├── sif.h │ ├── sifloader.cpp │ ├── sifloader.fdh │ └── sifloader.h ├── slope.cpp ├── slope.fdh ├── slope.h ├── sound/ │ ├── org.cpp │ ├── org.fdh │ ├── org.h │ ├── pxt.cpp │ ├── pxt.fdh │ ├── pxt.h │ ├── sound.cpp │ ├── sound.fdh │ ├── sound.h │ ├── sslib.cpp │ ├── sslib.fdh │ └── sslib.h ├── sprites.sif ├── stageboss.cpp ├── stageboss.fdh ├── stageboss.h ├── stagedata.cpp ├── stagedata.fdh ├── stagedata.h ├── statusbar.cpp ├── statusbar.fdh ├── statusbar.h ├── tools/ │ └── extractmapinfo.c ├── trig.cpp ├── trig.fdh ├── trig.h ├── tsc.cpp ├── tsc.fdh ├── tsc.h ├── tsc_cmdtbl.h ├── vararray.h └── xm/ └── README_XM_MUSIC_DATA ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # Compiled Object files *.slo *.lo *.o *.obj # Compiled Dynamic libraries *.so *.dylib *.dll # Compiled Static libraries *.lai *.la *.a *.lib # User files *.pro.user .directory # Executables *.exe ================================================ FILE: DroidSM_Font_License.txt ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: ICON_AUTHOR ================================================ Author of "nx.ico" and "nx_icon_48.png" images is ~Doctor-Cool: http://doctor-cool.deviantart.com/ Gallery: http://doctor-cool.deviantart.com/art/Cave-Story-Icons-Compilation-283589292 ================================================ FILE: LICENSE ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: Makefile.dingux ================================================ ############################################################################# # Makefile for building: NXEngine (OpenDingux/Dingux devices) # More build information can be found here: https://github.com/EXL/NXEngine.git # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013 # Fixed by EXL on: 11/9/2013 ############################################################################# ####### Compiler, tools and options # Please uncomment "-D_L10N_CP1251" for Russian Localization CC = mipsel-linux-gcc CXX = mipsel-linux-g++ DEFINES = -D_320X240 -D_DINGUX -D_SDL_MIXER # -D_L10N_CP1251 CFLAGS = -pipe -mips32 -O2 -mabi=32 -msoft-float -ffast-math -G0 $(DEFINES) CXXFLAGS = -pipe -mips32 -O2 -O2 -mabi=32 -msoft-float -ffast-math -G0 $(DEFINES) INCPATH = -I/opt/mipsel-linux-uclibc/usr/include -I/opt/mipsel-linux-uclibc/usr/include/SDL -I. LINK = mipsel-linux-g++ LFLAGS = -Wl,-O1 -Wl,-rpath,/opt/mipsel-linux-uclibc/usr/lib LIBS = -lSDLmain -lSDL -lSDL_ttf -lSDL_mixer STRIP = mipsel-linux-strip DEL_FILE = rm -f ####### Output directory OBJECTS_DIR = ./ ####### Files SOURCES = caret.cpp \ console.cpp \ debug.cpp \ floattext.cpp \ game.cpp \ input.cpp \ inventory.cpp \ main.cpp \ map.cpp \ map_system.cpp \ niku.cpp \ object.cpp \ ObjManager.cpp \ p_arms.cpp \ platform.cpp \ player.cpp \ playerstats.cpp \ profile.cpp \ replay.cpp \ screeneffect.cpp \ settings.cpp \ slope.cpp \ stageboss.cpp \ stagedata.cpp \ statusbar.cpp \ trig.cpp \ tsc.cpp \ ai/ai.cpp \ ai/balrog_common.cpp \ ai/IrregularBBox.cpp \ autogen/AssignSprites.cpp \ autogen/objnames.cpp \ common/BList.cpp \ common/bufio.cpp \ common/DBuffer.cpp \ common/DString.cpp \ common/FileBuffer.cpp \ common/InitList.cpp \ common/misc_comm.cpp \ common/stat.cpp \ common/StringList.cpp \ endgame/credits.cpp \ endgame/CredReader.cpp \ endgame/island.cpp \ endgame/misc_end.cpp \ extract/crc.cpp \ extract/extract.cpp \ extract/extractfiles.cpp \ extract/extractpxt.cpp \ extract/extractstages.cpp \ graphics/font.cpp \ graphics/graphics.cpp \ graphics/nxsurface.cpp \ graphics/palette.cpp \ graphics/safemode.cpp \ graphics/sprites.cpp \ graphics/tileset.cpp \ intro/intro.cpp \ intro/title.cpp \ pause/dialog.cpp \ pause/message.cpp \ pause/objects.cpp \ pause/options.cpp \ pause/pause.cpp \ siflib/sectSprites.cpp \ siflib/sectStringArray.cpp \ siflib/sif.cpp \ siflib/sifloader.cpp \ sound/org.cpp \ sound/pxt.cpp \ sound/sound.cpp \ sound/sslib.cpp \ TextBox/ItemImage.cpp \ TextBox/SaveSelect.cpp \ TextBox/StageSelect.cpp \ TextBox/TextBox.cpp \ TextBox/YesNoPrompt.cpp \ ai/almond/almond.cpp \ ai/boss/balfrog.cpp \ ai/boss/ballos.cpp \ ai/boss/core.cpp \ ai/boss/heavypress.cpp \ ai/boss/ironhead.cpp \ ai/boss/omega.cpp \ ai/boss/sisters.cpp \ ai/boss/undead_core.cpp \ ai/boss/x.cpp \ ai/egg/egg.cpp \ ai/egg/egg2.cpp \ ai/egg/igor.cpp \ ai/final_battle/balcony.cpp \ ai/final_battle/doctor.cpp \ ai/final_battle/doctor_common.cpp \ ai/final_battle/doctor_frenzied.cpp \ ai/final_battle/final_misc.cpp \ ai/final_battle/misery_battle.cpp \ ai/final_battle/sidekicks.cpp \ ai/first_cave/first_cave.cpp \ ai/hell/ballos_misc.cpp \ ai/hell/ballos_priest.cpp \ ai/hell/hell.cpp \ ai/last_cave/last_cave.cpp \ ai/maze/balrog_boss_missiles.cpp \ ai/maze/critter_purple.cpp \ ai/maze/gaudi.cpp \ ai/maze/labyrinth_m.cpp \ ai/maze/maze.cpp \ ai/maze/pooh_black.cpp \ ai/npc/balrog.cpp \ ai/npc/curly.cpp \ ai/npc/curly_ai.cpp \ ai/npc/misery_ai.cpp \ ai/npc/npcguest.cpp \ ai/npc/npcplayer.cpp \ ai/npc/npcregu.cpp \ ai/oside/oside.cpp \ ai/plantation/plantation.cpp \ ai/sand/curly_boss.cpp \ ai/sand/puppy.cpp \ ai/sand/sand.cpp \ ai/sand/toroko_frenzied.cpp \ ai/sym/smoke.cpp \ ai/sym/sym.cpp \ ai/village/balrog_boss_running.cpp \ ai/village/ma_pignon.cpp \ ai/village/village.cpp \ ai/weapons/blade.cpp \ ai/weapons/bubbler.cpp \ ai/weapons/fireball.cpp \ ai/weapons/missile.cpp \ ai/weapons/nemesis.cpp \ ai/weapons/polar_mgun.cpp \ ai/weapons/snake.cpp \ ai/weapons/spur.cpp \ ai/weapons/weapons.cpp \ ai/weapons/whimstar.cpp \ ai/weed/balrog_boss_flying.cpp \ ai/weed/frenzied_mimiga.cpp \ ai/weed/weed.cpp \ platform/Linux/vbesync.c OBJECTS = caret.o \ console.o \ debug.o \ floattext.o \ game.o \ input.o \ inventory.o \ main.o \ map.o \ map_system.o \ niku.o \ object.o \ ObjManager.o \ p_arms.o \ platform.o \ player.o \ playerstats.o \ profile.o \ replay.o \ screeneffect.o \ settings.o \ slope.o \ stageboss.o \ stagedata.o \ statusbar.o \ trig.o \ tsc.o \ ai.o \ balrog_common.o \ IrregularBBox.o \ AssignSprites.o \ objnames.o \ BList.o \ bufio.o \ DBuffer.o \ DString.o \ FileBuffer.o \ InitList.o \ misc_comm.o \ stat.o \ StringList.o \ credits.o \ CredReader.o \ island.o \ misc_end.o \ crc.o \ extract.o \ extractfiles.o \ extractpxt.o \ extractstages.o \ font.o \ graphics.o \ nxsurface.o \ palette.o \ safemode.o \ sprites.o \ tileset.o \ intro.o \ title.o \ dialog.o \ message.o \ objects.o \ options.o \ pause.o \ sectSprites.o \ sectStringArray.o \ sif.o \ sifloader.o \ org.o \ pxt.o \ sound.o \ sslib.o \ ItemImage.o \ SaveSelect.o \ StageSelect.o \ TextBox.o \ YesNoPrompt.o \ almond.o \ balfrog.o \ ballos.o \ core.o \ heavypress.o \ ironhead.o \ omega.o \ sisters.o \ undead_core.o \ x.o \ egg.o \ egg2.o \ igor.o \ balcony.o \ doctor.o \ doctor_common.o \ doctor_frenzied.o \ final_misc.o \ misery_battle.o \ sidekicks.o \ first_cave.o \ ballos_misc.o \ ballos_priest.o \ hell.o \ last_cave.o \ balrog_boss_missiles.o \ critter_purple.o \ gaudi.o \ labyrinth_m.o \ maze.o \ pooh_black.o \ balrog.o \ curly.o \ curly_ai.o \ misery_ai.o \ npcguest.o \ npcplayer.o \ npcregu.o \ oside.o \ plantation.o \ curly_boss.o \ puppy.o \ sand.o \ toroko_frenzied.o \ smoke.o \ sym.o \ balrog_boss_running.o \ ma_pignon.o \ village.o \ blade.o \ bubbler.o \ fireball.o \ missile.o \ nemesis.o \ polar_mgun.o \ snake.o \ spur.o \ weapons.o \ whimstar.o \ balrog_boss_flying.o \ frenzied_mimiga.o \ weed.o \ vbesync.o TARGET = nx.dge first: all ####### Implicit rules .SUFFIXES: .o .c .cpp .cc .cxx .C .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" ####### Build rules all: $(TARGET) $(TARGET): $(OBJECTS) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) $(STRIP) $(TARGET) clean: -$(DEL_FILE) $(OBJECTS) -$(DEL_FILE) *~ core *.core ####### Sub-libraries distclean: clean -$(DEL_FILE) $(TARGET) ####### Compile caret.o: caret.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ caret.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp console.o: console.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ console.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp debug.o: debug.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ debug.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp floattext.o: floattext.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ floattext.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp game.o: game.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.h \ endgame/credits.h \ endgame/CredReader.h \ intro/intro.h \ intro/title.h \ pause/pause.h \ pause/options.h \ inventory.h \ map_system.h \ profile.h \ game.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp input.o: input.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ input.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp inventory.o: inventory.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ inventory.h \ inventory.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp main.o: main.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ main.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp map.o: map.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp map_system.o: map_system.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map_system.h \ map_system.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp niku.o: niku.cpp niku.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp object.o: object.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ object.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp ObjManager.o: ObjManager.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ ObjManager.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp p_arms.o: p_arms.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ p_arms.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp platform.o: platform.cpp config.h \ platform.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp player.o: player.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ player.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp playerstats.o: playerstats.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ playerstats.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp profile.o: profile.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ profile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp replay.o: replay.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ replay.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp screeneffect.o: screeneffect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ screeneffect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp settings.o: settings.cpp settings.h \ input.h \ replay.h \ common/FileBuffer.h \ common/DBuffer.h \ common/basics.h \ settings.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp slope.o: slope.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ slope.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp stageboss.o: stageboss.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ stageboss.fdh \ ai/boss/omega.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/x.h \ ai/boss/core.h \ ai/boss/ironhead.h \ ai/boss/sisters.h \ ai/boss/undead_core.h \ ai/boss/heavypress.h \ ai/boss/ballos.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp stagedata.o: stagedata.cpp stagedata.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp statusbar.o: statusbar.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ statusbar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp trig.o: trig.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ trig.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp tsc.o: tsc.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ vararray.h \ tsc.fdh \ tsc_cmdtbl.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp ai.o: ai/ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp balrog_common.o: ai/balrog_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp IrregularBBox.o: ai/IrregularBBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/IrregularBBox.h \ ai/IrregularBBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp AssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp objnames.o: autogen/objnames.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp BList.o: common/BList.cpp common/BList.h \ common/SupportDefs.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp bufio.o: common/bufio.cpp common/DBuffer.h \ common/basics.h \ common/bufio.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp DBuffer.o: common/DBuffer.cpp common/DBuffer.h \ common/basics.h \ common/DBuffer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp DString.o: common/DString.cpp common/DString.h \ common/basics.h \ common/DBuffer.h \ common/DString.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp FileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \ common/DBuffer.h \ common/basics.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp InitList.o: common/InitList.cpp common/InitList.h \ common/InitList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp misc_comm.o: common/misc_comm.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp stat.o: common/stat.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp StringList.o: common/StringList.cpp common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp credits.o: endgame/credits.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/credits.h \ endgame/CredReader.h \ endgame/credits.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp CredReader.o: endgame/CredReader.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/CredReader.h \ endgame/CredReader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp island.o: endgame/island.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp misc_end.o: endgame/misc_end.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp crc.o: extract/crc.cpp extract/crc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp extract.o: extract/extract.cpp graphics/safemode.h \ extract/extract.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp extractfiles.o: extract/extractfiles.cpp common/basics.h \ graphics/safemode.h \ extract/extractfiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp extractpxt.o: extract/extractpxt.cpp graphics/safemode.h \ common/basics.h \ extract/extractpxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp extractstages.o: extract/extractstages.cpp graphics/safemode.h \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/basics.h \ stagedata.h \ maprecord.h \ extract/extractstages.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp font.o: graphics/font.cpp config.h \ nx.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/font.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp graphics.o: graphics/graphics.cpp config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ dirnames.h \ graphics/graphics.fdh \ l10n_strings.h \ nx_icon.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp nxsurface.o: graphics/nxsurface.cpp settings.h \ input.h \ config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/nxsurface.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp palette.o: graphics/palette.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/palette.h \ graphics/palette.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp safemode.o: graphics/safemode.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ graphics/safemode.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp sprites.o: graphics/sprites.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ autogen/sprites.h \ common/StringList.h \ dirnames.h \ settings.h \ input.h \ graphics/sprites.h \ graphics/sprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp tileset.o: graphics/tileset.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/tileset.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp intro.o: intro/intro.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/stdai.h \ intro/intro.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp title.o: intro/title.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ intro/title.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp dialog.o: pause/dialog.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/dialog.h \ pause/options.h \ pause/dialog.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp message.o: pause/message.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/message.h \ pause/options.h \ pause/message.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp objects.o: pause/objects.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ pause/options.h \ pause/objects.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp options.o: pause/options.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/options.h \ pause/dialog.h \ pause/message.h \ l10n_strings.h \ pause/options.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp pause.o: pause/pause.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/pause.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp sectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \ common/basics.h \ common/bufio.h \ common/bufio.fdh \ siflib/sectSprites.h \ siflib/sif.h \ common/misc.fdh \ siflib/sectSprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp sectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \ common/basics.h \ common/DString.h \ common/bufio.h \ common/bufio.fdh \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectStringArray.h \ siflib/sectStringArray.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp sif.o: siflib/sif.cpp siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ siflib/sif.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp sifloader.o: siflib/sifloader.cpp siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sifloader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp org.o: sound/org.cpp common/basics.h \ sound/org.h \ sound/pxt.h \ sound/sslib.h \ sound/org.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp pxt.o: sound/pxt.cpp sound/pxt.h \ common/basics.h \ sound/sslib.h \ sound/pxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp sound.o: sound/sound.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ sound/pxt.h \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp sslib.o: sound/sslib.cpp common/basics.h \ sound/sslib.h \ sound/sslib.fdh \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp ItemImage.o: TextBox/ItemImage.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/ItemImage.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp SaveSelect.o: TextBox/SaveSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ inventory.h \ TextBox/SaveSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp StageSelect.o: TextBox/StageSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/StageSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp TextBox.o: TextBox/TextBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/TextBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp YesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/YesNoPrompt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp almond.o: ai/almond/almond.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/almond/almond.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp balfrog.o: ai/boss/balfrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/balfrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp ballos.o: ai/boss/ballos.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ballos.h \ ai/boss/ballos.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp core.o: ai/boss/core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/boss/core.h \ ai/boss/core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp heavypress.o: ai/boss/heavypress.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/heavypress.h \ ai/boss/heavypress.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp ironhead.o: ai/boss/ironhead.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ironhead.h \ ai/boss/ironhead.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp omega.o: ai/boss/omega.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/omega.h \ ai/boss/omega.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp sisters.o: ai/boss/sisters.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/sisters.h \ ai/boss/sisters.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp undead_core.o: ai/boss/undead_core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/undead_core.h \ ai/boss/undead_core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp x.o: ai/boss/x.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/x.h \ ai/boss/x.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp egg.o: ai/egg/egg.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp egg2.o: ai/egg/egg2.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh \ ai/egg/egg2.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp igor.o: ai/egg/igor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/igor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp balcony.o: ai/final_battle/balcony.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/balcony.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp doctor.o: ai/final_battle/doctor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp doctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp doctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp final_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/final_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp misery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp sidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/sidekicks.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp first_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/first_cave/first_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp ballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp ballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_priest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp hell.o: ai/hell/hell.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/hell.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp last_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/plantation/plantation.fdh \ ai/sym/sym.fdh \ ai/last_cave/last_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp balrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/maze/balrog_boss_missiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp critter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/critter_purple.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp gaudi.o: ai/maze/gaudi.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/gaudi.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp labyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/labyrinth_m.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp maze.o: ai/maze/maze.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/maze.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp pooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/pooh_black.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp balrog.o: ai/npc/balrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/balrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp curly.o: ai/npc/curly.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp curly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly_ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp misery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp npcguest.o: ai/npc/npcguest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcguest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp npcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcplayer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp npcregu.o: ai/npc/npcregu.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/npc/npcregu.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp oside.o: ai/oside/oside.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/sand.fdh \ ai/oside/oside.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp plantation.o: ai/plantation/plantation.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh \ ai/plantation/plantation.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp curly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/curly_boss.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp puppy.o: ai/sand/puppy.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp sand.o: ai/sand/sand.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/egg.fdh \ ai/sand/sand.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp toroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/toroko_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp smoke.o: ai/sym/smoke.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/smoke.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp sym.o: ai/sym/sym.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/sym.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp balrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/village/balrog_boss_running.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp ma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/village/ma_pignon.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp village.o: ai/village/village.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/village/village.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp blade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/blade.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp bubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/bubbler.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp fireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/fireball.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp missile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/missile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp nemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/nemesis.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp polar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/polar_mgun.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp snake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/snake.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp spur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/spur.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp weapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/weapons.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp whimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/whimstar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp balrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/balrog_boss_flying.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp frenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/frenzied_mimiga.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp weed.o: ai/weed/weed.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp vbesync.o: platform/Linux/vbesync.c $(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c ####### Install install: FORCE uninstall: FORCE FORCE: ================================================ FILE: Makefile.ezx ================================================ ############################################################################# # Makefile for building: NXEngine (Motorola MotoEZX phones) # More build information can be found here: https://github.com/EXL/NXEngine.git # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013 # Fixed by EXL on: 11/9/2013 ############################################################################# ####### Compiler, tools and options # Please uncomment "-D_L10N_CP1251" for Russian Localization CC = arm-linux-gnu-gcc CXX = arm-linux-gnu-g++ DEFINES = -D_320X240 -D_MOTOEZX -D_SDL_MIXER # -D_L10N_CP1251 CFLAGS = `sdl-config --cflags` -pipe -O2 -mcpu=iwmmxt -mtune=iwmmxt -march=iwmmxt -marm $(DEFINES) CXXFLAGS = `sdl-config --cflags` -pipe -O2 -mcpu=iwmmxt -mtune=iwmmxt -march=iwmmxt -marm $(DEFINES) INCPATH = -I/opt/toolchains/motoezx/include -I/opt/toolchains/motoezx/include/SDL -I. LINK = arm-linux-gnu-g++ LFLAGS = -Wl,-O1 -Wl,-rpath,/opt/toolchains/motoezx/lib LIBS = `sdl-config --libs` -lSDL_mixer -lSDL_ttf -lstdc++ -lm -lfreetype STRIP = arm-linux-gnu-strip DEL_FILE = rm -f ####### Output directory OBJECTS_DIR = ./ ####### Files SOURCES = caret.cpp \ console.cpp \ debug.cpp \ floattext.cpp \ game.cpp \ input.cpp \ inventory.cpp \ main.cpp \ map.cpp \ map_system.cpp \ niku.cpp \ object.cpp \ ObjManager.cpp \ p_arms.cpp \ platform.cpp \ player.cpp \ playerstats.cpp \ profile.cpp \ replay.cpp \ screeneffect.cpp \ settings.cpp \ slope.cpp \ stageboss.cpp \ stagedata.cpp \ statusbar.cpp \ trig.cpp \ tsc.cpp \ ai/ai.cpp \ ai/balrog_common.cpp \ ai/IrregularBBox.cpp \ autogen/AssignSprites.cpp \ autogen/objnames.cpp \ common/BList.cpp \ common/bufio.cpp \ common/DBuffer.cpp \ common/DString.cpp \ common/FileBuffer.cpp \ common/InitList.cpp \ common/misc_comm.cpp \ common/stat.cpp \ common/StringList.cpp \ endgame/credits.cpp \ endgame/CredReader.cpp \ endgame/island.cpp \ endgame/misc_end.cpp \ extract/crc.cpp \ extract/extract.cpp \ extract/extractfiles.cpp \ extract/extractpxt.cpp \ extract/extractstages.cpp \ graphics/font.cpp \ graphics/graphics.cpp \ graphics/nxsurface.cpp \ graphics/palette.cpp \ graphics/safemode.cpp \ graphics/sprites.cpp \ graphics/tileset.cpp \ intro/intro.cpp \ intro/title.cpp \ pause/dialog.cpp \ pause/message.cpp \ pause/objects.cpp \ pause/options.cpp \ pause/pause.cpp \ siflib/sectSprites.cpp \ siflib/sectStringArray.cpp \ siflib/sif.cpp \ siflib/sifloader.cpp \ sound/org.cpp \ sound/pxt.cpp \ sound/sound.cpp \ sound/sslib.cpp \ TextBox/ItemImage.cpp \ TextBox/SaveSelect.cpp \ TextBox/StageSelect.cpp \ TextBox/TextBox.cpp \ TextBox/YesNoPrompt.cpp \ ai/almond/almond.cpp \ ai/boss/balfrog.cpp \ ai/boss/ballos.cpp \ ai/boss/core.cpp \ ai/boss/heavypress.cpp \ ai/boss/ironhead.cpp \ ai/boss/omega.cpp \ ai/boss/sisters.cpp \ ai/boss/undead_core.cpp \ ai/boss/x.cpp \ ai/egg/egg.cpp \ ai/egg/egg2.cpp \ ai/egg/igor.cpp \ ai/final_battle/balcony.cpp \ ai/final_battle/doctor.cpp \ ai/final_battle/doctor_common.cpp \ ai/final_battle/doctor_frenzied.cpp \ ai/final_battle/final_misc.cpp \ ai/final_battle/misery_battle.cpp \ ai/final_battle/sidekicks.cpp \ ai/first_cave/first_cave.cpp \ ai/hell/ballos_misc.cpp \ ai/hell/ballos_priest.cpp \ ai/hell/hell.cpp \ ai/last_cave/last_cave.cpp \ ai/maze/balrog_boss_missiles.cpp \ ai/maze/critter_purple.cpp \ ai/maze/gaudi.cpp \ ai/maze/labyrinth_m.cpp \ ai/maze/maze.cpp \ ai/maze/pooh_black.cpp \ ai/npc/balrog.cpp \ ai/npc/curly.cpp \ ai/npc/curly_ai.cpp \ ai/npc/misery_ai.cpp \ ai/npc/npcguest.cpp \ ai/npc/npcplayer.cpp \ ai/npc/npcregu.cpp \ ai/oside/oside.cpp \ ai/plantation/plantation.cpp \ ai/sand/curly_boss.cpp \ ai/sand/puppy.cpp \ ai/sand/sand.cpp \ ai/sand/toroko_frenzied.cpp \ ai/sym/smoke.cpp \ ai/sym/sym.cpp \ ai/village/balrog_boss_running.cpp \ ai/village/ma_pignon.cpp \ ai/village/village.cpp \ ai/weapons/blade.cpp \ ai/weapons/bubbler.cpp \ ai/weapons/fireball.cpp \ ai/weapons/missile.cpp \ ai/weapons/nemesis.cpp \ ai/weapons/polar_mgun.cpp \ ai/weapons/snake.cpp \ ai/weapons/spur.cpp \ ai/weapons/weapons.cpp \ ai/weapons/whimstar.cpp \ ai/weed/balrog_boss_flying.cpp \ ai/weed/frenzied_mimiga.cpp \ ai/weed/weed.cpp \ platform/Linux/vbesync.c \ platform/EZX/EZX_SDL_PollEvent.cpp OBJECTS = caret.o \ console.o \ debug.o \ floattext.o \ game.o \ input.o \ inventory.o \ main.o \ map.o \ map_system.o \ niku.o \ object.o \ ObjManager.o \ p_arms.o \ platform.o \ player.o \ playerstats.o \ profile.o \ replay.o \ screeneffect.o \ settings.o \ slope.o \ stageboss.o \ stagedata.o \ statusbar.o \ trig.o \ tsc.o \ ai.o \ balrog_common.o \ IrregularBBox.o \ AssignSprites.o \ objnames.o \ BList.o \ bufio.o \ DBuffer.o \ DString.o \ FileBuffer.o \ InitList.o \ misc_comm.o \ stat.o \ StringList.o \ credits.o \ CredReader.o \ island.o \ misc_end.o \ crc.o \ extract.o \ extractfiles.o \ extractpxt.o \ extractstages.o \ font.o \ graphics.o \ nxsurface.o \ palette.o \ safemode.o \ sprites.o \ tileset.o \ intro.o \ title.o \ dialog.o \ message.o \ objects.o \ options.o \ pause.o \ sectSprites.o \ sectStringArray.o \ sif.o \ sifloader.o \ org.o \ pxt.o \ sound.o \ sslib.o \ ItemImage.o \ SaveSelect.o \ StageSelect.o \ TextBox.o \ YesNoPrompt.o \ almond.o \ balfrog.o \ ballos.o \ core.o \ heavypress.o \ ironhead.o \ omega.o \ sisters.o \ undead_core.o \ x.o \ egg.o \ egg2.o \ igor.o \ balcony.o \ doctor.o \ doctor_common.o \ doctor_frenzied.o \ final_misc.o \ misery_battle.o \ sidekicks.o \ first_cave.o \ ballos_misc.o \ ballos_priest.o \ hell.o \ last_cave.o \ balrog_boss_missiles.o \ critter_purple.o \ gaudi.o \ labyrinth_m.o \ maze.o \ pooh_black.o \ balrog.o \ curly.o \ curly_ai.o \ misery_ai.o \ npcguest.o \ npcplayer.o \ npcregu.o \ oside.o \ plantation.o \ curly_boss.o \ puppy.o \ sand.o \ toroko_frenzied.o \ smoke.o \ sym.o \ balrog_boss_running.o \ ma_pignon.o \ village.o \ blade.o \ bubbler.o \ fireball.o \ missile.o \ nemesis.o \ polar_mgun.o \ snake.o \ spur.o \ weapons.o \ whimstar.o \ balrog_boss_flying.o \ frenzied_mimiga.o \ weed.o \ vbesync.o \ EZX_SDL_PollEvent.o TARGET = nx.ezx first: all ####### Implicit rules .SUFFIXES: .o .c .cpp .cc .cxx .C .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" ####### Build rules all: $(TARGET) $(TARGET): $(OBJECTS) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) $(STRIP) $(TARGET) clean: -$(DEL_FILE) $(OBJECTS) -$(DEL_FILE) *~ core *.core ####### Sub-libraries distclean: clean -$(DEL_FILE) $(TARGET) ####### Compile caret.o: caret.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ caret.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp console.o: console.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ console.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp debug.o: debug.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ debug.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp floattext.o: floattext.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ floattext.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp game.o: game.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.h \ endgame/credits.h \ endgame/CredReader.h \ intro/intro.h \ intro/title.h \ pause/pause.h \ pause/options.h \ inventory.h \ map_system.h \ profile.h \ game.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp input.o: input.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ input.fdh \ platform/EZX/EZX_SDL_PollEvent.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp inventory.o: inventory.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ inventory.h \ inventory.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp main.o: main.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ main.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp map.o: map.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp map_system.o: map_system.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map_system.h \ map_system.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp niku.o: niku.cpp niku.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp object.o: object.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ object.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp ObjManager.o: ObjManager.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ ObjManager.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp p_arms.o: p_arms.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ p_arms.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp platform.o: platform.cpp config.h \ platform.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp player.o: player.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ player.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp playerstats.o: playerstats.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ playerstats.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp profile.o: profile.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ profile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp replay.o: replay.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ replay.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp screeneffect.o: screeneffect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ screeneffect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp settings.o: settings.cpp settings.h \ input.h \ replay.h \ common/FileBuffer.h \ common/DBuffer.h \ common/basics.h \ settings.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp slope.o: slope.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ slope.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp stageboss.o: stageboss.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ stageboss.fdh \ ai/boss/omega.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/x.h \ ai/boss/core.h \ ai/boss/ironhead.h \ ai/boss/sisters.h \ ai/boss/undead_core.h \ ai/boss/heavypress.h \ ai/boss/ballos.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp stagedata.o: stagedata.cpp stagedata.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp statusbar.o: statusbar.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ statusbar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp trig.o: trig.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ trig.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp tsc.o: tsc.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ vararray.h \ tsc.fdh \ tsc_cmdtbl.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp ai.o: ai/ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp balrog_common.o: ai/balrog_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp IrregularBBox.o: ai/IrregularBBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/IrregularBBox.h \ ai/IrregularBBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp AssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp objnames.o: autogen/objnames.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp BList.o: common/BList.cpp common/BList.h \ common/SupportDefs.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp bufio.o: common/bufio.cpp common/DBuffer.h \ common/basics.h \ common/bufio.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp DBuffer.o: common/DBuffer.cpp common/DBuffer.h \ common/basics.h \ common/DBuffer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp DString.o: common/DString.cpp common/DString.h \ common/basics.h \ common/DBuffer.h \ common/DString.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp FileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \ common/DBuffer.h \ common/basics.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp InitList.o: common/InitList.cpp common/InitList.h \ common/InitList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp misc_comm.o: common/misc_comm.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp stat.o: common/stat.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp StringList.o: common/StringList.cpp common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp credits.o: endgame/credits.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/credits.h \ endgame/CredReader.h \ endgame/credits.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp CredReader.o: endgame/CredReader.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/CredReader.h \ endgame/CredReader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp island.o: endgame/island.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp misc_end.o: endgame/misc_end.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp crc.o: extract/crc.cpp extract/crc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp extract.o: extract/extract.cpp graphics/safemode.h \ extract/extract.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp extractfiles.o: extract/extractfiles.cpp common/basics.h \ graphics/safemode.h \ extract/extractfiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp extractpxt.o: extract/extractpxt.cpp graphics/safemode.h \ common/basics.h \ extract/extractpxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp extractstages.o: extract/extractstages.cpp graphics/safemode.h \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/basics.h \ stagedata.h \ maprecord.h \ extract/extractstages.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp font.o: graphics/font.cpp config.h \ nx.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/font.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp graphics.o: graphics/graphics.cpp config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ dirnames.h \ graphics/graphics.fdh \ l10n_strings.h \ nx_icon.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp nxsurface.o: graphics/nxsurface.cpp settings.h \ input.h \ config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/nxsurface.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp palette.o: graphics/palette.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/palette.h \ graphics/palette.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp safemode.o: graphics/safemode.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ graphics/safemode.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp sprites.o: graphics/sprites.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ autogen/sprites.h \ common/StringList.h \ dirnames.h \ settings.h \ input.h \ graphics/sprites.h \ graphics/sprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp tileset.o: graphics/tileset.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/tileset.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp intro.o: intro/intro.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/stdai.h \ intro/intro.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp title.o: intro/title.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ intro/title.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp dialog.o: pause/dialog.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/dialog.h \ pause/options.h \ pause/dialog.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp message.o: pause/message.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/message.h \ pause/options.h \ pause/message.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp objects.o: pause/objects.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ pause/options.h \ pause/objects.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp options.o: pause/options.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/options.h \ pause/dialog.h \ pause/message.h \ l10n_strings.h \ pause/options.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp pause.o: pause/pause.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/pause.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp sectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \ common/basics.h \ common/bufio.h \ common/bufio.fdh \ siflib/sectSprites.h \ siflib/sif.h \ common/misc.fdh \ siflib/sectSprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp sectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \ common/basics.h \ common/DString.h \ common/bufio.h \ common/bufio.fdh \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectStringArray.h \ siflib/sectStringArray.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp sif.o: siflib/sif.cpp siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ siflib/sif.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp sifloader.o: siflib/sifloader.cpp siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sifloader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp org.o: sound/org.cpp common/basics.h \ sound/org.h \ sound/pxt.h \ sound/sslib.h \ sound/org.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp pxt.o: sound/pxt.cpp sound/pxt.h \ common/basics.h \ sound/sslib.h \ sound/pxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp sound.o: sound/sound.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ sound/pxt.h \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp sslib.o: sound/sslib.cpp common/basics.h \ sound/sslib.h \ sound/sslib.fdh \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp ItemImage.o: TextBox/ItemImage.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/ItemImage.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp SaveSelect.o: TextBox/SaveSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ inventory.h \ TextBox/SaveSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp StageSelect.o: TextBox/StageSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/StageSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp TextBox.o: TextBox/TextBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/TextBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp YesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/YesNoPrompt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp almond.o: ai/almond/almond.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/almond/almond.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp balfrog.o: ai/boss/balfrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/balfrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp ballos.o: ai/boss/ballos.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ballos.h \ ai/boss/ballos.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp core.o: ai/boss/core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/boss/core.h \ ai/boss/core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp heavypress.o: ai/boss/heavypress.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/heavypress.h \ ai/boss/heavypress.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp ironhead.o: ai/boss/ironhead.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ironhead.h \ ai/boss/ironhead.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp omega.o: ai/boss/omega.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/omega.h \ ai/boss/omega.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp sisters.o: ai/boss/sisters.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/sisters.h \ ai/boss/sisters.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp undead_core.o: ai/boss/undead_core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/undead_core.h \ ai/boss/undead_core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp x.o: ai/boss/x.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/x.h \ ai/boss/x.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp egg.o: ai/egg/egg.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp egg2.o: ai/egg/egg2.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh \ ai/egg/egg2.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp igor.o: ai/egg/igor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/igor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp balcony.o: ai/final_battle/balcony.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/balcony.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp doctor.o: ai/final_battle/doctor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp doctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp doctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp final_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/final_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp misery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp sidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/sidekicks.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp first_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/first_cave/first_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp ballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp ballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_priest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp hell.o: ai/hell/hell.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/hell.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp last_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/plantation/plantation.fdh \ ai/sym/sym.fdh \ ai/last_cave/last_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp balrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/maze/balrog_boss_missiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp critter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/critter_purple.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp gaudi.o: ai/maze/gaudi.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/gaudi.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp labyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/labyrinth_m.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp maze.o: ai/maze/maze.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/maze.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp pooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/pooh_black.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp balrog.o: ai/npc/balrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/balrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp curly.o: ai/npc/curly.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp curly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly_ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp misery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp npcguest.o: ai/npc/npcguest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcguest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp npcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcplayer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp npcregu.o: ai/npc/npcregu.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/npc/npcregu.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp oside.o: ai/oside/oside.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/sand.fdh \ ai/oside/oside.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp plantation.o: ai/plantation/plantation.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh \ ai/plantation/plantation.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp curly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/curly_boss.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp puppy.o: ai/sand/puppy.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp sand.o: ai/sand/sand.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/egg.fdh \ ai/sand/sand.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp toroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/toroko_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp smoke.o: ai/sym/smoke.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/smoke.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp sym.o: ai/sym/sym.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/sym.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp balrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/village/balrog_boss_running.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp ma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/village/ma_pignon.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp village.o: ai/village/village.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/village/village.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp blade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/blade.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp bubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/bubbler.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp fireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/fireball.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp missile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/missile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp nemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/nemesis.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp polar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/polar_mgun.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp snake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/snake.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp spur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/spur.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp weapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/weapons.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp whimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/whimstar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp balrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/balrog_boss_flying.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp frenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/frenzied_mimiga.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp weed.o: ai/weed/weed.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp vbesync.o: platform/Linux/vbesync.c $(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c EZX_SDL_PollEvent.o: platform/EZX/EZX_SDL_PollEvent.cpp platform/EZX/EZX_SDL_PollEvent.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o EZX_SDL_PollEvent.o platform/EZX/EZX_SDL_PollEvent.cpp ####### Install install: FORCE uninstall: FORCE FORCE: ================================================ FILE: Makefile.haiku ================================================ ############################################################################# # Makefile for building: NXEngine (32/64-bits Haiku OS) # More build information can be found here: https://github.com/EXL/NXEngine.git # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013 # Fixed by EXL on: 10/1/2018 ############################################################################# ####### Compiler, tools and options # Use "setarch x86" command on Haiku OS 32 bit # Use make DEFINES="-D_L10N_CP1251" -f Makefile.haiku for Russian Localization CC = gcc CXX = g++ CFLAGS = -pipe -O2 -D__GNUC_RH_RELEASE__ $(DEFINES) CXXFLAGS = -pipe -O2 -D__GNUC_RH_RELEASE__ $(DEFINES) INCPATH = $(shell sdl-config --cflags) -I. LINK = g++ LFLAGS = -Wl,-O1 LIBS_SHARED = $(shell sdl-config --libs) -lSDL_ttf -lfreetype STRIP = strip -s DEL_FILE = rm -f ####### Output directory OBJECTS_DIR = ./ ####### Files SOURCES = caret.cpp \ console.cpp \ debug.cpp \ floattext.cpp \ game.cpp \ input.cpp \ inventory.cpp \ main.cpp \ map.cpp \ map_system.cpp \ niku.cpp \ object.cpp \ ObjManager.cpp \ p_arms.cpp \ platform.cpp \ player.cpp \ playerstats.cpp \ profile.cpp \ replay.cpp \ screeneffect.cpp \ settings.cpp \ slope.cpp \ stageboss.cpp \ stagedata.cpp \ statusbar.cpp \ trig.cpp \ tsc.cpp \ ai/ai.cpp \ ai/balrog_common.cpp \ ai/IrregularBBox.cpp \ autogen/AssignSprites.cpp \ autogen/objnames.cpp \ common/BList.cpp \ common/bufio.cpp \ common/DBuffer.cpp \ common/DString.cpp \ common/FileBuffer.cpp \ common/InitList.cpp \ common/misc_comm.cpp \ common/stat.cpp \ common/StringList.cpp \ endgame/credits.cpp \ endgame/CredReader.cpp \ endgame/island.cpp \ endgame/misc_end.cpp \ extract/crc.cpp \ extract/extract.cpp \ extract/extractfiles.cpp \ extract/extractpxt.cpp \ extract/extractstages.cpp \ graphics/font.cpp \ graphics/graphics.cpp \ graphics/nxsurface.cpp \ graphics/palette.cpp \ graphics/safemode.cpp \ graphics/sprites.cpp \ graphics/tileset.cpp \ intro/intro.cpp \ intro/title.cpp \ pause/dialog.cpp \ pause/message.cpp \ pause/objects.cpp \ pause/options.cpp \ pause/pause.cpp \ siflib/sectSprites.cpp \ siflib/sectStringArray.cpp \ siflib/sif.cpp \ siflib/sifloader.cpp \ sound/org.cpp \ sound/pxt.cpp \ sound/sound.cpp \ sound/sslib.cpp \ TextBox/ItemImage.cpp \ TextBox/SaveSelect.cpp \ TextBox/StageSelect.cpp \ TextBox/TextBox.cpp \ TextBox/YesNoPrompt.cpp \ ai/almond/almond.cpp \ ai/boss/balfrog.cpp \ ai/boss/ballos.cpp \ ai/boss/core.cpp \ ai/boss/heavypress.cpp \ ai/boss/ironhead.cpp \ ai/boss/omega.cpp \ ai/boss/sisters.cpp \ ai/boss/undead_core.cpp \ ai/boss/x.cpp \ ai/egg/egg.cpp \ ai/egg/egg2.cpp \ ai/egg/igor.cpp \ ai/final_battle/balcony.cpp \ ai/final_battle/doctor.cpp \ ai/final_battle/doctor_common.cpp \ ai/final_battle/doctor_frenzied.cpp \ ai/final_battle/final_misc.cpp \ ai/final_battle/misery_battle.cpp \ ai/final_battle/sidekicks.cpp \ ai/first_cave/first_cave.cpp \ ai/hell/ballos_misc.cpp \ ai/hell/ballos_priest.cpp \ ai/hell/hell.cpp \ ai/last_cave/last_cave.cpp \ ai/maze/balrog_boss_missiles.cpp \ ai/maze/critter_purple.cpp \ ai/maze/gaudi.cpp \ ai/maze/labyrinth_m.cpp \ ai/maze/maze.cpp \ ai/maze/pooh_black.cpp \ ai/npc/balrog.cpp \ ai/npc/curly.cpp \ ai/npc/curly_ai.cpp \ ai/npc/misery_ai.cpp \ ai/npc/npcguest.cpp \ ai/npc/npcplayer.cpp \ ai/npc/npcregu.cpp \ ai/oside/oside.cpp \ ai/plantation/plantation.cpp \ ai/sand/curly_boss.cpp \ ai/sand/puppy.cpp \ ai/sand/sand.cpp \ ai/sand/toroko_frenzied.cpp \ ai/sym/smoke.cpp \ ai/sym/sym.cpp \ ai/village/balrog_boss_running.cpp \ ai/village/ma_pignon.cpp \ ai/village/village.cpp \ ai/weapons/blade.cpp \ ai/weapons/bubbler.cpp \ ai/weapons/fireball.cpp \ ai/weapons/missile.cpp \ ai/weapons/nemesis.cpp \ ai/weapons/polar_mgun.cpp \ ai/weapons/snake.cpp \ ai/weapons/spur.cpp \ ai/weapons/weapons.cpp \ ai/weapons/whimstar.cpp \ ai/weed/balrog_boss_flying.cpp \ ai/weed/frenzied_mimiga.cpp \ ai/weed/weed.cpp \ platform/Linux/vbesync.c OBJECTS = caret.o \ console.o \ debug.o \ floattext.o \ game.o \ input.o \ inventory.o \ main.o \ map.o \ map_system.o \ niku.o \ object.o \ ObjManager.o \ p_arms.o \ platform.o \ player.o \ playerstats.o \ profile.o \ replay.o \ screeneffect.o \ settings.o \ slope.o \ stageboss.o \ stagedata.o \ statusbar.o \ trig.o \ tsc.o \ ai.o \ balrog_common.o \ IrregularBBox.o \ AssignSprites.o \ objnames.o \ BList.o \ bufio.o \ DBuffer.o \ DString.o \ FileBuffer.o \ InitList.o \ misc_comm.o \ stat.o \ StringList.o \ credits.o \ CredReader.o \ island.o \ misc_end.o \ crc.o \ extract.o \ extractfiles.o \ extractpxt.o \ extractstages.o \ font.o \ graphics.o \ nxsurface.o \ palette.o \ safemode.o \ sprites.o \ tileset.o \ intro.o \ title.o \ dialog.o \ message.o \ objects.o \ options.o \ pause.o \ sectSprites.o \ sectStringArray.o \ sif.o \ sifloader.o \ org.o \ pxt.o \ sound.o \ sslib.o \ ItemImage.o \ SaveSelect.o \ StageSelect.o \ TextBox.o \ YesNoPrompt.o \ almond.o \ balfrog.o \ ballos.o \ core.o \ heavypress.o \ ironhead.o \ omega.o \ sisters.o \ undead_core.o \ x.o \ egg.o \ egg2.o \ igor.o \ balcony.o \ doctor.o \ doctor_common.o \ doctor_frenzied.o \ final_misc.o \ misery_battle.o \ sidekicks.o \ first_cave.o \ ballos_misc.o \ ballos_priest.o \ hell.o \ last_cave.o \ balrog_boss_missiles.o \ critter_purple.o \ gaudi.o \ labyrinth_m.o \ maze.o \ pooh_black.o \ balrog.o \ curly.o \ curly_ai.o \ misery_ai.o \ npcguest.o \ npcplayer.o \ npcregu.o \ oside.o \ plantation.o \ curly_boss.o \ puppy.o \ sand.o \ toroko_frenzied.o \ smoke.o \ sym.o \ balrog_boss_running.o \ ma_pignon.o \ village.o \ blade.o \ bubbler.o \ fireball.o \ missile.o \ nemesis.o \ polar_mgun.o \ snake.o \ spur.o \ weapons.o \ whimstar.o \ balrog_boss_flying.o \ frenzied_mimiga.o \ weed.o \ vbesync.o TARGET = nx first: all ####### Implicit rules .SUFFIXES: .o .c .cpp .cc .cxx .C .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" ####### Build rules all: $(TARGET) $(TARGET): $(OBJECTS) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS_SHARED) $(STRIP) $(TARGET) clean: -$(DEL_FILE) $(OBJECTS) -$(DEL_FILE) *~ core *.core ####### Sub-libraries distclean: clean -$(DEL_FILE) $(TARGET) ####### Compile caret.o: caret.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ caret.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp console.o: console.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ console.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp debug.o: debug.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ debug.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp floattext.o: floattext.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ floattext.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp game.o: game.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.h \ endgame/credits.h \ endgame/CredReader.h \ intro/intro.h \ intro/title.h \ pause/pause.h \ pause/options.h \ inventory.h \ map_system.h \ profile.h \ game.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp input.o: input.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ input.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp inventory.o: inventory.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ inventory.h \ inventory.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp main.o: main.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ main.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp map.o: map.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp map_system.o: map_system.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map_system.h \ map_system.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp niku.o: niku.cpp niku.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp object.o: object.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ object.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp ObjManager.o: ObjManager.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ ObjManager.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp p_arms.o: p_arms.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ p_arms.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp platform.o: platform.cpp config.h \ platform.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp player.o: player.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ player.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp playerstats.o: playerstats.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ playerstats.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp profile.o: profile.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ profile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp replay.o: replay.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ replay.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp screeneffect.o: screeneffect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ screeneffect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp settings.o: settings.cpp settings.h \ input.h \ replay.h \ common/FileBuffer.h \ common/DBuffer.h \ common/basics.h \ settings.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp slope.o: slope.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ slope.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp stageboss.o: stageboss.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ stageboss.fdh \ ai/boss/omega.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/x.h \ ai/boss/core.h \ ai/boss/ironhead.h \ ai/boss/sisters.h \ ai/boss/undead_core.h \ ai/boss/heavypress.h \ ai/boss/ballos.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp stagedata.o: stagedata.cpp stagedata.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp statusbar.o: statusbar.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ statusbar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp trig.o: trig.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ trig.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp tsc.o: tsc.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ vararray.h \ tsc.fdh \ tsc_cmdtbl.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp ai.o: ai/ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp balrog_common.o: ai/balrog_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp IrregularBBox.o: ai/IrregularBBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/IrregularBBox.h \ ai/IrregularBBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp AssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp objnames.o: autogen/objnames.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp BList.o: common/BList.cpp common/BList.h \ common/SupportDefs.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp bufio.o: common/bufio.cpp common/DBuffer.h \ common/basics.h \ common/bufio.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp DBuffer.o: common/DBuffer.cpp common/DBuffer.h \ common/basics.h \ common/DBuffer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp DString.o: common/DString.cpp common/DString.h \ common/basics.h \ common/DBuffer.h \ common/DString.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp FileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \ common/DBuffer.h \ common/basics.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp InitList.o: common/InitList.cpp common/InitList.h \ common/InitList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp misc_comm.o: common/misc_comm.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp stat.o: common/stat.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp StringList.o: common/StringList.cpp common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp credits.o: endgame/credits.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/credits.h \ endgame/CredReader.h \ endgame/credits.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp CredReader.o: endgame/CredReader.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/CredReader.h \ endgame/CredReader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp island.o: endgame/island.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp misc_end.o: endgame/misc_end.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp crc.o: extract/crc.cpp extract/crc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp extract.o: extract/extract.cpp graphics/safemode.h \ extract/extract.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp extractfiles.o: extract/extractfiles.cpp common/basics.h \ graphics/safemode.h \ extract/extractfiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp extractpxt.o: extract/extractpxt.cpp graphics/safemode.h \ common/basics.h \ extract/extractpxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp extractstages.o: extract/extractstages.cpp graphics/safemode.h \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/basics.h \ stagedata.h \ maprecord.h \ extract/extractstages.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp font.o: graphics/font.cpp config.h \ nx.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/font.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp graphics.o: graphics/graphics.cpp config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ dirnames.h \ graphics/graphics.fdh \ l10n_strings.h \ nx_icon.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp nxsurface.o: graphics/nxsurface.cpp settings.h \ input.h \ config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/nxsurface.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp palette.o: graphics/palette.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/palette.h \ graphics/palette.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp safemode.o: graphics/safemode.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ graphics/safemode.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp sprites.o: graphics/sprites.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ autogen/sprites.h \ common/StringList.h \ dirnames.h \ settings.h \ input.h \ graphics/sprites.h \ graphics/sprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp tileset.o: graphics/tileset.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/tileset.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp intro.o: intro/intro.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/stdai.h \ intro/intro.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp title.o: intro/title.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ intro/title.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp dialog.o: pause/dialog.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/dialog.h \ pause/options.h \ pause/dialog.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp message.o: pause/message.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/message.h \ pause/options.h \ pause/message.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp objects.o: pause/objects.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ pause/options.h \ pause/objects.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp options.o: pause/options.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/options.h \ pause/dialog.h \ pause/message.h \ l10n_strings.h \ pause/options.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp pause.o: pause/pause.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/pause.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp sectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \ common/basics.h \ common/bufio.h \ common/bufio.fdh \ siflib/sectSprites.h \ siflib/sif.h \ common/misc.fdh \ siflib/sectSprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp sectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \ common/basics.h \ common/DString.h \ common/bufio.h \ common/bufio.fdh \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectStringArray.h \ siflib/sectStringArray.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp sif.o: siflib/sif.cpp siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ siflib/sif.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp sifloader.o: siflib/sifloader.cpp siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sifloader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp org.o: sound/org.cpp common/basics.h \ sound/org.h \ sound/pxt.h \ sound/sslib.h \ sound/org.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp pxt.o: sound/pxt.cpp sound/pxt.h \ common/basics.h \ sound/sslib.h \ sound/pxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp sound.o: sound/sound.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ sound/pxt.h \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp sslib.o: sound/sslib.cpp common/basics.h \ sound/sslib.h \ sound/sslib.fdh \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp ItemImage.o: TextBox/ItemImage.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/ItemImage.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp SaveSelect.o: TextBox/SaveSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ inventory.h \ TextBox/SaveSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp StageSelect.o: TextBox/StageSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/StageSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp TextBox.o: TextBox/TextBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/TextBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp YesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/YesNoPrompt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp almond.o: ai/almond/almond.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/almond/almond.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp balfrog.o: ai/boss/balfrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/balfrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp ballos.o: ai/boss/ballos.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ballos.h \ ai/boss/ballos.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp core.o: ai/boss/core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/boss/core.h \ ai/boss/core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp heavypress.o: ai/boss/heavypress.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/heavypress.h \ ai/boss/heavypress.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp ironhead.o: ai/boss/ironhead.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ironhead.h \ ai/boss/ironhead.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp omega.o: ai/boss/omega.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/omega.h \ ai/boss/omega.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp sisters.o: ai/boss/sisters.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/sisters.h \ ai/boss/sisters.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp undead_core.o: ai/boss/undead_core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/undead_core.h \ ai/boss/undead_core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp x.o: ai/boss/x.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/x.h \ ai/boss/x.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp egg.o: ai/egg/egg.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp egg2.o: ai/egg/egg2.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh \ ai/egg/egg2.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp igor.o: ai/egg/igor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/igor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp balcony.o: ai/final_battle/balcony.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/balcony.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp doctor.o: ai/final_battle/doctor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp doctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp doctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp final_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/final_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp misery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp sidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/sidekicks.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp first_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/first_cave/first_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp ballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp ballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_priest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp hell.o: ai/hell/hell.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/hell.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp last_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/plantation/plantation.fdh \ ai/sym/sym.fdh \ ai/last_cave/last_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp balrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/maze/balrog_boss_missiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp critter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/critter_purple.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp gaudi.o: ai/maze/gaudi.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/gaudi.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp labyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/labyrinth_m.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp maze.o: ai/maze/maze.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/maze.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp pooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/pooh_black.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp balrog.o: ai/npc/balrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/balrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp curly.o: ai/npc/curly.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp curly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly_ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp misery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp npcguest.o: ai/npc/npcguest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcguest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp npcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcplayer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp npcregu.o: ai/npc/npcregu.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/npc/npcregu.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp oside.o: ai/oside/oside.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/sand.fdh \ ai/oside/oside.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp plantation.o: ai/plantation/plantation.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh \ ai/plantation/plantation.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp curly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/curly_boss.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp puppy.o: ai/sand/puppy.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp sand.o: ai/sand/sand.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/egg.fdh \ ai/sand/sand.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp toroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/toroko_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp smoke.o: ai/sym/smoke.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/smoke.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp sym.o: ai/sym/sym.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/sym.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp balrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/village/balrog_boss_running.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp ma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/village/ma_pignon.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp village.o: ai/village/village.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/village/village.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp blade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/blade.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp bubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/bubbler.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp fireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/fireball.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp missile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/missile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp nemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/nemesis.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp polar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/polar_mgun.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp snake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/snake.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp spur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/spur.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp weapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/weapons.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp whimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/whimstar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp balrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/balrog_boss_flying.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp frenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/frenzied_mimiga.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp weed.o: ai/weed/weed.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp vbesync.o: platform/Linux/vbesync.c $(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c ####### Install install: FORCE uninstall: FORCE FORCE: ================================================ FILE: Makefile.linux ================================================ ############################################################################# # Makefile for building: NXEngine (32/64-bits GNU/Linux distros) # More build information can be found here: https://github.com/EXL/NXEngine.git # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013 # Fixed by EXL on: 11/9/2013 ############################################################################# ####### Compiler, tools and options # Please write "static" for static linking "nx" binary with SDL librares # Please uncomment "-D_L10N_CP1251" for Russian Localization BUILD = shared CC = gcc CXX = g++ DEFINES = # -D_L10N_CP1251 CFLAGS = -pipe -O2 $(DEFINES) CXXFLAGS = -pipe -O2 $(DEFINES) INCPATH = -I/usr/include -I/usr/include/SDL -I/usr/local/include -I/usr/local/include/SDL -I. LINK = g++ LFLAGS = -Wl,-O1 -Wl,-rpath,/usr/lib LIBS_SHARED = -lSDL -lSDL_ttf LIBS_STATIC = /usr/local/lib/libSDLmain.a /usr/local/lib/libSDL.a /usr/local/lib/libSDL_ttf.a -ldl -lpthread -lfreetype STRIP = strip DEL_FILE = rm -f ####### Output directory OBJECTS_DIR = ./ ####### Files SOURCES = caret.cpp \ console.cpp \ debug.cpp \ floattext.cpp \ game.cpp \ input.cpp \ inventory.cpp \ main.cpp \ map.cpp \ map_system.cpp \ niku.cpp \ object.cpp \ ObjManager.cpp \ p_arms.cpp \ platform.cpp \ player.cpp \ playerstats.cpp \ profile.cpp \ replay.cpp \ screeneffect.cpp \ settings.cpp \ slope.cpp \ stageboss.cpp \ stagedata.cpp \ statusbar.cpp \ trig.cpp \ tsc.cpp \ ai/ai.cpp \ ai/balrog_common.cpp \ ai/IrregularBBox.cpp \ autogen/AssignSprites.cpp \ autogen/objnames.cpp \ common/BList.cpp \ common/bufio.cpp \ common/DBuffer.cpp \ common/DString.cpp \ common/FileBuffer.cpp \ common/InitList.cpp \ common/misc_comm.cpp \ common/stat.cpp \ common/StringList.cpp \ endgame/credits.cpp \ endgame/CredReader.cpp \ endgame/island.cpp \ endgame/misc_end.cpp \ extract/crc.cpp \ extract/extract.cpp \ extract/extractfiles.cpp \ extract/extractpxt.cpp \ extract/extractstages.cpp \ graphics/font.cpp \ graphics/graphics.cpp \ graphics/nxsurface.cpp \ graphics/palette.cpp \ graphics/safemode.cpp \ graphics/sprites.cpp \ graphics/tileset.cpp \ intro/intro.cpp \ intro/title.cpp \ pause/dialog.cpp \ pause/message.cpp \ pause/objects.cpp \ pause/options.cpp \ pause/pause.cpp \ siflib/sectSprites.cpp \ siflib/sectStringArray.cpp \ siflib/sif.cpp \ siflib/sifloader.cpp \ sound/org.cpp \ sound/pxt.cpp \ sound/sound.cpp \ sound/sslib.cpp \ TextBox/ItemImage.cpp \ TextBox/SaveSelect.cpp \ TextBox/StageSelect.cpp \ TextBox/TextBox.cpp \ TextBox/YesNoPrompt.cpp \ ai/almond/almond.cpp \ ai/boss/balfrog.cpp \ ai/boss/ballos.cpp \ ai/boss/core.cpp \ ai/boss/heavypress.cpp \ ai/boss/ironhead.cpp \ ai/boss/omega.cpp \ ai/boss/sisters.cpp \ ai/boss/undead_core.cpp \ ai/boss/x.cpp \ ai/egg/egg.cpp \ ai/egg/egg2.cpp \ ai/egg/igor.cpp \ ai/final_battle/balcony.cpp \ ai/final_battle/doctor.cpp \ ai/final_battle/doctor_common.cpp \ ai/final_battle/doctor_frenzied.cpp \ ai/final_battle/final_misc.cpp \ ai/final_battle/misery_battle.cpp \ ai/final_battle/sidekicks.cpp \ ai/first_cave/first_cave.cpp \ ai/hell/ballos_misc.cpp \ ai/hell/ballos_priest.cpp \ ai/hell/hell.cpp \ ai/last_cave/last_cave.cpp \ ai/maze/balrog_boss_missiles.cpp \ ai/maze/critter_purple.cpp \ ai/maze/gaudi.cpp \ ai/maze/labyrinth_m.cpp \ ai/maze/maze.cpp \ ai/maze/pooh_black.cpp \ ai/npc/balrog.cpp \ ai/npc/curly.cpp \ ai/npc/curly_ai.cpp \ ai/npc/misery_ai.cpp \ ai/npc/npcguest.cpp \ ai/npc/npcplayer.cpp \ ai/npc/npcregu.cpp \ ai/oside/oside.cpp \ ai/plantation/plantation.cpp \ ai/sand/curly_boss.cpp \ ai/sand/puppy.cpp \ ai/sand/sand.cpp \ ai/sand/toroko_frenzied.cpp \ ai/sym/smoke.cpp \ ai/sym/sym.cpp \ ai/village/balrog_boss_running.cpp \ ai/village/ma_pignon.cpp \ ai/village/village.cpp \ ai/weapons/blade.cpp \ ai/weapons/bubbler.cpp \ ai/weapons/fireball.cpp \ ai/weapons/missile.cpp \ ai/weapons/nemesis.cpp \ ai/weapons/polar_mgun.cpp \ ai/weapons/snake.cpp \ ai/weapons/spur.cpp \ ai/weapons/weapons.cpp \ ai/weapons/whimstar.cpp \ ai/weed/balrog_boss_flying.cpp \ ai/weed/frenzied_mimiga.cpp \ ai/weed/weed.cpp \ platform/Linux/vbesync.c OBJECTS = caret.o \ console.o \ debug.o \ floattext.o \ game.o \ input.o \ inventory.o \ main.o \ map.o \ map_system.o \ niku.o \ object.o \ ObjManager.o \ p_arms.o \ platform.o \ player.o \ playerstats.o \ profile.o \ replay.o \ screeneffect.o \ settings.o \ slope.o \ stageboss.o \ stagedata.o \ statusbar.o \ trig.o \ tsc.o \ ai.o \ balrog_common.o \ IrregularBBox.o \ AssignSprites.o \ objnames.o \ BList.o \ bufio.o \ DBuffer.o \ DString.o \ FileBuffer.o \ InitList.o \ misc_comm.o \ stat.o \ StringList.o \ credits.o \ CredReader.o \ island.o \ misc_end.o \ crc.o \ extract.o \ extractfiles.o \ extractpxt.o \ extractstages.o \ font.o \ graphics.o \ nxsurface.o \ palette.o \ safemode.o \ sprites.o \ tileset.o \ intro.o \ title.o \ dialog.o \ message.o \ objects.o \ options.o \ pause.o \ sectSprites.o \ sectStringArray.o \ sif.o \ sifloader.o \ org.o \ pxt.o \ sound.o \ sslib.o \ ItemImage.o \ SaveSelect.o \ StageSelect.o \ TextBox.o \ YesNoPrompt.o \ almond.o \ balfrog.o \ ballos.o \ core.o \ heavypress.o \ ironhead.o \ omega.o \ sisters.o \ undead_core.o \ x.o \ egg.o \ egg2.o \ igor.o \ balcony.o \ doctor.o \ doctor_common.o \ doctor_frenzied.o \ final_misc.o \ misery_battle.o \ sidekicks.o \ first_cave.o \ ballos_misc.o \ ballos_priest.o \ hell.o \ last_cave.o \ balrog_boss_missiles.o \ critter_purple.o \ gaudi.o \ labyrinth_m.o \ maze.o \ pooh_black.o \ balrog.o \ curly.o \ curly_ai.o \ misery_ai.o \ npcguest.o \ npcplayer.o \ npcregu.o \ oside.o \ plantation.o \ curly_boss.o \ puppy.o \ sand.o \ toroko_frenzied.o \ smoke.o \ sym.o \ balrog_boss_running.o \ ma_pignon.o \ village.o \ blade.o \ bubbler.o \ fireball.o \ missile.o \ nemesis.o \ polar_mgun.o \ snake.o \ spur.o \ weapons.o \ whimstar.o \ balrog_boss_flying.o \ frenzied_mimiga.o \ weed.o \ vbesync.o TARGET = nx first: all ####### Implicit rules .SUFFIXES: .o .c .cpp .cc .cxx .C .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" ####### Build rules all: $(TARGET) $(TARGET): $(OBJECTS) ifeq ($(BUILD),shared) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS_SHARED) endif ifeq ($(BUILD),static) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS_STATIC) endif $(STRIP) $(TARGET) clean: -$(DEL_FILE) $(OBJECTS) -$(DEL_FILE) *~ core *.core ####### Sub-libraries distclean: clean -$(DEL_FILE) $(TARGET) ####### Compile caret.o: caret.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ caret.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp console.o: console.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ console.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp debug.o: debug.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ debug.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp floattext.o: floattext.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ floattext.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp game.o: game.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.h \ endgame/credits.h \ endgame/CredReader.h \ intro/intro.h \ intro/title.h \ pause/pause.h \ pause/options.h \ inventory.h \ map_system.h \ profile.h \ game.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp input.o: input.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ input.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp inventory.o: inventory.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ inventory.h \ inventory.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp main.o: main.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ main.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp map.o: map.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp map_system.o: map_system.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map_system.h \ map_system.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp niku.o: niku.cpp niku.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp object.o: object.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ object.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp ObjManager.o: ObjManager.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ ObjManager.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp p_arms.o: p_arms.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ p_arms.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp platform.o: platform.cpp config.h \ platform.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp player.o: player.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ player.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp playerstats.o: playerstats.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ playerstats.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp profile.o: profile.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ profile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp replay.o: replay.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ replay.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp screeneffect.o: screeneffect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ screeneffect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp settings.o: settings.cpp settings.h \ input.h \ replay.h \ common/FileBuffer.h \ common/DBuffer.h \ common/basics.h \ settings.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp slope.o: slope.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ slope.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp stageboss.o: stageboss.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ stageboss.fdh \ ai/boss/omega.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/x.h \ ai/boss/core.h \ ai/boss/ironhead.h \ ai/boss/sisters.h \ ai/boss/undead_core.h \ ai/boss/heavypress.h \ ai/boss/ballos.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp stagedata.o: stagedata.cpp stagedata.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp statusbar.o: statusbar.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ statusbar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp trig.o: trig.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ trig.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp tsc.o: tsc.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ vararray.h \ tsc.fdh \ tsc_cmdtbl.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp ai.o: ai/ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp balrog_common.o: ai/balrog_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp IrregularBBox.o: ai/IrregularBBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/IrregularBBox.h \ ai/IrregularBBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp AssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp objnames.o: autogen/objnames.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp BList.o: common/BList.cpp common/BList.h \ common/SupportDefs.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp bufio.o: common/bufio.cpp common/DBuffer.h \ common/basics.h \ common/bufio.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp DBuffer.o: common/DBuffer.cpp common/DBuffer.h \ common/basics.h \ common/DBuffer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp DString.o: common/DString.cpp common/DString.h \ common/basics.h \ common/DBuffer.h \ common/DString.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp FileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \ common/DBuffer.h \ common/basics.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp InitList.o: common/InitList.cpp common/InitList.h \ common/InitList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp misc_comm.o: common/misc_comm.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp stat.o: common/stat.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp StringList.o: common/StringList.cpp common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp credits.o: endgame/credits.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/credits.h \ endgame/CredReader.h \ endgame/credits.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp CredReader.o: endgame/CredReader.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/CredReader.h \ endgame/CredReader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp island.o: endgame/island.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp misc_end.o: endgame/misc_end.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp crc.o: extract/crc.cpp extract/crc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp extract.o: extract/extract.cpp graphics/safemode.h \ extract/extract.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp extractfiles.o: extract/extractfiles.cpp common/basics.h \ graphics/safemode.h \ extract/extractfiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp extractpxt.o: extract/extractpxt.cpp graphics/safemode.h \ common/basics.h \ extract/extractpxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp extractstages.o: extract/extractstages.cpp graphics/safemode.h \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/basics.h \ stagedata.h \ maprecord.h \ extract/extractstages.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp font.o: graphics/font.cpp config.h \ nx.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/font.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp graphics.o: graphics/graphics.cpp config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ dirnames.h \ graphics/graphics.fdh \ l10n_strings.h \ nx_icon.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp nxsurface.o: graphics/nxsurface.cpp settings.h \ input.h \ config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/nxsurface.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp palette.o: graphics/palette.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/palette.h \ graphics/palette.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp safemode.o: graphics/safemode.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ graphics/safemode.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp sprites.o: graphics/sprites.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ autogen/sprites.h \ common/StringList.h \ dirnames.h \ settings.h \ input.h \ graphics/sprites.h \ graphics/sprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp tileset.o: graphics/tileset.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/tileset.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp intro.o: intro/intro.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/stdai.h \ intro/intro.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp title.o: intro/title.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ intro/title.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp dialog.o: pause/dialog.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/dialog.h \ pause/options.h \ pause/dialog.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp message.o: pause/message.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/message.h \ pause/options.h \ pause/message.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp objects.o: pause/objects.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ pause/options.h \ pause/objects.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp options.o: pause/options.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/options.h \ pause/dialog.h \ pause/message.h \ l10n_strings.h \ pause/options.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp pause.o: pause/pause.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/pause.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp sectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \ common/basics.h \ common/bufio.h \ common/bufio.fdh \ siflib/sectSprites.h \ siflib/sif.h \ common/misc.fdh \ siflib/sectSprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp sectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \ common/basics.h \ common/DString.h \ common/bufio.h \ common/bufio.fdh \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectStringArray.h \ siflib/sectStringArray.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp sif.o: siflib/sif.cpp siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ siflib/sif.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp sifloader.o: siflib/sifloader.cpp siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sifloader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp org.o: sound/org.cpp common/basics.h \ sound/org.h \ sound/pxt.h \ sound/sslib.h \ sound/org.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp pxt.o: sound/pxt.cpp sound/pxt.h \ common/basics.h \ sound/sslib.h \ sound/pxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp sound.o: sound/sound.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ sound/pxt.h \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp sslib.o: sound/sslib.cpp common/basics.h \ sound/sslib.h \ sound/sslib.fdh \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp ItemImage.o: TextBox/ItemImage.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/ItemImage.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp SaveSelect.o: TextBox/SaveSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ inventory.h \ TextBox/SaveSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp StageSelect.o: TextBox/StageSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/StageSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp TextBox.o: TextBox/TextBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/TextBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp YesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/YesNoPrompt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp almond.o: ai/almond/almond.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/almond/almond.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp balfrog.o: ai/boss/balfrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/balfrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp ballos.o: ai/boss/ballos.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ballos.h \ ai/boss/ballos.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp core.o: ai/boss/core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/boss/core.h \ ai/boss/core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp heavypress.o: ai/boss/heavypress.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/heavypress.h \ ai/boss/heavypress.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp ironhead.o: ai/boss/ironhead.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ironhead.h \ ai/boss/ironhead.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp omega.o: ai/boss/omega.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/omega.h \ ai/boss/omega.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp sisters.o: ai/boss/sisters.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/sisters.h \ ai/boss/sisters.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp undead_core.o: ai/boss/undead_core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/undead_core.h \ ai/boss/undead_core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp x.o: ai/boss/x.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/x.h \ ai/boss/x.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp egg.o: ai/egg/egg.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp egg2.o: ai/egg/egg2.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh \ ai/egg/egg2.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp igor.o: ai/egg/igor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/igor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp balcony.o: ai/final_battle/balcony.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/balcony.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp doctor.o: ai/final_battle/doctor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp doctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp doctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp final_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/final_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp misery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp sidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/sidekicks.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp first_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/first_cave/first_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp ballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp ballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_priest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp hell.o: ai/hell/hell.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/hell.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp last_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/plantation/plantation.fdh \ ai/sym/sym.fdh \ ai/last_cave/last_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp balrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/maze/balrog_boss_missiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp critter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/critter_purple.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp gaudi.o: ai/maze/gaudi.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/gaudi.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp labyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/labyrinth_m.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp maze.o: ai/maze/maze.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/maze.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp pooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/pooh_black.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp balrog.o: ai/npc/balrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/balrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp curly.o: ai/npc/curly.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp curly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly_ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp misery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp npcguest.o: ai/npc/npcguest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcguest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp npcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcplayer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp npcregu.o: ai/npc/npcregu.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/npc/npcregu.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp oside.o: ai/oside/oside.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/sand.fdh \ ai/oside/oside.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp plantation.o: ai/plantation/plantation.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh \ ai/plantation/plantation.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp curly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/curly_boss.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp puppy.o: ai/sand/puppy.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp sand.o: ai/sand/sand.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/egg.fdh \ ai/sand/sand.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp toroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/toroko_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp smoke.o: ai/sym/smoke.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/smoke.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp sym.o: ai/sym/sym.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/sym.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp balrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/village/balrog_boss_running.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp ma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/village/ma_pignon.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp village.o: ai/village/village.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/village/village.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp blade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/blade.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp bubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/bubbler.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp fireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/fireball.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp missile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/missile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp nemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/nemesis.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp polar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/polar_mgun.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp snake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/snake.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp spur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/spur.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp weapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/weapons.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp whimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/whimstar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp balrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/balrog_boss_flying.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp frenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/frenzied_mimiga.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp weed.o: ai/weed/weed.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp vbesync.o: platform/Linux/vbesync.c $(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c ####### Install install: FORCE uninstall: FORCE FORCE: ================================================ FILE: Makefile.mingw32 ================================================ ############################################################################# # Makefile for building: NXEngine (MinGW/MSYS x86 Windows) # More build information can be found here: https://github.com/EXL/NXEngine.git # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013 # Fixed by EXL on: 11/9/2013 ############################################################################# ####### Compiler, tools and options # Please uncomment "-D_L10N_CP1251" for Russian Localization CC = gcc CXX = g++ DEFINES = # -D_L10N_CP1251 CFLAGS = -pipe -O2 -w $(DEFINES) CXXFLAGS = -pipe -O2 -w -frtti -fexceptions -mthreads $(DEFINES) INCPATH = -I/mingw/include -I/mingw/include/SDL -I. LINK = g++ LFLAGS = -static -static-libgcc -static-libstdc++ -Wl,-s -mthreads -Wl,-subsystem,windows LIBS = nx_res.o -lmingw32 -lSDL_ttf -lfreetype -lpng -lz -lSDLmain -lSDL -lgdi32 -lwinmm STRIP = mipsel-linux-strip RES_FILE = nx_res.o DEL_FILE = rm -f ####### Output directory OBJECTS_DIR = ./ ####### Files SOURCES = caret.cpp \ console.cpp \ debug.cpp \ floattext.cpp \ game.cpp \ input.cpp \ inventory.cpp \ main.cpp \ map.cpp \ map_system.cpp \ niku.cpp \ object.cpp \ ObjManager.cpp \ p_arms.cpp \ platform.cpp \ player.cpp \ playerstats.cpp \ profile.cpp \ replay.cpp \ screeneffect.cpp \ settings.cpp \ slope.cpp \ stageboss.cpp \ stagedata.cpp \ statusbar.cpp \ trig.cpp \ tsc.cpp \ ai/ai.cpp \ ai/balrog_common.cpp \ ai/IrregularBBox.cpp \ autogen/AssignSprites.cpp \ autogen/objnames.cpp \ common/BList.cpp \ common/bufio.cpp \ common/DBuffer.cpp \ common/DString.cpp \ common/FileBuffer.cpp \ common/InitList.cpp \ common/misc_comm.cpp \ common/stat.cpp \ common/StringList.cpp \ endgame/credits.cpp \ endgame/CredReader.cpp \ endgame/island.cpp \ endgame/misc_end.cpp \ extract/crc.cpp \ extract/extract.cpp \ extract/extractfiles.cpp \ extract/extractpxt.cpp \ extract/extractstages.cpp \ graphics/font.cpp \ graphics/graphics.cpp \ graphics/nxsurface.cpp \ graphics/palette.cpp \ graphics/safemode.cpp \ graphics/sprites.cpp \ graphics/tileset.cpp \ intro/intro.cpp \ intro/title.cpp \ pause/dialog.cpp \ pause/message.cpp \ pause/objects.cpp \ pause/options.cpp \ pause/pause.cpp \ siflib/sectSprites.cpp \ siflib/sectStringArray.cpp \ siflib/sif.cpp \ siflib/sifloader.cpp \ sound/org.cpp \ sound/pxt.cpp \ sound/sound.cpp \ sound/sslib.cpp \ TextBox/ItemImage.cpp \ TextBox/SaveSelect.cpp \ TextBox/StageSelect.cpp \ TextBox/TextBox.cpp \ TextBox/YesNoPrompt.cpp \ ai/almond/almond.cpp \ ai/boss/balfrog.cpp \ ai/boss/ballos.cpp \ ai/boss/core.cpp \ ai/boss/heavypress.cpp \ ai/boss/ironhead.cpp \ ai/boss/omega.cpp \ ai/boss/sisters.cpp \ ai/boss/undead_core.cpp \ ai/boss/x.cpp \ ai/egg/egg.cpp \ ai/egg/egg2.cpp \ ai/egg/igor.cpp \ ai/final_battle/balcony.cpp \ ai/final_battle/doctor.cpp \ ai/final_battle/doctor_common.cpp \ ai/final_battle/doctor_frenzied.cpp \ ai/final_battle/final_misc.cpp \ ai/final_battle/misery_battle.cpp \ ai/final_battle/sidekicks.cpp \ ai/first_cave/first_cave.cpp \ ai/hell/ballos_misc.cpp \ ai/hell/ballos_priest.cpp \ ai/hell/hell.cpp \ ai/last_cave/last_cave.cpp \ ai/maze/balrog_boss_missiles.cpp \ ai/maze/critter_purple.cpp \ ai/maze/gaudi.cpp \ ai/maze/labyrinth_m.cpp \ ai/maze/maze.cpp \ ai/maze/pooh_black.cpp \ ai/npc/balrog.cpp \ ai/npc/curly.cpp \ ai/npc/curly_ai.cpp \ ai/npc/misery_ai.cpp \ ai/npc/npcguest.cpp \ ai/npc/npcplayer.cpp \ ai/npc/npcregu.cpp \ ai/oside/oside.cpp \ ai/plantation/plantation.cpp \ ai/sand/curly_boss.cpp \ ai/sand/puppy.cpp \ ai/sand/sand.cpp \ ai/sand/toroko_frenzied.cpp \ ai/sym/smoke.cpp \ ai/sym/sym.cpp \ ai/village/balrog_boss_running.cpp \ ai/village/ma_pignon.cpp \ ai/village/village.cpp \ ai/weapons/blade.cpp \ ai/weapons/bubbler.cpp \ ai/weapons/fireball.cpp \ ai/weapons/missile.cpp \ ai/weapons/nemesis.cpp \ ai/weapons/polar_mgun.cpp \ ai/weapons/snake.cpp \ ai/weapons/spur.cpp \ ai/weapons/weapons.cpp \ ai/weapons/whimstar.cpp \ ai/weed/balrog_boss_flying.cpp \ ai/weed/frenzied_mimiga.cpp \ ai/weed/weed.cpp \ platform/Linux/vbesync.c OBJECTS = caret.o \ console.o \ debug.o \ floattext.o \ game.o \ input.o \ inventory.o \ main.o \ map.o \ map_system.o \ niku.o \ object.o \ ObjManager.o \ p_arms.o \ platform.o \ player.o \ playerstats.o \ profile.o \ replay.o \ screeneffect.o \ settings.o \ slope.o \ stageboss.o \ stagedata.o \ statusbar.o \ trig.o \ tsc.o \ ai.o \ balrog_common.o \ IrregularBBox.o \ AssignSprites.o \ objnames.o \ BList.o \ bufio.o \ DBuffer.o \ DString.o \ FileBuffer.o \ InitList.o \ misc_comm.o \ stat.o \ StringList.o \ credits.o \ CredReader.o \ island.o \ misc_end.o \ crc.o \ extract.o \ extractfiles.o \ extractpxt.o \ extractstages.o \ font.o \ graphics.o \ nxsurface.o \ palette.o \ safemode.o \ sprites.o \ tileset.o \ intro.o \ title.o \ dialog.o \ message.o \ objects.o \ options.o \ pause.o \ sectSprites.o \ sectStringArray.o \ sif.o \ sifloader.o \ org.o \ pxt.o \ sound.o \ sslib.o \ ItemImage.o \ SaveSelect.o \ StageSelect.o \ TextBox.o \ YesNoPrompt.o \ almond.o \ balfrog.o \ ballos.o \ core.o \ heavypress.o \ ironhead.o \ omega.o \ sisters.o \ undead_core.o \ x.o \ egg.o \ egg2.o \ igor.o \ balcony.o \ doctor.o \ doctor_common.o \ doctor_frenzied.o \ final_misc.o \ misery_battle.o \ sidekicks.o \ first_cave.o \ ballos_misc.o \ ballos_priest.o \ hell.o \ last_cave.o \ balrog_boss_missiles.o \ critter_purple.o \ gaudi.o \ labyrinth_m.o \ maze.o \ pooh_black.o \ balrog.o \ curly.o \ curly_ai.o \ misery_ai.o \ npcguest.o \ npcplayer.o \ npcregu.o \ oside.o \ plantation.o \ curly_boss.o \ puppy.o \ sand.o \ toroko_frenzied.o \ smoke.o \ sym.o \ balrog_boss_running.o \ ma_pignon.o \ village.o \ blade.o \ bubbler.o \ fireball.o \ missile.o \ nemesis.o \ polar_mgun.o \ snake.o \ spur.o \ weapons.o \ whimstar.o \ balrog_boss_flying.o \ frenzied_mimiga.o \ weed.o \ vbesync.o TARGET = nx.exe first: all ####### Implicit rules .SUFFIXES: .o .c .cpp .cc .cxx .C .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" ####### Build rules all: $(TARGET) $(TARGET): $(OBJECTS) nx_res.o $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) nx_res.o: nx.rc windres -i nx.rc -o nx_res.o --include-dir=. $(DEFINES) clean: -$(DEL_FILE) $(OBJECTS) nx_res.o -$(DEL_FILE) *~ core *.core ####### Sub-libraries distclean: clean -$(DEL_FILE) $(TARGET) ####### Compile caret.o: caret.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ caret.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp console.o: console.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ console.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp debug.o: debug.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ debug.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp floattext.o: floattext.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ floattext.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp game.o: game.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.h \ endgame/credits.h \ endgame/CredReader.h \ intro/intro.h \ intro/title.h \ pause/pause.h \ pause/options.h \ inventory.h \ map_system.h \ profile.h \ game.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp input.o: input.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ input.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp inventory.o: inventory.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ inventory.h \ inventory.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp main.o: main.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ main.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp map.o: map.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp map_system.o: map_system.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map_system.h \ map_system.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp niku.o: niku.cpp niku.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp object.o: object.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ object.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp ObjManager.o: ObjManager.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ ObjManager.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp p_arms.o: p_arms.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ p_arms.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp platform.o: platform.cpp config.h \ platform.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp player.o: player.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ player.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp playerstats.o: playerstats.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ playerstats.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp profile.o: profile.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ profile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp replay.o: replay.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ replay.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp screeneffect.o: screeneffect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ screeneffect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp settings.o: settings.cpp settings.h \ input.h \ replay.h \ common/FileBuffer.h \ common/DBuffer.h \ common/basics.h \ settings.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp slope.o: slope.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ slope.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp stageboss.o: stageboss.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ stageboss.fdh \ ai/boss/omega.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/x.h \ ai/boss/core.h \ ai/boss/ironhead.h \ ai/boss/sisters.h \ ai/boss/undead_core.h \ ai/boss/heavypress.h \ ai/boss/ballos.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp stagedata.o: stagedata.cpp stagedata.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp statusbar.o: statusbar.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ statusbar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp trig.o: trig.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ trig.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp tsc.o: tsc.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ vararray.h \ tsc.fdh \ tsc_cmdtbl.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp ai.o: ai/ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp balrog_common.o: ai/balrog_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp IrregularBBox.o: ai/IrregularBBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/IrregularBBox.h \ ai/IrregularBBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp AssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp objnames.o: autogen/objnames.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp BList.o: common/BList.cpp common/BList.h \ common/SupportDefs.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp bufio.o: common/bufio.cpp common/DBuffer.h \ common/basics.h \ common/bufio.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp DBuffer.o: common/DBuffer.cpp common/DBuffer.h \ common/basics.h \ common/DBuffer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp DString.o: common/DString.cpp common/DString.h \ common/basics.h \ common/DBuffer.h \ common/DString.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp FileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \ common/DBuffer.h \ common/basics.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp InitList.o: common/InitList.cpp common/InitList.h \ common/InitList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp misc_comm.o: common/misc_comm.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp stat.o: common/stat.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp StringList.o: common/StringList.cpp common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp credits.o: endgame/credits.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/credits.h \ endgame/CredReader.h \ endgame/credits.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp CredReader.o: endgame/CredReader.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/CredReader.h \ endgame/CredReader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp island.o: endgame/island.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp misc_end.o: endgame/misc_end.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp crc.o: extract/crc.cpp extract/crc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp extract.o: extract/extract.cpp graphics/safemode.h \ extract/extract.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp extractfiles.o: extract/extractfiles.cpp common/basics.h \ graphics/safemode.h \ extract/extractfiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp extractpxt.o: extract/extractpxt.cpp graphics/safemode.h \ common/basics.h \ extract/extractpxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp extractstages.o: extract/extractstages.cpp graphics/safemode.h \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/basics.h \ stagedata.h \ maprecord.h \ extract/extractstages.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp font.o: graphics/font.cpp config.h \ nx.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/font.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp graphics.o: graphics/graphics.cpp config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ dirnames.h \ graphics/graphics.fdh \ l10n_strings.h \ nx_icon.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp nxsurface.o: graphics/nxsurface.cpp settings.h \ input.h \ config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/nxsurface.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp palette.o: graphics/palette.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/palette.h \ graphics/palette.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp safemode.o: graphics/safemode.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ graphics/safemode.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp sprites.o: graphics/sprites.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ autogen/sprites.h \ common/StringList.h \ dirnames.h \ settings.h \ input.h \ graphics/sprites.h \ graphics/sprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp tileset.o: graphics/tileset.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/tileset.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp intro.o: intro/intro.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/stdai.h \ intro/intro.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp title.o: intro/title.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ intro/title.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp dialog.o: pause/dialog.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/dialog.h \ pause/options.h \ pause/dialog.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp message.o: pause/message.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/message.h \ pause/options.h \ pause/message.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp objects.o: pause/objects.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ pause/options.h \ pause/objects.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp options.o: pause/options.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/options.h \ pause/dialog.h \ pause/message.h \ l10n_strings.h \ pause/options.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp pause.o: pause/pause.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/pause.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp sectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \ common/basics.h \ common/bufio.h \ common/bufio.fdh \ siflib/sectSprites.h \ siflib/sif.h \ common/misc.fdh \ siflib/sectSprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp sectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \ common/basics.h \ common/DString.h \ common/bufio.h \ common/bufio.fdh \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectStringArray.h \ siflib/sectStringArray.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp sif.o: siflib/sif.cpp siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ siflib/sif.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp sifloader.o: siflib/sifloader.cpp siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sifloader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp org.o: sound/org.cpp common/basics.h \ sound/org.h \ sound/pxt.h \ sound/sslib.h \ sound/org.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp pxt.o: sound/pxt.cpp sound/pxt.h \ common/basics.h \ sound/sslib.h \ sound/pxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp sound.o: sound/sound.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ sound/pxt.h \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp sslib.o: sound/sslib.cpp common/basics.h \ sound/sslib.h \ sound/sslib.fdh \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp ItemImage.o: TextBox/ItemImage.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/ItemImage.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp SaveSelect.o: TextBox/SaveSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ inventory.h \ TextBox/SaveSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp StageSelect.o: TextBox/StageSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/StageSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp TextBox.o: TextBox/TextBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/TextBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp YesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/YesNoPrompt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp almond.o: ai/almond/almond.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/almond/almond.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp balfrog.o: ai/boss/balfrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/balfrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp ballos.o: ai/boss/ballos.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ballos.h \ ai/boss/ballos.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp core.o: ai/boss/core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/boss/core.h \ ai/boss/core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp heavypress.o: ai/boss/heavypress.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/heavypress.h \ ai/boss/heavypress.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp ironhead.o: ai/boss/ironhead.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ironhead.h \ ai/boss/ironhead.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp omega.o: ai/boss/omega.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/omega.h \ ai/boss/omega.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp sisters.o: ai/boss/sisters.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/sisters.h \ ai/boss/sisters.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp undead_core.o: ai/boss/undead_core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/undead_core.h \ ai/boss/undead_core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp x.o: ai/boss/x.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/x.h \ ai/boss/x.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp egg.o: ai/egg/egg.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp egg2.o: ai/egg/egg2.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh \ ai/egg/egg2.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp igor.o: ai/egg/igor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/igor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp balcony.o: ai/final_battle/balcony.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/balcony.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp doctor.o: ai/final_battle/doctor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp doctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp doctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp final_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/final_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp misery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp sidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/sidekicks.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp first_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/first_cave/first_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp ballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp ballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_priest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp hell.o: ai/hell/hell.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/hell.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp last_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/plantation/plantation.fdh \ ai/sym/sym.fdh \ ai/last_cave/last_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp balrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/maze/balrog_boss_missiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp critter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/critter_purple.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp gaudi.o: ai/maze/gaudi.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/gaudi.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp labyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/labyrinth_m.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp maze.o: ai/maze/maze.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/maze.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp pooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/pooh_black.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp balrog.o: ai/npc/balrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/balrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp curly.o: ai/npc/curly.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp curly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly_ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp misery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp npcguest.o: ai/npc/npcguest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcguest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp npcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcplayer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp npcregu.o: ai/npc/npcregu.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/npc/npcregu.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp oside.o: ai/oside/oside.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/sand.fdh \ ai/oside/oside.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp plantation.o: ai/plantation/plantation.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh \ ai/plantation/plantation.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp curly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/curly_boss.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp puppy.o: ai/sand/puppy.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp sand.o: ai/sand/sand.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/egg.fdh \ ai/sand/sand.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp toroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/toroko_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp smoke.o: ai/sym/smoke.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/smoke.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp sym.o: ai/sym/sym.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/sym.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp balrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/village/balrog_boss_running.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp ma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/village/ma_pignon.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp village.o: ai/village/village.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/village/village.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp blade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/blade.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp bubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/bubbler.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp fireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/fireball.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp missile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/missile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp nemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/nemesis.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp polar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/polar_mgun.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp snake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/snake.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp spur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/spur.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp weapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/weapons.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp whimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/whimstar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp balrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/balrog_boss_flying.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp frenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/frenzied_mimiga.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp weed.o: ai/weed/weed.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp vbesync.o: platform/Linux/vbesync.c $(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c ####### Install install: FORCE uninstall: FORCE FORCE: ================================================ FILE: Makefile.motomagx ================================================ ############################################################################# # Makefile for building: NXEngine (Motorola MotoMAGX phones) # More build information can be found here: https://github.com/EXL/NXEngine.git # Generated by qmake (2.01a) (Qt 4.8.5) on: Fri Nov 8 11:41:28 2013 # Fixed by EXL on: 11/9/2013 ############################################################################# ####### Compiler, tools and options # Please uncomment "-D_L10N_CP1251" for Russian Localization CC = arm-linux-gnueabi-gcc CXX = arm-linux-gnueabi-g++ DEFINES = -D_320X240 -D_MOTOMAGX -D_SDL_MIXER # -D_L10N_CP1251 CFLAGS = `sdl-config --cflags` -pipe -O2 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp $(DEFINES) CXXFLAGS = `sdl-config --cflags` -pipe -O2 -march=armv6j -mtune=arm1136jf-s -mfpu=vfp $(DEFINES) INCPATH = -I/opt/toolchains/motomagx/arm-eabi2/include -I/opt/toolchains/motomagx/arm-eabi2/include/SDL -I. LINK = arm-linux-gnueabi-g++ LFLAGS = -Wl,-O1 -Wl,-rpath,/opt/toolchains/motomagx/arm-eabi2/lib LIBS = `sdl-config --libs` -lSDL_mixer -lSDL_ttf -lstdc++ -lm -lfreetype STRIP = arm-linux-gnueabi-strip DEL_FILE = rm -f ####### Output directory OBJECTS_DIR = ./ ####### Files SOURCES = caret.cpp \ console.cpp \ debug.cpp \ floattext.cpp \ game.cpp \ input.cpp \ inventory.cpp \ main.cpp \ map.cpp \ map_system.cpp \ niku.cpp \ object.cpp \ ObjManager.cpp \ p_arms.cpp \ platform.cpp \ player.cpp \ playerstats.cpp \ profile.cpp \ replay.cpp \ screeneffect.cpp \ settings.cpp \ slope.cpp \ stageboss.cpp \ stagedata.cpp \ statusbar.cpp \ trig.cpp \ tsc.cpp \ ai/ai.cpp \ ai/balrog_common.cpp \ ai/IrregularBBox.cpp \ autogen/AssignSprites.cpp \ autogen/objnames.cpp \ common/BList.cpp \ common/bufio.cpp \ common/DBuffer.cpp \ common/DString.cpp \ common/FileBuffer.cpp \ common/InitList.cpp \ common/misc_comm.cpp \ common/stat.cpp \ common/StringList.cpp \ endgame/credits.cpp \ endgame/CredReader.cpp \ endgame/island.cpp \ endgame/misc_end.cpp \ extract/crc.cpp \ extract/extract.cpp \ extract/extractfiles.cpp \ extract/extractpxt.cpp \ extract/extractstages.cpp \ graphics/font.cpp \ graphics/graphics.cpp \ graphics/nxsurface.cpp \ graphics/palette.cpp \ graphics/safemode.cpp \ graphics/sprites.cpp \ graphics/tileset.cpp \ intro/intro.cpp \ intro/title.cpp \ pause/dialog.cpp \ pause/message.cpp \ pause/objects.cpp \ pause/options.cpp \ pause/pause.cpp \ siflib/sectSprites.cpp \ siflib/sectStringArray.cpp \ siflib/sif.cpp \ siflib/sifloader.cpp \ sound/org.cpp \ sound/pxt.cpp \ sound/sound.cpp \ sound/sslib.cpp \ TextBox/ItemImage.cpp \ TextBox/SaveSelect.cpp \ TextBox/StageSelect.cpp \ TextBox/TextBox.cpp \ TextBox/YesNoPrompt.cpp \ ai/almond/almond.cpp \ ai/boss/balfrog.cpp \ ai/boss/ballos.cpp \ ai/boss/core.cpp \ ai/boss/heavypress.cpp \ ai/boss/ironhead.cpp \ ai/boss/omega.cpp \ ai/boss/sisters.cpp \ ai/boss/undead_core.cpp \ ai/boss/x.cpp \ ai/egg/egg.cpp \ ai/egg/egg2.cpp \ ai/egg/igor.cpp \ ai/final_battle/balcony.cpp \ ai/final_battle/doctor.cpp \ ai/final_battle/doctor_common.cpp \ ai/final_battle/doctor_frenzied.cpp \ ai/final_battle/final_misc.cpp \ ai/final_battle/misery_battle.cpp \ ai/final_battle/sidekicks.cpp \ ai/first_cave/first_cave.cpp \ ai/hell/ballos_misc.cpp \ ai/hell/ballos_priest.cpp \ ai/hell/hell.cpp \ ai/last_cave/last_cave.cpp \ ai/maze/balrog_boss_missiles.cpp \ ai/maze/critter_purple.cpp \ ai/maze/gaudi.cpp \ ai/maze/labyrinth_m.cpp \ ai/maze/maze.cpp \ ai/maze/pooh_black.cpp \ ai/npc/balrog.cpp \ ai/npc/curly.cpp \ ai/npc/curly_ai.cpp \ ai/npc/misery_ai.cpp \ ai/npc/npcguest.cpp \ ai/npc/npcplayer.cpp \ ai/npc/npcregu.cpp \ ai/oside/oside.cpp \ ai/plantation/plantation.cpp \ ai/sand/curly_boss.cpp \ ai/sand/puppy.cpp \ ai/sand/sand.cpp \ ai/sand/toroko_frenzied.cpp \ ai/sym/smoke.cpp \ ai/sym/sym.cpp \ ai/village/balrog_boss_running.cpp \ ai/village/ma_pignon.cpp \ ai/village/village.cpp \ ai/weapons/blade.cpp \ ai/weapons/bubbler.cpp \ ai/weapons/fireball.cpp \ ai/weapons/missile.cpp \ ai/weapons/nemesis.cpp \ ai/weapons/polar_mgun.cpp \ ai/weapons/snake.cpp \ ai/weapons/spur.cpp \ ai/weapons/weapons.cpp \ ai/weapons/whimstar.cpp \ ai/weed/balrog_boss_flying.cpp \ ai/weed/frenzied_mimiga.cpp \ ai/weed/weed.cpp \ platform/Linux/vbesync.c OBJECTS = caret.o \ console.o \ debug.o \ floattext.o \ game.o \ input.o \ inventory.o \ main.o \ map.o \ map_system.o \ niku.o \ object.o \ ObjManager.o \ p_arms.o \ platform.o \ player.o \ playerstats.o \ profile.o \ replay.o \ screeneffect.o \ settings.o \ slope.o \ stageboss.o \ stagedata.o \ statusbar.o \ trig.o \ tsc.o \ ai.o \ balrog_common.o \ IrregularBBox.o \ AssignSprites.o \ objnames.o \ BList.o \ bufio.o \ DBuffer.o \ DString.o \ FileBuffer.o \ InitList.o \ misc_comm.o \ stat.o \ StringList.o \ credits.o \ CredReader.o \ island.o \ misc_end.o \ crc.o \ extract.o \ extractfiles.o \ extractpxt.o \ extractstages.o \ font.o \ graphics.o \ nxsurface.o \ palette.o \ safemode.o \ sprites.o \ tileset.o \ intro.o \ title.o \ dialog.o \ message.o \ objects.o \ options.o \ pause.o \ sectSprites.o \ sectStringArray.o \ sif.o \ sifloader.o \ org.o \ pxt.o \ sound.o \ sslib.o \ ItemImage.o \ SaveSelect.o \ StageSelect.o \ TextBox.o \ YesNoPrompt.o \ almond.o \ balfrog.o \ ballos.o \ core.o \ heavypress.o \ ironhead.o \ omega.o \ sisters.o \ undead_core.o \ x.o \ egg.o \ egg2.o \ igor.o \ balcony.o \ doctor.o \ doctor_common.o \ doctor_frenzied.o \ final_misc.o \ misery_battle.o \ sidekicks.o \ first_cave.o \ ballos_misc.o \ ballos_priest.o \ hell.o \ last_cave.o \ balrog_boss_missiles.o \ critter_purple.o \ gaudi.o \ labyrinth_m.o \ maze.o \ pooh_black.o \ balrog.o \ curly.o \ curly_ai.o \ misery_ai.o \ npcguest.o \ npcplayer.o \ npcregu.o \ oside.o \ plantation.o \ curly_boss.o \ puppy.o \ sand.o \ toroko_frenzied.o \ smoke.o \ sym.o \ balrog_boss_running.o \ ma_pignon.o \ village.o \ blade.o \ bubbler.o \ fireball.o \ missile.o \ nemesis.o \ polar_mgun.o \ snake.o \ spur.o \ weapons.o \ whimstar.o \ balrog_boss_flying.o \ frenzied_mimiga.o \ weed.o \ vbesync.o TARGET = nx.magx first: all ####### Implicit rules .SUFFIXES: .o .c .cpp .cc .cxx .C .cpp.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cc.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .cxx.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .C.o: $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" .c.o: $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" ####### Build rules all: $(TARGET) $(TARGET): $(OBJECTS) $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) $(STRIP) $(TARGET) clean: -$(DEL_FILE) $(OBJECTS) -$(DEL_FILE) *~ core *.core ####### Sub-libraries distclean: clean -$(DEL_FILE) $(TARGET) ####### Compile caret.o: caret.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ caret.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o caret.o caret.cpp console.o: console.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ console.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console.cpp debug.o: debug.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ debug.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug.o debug.cpp floattext.o: floattext.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ floattext.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o floattext.o floattext.cpp game.o: game.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.h \ endgame/credits.h \ endgame/CredReader.h \ intro/intro.h \ intro/title.h \ pause/pause.h \ pause/options.h \ inventory.h \ map_system.h \ profile.h \ game.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o game.o game.cpp input.o: input.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ input.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o input.o input.cpp inventory.o: inventory.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ inventory.h \ inventory.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o inventory.o inventory.cpp main.o: main.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ main.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp map.o: map.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map.o map.cpp map_system.o: map_system.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ map_system.h \ map_system.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o map_system.o map_system.cpp niku.o: niku.cpp niku.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o niku.o niku.cpp object.o: object.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ object.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o object.o object.cpp ObjManager.o: ObjManager.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ ObjManager.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ObjManager.o ObjManager.cpp p_arms.o: p_arms.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ p_arms.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o p_arms.o p_arms.cpp platform.o: platform.cpp config.h \ platform.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o platform.o platform.cpp player.o: player.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ player.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o player.o player.cpp playerstats.o: playerstats.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ playerstats.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o playerstats.o playerstats.cpp profile.o: profile.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ profile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o profile.o profile.cpp replay.o: replay.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ replay.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o replay.o replay.cpp screeneffect.o: screeneffect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ screeneffect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o screeneffect.o screeneffect.cpp settings.o: settings.cpp settings.h \ input.h \ replay.h \ common/FileBuffer.h \ common/DBuffer.h \ common/basics.h \ settings.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o settings.o settings.cpp slope.o: slope.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ slope.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o slope.o slope.cpp stageboss.o: stageboss.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ stageboss.fdh \ ai/boss/omega.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/x.h \ ai/boss/core.h \ ai/boss/ironhead.h \ ai/boss/sisters.h \ ai/boss/undead_core.h \ ai/boss/heavypress.h \ ai/boss/ballos.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stageboss.o stageboss.cpp stagedata.o: stagedata.cpp stagedata.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stagedata.o stagedata.cpp statusbar.o: statusbar.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ statusbar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o statusbar.o statusbar.cpp trig.o: trig.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ trig.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o trig.o trig.cpp tsc.o: tsc.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ vararray.h \ tsc.fdh \ tsc_cmdtbl.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tsc.o tsc.cpp ai.o: ai/ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ai.o ai/ai.cpp balrog_common.o: ai/balrog_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_common.o ai/balrog_common.cpp IrregularBBox.o: ai/IrregularBBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/IrregularBBox.h \ ai/IrregularBBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o IrregularBBox.o ai/IrregularBBox.cpp AssignSprites.o: autogen/AssignSprites.cpp autogen/asdefs.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o AssignSprites.o autogen/AssignSprites.cpp objnames.o: autogen/objnames.cpp $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objnames.o autogen/objnames.cpp BList.o: common/BList.cpp common/BList.h \ common/SupportDefs.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o BList.o common/BList.cpp bufio.o: common/bufio.cpp common/DBuffer.h \ common/basics.h \ common/bufio.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bufio.o common/bufio.cpp DBuffer.o: common/DBuffer.cpp common/DBuffer.h \ common/basics.h \ common/DBuffer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DBuffer.o common/DBuffer.cpp DString.o: common/DString.cpp common/DString.h \ common/basics.h \ common/DBuffer.h \ common/DString.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o DString.o common/DString.cpp FileBuffer.o: common/FileBuffer.cpp common/FileBuffer.h \ common/DBuffer.h \ common/basics.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o FileBuffer.o common/FileBuffer.cpp InitList.o: common/InitList.cpp common/InitList.h \ common/InitList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o InitList.o common/InitList.cpp misc_comm.o: common/misc_comm.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_comm.o common/misc_comm.cpp stat.o: common/stat.cpp common/basics.h \ common/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stat.o common/stat.cpp StringList.o: common/StringList.cpp common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StringList.o common/StringList.cpp credits.o: endgame/credits.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/credits.h \ endgame/CredReader.h \ endgame/credits.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o credits.o endgame/credits.cpp CredReader.o: endgame/CredReader.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/CredReader.h \ endgame/CredReader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o CredReader.o endgame/CredReader.cpp island.o: endgame/island.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/island.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o island.o endgame/island.cpp misc_end.o: endgame/misc_end.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ endgame/misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misc_end.o endgame/misc_end.cpp crc.o: extract/crc.cpp extract/crc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o crc.o extract/crc.cpp extract.o: extract/extract.cpp graphics/safemode.h \ extract/extract.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extract.o extract/extract.cpp extractfiles.o: extract/extractfiles.cpp common/basics.h \ graphics/safemode.h \ extract/extractfiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractfiles.o extract/extractfiles.cpp extractpxt.o: extract/extractpxt.cpp graphics/safemode.h \ common/basics.h \ extract/extractpxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractpxt.o extract/extractpxt.cpp extractstages.o: extract/extractstages.cpp graphics/safemode.h \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ common/basics.h \ stagedata.h \ maprecord.h \ extract/extractstages.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o extractstages.o extract/extractstages.cpp font.o: graphics/font.cpp config.h \ nx.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/font.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o font.o graphics/font.cpp graphics.o: graphics/graphics.cpp config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ dirnames.h \ graphics/graphics.fdh \ l10n_strings.h \ nx_icon.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o graphics.o graphics/graphics.cpp nxsurface.o: graphics/nxsurface.cpp settings.h \ input.h \ config.h \ graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/nxsurface.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nxsurface.o graphics/nxsurface.cpp palette.o: graphics/palette.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/palette.h \ graphics/palette.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o palette.o graphics/palette.cpp safemode.o: graphics/safemode.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ graphics/safemode.h \ graphics/safemode.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o safemode.o graphics/safemode.cpp sprites.o: graphics/sprites.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ autogen/sprites.h \ common/StringList.h \ dirnames.h \ settings.h \ input.h \ graphics/sprites.h \ graphics/sprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sprites.o graphics/sprites.cpp tileset.o: graphics/tileset.cpp graphics/graphics.h \ graphics/nxsurface.h \ common/basics.h \ graphics/tileset.h \ graphics/tileset.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o tileset.o graphics/tileset.cpp intro.o: intro/intro.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/stdai.h \ intro/intro.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o intro.o intro/intro.cpp title.o: intro/title.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ intro/title.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o title.o intro/title.cpp dialog.o: pause/dialog.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/dialog.h \ pause/options.h \ pause/dialog.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dialog.o pause/dialog.cpp message.o: pause/message.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/message.h \ pause/options.h \ pause/message.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o message.o pause/message.cpp objects.o: pause/objects.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ common/llist.h \ pause/options.h \ pause/objects.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o objects.o pause/objects.cpp options.o: pause/options.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/options.h \ pause/dialog.h \ pause/message.h \ l10n_strings.h \ pause/options.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o options.o pause/options.cpp pause.o: pause/pause.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ pause/pause.fdh \ l10n_strings.h $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pause.o pause/pause.cpp sectSprites.o: siflib/sectSprites.cpp common/DBuffer.h \ common/basics.h \ common/bufio.h \ common/bufio.fdh \ siflib/sectSprites.h \ siflib/sif.h \ common/misc.fdh \ siflib/sectSprites.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectSprites.o siflib/sectSprites.cpp sectStringArray.o: siflib/sectStringArray.cpp common/DBuffer.h \ common/basics.h \ common/DString.h \ common/bufio.h \ common/bufio.fdh \ common/StringList.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectStringArray.h \ siflib/sectStringArray.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sectStringArray.o siflib/sectStringArray.cpp sif.o: siflib/sif.cpp siflib/sif.h \ common/misc.fdh \ siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ siflib/sif.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sif.o siflib/sif.cpp sifloader.o: siflib/sifloader.cpp siflib/sifloader.h \ common/BList.h \ common/SupportDefs.h \ siflib/sifloader.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sifloader.o siflib/sifloader.cpp org.o: sound/org.cpp common/basics.h \ sound/org.h \ sound/pxt.h \ sound/sslib.h \ sound/org.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o org.o sound/org.cpp pxt.o: sound/pxt.cpp sound/pxt.h \ common/basics.h \ sound/sslib.h \ sound/pxt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pxt.o sound/pxt.cpp sound.o: sound/sound.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ sound/pxt.h \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sound.o sound/sound.cpp sslib.o: sound/sslib.cpp common/basics.h \ sound/sslib.h \ sound/sslib.fdh \ sound/sound.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sslib.o sound/sslib.cpp ItemImage.o: TextBox/ItemImage.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/ItemImage.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ItemImage.o TextBox/ItemImage.cpp SaveSelect.o: TextBox/SaveSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ profile.h \ inventory.h \ TextBox/SaveSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o SaveSelect.o TextBox/SaveSelect.cpp StageSelect.o: TextBox/StageSelect.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/StageSelect.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o StageSelect.o TextBox/StageSelect.cpp TextBox.o: TextBox/TextBox.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/TextBox.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o TextBox.o TextBox/TextBox.cpp YesNoPrompt.o: TextBox/YesNoPrompt.cpp nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ TextBox/YesNoPrompt.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o YesNoPrompt.o TextBox/YesNoPrompt.cpp almond.o: ai/almond/almond.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/almond/almond.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o almond.o ai/almond/almond.cpp balfrog.o: ai/boss/balfrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/balfrog.h \ ai/IrregularBBox.h \ ai/boss/balfrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balfrog.o ai/boss/balfrog.cpp ballos.o: ai/boss/ballos.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ballos.h \ ai/boss/ballos.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos.o ai/boss/ballos.cpp core.o: ai/boss/core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/almond/almond.h \ ai/boss/core.h \ ai/boss/core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o core.o ai/boss/core.cpp heavypress.o: ai/boss/heavypress.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/heavypress.h \ ai/boss/heavypress.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o heavypress.o ai/boss/heavypress.cpp ironhead.o: ai/boss/ironhead.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/ironhead.h \ ai/boss/ironhead.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ironhead.o ai/boss/ironhead.cpp omega.o: ai/boss/omega.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/omega.h \ ai/boss/omega.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o omega.o ai/boss/omega.cpp sisters.o: ai/boss/sisters.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/sisters.h \ ai/boss/sisters.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sisters.o ai/boss/sisters.cpp undead_core.o: ai/boss/undead_core.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/undead_core.h \ ai/boss/undead_core.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o undead_core.o ai/boss/undead_core.cpp x.o: ai/boss/x.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/boss/x.h \ ai/boss/x.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o x.o ai/boss/x.cpp egg.o: ai/egg/egg.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg.o ai/egg/egg.cpp egg2.o: ai/egg/egg2.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/egg/egg.fdh \ ai/egg/egg2.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o egg2.o ai/egg/egg2.cpp igor.o: ai/egg/igor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/igor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o igor.o ai/egg/igor.cpp balcony.o: ai/final_battle/balcony.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/balcony.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balcony.o ai/final_battle/balcony.cpp doctor.o: ai/final_battle/doctor.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor.o ai/final_battle/doctor.cpp doctor_common.o: ai/final_battle/doctor_common.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor_common.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_common.o ai/final_battle/doctor_common.cpp doctor_frenzied.o: ai/final_battle/doctor_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/final_battle/doctor_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o doctor_frenzied.o ai/final_battle/doctor_frenzied.cpp final_misc.o: ai/final_battle/final_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/final_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o final_misc.o ai/final_battle/final_misc.cpp misery_battle.o: ai/final_battle/misery_battle.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_battle.o ai/final_battle/misery_battle.cpp sidekicks.o: ai/final_battle/sidekicks.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/sidekicks.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sidekicks.o ai/final_battle/sidekicks.cpp first_cave.o: ai/first_cave/first_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/first_cave/first_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o first_cave.o ai/first_cave/first_cave.cpp ballos_misc.o: ai/hell/ballos_misc.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_misc.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_misc.o ai/hell/ballos_misc.cpp ballos_priest.o: ai/hell/ballos_priest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/ballos_priest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ballos_priest.o ai/hell/ballos_priest.cpp hell.o: ai/hell/hell.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/hell/hell.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o hell.o ai/hell/hell.cpp last_cave.o: ai/last_cave/last_cave.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/plantation/plantation.fdh \ ai/sym/sym.fdh \ ai/last_cave/last_cave.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o last_cave.o ai/last_cave/last_cave.cpp balrog_boss_missiles.o: ai/maze/balrog_boss_missiles.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/maze/balrog_boss_missiles.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_missiles.o ai/maze/balrog_boss_missiles.cpp critter_purple.o: ai/maze/critter_purple.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/critter_purple.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o critter_purple.o ai/maze/critter_purple.cpp gaudi.o: ai/maze/gaudi.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/gaudi.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gaudi.o ai/maze/gaudi.cpp labyrinth_m.o: ai/maze/labyrinth_m.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/labyrinth_m.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o labyrinth_m.o ai/maze/labyrinth_m.cpp maze.o: ai/maze/maze.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/maze.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o maze.o ai/maze/maze.cpp pooh_black.o: ai/maze/pooh_black.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/maze/pooh_black.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o pooh_black.o ai/maze/pooh_black.cpp balrog.o: ai/npc/balrog.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/balrog.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog.o ai/npc/balrog.cpp curly.o: ai/npc/curly.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly.o ai/npc/curly.cpp curly_ai.o: ai/npc/curly_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/curly_ai.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_ai.o ai/npc/curly_ai.cpp misery_ai.o: ai/npc/misery_ai.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/misery.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o misery_ai.o ai/npc/misery_ai.cpp npcguest.o: ai/npc/npcguest.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcguest.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcguest.o ai/npc/npcguest.cpp npcplayer.o: ai/npc/npcplayer.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/npc/npcplayer.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcplayer.o ai/npc/npcplayer.cpp npcregu.o: ai/npc/npcregu.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/final_battle/doctor.h \ ai/npc/npcregu.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o npcregu.o ai/npc/npcregu.cpp oside.o: ai/oside/oside.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/sand.fdh \ ai/oside/oside.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o oside.o ai/oside/oside.cpp plantation.o: ai/plantation/plantation.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh \ ai/plantation/plantation.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o plantation.o ai/plantation/plantation.cpp curly_boss.o: ai/sand/curly_boss.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/curly_boss.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o curly_boss.o ai/sand/curly_boss.cpp puppy.o: ai/sand/puppy.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/puppy.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o puppy.o ai/sand/puppy.cpp sand.o: ai/sand/sand.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/egg/egg.fdh \ ai/sand/sand.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sand.o ai/sand/sand.cpp toroko_frenzied.o: ai/sand/toroko_frenzied.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sand/toroko_frenzied.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o toroko_frenzied.o ai/sand/toroko_frenzied.cpp smoke.o: ai/sym/smoke.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/smoke.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o smoke.o ai/sym/smoke.cpp sym.o: ai/sym/sym.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/sym/sym.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o sym.o ai/sym/sym.cpp balrog_boss_running.o: ai/village/balrog_boss_running.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/balrog_common.h \ ai/village/balrog_boss_running.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_running.o ai/village/balrog_boss_running.cpp ma_pignon.o: ai/village/ma_pignon.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/village/ma_pignon.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ma_pignon.o ai/village/ma_pignon.cpp village.o: ai/village/village.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh \ ai/village/village.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o village.o ai/village/village.cpp blade.o: ai/weapons/blade.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/blade.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o blade.o ai/weapons/blade.cpp bubbler.o: ai/weapons/bubbler.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/bubbler.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bubbler.o ai/weapons/bubbler.cpp fireball.o: ai/weapons/fireball.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/fireball.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o fireball.o ai/weapons/fireball.cpp missile.o: ai/weapons/missile.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/missile.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o missile.o ai/weapons/missile.cpp nemesis.o: ai/weapons/nemesis.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/nemesis.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nemesis.o ai/weapons/nemesis.cpp polar_mgun.o: ai/weapons/polar_mgun.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/polar_mgun.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o polar_mgun.o ai/weapons/polar_mgun.cpp snake.o: ai/weapons/snake.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/snake.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o snake.o ai/weapons/snake.cpp spur.o: ai/weapons/spur.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/spur.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o spur.o ai/weapons/spur.cpp weapons.o: ai/weapons/weapons.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/weapons.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weapons.o ai/weapons/weapons.cpp whimstar.o: ai/weapons/whimstar.cpp ai/weapons/weapons.h \ ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weapons/whimstar.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o whimstar.o ai/weapons/whimstar.cpp balrog_boss_flying.o: ai/weed/balrog_boss_flying.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/balrog_boss_flying.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o balrog_boss_flying.o ai/weed/balrog_boss_flying.cpp frenzied_mimiga.o: ai/weed/frenzied_mimiga.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/frenzied_mimiga.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o frenzied_mimiga.o ai/weed/frenzied_mimiga.cpp weed.o: ai/weed/weed.cpp ai/stdai.h \ nx.h \ config.h \ common/basics.h \ common/BList.h \ common/SupportDefs.h \ common/StringList.h \ common/DBuffer.h \ common/DString.h \ common/InitList.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/tileset.h \ graphics/sprites.h \ siflib/sif.h \ common/misc.fdh \ trig.h \ autogen/sprites.h \ dirnames.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ TextBox/ItemImage.h \ TextBox/StageSelect.h \ TextBox/SaveSelect.h \ graphics/font.h \ input.h \ tsc.h \ stageboss.h \ ai/ai.h \ map.h \ maprecord.h \ stagedata.h \ statusbar.h \ floattext.h \ object.h \ ObjManager.h \ console.h \ debug.h \ game.h \ caret.h \ screeneffect.h \ settings.h \ slope.h \ player.h \ p_arms.h \ ai/weapons/whimstar.h \ replay.h \ common/FileBuffer.h \ platform.h \ sound/sound.h \ ai/weed/weed.fdh $(CXX) -c $(CXXFLAGS) $(INCPATH) -o weed.o ai/weed/weed.cpp vbesync.o: platform/Linux/vbesync.c $(CC) -c $(CFLAGS) $(INCPATH) -o vbesync.o platform/Linux/vbesync.c ####### Install install: FORCE uninstall: FORCE FORCE: ================================================ FILE: NXEngine.pro ================================================ ###################################################################### # Written by EXL on Sun Sep 1 11:04:56 2013 ###################################################################### # Platform Defines # -D_480X272 - Use widescreen 480x272 resolution. # -D_320X240 - Use normal 320x240 resolution. # -D_DINGUX - Dingux platform and keyboard layout (Ritmix RZX-50, Dingoo A320, Dingoo A380, etc). # -D_MOTOMAGX - MotoMAGX platform and keyboard layout (Motorola ZN5, Z6, E8, EM30, VE66, etc). # -D_MOTOEZX - MotoEZX platform and keyboard layout (Motorola E2, E6, A1200, A1600). # -D_SDL_MIXER - Don't use generatining music, *.xm and sounds playing via SDL_mixer. # -D_DEBUG - Enable detailed debug output to the console. # -D_L10N_CP1251 - Enable russian localization (need a *.ttf font and russian data-files). # Global App Settings TEMPLATE = app CONFIG -= console CONFIG -= app_bundle CONFIG -= qt CONFIG += warn_off CONFIG -= l10n_rus # Platform section # Write here the necessary platform. # Available platforms (only for linux-mips-g++): ###################### # platform-rzx50 (default) # platform-a320 ###################### linux-mips-g++: CONFIG += platform-rzx50 # Targets win32-g++ | linux-g++ | linux-g++-64 { # Host TARGET = nx } linux-mips-g++ { TARGET = nx.dge } linux-arm-gnueabi-g++ { # MotoMAGX TARGET = nx.magx } linux-arm-gnu-g++ | iwmmxt_le-g++ { # MotoEZX TARGET = nx.ezx } # Strip release binary CONFIG(release, debug|release) { !win32-g++: QMAKE_POST_LINK += $(STRIP) $(TARGET) } # Defines win32-g++ | linux-g++ | linux-g++-64 { # Host DEFINES += } linux-mips-g++ { # Dingux CONFIG(platform-rzx50, platform-rzx50 | platform-a320) { # RZX-50 DEFINES += _480X272 _DINGUX _SDL_MIXER } CONFIG(platform-a320, platform-rzx50 | platform-a320) { # A320 DEFINES += _320X240 _DINGUX _SDL_MIXER } } linux-arm-gnueabi-g++ { # MotoMAGX DEFINES += _320X240 _MOTOMAGX _SDL_MIXER } linux-arm-gnu-g++ | iwmmxt_le-g++ { # MotoEZX DEFINES += _320X240 _MOTOEZX _SDL_MIXER } linux-arm-gnueabi-g++ { DEFINES += _BSD_SOURCE } # Debug CONFIG(debug, debug|release) { DEFINES += DEBUG } # Localization l10n_rus { DEFINES += _L10N_CP1251 } # MotoEZX sdl-config EZX_SDL_CONFIG = /opt/toolchains/motoezx/bin/sdl-config # Platform C/C++ Flags, CPU Optimization linux-mips-g++ { # Dingux QMAKE_CFLAGS_RELEASE += -mabi=32 -msoft-float -ffast-math -G0 QMAKE_CXXFLAGS_RELEASE += $${QMAKE_CFLAGS_RELEASE} } linux-arm-gnueabi-g++ { # MotoMAGX QMAKE_CFLAGS += $$system(sdl-config --cflags) QMAKE_CXXFLAGS += $${QMAKE_CFLAGS} QMAKE_CFLAGS_RELEASE += -march=armv6j -mtune=arm1136jf-s -mfpu=vfp QMAKE_CXXFLAGS_RELEASE += $${QMAKE_CFLAGS_RELEASE} } linux-arm-gnu-g++ | iwmmxt_le-g++ { # MotoEZX QMAKE_CFLAGS += $$system($${EZX_SDL_CONFIG} --cflags) QMAKE_CXXFLAGS += $${QMAKE_CFLAGS} QMAKE_CFLAGS_RELEASE += -mcpu=iwmmxt -mtune=iwmmxt -march=iwmmxt -marm QMAKE_CXXFLAGS_RELEASE += $${QMAKE_CFLAGS_RELEASE} } # Headers INCLUDEPATH += . win32-g++ { # Host MinGW Windows INCLUDEPATH += C:/MinGW/include INCLUDEPATH += C:/MinGW/include/SDL } linux-g++ | linux-g++-64 { # Host GCC Linux INCLUDEPATH += /usr/include INCLUDEPATH += /usr/include/SDL } linux-mips-g++ { # Dingux INCLUDEPATH += /opt/mipsel-linux-uclibc/usr/include INCLUDEPATH += /opt/mipsel-linux-uclibc/usr/include/SDL } linux-arm-gnueabi-g++ { # MotoMAGX INCLUDEPATH += /opt/toolchains/motomagx/arm-eabi2/include INCLUDEPATH += /opt/toolchains/motomagx/arm-eabi2/include/SDL } linux-arm-gnu-g++ { # MotoEZX INCLUDEPATH += /opt/toolchains/motoezx/include/ INCLUDEPATH += /opt/toolchains/motoezx/include/SDL } haiku { INCLUDEPATH += $$system(finddir B_SYSTEM_HEADERS_DIRECTORY)/SDL } # Librares win32-g++ { # Host MinGW Windows QMAKE_LFLAGS += -static -static-libgcc -static-libstdc++ LIBS += -lmingw32 -lSDL_ttf -lfreetype -lpng -lz -lSDLmain -lSDL -lgdi32 -lwinmm } linux-g++ | linux-g++-64 { # Host GCC Linux LIBS += -lSDL -lSDL_ttf } linux-mips-g++ { # Dingux LIBS += -lSDLmain -lSDL -lSDL_ttf -lSDL_mixer } linux-arm-gnueabi-g++ { # MotoMAGX LIBS += $$system(sdl-config --libs) -lSDL_mixer -lSDL_ttf -lstdc++ -lm -lfreetype } linux-arm-gnu-g++ { # MotoEZX LIBS += $$system($${EZX_SDL_CONFIG} --libs) -lSDL_mixer -lSDL_ttf -lstdc++ -lm -lfreetype } haiku { LIBS += $$system(sdl-config --libs) -lSDL_mixer -lSDL_ttf -lfreetype } # Additional MotoEZX files linux-arm-gnu-g++ | iwmmxt_le-g++ { DEPENDPATH += platform/EZX HEADERS += platform/EZX/EZX_SDL_PollEvent.h SOURCES += platform/EZX/EZX_SDL_PollEvent.cpp } # Win32 Icon win32-g++: RC_FILE = nx.rc DEPENDPATH += . \ ai \ autogen \ common \ endgame \ extract \ graphics \ intro \ pause \ siflib \ sound \ TextBox \ ai/almond \ ai/boss \ ai/egg \ ai/final_battle \ ai/first_cave \ ai/hell \ ai/last_cave \ ai/maze \ ai/npc \ ai/oside \ ai/plantation \ ai/sand \ ai/sym \ ai/village \ ai/weapons \ ai/weed \ platform/Linux # Input HEADERS += caret.h \ config.h \ console.h \ debug.h \ dirnames.h \ floattext.h \ game.h \ input.h \ inventory.h \ map.h \ map_system.h \ maprecord.h \ nx.h \ object.h \ ObjManager.h \ p_arms.h \ platform.h \ player.h \ profile.h \ replay.h \ screeneffect.h \ settings.h \ slope.h \ stageboss.h \ stagedata.h \ statusbar.h \ trig.h \ tsc.h \ vararray.h \ ai/ai.h \ ai/balrog_common.h \ ai/IrregularBBox.h \ ai/stdai.h \ autogen/asdefs.h \ autogen/sprites.h \ common/basics.h \ common/BList.h \ common/bufio.h \ common/DBuffer.h \ common/DString.h \ common/FileBuffer.h \ common/InitList.h \ common/llist.h \ common/StringList.h \ common/SupportDefs.h \ endgame/credits.h \ endgame/CredReader.h \ endgame/island.h \ graphics/font.h \ graphics/graphics.h \ graphics/nxsurface.h \ graphics/palette.h \ graphics/safemode.h \ graphics/sprites.h \ graphics/tileset.h \ intro/intro.h \ intro/title.h \ pause/dialog.h \ pause/message.h \ pause/options.h \ pause/pause.h \ siflib/sectSprites.h \ siflib/sectStringArray.h \ siflib/sif.h \ siflib/sifloader.h \ sound/org.h \ sound/pxt.h \ sound/sound.h \ sound/sslib.h \ TextBox/ItemImage.h \ TextBox/SaveSelect.h \ TextBox/StageSelect.h \ TextBox/TextBox.h \ TextBox/YesNoPrompt.h \ ai/almond/almond.h \ ai/boss/balfrog.h \ ai/boss/ballos.h \ ai/boss/core.h \ ai/boss/heavypress.h \ ai/boss/ironhead.h \ ai/boss/omega.h \ ai/boss/sisters.h \ ai/boss/undead_core.h \ ai/boss/x.h \ ai/final_battle/doctor.h \ ai/weapons/weapons.h \ ai/weapons/whimstar.h \ common/misc.fdh \ caret.fdh \ console.fdh \ debug.fdh \ floattext.fdh \ game.fdh \ input.fdh \ inventory.fdh \ main.fdh \ map.fdh \ map_system.fdh \ niku.fdh \ object.fdh \ ObjManager.fdh \ p_arms.fdh \ platform.fdh \ player.fdh \ playerstats.fdh \ profile.fdh \ replay.fdh \ screeneffect.fdh \ settings.fdh \ slope.fdh \ stageboss.fdh \ statusbar.fdh \ trig.fdh \ tsc.fdh \ tsc_cmdtbl.h \ ai/ai.fdh \ ai/balrog_common.fdh \ ai/IrregularBBox.fdh \ common/bufio.fdh \ common/DBuffer.fdh \ common/DString.fdh \ common/InitList.fdh \ common/StringList.fdh \ endgame/credits.fdh \ endgame/CredReader.fdh \ endgame/island.fdh \ endgame/misc.fdh \ extract/crc.fdh \ extract/extract.fdh \ extract/extractfiles.fdh \ extract/extractpxt.fdh \ extract/extractstages.fdh \ graphics/font.fdh \ graphics/graphics.fdh \ graphics/nxsurface.fdh \ graphics/palette.fdh \ graphics/safemode.fdh \ graphics/sprites.fdh \ graphics/tileset.fdh \ intro/intro.fdh \ intro/title.fdh \ pause/dialog.fdh \ pause/message.fdh \ pause/objects.fdh \ pause/options.fdh \ pause/pause.fdh \ siflib/sectSprites.fdh \ siflib/sectStringArray.fdh \ siflib/sif.fdh \ siflib/sifloader.fdh \ sound/org.fdh \ sound/pxt.fdh \ sound/sound.fdh \ sound/sslib.fdh \ TextBox/ItemImage.fdh \ TextBox/SaveSelect.fdh \ TextBox/StageSelect.fdh \ TextBox/TextBox.fdh \ TextBox/YesNoPrompt.fdh \ ai/almond/almond.fdh \ ai/boss/balfrog.fdh \ ai/boss/ballos.fdh \ ai/boss/core.fdh \ ai/boss/heavypress.fdh \ ai/boss/ironhead.fdh \ ai/boss/omega.fdh \ ai/boss/sisters.fdh \ ai/boss/undead_core.fdh \ ai/boss/x.fdh \ ai/weed/weed.fdh \ ai/egg/egg.fdh \ ai/egg/egg2.fdh \ ai/egg/igor.fdh \ ai/final_battle/balcony.fdh \ ai/final_battle/doctor.fdh \ ai/final_battle/doctor_common.fdh \ ai/final_battle/doctor_frenzied.fdh \ ai/final_battle/final_misc.fdh \ ai/final_battle/misery.fdh \ ai/final_battle/sidekicks.fdh \ ai/first_cave/first_cave.fdh \ ai/hell/ballos_misc.fdh \ ai/hell/ballos_priest.fdh \ ai/hell/hell.fdh \ ai/plantation/plantation.fdh \ ai/sym/sym.fdh \ ai/last_cave/last_cave.fdh \ ai/maze/balrog_boss_missiles.fdh \ ai/maze/critter_purple.fdh \ ai/maze/gaudi.fdh \ ai/maze/labyrinth_m.fdh \ ai/maze/maze.fdh \ ai/maze/pooh_black.fdh \ ai/npc/balrog.fdh \ ai/npc/curly.fdh \ ai/npc/curly_ai.fdh \ ai/npc/npcguest.fdh \ ai/npc/npcplayer.fdh \ ai/npc/npcregu.fdh \ ai/sand/sand.fdh \ ai/oside/oside.fdh \ ai/sand/puppy.fdh \ ai/sand/curly_boss.fdh \ ai/sand/toroko_frenzied.fdh \ ai/sym/smoke.fdh \ ai/village/balrog_boss_running.fdh \ ai/village/ma_pignon.fdh \ ai/village/village.fdh \ ai/weapons/blade.fdh \ ai/weapons/bubbler.fdh \ ai/weapons/fireball.fdh \ ai/weapons/missile.fdh \ ai/weapons/nemesis.fdh \ ai/weapons/polar_mgun.fdh \ ai/weapons/snake.fdh \ ai/weapons/spur.fdh \ ai/weapons/weapons.fdh \ ai/weapons/whimstar.fdh \ ai/weed/balrog_boss_flying.fdh \ ai/weed/frenzied_mimiga.fdh \ l10n_strings.h \ nx_icon.h SOURCES += caret.cpp \ console.cpp \ debug.cpp \ floattext.cpp \ game.cpp \ input.cpp \ inventory.cpp \ main.cpp \ map.cpp \ map_system.cpp \ niku.cpp \ object.cpp \ ObjManager.cpp \ p_arms.cpp \ platform.cpp \ player.cpp \ playerstats.cpp \ profile.cpp \ replay.cpp \ screeneffect.cpp \ settings.cpp \ slope.cpp \ stageboss.cpp \ stagedata.cpp \ statusbar.cpp \ trig.cpp \ tsc.cpp \ ai/ai.cpp \ ai/balrog_common.cpp \ ai/IrregularBBox.cpp \ autogen/AssignSprites.cpp \ autogen/objnames.cpp \ common/BList.cpp \ common/bufio.cpp \ common/DBuffer.cpp \ common/DString.cpp \ common/FileBuffer.cpp \ common/InitList.cpp \ common/misc_comm.cpp \ common/stat.cpp \ common/StringList.cpp \ endgame/credits.cpp \ endgame/CredReader.cpp \ endgame/island.cpp \ endgame/misc_end.cpp \ extract/crc.cpp \ extract/extract.cpp \ extract/extractfiles.cpp \ extract/extractpxt.cpp \ extract/extractstages.cpp \ graphics/font.cpp \ graphics/graphics.cpp \ graphics/nxsurface.cpp \ graphics/palette.cpp \ graphics/safemode.cpp \ graphics/sprites.cpp \ graphics/tileset.cpp \ intro/intro.cpp \ intro/title.cpp \ pause/dialog.cpp \ pause/message.cpp \ pause/objects.cpp \ pause/options.cpp \ pause/pause.cpp \ siflib/sectSprites.cpp \ siflib/sectStringArray.cpp \ siflib/sif.cpp \ siflib/sifloader.cpp \ sound/org.cpp \ sound/pxt.cpp \ sound/sound.cpp \ sound/sslib.cpp \ TextBox/ItemImage.cpp \ TextBox/SaveSelect.cpp \ TextBox/StageSelect.cpp \ TextBox/TextBox.cpp \ TextBox/YesNoPrompt.cpp \ ai/almond/almond.cpp \ ai/boss/balfrog.cpp \ ai/boss/ballos.cpp \ ai/boss/core.cpp \ ai/boss/heavypress.cpp \ ai/boss/ironhead.cpp \ ai/boss/omega.cpp \ ai/boss/sisters.cpp \ ai/boss/undead_core.cpp \ ai/boss/x.cpp \ ai/egg/egg.cpp \ ai/egg/egg2.cpp \ ai/egg/igor.cpp \ ai/final_battle/balcony.cpp \ ai/final_battle/doctor.cpp \ ai/final_battle/doctor_common.cpp \ ai/final_battle/doctor_frenzied.cpp \ ai/final_battle/final_misc.cpp \ ai/final_battle/misery_battle.cpp \ ai/final_battle/sidekicks.cpp \ ai/first_cave/first_cave.cpp \ ai/hell/ballos_misc.cpp \ ai/hell/ballos_priest.cpp \ ai/hell/hell.cpp \ ai/last_cave/last_cave.cpp \ ai/maze/balrog_boss_missiles.cpp \ ai/maze/critter_purple.cpp \ ai/maze/gaudi.cpp \ ai/maze/labyrinth_m.cpp \ ai/maze/maze.cpp \ ai/maze/pooh_black.cpp \ ai/npc/balrog.cpp \ ai/npc/curly.cpp \ ai/npc/curly_ai.cpp \ ai/npc/misery_ai.cpp \ ai/npc/npcguest.cpp \ ai/npc/npcplayer.cpp \ ai/npc/npcregu.cpp \ ai/oside/oside.cpp \ ai/plantation/plantation.cpp \ ai/sand/curly_boss.cpp \ ai/sand/puppy.cpp \ ai/sand/sand.cpp \ ai/sand/toroko_frenzied.cpp \ ai/sym/smoke.cpp \ ai/sym/sym.cpp \ ai/village/balrog_boss_running.cpp \ ai/village/ma_pignon.cpp \ ai/village/village.cpp \ ai/weapons/blade.cpp \ ai/weapons/bubbler.cpp \ ai/weapons/fireball.cpp \ ai/weapons/missile.cpp \ ai/weapons/nemesis.cpp \ ai/weapons/polar_mgun.cpp \ ai/weapons/snake.cpp \ ai/weapons/spur.cpp \ ai/weapons/weapons.cpp \ ai/weapons/whimstar.cpp \ ai/weed/balrog_boss_flying.cpp \ ai/weed/frenzied_mimiga.cpp \ ai/weed/weed.cpp \ platform/Linux/vbesync.c OTHER_FILES += nx.rc \ README.md ================================================ FILE: ObjManager.cpp ================================================ #include "nx.h" #include "common/llist.h" #include "ObjManager.h" #include "ObjManager.fdh" static Object ZERO_OBJECT; static Player ZERO_PLAYER; Object *firstobject = NULL, *lastobject = NULL; Object *lowestobject = NULL, *highestobject = NULL; /* void c------------------------------() {} */ Object *CreateObject(int x, int y, int type, int xinertia, int yinertia, int dir, Object *linkedobject, uint32_t createflags) { Object *o; // create the structure if (type != OBJ_PLAYER) { o = new Object; *o = ZERO_OBJECT; // safely clears all members } else { Player *p = new Player; *p = ZERO_PLAYER; o = (Object *)p; } // initialize o->SetType(type); o->flags = objprop[type].defaultflags; o->DamageText = new FloatText(SPR_REDNUMBERS); o->x = x - (sprites[o->sprite].spawn_point.x << CSF); o->y = y - (sprites[o->sprite].spawn_point.y << CSF); o->dir = dir; o->xinertia = xinertia; o->yinertia = yinertia; o->linkedobject = linkedobject; // add into list LL_ADD_END(o, prev, next, firstobject, lastobject); LL_ADD_END(o, lower, higher, lowestobject, highestobject); // set it's initial blocked states, but do not update blockedstates on objects starting // with nullsprite-- the reason is for objects whose sprite is set after being spawned if (o->sprite != SPR_NULL) o->UpdateBlockStates(ALLDIRMASK); if (!(createflags & CF_NO_SPAWN_EVENT)) o->OnSpawn(); return o; } Object *CreateObject(int x, int y, int type) { return CreateObject(x, y, type, 0, 0, RIGHT, NULL, CF_DEFAULT); } /* void c------------------------------() {} */ // update the blocked states of all objects void Objects::UpdateBlockStates(void) { Object *o = firstobject; while(o) { o->lastblockl = o->blockl; o->lastblockr = o->blockr; o->lastblocku = o->blocku; o->lastblockd = o->blockd; o->UpdateBlockStates(ALLDIRMASK); o = o->next; } } // returns true if the bounding boxes of the two given objects are touching bool hitdetect(Object *o1, Object *o2) { SIFSprite *s1, *s2; int32_t rect1x1, rect1y1, rect1x2, rect1y2; int32_t rect2x1, rect2y1, rect2x2, rect2y2; // get the sprites used by the two objects s1 = o1->Sprite(); s2 = o2->Sprite(); // get the bounding rectangle of the first object rect1x1 = o1->x + (s1->bbox.x1 << CSF); rect1x2 = o1->x + (s1->bbox.x2 << CSF); rect1y1 = o1->y + (s1->bbox.y1 << CSF); rect1y2 = o1->y + (s1->bbox.y2 << CSF); // get the bounding rectangle of the second object rect2x1 = o2->x + (s2->bbox.x1 << CSF); rect2x2 = o2->x + (s2->bbox.x2 << CSF); rect2y1 = o2->y + (s2->bbox.y1 << CSF); rect2y2 = o2->y + (s2->bbox.y2 << CSF); // find out if the rectangles overlap if ((rect1x1 < rect2x1) && (rect1x2 < rect2x1)) return false; if ((rect1x1 > rect2x2) && (rect1x2 > rect2x2)) return false; if ((rect1y1 < rect2y1) && (rect1y2 < rect2y1)) return false; if ((rect1y1 > rect2y2) && (rect1y2 > rect2y2)) return false; return true; } // returns true if the solidity boxes of the two given objects are touching bool solidhitdetect(Object *o1, Object *o2) { SIFSprite *s1, *s2; int32_t rect1x1, rect1y1, rect1x2, rect1y2; int32_t rect2x1, rect2y1, rect2x2, rect2y2; // get the sprites used by the two objects s1 = o1->Sprite(); s2 = o2->Sprite(); // get the bounding rectangle of the first object rect1x1 = o1->x + (s1->solidbox.x1 << CSF); rect1x2 = o1->x + (s1->solidbox.x2 << CSF); rect1y1 = o1->y + (s1->solidbox.y1 << CSF); rect1y2 = o1->y + (s1->solidbox.y2 << CSF); // get the bounding rectangle of the second object rect2x1 = o2->x + (s2->solidbox.x1 << CSF); rect2x2 = o2->x + (s2->solidbox.x2 << CSF); rect2y1 = o2->y + (s2->solidbox.y1 << CSF); rect2y2 = o2->y + (s2->solidbox.y2 << CSF); // find out if the rectangles overlap if ((rect1x1 < rect2x1) && (rect1x2 < rect2x1)) return false; if ((rect1x1 > rect2x2) && (rect1x2 > rect2x2)) return false; if ((rect1y1 < rect2y1) && (rect1y2 < rect2y1)) return false; if ((rect1y1 > rect2y2) && (rect1y2 > rect2y2)) return false; return true; } /* void c------------------------------() {} */ // runs all entity AI routines void Objects::RunAI(void) { Object *o; // because we handle objects in order of their creation and have a separate list // for display order, we can't ever run AI twice in a frame because of z-order // rearrangement, and 2) objects created by other objects are added to the end of // the list and given a chance to run their AI routine before being displayed. FOREACH_OBJECT(o) { if (!o->deleted) o->RunAI(); } } // the most important thing it does is apply x/y inertia to the objects. void Objects::PhysicsSim(void) { Object *o; int xinertia, yinertia; FOREACH_OBJECT(o) { if (o != player && !o->deleted) // player is moved in PDoPhysics { if (!(o->flags & FLAG_IGNORE_SOLID) && \ !(o->nxflags & NXFLAG_NO_RESET_YINERTIA)) { if (o->blockd && o->yinertia > 0) o->yinertia = 0; if (o->blocku && o->yinertia < 0) o->yinertia = 0; } // apply inertia to X,Y position xinertia = o->xinertia; yinertia = o->yinertia; if (o->shaketime) { if (o->nxflags & NXFLAG_SLOW_X_WHEN_HURT) xinertia >>= 1; if (o->nxflags & NXFLAG_SLOW_Y_WHEN_HURT) yinertia >>= 1; } o->apply_xinertia(xinertia); o->apply_yinertia(yinertia); // flag_solid_brick objects push player as they move if (o->flags & FLAG_SOLID_BRICK) { o->PushPlayerOutOfWay(xinertia, yinertia); } else if (o->damage > 0) { // have enemies hurt you when you touch them // (solid-brick objects do this in PHandleSolidBrickObjects) if (hitdetect(o, player)) o->DealContactDamage(); } } } } /* void c------------------------------() {} */ // returns how many objects exist of the given type int Objects::CountType(int objtype) { int count = 0; Object *o; FOREACH_OBJECT(o) { if (o->type == objtype) count++; } return count; } // returns the first object of type objtype or NULL Object *Objects::FindByType(int objtype) { Object *o; FOREACH_OBJECT(o) { if (o->type == objtype) return o; } return NULL; } /* void c------------------------------() {} */ // free objects deleted earlier via ObjDel void Objects::CullDeleted(void) { Object *o, *next; o = firstobject; while(o) { next = o->next; if (o->deleted) { o->Destroy(); } o = next; } } // deletes all objects. if delete_player is true, also deletes the player. // used by load_pxe to reset the game in preperation for loading a new maplayer-> void Objects::DestroyAll(bool delete_player) { Object *o, *next; o = firstobject; while(o) { next = o->next; if (o != player) { o->Destroy(); } o = next; } // must do this last to avoid crashes as player ptr gets invalidated if (delete_player) { player->Destroy(); } memset(ID2Lookup, 0, sizeof(ID2Lookup)); } ================================================ FILE: ObjManager.fdh ================================================ //hash:3b98a341 //automatically generated by Makegen /* located in ObjManager.cpp */ //------------------[referenced from ObjManager.cpp]-----------------// Object *CreateObject(int x, int y, int type); bool hitdetect(Object *o1, Object *o2); bool solidhitdetect(Object *o1, Object *o2); ================================================ FILE: ObjManager.h ================================================ #ifndef _OBJMANAGER_H #define _OBJMANAGER_H namespace Objects { void UpdateBlockStates(void); int CountType(int objtype); void RunAI(void); void PhysicsSim(void); int IsRearTopAttack(Object *o); void CullDeleted(void); void DestroyAll(bool delete_player); Object *FindByType(int type); }; // synonyms #define CountObjectsOfType Objects::CountType #define FOREACH_OBJECT(O) for(O=firstobject; O; O=O->next) // max expected objects to exist at once (for buffer allocation) #define MAX_OBJECTS 1024 enum CreateObjectFlags { CF_NO_SPAWN_EVENT = 0x01, // inhibit calling OnSpawn CF_DEFAULT = 0x00 }; Object *CreateObject(int x, int y, int type); Object *CreateObject(int x, int y, int type, int xinertia, int yinertia, \ int dir=0, Object *linkedobject=NULL, uint32_t createflags=CF_DEFAULT); // ObjProp definitions struct ObjProp { // NXEngine-specific int sprite; int shaketime; // how long it shakes for when hit uint32_t defaultnxflags; // from npc.tbl int initial_hp; int xponkill; int damage; int hurt_sound, death_sound; int death_smoke_amt; uint32_t defaultflags; // AI routines struct { // executed every tick void (*ontick)(Object *o); // executed after physics sim has been done void (*aftermove)(Object *o); // if present, then when damage to the object causes it's hp to <= 0, // this is executed instead of destroying the object or following the // normal boom/spawn powerups routine. void (*ondeath)(Object *o); // executed when the object is first created or it's type is changed. // intended for static objects which only require a small amount of // initilization. This is NOT guaranteed to be only called exactly once // for a given object. void (*onspawn)(Object *o); } ai_routines; }; extern ObjProp objprop[OBJ_LAST]; extern Object *firstobject, *lastobject; extern Object *lowestobject, *highestobject; #endif ================================================ FILE: README.md ================================================ NXEngine ======== NXEngine 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/). ![Ritmix RZX-50](screens/Cave_Story_Ritmix_1.png) This repository contains source code of my NXEngine fork for various weak devices. I have added some engine improvements: 1. Sound through SDL_mixer. 2. Support for widescreen displays (480x272). 3. Ports to various platforms. 4. Russification. ## Download You can download ready-to-run packages with NXEngine and Cave Story here: - [On the page of EXL's Developer Blog](http://exlmoto.ru/nxengine/#4). - [On the page of Cave Story Tribute Fan Site](https://www.cavestory.org/download/cave-story.php). - [On the page of GitHub Releases](https://github.com/EXL/NXEngine/releases). Russian and English versions of this game are available. ## Build instructions Building 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. Platform defines: | Define | Description | | --- | --- | | `-D_480X272` | Use widescreen 480x272 resolution. | | `-D_320X240` | Use normal 320x240 resolution. | | `-D_DINGUX` | Dingux platform and keyboard layout (Ritmix RZX-50, Dingoo A320, Dingoo A380, etc). | | `-D_MOTOMAGX` | MotoMAGX platform and keyboard layout (Motorola ZN5, Z6, E8, EM30, VE66, etc). | | `-D_MOTOEZX` | MotoEZX platform and keyboard layout (Motorola E2, E6, A1200, A1600). | | `-D_SDL_MIXER` | Don't use realtime music generation, `*.xm` tracks and sounds will be played via SDL_mixer. | | `-D_DEBUG` | Enable detailed debug output to the console. | | `-D_L10N_CP1251` | Enable Russian l10n (you need a `*.ttf` font and Russian version of data-files). | Please read [addition building information (in Russian)](http://exlmoto.ru/nxengine/#3) in the EXL's Developer Blog. ## Screens Ritmix RZX-50: ![Ritmix RZX-50](screens/Cave_Story_Ritmix_2.png) Windows 8.1: ![Windows 8.1](screens/Cave_Story_Windows.png) Haiku OS: ![Haiku OS](screens/Cave_Story_HaikuOS.png) ## Photos ![Motorola ROKR E6](platform/EZX/NXEngine-EZX-ROKR_E6.jpg) ## Videos Demonstration [video on YouTube](https://youtu.be/aZPgX9Ismq4) which showing launch Cave Story game with this engine on the Ritmix RZX-50 device. ## More information Please read [Porting Guide (in Russian)](http://exlmoto.ru/nxengine) for more info about porting NXEngine to various platforms. ================================================ FILE: TextBox/ItemImage.cpp ================================================ /* The powerup display for textboxes. E.g. when you get a life capsule or new weapon and it shows you a picture of it. */ #include "../nx.h" #include "ItemImage.h" #include "ItemImage.fdh" #define ITEMBOX_W 76 #define ITEMBOX_H 32 #define ITEMBOX_X 128 #define ITEMBOX_Y 120 /* void c------------------------------() {} */ void TB_ItemImage::ResetState() { fVisible = false; } void TB_ItemImage::SetVisible(bool enable) { fVisible = enable; } void TB_ItemImage::SetSprite(int sprite, int frame) { fSprite = sprite; fFrame = frame; fYOffset = 1; } /* void c------------------------------() {} */ void TB_ItemImage::Draw(void) { if (!fVisible) return; // animate moving item downwards into box int desty = (ITEMBOX_H / 2) - (sprites[fSprite].h / 2); if (++fYOffset > desty) fYOffset = desty; // draw the box frame TextBox::DrawFrame(ITEMBOX_X, ITEMBOX_Y, ITEMBOX_W, ITEMBOX_H); // draw the item int x = ITEMBOX_X + ((ITEMBOX_W / 2) - (sprites[fSprite].w / 2)); if (sprites[fSprite].w == 14) x--; // hack for ArmsIcons draw_sprite(x, ITEMBOX_Y + fYOffset, fSprite, fFrame); } ================================================ FILE: TextBox/ItemImage.fdh ================================================ //hash:00000000 //automatically generated by Makegen ================================================ FILE: TextBox/ItemImage.h ================================================ #ifndef _ITEMIMAGE_H #define _ITEMIMAGE_H class TB_ItemImage { public: void ResetState(); void Draw(); void SetVisible(bool enable); void SetSprite(int sprite, int frame); private: bool fVisible; int fSprite, fFrame; int fYOffset; }; #endif ================================================ FILE: TextBox/SaveSelect.cpp ================================================ /* The save select box (for multiple save files). */ #include "../nx.h" #include "../profile.h" #include "../inventory.h" #include "../replay.h" #include "TextBox.h" // for textbox coordinates; MSG_W etc #include "SaveSelect.h" #include "SaveSelect.fdh" // moved here as static data so that the compiler will shut up about a circular dependency // that happens if you try to include profile.h from SaveSelect.h. static Profile fProfiles[MAX_SAVE_SLOTS]; static bool fHaveProfile[MAX_SAVE_SLOTS]; int fPicXOffset; TB_SaveSelect::TB_SaveSelect() { } /* void c------------------------------() {} */ void TB_SaveSelect::ResetState() { fVisible = false; } void TB_SaveSelect::SetVisible(bool enable, bool saving) { fVisible = enable; if (!enable) return; game.showmapnametime = 0; fCoords.w = 244; fCoords.h = 152; #ifdef _480X272 // 480x272 widescreen fix fCoords.x = (SCREEN_WIDTH / 2) - (fCoords.w / 2); fCoords.y = 30; #else fCoords.x = 38; fCoords.y = 8; #endif fNumFiles = MAX_SAVE_SLOTS; fSaving = saving; fCurSel = settings->last_save_slot; fPicXOffset = -24; // load all profiles memset(fHaveProfile, 0, sizeof(fHaveProfile)); for(int i=0;i= fNumFiles) fCurSel = 0; if (fSaving) break; if (fHaveProfile[fCurSel]) break; if (fCurSel == start) break; } sound(SND_MENU_MOVE); fPicXOffset = -24; } if (justpushed(UPKEY)) { start = fCurSel; for(;;) { fCurSel--; if (fCurSel < 0) fCurSel = fNumFiles - 1; if (fSaving) break; if (fHaveProfile[fCurSel]) break; if (fCurSel == start) break; } sound(SND_MENU_MOVE); fPicXOffset = -24; } if (buttonjustpushed()) { // when shown in a replay, the box is shown and everything just like what was done // originally, but we won't actually overwrite any save files. if (!Replay::IsPlaying()) { if (fSaving) game_save(fCurSel); settings->last_save_slot = fCurSel; settings_save(); // record new save/load slot } SetVisible(false); // when the script hit the delaytimer = 0; } } void TB_SaveSelect::DrawProfile(int x, int y, int index) { Profile *p = &fProfiles[index]; const int w = fCoords.w - 33; int sidewd = sprites[SPR_SAVESELECTOR_SIDES].w; int repeatwd = w - (sidewd * 2); int frame = (index == fCurSel) ? 0 : 1; draw_sprite(x, y, SPR_SAVESELECTOR_SIDES, frame, LEFT); draw_sprite_repeating_x(x+sidewd, y, SPR_SAVESELECTOR_MIDDLE, frame, repeatwd); draw_sprite(x+sidewd+repeatwd, y, SPR_SAVESELECTOR_SIDES, frame, RIGHT); y += 4; const int FONT_SPACING = 5; if (fHaveProfile[index]) { const char *stage = map_get_stage_name(p->stage); font_draw(x+8, y-1, stage, FONT_SPACING); // draw health. DrawHealth(x+w, y, p); } else if (fCurSel == index) { const char *str = "available"; int fx = (w / 2) - (GetFontWidth(str, FONT_SPACING) / 2); font_draw(x+fx, y-1, str, FONT_SPACING); } } void TB_SaveSelect::DrawExtendedInfo() { Profile *p = &fProfiles[fCurSel]; int x, y, s; if (fPicXOffset < 0) { fPicXOffset += 8; set_clip_rect(MSG_X+4, 0, SCREEN_WIDTH, SCREEN_HEIGHT); } // player pic draw_sprite((MSG_X+8) + fPicXOffset, MSG_NORMAL_Y+8, SPR_SELECTOR_ARMS); x = (MSG_X + 12) + fPicXOffset; y = MSG_NORMAL_Y + 12; s = (p->equipmask & EQUIP_MIMIGA_MASK) ? SPR_MYCHAR_MIMIGA : SPR_MYCHAR; draw_sprite(x, y, s, 0, RIGHT); // player gun if (p->curWeapon != WPN_NONE && p->curWeapon != WPN_BLADE) { int spr, frame; GetSpriteForGun(p->curWeapon, 0, &spr, &frame); draw_sprite_at_dp(x + sprites[s].frame[0].dir[RIGHT].actionpoint.x, \ y + sprites[s].frame[0].dir[RIGHT].actionpoint.y, \ spr, frame, RIGHT); } clear_clip_rect(); // whimsical stars if (p->equipmask & EQUIP_WHIMSTAR) { x = MSG_X + 12; for(int i=0;i<3;i++) { static int frames[] = { 1, 0, 2 }; draw_sprite(x, y+20, SPR_WHIMSICAL_STAR, frames[i]); x += 10; } } // WEAPONS: x = MSG_X + 64; y = MSG_NORMAL_Y + 8; // weapon list for(int i=0;iweapons[i].hasWeapon) { draw_sprite(x, y, SPR_ARMSICONS, i); x += 20; } } // xp of current weapon if (p->curWeapon != WPN_NONE) { int xb = MSG_X + 64; int yb = MSG_NORMAL_Y + 26; int level = p->weapons[p->curWeapon].level; int curxp = p->weapons[p->curWeapon].xp; int maxxp = player->weapons[p->curWeapon].max_xp[level]; draw_sprite(xb, yb, SPR_XPLEVELICON); xb += 16; draw_sprite(xb, yb, SPR_WHITENUMBERS, level+1); xb += 8; draw_sprite(xb, yb, SPR_XPBAR); if ((curxp == maxxp) && level == 2) draw_sprite(xb, yb, SPR_XPBAR, 3); // MAX else DrawPercentage(xb, yb, SPR_XPBAR, 1, curxp, maxxp, sprites[SPR_XPBAR].w); } // ITEMS: x = (MSG_X + 64) - 10; y = MSG_NORMAL_Y + 40; // Booster // items list. I generally tried to put the ones that are temporary and indicate a // quantity of stage completion at the front so they'll be more likely to be visible. static int items[] = { ITEM_BOOSTER08, ITEM_BOOSTER20, ITEM_LIFE_POT, ITEM_PUPPY, ITEM_JELLYFISH_JUICE, ITEM_CHARCOAL, ITEM_GUM_BASE, ITEM_EXPLOSIVE, ITEM_SPRINKLER, ITEM_CONTROLLER, ITEM_MA_PIGNON, ITEM_LITTLE_MAN, -1 }; for(int i=0;items[i] != -1;i++) { if (CheckInventoryList(items[i], p->inventory, p->ninventory) != -1) { draw_sprite(x, y, SPR_ITEMIMAGE, items[i]); x += 28; if (x + sprites[SPR_ITEMIMAGE].w > (MSG_X + MSG_W) - 8) break; } } // health DrawHealth((MSG_X+MSG_W) - 4, MSG_NORMAL_Y+8, p); } // I don't think it's possible to get 3-digit max life // without hacking, but I accounted for it anyway. static void DrawHealth(int xright, int y, Profile *p) { int hx, len; hx = xright - 28 - 24; if (p->maxhp > 99) { hx -= 8; } len = (p->hp > 99) ? 8 : 0; draw_sprite(hx-len, y-1, SPR_SS_HEALTH_ICON, 0, 0); DrawNumberRAlign(hx+24, y, SPR_WHITENUMBERS, p->hp); hx = xright - 4; len = (p->maxhp > 99) ? 32 : 24; draw_sprite(hx-len, y, SPR_WHITENUMBERS, 11); // '/' character DrawNumberRAlign(hx, y, SPR_WHITENUMBERS, p->maxhp); } void TB_SaveSelect::Draw(void) { if (!fVisible) return; // handle user input Run_Input(); // draw frame TextBox::DrawFrame(fCoords.x, fCoords.y, fCoords.w, fCoords.h); // draw selectors/options int x = fCoords.x + 16; int y = fCoords.y + 15; for(int i=0;i= numslots) fSelectionIndex = 0; } else { if (--fSelectionIndex < 0) fSelectionIndex = (numslots - 1); } sound(SND_MENU_MOVE); UpdateText(); } // updates the text by running the appropriate script // from StageSelect.tsc void TB_StageSelect::UpdateText() { int scriptno; if (GetSlotByIndex(fSelectionIndex, NULL, &scriptno)) { // no permission to teleport scriptno = 0; } else { scriptno %= 1000; } JumpScript(scriptno + 1000, SP_STAGESELECT); } /* void c------------------------------() {} */ // set teleporter slot "slotno" to run script "scriptno" when selected. // this adds the slot to the menu if scriptno is nonzero and removes it if zero. // the parameters here map directory to the = 0 && slotno < NUM_TELEPORTER_SLOTS) { fSlots[slotno] = scriptno; } else { stat("StageSelect::SetSlot: invalid slotno %d", slotno); } } void TB_StageSelect::ClearSlots() { for(int i=0;i= 0) { int slots_found = 0; for(int i=0;i index) { if (slotno_out) *slotno_out = i; if (scriptno_out) *scriptno_out = fSlots[i]; return 0; } } } } if (slotno_out) *slotno_out = -1; if (scriptno_out) *scriptno_out = -1; return 1; } int TB_StageSelect::CountActiveSlots() { int count = 0; for(int i=0;i= 4) { fTextTimer = 0; AddNextChar(); } } } // draw the frame if (!(fFlags & TB_NO_BORDER)) { DrawFrame(fCoords.x, fCoords.y, fCoords.w, fCoords.h); } // set clipping region to inside of frame, so that text cannot // overflow during scrolling, etc. set_clip_rect(CONTENT_X, text_top, SCREEN_WIDTH, 48); //SDL_FillRect(screen, &cliprect, SDL_MapRGB(screen->format,0,0,255)); // draw face if (fFace != 0) { draw_sprite(CONTENT_X+fFaceXOffset, fCoords.y+CONTENT_Y-3, SPR_FACES, fFace); text_x += (FACE_W + 8); // move text over by width of face // face slide-in animation if (fFaceXOffset < 0) { fFaceXOffset += (sprites[SPR_FACES].w / 6); if (fFaceXOffset > 0) fFaceXOffset = 0; } } // blink the cursor (it is visible when < 7) if (!fCursorVisible || (fFlags & TB_CURSOR_NEVER_SHOWN)) { fCursorTimer = 9999; } else { if (++fCursorTimer >= 20) fCursorTimer = 0; } // draw text lines (the 4th line is for the first char shown on the new line during scrolling) int char_spacing = (fFlags & TB_VARIABLE_WIDTH_CHARS) ? 0 : 6; int y = (text_top + fTextYOffset); for(int i=0;i maxlinelen) || ch == 13) { // went over end of line fCurLineLen = 0; fCurLine++; // - in line-at-once mode we stop once we hit a CR // - in char-at-once mode we don't count the CR as being the one char we added if (ch == 13) { if (line_at_once) break; else continue; } } // CR's make no sound if (!line_at_once && ch != 13) sound(SND_MSG); fLines[fCurLine][fCurLineLen++] = ch; fLines[fCurLine][fCurLineLen] = 0; if (fCurLine >= MSG_NLINES - 1) { // went over bottom of box fScrolling = true; } // adding CR's takes no time if (line_at_once || ch == 13) continue; else break; } } int TextBox::GetMaxLineLen() { if (fFlags & TB_VARIABLE_WIDTH_CHARS) return 9999; return (fFace != 0) ? MAXLINELEN_FACE : MAXLINELEN_NO_FACE; } /* void c------------------------------() {} */ void TextBox::SetCanSpeedUp(bool newstate) { fCanSpeedUp = newstate; if (!fCanSpeedUp) fTextTimer = 0; } /* void c------------------------------() {} */ // draws the frame of an empty text box spanning // the specified coordinates. void TextBox::DrawFrame(int x, int y, int w, int h) { draw_sprite_chopped(x, y, SPR_TEXTBOX, 0, w, 8); // draw top y += 8; for(int draw=0;drawnum_bboxes = max_rectangles; this->assoc_object = associatedObject; if (num_bboxes >= IB_MAX_BBOXES) { num_bboxes = IB_MAX_BBOXES; staterr("IrregularBBox::Init(): too many rectangles (%d given): max is %d", max_rectangles, IB_MAX_BBOXES); return 1; } for(int i=0;isprite = SPR_BBOX_PUPPET_1 + i; bbox[i]->hp = 1000; bbox[i]->damage = 0; bbox[i]->invisible = true; } return 0; } void IrregularBBox::destroy() { for(int i=0;iDelete(); bbox[i] = NULL; } num_bboxes = 0; assoc_object = NULL; } /* void c------------------------------() {} */ void IrregularBBox::set_damage(int dmg) { for(int i=0;idamage = dmg; } // link damage hits on the bbox to damage on it's associated object, o void IrregularBBox::transmit_hits() { if (!assoc_object) return; for(int i=0;ihp < 1000) { assoc_object->DealDamage(1000 - bbox[i]->hp); bbox[i]->hp = 1000; } } } /* void c------------------------------() {} */ void IrregularBBox::place(void (*placefunc)(void *userparm), void *userparm) { // first assume all disabled for(int i=0;iy = -1024; // effectively disables it } // ask object to place it's bboxes as it wishes for this frame // by using set_bbox(). (*placefunc)(userparm); } void IrregularBBox::set_bbox(int index, int x, int y, int w, int h, uint32_t flags) { if (index < 0 || index >= num_bboxes) { staterr("IrregularBBox::set_bbox: index out of range: %d", index); return; } Object *box = bbox[index]; // coordinates passed in here are for the right-facing frame, // if we are currently left-facing then flip them. if (assoc_object->dir == LEFT) x = sprites[assoc_object->sprite].w - x - w; box->x = assoc_object->x + (x << CSF); box->y = assoc_object->y + (y << CSF); sprites[box->sprite].bbox.x1 = 0; sprites[box->sprite].bbox.y1 = 0; sprites[box->sprite].bbox.x2 = (w - 1); sprites[box->sprite].bbox.y2 = (h - 1); box->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE); box->flags |= flags; // nitpicking perfect sync for this frame since we are not aftermove box->x += assoc_object->xinertia; box->y += assoc_object->yinertia; } ================================================ FILE: ai/IrregularBBox.fdh ================================================ //hash:401a9d0e //automatically generated by Makegen /* located in ObjManager.cpp */ //---------------[referenced from ai/IrregularBBox.cpp]--------------// Object *CreateObject(int x, int y, int type); /* located in common/stat.cpp */ //---------------[referenced from ai/IrregularBBox.cpp]--------------// void staterr(const char *fmt, ...); ================================================ FILE: ai/IrregularBBox.h ================================================ #ifndef _IRREGULARBBOX_H #define _IRREGULARBBOX_H #define IB_MAX_BBOXES 4 class IrregularBBox { public: bool init(Object *associatedObject, int max_rectangles); void destroy(); void set_damage(int dmg); void transmit_hits(); void place(void (*placefunc)(void *userparm), void *userparm); void set_bbox(int index, int x, int y, int w, int h, uint32_t flags); private: Object *bbox[IB_MAX_BBOXES]; int num_bboxes; Object *assoc_object; }; #endif ================================================ FILE: ai/ai.cpp ================================================ #include "stdai.h" #include "ai.fdh" InitList AIRoutines; bool ai_init(void) { // setup function pointers to AI routines for(int i=0;ix + (sprites[o->sprite].frame[o->frame].dir[o->dir].actionpoint.x << CSF); y = o->y + (sprites[o->sprite].frame[o->frame].dir[o->dir].actionpoint.y << CSF); newObject = CreateObject(x, y, otype); newObject->dir = o->dir; return newObject; } // destroys all objects of type "otype". // creates a BoomFlash and smoke, but no bonuses. void KillObjectsOfType(int type) { Object *o = firstobject; while(o) { if (o->type == type) { SmokeClouds(o, 1, 0, 0); effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); o->Delete(); } o = o->next; } } // deletes all objects of type "otype" silently, without any smoke or other effects. void DeleteObjectsOfType(int type) { Object *o = firstobject; while(o) { if (o->type == type) { o->Delete(); } o = o->next; } } /* void c------------------------------() {} */ // handles object blinking: at random intervals forces object o's frame to blinkframe // for blinktime frames. void randblink(Object *o, int blinkframe, int blinktime, int prob) { if (o->blinktimer) { o->blinktimer--; o->frame = blinkframe; } else if (random(0, prob) == 0) { o->frame = blinkframe; o->blinktimer = 8; } } // call this in an object's aftermove routine if it's an object // which is being carried by the player like a puppy or curly. // x_left: offset from p's action point when he faces left // x_right: when he faces right // off_y: vertical offset from p's action point void StickToPlayer(Object *o, int x_left, int x_right, int off_y) { int x, y, frame; // needed for puppy in chest o->flags &= ~FLAG_SCRIPTONACTIVATE; // by offsetting from the player's action point, where he holds his gun, we // already have set up for us a nice up-and-down 1 pixel as he walks frame = player->frame; // the p's "up" frames have unusually placed action points so we have to cancel those out if (frame >= 3 && frame <= 5) frame -= 3; x = (player->x >> CSF) + sprites[player->sprite].frame[frame].dir[player->dir].actionpoint.x; y = (player->y >> CSF) + sprites[player->sprite].frame[frame].dir[player->dir].actionpoint.y; y += off_y; if (player->dir == RIGHT) { x += x_right; o->dir = RIGHT; } else { x += x_left; o->dir = LEFT; } o->x = (x << CSF); o->y = (y << CSF); } // used for some bosses with subobjects void transfer_damage(Object *o, Object *target) { if (o->hp < 1000) { // if you forget to set hp to 1000 when creating the puppet object, // it can immediately destroy the main object, possibly leading to crashes. #ifdef DEBUG ASSERT(o->hp != 0); #endif target->DealDamage(1000 - o->hp); o->hp = 1000; } } /* void c------------------------------() {} */ // do the "teleport in" effect for object o. // when complete, returns true. // this function uses o->timer and assume o->timer starts at 0. bool DoTeleportIn(Object *o, int slowness) { if (teleffect(o, slowness, false)) { o->clip_enable = false; return true; } return false; } // does a teleport out effect. // When complete, returns true. // this function uses o->timer and assume o->timer starts at 0. bool DoTeleportOut(Object *o, int slowness) { return teleffect(o, slowness, true); } // common code for DoTeleportIn and DoTeleportOut // returns true when teleport is complete static bool teleffect(Object *o, int slowness, bool teleporting_out) { o->display_xoff = random(-1, 1); if (!o->timer) { sound(SND_TELEPORT); o->clip_enable = true; o->clipy1 = 0; } if (++o->timer >= (sprites[o->sprite].h << slowness)) { o->clip_enable = false; o->display_xoff = 0; return true; } else { int amt = (o->timer >> slowness); if (teleporting_out) o->clipy2 = sprites[o->sprite].h - amt; else o->clipy2 = amt; return false; } } /* void c------------------------------() {} */ void ai_animate1(Object *o) { if (++o->frame >= sprites[o->sprite].nframes) o->frame = 0; } void ai_animate2(Object *o) { simpleanim(o, 2); } void ai_animate3(Object *o) { simpleanim(o, 3); } void ai_animate4(Object *o) { simpleanim(o, 4); } void ai_animate5(Object *o) { simpleanim(o, 5); } static void simpleanim(Object *o, int spd) { if (++o->animtimer >= spd) { o->animtimer = 0; if (++o->frame >= sprites[o->sprite].nframes) o->frame = 0; } } /* void c------------------------------() {} */ // aftermove routine which sticks the object to the action point of the NPC that's carrying it void aftermove_StickToLinkedActionPoint(Object *o) { Object *link = o->linkedobject; int dir; if (link) { dir = (link->dir ^ o->carry.flip); o->x = ((link->x >> CSF) + sprites[link->sprite].frame[link->frame].dir[dir].actionpoint.x) << CSF; o->y = ((link->y >> CSF) + sprites[link->sprite].frame[link->frame].dir[dir].actionpoint.y) << CSF; o->dir = dir; } else { o->Delete(); } } void onspawn_snap_to_ground(Object *o) { o->SnapToGround(); } void onspawn_set_frame_from_id2(Object *o) { o->frame = o->id2; } /* void c------------------------------() {} */ ================================================ FILE: ai/ai.fdh ================================================ //hash:3644b038 //automatically generated by Makegen /* located in ObjManager.cpp */ //---------------------[referenced from ai/ai.cpp]-------------------// Object *CreateObject(int x, int y, int type); /* located in platform.cpp */ //---------------------[referenced from ai/ai.cpp]-------------------// FILE *fileopen(const char *fname, const char *mode); /* located in caret.cpp */ //---------------------[referenced from ai/ai.cpp]-------------------// Caret *effect(int x, int y, int effectno); /* located in ai/ai.cpp */ //---------------------[referenced from ai/ai.cpp]-------------------// bool ai_init(void); bool load_npc_tbl(void); Object *SpawnObjectAtActionPoint(Object *o, int otype); void KillObjectsOfType(int type); void DeleteObjectsOfType(int type); void randblink(Object *o, int blinkframe, int blinktime, int prob); void StickToPlayer(Object *o, int x_left, int x_right, int off_y); void transfer_damage(Object *o, Object *target); bool DoTeleportIn(Object *o, int slowness); bool DoTeleportOut(Object *o, int slowness); static bool teleffect(Object *o, int slowness, bool teleporting_out); void ai_animate1(Object *o); void ai_animate2(Object *o); void ai_animate3(Object *o); void ai_animate4(Object *o); void ai_animate5(Object *o); static void simpleanim(Object *o, int spd); void aftermove_StickToLinkedActionPoint(Object *o); void onspawn_snap_to_ground(Object *o); void onspawn_set_frame_from_id2(Object *o); /* located in ai/sym/smoke.cpp */ //---------------------[referenced from ai/ai.cpp]-------------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //---------------------[referenced from ai/ai.cpp]-------------------// void sound(int snd); /* located in common/stat.cpp */ //---------------------[referenced from ai/ai.cpp]-------------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); /* located in common/misc.cpp */ //---------------------[referenced from ai/ai.cpp]-------------------// uint16_t fgeti(FILE *fp); uint32_t fgetl(FILE *fp); int random(int min, int max); ================================================ FILE: ai/ai.h ================================================ #ifndef _AI_H #define _AI_H void randblink(Object *o, int blinkframe = 1, int blinktime = 8, int prob = 120); void SmokeClouds(Object *o, int nclouds, int rangex=0, int rangey=0, Object *pushbehind=NULL); void SmokeXY(int x, int y, int nclouds, int rangex=0, int rangey=0, Object *pushbehind=NULL); #define ANIMATE(SPEED, FIRSTFRAME, LASTFRAME) \ { \ if (++o->animtimer > SPEED) \ { \ o->animtimer = 0; \ o->frame++; \ } \ if (o->frame > LASTFRAME) o->frame = FIRSTFRAME; \ } #define ANIMATE_FWD(SPEED) \ { \ if (++o->animtimer > SPEED) \ { \ o->animtimer = 0; \ o->frame++; \ } \ } #define FACEPLAYER \ { \ o->dir = (o->CenterX() > player->CenterX()) ? LEFT:RIGHT; \ } #define FACEAWAYPLAYER \ { \ o->dir = (o->CenterX() > player->CenterX()) ? RIGHT:LEFT; \ } #define LIMITX(K) \ { \ if (o->xinertia > K) o->xinertia = K; \ if (o->xinertia < -K) o->xinertia = -K; \ } #define LIMITY(K) \ { \ if (o->yinertia > K) o->yinertia = K; \ if (o->yinertia < -K) o->yinertia = -K; \ } #define pdistlx(K) ( abs(player->CenterX() - o->CenterX()) <= (K) ) #define pdistly(K) ( abs(player->CenterY() - o->CenterY()) <= (K) ) #define pdistly2(ABOVE,BELOW) (pdistly(((player->CenterY() > o->CenterY()) ? (BELOW):(ABOVE)))) #define pdistl(K) ( pdistlx((K)) && pdistly((K)) ) #define XMOVE(SPD) { o->xinertia = (o->dir == RIGHT) ? (SPD) : -(SPD); } #define XACCEL(SPD) { o->xinertia += (o->dir == RIGHT) ? (SPD) : -(SPD); } #define YMOVE(SPD) { o->yinertia = (o->dir == DOWN) ? (SPD) : -(SPD); } #define YACCEL(SPD) { o->yinertia += (o->dir == DOWN) ? (SPD) : -(SPD); } #define COPY_PFBOX \ { sprites[o->sprite].bbox = sprites[o->sprite].frame[o->frame].dir[o->dir].pf_bbox; } #define AIDEBUG \ { \ debug("%s", __FUNCTION__); \ debug("state: %d", o->state); \ debug("timer: %d", o->timer); \ debug("timer2: %d", o->timer2); \ } #endif ================================================ FILE: ai/almond/almond.cpp ================================================ #include "../stdai.h" #include "almond.h" #include "almond.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_WATERLEVEL, ai_waterlevel); ONTICK(OBJ_SHUTTER, ai_shutter); ONTICK(OBJ_SHUTTER_BIG, ai_shutter); ONTICK(OBJ_ALMOND_LIFT, ai_shutter); ONTICK(OBJ_SHUTTER_STUCK, ai_shutter_stuck); ONTICK(OBJ_ALMOND_ROBOT, ai_almond_robot); } /* void c------------------------------() {} */ void ai_waterlevel(Object *o) { /* debug("WL State: %d", o->state); debug("WL Y: %d", o->y>>CSF); debug("WL Timer: %d", o->timer); debug("WLForceUp: %d", map.wlforceup);*/ if (map.wlforcestate) { stat("Forced WL state to %d", map.wlforcestate); o->state = map.wlforcestate; map.wlforcestate = 0; } switch(o->state) { case 0: map.waterlevelobject = o; o->state = WL_CALM; o->y += (8<ymark = o->y; o->yinertia = 0x200; case WL_CALM: // calm waves around set point o->yinertia += (o->y < o->ymark) ? 4 : -4; LIMITY(0x100); break; case WL_CYCLE: // wait 1000 ticks, then rise all the way to top come down and repeat o->state = WL_DOWN; o->timer = 0; case WL_DOWN: o->yinertia += (o->y < o->ymark) ? 4 : -4; LIMITY(0x200); if (++o->timer > 1000) { o->state = WL_UP; } break; case WL_UP: // rise all the way to top then come back down o->yinertia += (o->y > 0) ? -4 : 4; LIMITY(0x200); // when we reach the top return to normal level if (o->y < (64<state = WL_CYCLE; } break; case WL_STAY_UP: // rise quickly all the way to top and stay there o->yinertia += (o->y > 0) ? -4 : 4; if (o->yinertia < -0x200) o->yinertia = -0x200; if (o->yinertia > 0x100) o->yinertia = 0x100; break; } map.wlstate = o->state; } /// common code to both Shutter AND Lift void ai_shutter(Object *o) { if (o->state == 10) { // allow hitting the stuck shutter no. 4 o->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE); switch(o->dir) { case LEFT: o->x -= 0x80; break; case RIGHT: o->x += 0x80; break; case UP: o->y -= 0x80; break; case DOWN: o->y += 0x80; break; } // animate Almond_Lift if (o->type==OBJ_ALMOND_LIFT) { ai_animate3(o); } else if (o->type==OBJ_SHUTTER_BIG) { if (!o->timer) { game.quaketime = 20; sound(SND_QUAKE); o->timer = 6; } else o->timer--; } } else if (o->state == 20) // tripped by script when Shutter_Big closes fully { SmokeSide(o, 4, DOWN); o->state = 21; } if (o->type == OBJ_SHUTTER_BIG) { ANIMATE(10, 0, 3); } } void ai_shutter_stuck(Object *o) { // when you shoot shutter 4, you're actually shooting us, but we want them // to think they're shooting the regular shutter object, so go invisible o->invisible = 1; } /* void c------------------------------() {} */ // the damaged robot which wakes up right before the Almond battle void ai_almond_robot(Object *o) { switch(o->state) { case 0: o->frame = 0; break; case 10: // blows up sound(SND_BIG_CRASH); SmokeClouds(o, 8, 3, 3); o->Delete(); break; case 20: // flashes ANIMATE(10, 0, 1); break; } } ================================================ FILE: ai/almond/almond.fdh ================================================ //hash:e7887cd2 //automatically generated by Makegen /* located in ai/ai.cpp */ //---------------[referenced from ai/almond/almond.cpp]--------------// void ai_animate3(Object *o); /* located in ai/almond/almond.cpp */ //---------------[referenced from ai/almond/almond.cpp]--------------// void ai_waterlevel(Object *o); void ai_shutter(Object *o); void ai_shutter_stuck(Object *o); void ai_almond_robot(Object *o); /* located in ai/sym/smoke.cpp */ //---------------[referenced from ai/almond/almond.cpp]--------------// void SmokeSide(Object *o, int nclouds, int dir); void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //---------------[referenced from ai/almond/almond.cpp]--------------// void sound(int snd); /* located in common/stat.cpp */ //---------------[referenced from ai/almond/almond.cpp]--------------// void stat(const char *fmt, ...); ================================================ FILE: ai/almond/almond.h ================================================ #ifndef _ALMOND_H #define _ALMOND_H // states to control the water-level object #define WL_CALM 10 // calm and slow at set point #define WL_CYCLE 20 // cycles between set point and top of screen #define WL_DOWN 21 // in cycle--currently down #define WL_UP 22 // in cycle--currently up #define WL_STAY_UP 30 // goes to top of screen and doesn't come back down #endif ================================================ FILE: ai/balrog_common.cpp ================================================ #include "stdai.h" #include "balrog_common.fdh" // some routines used by multiple Balrog boss fights or Balrog NPC's // --------------------------------------- // grab the player in preparation for running the toss_player_away animation. void balrog_grab_player(Object *o) { player->disabled = true; o->frame = 8; // face away o->substate = 0; } // shake and toss the player away. call balrog_grab_player first. // returns true when complete. // used in boss battles in Shack and at end of Labyrinth. bool balrog_toss_player_away(Object *o) { // keep player locked in position while balrog has him if (o->substate <= 1) { player->x = o->CenterX() - (player->Width() / 2); player->y = o->y + (4 << CSF); player->xinertia = player->yinertia = 0; } switch(o->substate) { case 0: // slowing to a stop { o->xinertia *= 4; o->xinertia /= 5; if (o->xinertia == 0) { o->substate = 1; o->timer = 0; o->animtimer = 0; o->frame = 15; } } break; case 1: // shaking with back turned { ANIMATE(2, 15, 16); // shake // after a moment toss player away // I used 101 because that puts it one frame past the end of the // player's hurtflash timer; otherwise when you reappear only your // gun is visible for the first frame. if (++o->timer > 101) { player->disabled = false; if (o->dir == LEFT) { player->x += 0x800; player->xinertia = 0x5ff; player->dir = RIGHT; } else { player->x -= 0x800; player->xinertia = -0x5ff; player->dir = LEFT; } player->y -= 0x1000; player->yinertia = -0x200; sound(SND_FUNNY_EXPLODE); o->dir = player->dir; o->substate = 2; o->frame = 3; // arms up o->timer = 0; } } break; case 2: // arms up after throwing player { if (++o->timer > 50) return true; } break; } return false; } /* void c------------------------------() {} */ ================================================ FILE: ai/balrog_common.fdh ================================================ //hash:0e6b9889 //automatically generated by Makegen /* located in ai/balrog_common.cpp */ //---------------[referenced from ai/balrog_common.cpp]--------------// void balrog_grab_player(Object *o); bool balrog_toss_player_away(Object *o); /* located in sound/sound.cpp */ //---------------[referenced from ai/balrog_common.cpp]--------------// void sound(int snd); ================================================ FILE: ai/balrog_common.h ================================================ #ifndef _BALROG_COMMON_H #define _BALROG_COMMON_H void balrog_grab_player(Object *o); bool balrog_toss_player_away(Object *o); #endif ================================================ FILE: ai/boss/balfrog.cpp ================================================ #include "../stdai.h" #include "balfrog.h" #include "balfrog.fdh" enum Frames { FRAME_STAND = 0, FRAME_CROUCH = 1, FRAME_MOUTH_OPEN = 2, FRAME_MOUTH_OPEN_HURT = 3, FRAME_JUMPING = 0 // on other sprite (SPR_BALFROG_JUMP) }; enum States { STATE_TRANSFORM = 20, // script-triggered: must stay at this value STATE_READY = 10, // script-triggered: must stay at this value STATE_DEATH = 130, // script-triggered: must stay at this value STATE_FIGHTING = 100, // script-triggered: must stay at this value STATE_JUMPING = 50, STATE_OPEN_MOUTH = 60, STATE_SHOOTING = 70, STATE_CLOSE_MOUTH = 80, STATE_BIG_JUMP = 90 }; enum BBox_States { BM_STAND, BM_JUMPING, BM_MOUTH_OPEN, BM_DISABLED }; #define FROG_START_X ((5 * TILE_W) << CSF) #define FROG_START_Y ((10 * TILE_H) << CSF) #define LANDING_SMOKE_COUNT 8 #define LANDING_SMOKE_YTOP -4 #define DEATH_SMOKE_COUNT 8 #define DEATH_SMOKE_YTOP -24 // when he lands he spawns frogs from ceiling-- // this is the range of where they should spawn at #define SPAWN_RANGE_LEFT 4 #define SPAWN_RANGE_RIGHT 16 #define SPAWN_RANGE_TOP 0 #define SPAWN_RANGE_BOTTOM 4 // offset from top and from left or right (depending on direction facing) // to spawn the balrog 'puppet' when we return to balrog form after being defeated. #define BALDEATH_X (12 << CSF) #define BALDEATH_Y (44 << CSF) // twiddle adjustment to get the proper Y coordinate when switching // between normal and jumping sprites. #define JUMP_SPRITE_ADJ (16 << CSF) INITFUNC(AIRoutines) { ONDEATH(OBJ_BALFROG, ondeath_balfrog); ONTICK(OBJ_BALFROG_SHOT, ai_generic_angled_shot); } void BalfrogBoss::OnMapEntry(void) { memset(&frog, 0, sizeof(frog)); o = CreateObject(FROG_START_X, FROG_START_Y, OBJ_BALFROG); game.stageboss.object = o; o->hp = 300; o->damage = 0; // damage comes from our bbox puppets, not our own bbox o->flags |= FLAG_SHOW_FLOATTEXT; o->sprite = SPR_BALFROG; o->dir = RIGHT; o->invisible = true; // setup the bounding box objects--this boss has an irregular bounding box // and so we simulate that by having three invisible objects which are wired // to transmit hits to the real Balfrog boss object. frog.bboxes.init(o, 3); frog.bboxes.set_damage(5); frog.bbox_mode = BM_DISABLED; // now disable being able to hit the Balfrog boss object itself. o->flags &= ~FLAG_SHOOTABLE; objprop[OBJ_BALFROG].xponkill = 1; objprop[OBJ_BALFROG].shaketime = 9; } /* void c------------------------------() {} */ void BalfrogBoss::Run() { if (!o) return; // each subroutine handles a subset of the frog's finite state machine RunFighting(); RunJumping(); RunShooting(); RunEntryAnim(); RunDeathAnim(); if (o) // because RunDeathAnim destroys o at end of fight { o->yinertia += 0x40; // don't limit upwards inertia or Big Jump will fail if (o->yinertia > 0x5FF) o->yinertia = 0x5FF; // link our "irregular" bbox (actually composed of multiple "puppet" bboxes) // to our real object. frog.bboxes.transmit_hits(); frog.bboxes.place(&call_place_bboxes, this); } } /* void c------------------------------() {} */ static void call_place_bboxes(void *balfrog) { ((BalfrogBoss *)balfrog)->place_bboxes(); } void BalfrogBoss::place_bboxes() { #define set_bbox frog.bboxes.set_bbox // I got these coordinates by drawing rectangles over the // sprites in Photoshop. These are for the right-facing frame // and are automatically flipped if the object is facing left. switch(frog.bbox_mode) { case BM_STAND: set_bbox(0, 5, 28, 50, 36, FLAG_INVULNERABLE); // body set_bbox(1, 37, 4, 38, 36, FLAG_INVULNERABLE); // head break; case BM_JUMPING: set_bbox(0, 12, 29, 41, 47, FLAG_INVULNERABLE); // body set_bbox(1, 30, 3, 43, 35, FLAG_INVULNERABLE); // head break; case BM_MOUTH_OPEN: set_bbox(0, 8, 22, 38, 42, FLAG_INVULNERABLE); // backside set_bbox(1, 46, 54, 13, 10, FLAG_INVULNERABLE); // feet below mouth set_bbox(2, 46, 15, 21, 39, FLAG_SHOOTABLE); // mouth target break; } } /* void c------------------------------() {} */ // the "master" start state, we can always return here eventually from // all the other states. The script also sets this state to start the fight. void BalfrogBoss::RunFighting() { switch(o->state) { case STATE_FIGHTING: { o->frame = FRAME_STAND; frog.bbox_mode = BM_STAND; o->state++; o->timer = 0; o->xinertia = 0; } case STATE_FIGHTING+1: { o->timer++; // prepare to jump if (o->timer < 50) o->frame = FRAME_STAND; if (o->timer == 50) o->frame = FRAME_CROUCH; if (o->timer == 60) o->frame = FRAME_STAND; // jump if (o->timer > 64) o->state = STATE_JUMPING; } break; } } // handles the hopping and the "big jump" attack // (a straight up/down jump after every 3rd attack that spawns tons of frogs). void BalfrogBoss::RunJumping() { switch(o->state) { case STATE_JUMPING: { sound(SND_FUNNY_EXPLODE); SetJumpingSprite(true); o->yinertia = -0x400; XMOVE(0x200); o->timer = 0; o->state++; } case STATE_JUMPING+1: { // turn around at walls if (o->dir == LEFT && o->blockl) o->dir = RIGHT; if (o->dir == RIGHT && o->blockr) o->dir = LEFT; // landed? if (++o->timer > 3 && o->blockd) { quake(30); SetJumpingSprite(false); // passed player? turn around and fire! if ((o->dir == RIGHT && o->x >= player->x) || \ (o->dir == LEFT && o->x <= player->x)) { o->dir ^= 1; o->state = STATE_OPEN_MOUTH; } else { o->state = STATE_FIGHTING; } // shake a small frog loose from the ceiling on every landing SpawnFrogs(OBJ_MINIFROG, 1); SpawnSmoke(LANDING_SMOKE_COUNT, LANDING_SMOKE_YTOP); } } break; case STATE_BIG_JUMP: { o->state++; o->timer = 0; o->xinertia = 0; } case STATE_BIG_JUMP+1: // animation of preparing to jump { o->timer++; if (o->timer < 50) o->frame = FRAME_STAND; if (o->timer == 50) o->frame = FRAME_CROUCH; if (o->timer == 70) o->frame = FRAME_STAND; if (o->timer > 74) { o->state++; SetJumpingSprite(true); o->yinertia = -0xA00; } } break; case STATE_BIG_JUMP+2: // in air, waiting to hit ground { // pass through ceiling at edges if (o->y <= MAPY(8)) o->flags |= FLAG_IGNORE_SOLID; else o->flags &= ~FLAG_IGNORE_SOLID; if (++o->timer > 3 && o->blockd) { o->flags &= ~FLAG_IGNORE_SOLID; SetJumpingSprite(false); quake(60); SpawnFrogs(OBJ_MINIFROG, 6); SpawnFrogs(OBJ_FROG, 2); SpawnSmoke(LANDING_SMOKE_COUNT, LANDING_SMOKE_YTOP); // player ran under us? turn around and fire! if ((o->dir == RIGHT && o->x >= player->x) || \ (o->dir == LEFT && o->x <= player->x)) { o->state = STATE_OPEN_MOUTH; } else { o->state = STATE_FIGHTING; } FACEPLAYER; } } break; } } void BalfrogBoss::RunShooting() { switch(o->state) { case STATE_OPEN_MOUTH: // open mouth and fire shots { o->frame = FRAME_STAND; o->timer = 0; o->state++; } case STATE_OPEN_MOUTH+1: { o->xinertia *= 8; o->xinertia /= 9; o->timer++; if (o->timer == 50) o->frame = FRAME_CROUCH; if (o->timer > 54) { o->state = STATE_SHOOTING; o->timer = 0; o->frame = FRAME_MOUTH_OPEN; frog.bbox_mode = BM_MOUTH_OPEN; frog.orighp = o->hp; frog.shots_fired = 0; } } break; case STATE_SHOOTING: { frog.bbox_mode = BM_MOUTH_OPEN; o->frame = FRAME_MOUTH_OPEN; o->xinertia *= 10; o->xinertia /= 11; if (o->shaketime) { if (++frog.shakeflash & 2) o->frame = FRAME_MOUTH_OPEN_HURT; } else { frog.shakeflash = 0; } if (++o->timer > 16) { o->timer = 0; EmFireAngledShot(o, OBJ_BALFROG_SHOT, 16, 0x200); sound(SND_EM_FIRE); if (++frog.shots_fired > 10 || o->hp < (frog.orighp - 90)) { o->frame = FRAME_CROUCH; o->state = STATE_CLOSE_MOUTH; frog.bbox_mode = BM_STAND; o->timer = 0; } } } break; case STATE_CLOSE_MOUTH: { o->frame = FRAME_CROUCH; if (++o->timer > 10) { o->timer = 0; o->frame = FRAME_STAND; if (++frog.attackcounter >= 3) { // big jump after every 3rd attack frog.attackcounter = 0; o->state = STATE_BIG_JUMP; } else { o->state = STATE_FIGHTING; } } } break; } } /* void c------------------------------() {} */ // the animation where we first appear // both these states are triggered by the script void BalfrogBoss::RunEntryAnim() { switch(o->state) { // transforming from Balrog // the flicker is calibrated to be interlaced exactly out-of-phase // with Balrog's flicker, which is entirely separate. case STATE_TRANSFORM: { o->timer = 0; o->frame = FRAME_MOUTH_OPEN; o->state++; } case STATE_TRANSFORM+1: { o->timer++; o->invisible = (o->timer & 2) ? true : false; } break; // transformation complete: puff away balrog, and appear solid now case STATE_READY: { SmokeXY(o->x + ((sprites[SPR_BALROG_GREEN].w / 2) << CSF), \ o->y + (48 << CSF), 8, 16, 16); o->state++; o->frame = FRAME_MOUTH_OPEN; } break; } } void BalfrogBoss::RunDeathAnim() { switch(o->state) { case STATE_DEATH: // BOOM! { SetJumpingSprite(false); o->frame = FRAME_MOUTH_OPEN; sound(SND_BIG_CRASH); o->xinertia = 0; o->timer = 0; o->state++; SpawnSmoke(DEATH_SMOKE_COUNT, DEATH_SMOKE_YTOP); } case STATE_DEATH+1: // shaking with mouth open { o->timer++; if ((o->timer % 5) == 0) { SpawnSmoke(1, DEATH_SMOKE_YTOP); } // at a glance it might seem like this has it alternate // slowly between 2 X coordinates, but in fact, it // alternates quickly between 3. o->x += (o->timer & 2) ? (1 << CSF) : (-1 << CSF); if (o->timer > 100) { o->timer = 0; o->state++; } } break; case STATE_DEATH+2: // begin flashing back and forth between frog and balrog { // spawn balrog puppet frog.balrog = CreateObject(0, o->y+BALDEATH_Y, OBJ_BALROG); frog.balrog->state = 500; // tell him to give us complete control frog.balrog->dir = o->dir; frog.balrog->frame = 5; if (o->dir == RIGHT) { frog.balrog->x = (o->x + BALDEATH_X); } else { frog.balrog->x = o->x + o->Width(); // not the same as o->Right() frog.balrog->x -= frog.balrog->Width(); frog.balrog->x -= BALDEATH_X; } o->state++; } case STATE_DEATH+3: // flashing { o->timer++; if ((o->timer % 9) == 0) SpawnSmoke(1, DEATH_SMOKE_YTOP); if (o->timer <= 150) { o->invisible = (o->timer & 2); frog.balrog->invisible = !(o->timer & 2); } if (o->timer > 156) { o->timer = 0; o->state++; } } break; case STATE_DEATH+4: // balrog falling to ground { // should start to move exactly when timer hits 160 // // 10 frames until starts to fall // 14 frames until changes to landed frame frog.balrog->yinertia += 0x40; if (frog.balrog->blockd) { frog.balrog->frame = 2; if (++o->timer > 30) { frog.balrog->frame = 3; o->state++; } } } break; case STATE_DEATH+5: // balrog flying away { if (++o->timer > 30) { // it's all over, destroy ourselves and clean up frog.balrog->yinertia = -0xA00; frog.balrog->flags |= FLAG_IGNORE_SOLID; if (frog.balrog->y < -(100 << CSF)) { frog.balrog->Delete(); frog.bboxes.destroy(); o->Delete(); o = game.stageboss.object = NULL; return; } } } break; } } /* void c------------------------------() {} */ void ondeath_balfrog(Object *o) { o->flags &= ~FLAG_SHOOTABLE; StartScript(1000); } /* void c------------------------------() {} */ // shake loose frogs from the ceiling void BalfrogBoss::SpawnFrogs(int objtype, int count) { Object *child; for(int i=0;idir = DOWN; // allow fall through ceiling } } // spawn the smoke clouds from landing after a jump // or during the death sequence. void BalfrogBoss::SpawnSmoke(int count, int ytop) { Object *smoke; for(int i=0;iLeft() + (4 << CSF), o->Right() - (4<Bottom() + random(ytop<xinertia = random(-0x155, 0x155); smoke->yinertia = random(-0x600, 0); } } // switches on and off the jumping frame/sprite void BalfrogBoss::SetJumpingSprite(bool enable) { if (enable != (o->sprite == SPR_BALFROG_JUMP)) { if (enable) { o->sprite = SPR_BALFROG_JUMP; o->frame = FRAME_JUMPING; o->y -= JUMP_SPRITE_ADJ; frog.bbox_mode = BM_JUMPING; } else { o->sprite = SPR_BALFROG; o->frame = FRAME_STAND; o->y += JUMP_SPRITE_ADJ; frog.bbox_mode = BM_STAND; } } } ================================================ FILE: ai/boss/balfrog.fdh ================================================ //hash:c7373ca9 //automatically generated by Makegen /* located in game.cpp */ //----------------[referenced from ai/boss/balfrog.cpp]--------------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //----------------[referenced from ai/boss/balfrog.cpp]--------------// Object *CreateObject(int x, int y, int type); /* located in tsc.cpp */ //----------------[referenced from ai/boss/balfrog.cpp]--------------// ScriptInstance *StartScript(int scriptno, int pageno); /* located in trig.cpp */ //----------------[referenced from ai/boss/balfrog.cpp]--------------// void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/sym/smoke.cpp */ //----------------[referenced from ai/boss/balfrog.cpp]--------------// void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in ai/boss/balfrog.cpp */ //----------------[referenced from ai/boss/balfrog.cpp]--------------// static void call_place_bboxes(void *balfrog); void ondeath_balfrog(Object *o); /* located in sound/sound.cpp */ //----------------[referenced from ai/boss/balfrog.cpp]--------------// void sound(int snd); /* located in common/misc.cpp */ //----------------[referenced from ai/boss/balfrog.cpp]--------------// int random(int min, int max); ================================================ FILE: ai/boss/balfrog.h ================================================ #ifndef _BALFROG_H #define _BALFROG_H #include "../IrregularBBox.h" class BalfrogBoss : public StageBoss { public: void OnMapEntry(); void Run(); void place_bboxes(); private: void RunDeathAnim(); void RunEntryAnim(); void RunFighting(); void RunJumping(); void RunShooting(); void SetJumpingSprite(bool enable); void SpawnFrogs(int objtype, int count); void SpawnSmoke(int count, int ytop); void set_bbox(int index, int x, int y, int w, int h, uint32_t flags); void transmit_bbox_hits(Object *box); Object *o; struct { int shakeflash; int orighp; int shots_fired; int attackcounter; Object *balrog; // balrog puppet for death scene // our group of multiple bboxes to simulate our irregular bounding box. IrregularBBox bboxes; int bbox_mode; } frog; }; #endif ================================================ FILE: ai/boss/ballos.cpp ================================================ #include "../stdai.h" #include "ballos.h" #include "ballos.fdh" static int platform_speed; static int rotators_left; #define FLOOR_Y 0x26000 // Y coord of floor #define CRASH_Y (FLOOR_Y - (40 << CSF)) // Y coord of main when body hits floor enum EYE_STATES { EYE_OPENING = 10, EYE_CLOSING = 20, EYE_INVISIBLE = 30, EYE_EXPLODING = 40 }; enum BS_STATES { // Form 1 states AS_COME_DOWN = 100, // scripted AS_BEGIN_FIGHT = 200, // scripted AS_PREPARE_JUMP = 210, AS_JUMPING = 215, AS_DEFEATED = 220, // scripted // Form 2 states. BS_ENTER_FORM = 300, // scripted BS_FIGHT_BEGIN = 311, // scripted BS_LEFT = 320, BS_UP = 330, BS_RIGHT = 340, BS_DOWN = 350, // Form 3 states CS_ENTER_FORM = 400, CS_SPAWN_SPIKES = 410, CS_EXPLODE_BLOODY = 420, CS_SPIN_PLATFORMS = 430 }; INITFUNC(AIRoutines) { ONDEATH(OBJ_BALLOS_MAIN, ondeath_ballos); ONTICK(OBJ_BALLOS_ROTATOR, ai_ballos_rotator); AFTERMOVE(OBJ_BALLOS_ROTATOR, aftermove_ballos_rotator); ONTICK(OBJ_BALLOS_PLATFORM, ai_ballos_platform); } void BallosBoss::OnMapEntry(void) { // create (invisible) main controller object main = CreateObject(0, 0, OBJ_BALLOS_MAIN); game.stageboss.object = main; main->id2 = 1000; // defeated script (has a flagjump in it to handle each form) main->flags = (FLAG_SHOW_FLOATTEXT | FLAG_SCRIPTONDEATH | \ FLAG_SOLID_BRICK | FLAG_IGNORE_SOLID); main->x = ((map.xsize / 2) * TILE_W) << CSF; main->y = -(64 << CSF); main->damage = 0; main->hp = 800; objprop[main->type].hurt_sound = SND_ENEMY_HURT_COOL; main->invisible = true; // create body (the big rock) body = CreateObject(0, 0, OBJ_BALLOS_BODY); body->hp = 1000; // not his real HP, we're using damage transfer body->flags = (FLAG_SOLID_MUSHY | FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_IGNORE_SOLID); // create eyes (open/close animations) for(int i=0;idir = i; eye[i]->hp = 1000; } // create a top shield to cover eyes from above shield = CreateObject(0, 0, OBJ_BBOX_PUPPET); shield->sprite = SPR_BBOX_PUPPET_1; shield->invisible = true; shield->hp = 1000; shield->flags = (FLAG_SOLID_MUSHY | FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_IGNORE_SOLID); // initilize bboxes sprites[body->sprite].bbox.set(-48, -24, 48, 32); sprites[shield->sprite].bbox.set(-32, -8, 32, 8); sprites[main->sprite].bbox.set(-32, -48, 32, 48); sprites[main->sprite].solidbox = sprites[main->sprite].bbox; sprites[body->sprite].solidbox = sprites[body->sprite].bbox; sprites[shield->sprite].solidbox = sprites[shield->sprite].bbox; // body and eyes are both directly shootable during one form or another // but should not shake as their damage is to be transferred to main object. objprop[OBJ_BALLOS_MAIN].shaketime = 8; objprop[OBJ_BALLOS_BODY].shaketime = 0; objprop[OBJ_BALLOS_EYE].shaketime = 0; // initilize parameters stat("BallosBoss::OnMapEntry()"); } /* void c------------------------------() {} */ void BallosBoss::Run() { if (!main) return; //AIDEBUG; transfer_damage(body, main); transfer_damage(eye[LEFT], main); transfer_damage(eye[RIGHT], main); transfer_damage(shield, main); RunForm1(main); RunForm2(main); RunForm3(main); RunDefeated(main); run_eye(LEFT); run_eye(RIGHT); // flash red when hurt if (main->shaketime & 2) body->frame |= 1; else body->frame &= ~1; } void BallosBoss::RunAftermove() { if (!main) return; // place eyes place_eye(LEFT); place_eye(RIGHT); // place body body->x = main->x; body->y = main->y; // place shield shield->x = main->x; shield->y = main->y - (44 << CSF); // riding on platform by eye? Player can sort of stay on this platform // when he jumps. We don't do this for the shield up top though, in order that // he gets kind of slid off--what happens is he'll fall through the shield // onto the main body (a SOLID_BRICK), and then now that he's embedded in // the shield (a SOLID_MUSHY), it'll repel him to the side. if (player->riding == body) { player->apply_xinertia(main->xinertia); player->apply_yinertia(main->yinertia); } } /* void c------------------------------() {} */ // left and right maximums during form 1 static const int F1_LEFT = (88 << CSF); static const int F1_RIGHT = (552 << CSF); // runs arrival of first form as a stage-boss void BallosBoss::RunComeDown(Object *o) { switch(o->state) { case AS_COME_DOWN: { o->savedhp = o->hp; o->x = player->CenterX(); o->y = -(64 << CSF); o->frame = 0; // create the targeter // setting dir to right tells it don't spawn any lightning CreateObject(o->x, FLOOR_Y, OBJ_BALLOS_TARGET)->dir = RIGHT; o->timer = 0; if (o->x < F1_LEFT) o->x = F1_LEFT; if (o->x > F1_RIGHT) o->x = F1_RIGHT; o->state++; } case AS_COME_DOWN+1: { if (++o->timer > 30) o->state++; } break; // falling case AS_COME_DOWN+2: { o->yinertia += 0x40; LIMITY(0xC00); if (passed_ycoord(GREATER_THAN, CRASH_Y)) { o->yinertia = 0; o->timer = 0; o->state++; megaquake(30, SND_MISSILE_HIT); // player smush damage // (he could only get that low if he had been pushed into the floor) if (player->y > (o->y + (48<x, o->y + (40<blockd) player->yinertia = -0x200; } } break; case AS_COME_DOWN+3: { if (++o->timer > 31) { SetEyeStates(EYE_OPENING); o->state++; } } break; } } // 1st form as a stageboss. // the one where he jumps around as a rock. void BallosBoss::RunForm1(Object *o) { RunComeDown(o); switch(o->state) { case AS_BEGIN_FIGHT: { // can be damaged between eyes opening and boss bar appearing, // but it is not counted. o->hp = o->savedhp; o->state = AS_PREPARE_JUMP; } case AS_PREPARE_JUMP: // delay, then jump at player { o->xinertia = 0; o->damage = 0; o->state++; // he makes two jumps then a pause, // after that it's three jumps before pausing. // this corresponds to: if ((++o->timer2 % 3) == 0) o->timer = 150; else o->timer = 50; } case AS_PREPARE_JUMP+1: { if (--o->timer <= 0) { o->yinertia = -0xC00; o->xinertia = (o->x < player->x) ? 0x200 : -0x200; o->state = AS_JUMPING; } } break; case AS_JUMPING: { o->yinertia += 0x55; LIMITY(0xC00); if (passed_xcoord(LESS_THAN, F1_LEFT)) o->xinertia = 0x200; if (passed_xcoord(GREATER_THAN, F1_RIGHT)) o->xinertia = -0x200; if (passed_ycoord(GREATER_THAN, CRASH_Y)) { // player smush damage if (player->y > (o->y + (48<blockd) player->yinertia = -0x200; megaquake(30, SND_MISSILE_HIT); CreateObject(o->x - (12<y + (52<dir = LEFT; CreateObject(o->x + (12<y + (52<dir = RIGHT; SmokeXY(o->x, o->y + (40<yinertia = 0; o->state = AS_PREPARE_JUMP; } } break; // 1st form defeated case AS_DEFEATED: { SetEyeStates(EYE_CLOSING); game.bossbar.defeated = true; o->hp = 1200; o->state++; o->xinertia = 0; o->shaketime = 0; } case AS_DEFEATED+1: { o->yinertia += 0x40; LIMITY(0xC00); if (passed_ycoord(GREATER_THAN, CRASH_Y)) { o->yinertia = 0; o->state++; megaquake(30, SND_MISSILE_HIT); SmokeXY(o->x, o->y + 0x5000, 16, 40, 0); if (player->blockd) player->yinertia = -0x200; // ... and wait for script to trigger form 2 } } break; } } // 2nd form as a stageboss. // the one where he spawns spiky rotators and circles around the room. void BallosBoss::RunForm2(Object *o) { static const int BS_SPEED = 0x3AA; static const int ARENA_LEFT = (119 << CSF); static const int ARENA_TOP = (119 << CSF); static const int ARENA_RIGHT = (521 << CSF); static const int ARENA_BOTTOM = (233 << CSF); switch(o->state) { // enter 2nd form (script-triggered) case BS_ENTER_FORM: { o->timer = 0; o->state++; rotators_left = 0; for(int angle=0;angle<=0x100;angle+=0x20) { Object *r = CreateObject(o->x, o->y, OBJ_BALLOS_ROTATOR); r->angle = angle; r->dir = (rotators_left & 1) ? RIGHT : LEFT; rotators_left++; } } case BS_ENTER_FORM+1: { o->y += (ARENA_BOTTOM - o->y) / 8; if (passed_xcoord(LESS_THAN, ARENA_LEFT, false)) o->x += (ARENA_LEFT - o->x) / 8; if (passed_xcoord(GREATER_THAN, ARENA_RIGHT, false)) o->x += (ARENA_RIGHT - o->x) / 8; } break; case BS_FIGHT_BEGIN: // script-triggered { SetRotatorStates(10); // spin CCW, work as treads o->state = BS_LEFT; o->timer = 0; } case BS_LEFT: // left on floor { o->xinertia = -BS_SPEED; o->yinertia = 0; o->dirparam = LEFT; if (passed_xcoord(LESS_THAN, ARENA_LEFT)) o->state = BS_UP; } break; // up on wall case BS_UP: { o->xinertia = 0; o->yinertia = -BS_SPEED; o->dirparam = UP; if (passed_ycoord(LESS_THAN, ARENA_TOP)) o->state = BS_RIGHT; } break; // right on ceiling case BS_RIGHT: { o->xinertia = BS_SPEED; o->yinertia = 0; o->dirparam = RIGHT; // all rotators destroyed? if (rotators_left <= 0 && ++o->timer > 3) { // center of room if (o->x >= (312<x <= (344<state = CS_ENTER_FORM; } } if (passed_xcoord(GREATER_THAN, ARENA_RIGHT)) o->state = BS_DOWN; } break; // down on wall case BS_DOWN: { o->xinertia = 0; o->yinertia = BS_SPEED; o->dirparam = DOWN; if (passed_ycoord(GREATER_THAN, ARENA_BOTTOM)) { o->state = BS_LEFT; } } break; } } // form 3 as a stageboss, the final form. // he reaches the center of the room, platforms come out, spikes go up, // and he explodes into a really bloody version of himself. // // then the platforms spin in various speeds and directions while he // spawns red butes from the sides and his top. void BallosBoss::RunForm3(Object *o) { static const int YPOSITION = (167 << CSF); // platform spin speeds and how long they travel at each speed. // it's a repeating pattern. static const struct { int length, speed; } platform_pattern[] = { 500, 2, 200, 1, 20, 0, 200, -1, 500, -2, 200, -1, 20, 0, 200, 1, 0, 0 }; switch(o->state) { // enter form 3 case CS_ENTER_FORM: { o->timer = 0; o->xinertia = 0; o->yinertia = 0; o->state++; DeleteObjectsOfType(OBJ_GREEN_DEVIL_SPAWNER); SetRotatorStates(20); // fast spin CCW } case CS_ENTER_FORM+1: { // come down into center of room o->y += (YPOSITION - o->y) / 8; o->timer++; if (o->timer == 50) { // create platforms platform_speed = 0; for(int angle=0;angle<0x100;angle+=0x20) { Object *p = CreateObject(o->x, o->y, OBJ_BALLOS_PLATFORM); p->dirparam = angle; } } if (o->timer > 100) { platform_speed = -1; o->state = CS_SPAWN_SPIKES; o->timer = 0; } } break; case CS_SPAWN_SPIKES: { o->timer = 0; o->xmark = 0; o->state++; } case CS_SPAWN_SPIKES+1: { o->timer++; if ((o->timer % 3) == 0) sound(SND_QUAKE); if ((o->timer % 30) == 1) { o->xmark += 2; CreateObject((o->xmark * TILE_W) << CSF, \ FLOOR_Y + (48 << CSF), OBJ_BALLOS_SPIKES); if (o->xmark == 38) o->state = CS_EXPLODE_BLOODY; } } break; // explode into all bloody case CS_EXPLODE_BLOODY: { SetEyeStates(EYE_INVISIBLE); SetRotatorStates(30); // slow spin CW, alternate open/closed SmokeClouds(o, 256, 60, 60); // ka boom! sound(SND_EXPLOSION1); megaquake(30); body->frame |= 2; // go all bloody body->flags &= ~FLAG_INVULNERABLE; shield->flags &= ~FLAG_INVULNERABLE; o->state = CS_SPIN_PLATFORMS; } // fall-through case CS_SPIN_PLATFORMS: { o->state++; o->timer = 0; o->timer2 = 0; o->timer3 = 0; platform_speed = platform_pattern[o->timer2].speed; } case CS_SPIN_PLATFORMS+1: { // spin platforms if (++o->timer3 > platform_pattern[o->timer2].length) { o->timer3 = 0; o->timer2++; if (!platform_pattern[o->timer2].length) o->timer2 = 0; platform_speed = platform_pattern[o->timer2].speed; } // spawn butes switch(++o->timer) { case 270: // spawn swordsmen from face case 280: case 290: { SmokeXY(o->x, o->y - (52<x, o->y - (52<dir = UP; sound(SND_EM_FIRE); } break; case 300: // spawn archers on side { o->timer = 0; // direction butes will be facing, not side of screen int dir = (player->CenterX() > o->x) ? LEFT : RIGHT; for(int i=0;i<8;i++) { // give some granularity to the coords, // so that they can't overlap too closely. int x = (random(-TILE_W, TILE_W) & ~3) << CSF; int y = (random(2 * TILE_H, 17 * TILE_H) & ~3) << CSF; if (dir == LEFT) x += MAPX(map.xsize - 1); CreateObject(x, y, OBJ_BUTE_ARCHER_RED)->dir = dir; } } break; } // spawn blood int prob = (o->hp <= 500) ? 4 : 10; if (!random(0, prob)) { CreateObject(o->x + random(-40<y + random(0, 40<angle = DOWN; } } break; } } void BallosBoss::RunDefeated(Object *o) { switch(o->state) { case 1000: { o->state = 1001; o->timer = 0; SetEyeStates(EYE_EXPLODING); // blow out eyes SetRotatorStates(1000); // explode rotators uint32_t mask = ~(FLAG_SOLID_BRICK | FLAG_SOLID_MUSHY | \ FLAG_SHOOTABLE | FLAG_INVULNERABLE); main->flags &= mask; body->flags &= mask; shield->flags &= mask; eye[LEFT]->flags &= mask; eye[RIGHT]->flags &= mask; } case 1001: { int x = o->x + random(-60<y + random(-60<timer++; if ((o->timer % 12) == 0) sound(SND_MISSILE_HIT); if (o->timer > 150) { o->timer = 0; o->state = 1002; starflash.Start(o->x, o->y); sound(SND_EXPLOSION1); } } break; case 1002: { megaquake(40); if (++o->timer >= 50) { KillObjectsOfType(OBJ_BUTE_ARCHER_RED); KillObjectsOfType(OBJ_BALLOS_SPIKES); body->invisible = true; eye[LEFT]->invisible = true; eye[RIGHT]->invisible = true; o->state = 1003; } } break; } } void ondeath_ballos(Object *o) { // as soon as one of his forms is defeated make him non-killable // until the init for the next form runs and makes him killable again. // intended to fix the extremely rare possibility of killing him completely // after his 1st form instead of moving on to the spiky rotators like he should. o->hp = 999999; } /* void c------------------------------() {} */ // Handles his eyes. // // When closed, the eyes are like "overlay" objects that replace the open eyes // drawn on the body, and allow animating them seperately from the body. // // When open, the eyes turn invisible and are used as shoot-points to detect shots // hitting the eyes drawn on the body. void BallosBoss::run_eye(int index) { Object *o = eye[index]; switch(o->state) { case 0: { o->flags = (FLAG_SHOOTABLE | FLAG_INVULNERABLE); o->state = 1; } break; // open eyes case EYE_OPENING: { o->frame = 0; o->animtimer = 0; o->state++; } case EYE_OPENING+1: { if (++o->animtimer > 2) { o->animtimer = 0; if (++o->frame >= 3) { o->flags &= ~FLAG_INVULNERABLE; o->invisible = true; o->state++; } } } break; // close eyes case EYE_CLOSING: { o->frame = 3; o->invisible = false; o->flags |= FLAG_INVULNERABLE; o->animtimer = 0; o->state++; } case EYE_CLOSING+1: { if (++o->animtimer > 2) { o->animtimer = 0; if (--o->frame <= 0) { o->frame = 0; o->state++; } } } break; // invisible (the underlying eyes drawn on the body are what are seen) case EYE_INVISIBLE: { o->flags &= ~FLAG_INVULNERABLE; o->invisible = true; o->state++; } break; // explode eyes (final defeat sequence) case EYE_EXPLODING: { o->frame = 4; // empty eyes o->invisible = false; o->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE); o->state++; if (o->dir == LEFT) SmokeXY(o->x - (4<y, 10, 4, 4); else SmokeXY(o->x + (4<y, 10, 4, 4); } break; } } void BallosBoss::place_eye(int index) { Object *o = eye[index]; if (o->dir == LEFT) o->x = main->x - (24 << CSF); else o->x = main->x + (24 << CSF); o->y = main->y - (36 << CSF); } void BallosBoss::SetEyeStates(int newstate) { eye[LEFT]->state = newstate; eye[RIGHT]->state = newstate; } /* void c------------------------------() {} */ void ai_ballos_rotator(Object *o) { switch(o->state) { case 0: // just spawned { o->state = 1; o->timer2 = o->angle * 2; o->timer3 = 0xC0; o->damage = 14; } case 1: // expanding outward; overshoot a bit { if (o->timer3 < 0x140) o->timer3 += 0x08; else o->state = 2; } break; case 2: // come back in to correct distance { if (o->timer3 > 0x130) o->timer3 -= 0x04; else o->state = 3; } break; // spinning CCW during form 2 (working like treads) case 10: { o->state = 11; o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; o->hp = 1000; } case 11: // spinning during phase 2, alive { o->timer2 -= 2; if (o->timer2 < 0) o->timer2 += 0x200; if (o->frame != 2) // still undestroyed? { o->frame = (o->shaketime & 2) ? 1 : 0; if (o->hp <= (1000 - 100)) { o->flags &= ~FLAG_SHOOTABLE; o->frame = 2; // close eye SmokeClouds(o, 32, 16, 16); sound(SND_LITTLE_CRASH); rotators_left--; } } spawn_impact_puffs(o); } break; case 20: // spinning fast CCW while spikes come up { o->frame = 2; o->timer2 -= 4; if (o->timer2 < 0) o->timer2 += 0x200; } break; case 30: // beginning form 3 { o->state = 31; o->hp = 1000; o->damage = 10; // this dir was set when they were created and // alternates left/right around the circle if (o->dir == LEFT) { o->flags |= FLAG_SHOOTABLE; o->frame = 0; } else { o->flags |= FLAG_INVULNERABLE; o->frame = 2; } } case 31: // form 3 CW slow spin { // come in closer to main object if (o->timer3 > 0x100) o->timer3--; // spin CW if (++o->timer2 > 0x200) o->timer2 -= 0x200; if (o->flags & FLAG_SHOOTABLE) { o->frame = (o->shaketime & 2) ? 1 : 0; if (o->hp < (1000 - 100)) { o->xinertia = 0; o->yinertia = 0; o->flags &= ~(FLAG_SHOOTABLE | FLAG_IGNORE_SOLID); SmokeClouds(o, 32, 16, 16); sound(SND_LITTLE_CRASH); o->frame = 2; o->state = 40; o->damage = 5; // blow up immediately if Ballos is defeated o->timer2 = 0; } } } break; case 40: // destroyed during phase 3, bouncing { o->yinertia += 0x20; LIMITY(0x5ff); if (o->blockl) o->xinertia = 0x100; if (o->blockr) o->xinertia = -0x100; if (o->blockd && o->yinertia >= 0) { // first time they hit they head toward player, after that // they keep going in same direction until hit wall if (o->xinertia == 0) o->xinertia = (o->CenterX() < player->CenterX()) ? 0x100 : -0x100; o->yinertia = -0x800; sound(SND_QUAKE); } } break; case 1000: // Ballos was defeated { o->state = 1001; o->xinertia = 0; o->yinertia = 0; o->frame = 2; o->flags &= ~(FLAG_SHOOTABLE | FLAG_IGNORE_SOLID); o->damage = 0; o->timer2 /= 4; } case 1001: { // explode one by one going clockwise if (o->timer2 <= 0) { SmokeClouds(o, 32, 16, 16); sound(SND_LITTLE_CRASH); effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); o->Delete(); } else { o->timer2--; o->frame = (o->timer2 & 2) ? 1 : 0; } } break; } } void aftermove_ballos_rotator(Object *o) { if (o->state < 40) { Object *ballos = game.stageboss.object; if (!ballos) return; uint8_t angle = (o->timer2 / 2); int dist = (o->timer3 / 4) << CSF; o->x = ballos->x + (xinertia_from_angle(angle, dist)); o->y = ballos->y + (yinertia_from_angle(angle, dist)); } } static void SetRotatorStates(int newstate) { Object *o; FOREACH_OBJECT(o) { if (o->type == OBJ_BALLOS_ROTATOR) o->state = newstate; } } // spawns impact smokeclouds/skulls as the rotators hit the ground/walls static void spawn_impact_puffs(Object *o) { Object *ballos = game.stageboss.object; #define SHORT (8<dirparam; if (o->timer2 == hitdata[bd].wallangle + HITANGLE) { make_puff(o->x + hitdata[bd].xoffs1, o->y + hitdata[bd].yoffs1, bd); make_puff(o->x + hitdata[bd].xoffs2, o->y + hitdata[bd].yoffs2, bd); sound(SND_QUAKE); if (bd == RIGHT) // on ceiling { CreateObject(o->x - SHORT, o->y - LONG, OBJ_BALLOS_SKULL); } } } static void make_puff(int x, int y, int bd) { Object *o = SmokePuff(x, y); // make sure the smoke puff is traveling away from floor/wall switch(bd) { case LEFT: o->yinertia = -abs(o->yinertia); break; case UP: o->xinertia = abs(o->xinertia); break; case RIGHT: o->yinertia = abs(o->yinertia); break; case DOWN: o->xinertia = -abs(o->xinertia); break; } } /* void c------------------------------() {} */ void ai_ballos_platform(Object *o) { Object *ballos = game.stageboss.object; if (!ballos) return; if (ballos->state >= 1000) // defeated { if (o->state < 1000) o->state = 1000; } switch(o->state) { case 0: // just spawned { o->timer2 = (o->dirparam * 4); o->timer3 = 0xC0; o->state = 1; } case 1: // expanding outward { if (o->timer3 < 0x1C0) o->timer3 += 8; else o->state = 2; } break; // running - the direction/speed is set by the global variable, // controlled by Ballos. case 2: { o->timer2 += platform_speed; if (o->timer2 < 0) o->timer2 += 0x400; if (o->timer2 >= 0x400) o->timer2 -= 0x400; } break; case 1000: // ballos defeated! { o->state = 1001; o->xinertia = 0; o->yinertia = 0; o->flags &= ~FLAG_SOLID_BRICK; } case 1001: { o->yinertia += 0x40; if (o->Top() > (map.ysize * TILE_H) << CSF) o->Delete(); } break; } if (o->state >= 1000) return; // let player jump up through platforms, but be solid when he is standing on them if (player->yinertia < 0 || player->CenterY() > o->Top()) { o->flags &= ~FLAG_SOLID_BRICK; } else { o->flags |= FLAG_SOLID_BRICK; } // spin uint8_t angle = o->timer2 / 4; int xoff, yoff; xoff = xinertia_from_angle(angle, o->timer3 << CSF); yoff = yinertia_from_angle(angle, o->timer3 << CSF); o->xmark = (xoff / 4) + ballos->x; o->ymark = ((yoff / 4) + (16 << CSF)) + ballos->y; switch(abs(platform_speed)) { case 1: if ((o->timer2 % 4) == 0) { o->speed = (o->ymark - o->y) / 4; } break; case 2: if ((o->timer2 & 2) == 0) { o->speed = (o->ymark - o->y) / 2; } break; default: o->speed = (o->ymark - o->y); break; } o->xinertia = (o->xmark - o->x); o->yinertia = o->speed; } /* void c------------------------------() {} */ bool BallosBoss::passed_xcoord(bool ltgt, int xcoord, bool reset) { int next_x = main->x + main->xinertia; bool result; if (ltgt == LESS_THAN) result = (next_x <= xcoord); else result = (next_x >= xcoord); if (result && reset) { main->x = xcoord; main->xinertia = 0; } return result; } bool BallosBoss::passed_ycoord(bool ltgt, int ycoord, bool reset) { int next_y = main->y + main->yinertia; bool result; if (ltgt == LESS_THAN) result = (next_y <= ycoord); else result = (next_y >= ycoord); if (result && reset) { main->y = ycoord; main->yinertia = 0; } return result; } /* void c------------------------------() {} */ ================================================ FILE: ai/boss/ballos.fdh ================================================ //hash:4fc91ee5 //automatically generated by Makegen /* located in game.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// void megaquake(int quaketime, int snd); /* located in ObjManager.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// Caret *effect(int x, int y, int effectno); /* located in player.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// void hurtplayer(int damage); /* located in trig.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// int xinertia_from_angle(uint8_t angle, int speed); int yinertia_from_angle(uint8_t angle, int speed); /* located in ai/ai.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// void transfer_damage(Object *o, Object *target); void DeleteObjectsOfType(int type); void KillObjectsOfType(int type); /* located in ai/sym/smoke.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); Object *SmokePuff(int x, int y); /* located in ai/boss/ballos.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// void ondeath_ballos(Object *o); void ai_ballos_rotator(Object *o); void aftermove_ballos_rotator(Object *o); static void SetRotatorStates(int newstate); static void spawn_impact_puffs(Object *o); static void make_puff(int x, int y, int bd); void ai_ballos_platform(Object *o); /* located in sound/sound.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// void sound(int snd); /* located in common/stat.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// void stat(const char *fmt, ...); /* located in common/misc.cpp */ //----------------[referenced from ai/boss/ballos.cpp]---------------// int random(int min, int max); ================================================ FILE: ai/boss/ballos.h ================================================ #ifndef _BALLOS_H #define _BALLOS_H #define NUM_EYES 2 enum TRIGDIR { LESS_THAN=0, GREATER_THAN=1 }; class BallosBoss : public StageBoss { public: void OnMapEntry(); void Run(); void RunAftermove(); private: void RunForm1(Object *o); void RunForm2(Object *o); void RunForm3(Object *o); void RunComeDown(Object *o); void RunDefeated(Object *o); void run_eye(int index); void place_eye(int index); void SetEyeStates(int newstate); bool passed_xcoord(bool ltgt, int xcoord, bool reset=false); bool passed_ycoord(bool ltgt, int ycoord, bool reset=false); Object *main; Object *body; Object *eye[NUM_EYES]; Object *shield; // top shield to cover eyes from above }; #endif ================================================ FILE: ai/boss/core.cpp ================================================ #include "../stdai.h" #include "../almond/almond.h" #include "core.h" #include "core.fdh" /* ------------------------------------------------------------------------------------------ */ /* CODE FOR THE CORE BOSS (ALMOND) */ /* ------------------------------------------------------------------------------------------ */ // these are the meanings of the various pieces inside pieces[] array #define MC1 0 // minicores 1 through 5 #define MC2 1 #define MC3 2 #define MC4 3 #define MC5 4 #define CFRONT 5 // front half of the core body #define CBACK 6 // back half of the core body // states for the core #define CORE_SLEEP 10 #define CORE_CLOSED 200 #define CORE_OPEN 210 #define CORE_GUST 220 // and the states for the minicores #define MC_SLEEP 0 #define MC_THRUST 10 #define MC_CHARGE_FIRE 20 #define MC_FIRE 30 #define MC_FIRED 40 #define MC_RETREAT 50 // makes the core open his mouth and handles flashing red when hit #define OPEN_MOUTH \ { \ RunOpenMouth(); \ } // makes the core close his mouth #define CLOSE_MOUTH \ { \ pieces[CFRONT]->frame = 2; \ pieces[CBACK]->frame = 0; \ } INITFUNC(AIRoutines) { ONTICK(OBJ_MINICORE, ai_minicore); ONTICK(OBJ_MINICORE_SHOT, ai_minicore_shot); AFTERMOVE(OBJ_CORE_BACK, ai_core_back); AFTERMOVE(OBJ_CORE_FRONT, ai_core_front); ONTICK(OBJ_CORE_GHOSTIE, ai_core_ghostie); ONTICK(OBJ_CORE_BLAST, ai_core_blast); } /* void c------------------------------() {} */ // called at the entry to the Core room. // initilize all the pieces of the Core boss. void CoreBoss::OnMapEntry(void) { stat("CoreBoss::OnMapEntry"); o = CreateObject(0, 0, OBJ_CORE_CONTROLLER); game.stageboss.object = o; o->state = 10; o->flags = (FLAG_SHOW_FLOATTEXT | FLAG_IGNORE_SOLID | FLAG_SCRIPTONDEATH); o->id2 = 1000; o->x = (1207 << CSF); o->y = (212 << CSF); o->xinertia = o->yinertia = 0; o->hp = 650; o->sprite = SPR_CORESHOOTMARKER; // spawn all the pieces in the correct z-order pieces[3] = CreateMinicore(o); pieces[4] = CreateMinicore(o); pieces[CFRONT] = CreateObject(0, 0, OBJ_CORE_FRONT); pieces[CBACK] = CreateObject(0, 0, OBJ_CORE_BACK); pieces[0] = CreateMinicore(o); pieces[1] = CreateMinicore(o); pieces[2] = CreateMinicore(o); // set up the front piece pieces[CFRONT]->sprite = SPR_CORE_FRONT; pieces[CFRONT]->state = CORE_SLEEP; pieces[CFRONT]->linkedobject = o; pieces[CFRONT]->flags |= (FLAG_IGNORE_SOLID | FLAG_INVULNERABLE); pieces[CFRONT]->frame = 2; // mouth closed // set up our back piece pieces[CBACK]->sprite = SPR_CORE_BACK; pieces[CBACK]->state = CORE_SLEEP; pieces[CBACK]->linkedobject = o; pieces[CBACK]->flags |= (FLAG_IGNORE_SOLID | FLAG_INVULNERABLE); pieces[CBACK]->frame = 0; // set the positions of all the minicores pieces[0]->x = (o->x - 0x1000); pieces[0]->y = (o->y - 0x8000); pieces[1]->x = (o->x + 0x2000); pieces[1]->y = o->y; pieces[2]->x = (o->x - 0x1000); pieces[2]->y = (o->y + 0x8000); pieces[3]->x = (o->x - 0x6000); pieces[3]->y = (o->y + 0x4000); pieces[4]->x = (o->x - 0x6000); pieces[4]->y = (o->y - 0x4000); this->hittimer = 0; } void CoreBoss::OnMapExit() { // ensure we are called no longer game.stageboss.object = NULL; o = NULL; } /* void c------------------------------() {} */ void CoreBoss::Run() { bool do_thrust = false; int i; if (!o) return; //stat("state = %d", o->state); switch(o->state) { case CORE_SLEEP: break; // core is asleep // Core's mouth is closed. // Core targets player point but does not update it during the state. // This is also the state set via BOA to awaken the core. case CORE_CLOSED: { o->state = CORE_CLOSED+1; o->timer = 0; StopWaterStream(); o->xmark = player->x; o->ymark = player->y; } case CORE_CLOSED+1: { // open mouth after 400 ticks if (o->timer > 400) { if (++o->timer2 > 3) { // every 3rd time do gusting left and big core blasts o->timer2 = 0; o->state = CORE_GUST; } else { o->state = CORE_OPEN; } do_thrust = true; } } break; // Core's mouth is open. // Core moves towards player, and updates the position throughout // the state (is "aggressive" about seeking him). // Core fires ghosties, and curly targets it. case CORE_OPEN: { o->state = CORE_OPEN+1; o->timer = 0; // gonna open mouth, so save the current HP so we'll // know how much damage we've taken this time. o->savedhp = o->hp; } case CORE_OPEN+1: { o->xmark = player->x; o->ymark = player->y; // must call constantly for red-flashing when hit OPEN_MOUTH; // hint curly to target us if ((o->timer % 64) == 1) { o->CurlyTargetHere(); } // spawn ghosties if (o->timer < 200) { if ((o->timer % 20)==0) { CreateObject(o->x + (random(-48, -16) << CSF), \ o->y + (random(-64, 64) << CSF), \ OBJ_CORE_GHOSTIE); } } // close mouth when 400 ticks have passed or we've taken more than 200 damage if (o->timer > 400 || (o->savedhp - o->hp) >= 200) { o->state = CORE_CLOSED; CLOSE_MOUTH; do_thrust = true; } } break; case CORE_GUST: { o->state = CORE_GUST+1; o->timer = 0; StartWaterStream(); } case CORE_GUST+1: { // spawn water droplet effects and push player Object *droplet = CreateObject(player->x + ((random(-50, 150)<y + (random(-160, 160)<dir = LEFT; player->xinertia -= 0x20; OPEN_MOUTH; // spawn the big white blasts if (o->timer==300 || o->timer==350 || o->timer==400) { EmFireAngledShot(pieces[CFRONT], OBJ_CORE_BLAST, 0, 3<timer > 400) { o->state = CORE_CLOSED; CLOSE_MOUTH; do_thrust = true; } } break; case 500: // defeated!! { StopWaterStream(); map.wlforcestate = WL_CALM; o->state = 501; o->timer = 0; o->xinertia = o->yinertia = 0; game.curlytarget.timeleft = 0; CLOSE_MOUTH; game.quaketime = 20; SmokeXY(pieces[CBACK]->x, pieces[CBACK]->CenterY(), 20, 128, 64); // tell all the MC's to retreat for(i=0;i<5;i++) { pieces[i]->flags &= ~(FLAG_SHOOTABLE & FLAG_INVULNERABLE); pieces[i]->state = MC_RETREAT; } } case 501: { o->timer++; if ((o->timer & 0x0f) != 0) { SmokeXY(pieces[CBACK]->x, pieces[CBACK]->CenterY(), 1, 64, 32); } if (o->timer & 2) o->x -= (1 << CSF); else o->x += (1 << CSF); #define CORE_DEATH_TARGET_X 0x7a000 #define CORE_DEATH_TARGET_Y 0x16000 o->xinertia += (o->x > CORE_DEATH_TARGET_X) ? -0x80 : 0x80; o->yinertia += (o->y > CORE_DEATH_TARGET_Y) ? -0x80 : 0x80; } break; case 600: // teleported away by Misery { o->xinertia = 0; o->yinertia = 0; o->state++; //sound(SND_TELEPORT); pieces[CFRONT]->clip_enable = pieces[CBACK]->clip_enable = 1; o->timer = sprites[pieces[CFRONT]->sprite].h; } case 601: { pieces[CFRONT]->display_xoff = pieces[CBACK]->display_xoff = random(-8, 8); pieces[CFRONT]->clipy2 = o->timer; pieces[CBACK]->clipy2 = o->timer; if (--o->timer < 0) { pieces[CFRONT]->invisible = true; pieces[CBACK]->invisible = true; // restore status bars game.stageboss.object = NULL; game.bossbar.object = NULL; o->Delete(); o = NULL; return; } } break; } if (do_thrust) { // tell all the minicores to jump to a new position for(i=0;i<5;i++) { pieces[i]->state = MC_THRUST; } quake(20); sound(SND_CORE_THRUST); } // fire the minicores in any awake non-dead state if (o->state >= CORE_CLOSED && o->state < 500) { o->timer++; // fire off each minicore sequentially... switch(o->timer) { case 80+0: pieces[0]->state = MC_CHARGE_FIRE; break; case 80+30: pieces[1]->state = MC_CHARGE_FIRE; break; case 80+60: pieces[2]->state = MC_CHARGE_FIRE; break; case 80+90: pieces[3]->state = MC_CHARGE_FIRE; break; case 80+120: pieces[4]->state = MC_CHARGE_FIRE; break; } // move main core towards a spot in front of target o->xinertia += (o->x > (o->xmark + (160<yinertia += (o->y > o->ymark - (o->Height() / 2)) ? -4 : 4; } // set up our shootable status--you never actually hit the core (CFRONT), // but if it's mouth is open, make us, the invisible controller object, shootable. if (pieces[CFRONT]->frame==2) { o->flags &= ~FLAG_SHOOTABLE; pieces[CFRONT]->flags |= FLAG_INVULNERABLE; } else { o->flags |= FLAG_SHOOTABLE; pieces[CFRONT]->flags &= ~FLAG_INVULNERABLE; } LIMITX(0x80); LIMITY(0x80); } /* void c------------------------------() {} */ void CoreBoss::RunOpenMouth() { // flash red when struck, else stay in Mouth Open frame pieces[CFRONT]->frame = 0; pieces[CBACK]->frame = 0; if (o->shaketime) { this->hittimer++; if (this->hittimer & 2) { pieces[CFRONT]->frame = 1; pieces[CBACK]->frame = 1; } } else { this->hittimer = 0; } } void CoreBoss::StartWaterStream(void) { // bring the water up if it's not already up, but don't keep it up // if it's already been up on it's own because that's not fair if (map.wlstate == WL_DOWN) map.wlforcestate = WL_UP; game.quaketime = 100; StartStreamSound(400); } void CoreBoss::StopWaterStream(void) { // bring the water down again if it's not already if (map.wlstate == WL_UP) map.wlforcestate = WL_CYCLE; StopLoopSounds(); } /* void c------------------------------() {} */ // the front (mouth) piece of the main core void ai_core_front(Object *o) { Object *core = o->linkedobject; if (!core) { o->Delete(); return; } o->x = core->x - 0x4800; o->y = core->y - 0x5e00; } // the back (unanimated) piece of the main core void ai_core_back(Object *o) { Object *core = o->linkedobject; if (!core) { o->Delete(); return; } o->x = core->x + (0x5800 - (8 << CSF)); o->y = core->y - 0x5e00; } /* void c------------------------------() {} */ static Object *CreateMinicore(Object *core) { Object *o; o = CreateObject(0, 0, OBJ_MINICORE); o->linkedobject = core; o->flags = (FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_IGNORE_SOLID); o->hp = 1000; o->state = MC_SLEEP; return o; } void ai_minicore(Object *o) { Object *core = o->linkedobject; if (!core) { o->Delete(); return; } switch(o->state) { case MC_SLEEP: // idle & mouth closed o->frame = 2; o->xmark = o->x; o->ymark = o->y; break; case MC_THRUST: // thrust (move to random new pos) o->state = MC_THRUST+1; o->frame = 2; o->timer = 0; o->xmark = core->x + (random(-128, 32) << CSF); o->ymark = core->y + (random(-64, 64) << CSF); case MC_THRUST+1: if (++o->timer > 50) { o->frame = 0; } break; case MC_CHARGE_FIRE: // charging for fire o->state = MC_CHARGE_FIRE+1; o->timer = 0; case MC_CHARGE_FIRE+1: // flash blue o->timer++; o->frame = ((o->timer >> 1) & 1); if (o->timer > 20) { o->state = MC_FIRE; } break; case MC_FIRE: // firing o->state = MC_FIRE+1; o->frame = 2; // close mouth again o->timer = 0; o->xmark = o->x + (random(24, 48) << CSF); o->ymark = o->y + (random(-4, 4) << CSF); case MC_FIRE+1: if (++o->timer > 50) { o->state = MC_FIRED; o->frame = 0; } else if (o->timer==1 || o->timer==3) { // fire at player at speed (2<state = MC_RETREAT+1; o->frame = 2; o->xinertia = o->yinertia = 0; case MC_RETREAT+1: // retreat back into the abyss o->xinertia += 0x20; if (o->x > ((map.xsize*TILE_W)<Delete(); } break; } if (o->state < MC_RETREAT) { // jump back when shot if (o->shaketime) { o->xmark += 0x400; } o->x += (o->xmark - o->x) / 16; o->y += (o->ymark - o->y) / 16; } // don't let them kill us o->hp = 1000; // invincible when mouth is closed if (o->frame != 2) o->flags &= ~FLAG_INVULNERABLE; else o->flags |= FLAG_INVULNERABLE; } void ai_minicore_shot(Object *o) { if (++o->timer2 > 150) { effect(o->CenterX(), o->CenterY(), EFFECT_FISHY); o->Delete(); } ai_animate2(o); } // shutter made noise when opening // curly looks up at no 4 /* void c------------------------------() {} */ void ai_core_ghostie(Object *o) { char hit = 0; if (o->xinertia > 0 && o->blockr) hit = 1; if (o->xinertia < 0 && o->blockl) hit = 1; if (o->yinertia > 0 && o->blockd) hit = 1; if (o->yinertia < 0 && o->blocku) hit = 1; o->xinertia -= 0x20; LIMITX(0x400); if (hit) { effect(o->CenterX(), o->CenterY(), EFFECT_FISHY); o->Delete(); } ai_animate2(o); } void ai_core_blast(Object *o) { if (++o->timer > 200) o->Delete(); ANIMATE(2, 0, 1); } ================================================ FILE: ai/boss/core.fdh ================================================ //hash:90a7f1af //automatically generated by Makegen /* located in game.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/ai.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// void ai_animate2(Object *o); /* located in ai/sym/smoke.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in ai/boss/core.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// void ai_core_front(Object *o); void ai_core_back(Object *o); static Object *CreateMinicore(Object *core); void ai_minicore(Object *o); void ai_minicore_shot(Object *o); void ai_core_ghostie(Object *o); void ai_core_blast(Object *o); /* located in sound/sound.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// void sound(int snd); void StartStreamSound(int freq); void StopLoopSounds(void); /* located in common/stat.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// void stat(const char *fmt, ...); /* located in common/misc.cpp */ //-----------------[referenced from ai/boss/core.cpp]----------------// int random(int min, int max); ================================================ FILE: ai/boss/core.h ================================================ #ifndef _COREBOSS_H #define _COREBOSS_H class CoreBoss : public StageBoss { public: void OnMapEntry(); void OnMapExit(); void Run(); private: void RunOpenMouth(); void StartWaterStream(void); void StopWaterStream(void); Object *o; Object *pieces[8]; int hittimer; }; #endif ================================================ FILE: ai/boss/heavypress.cpp ================================================ #include "../stdai.h" #include "heavypress.h" #include "heavypress.fdh" // position in Hell (note this is the center position, because there is a draw point) #define HELL_X (160<type].hurt_sound = SND_ENEMY_HURT_COOL; objprop[o->type].shaketime = 8; o->flags = (FLAG_SHOW_FLOATTEXT | FLAG_SCRIPTONDEATH | \ FLAG_SOLID_BRICK | FLAG_IGNORE_SOLID); o->damage = 10; o->hp = 700; o->id2 = 1000; // defeated script // setup bboxes center_bbox = sprites[o->sprite].frame[0].dir[0].pf_bbox; fullwidth_bbox = sprites[o->sprite].frame[2].dir[0].pf_bbox; sprites[o->sprite].bbox = fullwidth_bbox; } /* void c------------------------------() {} */ void HeavyPress::Run() { if (!o) return; //AIDEBUG; run_defeated(); run_passageway(); switch(o->state) { // fight begin (script-triggered) case 100: { // get coordinates of the blocks to destroy as it's uncovered uncover_left = (o->Left() >> CSF) / TILE_W; uncover_right = (o->Right() >> CSF) / TILE_W; uncover_y = ((o->Bottom() >> CSF) / TILE_H) + 1; // create shielding objects for invincibility on either side // don't use puppet 1 because Deleet's use that when they explode. shield_left = CreateObject(o->x, o->y, OBJ_HEAVY_PRESS_SHIELD); shield_left->sprite = SPR_BBOX_PUPPET_2; sprites[shield_left->sprite].bbox = fullwidth_bbox; sprites[shield_left->sprite].bbox.x2 = center_bbox.x1 - 1; shield_right = CreateObject(o->x, o->y, OBJ_HEAVY_PRESS_SHIELD); shield_right->sprite = SPR_BBOX_PUPPET_3; sprites[shield_right->sprite].bbox = fullwidth_bbox; sprites[shield_right->sprite].bbox.x1 = center_bbox.x2 + 1; // then switch to small pfbox where we're only hittable in the center o->frame = 0; sprites[o->sprite].bbox = center_bbox; o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; o->state = 101; o->timer = -100; // pause a moment before Butes come } case 101: { // fire lightning CreateObject(o->x, o->y+0x7800, OBJ_HP_LIGHTNING); o->state = 102; } case 102: { // spawn butes on alternating sides switch(o->timer++) { case 0: case 160: CreateObject(MAPX(17), MAPY(15), OBJ_BUTE_FALLING)->dir = UP; break; case 80: case 240: CreateObject(MAPX(3), MAPY(15), OBJ_BUTE_FALLING)->dir = UP; break; case 298: // fire lightning next frame o->state = 101; o->timer = 0; break; } // uncover as it's damaged if (o->hp < (uncover_y * 70) && uncover_y > 1) { uncover_y--; sound(SND_BLOCK_DESTROY); for(int x=uncover_left;x<=uncover_right;x++) map_ChangeTileWithSmoke(x, uncover_y, 0, 4); } } break; } // flashing when hit. note, setting frame to 0 would mess up the // defeated sequence, except that shaketime is always expired by the time // the eye is opened, and this way we can still flash on the last shot. if (o->shaketime) o->frame = (o->shaketime & 2) ? 3 : 0; } void HeavyPress::run_defeated() { switch(o->state) { // defeated (set by ondeath script, after a brief pause) case 500: { o->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE); o->state = 501; o->timer = 0; o->frame = 0; if (shield_left) { shield_left->Delete(); shield_left = NULL; } if (shield_right) { shield_right->Delete(); shield_right = NULL; } sprites[o->sprite].bbox = fullwidth_bbox; // get rid of enemies--the butes can stay, though. KillObjectsOfType(OBJ_HP_LIGHTNING); KillObjectsOfType(OBJ_ROLLING); } case 501: { o->timer++; if ((o->timer % 16) == 0) { sound(SND_BLOCK_DESTROY); SmokePuff(o->x + random(-60<y + random(-40<timer) { case 95: o->frame = 1; break; // partially open case 98: o->frame = 2; break; // fully open case 101: { o->state = 502; // fall o->damage = 127; o->flags &= ~FLAG_SOLID_BRICK; } break; } } break; // falling (haven't hit floor yet) case 502: { // hit floor: bounce. The floor tiles are not // solid to NPC's so we can't use blockd. if (o->y > HELL_FLOOR) { o->state = 503; o->yinertia = -0x200; // kill floor int y = (o->Bottom() >> CSF) / TILE_H; for(int x=uncover_left-1;x<=uncover_right+1;x++) { map_ChangeTileWithSmoke(x, y, 0, 1, true); sound(SND_BLOCK_DESTROY); } if (o->y > HELL_BOTTOM) o->state = 0; } } case 503: // falling, and hit floor already { o->yinertia += 0x40; } break; } } // states for when it's in the Passageway void HeavyPress::run_passageway() { switch(o->state) { // "dead"/smoking on Passageway floor // note they may also be coming back from Statue Room. // script-triggered. case 20: { o->state = 21; o->x = PWAY_X; o->y = PWAY_BOTTOM; o->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_SOLID_BRICK); o->damage = 0; } case 21: { if ((++o->timer % 16) == 0) { int x = random(o->Left(), o->Right()); int y = random(o->Top(), o->Bottom()); SmokePuff(x, y); effect(x, y, EFFECT_BOOMFLASH); } } break; // falling through Passageway when you jump down hole in post-defeat scene. // script-triggered. case 30: { o->state = 31; o->frame = 2; // eye open COPY_PFBOX; // ensure that we are using the full-width bbox o->x = PWAY_X; o->y = PWAY_TOP; } case 31: { o->y += (4 << CSF); if (o->y >= PWAY_BOTTOM) { o->y = PWAY_BOTTOM; sound(SND_MISSILE_HIT); o->frame = 0; for(int i=0;i<5;i++) SmokePuff(random(o->Left(), o->Right()), o->Bottom()); o->state = 20; // continue smoking } } break; } } /* void c------------------------------() {} */ void ai_hp_lightning(Object *o) { switch(o->state) { case 0: { sound(SND_TELEPORT); o->sprite = SPR_HP_CHARGE; o->state = 1; } case 1: { ANIMATE(0, 0, 2); if (++o->timer > 50) { o->state = 10; o->animtimer = 0; o->frame = 3; o->damage = 10; o->sprite = SPR_HP_LIGHTNING; sound(SND_LIGHTNING_STRIKE); // smoke on floor where it struck SmokeXY(o->CenterX(), o->Bottom() - (7<frame > 6) o->Delete(); } break; } } ================================================ FILE: ai/boss/heavypress.fdh ================================================ //hash:e63ba074 //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------[referenced from ai/boss/heavypress.cpp]-------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //--------------[referenced from ai/boss/heavypress.cpp]-------------// void map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind); /* located in caret.cpp */ //--------------[referenced from ai/boss/heavypress.cpp]-------------// Caret *effect(int x, int y, int effectno); /* located in ai/ai.cpp */ //--------------[referenced from ai/boss/heavypress.cpp]-------------// void KillObjectsOfType(int type); /* located in ai/hell/ballos_priest.cpp */ //--------------[referenced from ai/boss/heavypress.cpp]-------------// static void run_defeated(Object *o); /* located in ai/sym/smoke.cpp */ //--------------[referenced from ai/boss/heavypress.cpp]-------------// Object *SmokePuff(int x, int y); void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in ai/boss/heavypress.cpp */ //--------------[referenced from ai/boss/heavypress.cpp]-------------// void ai_hp_lightning(Object *o); /* located in sound/sound.cpp */ //--------------[referenced from ai/boss/heavypress.cpp]-------------// void sound(int snd); /* located in common/misc.cpp */ //--------------[referenced from ai/boss/heavypress.cpp]-------------// int random(int min, int max); ================================================ FILE: ai/boss/heavypress.h ================================================ #ifndef _HEAVYPRESS_H #define _HEAVYPRESS_H class HeavyPress : public StageBoss { public: void OnMapEntry(); void Run(); private: void run_defeated(); void run_passageway(); Object *o; Object *shield_left, *shield_right; int uncover_left, uncover_right; int uncover_y; SIFRect fullwidth_bbox; SIFRect center_bbox; }; #endif ================================================ FILE: ai/boss/ironhead.cpp ================================================ #include "../stdai.h" #include "ironhead.h" #include "ironhead.fdh" #define ARENA_TOP 2 #define ARENA_BOTTOM 13 #define IRONH_SPAWN_FISHIES 100 #define IRONH_SWIM 250 #define IRONH_DEFEATED 1000 INITFUNC(AIRoutines) { ONDEATH(OBJ_IRONH, ondeath_ironhead); ONTICK(OBJ_IRONH_FISHY, ai_ironh_fishy); ONTICK(OBJ_IRONH_SHOT, ai_ironh_shot); ONTICK(OBJ_BRICK_SPAWNER, ai_brick_spawner); ONTICK(OBJ_IRONH_BRICK, ai_ironh_brick); ONTICK(OBJ_IKACHAN_SPAWNER, ai_ikachan_spawner); ONTICK(OBJ_IKACHAN, ai_ikachan); ONTICK(OBJ_MOTION_WALL, ai_motion_wall); objprop[OBJ_IRONH].hurt_sound = SND_ENEMY_HURT_COOL; } /* void c------------------------------() {} */ void IronheadBoss::OnMapEntry() { o = CreateObject(0, 0, OBJ_IRONH); o->damage = 10; o->hp = 400; o->state = IRONH_SPAWN_FISHIES; game.stageboss.object = o; this->hittimer = 0; } void IronheadBoss::OnMapExit() { o = NULL; game.stageboss.object = NULL; } /* void c------------------------------() {} */ void IronheadBoss::Run(void) { if (!o) return; switch(o->state) { case IRONH_SPAWN_FISHIES: { o->timer = 0; o->state++; } case IRONH_SPAWN_FISHIES+1: // wave of fishies comes in { if (++o->timer > 50) { o->timer = 0; o->state = IRONH_SWIM; } if ((o->timer & 3)==0) { CreateObject((random(15, 18) * TILE_W) << CSF, \ (random(ARENA_TOP, ARENA_BOTTOM) * TILE_H) << CSF, \ OBJ_IRONH_FISHY); } } break; case IRONH_SWIM: // swimming attack { o->state++; if (o->dir==RIGHT) { // coming up on player from left o->x = 0x1e000; o->y = player->y; } else { // returning from right side of screen o->x = 0x5a000; o->y = (random(ARENA_TOP, ARENA_BOTTOM) * TILE_H) << CSF; } o->xmark = o->x; o->ymark = o->y; o->yinertia = random(-0x200, 0x200); o->xinertia = random(-0x200, 0x200); o->flags |= FLAG_SHOOTABLE; } case IRONH_SWIM+1: { ANIMATE(2, 0, 7); if (o->dir==RIGHT) { o->xmark += 0x400; } else { o->xmark -= 0x200; o->ymark += (o->ymark < player->y) ? 0x200: -0x200; } //debugXline(o->xmark, 255,0,0); //debugYline(o->ymark, 0,255,0); o->xinertia += (o->x > o->xmark) ? -8 : 8; o->yinertia += (o->y > o->ymark) ? -8 : 8; LIMITY(0x200); if (o->dir==RIGHT) { if (o->x > 0x5a000) { o->dir = LEFT; o->state = IRONH_SPAWN_FISHIES; } } else { if (o->x < 0x22000) { o->dir = RIGHT; o->state = IRONH_SPAWN_FISHIES; } } if (o->dir==LEFT) { // fire bullets at player when retreating switch(++o->timer) { case 300: case 310: case 320: { Object *shot = SpawnObjectAtActionPoint(o, OBJ_IRONH_SHOT); shot->xinertia = (random(-3, 0) << CSF); shot->yinertia = (random(-3, 3) << CSF); sound(SND_EM_FIRE); } break; } } } break; case IRONH_DEFEATED: { sound(SND_EXPL_SMALL); o->state = IRONH_DEFEATED+1; o->flags &= ~FLAG_SHOOTABLE; o->frame = 8; o->damage = 0; o->xmark = o->x; o->ymark = o->y; o->xinertia = o->yinertia = 0; o->timer = 0; KillObjectsOfType(OBJ_IRONH_FISHY); KillObjectsOfType(OBJ_IRONH_BRICK); KillObjectsOfType(OBJ_BRICK_SPAWNER); game.quaketime = 20; for(int i=0;i<32;i++) ironh_smokecloud(o); } case IRONH_DEFEATED+1: // retreat back to left... { o->xmark -= (1<x = o->xmark + (random(-1, 1) << CSF); o->y = o->ymark + (random(-1, 1) << CSF); o->timer++; if ((o->timer & 3)==0) ironh_smokecloud(o); } break; } // show pink "hit" frame when he's taking damage o->sprite = SPR_IRONH; if (o->shaketime) { this->hittimer++; if (this->hittimer & 2) { o->sprite = SPR_IRONH_HURT; } } else { this->hittimer = 0; } } static void ironh_smokecloud(Object *o) { Object *smoke; smoke = CreateObject(o->CenterX() + (random(-128, 128)<CenterY() + (random(-64, 64)<xinertia = random(-128, 128); smoke->yinertia = random(-128, 128); } void ondeath_ironhead(Object *o) { StartScript(1000); } /* void c------------------------------() {} */ void ai_ironh_fishy(Object *o) { switch(o->state) { case 0: { o->state = 10; o->animtimer = 0; o->yinertia = random(-0x200, 0x200); o->xinertia = 0x800; } case 10: // harmless fishy { ANIMATE(2, 0, 1); if (o->xinertia < 0) { o->damage = 3; o->state = 20; } } break; case 20: // puffer fish { ANIMATE(2, 2, 3); if (o->x < (48<Delete(); } break; } if (o->blocku) o->yinertia = 0x200; if (o->blockd) o->yinertia = -0x200; o->xinertia -= 0x0c; } void ai_ironh_shot(Object *o) { if (!o->state) { if (++o->timer > 20) { o->state = 1; o->xinertia = o->yinertia = 0; o->timer2 = 0; } } else { o->xinertia += 0x20; } ANIMATE(0, 0, 2); if (++o->timer2 > 100 && !o->onscreen) { o->Delete(); } if ((o->timer2 & 3)==1) sound(SND_IRONH_SHOT_FLY); } void ai_brick_spawner(Object *o) { Object *brick; if (!o->state) { o->state = 1; o->timer = random(0, 200); } if (!o->timer) { // time to spawn a block o->state = 0; brick = CreateObject(o->x, o->y + (random(-20, 20) << CSF), OBJ_IRONH_BRICK); brick->dir = o->dir; } else o->timer--; } void ai_ironh_brick(Object *o) { if (!o->state) { int r = random(0, 9); if (r == 9) { o->sprite = SPR_IRONH_BIGBRICK; } else { o->sprite = SPR_IRONH_BRICK; o->frame = r; } o->xinertia = random(0x100, 0x200); o->xinertia *= (o->dir == LEFT) ? -2 : 2; o->yinertia = random(-0x200, 0x200); o->state = 1; } // bounce off the walls if (o->yinertia < 0 && o->y <= (16<CenterX(), o->y, EFFECT_BONKPLUS); o->yinertia = -o->yinertia; } if (o->yinertia > 0 && (o->Bottom() >= (239<CenterX(), o->Bottom(), EFFECT_BONKPLUS); o->yinertia = -o->yinertia; } if ((o->xinertia < 0 && (o->x < -0x2000)) ||\ (o->x > (map.xsize * TILE_W) << CSF)) { o->Delete(); } } /* void c------------------------------() {} */ void ai_ikachan_spawner(Object *o) { switch(o->state) { case 0: { // oops player got hurt--no ikachans for you! // the deletion of the object causes the flag matching it's id2 to be set, // which is how the scripts know not to give the alien medal. if (player->hurt_time != 0) o->Delete(); } break; case 10: // yay spawn ikachans! { o->timer++; if ((o->timer & 3) == 1) { CreateObject(o->x, o->y + ((random(0, 13) * TILE_H) << CSF), OBJ_IKACHAN); } } break; } } void ai_ikachan(Object *o) { switch(o->state) { case 0: { o->state = 1; o->timer = random(3, 20); } case 1: // he pushes ahead { if (--o->timer <= 0) { o->state = 2; o->timer = random(10, 50); o->frame = 1; o->xinertia = 0x600; } } break; case 2: // after a short time his tentacles look less whooshed-back { if (--o->timer <= 0) { o->state = 3; o->timer = random(40, 50); o->frame = 2; o->yinertia = random(-0x100, 0x100); } } break; case 3: // gliding { if (--o->timer <= 0) { o->state = 1; o->timer = 0; o->frame = 0; } o->xinertia -= 0x10; } break; } if (o->x > 720<Delete(); } void ai_motion_wall(Object *o) // the walls at the top and bottom of the arena { o->x -= (6 << CSF); if (o->x < (((19 * TILE_W) - 8) << CSF)) o->x += (SCREEN_WIDTH + 32) << CSF; } ================================================ FILE: ai/boss/ironhead.fdh ================================================ //hash:c8dc1e1c //automatically generated by Makegen /* located in ObjManager.cpp */ //---------------[referenced from ai/boss/ironhead.cpp]--------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //---------------[referenced from ai/boss/ironhead.cpp]--------------// Caret *effect(int x, int y, int effectno); /* located in tsc.cpp */ //---------------[referenced from ai/boss/ironhead.cpp]--------------// ScriptInstance *StartScript(int scriptno, int pageno); /* located in ai/ai.cpp */ //---------------[referenced from ai/boss/ironhead.cpp]--------------// Object *SpawnObjectAtActionPoint(Object *o, int otype); void KillObjectsOfType(int type); /* located in ai/boss/ironhead.cpp */ //---------------[referenced from ai/boss/ironhead.cpp]--------------// static void ironh_smokecloud(Object *o); void ondeath_ironhead(Object *o); void ai_ironh_fishy(Object *o); void ai_ironh_shot(Object *o); void ai_brick_spawner(Object *o); void ai_ironh_brick(Object *o); void ai_ikachan_spawner(Object *o); void ai_ikachan(Object *o); void ai_motion_wall(Object *o); /* located in sound/sound.cpp */ //---------------[referenced from ai/boss/ironhead.cpp]--------------// void sound(int snd); /* located in common/misc.cpp */ //---------------[referenced from ai/boss/ironhead.cpp]--------------// int random(int min, int max); ================================================ FILE: ai/boss/ironhead.h ================================================ #ifndef _IRONHEAD_H #define _IRONHEAD_H class IronheadBoss : public StageBoss { public: void OnMapEntry(); void OnMapExit(); void Run(); private: Object *o; int hittimer; }; #endif ================================================ FILE: ai/boss/omega.cpp ================================================ #include "../stdai.h" #include "omega.h" #include "omega.fdh" #define OMEGA_RISE_HEIGHT 48 #define OMEGA_SINK_DEPTH 60 #define OMEGA_WAIT_TIME 7 #define OMEGA_SPEED (1<hp = omg.lasthp = 400; game.stageboss.object->flags |= FLAG_SHOW_FLOATTEXT; game.stageboss.object->flags &= ~FLAG_SOLID_MUSHY; game.stageboss.object->sprite = SPR_OMG_CLOSED; objprop[OBJ_OMEGA_BODY].shaketime = 0; // we do our own shaketime pieces[LEFTLEG]->dir = LEFT; pieces[RIGHTLEG]->dir = RIGHT; pieces[LEFTSTRUT]->dir = LEFT; pieces[RIGHTSTRUT]->dir = RIGHT; omg.leg_descend = LEGD_MIN; pieces[LEFTLEG]->sprite = pieces[RIGHTLEG]->sprite = SPR_OMG_LEG_INAIR; game.stageboss.object->x = ((217 * TILE_W) + 5) << CSF; game.stageboss.object->y = ((14 * TILE_H) - 5) << CSF; omg.orgx = game.stageboss.object->x; omg.orgy = game.stageboss.object->y; omg.shaketimer = 0; } void OmegaBoss::OnMapExit(void) { if (game.stageboss.object) game.stageboss.object->Delete(); } /* void c------------------------------() {} */ void OmegaBoss::Run(void) { Object *&o = game.stageboss.object; if (omg.defeated) return; switch(o->state) { case 0: break; // waiting for trigger by script case OMG_WAIT: // waits for a moment then go to omg.nextstate { o->state++; omg.timer = 0; } case OMG_WAIT+1: { if (++omg.timer >= OMEGA_WAIT_TIME) { omg.timer = 0; o->state = omg.nextstate; } } break; case OMG_APPEAR: { omg.timer = 0; o->frame = 0; o->state = OMG_MOVE; omg.movedir = -OMEGA_SPEED; o->flags |= FLAG_SOLID_MUSHY; } case OMG_MOVE: // rising up/going back into ground { o->frame = 0; o->y += omg.movedir; game.quaketime = 2; omg.timer++; if ((omg.timer & 3) == 0) sound(SND_QUAKE); if (omg.timer >= omg.movetime) { if (omg.movedir < 0) { // was rising out of ground omg.nextstate = OMG_JAWS_OPEN; o->state = OMG_WAIT; } else { // was going back into ground omg.timer = 0; o->state = OMG_UNDERGROUND; o->flags &= ~(FLAG_SOLID_MUSHY | FLAG_SOLID_BRICK); } } } break; case OMG_JAWS_OPEN: // jaws opening { o->state++; omg.animtimer = 0; sound(SND_JAWS); o->sprite = SPR_OMG_OPENED; // select "open" bounding box } case OMG_JAWS_OPEN+1: { omg.animtimer++; if (omg.animtimer > 2) { omg.animtimer = 0; o->frame++; if (o->frame==3) { o->state = OMG_FIRE; omg.firecounter = 0; o->flags |= FLAG_SHOOTABLE; } } } break; case OMG_FIRE: // throwing out red stuff { omg.firecounter++; if (omg.firecounter > omg.startfiring && omg.firecounter < omg.stopfiring) { if ((omg.firecounter % omg.firefreq)==0) { Object *shot; sound(SND_EM_FIRE); shot = SpawnObjectAtActionPoint(o, OBJ_OMEGA_SHOT); shot->xinertia = random(-omg.shotxspd, omg.shotxspd); shot->yinertia = -0x333; if (omg.form==2 || random(0, 9) < 8) { shot->sprite = SPR_OMG_BULLET_NORMAL; shot->flags = FLAG_SHOOTABLE; } else { shot->sprite = SPR_OMG_BULLET_HARD; shot->flags = (FLAG_SHOOTABLE | FLAG_INVULNERABLE); } shot->timer = (random(0, 7) >= 4) ? random(300, 400):0; shot->damage = 4; } } else if (omg.firecounter >= omg.endfirestate || sound_is_playing(SND_MISSILE_HIT)) { // snap jaws shut omg.animtimer = 0; o->state = OMG_JAWS_CLOSE; sound(SND_JAWS); } } break; case OMG_JAWS_CLOSE: // jaws closing { omg.animtimer++; if (omg.animtimer > 2) { omg.animtimer = 0; o->frame--; if (o->frame == 0) { sound_stop(SND_JAWS); sound(SND_BLOCK_DESTROY); o->sprite = SPR_OMG_CLOSED; // select "closed" bounding box o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; if (omg.form == 1) { // form 1: return to sand o->state = OMG_WAIT; omg.nextstate = OMG_MOVE; omg.movedir = OMEGA_SPEED; omg.movetime = OMEGA_SINK_DEPTH; } else { // form 2: jump sound(SND_FUNNY_EXPLODE); if (o->x < player->x) o->xinertia = 0xC0; else o->xinertia = -0xC0; o->state = OMG_JUMP; o->yinertia = -0x5FF; omg.orgy = o->y; } } } // hurt player if he was standing in the middle when the jaws shut if (player->riding == o) { hurtplayer(OMEGA_DAMAGE); } } break; case OMG_UNDERGROUND: // underground waiting to reappear { if (++omg.timer >= 120) { omg.timer = 0; o->state = OMG_APPEAR; o->x = omg.orgx + (random(-64, 64) << CSF); o->y = omg.orgy; omg.movetime = OMEGA_RISE_HEIGHT; // switch to jumping out of ground when we get low on life if (omg.form==1 && o->hp <= HP_TRIGGER_POINT) { o->flags |= FLAG_SOLID_MUSHY; omg.form = 2; omg.firefreq = 5; omg.shotxspd = 0x155; omg.startfiring = 0; omg.stopfiring = 30; omg.endfirestate = 50; omg.movetime = OMEGA_RISE_HEIGHT+3; } } } break; case OMG_JUMP: // init for jump { omg.orgy = o->y; o->state++; omg.timer = 0; } case OMG_JUMP+1: // jumping { o->yinertia += 0x24; if (o->yinertia > 0x5ff) o->yinertia = 0x5ff; if (o->yinertia > 0) { // coming down pieces[LEFTLEG]->sprite = pieces[RIGHTLEG]->sprite = SPR_OMG_LEG_ONGROUND; // retract legs a little when we hit the ground if (pieces[LEFTLEG]->blockd || pieces[RIGHTLEG]->blockd) { o->xinertia = 0; omg.leg_descend -= o->yinertia; if (++omg.timer >= 3) { o->yinertia = 0; o->state = OMG_JAWS_OPEN; } } // --- squash player if we land on him ------------- // if top of player is higher than bottom of our bounding box // but bottom of player's bounding box is not... if (player->blockd) { int omg_bottom = o->y + (sprites[o->sprite].solidbox.y2 << CSF); if (player->y <= omg_bottom) { if (player->y + (sprites[player->sprite].solidbox.y2 << CSF) >= omg_bottom) { if (hitdetect(o, player)) // easy way to verify the X's are lined up { // SQUISH! hurtplayer(OMEGA_DAMAGE); } } } } } else { // jumping up; extend legs omg.leg_descend = (omg.orgy - o->y) + LEGD_MIN; if (omg.leg_descend > LEGD_MAX) omg.leg_descend = LEGD_MAX; pieces[LEFTLEG]->sprite = pieces[RIGHTLEG]->sprite = SPR_OMG_LEG_INAIR; } } break; /// victory case OMG_EXPLODING: { omg.timer = 0; o->state++; } case OMG_EXPLODING+1: { int x, y; o->xinertia = o->yinertia = 0; x = o->CenterX() + (random(-48, 48)<CenterY() + (random(-48, 24)< 100) { omg.timer = 0; starflash.Start(o->CenterX(), o->CenterY()); o->state = OMG_EXPLODED; } else if (omg.timer==24) { StartScript(210); } } break; case OMG_EXPLODED: { game.quaketime = 40; if (++omg.timer > 50) { o->Delete(); for(int i=0;iDelete(); omg.defeated = true; return; } } break; } // implement shaking when shot // we do it manually instead of used the usual shared code // because we want all the pieces to shake at once if (o->hp != omg.lasthp && !omg.shaketimer) { omg.shaketimer = 3; // why did I write this? anyway, I'm sure it's important if (o->x > player->x) o->display_xoff = -1; else o->display_xoff = 1; omg.lasthp = o->hp; } if (omg.shaketimer) { int xoff = -o->display_xoff; if (!--omg.shaketimer) xoff = 0; o->display_xoff = xoff; pieces[LEFTLEG]->display_xoff = xoff; pieces[RIGHTLEG]->display_xoff = xoff; pieces[LEFTSTRUT]->display_xoff = xoff; pieces[RIGHTSTRUT]->display_xoff = xoff; } if (o->state) { o->blockl |= pieces[LEFTLEG]->blockl; o->blockr |= pieces[RIGHTLEG]->blockr; pieces[LEFTLEG]->x = o->x - (4 << CSF); pieces[LEFTLEG]->y = o->y + omg.leg_descend; pieces[RIGHTLEG]->x = o->x + (38 << CSF); pieces[RIGHTLEG]->y = o->y + omg.leg_descend; pieces[LEFTSTRUT]->x = o->x + (9 << CSF); pieces[LEFTSTRUT]->y = o->y + (27 << CSF); pieces[RIGHTSTRUT]->x = o->x + (43 << CSF); pieces[RIGHTSTRUT]->y = o->y + (27 << CSF); } } void ondeath_omega_body(Object *o) { o->flags &= ~FLAG_SHOOTABLE; KillObjectsOfType(OBJ_OMEGA_SHOT); game.stageboss.SetState(OMG_EXPLODING); } /* void c------------------------------() {} */ void ai_omega_shot(Object *o) { o->nxflags |= NXFLAG_FOLLOW_SLOPE; o->yinertia += 5; if (o->blockd) o->yinertia = -0x100; if (o->blockl || o->blockr) o->xinertia = -o->xinertia; if (o->blocku) o->yinertia = -o->yinertia; if (++o->animtimer > 2) { o->frame ^= 1; o->animtimer = 0; } if (++o->timer > 750) { effect(o->CenterX(), o->CenterY(), EFFECT_FISHY); o->Delete(); } } ================================================ FILE: ai/boss/omega.fdh ================================================ //hash:9b689842 //automatically generated by Makegen /* located in ObjManager.cpp */ //-----------------[referenced from ai/boss/omega.cpp]---------------// Object *CreateObject(int x, int y, int type); bool hitdetect(Object *o1, Object *o2); /* located in caret.cpp */ //-----------------[referenced from ai/boss/omega.cpp]---------------// Caret *effect(int x, int y, int effectno); /* located in player.cpp */ //-----------------[referenced from ai/boss/omega.cpp]---------------// void hurtplayer(int damage); /* located in tsc.cpp */ //-----------------[referenced from ai/boss/omega.cpp]---------------// ScriptInstance *StartScript(int scriptno, int pageno); /* located in ai/ai.cpp */ //-----------------[referenced from ai/boss/omega.cpp]---------------// Object *SpawnObjectAtActionPoint(Object *o, int otype); void KillObjectsOfType(int type); /* located in ai/sym/smoke.cpp */ //-----------------[referenced from ai/boss/omega.cpp]---------------// Object *SmokePuff(int x, int y); /* located in ai/boss/omega.cpp */ //-----------------[referenced from ai/boss/omega.cpp]---------------// void ondeath_omega_body(Object *o); void ai_omega_shot(Object *o); /* located in sound/sound.cpp */ //-----------------[referenced from ai/boss/omega.cpp]---------------// void sound(int snd); bool sound_is_playing(int snd); void sound_stop(int snd); /* located in common/misc.cpp */ //-----------------[referenced from ai/boss/omega.cpp]---------------// int random(int min, int max); ================================================ FILE: ai/boss/omega.h ================================================ #ifndef _OMEGA_H #define _OMEGA_H class OmegaBoss : public StageBoss { public: void OnMapEntry(); void OnMapExit(); void Run(); private: Object *pieces[4]; struct { int timer; int animtimer; int movedir, movetime; int nextstate; int form; int firefreq, startfiring, stopfiring, endfirestate, shotxspd; int firecounter; int leg_descend; int orgx, orgy; int shaketimer; int lasthp; bool defeated; } omg; }; #endif ================================================ FILE: ai/boss/sisters.cpp ================================================ #include "../stdai.h" #include "sisters.h" #include "sisters.fdh" // mainstates #define STATE_CIRCLE_RIGHT 100 // circling right #define STATE_CIRCLE_LEFT 110 // circling left #define STATE_MEGAFIRING 120 // runs pause and circling during low-hp megafire #define STATE_DEFEATED 1000 // script-triggered; must be constant #define STATE_DEFEATED_CRASH 1010 #define STATE_STARFLASH 1020 // head states #define STATE_HEAD_CLOSED 10 // closed, but periodically opens by itself and fires #define STATE_HEAD_OPEN 20 // mouth open, can be shot #define STATE_HEAD_FIRE 30 // actually firing #define STATE_HEAD_MEGAFIRE 40 // firing a whole lot during low-hp #define STATE_HEAD_BIT_TONGUE 50 // bit tongue after got shot #define STATE_HEAD_DEFEATED 100 // defeated, eyes closed // body states #define STATE_BODY_NOMOVE 10 // do nothing but animate #define STATE_BODY_FACE_PLAYER 20 // follow angle set by main and face player #define STATE_BODY_FACE_CENTER 30 // follow angle set by main and face center #define STATE_BODY_LOCK_DIR 40 // follow angle set by main but don't change direction #define SISTERS_HP 500 // total HP #define SISTERS_ATTACK2_HP 300 // HP below which we can do the lots-of-fire attack #define SISTERS_DAMAGE 10 // how much damage you can take if you run into one // coordinates of per-frame bboxes for each frame of the head object. // these are all for the right-facing frame and are automatically flipped-over // at runtime if the dragon is facing left. // I would like to make this a feature of the .sif at a later date that could be // enabled on a per-sprite basis via a checkbox in sprprop. static struct { int x1, y1, x2, y2; uint32_t flags; } head_bboxes[] = { { 15, 1, 38, 26, FLAG_INVULNERABLE }, // closed { 15, 4, 36, 28, FLAG_INVULNERABLE }, // partway open { 14, 6, 31, 27, FLAG_SHOOTABLE }, // open (shootable) { 16, 6, 37, 26, FLAG_SHOOTABLE }, // bit tongue (shootable) { 17, 6, 38, 25, 0 } // eyes closed (shots pass through) }; /* void c------------------------------() {} */ void SistersBoss::OnMapEntry() { int i; /*stat("%d %d %d %d", sprites[SPR_SISTERS_HEAD].bbox.x1, sprites[SPR_SISTERS_HEAD].bbox.y1, sprites[SPR_SISTERS_HEAD].bbox.x2, sprites[SPR_SISTERS_HEAD].bbox.y2 ); exit(1);*/ main = CreateObject(((10*TILE_W))<invisible = true; for(i=0;isprite = SPR_SISTERS_BODY; body[i]->damage = SISTERS_DAMAGE; } for(i=0;ihp = 1000; head[i]->damage = SISTERS_DAMAGE; // we give each dragon a different but identical-looking head sprite // so that we can hack their bboxes individually. head[i]->sprite = SPR_SISTERS_HEAD_1 + i; } objprop[OBJ_SISTERS_HEAD].shaketime = 8; objprop[OBJ_SISTERS_HEAD].hurt_sound = SND_ENEMY_HURT_COOL; mainangle = 0; #ifdef _480X272 main->xmark = 180 * 2; main->ymark = 61 * 2; #else main->xmark = 180; main->ymark = 61; #endif main->timer2 = random(700, 1200); main->hp = 500; main->id2 = 1000; main->flags |= FLAG_SCRIPTONDEATH; game.stageboss.object = main; } void SistersBoss::OnMapExit() { main = NULL; game.stageboss.object = NULL; } /* void c------------------------------() {} */ void SistersBoss::Run(void) { int i; Object *o = main; if (!o) return; //debug("main->state: %d", o->state); //debug("main->timer: %d", o->timer); //DebugCrosshair(o->xmark, o->ymark, 255,255,255); switch(o->state) { case 20: // fight begin (script-triggered) { #ifdef _480X272 main->xmark = 180; main->ymark = 61; #endif if (++o->timer > 68) { o->xmark = 112; // bodies zoom onto screen via force of their interpolation o->timer = 0; o->state = STATE_CIRCLE_RIGHT; // main begins turning angle SetHeadStates(STATE_HEAD_CLOSED); // periodically opens/fires by itself SetBodyStates(STATE_BODY_FACE_PLAYER); // enable body movement } } break; case STATE_CIRCLE_RIGHT: { o->timer++; if (o->timer < 100) mainangle += 1; else if (o->timer < 120) mainangle += 2; else if (o->timer < o->timer2) mainangle += 4; else if (o->timer < o->timer2 + 40) mainangle += 2; else if (o->timer < o->timer2 + 60) mainangle += 1; else { o->timer = 0; o->state = STATE_CIRCLE_LEFT; o->timer2 = random(400, 700); } } break; case STATE_CIRCLE_LEFT: { o->timer++; if (o->timer < 20) mainangle -= 1; else if (o->timer < 60) mainangle -= 2; else if (o->timer < o->timer2) mainangle -= 4; else if (o->timer < o->timer2 + 40) mainangle -= 2; else if (o->timer < o->timer2 + 60) mainangle -= 1; else { if (o->hp < SISTERS_ATTACK2_HP) { o->state = STATE_MEGAFIRING; SetHeadStates(STATE_HEAD_MEGAFIRE); o->timer = 0; } else { o->state = STATE_CIRCLE_RIGHT; o->timer2 = random(400, 700); o->timer = 0; } } } break; // runs the circling while the heads are doing their low-hp "megafire" state. // first they stop completely, then spin around and around clockwise for a while. case STATE_MEGAFIRING: { if (++o->timer > 100) { o->state++; o->timer = 0; } } break; case STATE_MEGAFIRING+1: { o->timer++; if (o->timer < 100) mainangle += 1; else if (o->timer < 120) mainangle += 2; else if (o->timer < 500) mainangle += 4; else if (o->timer < 540) mainangle += 2; else if (o->timer < 560) mainangle += 1; else { o->state = STATE_CIRCLE_LEFT; SetHeadStates(STATE_HEAD_CLOSED); o->timer = 0; } } break; // defeated!! make big smoke and pause a second // this state is entered via a damage = 0; body[i]->damage = 0; } SetHeadStates(STATE_HEAD_DEFEATED); SetBodyStates(STATE_BODY_FACE_CENTER); o->state++; o->timer = 0; } case STATE_DEFEATED+1: { if (++o->timer > 100) { o->state = STATE_DEFEATED_CRASH; o->timer = 0; } SpawnScreenSmoke(1); } break; // the two dragons crash into each other case STATE_DEFEATED_CRASH: { mainangle += 4; if (o->xmark > 8) o->xmark--; if (o->ymark > 0) o->ymark--; if (++o->timer == 40) SetBodyStates(STATE_BODY_LOCK_DIR); if (o->ymark == 0) { if (hitdetect(head[0], head[1]) || \ hitdetect(head[0], body[1]) || \ hitdetect(head[1], body[0])) { starflash.Start(o->CenterX(), o->CenterY()); sound(SND_EXPLOSION1); o->state = STATE_STARFLASH; o->timer = 0; } else { o->xmark -= 2; SetBodyStates(STATE_BODY_LOCK_DIR); // lock direction facing } } } break; // big starflash after dragons hit each other case STATE_STARFLASH: { if (++o->timer > 30) { KillObjectsOfType(OBJ_DRAGON_ZOMBIE_SHOT); KillObjectsOfType(OBJ_SPIKE_SMALL); for(i=0;iDelete(); body[i]->Delete(); } main->Delete(); main = NULL; return; } } break; } while(mainangle >= 256*4) mainangle -= 256*4; while(mainangle <= -256*4) mainangle += 256*4; for(i=0;ixmark << CSF); int yoff = yinertia_from_angle(angle, main->ymark << CSF); // figure out where we are supposed to be int desired_x = (main->x + xoff) - (main->Width() / 2); int desired_y = (main->y + yoff) - (main->Height() / 2); // motion if (o->state == 0) { // this places them offscreen before the fight o->x = desired_x; o->y = desired_y; o->state = STATE_BODY_NOMOVE; } else if (o->state != STATE_BODY_NOMOVE) { // smooth interpolation, they stay in this state throughout the fight o->x += (desired_x - o->x) / 8; o->y += (desired_y - o->y) / 8; } // set direction facing if (o->state != STATE_BODY_LOCK_DIR) { if (o->state == STATE_BODY_FACE_CENTER) { if (o->CenterX() > main->CenterX()) o->dir = LEFT; else o->dir = RIGHT; } else { FACEPLAYER; } } ANIMATE(2, 0, 2); } void SistersBoss::run_head(int index) { Object *o = head[index]; // stay connected to body o->dir = body[index]->dir; o->x = body[index]->x + ((o->dir==RIGHT) ? (4 << CSF) : -(4 << CSF)); o->y = body[index]->y - (4 << CSF); // link hp to main object if (o->hp < 1000) { main->DealDamage(1000 - o->hp); o->hp = 1000; } // FSM switch(o->state) { case 0: { o->state = 1; o->flags |= (FLAG_SHOOTABLE | FLAG_INVULNERABLE); } break; case STATE_HEAD_CLOSED: { o->frame = 0; o->timer = random(100, 200); o->state++; } case STATE_HEAD_CLOSED+1: { if (--o->timer <= 0) { o->state = STATE_HEAD_OPEN; o->timer = 0; } } break; // open mouth and prepare to fire case STATE_HEAD_OPEN: { o->timer = 0; o->timer2 = 0; o->state++; } case STATE_HEAD_OPEN+1: { o->timer++; if (o->timer == 3) o->frame = 1; // mouth partially open--about to fire!! if (o->timer == 6) o->frame = 2; // mouth fully open if (o->timer > 150) { // begin firing if they haven't hit us by now o->state = STATE_HEAD_FIRE; o->timer = 0; } // need at least 2 hits to get her to close mouth if (o->shaketime) o->timer2++; if (o->timer2 > 10) { sound(SND_ENEMY_HURT); SmokeClouds(o, 4, 2, 2); o->state = STATE_HEAD_BIT_TONGUE; o->timer = 0; o->frame = 3; } } break; // firing (normal) case STATE_HEAD_FIRE: { if ((++o->timer % 8) == 1) { EmFireAngledShot(o, OBJ_DRAGON_ZOMBIE_SHOT, 6, 0x200); sound(SND_SNAKE_FIRE); } if (o->timer > 50) o->state = STATE_HEAD_CLOSED; } break; // firing a WHOLE LOT during low-hp status case STATE_HEAD_MEGAFIRE: { o->state++; o->timer = 0; o->frame = 0; } case STATE_HEAD_MEGAFIRE+1: { o->timer++; if (o->timer == 3) o->frame = 1; if (o->timer == 6) o->frame = 2; if (o->timer > 20) { if ((o->timer % 32) == 1) { EmFireAngledShot(o, OBJ_DRAGON_ZOMBIE_SHOT, 6, 0x200); sound(SND_SNAKE_FIRE); } } } break; // mouth closed bit tongue after got shot case STATE_HEAD_BIT_TONGUE: { if (++o->timer > 100) { o->state = STATE_HEAD_CLOSED; o->timer = 0; } } break; case STATE_HEAD_DEFEATED: o->frame = 4; // eyes closed break; } head_set_bbox(index); } // select an appropriate bbox for the current frame and hack it onto our sprite. // I did this because the heads move around quite a bit in the different frames. void SistersBoss::head_set_bbox(int index) { SIFSprite *sprite = &sprites[SPR_SISTERS_HEAD_1 + index]; Object *o = head[index]; int frame = o->frame; if (o->dir == LEFT) { // use mirror image if dragon facing left int wd = (head_bboxes[frame].x2 - head_bboxes[frame].x1); sprite->bbox.x1 = sprite->w - head_bboxes[frame].x1 - wd; sprite->bbox.x2 = sprite->bbox.x1 + (wd - 1); } else { sprite->bbox.x1 = head_bboxes[frame].x1; sprite->bbox.x2 = head_bboxes[frame].x2; } sprite->bbox.y1 = head_bboxes[frame].y1; sprite->bbox.y2 = head_bboxes[frame].y2; o->flags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE); o->flags |= head_bboxes[frame].flags; } /* void c------------------------------() {} */ void SistersBoss::SpawnScreenSmoke(int count) { for(int i=0;istate = newstate; } void SistersBoss::SetBodyStates(int newstate) { for(int i=0;istate = newstate; } ================================================ FILE: ai/boss/sisters.fdh ================================================ //hash:90d72648 //automatically generated by Makegen /* located in ObjManager.cpp */ //----------------[referenced from ai/boss/sisters.cpp]--------------// Object *CreateObject(int x, int y, int type); bool hitdetect(Object *o1, Object *o2); /* located in trig.cpp */ //----------------[referenced from ai/boss/sisters.cpp]--------------// int xinertia_from_angle(uint8_t angle, int speed); int yinertia_from_angle(uint8_t angle, int speed); void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/ai.cpp */ //----------------[referenced from ai/boss/sisters.cpp]--------------// void KillObjectsOfType(int type); /* located in ai/sym/smoke.cpp */ //----------------[referenced from ai/boss/sisters.cpp]--------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); Object *SmokePuff(int x, int y); /* located in sound/sound.cpp */ //----------------[referenced from ai/boss/sisters.cpp]--------------// void sound(int snd); /* located in common/misc.cpp */ //----------------[referenced from ai/boss/sisters.cpp]--------------// int random(int min, int max); ================================================ FILE: ai/boss/sisters.h ================================================ #ifndef _SISTERS_H #define _SISTERS_H // although you will need to add additional copies of the head sprites // for it to work properly, just try setting this number to something // like 10 and running the fight! #define NUM_SISTERS 2 class SistersBoss : public StageBoss { public: void OnMapEntry(); void OnMapExit(); void Run(); private: void run_head(int index); void head_set_bbox(int index); void run_body(int index); void SetHeadStates(int newstate); void SetBodyStates(int newstate); void SpawnScreenSmoke(int count); int mainangle; Object *main; Object *head[NUM_SISTERS]; Object *body[NUM_SISTERS]; }; #endif ================================================ FILE: ai/boss/undead_core.cpp ================================================ #include "../stdai.h" #include "undead_core.h" #include "undead_core.fdh" static struct { SIFPoint offset; // offset from main object SIFRect rect; // actual bbox rect } core_bboxes[] = { { { 0, -32 }, { -40, -16, 40, 16 } }, // upper { { 28, 0 }, { -36, -24, 36, 24 } }, // back/main body { { 4, 32 }, { -44, -8, 44, 8 } }, // lower { { -28, 4 }, { -20, -20, 20, 20 } } // shoot target }; enum CORE_STATES { CR_FightBegin = 20, // scripted CR_FaceClosed = 200, CR_FaceSkull = 210, CR_FaceTeeth = 220, CR_FaceDoom = 230, CR_Defeated = 500, // scripted CR_Exploding = 1000 }; enum FACE_STATES { FC_Closed = 0, FC_Skull = 1, FC_Teeth = 2, FC_Mouth = 3 }; enum ROTR_STATES { RT_Spin_Closed = 10, RT_Spin_Open = 20, RT_Spin_Slow_Closed = 30, RT_Spin_Fast_Closed = 40 }; /* void c------------------------------() {} */ INITFUNC(AIRoutines) { ONSPAWN(OBJ_UD_MINICORE_IDLE, onspawn_ud_minicore_idle); ONTICK(OBJ_UDMINI_PLATFORM, ai_udmini_platform); ONTICK(OBJ_UD_PELLET, ai_ud_pellet); ONTICK(OBJ_UD_SMOKE, ai_ud_smoke); ONTICK(OBJ_UD_SPINNER, ai_ud_spinner); ONTICK(OBJ_UD_SPINNER_TRAIL, ai_ud_spinner_trail); ONTICK(OBJ_UD_BLAST, ai_ud_blast); } /* void c------------------------------() {} */ /* Main core body: non-shootable when closed invulnerable when open starsolid's appear just behind the little dots when you shoot the face the starsolid hits at just past his nose. when face is open it does block the face from shooting below, but there is still a spot that you can hurt it from below. four always-dark minicores that spin around it, they also seem to be switching their z-order. */ void UDCoreBoss::OnMapEntry() { Object *o; // main object o = CreateObject(0, 0, OBJ_UDCORE_MAIN); main = o; game.stageboss.object = o; o->sprite = SPR_NULL;//SPR_MARKER; objprop[o->type].hurt_sound = SND_CORE_HURT; o->hp = 700; o->x = (592 << CSF); o->y = (120 << CSF); o->id2 = 1000; // defeated script o->flags = (FLAG_SHOW_FLOATTEXT | FLAG_IGNORE_SOLID | FLAG_SCRIPTONDEATH); // create rear rotators rotator[2] = create_rotator(0, 1); rotator[3] = create_rotator(0x80, 1); // create front & back front = CreateObject(0, 0, OBJ_UDCORE_FRONT); back = CreateObject(0, 0, OBJ_UDCORE_BACK); // create face face = CreateObject(0, 0, OBJ_UDCORE_FACE); face->state = FC_Closed; // create front rotators rotator[0] = create_rotator(0, 0); rotator[1] = create_rotator(0x80, 0); // initilize bboxes for(int i=0;isprite = SPR_BBOX_PUPPET_1 + i; bbox[i]->hp = 1000; sprites[bbox[i]->sprite].bbox = core_bboxes[i].rect; } //o->BringToFront(); } void UDCoreBoss::OnMapExit() { main = NULL; game.stageboss.object = NULL; } /* void c------------------------------() {} */ void UDCoreBoss::Run(void) { Object *o = main; if (!o) return; if (RunDefeated()) return; switch(o->state) { // fight begin (scripted) case CR_FightBegin: { o->state = CR_FaceSkull; o->dir = LEFT; SetRotatorStates(RT_Spin_Slow_Closed); SpawnFaceSmoke(); } break; // face closed case CR_FaceClosed: { o->state++; o->timer = 0; face->state = FC_Closed; front->frame = 2; // closed back->frame = 0; // not orange set_bbox_shootable(false); SetRotatorStates(RT_Spin_Closed); SpawnFaceSmoke(); } case CR_FaceClosed+1: { o->timer++; if (o->dir == RIGHT || o->frame > 0 || o->hp < 200) { if (o->timer > 200) { o->timer2++; sound(SND_CORE_THRUST); // select attack mode if (o->hp < 200) { o->state = CR_FaceDoom; } else if (o->timer2 > 2) { o->state = CR_FaceTeeth; } else { o->state = CR_FaceSkull; } } } } break; // face open/skull case CR_FaceSkull: { o->state++; o->timer = 0; face->state = FC_Skull; SpawnFaceSmoke(); o->savedhp = o->hp; set_bbox_shootable(true); } case CR_FaceSkull+1: { o->timer++; RunHurtFlash(o->timer); if (o->timer < 300) { if ((o->timer % 120) == 1) { SpawnPellet(UP); } if ((o->timer % 120) == 61) { SpawnPellet(DOWN); } } if (o->timer > 400 || (o->savedhp - o->hp) > 50) { o->state = CR_FaceClosed; } } break; // face open/teeth case CR_FaceTeeth: { o->state++; o->timer = 0; face->state = FC_Teeth; SpawnFaceSmoke(); SetRotatorStates(RT_Spin_Open); game.quaketime = 100; o->savedhp = o->hp; set_bbox_shootable(true); } case CR_FaceTeeth+1: { o->timer++; RunHurtFlash(o->timer); // fire rotators if ((o->timer % 40) == 1) { int i = random(0, 3); int x = rotator[i]->x - (16<y; sound(SND_FUNNY_EXPLODE); CreateSpinner(x, y); } if (o->timer > 400 || (o->savedhp - o->hp) > 150 || o->hp < 200) { o->state = CR_FaceClosed; } } break; // face open/mouth: blasts of doom case CR_FaceDoom: { o->state++; o->timer = 0; face->state = FC_Mouth; SpawnFaceSmoke(); SetRotatorStates(RT_Spin_Fast_Closed); sound(SND_FUNNY_EXPLODE); // spawn a whole bunch of crazy spinners from the face CreateSpinner(face->x - (16<y); CreateSpinner(face->x, face->y - (16<x, face->y + (16<savedhp = o->hp; set_bbox_shootable(true); } case CR_FaceDoom+1: { o->timer++; RunHurtFlash(o->timer); if ((o->timer % 120) == 1) SpawnPellet(UP); if ((o->timer % 120) == 61) SpawnPellet(DOWN); } break; } // move back and forth if (o->state >= CR_FightBegin && o->state < CR_Defeated) { if (o->x < MAPX(12)) o->dir = RIGHT; if (o->x > MAPX(map.xsize - 4)) o->dir = LEFT; XACCEL(4); } // spawn minicore platforms switch(o->state) { case CR_FaceClosed+1: case CR_FaceTeeth+1: case CR_FaceSkull+1: case CR_FaceDoom+1: { // while I don't think there's any way to get her there without // a map editor, if you put Curly in the Black Space core room, // she WILL fight the core, just as she did the first time. if (o->state != 221 && (o->timer % 100) == 1) bbox[BB_TARGET]->CurlyTargetHere(); o->timer3++; // upper platforms if (o->timer3 == 75) { CreateObject(MAPX(map.xsize) + 40, \ MAPY(3 + random(-3, 0)), OBJ_UDMINI_PLATFORM); } // lower platforms if (o->timer3 == 150) { o->timer3 = 0; CreateObject(MAPX(map.xsize) + 40, \ MAPY(10 + random(-1, 3)), OBJ_UDMINI_PLATFORM); break; } } break; } LIMITX(0x80); LIMITY(0x80); } void UDCoreBoss::RunAftermove() { int i; Object *o = main; if (!o) return; run_face(face); run_front(front); run_back(back); for(i=0;i<4;i++) run_rotator(rotator[i]); move_bboxes(); } // spawn smoke puffs from face that come when face opens/closes void UDCoreBoss::SpawnFaceSmoke() { quake(20); for(int i=0;i<8;i++) { int x = face->x + random(-16<CenterY(); Object *s = SmokePuff(x, y); s->xinertia = random(-0x200, 0x200); s->yinertia = random(-0x100, 0x100); } } // spit a "pellet" shot out of the face. That's what I'm calling the flaming lava-rock // type things that are thrown out and trail along the ceiling or floor. void UDCoreBoss::SpawnPellet(int dir) { int y = main->y; if (dir == UP) y -= (16 << CSF); else y += (16 << CSF); CreateObject(main->x - (32<dir = dir; } void UDCoreBoss::RunHurtFlash(int timer) { if (main->shaketime && (timer & 2)) { front->frame = 1; back->frame = 1; } else { front->frame = 0; back->frame = 0; } } /* void c------------------------------() {} */ bool UDCoreBoss::RunDefeated() { Object *o = main; switch(o->state) { // defeated (descending) case CR_Defeated: { o->state++; o->timer = 0; o->xinertia = 0; o->yinertia = 0; face->state = FC_Closed; front->frame = 0; // front closed back->frame = 0; // not flashing SetRotatorStates(RT_Spin_Slow_Closed); game.quaketime = 20; SmokeXY(o->x, o->y, 100, 128, 64); KillObjectsOfType(OBJ_UDMINI_PLATFORM); set_bbox_shootable(false); } case CR_Defeated+1: { SmokeXY(o->x, o->y, 1, 64, 32); o->xinertia = 0x40; o->yinertia = 0x80; if (++o->timer > 200) { o->state = CR_Exploding; o->xinertia = 0; o->yinertia = 0; o->timer = 0; } } break; // defeated (exploding) case CR_Exploding: { quake(100, 0); o->timer++; if ((o->timer % 8) == 0) sound(SND_MISSILE_HIT); int x = o->x + random(-72<y + random(-64<timer > 100) { sound(SND_EXPLOSION1); starflash.Start(o->x, o->y); o->state++; o->timer = 0; } } break; case CR_Exploding+1: { game.quaketime = 40; if (++o->timer > 50) { KillObjectsOfType(OBJ_MISERY_MISSILE); front->Delete(); back->Delete(); face->Delete(); for(int i=0;iDelete(); for(int i=0;iDelete(); main->Delete(); main = NULL; return 1; } } break; } return 0; } /* void c------------------------------() {} */ void UDCoreBoss::run_face(Object *o) { o->sprite = SPR_UD_FACES; o->invisible = false; switch(o->state) { // to "show" the closed face, we go invisible and the // face area of the main core shows through. case FC_Closed: o->invisible = true; break; case FC_Skull: o->frame = 0; break; case FC_Teeth: o->frame = 1; break; // mouth blasts of doom. Once started, it's perpetual blasting // until told otherwise. case FC_Mouth: { o->state++; o->timer = 100; } case FC_Mouth+1: { if (++o->timer > 300) o->timer = 0; if (o->timer > 250) { if ((o->timer % 16) == 1) sound(SND_QUAKE); if ((o->timer % 16) == 7) { CreateObject(o->x, o->y, OBJ_UD_BLAST); sound(SND_LIGHTNING_STRIKE); } } if (o->timer == 200) sound(SND_CORE_CHARGE); if (o->timer >= 200 && (o->timer & 1)) o->frame = 3; // mouth lit else o->frame = 2; // mouth norm } break; } o->x = main->x - (36 << CSF); o->y = main->y - (4 << CSF); } void UDCoreBoss::run_front(Object *o) { // 0 open (should make a face visible at the same time to go into the gap) // 1 open/hurt // 2 closed switch(o->state) { case 0: { o->sprite = SPR_UD_FRONT; o->state = 1; o->frame = 2; } case 1: { o->x = main->x - (36<y = main->y; } break; } } void UDCoreBoss::run_back(Object *o) { // 0 normal // 1 hurt switch(o->state) { case 0: { o->sprite = SPR_UD_BACK; o->state = 1; o->frame = 0; } case 1: { o->x = main->x + (44<y = main->y; } break; } } /* void c------------------------------() {} */ // "front" refers to whether they are doing the front (left) or rear (right) // half of the arc; the ones marked "front" are actually BEHIND the core. Object *UDCoreBoss::create_rotator(int angle, int front) { Object *o = CreateObject(0, 0, OBJ_UDMINI_ROTATOR); o->angle = angle; o->substate = front; return o; } // the rotators are 4 minicores that spin around the main core during the battle // and have pseudo-3D effects. They also shoot the spinners during the teeth-face phase. // // instead of having the cores constantly rearranging their Z-Order as they pass // in front and behind the core, an optical illusion is used. 2 cores are always // in front and 2 are always behind. Each set of two cores covers only half the full // circle. When a core in the front set reaches the top, it warps back to the bottom // just as a core in the back set reaches the bottom and warps back to the top. // Thus, they swap places and the core appears to continue around the circle using // the different z-order of the one that was just swapped-in. void UDCoreBoss::run_rotator(Object *o) { //debug("rotr s%d", o->state); switch(o->state) { case 0: { o->sprite = SPR_UD_ROTATOR; o->flags &= ~FLAG_SHOOTABLE; o->hp = 1000; } break; case RT_Spin_Closed: { o->frame = 0; o->angle += 2; } break; // used when firing spinners in Teeth face // (it's easier to coordinate if spinners are actually spawned by core // and just positioned next to us) case RT_Spin_Open: { o->frame = 1; o->angle += 2; } break; case RT_Spin_Slow_Closed: { o->frame = 0; o->angle++; } break; case RT_Spin_Fast_Closed: { o->frame = 0; o->angle += 4; } break; } // each "side" covers half the rotation angle int angle = (o->angle / 2); if (o->substate) { // front (left) half of arc angle += 0x40; } else { // back (right) half of arc angle += 0xC0; } o->x = (main->x - (8<y = main->y + yinertia_from_angle(angle, (80<state = newstate; } /* void c------------------------------() {} */ // extra bbox puppets/shoot targets // only one, located at the face, is shootable, the other 3 are invulnerable shields. void UDCoreBoss::move_bboxes() { for(int i=0;ix = main->x + (core_bboxes[i].offset.x << CSF); bbox[i]->y = main->y + (core_bboxes[i].offset.y << CSF); } transfer_damage(bbox[BB_TARGET], main); } // sets up bboxes for the Core entering shootable or non-shootable mode. void UDCoreBoss::set_bbox_shootable(bool enable) { uint32_t body_flags, target_flags; int i; // in shootable mode target can be hit and shields are up. // in non-shootable mode (when face is closed) nothing can be hit. if (enable) { body_flags = FLAG_INVULNERABLE; target_flags = FLAG_SHOOTABLE; } else { body_flags = 0; target_flags = 0; } for(i=0;iflags &= ~(FLAG_SHOOTABLE | FLAG_INVULNERABLE); if (i == BB_TARGET) bbox[i]->flags |= target_flags; else bbox[i]->flags |= body_flags; } } /* void c------------------------------() {} */ // minicores by entrance seen before fight void onspawn_ud_minicore_idle(Object *o) { if (o->dir == RIGHT) o->flags &= ~FLAG_SOLID_BRICK; } // these are the ones you can ride void ai_udmini_platform(Object *o) { switch(o->state) { case 0: { o->state = 1; o->ymark = o->y; o->xinertia = -0x200; o->yinertia = 0x100; if (random(0, 1)) o->yinertia = -o->yinertia; } case 1: { if (o->x < -(64 << CSF)) o->Delete(); if (o->y > o->ymark) o->yinertia -= 0x10; if (o->y < o->ymark) o->yinertia += 0x10; LIMITY(0x100); // when player jumps on them, they open up and start // moving their Y to align with the core. if (player->riding == o) { o->ymark = MAPY(9); o->frame = 2; } else if (o->flags & FLAG_SOLID_BRICK) // don't reset frame if dimmed { o->frame = 0; } // don't try to squish the player into anything, rather, dim and go non-solid. // our bbox is set slightly larger than our solidbox so that we can detect if // the player is near. if (hitdetect(o, player)) { if ((player->blockl && player->Right() < o->CenterX()) || \ (o->yinertia > 0 && player->blockd && player->Top() >= o->CenterY() - (1<yinertia < 0 && player->blocku && player->Bottom() < o->CenterY())) { o->flags &= ~FLAG_SOLID_BRICK; o->frame = 1; } } } break; } } /* void c------------------------------() {} */ // falling lava-rock thing from Skull face void ai_ud_pellet(Object *o) { switch(o->state) { case 0: { o->sprite = SPR_UD_PELLET; o->xinertia = -0x200; o->state = 1; } case 1: // falling { if (o->dir == UP) { o->yinertia -= 0x20; LIMITY(0x5ff); if (o->blocku) o->state = 2; } else if (o->dir == DOWN) { o->yinertia += 0x20; LIMITY(0x5ff); if (o->blockd) o->state = 2; } ANIMATE(3, 0, 1); } break; case 2: // hit ground/ceiling { sound(SND_MISSILE_HIT); o->xinertia = (o->x > player->x) ? -0x400 : 0x400; o->yinertia = 0; o->state = 3; o->timer = 0; o->flags |= FLAG_IGNORE_SOLID; o->sprite = SPR_UD_BANG; o->x -= (4 << CSF); o->y -= (4 << CSF); } case 3: { ANIMATE(0, 0, 2); if ((++o->timer % 3) == 1) { Object *smoke = CreateObject(o->CenterX(), o->CenterY(), OBJ_UD_SMOKE); if (o->dir == UP) smoke->yinertia = 0x400; else smoke->yinertia = -0x400; smoke->x += o->xinertia; } if (o->CenterX() < (16<CenterX() > (MAPX(map.xsize) - (16<Delete(); } } break; } } void ai_ud_smoke(Object *o) { switch(o->state) { case 0: { o->xinertia = random(-4, 4) << CSF; o->state = 1; } case 1: { o->xinertia *= 20; o->xinertia /= 21; o->yinertia *= 20; o->yinertia /= 21; ANIMATE_FWD(1); if (o->frame > sprites[o->sprite].nframes) o->Delete(); } break; } } /* void c------------------------------() {} */ static void CreateSpinner(int x, int y) { CreateObject(x, y, OBJ_UD_SPINNER); CreateObject(x, y, OBJ_UD_SPINNER)->angle = 0x80; } // spinny thing shot by rotators during Teeth phase. // they come in pairs. void ai_ud_spinner(Object *o) { if (o->x < 0 || o->x > MAPX(map.xsize)) { effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); o->Delete(); return; } switch(o->state) { case 0: { o->xmark = o->x; o->ymark = o->y; o->state = 1; } case 1: { o->angle += 24; o->speed -= 0x15; o->xmark += o->speed; o->x = o->xmark + xinertia_from_angle(o->angle, (4<y = o->ymark + yinertia_from_angle(o->angle, (6<x, o->y, OBJ_UD_SPINNER_TRAIL); o->BringToFront(); } break; } } void ai_ud_spinner_trail(Object *o) { o->frame++; if (o->frame > 2) o->Delete(); } /* void c------------------------------() {} */ void ai_ud_blast(Object *o) { o->xinertia = -0x1000; o->frame ^= 1; SmokePuff(o->CenterX() + (random(0, 16) << CSF), \ o->CenterY() + (random(-16, 16) << CSF)); if (o->x < -0x4000) o->Delete(); } ================================================ FILE: ai/boss/undead_core.fdh ================================================ //hash:446a3fc0 //automatically generated by Makegen /* located in game.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// Object *CreateObject(int x, int y, int type); bool hitdetect(Object *o1, Object *o2); /* located in caret.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// int xinertia_from_angle(uint8_t angle, int speed); int yinertia_from_angle(uint8_t angle, int speed); /* located in ai/ai.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// void KillObjectsOfType(int type); void transfer_damage(Object *o, Object *target); /* located in ai/sym/smoke.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// Object *SmokePuff(int x, int y); void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in ai/boss/undead_core.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// void onspawn_ud_minicore_idle(Object *o); void ai_udmini_platform(Object *o); void ai_ud_pellet(Object *o); void ai_ud_smoke(Object *o); static void CreateSpinner(int x, int y); void ai_ud_spinner(Object *o); void ai_ud_spinner_trail(Object *o); void ai_ud_blast(Object *o); /* located in ai/boss/ballos.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// static void SetRotatorStates(int newstate); /* located in sound/sound.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// void sound(int snd); /* located in common/misc.cpp */ //--------------[referenced from ai/boss/undead_core.cpp]------------// int random(int min, int max); ================================================ FILE: ai/boss/undead_core.h ================================================ #ifndef _UNDEADCORE_BOSS_H #define _UNDEADCORE_BOSS_H #define NUM_ROTATORS 4 enum BBoxes { BB_UPPER, BB_BACK, BB_LOWER, BB_TARGET, NUM_BBOXES }; enum UD_Faces { FACE_SKULL, FACE_TEETH, FACE_MOUTH, FACE_MOUTH_LIT, FACE_NONE }; class UDCoreBoss : public StageBoss { public: void OnMapEntry(); void OnMapExit(); void Run(); void RunAftermove(); private: bool RunDefeated(); void SpawnFaceSmoke(); void SpawnPellet(int dir); void RunHurtFlash(int timer); void run_front(Object *o); void run_face(Object *o); void run_back(Object *o); void move_bboxes(); void set_bbox_shootable(bool enable); Object *create_rotator(int angle, int front); void run_rotator(Object *o); void SetRotatorStates(int newstate); Object *main; Object *front, *back; Object *face; Object *rotator[NUM_ROTATORS]; Object *bbox[NUM_BBOXES]; }; #endif ================================================ FILE: ai/boss/x.cpp ================================================ #include "../stdai.h" #include "x.h" #include "x.fdh" #define STATE_X_APPEAR 1 // script-triggered: must stay constant #define STATE_X_FIGHT_BEGIN 10 // script-triggered: must stay constant #define STATE_X_TRAVEL 20 #define STATE_X_BRAKE 30 #define STATE_X_OPEN_DOORS 40 #define STATE_X_FIRE_TARGETS 50 #define STATE_X_FIRE_FISHIES 60 #define STATE_X_CLOSE_DOORS 70 #define STATE_X_EXPLODING 80 #define STATE_DOOR_OPENING 10 // makes the doors open #define STATE_DOOR_OPENING_PARTIAL 20 // makes the doors open part-way #define STATE_DOOR_CLOSING 30 // closes the doors #define STATE_DOOR_FINISHED 40 // doors are finished moving #define STATE_TREAD_STOPPED 20 #define STATE_TREAD_RUN 30 #define STATE_TREAD_BRAKE 40 #define STATE_FISHSPAWNER_FIRE 10 #define STATE_TARGET_FIRE 10 #define DOORS_OPEN_DIST (32 << CSF) // how far the doors open #define DOORS_OPEN_FISHY_DIST (20 << CSF) // how far the doors open during fish-missile phase // the treads start moving at slightly different times // which we change direction, etc. static const int tread_turnon_times[] = { 4, 8, 10, 12 }; INITFUNC(AIRoutines) { ONTICK(OBJ_X_FISHY_MISSILE, ai_x_fishy_missile); ONTICK(OBJ_X_DEFEATED, ai_x_defeated); ONDEATH(OBJ_X_TARGET, ondeath_x_target); ONDEATH(OBJ_X_MAINOBJECT, ondeath_x_mainobject); } void XBoss::OnMapEntry(void) { stat("XBoss::OnMapEntry()"); memset(&X, 0, sizeof(X)); memset(&body, 0, sizeof(body)); memset(&treads, 0, sizeof(treads)); memset(&internals, 0, sizeof(internals)); memset(&doors, 0, sizeof(doors)); memset(&targets, 0, sizeof(targets)); memset(&fishspawners, 0, sizeof(fishspawners)); npieces = 0; mainobject = CreateObject(0, 0, OBJ_X_MAINOBJECT); mainobject->sprite = SPR_NULL; game.stageboss.object = mainobject; } void XBoss::OnMapExit() { // we'll let the map loader code handle deleting all our pieces. // here's just a good-form failsafe to ensure XBoss::Run() runs no more. mainobject = NULL; game.stageboss.object = NULL; } /* void c------------------------------() {} */ void XBoss::Run() { Object *o = mainobject; int i; if (!mainobject) return; if (o->state == 0 || (!X.initilized && o->state != STATE_X_APPEAR)) { o->hp = 1; o->x = -(SCREEN_WIDTH << CSF); return; } switch(o->state) { // script triggered us to initilize/appear // (there is a hvtrigger, right before player first walks by us // and sees us inactive, which sends us this ANP). case STATE_X_APPEAR: { if (!X.initilized) { Init(); X.initilized = true; } } break; // script has triggered the fight to begin case STATE_X_FIGHT_BEGIN: { o->timer = 0; o->state++; } case STATE_X_FIGHT_BEGIN+1: { if (++o->timer > 100) { FACEPLAYER; o->timer = 0; o->state = STATE_X_TRAVEL; } } break; // starts the treads and moves us in the currently-facing direction case STATE_X_TRAVEL: { // count number of times we've traveled, we brake // and attack every third time. o->timer2++; o->timer = 0; o->state++; } case STATE_X_TRAVEL+1: { o->timer++; // trigger the treads to start moving, // and put them slightly out of sync with each-other. for(int i=0;i<4;i++) { if (o->timer == tread_turnon_times[i]) { treads[i]->state = STATE_TREAD_RUN; treads[i]->dir = o->dir; } } if (o->timer > 120) { // time to attack? we attack every 3rd travel // if so skid to a stop, that's the first step. if (o->timer2 >= 3) { o->timer2 = 0; o->dir ^= 1; o->state = STATE_X_BRAKE; o->timer = 0; } else { // passed player? skid and turn around. if ((o->dir == RIGHT && o->x > player->x) || \ (o->dir == LEFT && o->x < player->x)) { o->dir ^= 1; o->state = STATE_X_TRAVEL; } } } } break; // skidding to a stop in preparation to attack case STATE_X_BRAKE: { o->timer = 0; o->state++; } case STATE_X_BRAKE+1: { o->timer++; // trigger the treads to start braking, // and put them slightly out of sync with each-other. for(int i=0;i<4;i++) { if (o->timer == tread_turnon_times[i]) { treads[i]->state = STATE_TREAD_BRAKE; treads[i]->dir = o->dir; } } if (o->timer > 50) { o->state = STATE_X_OPEN_DOORS; o->timer = 0; } } break; // doors opening to attack case STATE_X_OPEN_DOORS: { o->timer = 0; o->savedhp = o->hp; // select type of attack depending on where we are in the battle if (!AllTargetsDestroyed()) { SetStates(doors, 2, STATE_DOOR_OPENING); o->state = STATE_X_FIRE_TARGETS; } else { SetStates(doors, 2, STATE_DOOR_OPENING_PARTIAL); o->state = STATE_X_FIRE_FISHIES; } } break; // firing targets (early battle) case STATE_X_FIRE_TARGETS: { if (doors[0]->state == STATE_DOOR_FINISHED) { doors[0]->state = 0; SetStates(targets, 4, STATE_TARGET_FIRE); } if (++o->timer > 300 || AllTargetsDestroyed()) { o->state = STATE_X_CLOSE_DOORS; o->timer = 0; } } break; // firing fishy missiles (late battle) case STATE_X_FIRE_FISHIES: { if (doors[0]->state == STATE_DOOR_FINISHED) { doors[0]->state = 0; SetStates(fishspawners, 4, STATE_FISHSPAWNER_FIRE); internals->flags |= FLAG_SHOOTABLE; } if (++o->timer > 300 || (o->savedhp - o->hp) > 200) { o->state = STATE_X_CLOSE_DOORS; o->timer = 0; } } break; // doors closing after attack case STATE_X_CLOSE_DOORS: { o->timer = 0; o->state++; SetStates(doors, 2, STATE_DOOR_CLOSING); } case STATE_X_CLOSE_DOORS+1: { if (doors[0]->state == STATE_DOOR_FINISHED) { doors[0]->state = 0; // just turn off everything for both types of attacks; // turning off the attack type that wasn't enabled isn't harmful. SetStates(targets, 4, 0); SetStates(fishspawners, 4, 0); internals->flags &= ~FLAG_SHOOTABLE; } if (++o->timer > 50) { FACEPLAYER; o->state = STATE_X_TRAVEL; o->timer = 0; } } break; // exploding case STATE_X_EXPLODING: { SetStates(fishspawners, 4, 0); KillObjectsOfType(OBJ_X_FISHY_MISSILE); StartScript(1000); o->timer = 0; o->state++; } case STATE_X_EXPLODING+1: { game.quaketime = 2; o->timer++; if ((o->timer % 8) == 0) sound(SND_ENEMY_HURT_BIG); SmokePuff(o->CenterX() + (random(-72, 72) << CSF), o->CenterY() + (random(-64, 64) << CSF)); if (o->timer > 100) { starflash.Start(o->CenterX(), o->CenterY()); sound(SND_EXPLOSION1); o->timer = 0; o->state++; } } break; case STATE_X_EXPLODING+2: { game.quaketime = 40; if (++o->timer > 50) { CreateObject(o->x, o->y - (24 << CSF), OBJ_X_DEFEATED); DeleteMonster(); return; } } break; } // call AI for all tread pieces for(i=0;i<4;i++) { run_tread(i); run_fishy_spawner(i); } } // moved this to aftermove so xinertia on treads is already applied // when we calculate the main object position. void XBoss::RunAftermove() { Object *o = mainobject; int i; if (!mainobject || mainobject->state == 0 || !X.initilized) return; // main object pulled along as treads move int tread_center = (treads[UL]->x + treads[UR]->x + \ treads[LL]->x + treads[LR]->x) / 4; o->x += (tread_center - o->x) / 16; run_internals(); for(i=0;i<4;i++) { run_body(i); run_target(i); } for(i=0;i<2;i++) { run_door(i); } } void ondeath_x_mainobject(Object *internals) { // do nothing really, this function is just there to override // the default so we are not destroyed--our 0 HP level will // be noticed in run_internals() and trigger the defeat sequence. internals->flags &= ~FLAG_SHOOTABLE; } /* void c------------------------------() {} */ void XBoss::run_tread(int index) { Object *o = treads[index]; switch(o->state) { case 0: { o->flags |= (FLAG_SOLID_BRICK | FLAG_INVULNERABLE | FLAG_NOREARTOPATTACK); o->state = STATE_TREAD_STOPPED; } case STATE_TREAD_STOPPED: { o->frame = 0; o->damage = 0; o->flags &= ~FLAG_BOUNCY; } break; case STATE_TREAD_RUN: { o->flags |= FLAG_BOUNCY; o->timer = 0; o->frame = 2; o->animtimer = 0; o->state++; } case STATE_TREAD_RUN+1: { ANIMATE(0, 2, 3); XACCEL(0x20); if (++o->timer > 30) { o->flags &= ~FLAG_BOUNCY; o->frame = 0; o->animtimer = 0; o->state++; } } break; case STATE_TREAD_RUN+2: { ANIMATE(1, 0, 1); XACCEL(0x20); o->timer++; } break; case STATE_TREAD_BRAKE: { o->frame = 2; o->animtimer = 0; o->flags |= FLAG_BOUNCY; o->state++; } case STATE_TREAD_BRAKE+1: { ANIMATE(0, 2, 3); XACCEL(0x20); if ((o->dir == RIGHT && o->xinertia > 0) || \ (o->dir == LEFT && o->xinertia < 0)) { o->xinertia = 0; o->state = STATE_TREAD_STOPPED; } } break; } // make motor noise switch(o->state) { case STATE_TREAD_RUN+1: case STATE_TREAD_BRAKE+1: { if (o->timer & 1) sound(SND_MOTOR_SKIP); } break; case STATE_TREAD_RUN+2: { if ((o->timer % 4) == 1) sound(SND_MOTOR_RUN); } break; } // determine if player is in a position where he could get run over. if (o->state > STATE_TREAD_STOPPED && o->xinertia != 0) { if (abs(player->y - o->CenterY()) <= (5 << CSF)) o->damage = 10; else o->damage = 0; } else { o->damage = 0; } LIMITX(0x400); } void XBoss::run_body(int i) { // set body position based on main object position and // our linked tread position. first get the center point we should be at... body[i]->x = (mainobject->x + treads[i]->x) / 2; body[i]->y = (mainobject->y + treads[i]->y) / 2; // ...and place our center pixel at those coordinates. int dx = (sprites[body[i]->sprite].w / 2) - 8; int dy = (sprites[body[i]->sprite].h / 2) - 8; body[i]->x -= dx << CSF; body[i]->y -= dy << CSF; // tweaks if (i == UL || i == LL) { body[i]->x -= (6 << CSF); } else { body[i]->x += (7 << CSF); } if (i == LL || i == LR) { body[i]->y += (8 << CSF); } } void XBoss::run_internals() { internals->x = mainobject->x; internals->y = mainobject->y; // select frame if (internals->shaketime & 2) { internals->frame = 1; } else { internals->frame = (mainobject->state < 10) ? 2 : 0; } // link damage to main object if (internals->hp < 1000) { mainobject->DealDamage(1000 - internals->hp); internals->hp = 1000; } // trigger explosion sequence when monster defeated if (mainobject->hp <= 0 && mainobject->state < STATE_X_EXPLODING) { mainobject->shaketime = 150; mainobject->state = STATE_X_EXPLODING; } } void XBoss::run_door(int index) { Object *o = doors[index]; switch(o->state) { // doors opening all the way case STATE_DOOR_OPENING: { o->xmark += (1 << CSF); if (o->xmark >= DOORS_OPEN_DIST) { o->xmark = DOORS_OPEN_DIST; o->state = STATE_DOOR_FINISHED; } } break; // doors opening partially for fish-missile launchers to fire case STATE_DOOR_OPENING_PARTIAL: { o->xmark += (1 << CSF); if (o->xmark >= DOORS_OPEN_FISHY_DIST) { o->xmark = DOORS_OPEN_FISHY_DIST; o->state = STATE_DOOR_FINISHED; } } break; // doors closing case STATE_DOOR_CLOSING: { o->xmark -= (1 << CSF); if (o->xmark <= 0) { o->xmark = 0; o->state = STATE_DOOR_FINISHED; } } break; // this is a signal to the main object that the doors // are finished with the last command. case STATE_DOOR_FINISHED: break; } // set position relative to main object. // doors open in opposite directions. if (o->dir == LEFT) o->x = (mainobject->x - o->xmark); else o->x = (mainobject->x + o->xmark); o->y = mainobject->y; } void XBoss::run_fishy_spawner(int index) { Object *o = fishspawners[index]; switch(o->state) { case STATE_FISHSPAWNER_FIRE: { o->timer = 20 + (index * 20); o->state++; } case STATE_FISHSPAWNER_FIRE+1: { if (o->timer) { o->timer--; break; } // keep appropriate position relative to main object // UL UR LL LR static const int xoffs[] = { -64 <x = (mainobject->x + xoffs[index]); o->y = (mainobject->y + yoffs[index]); Object *missile = CreateObject(o->x, o->y, OBJ_X_FISHY_MISSILE); missile->dir = index; sound(SND_EM_FIRE); o->timer = 120; } break; } } void XBoss::run_target(int index) { Object *o = targets[index]; // has this target been destroyed? // (we don't really kill the object until the battle is over, // to avoid having to deal with dangling pointers). if (o->invisible) return; switch(o->state) { case 0: o->flags &= ~FLAG_SHOOTABLE; o->frame &= 3; o->state = 1; break; case STATE_TARGET_FIRE: { o->timer = 40 + (index * 10); o->flags |= FLAG_SHOOTABLE; o->state++; } case STATE_TARGET_FIRE+1: { if (--o->timer <= 16) { // flash shortly before firing if (o->timer & 2) o->frame |= 4; else o->frame &= 3; if (o->timer <= 0) { o->timer = 40; EmFireAngledShot(o, OBJ_GAUDI_FLYING_SHOT, 2, 0x500); sound(SND_EM_FIRE); } } } break; } // keep appropriate position on internals // UL UR LL LR static const int xoffs[] = { -22 <x = internals->x + xoffs[index]; o->y = internals->y + yoffs[index]; } void ondeath_x_target(Object *o) { SmokeClouds(o, 8, 8, 8); sound(SND_LITTLE_CRASH); o->flags &= ~FLAG_SHOOTABLE; o->invisible = true; } /* void c------------------------------() {} */ void XBoss::Init() { int i; mainobject->hp = 700; mainobject->state = 1; mainobject->x = (128 * TILE_W) << CSF; mainobject->y = (200 << CSF); mainobject->flags = FLAG_IGNORE_SOLID; // put X behind the flying gaudis mainobject->PushBehind(lowestobject); // create body pieces for(i=3;i>=0;i--) { body[i] = CreatePiece(0, 0, OBJ_X_BODY); body[i]->dir = (i == UL || i == LL) ? LEFT : RIGHT; body[i]->frame = (i == LL || i == LR) ? 1 : 0; } // create treads for(i=0;i<4;i++) { int x = (i == UL || i == LL) ? 0xf8000 : 0x108000; int y = (i == UL || i == UR) ? 0x12000 : (0x20000 - (16 << CSF)); int sprite = (i == UL || i == UR) ? SPR_X_TREAD_UPPER : SPR_X_TREAD_LOWER; treads[i] = CreateTread(x, y, sprite); treads[i]->smushdamage = 10; } // create internals internals = CreatePiece(0, 0, OBJ_X_INTERNALS); internals->hp = 1000; internals->flags &= ~FLAG_SHOW_FLOATTEXT; // create targets for(i=0;i<4;i++) { targets[i] = CreatePiece(0, 0, OBJ_X_TARGET); targets[i]->sprite = SPR_X_TARGETS; targets[i]->frame = i; targets[i]->hp = 60; targets[i]->flags &= ~FLAG_SHOW_FLOATTEXT; } // create fishy-missile shooters for(i=0;i<4;i++) { fishspawners[i] = CreatePiece(0, 0, OBJ_X_FISHY_SPAWNER); fishspawners[i]->sprite = SPR_NULL; fishspawners[i]->invisible = true; fishspawners[i]->flags = 0; } // create doors for(i=0;i<2;i++) { doors[i] = CreatePiece(0, 0, OBJ_X_DOOR); doors[i]->sprite = SPR_X_DOOR; doors[i]->dir = i; } sprites[SPR_X_DOOR].frame[0].dir[LEFT].drawpoint.x = 40; sprites[SPR_X_DOOR].frame[0].dir[LEFT].drawpoint.y = 16; sprites[SPR_X_DOOR].frame[0].dir[RIGHT].drawpoint.x = -9; sprites[SPR_X_DOOR].frame[0].dir[RIGHT].drawpoint.y = 16; } // create an object and record it as a piece of the monster // so we can delete all the pieces later via DeleteMonster(). Object *XBoss::CreatePiece(int x, int y, int object) { Object *piece = CreateObject(x, y, object); piecelist[npieces++] = piece; piece->PushBehind(mainobject); return piece; } // create an object of type OBJ_X_TREAD and give it the specified sprite. Object *XBoss::CreateTread(int x, int y, int sprite) { Object *tread = CreatePiece(x, y, OBJ_X_TREAD); tread->sprite = sprite; return tread; } // delete all pieces of the monster void XBoss::DeleteMonster() { for(int i=0;iDelete(); mainobject->Delete(); mainobject = NULL; game.stageboss.object = NULL; } // return true if all the targets behind the doors have been destroyed. bool XBoss::AllTargetsDestroyed() { for(int i=0;i<4;i++) { if (!targets[i]->invisible) return false; } return true; } /* void c------------------------------() {} */ // sets state on an array on objects void XBoss::SetStates(Object *objects[], int nobjects, int state) { for(int i=0;istate = state; } // sets direction on an array on objects void XBoss::SetDirs(Object *objects[], int nobjects, int dir) { for(int i=0;idir = dir; } /* void c------------------------------() {} */ void ai_x_fishy_missile(Object *o) { if (o->state == 0) { static const int angle_for_dirs[] = { 160, 224, 96, 32 }; o->angle = angle_for_dirs[o->dir]; o->dir = RIGHT; o->state = 1; } vector_from_angle(o->angle, 0x400, &o->xinertia, &o->yinertia); int desired_angle = GetAngle(o->x, o->y, player->x, player->y); if (o->angle >= desired_angle) { if ((o->angle - desired_angle) < 128) { o->angle--; } else { o->angle++; } } else { if ((o->angle - desired_angle) < 128) { o->angle++; } else { o->angle--; } } // smoke trails if (++o->timer2 > 2) { o->timer2 = 0; Caret *c = effect(o->ActionPointX(), o->ActionPointY(), EFFECT_SMOKETRAIL_SLOW); c->xinertia = -o->xinertia >> 2; c->yinertia = -o->yinertia >> 2; } o->frame = (o->angle + 16) / 32; if (o->frame > 7) o->frame = 7; } // this is the cat that falls out after you defeat him void ai_x_defeated(Object *o) { o->timer++; if ((o->timer % 4) == 0) { SmokeClouds(o, 1, 16, 16); } switch(o->state) { case 0: { SmokeClouds(o, 8, 16, 16); o->state = 1; } case 1: { if (o->timer > 50) { o->state = 2; o->xinertia = -0x100; } // three-position shake o->x += (o->timer & 2) ? (1 << CSF) : -(1 << CSF); } break; case 2: { o->yinertia += 0x40; if (o->y > (map.ysize * TILE_H) << CSF) o->Delete(); } break; } } ================================================ FILE: ai/boss/x.fdh ================================================ //hash:b9080605 //automatically generated by Makegen /* located in ObjManager.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// Caret *effect(int x, int y, int effectno); /* located in tsc.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// ScriptInstance *StartScript(int scriptno, int pageno); /* located in trig.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys); uint8_t GetAngle(int curx, int cury, int tgtx, int tgty); /* located in ai/ai.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// void KillObjectsOfType(int type); /* located in ai/sym/smoke.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// Object *SmokePuff(int x, int y); void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in ai/boss/x.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// void ondeath_x_mainobject(Object *internals); void ondeath_x_target(Object *o); void ai_x_fishy_missile(Object *o); void ai_x_defeated(Object *o); /* located in sound/sound.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// void sound(int snd); /* located in common/stat.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// void stat(const char *fmt, ...); /* located in common/misc.cpp */ //-------------------[referenced from ai/boss/x.cpp]-----------------// int random(int min, int max); ================================================ FILE: ai/boss/x.h ================================================ #ifndef _XBOSS_H #define _XBOSS_H enum XBDir { UL, UR, LL, LR }; class XBoss : public StageBoss { public: void OnMapEntry(); void OnMapExit(); void Run(); void RunAftermove(); private: void run_tread(int index); void run_body(int index); void run_door(int index); void run_target(int index); void run_fishy_spawner(int index); void run_internals(); bool AllTargetsDestroyed(); void Init(); Object *CreateTread(int x, int y, int sprite); Object *CreatePiece(int x, int y, int type); void SetStates(Object *objects[], int nobjects, int state); void SetDirs(Object *objects[], int nobjects, int dir); void DeleteMonster(); Object *mainobject; Object *body[4]; Object *treads[4]; Object *internals; Object *doors[2]; Object *targets[4]; Object *fishspawners[4]; Object *piecelist[24]; int npieces; struct { bool initilized; } X; }; #endif ================================================ FILE: ai/egg/egg.cpp ================================================ #include "../stdai.h" #include "../weed/weed.fdh" #include "egg.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_CRITTER_HOPPING_GREEN, ai_critter); ONTICK(OBJ_BASIL, ai_basil); ONTICK(OBJ_BEHEMOTH, ai_behemoth); ONTICK(OBJ_BEETLE_GREEN, ai_beetle_horiz); ONTICK(OBJ_BEETLE_FREEFLY, ai_beetle_freefly); ONTICK(OBJ_GIANT_BEETLE, ai_giant_beetle); ONTICK(OBJ_GIANT_BEETLE_SHOT, ai_generic_angled_shot); ONTICK(OBJ_FORCEFIELD, ai_forcefield); ONTICK(OBJ_EGG_ELEVATOR, ai_egg_elevator); } /* void c------------------------------() {} */ void ai_basil(Object *o) { switch(o->state) { case 0: o->x = player->x; o->state = (o->dir == LEFT) ? 1 : 2; break; case 1: { o->xinertia -= 0x40; if (o->blockl || ((player->x - o->x) >= (192 << CSF))) { if (o->blockl) o->xinertia = 0; o->state = 2; } } break; case 2: { o->xinertia += 0x40; if (o->blockr || ((o->x - player->x) >= (192 << CSF))) { if (o->blockr) o->xinertia = 0; o->state = 1; } } break; } if (o->xinertia > 0x80) o->dir = RIGHT; if (o->xinertia < -0x80) o->dir = LEFT; ANIMATE(1, 0, 2); LIMITX(0x5ff); } void ai_behemoth(Object *o) { if (o->blockl) o->dir = RIGHT; if (o->blockr) o->dir = LEFT; switch(o->state) { case 0: { o->nxflags |= NXFLAG_THUD_ON_RIDING; o->damage = 1; } case 1: // walking happily { XMOVE(0x100); ANIMATE(8, 0, 3); if (o->shaketime) { o->frame = 4; o->state = 2; o->timer = 0; } } break; case 2: // grimace/hit { o->xinertia *= 7; o->xinertia /= 8; if (++o->timer > 40) { // player still picking on him? if (o->shaketime) { o->state = 3; o->frame = 6; o->animtimer = 0; o->timer = 0; o->damage = 5; } else { o->state = 1; o->animtimer = 0; } } } break; case 3: // charge! { XMOVE(0x400); ANIMATE(5, 5, 6); if (++o->timer > 200) o->state = 0; } break; } o->yinertia += 0x40; LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_beetle_horiz(Object *o) { enum { FLYING = 0, ON_WALL = 1 }; if (o->state == FLYING) { if (++o->animtimer == 2) { o->animtimer = 0; o->animframe ^= 1; } o->frame = (o->animframe + 1); if (o->dir == RIGHT) { o->xinertia += 0x50; if (o->xinertia > 0x32c) o->xinertia = 0x32c; if (o->blockr) { o->dir = LEFT; o->state = ON_WALL; o->frame = 0; o->xinertia = 0; } } else { o->xinertia -= 0x50; if (o->xinertia < -0x32c) o->xinertia = -0x32c; if (o->blockl) { o->dir = RIGHT; o->state = ON_WALL; o->frame = 0; o->xinertia = 0; } } } else { // waiting on wall if (abs(o->y - player->y) < (12<dir == RIGHT && (player->x > o->x)) || \ (o->dir == LEFT && (player->x < o->x))) { o->animframe = 0; o->state = FLYING; } } } } void ai_beetle_freefly(Object *o) { switch(o->state) { case 0: { o->invisible = true; o->flags &= ~(FLAG_SHOOTABLE | FLAG_SOLID_MUSHY); o->damage = 0; o->nxflags |= NXFLAG_SLOW_WHEN_HURT; o->state = 1; } case 1: { // has player made it to our position yet? // (we are invisible right now, our position on the map // is a marker for when we should fly onto the screen) if (pdistlx(TILE_W << CSF)) { o->flags |= (FLAG_SHOOTABLE | FLAG_SOLID_MUSHY); o->damage = 2; o->invisible = false; o->ymark = o->y; o->yinertia = -0x100; o->state = 2; // come on screen if (o->dir == LEFT) { o->x = player->x + (256 << CSF); o->xinertia = -0x2FF; } else { o->x = player->x - (256 << CSF); o->xinertia = 0x2FF; } } } break; case 2: { FACEPLAYER; ANIMATE(1, 0, 1); XACCEL(0x10); // sinusoidal flight if (o->y > o->ymark) o->yinertia -= 0x10; else o->yinertia += 0x10; LIMITX(0x2FF); LIMITY(0x100); } break; } } /* void c------------------------------() {} */ void ai_giant_beetle(Object *o) { switch(o->state) { case 0: o->invisible = true; o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; o->xmark = o->x; o->ymark = o->y; o->timer2 = o->dir; o->nxflags |= NXFLAG_SLOW_WHEN_HURT; o->state = 1; case 1: { if (pdistlx(TILE_W << CSF)) { o->flags |= FLAG_SHOOTABLE; o->damage = 6; o->invisible = false; o->yinertia = -0x100; o->state = 2; o->timer = 0; if (o->dir == LEFT) { o->x = player->x + (256 << CSF); o->xinertia = -0x2FF; } else { o->x = player->x - (256 << CSF); o->xinertia = 0x2FF; } } } break; case 2: { FACEPLAYER; XACCEL(0x10); if (o->blockl) o->xinertia = 0x200; if (o->blockr) o->xinertia = -0x200; // sinusoidal flight if (o->y > o->ymark) o->yinertia -= 0x08; else o->yinertia += 0x08; LIMITX(0x2FF); LIMITY(0x100); // if player runs too far away from us reset to our // waiting state and original position. if (!pdistlx((SCREEN_WIDTH + 80) << CSF)) { o->state = 0; o->xinertia = 0; o->yinertia = 0; o->x = o->xmark; //o->y = o->ymark; o->dir = o->timer2; } // animate wings. must do it this way instead of // using ANIMATE(), so that the frame>1 is only checked // when animtimer overflows, else flashing-before-fire // will get messed up. if (++o->animtimer > 1) { o->animtimer = 0; if (++o->frame > 1) o->frame = 0; } if (++o->timer >= 150) { // flashing before fire if (o->frame == 1) o->frame = 2; // after a bit of flashing, fire if (o->timer >= 158) { if (pdistlx(0x14000)) { sound(SND_EM_FIRE); EmFireAngledShot(o, OBJ_GIANT_BEETLE_SHOT, 2, 0x400); } o->timer = 0; } } } break; } } /* void c------------------------------() {} */ // lift in Egg Observation Room void ai_egg_elevator(Object *o) { // assume not moving o->yinertia = 0; switch(o->state) { case 0: { // set wrong in npc.tbl, at least for our engine o->flags &= ~FLAG_SOLID_MUSHY; o->flags |= FLAG_SOLID_BRICK; o->state = 1; } // fall thru case 1: case 3: case 5: case 7: { if (++o->timer > 150) { o->timer = 0; o->state++; } } break; case 2: case 4: case 6: case 8: { if (++o->timer > (TILE_H * 4)) { o->timer = 0; if (++o->state > 8) o->state = 1; } else { o->yinertia = \ (o->state > 5) ? 0x200 : -0x200; ANIMATE(1, 0, 1); } } break; } } void ai_forcefield(Object *o) { // need to reinforce these or you can walk through the // spawned forcefield that blocks exit from Igor battle o->flags |= (FLAG_SOLID_BRICK | FLAG_INVULNERABLE); ai_animate1(o); } ================================================ FILE: ai/egg/egg.fdh ================================================ //hash:b9ee0abd //automatically generated by Makegen /* located in trig.cpp */ //------------------[referenced from ai/egg/egg.cpp]-----------------// void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/ai.cpp */ //------------------[referenced from ai/egg/egg.cpp]-----------------// void ai_animate1(Object *o); /* located in ai/egg/egg.cpp */ //------------------[referenced from ai/egg/egg.cpp]-----------------// void ai_basil(Object *o); void ai_behemoth(Object *o); void ai_beetle_horiz(Object *o); void ai_beetle_freefly(Object *o); void ai_giant_beetle(Object *o); void ai_egg_elevator(Object *o); void ai_forcefield(Object *o); /* located in sound/sound.cpp */ //------------------[referenced from ai/egg/egg.cpp]-----------------// void sound(int snd); ================================================ FILE: ai/egg/egg2.cpp ================================================ #include "../stdai.h" #include "../weed/weed.fdh" #include "egg.fdh" #include "egg2.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_CRITTER_HOPPING_AQUA, ai_critter); ONTICK(OBJ_BEETLE_FREEFLY_2, ai_beetle_freefly); ONTICK(OBJ_GIANT_BEETLE_2, ai_giant_beetle); ONTICK(OBJ_DRAGON_ZOMBIE, ai_dragon_zombie); ONTICK(OBJ_DRAGON_ZOMBIE_SHOT, ai_generic_angled_shot); ONTICK(OBJ_FALLING_SPIKE_SMALL, ai_falling_spike_small); ONTICK(OBJ_FALLING_SPIKE_LARGE, ai_falling_spike_large); ONTICK(OBJ_COUNTER_BOMB, ai_counter_bomb); ONTICK(OBJ_COUNTER_BOMB_NUMBER, ai_counter_bomb_number); } /* void c------------------------------() {} */ void ai_dragon_zombie(Object *o) { if (o->hp < 950 && o->state < 50) { sound(SND_BIG_CRASH); SmokeClouds(o, 8, 4, 4); o->SpawnPowerups(); o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; o->frame = 5; // dead o->state = 50; // dead } switch(o->state) { case 0: case 1: // ready { ANIMATE(30, 0, 1); if (--o->timer < 0) // can fire again yet? { if (pdistlx(112 << CSF)) // player in range? { o->state = 2; o->timer = 0; } } } break; case 2: // flashing, prepare to fire { FACEPLAYER; o->timer++; o->frame = (o->timer & 2) ? 2 : 3; if (o->timer > 30) o->state = 3; } break; case 3: { o->state = 4; o->timer = 0; o->frame = 4; // save point we'll fire at--these enemies don't update // the position of their target for each shot o->xmark = player->x; o->ymark = player->y; } case 4: { o->timer++; if (o->timer < 40 && (o->timer % 8) == 1) { Object *fire = SpawnObjectAtActionPoint(o, OBJ_DRAGON_ZOMBIE_SHOT); ThrowObject(fire, o->xmark, o->ymark, 6, 0x600); sound(SND_SNAKE_FIRE); } if (o->timer > 60) { o->state = 1; o->frame = 0; o->timer = random(100, 200); // random time till can fire again } } break; } } /* void c------------------------------() {} */ void ai_falling_spike_small(Object *o) { switch(o->state) { case 0: { o->xmark = o->x; if (pdistlx(12 << CSF)) o->state = 1; } break; case 1: // shaking { if (++o->animtimer >= 12) o->animtimer = 0; o->x = o->xmark; if (o->animtimer >= 6) o->x += (1 << CSF); if (++o->timer > 30) { o->state = 2; // fall o->frame = 1; // slightly brighter frame at top } } break; case 2: // falling { o->yinertia += 0x20; LIMITY(0xC00); if (o->blockd) { if (!player->inputs_locked) // no sound in ending cutscene sound(SND_BLOCK_DESTROY); SmokeClouds(o, 4, 2, 2); effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); o->Delete(); } } break; } } void ai_falling_spike_large(Object *o) { switch(o->state) { case 0: { o->xmark = o->x; if (pdistlx(12 << CSF)) o->state = 1; } break; case 1: // shaking { if (++o->animtimer >= 12) o->animtimer = 0; o->x = o->xmark; if (o->animtimer >= 6) // scuttle:: big spikes shake in the other direction o->x -= (1 << CSF); if (++o->timer > 30) { o->state = 2; // fall o->frame = 1; // slightly brighter frame at top } } break; case 2: // falling { o->yinertia += 0x20; LIMITY(0xC00); if (o->Bottom() < player->Bottom()) { // could fall on player o->flags &= ~FLAG_SOLID_BRICK; o->damage = 127; // ouch! } else { // player could only touch side from this position o->flags |= FLAG_SOLID_BRICK; o->damage = 0; } // damage NPC's as well (it kills that one Dragon Zombie) Object *enemy; FOREACH_OBJECT(enemy) { if ((enemy->flags & FLAG_SHOOTABLE) && \ o->Bottom() >= enemy->CenterY() && hitdetect(o, enemy)) { if (!(enemy->flags & FLAG_INVULNERABLE)) enemy->DealDamage(127); } } if (++o->timer > 8 && o->blockd) { o->flags |= FLAG_SOLID_BRICK; o->damage = 0; o->yinertia = 0; o->state = 3; // fall complete o->timer = 0; sound(SND_BLOCK_DESTROY); SmokeClouds(o, 4, 2, 2); effect(o->CenterX(), o->y + (sprites[o->sprite].block_d[0].y << CSF), EFFECT_STARSOLID); } } break; case 3: // hit ground { if (++o->timer > 4) { // make it destroyable o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; o->state = 4; } } break; } } /* void c------------------------------() {} */ void ai_counter_bomb(Object *o) { /*debug("state: %d", o->state); debug("timer: %d", o->timer); debug("timer2: %d", o->timer2);*/ switch(o->state) { case 0: { o->state = 1; o->ymark = o->y; o->timer = random(0, 50); o->timer2 = 0; } case 1: { // desync if multiple enemies if (--o->timer < 0) { o->timer = 0; o->state = 2; o->yinertia = 0x300; } } break; case 2: // ready { if (pdistlx(80 << CSF) || o->shaketime) { o->state = 3; o->timer = 0; } } break; case 3: // counting down... { if (--o->timer < 0) { if (o->timer2 < 5) { Object *number = CreateObject(o->CenterX() + (8 << CSF), \ o->y + (16 << CSF), \ OBJ_COUNTER_BOMB_NUMBER); number->frame = o->timer2++; o->timer = 60; } else { // expand bounding box to cover explosion area o->x = o->CenterX(); o->y = o->CenterY(); o->invisible = true; o->sprite = SPR_BBOX_PUPPET_1; sprites[o->sprite].bbox.x1 = -128; sprites[o->sprite].bbox.y1 = -100; sprites[o->sprite].bbox.x2 = 128; sprites[o->sprite].bbox.y2 = 100; o->damage = 30; o->yinertia = 0; o->state = 4; // make kaboom sound(SND_EXPLOSION1); quake(20); SmokeXY(o->CenterX(), o->CenterY(), 100, 128, 100); return; } } } break; case 4: // exploding (one frame only to give time for bbox to damage player) o->Delete(); return; } ANIMATE(4, 0, 2); if (o->state == 2 || o->state == 3) { o->yinertia += (o->y > o->ymark) ? -0x10 : 0x10; LIMITY(0x100); } } void ai_counter_bomb_number(Object *o) { switch(o->state) { case 0: { sound(SND_COMPUTER_BEEP); o->state = 1; } case 1: { o->x += (1 << CSF); if (++o->timer > 8) { o->state = 2; o->timer = 0; } } break; case 2: { if (++o->timer > 30) o->Delete(); } break; } } ================================================ FILE: ai/egg/egg2.fdh ================================================ //hash:88c9cad7 //automatically generated by Makegen /* located in game.cpp */ //------------------[referenced from ai/egg/egg2.cpp]----------------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //------------------[referenced from ai/egg/egg2.cpp]----------------// bool hitdetect(Object *o1, Object *o2); Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //------------------[referenced from ai/egg/egg2.cpp]----------------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //------------------[referenced from ai/egg/egg2.cpp]----------------// void ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed); /* located in ai/ai.cpp */ //------------------[referenced from ai/egg/egg2.cpp]----------------// Object *SpawnObjectAtActionPoint(Object *o, int otype); /* located in ai/egg/egg2.cpp */ //------------------[referenced from ai/egg/egg2.cpp]----------------// void ai_dragon_zombie(Object *o); void ai_falling_spike_small(Object *o); void ai_falling_spike_large(Object *o); void ai_counter_bomb(Object *o); void ai_counter_bomb_number(Object *o); /* located in ai/sym/smoke.cpp */ //------------------[referenced from ai/egg/egg2.cpp]----------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //------------------[referenced from ai/egg/egg2.cpp]----------------// void sound(int snd); /* located in common/misc.cpp */ //------------------[referenced from ai/egg/egg2.cpp]----------------// int random(int min, int max); ================================================ FILE: ai/egg/igor.cpp ================================================ #include "../stdai.h" #include "igor.fdh" #define IGOR_DEFEAT_FRAME 12 INITFUNC(AIRoutines) { ONTICK(OBJ_NPC_IGOR, ai_npc_igor); ONTICK(OBJ_BOSS_IGOR, ai_boss_igor); ONTICK(OBJ_IGOR_SHOT, ai_generic_angled_shot); ONTICK(OBJ_BOSS_IGOR_DEFEATED, ai_boss_igor_defeated); } /* void c------------------------------() {} */ // cutscene igor void ai_npc_igor(Object *o) { switch(o->state) { case 0: // init, standing/panting o->xinertia = 0; o->frame = 0; o->animtimer = 0; o->state = 1; case 1: ANIMATE(5, 0, 1); break; case 2: // walking o->state = 3; o->frame = 2; o->animtimer = 0; case 3: ANIMATE(3, 2, 5); XMOVE(0x200); break; case 4: // punch o->xinertia = 0; o->state = 5; o->timer = 0; case 5: o->frame = 6; if (++o->timer > 10) { o->timer = 0; o->state = 6; sound(SND_EXPL_SMALL); } break; case 6: o->frame = 7; if (++o->timer > 8) { o->state = 0; o->frame = 0; } break; case 7: o->state = 1; break; } o->yinertia += 0x40; LIMITY(0x5FF); } /* void c------------------------------() {} */ // boss-fight igor void ai_boss_igor(Object *o) { enum { STATE_INIT = 0, STATE_STAND, STATE_BEGIN_ATTACK, STATE_WALK, STATE_JUMPING, STATE_LANDED, STATE_PUNCH, STATE_PUNCH_2, STATE_PUNCH_3, STATE_MOUTH_BLAST, STATE_MOUTH_BLAST_2 }; switch(o->state) { case STATE_INIT: { o->damage = 0; o->xinertia = 0; o->state = STATE_STAND; o->frame = 0; o->animtimer = 0; } case STATE_STAND: { ANIMATE(5, 0, 1); if (++o->timer > 50) { o->state = STATE_BEGIN_ATTACK; } } break; case STATE_BEGIN_ATTACK: { o->state = STATE_WALK; o->frame = 2; o->animtimer = 0; o->timer = 0; FACEPLAYER; o->igor.fireattack = false; // when health is less than halfway, then use // the mouth blast attack every third time. if (++o->timer2 >= 3 && \ o->hp <= (objprop[o->type].initial_hp / 2)) { o->timer2 = 0; o->igor.fireattack = true; o->dir ^= 1; // walk away from player } } // fall thru case STATE_WALK: { ANIMATE(3, 2, 5); XMOVE(0x200); if (o->igor.fireattack) { // begin mouth-blast attack if (++o->timer > 16) { o->state = STATE_MOUTH_BLAST; o->xinertia = 0; o->frame = 10; } } else { if (o->dir == LEFT) { if (o->x <= player->x + player->Width()) o->state = STATE_PUNCH; } else { if (o->x + o->Width() >= player->x) o->state = STATE_PUNCH; } // if we don't reach him after a while, do a jump if (++o->timer > 50) { o->frame = 10; o->yinertia = -0x400; o->state = STATE_JUMPING; o->timer = 0; o->xinertia *= 2; o->xinertia /= 3; o->damage = 2; } } } break; case STATE_PUNCH: { o->xinertia = 0; o->state = STATE_PUNCH_2; o->frame = 6; o->timer = 0; } case STATE_PUNCH_2: { if (++o->timer > 12) { sound(SND_EXPL_SMALL); // sprite appears identical, but has a wider bounding box. o->sprite = SPR_IGOR_PUNCHING; o->damage = 5; o->state = STATE_PUNCH_3; o->frame = 7; o->timer = 0; } } break; case STATE_PUNCH_3: { if (++o->timer > 10) { o->state = STATE_INIT; o->frame = 0; o->damage = 0; // return to normal-size bounding box o->sprite = SPR_IGOR; } } break; case STATE_JUMPING: { if (o->blockd) { sound(SND_QUAKE); SmokeSide(o, 4, DOWN); o->state = STATE_LANDED; o->frame = 11; o->timer = 0; } } break; case STATE_LANDED: { o->xinertia = 0; if (++o->timer > 10) { o->state = STATE_INIT; o->frame = 0; o->damage = 0; } } break; case STATE_MOUTH_BLAST: { FACEPLAYER; o->timer = 0; o->state++; } case STATE_MOUTH_BLAST_2: { o->timer++; // flash mouth o->frame = 8; if (o->timer > 50 && (o->timer & 2)) o->frame = 9; // fire shots if (o->timer > 100) { if ((o->timer % 6) == 1) { sound(SND_BLOCK_DESTROY); Object *shot = SpawnObjectAtActionPoint(o, OBJ_IGOR_SHOT); int angle = (o->dir == LEFT) ? 136 : 248; angle += random(-16, 16); ThrowObjectAtAngle(shot, angle, 0x580); } if (o->timer > 132) // fires 6 shots { o->state = STATE_INIT; o->timer = 0; } } } break; } o->yinertia += 0x40; LIMITY(0x5ff); } void ai_boss_igor_defeated(Object *o) { switch(o->state) { case 0: { o->xinertia = 0; o->yinertia = 0; o->flags &= ~FLAG_SHOOTABLE; o->frame = IGOR_DEFEAT_FRAME; FACEPLAYER; sound(SND_BIG_CRASH); SmokeBoomUp(o); o->timer = 0; o->state = 1; } break; case 1: { if ((++o->timer % 5) == 0) smoke_puff(o, false); o->display_xoff = 0; if (o->timer & 2) o->display_xoff = -1; if (o->timer > 100) { o->xmark = o->x; o->ymark = o->y; o->timer = 0; o->state = 2; } } break; case 2: { if ((++o->timer % 9) == 0) smoke_puff(o, false); // alternate between big and small sprites // (frenzied/not-frenzied forms) if (o->timer & 2) { o->sprite = SPR_IGOR_DEFEATED; o->frame = 0; if (o->dir == LEFT) o->x = o->xmark + (12 << CSF); else o->x = o->xmark + (2 << CSF); o->y = o->ymark + (12 << CSF); } else { o->sprite = SPR_IGOR; o->frame = IGOR_DEFEAT_FRAME; o->x = o->xmark; o->y = o->ymark; } if (o->timer > 150) { o->state = 3; o->frame = 0; o->timer = 0; } } break; case 3: { if (++o->timer > 50) { o->timer = 0; o->frame++; if (o->frame >= 2) o->state = 4; } if (o->frame == 0 && (o->timer % 16) == 0) smoke_puff(o, false); } break; case 4: break; } o->yinertia += 0x40; LIMITY(0x5ff); } static void smoke_puff(Object *o, bool initial) { Object *smoke; smoke = CreateObject(o->CenterX() + random(-16<CenterY() + random(-16<xinertia = random(-0x155, 0x155); smoke->yinertia = random(-0x600, 0); } else { smoke->xinertia = random(-0x600, 0x600); smoke->yinertia = random(-0x600, 0x600); } } ================================================ FILE: ai/egg/igor.fdh ================================================ //hash:2a6475dd //automatically generated by Makegen /* located in ObjManager.cpp */ //------------------[referenced from ai/egg/igor.cpp]----------------// Object *CreateObject(int x, int y, int type); /* located in trig.cpp */ //------------------[referenced from ai/egg/igor.cpp]----------------// void ThrowObjectAtAngle(Object *o, uint8_t angle, int speed); /* located in ai/ai.cpp */ //------------------[referenced from ai/egg/igor.cpp]----------------// Object *SpawnObjectAtActionPoint(Object *o, int otype); /* located in ai/egg/igor.cpp */ //------------------[referenced from ai/egg/igor.cpp]----------------// void ai_npc_igor(Object *o); void ai_boss_igor(Object *o); void ai_boss_igor_defeated(Object *o); static void smoke_puff(Object *o, bool initial); /* located in ai/sym/smoke.cpp */ //------------------[referenced from ai/egg/igor.cpp]----------------// void SmokeSide(Object *o, int nclouds, int dir); void SmokeBoomUp(Object *o); /* located in sound/sound.cpp */ //------------------[referenced from ai/egg/igor.cpp]----------------// void sound(int snd); /* located in common/misc.cpp */ //------------------[referenced from ai/egg/igor.cpp]----------------// int random(int min, int max); ================================================ FILE: ai/final_battle/balcony.cpp ================================================ #include "../stdai.h" #include "balcony.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_HELICOPTER, ai_helicopter); ONTICK(OBJ_HELICOPTER_BLADE, ai_helicopter_blade); ONTICK(OBJ_IGOR_BALCONY, ai_igor_balcony); ONTICK(OBJ_FALLING_BLOCK, ai_falling_block); ONTICK(OBJ_FALLING_BLOCK_SPAWNER, ai_falling_block_spawner); } /* void c------------------------------() {} */ void ai_helicopter(Object *o) { Object *b; switch(o->state) { case 0: // stopped { b = CreateObject(o->x + (26<y - (9<sprite = SPR_HELICOPTER_BLADE_1; b->linkedobject = o; b = CreateObject(o->x - (4<y - (4<sprite = SPR_HELICOPTER_BLADE_2; b->linkedobject = o; o->state = 1; } break; case 20: // blades running break; case 30: // blades running, spawn momorin { CreateObject(o->x + (45<y + (34<dir = LEFT; o->dir = RIGHT; // open hatch o->state = 31; } break; case 40: // blades running, spawn momorin, santa, and chako (from credits) { CreateObject(o->x + (47<y + (34<dir = LEFT; CreateObject(o->x + (34<y + (34<dir = LEFT; CreateObject(o->x + (21<y + (34<dir = LEFT; o->dir = RIGHT; // open hatch o->state = 41; } break; } } void ai_helicopter_blade(Object *o) { switch(o->state) { case 0: case 1: { if (o->linkedobject && o->linkedobject->state >= 20) o->state = 10; } break; case 10: { ANIMATE(0, 0, 3); } break; } } /* void c------------------------------() {} */ void ai_igor_balcony(Object *o) { if (!pdistlx(SCREEN_WIDTH<state = 1; } switch(o->state) { case 0: { o->state = 1; } case 1: { ANIMATE(20, 0, 1); if ((pdistlx(112<shaketime) { o->state = 10; } } break; case 10: // walking towards player { o->state = 11; o->frame = 0; o->animtimer = 0; FACEPLAYER; } case 11: { ANIMATE(4, 2, 5); XMOVE(0x200); if ((o->dir == RIGHT && o->blockr) || \ (o->dir == LEFT && o->blockl) || \ pdistlx(64<xinertia = 0; o->state = 20; o->timer = 0; } } break; case 20: // prepare to jump... { o->frame = 11; // jump-prepare frame if (++o->timer > 10) { o->state = 21; o->yinertia = -0x5ff; XMOVE(0x200); sound(SND_IGOR_JUMP); } } break; case 21: // jumping { o->frame = 10; // in-air frame if (o->blockd && o->yinertia >= 0) { quake(20); o->xinertia = 0; o->state = 22; o->timer = 0; o->frame = 11; } } break; case 22: // landed { if (++o->timer > 30) o->state = 30; } break; case 30: // mouth-blast attack { o->state = 31; o->timer = 0; FACEPLAYER; } case 31: { o->timer++; // flash mouth o->frame = 8; if (o->timer < 50 && (o->timer & 2)) o->frame = 9; // fire shots if (o->timer > 30) { if ((o->timer % 4) == 1) { sound(SND_BLOCK_DESTROY); Object *shot = SpawnObjectAtActionPoint(o, OBJ_IGOR_SHOT); int angle = (o->dir == LEFT) ? 136 : 248; angle += random(-16, 16); ThrowObjectAtAngle(shot, angle, 0x580); } } if (o->timer > 82) { FACEPLAYER; o->state = 10; } } break; } o->yinertia += 0x33; LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_falling_block_spawner(Object *o) { switch(o->state) { // wait till player leaves "safe zone" at start of Balcony // does nothing in Hell--you enter from the left. case 0: { if (player->x < MAPX(map.xsize - 6)) { o->state = 1; o->timer = 24; } } break; case 1: { if (--o->timer < 0) { Object *block; int x; // blocks tend to follow behind the player--this goes along // with the text that tells you to run so as not to get squashed. if (player->equipmask & EQUIP_BOOSTER20) { x = (player->x + MAPX(4)); if (x < MAPX(26)) x = MAPX(26); } else { x = (player->x + MAPX(6)); if (x < MAPX(23)) x = MAPX(23); } if (x > MAPX(map.xsize - 10)) x = MAPX(map.xsize - 10); if (player->equipmask & EQUIP_BOOSTER20) { x += ((random(-14, 14) * TILE_W) << CSF); } else { x += ((random(-11, 11) * TILE_H) << CSF); } block = CreateObject(x, (player->y - MAPY(14)), OBJ_FALLING_BLOCK); block->dir = random(0, 1) ? LEFT : RIGHT; // small/big blocks o->timer = random(9, 24); } } break; } } void ai_falling_block(Object *o) { o->damage = (player->Top() > o->CenterY()) ? 10 : 0; //debug("Falling Block State %d", o->state); switch(o->state) { case 0: { bool in_hell = (game.curmap == STAGE_HELL2); switch(o->dir) { case LEFT: // large Hell or Balcony block { o->sprite = (in_hell) ? SPR_HELL_BLOCK_LARGE : SPR_BALCONY_BLOCK_LARGE; o->flags |= (FLAG_INVULNERABLE | FLAG_IGNORE_SOLID); o->state = 10; } break; case RIGHT: // small Hell or Balcony block { o->sprite = (in_hell) ? SPR_HELL_BLOCK_SMALL : SPR_BALCONY_BLOCK_SMALL; o->flags |= (FLAG_INVULNERABLE | FLAG_IGNORE_SOLID); o->state = 10; } break; case DOWN: // Misery-spawned block { o->state = 1; o->timer = 0; } break; } o->dir = 0; // there is actually only one dir on sprite } break; case 1: // just spawned by Misery--pause a moment { if (++o->timer > 3) { o->flags |= FLAG_INVULNERABLE; o->state = 10; } } break; case 10: // falling { // allow to pass thru Hell/Balcony ceiling if (o->y > 128<flags &= ~FLAG_IGNORE_SOLID; o->state = 11; } } case 11: // passed thru ceiling in Hell B2 { o->yinertia += 0x40; LIMITY(0x700); if (o->blockd) { o->yinertia = -0x200; o->flags |= FLAG_IGNORE_SOLID; o->state = 20; SmokeSide(o, 4, DOWN); quake(10); } } break; case 20: // already bounced on ground, falling offscreen { o->yinertia += 0x40; LIMITY(0x700); if (o->y > ((map.ysize * TILE_H) << CSF)) { o->Delete(); } } break; } } ================================================ FILE: ai/final_battle/balcony.fdh ================================================ //hash:3e8a2223 //automatically generated by Makegen /* located in game.cpp */ //------------[referenced from ai/final_battle/balcony.cpp]----------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //------------[referenced from ai/final_battle/balcony.cpp]----------// Object *CreateObject(int x, int y, int type); /* located in trig.cpp */ //------------[referenced from ai/final_battle/balcony.cpp]----------// void ThrowObjectAtAngle(Object *o, uint8_t angle, int speed); /* located in ai/ai.cpp */ //------------[referenced from ai/final_battle/balcony.cpp]----------// Object *SpawnObjectAtActionPoint(Object *o, int otype); /* located in ai/final_battle/balcony.cpp */ //------------[referenced from ai/final_battle/balcony.cpp]----------// void ai_helicopter(Object *o); void ai_helicopter_blade(Object *o); void ai_igor_balcony(Object *o); void ai_falling_block_spawner(Object *o); void ai_falling_block(Object *o); /* located in ai/sym/smoke.cpp */ //------------[referenced from ai/final_battle/balcony.cpp]----------// void SmokeSide(Object *o, int nclouds, int dir); /* located in sound/sound.cpp */ //------------[referenced from ai/final_battle/balcony.cpp]----------// void sound(int snd); /* located in common/misc.cpp */ //------------[referenced from ai/final_battle/balcony.cpp]----------// int random(int min, int max); ================================================ FILE: ai/final_battle/doctor.cpp ================================================ #include "../stdai.h" #include "doctor.h" #include "doctor.fdh" /* From King's Table, here's the Doctor's first form. He teleports around the room firing red wave shots at you with the Red Crystal following him. After every fourth teleport, he substitutes the wave attack for a aerial "explosion" of bouncy red shots (OBJ_DOCTOR_BLAST). */ INITFUNC(AIRoutines) { ONTICK(OBJ_BOSS_DOCTOR, ai_boss_doctor); AFTERMOVE(OBJ_RED_CRYSTAL, aftermove_red_crystal); ONTICK(OBJ_DOCTOR_SHOT, ai_doctor_shot); ONTICK(OBJ_DOCTOR_SHOT_TRAIL, ai_doctor_shot_trail); ONTICK(OBJ_DOCTOR_BLAST, ai_doctor_blast); ONTICK(OBJ_DOCTOR_CROWNED, ai_doctor_crowned); } /* void c------------------------------() {} */ void ai_boss_doctor(Object *o) { //AIDEBUG; /*if (o->state > 2 && o->state < 500) { o->state = 937; StartScript(410); return; }*/ switch(o->state) { case 0: { o->y += (8 << CSF); o->frame = 3; o->state = 1; o->BringToFront(); // make sure in front of doctor_crowned crystal_tofront = true; // make sure front crystal is in front of us } break; case 2: // transforming (script) { o->timer++; o->frame = (o->timer & 2) ? 0 : 3; if (o->timer > 50) o->state = 10; } break; case 10: // base state/falling (script) { o->yinertia += 0x80; o->flags |= FLAG_SHOOTABLE; o->damage = 3; if (o->blockd) { o->state = 20; o->timer = 0; o->frame = 0; o->savedhp = o->hp; FACEPLAYER; } } break; // fire wave shot case 20: { o->timer++; if (o->timer < 50) { if ((o->hp - o->savedhp) > 20) o->timer = 50; } if (o->timer == 50) { // arm across chest FACEPLAYER; o->frame = 4; } if (o->timer == 80) { Object *shot; o->frame = 5; // arm cast out shot = SpawnObjectAtActionPoint(o, OBJ_DOCTOR_SHOT); shot->dir = o->dir; shot->angle = 0; shot = SpawnObjectAtActionPoint(o, OBJ_DOCTOR_SHOT); shot->dir = o->dir; shot->angle = 0x80; sound(SND_FUNNY_EXPLODE); } if (o->timer == 120) o->frame = 0; // arm down if (o->timer > 130) { if ((o->hp - o->savedhp) > 50) { o->state = 100; o->timer = 0; } if (o->timer > 160) { o->state = 100; o->timer = 0; } } } break; // big "explosion" blast case 30: { o->state = 31; o->timer = 0; o->frame = 6; o->xmark = o->x; o->flags |= FLAG_SHOOTABLE; } case 31: { o->x = o->xmark; if (++o->timer & 2) o->x += (1 << CSF); if (o->timer > 50) { o->state = 32; o->timer = 0; o->frame = 7; sound(SND_LIGHTNING_STRIKE); for(int angle=8;angle<256;angle+=16) { Object *shot = SpawnObjectAtActionPoint(o, OBJ_DOCTOR_BLAST); ThrowObjectAtAngle(shot, angle, 0x400); } } } break; case 32: // after blast { if (++o->timer > 50) o->state = 100; } break; // teleport away case 100: { o->state = 101; o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; dr_tp_out_init(o); } case 101: { if (dr_tp_out(o)) { o->state = 102; o->timer = 0; o->invisible = true; // decide where we're going to go now, so the red crystal // can start moving towards it. But, it's important not to // actually move until the last possible second, or we could // drag our floattext along with us (and give away our position). o->xmark = (random(5, 35) * TILE_W) << CSF; o->ymark = (random(5, 7) * TILE_H) << CSF; } } break; case 102: // invisible: waiting to reappear { if (++o->timer > 40) { o->state = 103; o->timer = 16; o->frame = 2; o->yinertia = 0; o->x = o->xmark; o->y = o->ymark; FACEPLAYER; } } break; // tp back in case 103: { o->state++; dr_tp_in_init(o); } case 104: { if (dr_tp_in(o)) { o->flags |= FLAG_SHOOTABLE; o->damage = 3; if (++o->timer2 >= 4) { // big explode o->timer2 = 0; o->state = 30; } else { // another wave shot o->state = 10; } } } break; // defeated! case 500: { o->flags &= ~FLAG_SHOOTABLE; o->frame = 6; // fall to earth o->yinertia += 0x10; if (o->blockd && o->yinertia >= 0) { o->state = 501; o->timer = 0; o->xmark = o->x; FACEPLAYER; } } break; case 501: // flashing (transforming into Doctor 2) { FACEPLAYER; o->frame = 8; o->x = o->xmark; if (!(++o->timer & 2)) o->x += (1 << CSF); } break; } // enable per-frame bbox COPY_PFBOX; // set crystal follow position if (o->state >= 10) { if (o->invisible) // teleporting { crystal_xmark = o->xmark; crystal_ymark = o->ymark; } else { crystal_xmark = o->x; crystal_ymark = o->y; } } LIMITY(0x5ff); } /* void c------------------------------() {} */ // wave shot void ai_doctor_shot(Object *o) { if (o->x < 0 || o->x > ((map.xsize * TILE_W) << CSF)) { o->Delete(); return; } switch(o->state) { case 0: { o->state = 1; o->xmark = o->x; o->ymark = o->y; } case 1: { // distance apart from each other if (o->timer2 < 128) o->timer2++; // spin o->angle += 6; // travel o->speed += (o->dir == LEFT) ? -0x15 : 0x15; o->xmark += o->speed; o->x = o->xmark + (xinertia_from_angle(o->angle, o->timer2<y = o->ymark + (yinertia_from_angle(o->angle, o->timer2<x, o->y, OBJ_DOCTOR_SHOT_TRAIL); trail->sprite = SPR_DOCTOR_SHOT; trail->frame = 1; trail->PushBehind(o); } break; } } void ai_doctor_shot_trail(Object *o) { ANIMATE_FWD(3); if (o->frame > 3) o->Delete(); } // from his "explosion" attack void ai_doctor_blast(Object *o) { // they're bouncy if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0)) { o->xinertia = -o->xinertia; } if (o->blockd && o->yinertia > 0) o->yinertia = -0x200; if (o->blocku && o->yinertia < 0) o->yinertia = 0x200; ANIMATE(0, 0, 1); if ((++o->timer % 4) == 1) CreateObject(o->x, o->y, OBJ_DOCTOR_SHOT_TRAIL)->PushBehind(o); if (o->timer > 250) o->Delete(); } /* void c------------------------------() {} */ // The Doctor's red crystal. // There are actually two, one is behind him and one is in front // and they alternate visibility as they spin around him so it looks 3D. // // This function has to be an aftermove, otherwise, because one is in front // and the other behind, one will be checking crystal_xmark before the Doctor // updates it, and the other afterwards, and they will get out of sync. void aftermove_red_crystal(Object *o) { ANIMATE(3, 0, 1); switch(o->state) { case 0: { if (crystal_xmark != 0) { o->state = 1; crystal_tofront = true; } } break; case 1: { o->xinertia += (o->x < crystal_xmark) ? 0x55 : -0x55; o->yinertia += (o->y < crystal_ymark) ? 0x55 : -0x55; LIMITX(0x400); LIMITY(0x400); if ((o->dir == LEFT && o->xinertia > 0) || \ (o->dir == RIGHT && o->xinertia < 0)) { o->invisible = true; } else { o->invisible = false; } } break; } if (crystal_tofront && o->dir == LEFT) { o->BringToFront(); crystal_tofront = false; } } /* void c------------------------------() {} */ // doctor as npc before fight void ai_doctor_crowned(Object *o) { switch(o->state) { case 0: { // do this manually instead of a spawn point, // cause he's gonna transform. o->x -= (8 << CSF); o->y -= (16 << CSF); o->state = 1; crystal_xmark = crystal_ymark = 0; crystal_tofront = true; } case 1: // faces away { o->frame = 0; } break; case 10: // goes "ho ho ho" (while still facing away) { o->frame = 0; o->animtimer = 0; o->timer = 0; o->state = 11; } case 11: { ANIMATE(5, 0, 1); // he has to show shrug frame exactly 6 times. // ANIMATE(5) changes frame on every 6th tick // so this is 6*6*nframes(2) = 72 if (++o->timer >= 72) o->state = 1; } break; case 20: // turns around (faces screen instead of away) { o->state = 21; o->frame = 2; } break; case 40: // arm up--presents red crystal { o->state = 41; // spawn the red crystal // one is for when it's behind him, the other is in front. int x = o->x - (6 << CSF); int y = o->y - (8 << CSF); dr_create_red_crystal(x, y); } case 41: { o->frame = 4; } break; case 50: // "ho ho ho" (while facing player) { o->frame = 4; o->animtimer = 0; o->timer = 0; o->state = 51; } case 51: { ANIMATE(5, 4, 5); if (++o->timer >= 72) o->state = 41; } break; } } ================================================ FILE: ai/final_battle/doctor.fdh ================================================ //hash:40ec33bf //automatically generated by Makegen /* located in ObjManager.cpp */ //------------[referenced from ai/final_battle/doctor.cpp]-----------// Object *CreateObject(int x, int y, int type); /* located in trig.cpp */ //------------[referenced from ai/final_battle/doctor.cpp]-----------// void ThrowObjectAtAngle(Object *o, uint8_t angle, int speed); int xinertia_from_angle(uint8_t angle, int speed); int yinertia_from_angle(uint8_t angle, int speed); /* located in ai/ai.cpp */ //------------[referenced from ai/final_battle/doctor.cpp]-----------// Object *SpawnObjectAtActionPoint(Object *o, int otype); /* located in ai/final_battle/doctor.cpp */ //------------[referenced from ai/final_battle/doctor.cpp]-----------// void ai_boss_doctor(Object *o); void ai_doctor_shot(Object *o); void ai_doctor_shot_trail(Object *o); void ai_doctor_blast(Object *o); void aftermove_red_crystal(Object *o); void ai_doctor_crowned(Object *o); /* located in ai/final_battle/doctor_common.cpp */ //------------[referenced from ai/final_battle/doctor.cpp]-----------// void dr_tp_out_init(Object *o); bool dr_tp_out(Object *o); void dr_tp_in_init(Object *o); bool dr_tp_in(Object *o); Object *dr_create_red_crystal(int x, int y); /* located in sound/sound.cpp */ //------------[referenced from ai/final_battle/doctor.cpp]-----------// void sound(int snd); /* located in common/misc.cpp */ //------------[referenced from ai/final_battle/doctor.cpp]-----------// int random(int min, int max); ================================================ FILE: ai/final_battle/doctor.h ================================================ #ifndef _DOCTOR_H #define _DOCTOR_H extern int crystal_xmark, crystal_ymark; extern bool crystal_tofront; #endif ================================================ FILE: ai/final_battle/doctor_common.cpp ================================================ #include "../stdai.h" #include "doctor_common.fdh" int crystal_xmark, crystal_ymark; bool crystal_tofront; Object *dr_create_red_crystal(int x, int y) { Object *upper_xtal; // we have to create these with the one which will bring itself to front // already having higher zorder (create it 2nd), because the code to // run aftermoves currently doesn't create a list first and so running // BringToFront from an aftermove can cause it's AI to be executed twice. CreateObject(x, y, OBJ_RED_CRYSTAL)->dir = RIGHT; (upper_xtal = CreateObject(x, y, OBJ_RED_CRYSTAL))->dir = LEFT; return upper_xtal; } /* void c------------------------------() {} */ void dr_tp_out_init(Object *o) { o->ResetClip(); o->clip_enable = true; sound(SND_TELEPORT); o->shaketime = 0; // show any waiting damage numbers NOW } bool dr_tp_out(Object *o) { o->clipy1 += 2; o->clipy2 -= 2; if (o->clipy1 >= o->clipy2) { o->clip_enable = false; o->invisible = true; return true; } return false; } /* void c------------------------------() {} */ void dr_tp_in_init(Object *o) { o->clipy1 = o->clipy2 = (sprites[o->sprite].h / 2); o->clip_enable = true; o->invisible = false; } bool dr_tp_in(Object *o) { o->clipy1 -= 2; o->clipy2 += 2; if (o->clipy1 <= 0 || o->clipy2 >= sprites[o->sprite].h) { o->clip_enable = false; o->ResetClip(); return true; } return false; } ================================================ FILE: ai/final_battle/doctor_common.fdh ================================================ //hash:aec4f409 //automatically generated by Makegen /* located in ObjManager.cpp */ //---------[referenced from ai/final_battle/doctor_common.cpp]-------// Object *CreateObject(int x, int y, int type); /* located in ai/final_battle/doctor_common.cpp */ //---------[referenced from ai/final_battle/doctor_common.cpp]-------// Object *dr_create_red_crystal(int x, int y); void dr_tp_out_init(Object *o); bool dr_tp_out(Object *o); void dr_tp_in_init(Object *o); bool dr_tp_in(Object *o); /* located in sound/sound.cpp */ //---------[referenced from ai/final_battle/doctor_common.cpp]-------// void sound(int snd); ================================================ FILE: ai/final_battle/doctor_frenzied.cpp ================================================ #include "../stdai.h" #include "doctor.h" #include "doctor_frenzied.fdh" enum STATES { // 0-9 are used by in-game scripts during intro // 500+ is triggered for defeat sequence STATE_BASE = 10, // fall; once on ground for a moment pick next attack STATE_JUMP = 20, // jumps at player STATE_JUMP_WITH_GP = 30, // taller jump and enable "ground pound" STATE_IN_AIR = 40, // in air STATE_IN_AIR_WITH_GP = 50, // in air and will "ground pound" if passes over player STATE_LANDED = 60, // landed from a jump STATE_RED_DASH = 70, // red dash; try to hit player with elbow STATE_MEGA_BATS = 80, // arms out & spawn mega bats STATE_TELEPORT = 90, // teleport away and reappear over players head STATE_DEFEATED = 500, // script constant STATE_DISSOLVE = 510 // also scripted }; #define DAMAGE_NORMAL 5 #define DAMAGE_RED_DASH 10 // the Doctor repeats this series of attacks over and over, // when he reaches the -1, it starts over at the beginning. static const int attack_pattern[] = { STATE_JUMP_WITH_GP, STATE_TELEPORT, STATE_RED_DASH, STATE_JUMP, STATE_JUMP, STATE_RED_DASH, STATE_TELEPORT, STATE_MEGA_BATS, STATE_JUMP_WITH_GP, STATE_JUMP, STATE_JUMP, -1 }; INITFUNC(AIRoutines) { ONTICK(OBJ_BOSS_DOCTOR_FRENZIED, ai_boss_doctor_frenzied); ONTICK(OBJ_DOCTOR_BAT, ai_doctor_bat); } /* void c------------------------------() {} */ void ai_boss_doctor_frenzied(Object *o) { //AIDEBUG; switch(o->state) { // fight begin/base state case STATE_BASE: { o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; o->xinertia = 0; o->frame = 1; o->timer = 0; o->animtimer = 0; o->savedhp = o->hp; o->state++; } case STATE_BASE+1: { o->yinertia += 0x80; FACEPLAYER; // select frame if (o->frame == 6) // arms out { // must have done "redsplode" attack; leave alone for the duration } else if (!o->blockd) { // falling o->frame = 4; } else { // panting animation ANIMATE(10, 1, 2); // "redsplode" attack if possible if ((o->savedhp - o->hp) > 20) { if (pdistlx(48<blockd) do_redsplode(o); } } // after a moment select next attack in the loop if (++o->timer > 30 || (o->savedhp - o->hp) > 20) { o->state = attack_pattern[o->timer2]; o->timer = 0; // move to next state if (attack_pattern[++o->timer2] == -1) o->timer2 = 0; } } break; } run_jumps(o); run_red_dash(o); run_mega_bats(o); run_teleport(o); run_init(o); run_defeat(o); if (o->state < STATE_DISSOLVE) run_red_drip(o); // set crystal follow position // still set it on first 2 DEFEATED states (falling to ground) // but not after that (alert: this seems pretty damn bug prone, fixme) if (o->state >= STATE_BASE && o->state <= STATE_DEFEATED+1) { if (o->invisible) // in middle of teleport: after tp out, before tp in { crystal_xmark = o->xmark; crystal_ymark = o->ymark; } else { crystal_xmark = o->x; crystal_ymark = o->y; } } if (o->yinertia > 0x5ff) o->yinertia = 0x5ff; } static void run_jumps(Object *o) { switch(o->state) { // jump at player case STATE_JUMP: { o->frame = 3; FACEPLAYER; if (++o->timer > 20) { o->state = STATE_IN_AIR; o->frame = 4; o->animtimer = 0; o->yinertia = -0x600; XMOVE(0x400); } } break; // slight taller jump with no delay, and can "ground pound" case STATE_JUMP_WITH_GP: { FACEPLAYER; o->state = STATE_IN_AIR_WITH_GP; o->frame = 4; o->animtimer = 0; o->yinertia = -0x800; XMOVE(0x400); } break; case STATE_IN_AIR: // in air (normal) case STATE_IN_AIR_WITH_GP: // in air; can "ground pound" if we pass over player { ANIMATE(1, 4, 5); o->yinertia += 0x40; if (o->state == STATE_IN_AIR_WITH_GP) { if (pdistlx(8<y >= o->y) { o->xinertia = 0; o->yinertia = 0x5ff; o->state = STATE_IN_AIR; } } else { FACEPLAYER; } if (o->blockd && o->yinertia > 0) o->state = STATE_LANDED; } break; // landed from jump case STATE_LANDED: { o->frame = 3; quake(10); o->timer = 0; o->state++; } case STATE_LANDED+1: { o->yinertia += 0x80; o->xinertia *= 7; o->xinertia /= 8; if (++o->timer > 10) o->state = STATE_BASE; } break; } } /* void c------------------------------() {} */ // flashing red elbow dash static void run_red_dash(Object *o) { switch(o->state) { // prepare to dash case STATE_RED_DASH: { o->frame = 3; // crouch down; look mean o->flags |= (FLAG_SOLID_MUSHY | FLAG_INVULNERABLE); o->timer = 0; o->state++; } case STATE_RED_DASH+1: { if (++o->timer > 20) { o->frame = 7; // elbow-out dash frame o->timer = 0; o->state++; sound(SND_FUNNY_EXPLODE); XMOVE(0x5ff); o->damage = DAMAGE_RED_DASH; o->flags |= FLAG_NOREARTOPATTACK; o->yinertia = 0; // he does not fall during dash } } break; // doing red dash case STATE_RED_DASH+2: { // flash red o->timer++; o->frame = (o->timer & 2) ? 7 : 8; // time to stop? if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0) || \ o->timer > 30) { if (o->timer > 30) // stopped because timeout o->state++; else // stopped because hit a wall o->state = STATE_JUMP; o->flags &= ~(FLAG_SOLID_MUSHY | FLAG_NOREARTOPATTACK | FLAG_INVULNERABLE); o->damage = DAMAGE_NORMAL; o->timer = 0; } } break; // dash ending due to timeout case STATE_RED_DASH+3: { o->yinertia += 0x80; o->frame = 3; o->xinertia *= 7; o->xinertia /= 8; if (++o->timer > 10) o->state = STATE_BASE; } break; } } // arms thrust out, spawn oodles of bouncing bats static void run_mega_bats(Object *o) { switch(o->state) { case STATE_MEGA_BATS: { o->state++; o->timer = 0; } case STATE_MEGA_BATS+1: { o->frame = 6; o->timer++; if (o->timer > 20 && (o->timer % 3) == 1) { Object *bat = CreateObject(o->x + (8<y - (4<xinertia = random(0x400, 0x800); bat->yinertia = random(-0x200, 0x200); bat->dir = o->dir; if (o->dir == LEFT) { bat->x -= (16 << CSF); bat->xinertia = -bat->xinertia; } sound(SND_EM_FIRE); } if (o->timer > 90) o->state = STATE_BASE; } break; } } // teleport away and return static void run_teleport(Object *o) { switch(o->state) { case STATE_TELEPORT: { o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; o->state++; dr_tp_out_init(o); } case STATE_TELEPORT+1: { if (dr_tp_out(o)) { o->state++; o->timer = 0; // mark the location above player's head where we'll reappear o->xmark = player->x; o->ymark = player->y - (32<xmark < TP_X_MIN) o->xmark = TP_X_MIN; if (o->xmark > TP_X_MAX) o->xmark = TP_X_MAX; if (o->ymark < TP_Y_MIN) o->ymark = TP_Y_MIN; } } break; // invisible...waiting to reappear case STATE_TELEPORT+2: { if (++o->timer > 40) { o->x = o->xmark; o->y = o->ymark; o->frame = 4; FACEPLAYER; o->state++; } } break; // reappear case STATE_TELEPORT+3: { dr_tp_in_init(o); o->yinertia = 0; o->state++; } case STATE_TELEPORT+4: { if (dr_tp_in(o)) { o->flags |= FLAG_SHOOTABLE; o->damage = DAMAGE_NORMAL; o->xinertia = 0; o->yinertia = -0x200; o->state = STATE_IN_AIR; } } break; } } /* void c------------------------------() {} */ // initilization/transformation animation and "prepare to fight" states. // this are of course all script-triggered and need to stay constant. static void run_init(Object *o) { switch(o->state) { case 0: { // put ourselves at correct position over the other doctor o->dir = (crystal_xmark > player->x) ? LEFT : RIGHT; o->x = crystal_xmark + ((o->dir == RIGHT) ? (6<y = crystal_ymark; // make sure we're front of other doctor o->BringToFront(); // make sure front crystal is in front of us crystal_tofront = true; // because we moved our x/y directly o->UpdateBlockStates(ALLDIRMASK); o->state = 1; } case 1: // appearing/transforming { o->yinertia += 0x80; o->timer++; o->frame = (o->timer & 2) ? 0 : 3; } break; // standing idle & panting // this state doesn't seem to ever be used; // AFAIK can only be triggered by modifying the script. case 5: { o->frame = 1; o->animtimer = 0; o->state = 6; } case 6: { o->yinertia += 0x80; ANIMATE(30, 1, 2); } break; case 7: // prepare-to-fight pause { o->state = 8; o->timer = 0; o->frame = 3; } case 8: { o->yinertia += 0x40; if (++o->timer > 40) o->state = STATE_BASE; } break; } } // defeated states and animation static void run_defeat(Object *o) { switch(o->state) { // Defeated! case STATE_DEFEATED: { KillObjectsOfType(OBJ_DOCTOR_BAT); o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; o->frame = 4; o->xinertia = 0; o->state++; } case STATE_DEFEATED+1: // wait till we hit ground { o->yinertia += 0x20; if (o->blockd && o->yinertia > 0) { o->state++; o->timer = 0; o->xmark = o->x; FACEPLAYER; } } break; // shaking (script tells us when to stop) case STATE_DEFEATED+2: { o->frame = 9; o->timer++; o->x = o->xmark; if (!(o->timer & 2)) o->x += (1 << CSF); } break; // dissolve into red energy // we already did this once before; think Pooh Black. case STATE_DISSOLVE: { o->frame = 9; o->x = o->xmark; o->ResetClip(); o->clip_enable = true; o->state++; o->timer = 0; } case STATE_DISSOLVE+1: { o->timer++; // shaking o->x = o->xmark; if (!(o->timer & 2)) o->x += (1 << CSF); game.quaketime = 2; // sound if ((o->timer % 6) == 3) sound(SND_FUNNY_EXPLODE); // move energy spawn point if (++o->timer2 >= 8) { o->timer2 = 0; o->clipy1++; if (o->clipy1 >= sprites[o->sprite].h) o->invisible = true; } // spawn copious amount of energy for(int i=0;i<3;i++) { int x, y; x = o->x + (random(-16, 16) << CSF); y = (o->y - o->DrawPointY()) + (o->clipy1 << CSF); Object *drip = CreateObject(x, y, OBJ_RED_ENERGY); drip->xinertia = random(-0x200, 0x200); drip->yinertia = random(-0x400, 0); drip->angle = DOWN; // otherwise during the last few frames they'll get stuck in the floor // (they still delete themselves once they hit the floor, just are // able to come up out of it then back down during last few moments). drip->flags |= FLAG_IGNORE_SOLID; } // he doesn't take up the entire height of the sprite, // so we stop a little bit early. if (o->clipy1 >= 44) { o->invisible = true; o->frame = 0; o->state++; } } break; // script: crystal up and away case 520: { crystal_ymark = -(32 << CSF); } break; } } /* void c------------------------------() {} */ // this is a lesser-seen attack in which he pushes you away amongst // a shower of red sparks. To trigger it, immediately after he lands // you must walk directly up to him and deal more than 20 damage. static void do_redsplode(Object *o) { // arms out full o->frame = 6; FACEPLAYER; player->yinertia = -0x400; player->xinertia = (o->x > player->x) ? -0x5ff : 0x5ff; hurtplayer(5); quake(10); // big shower of red energy for(int i=0;i<100;i++) { int x = o->x + (random(-16, 16) << CSF); int y = o->y + (random(-16, 16) << CSF); Object *spark = CreateObject(x, y, OBJ_RED_ENERGY); spark->xinertia = random(-0x600, 0x600); spark->yinertia = random(-0x600, 0x600); spark->angle = DOWN; } } /* void c------------------------------() {} */ // the red energy that oozes off of him during most of the battle static void run_red_drip(Object *o) { if (random(0, 3) == 2) { int x = o->x + (random(-16, 16) << CSF); int y = o->y + (random(-8, 4) << CSF); Object *drip = CreateObject(x, y, OBJ_RED_ENERGY); drip->xinertia = o->xinertia; drip->angle = DOWN; } } /* void c------------------------------() {} */ void ai_doctor_bat(Object *o) { ANIMATE(2, 0, 2); if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0)) { o->dir ^= 1; o->xinertia = -o->xinertia; } else if ((o->blocku && o->yinertia < 0) || \ (o->blockd && o->yinertia > 0)) { o->yinertia = -o->yinertia; } } ================================================ FILE: ai/final_battle/doctor_frenzied.fdh ================================================ //hash:2211b55e //automatically generated by Makegen /* located in game.cpp */ //--------[referenced from ai/final_battle/doctor_frenzied.cpp]------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //--------[referenced from ai/final_battle/doctor_frenzied.cpp]------// Object *CreateObject(int x, int y, int type); /* located in player.cpp */ //--------[referenced from ai/final_battle/doctor_frenzied.cpp]------// void hurtplayer(int damage); /* located in ai/ai.cpp */ //--------[referenced from ai/final_battle/doctor_frenzied.cpp]------// void KillObjectsOfType(int type); /* located in ai/final_battle/doctor_frenzied.cpp */ //--------[referenced from ai/final_battle/doctor_frenzied.cpp]------// void ai_boss_doctor_frenzied(Object *o); static void run_jumps(Object *o); static void run_red_dash(Object *o); static void run_mega_bats(Object *o); static void run_teleport(Object *o); static void run_init(Object *o); static void run_defeat(Object *o); static void do_redsplode(Object *o); static void run_red_drip(Object *o); void ai_doctor_bat(Object *o); /* located in ai/final_battle/doctor_common.cpp */ //--------[referenced from ai/final_battle/doctor_frenzied.cpp]------// void dr_tp_out_init(Object *o); bool dr_tp_out(Object *o); void dr_tp_in_init(Object *o); bool dr_tp_in(Object *o); /* located in sound/sound.cpp */ //--------[referenced from ai/final_battle/doctor_frenzied.cpp]------// void sound(int snd); /* located in common/misc.cpp */ //--------[referenced from ai/final_battle/doctor_frenzied.cpp]------// int random(int min, int max); ================================================ FILE: ai/final_battle/final_misc.cpp ================================================ #include "../stdai.h" #include "final_misc.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_MIMIGA_CAGED, ai_mimiga_caged); ONTICK(OBJ_CHIE_CAGED, ai_mimiga_caged); ONTICK(OBJ_CHACO_CAGED, ai_mimiga_caged); ONTICK(OBJ_SANTA_CAGED, ai_mimiga_caged); ONTICK(OBJ_DOCTOR_GHOST, ai_doctor_ghost); ONTICK(OBJ_RED_ENERGY, ai_red_energy); } /* void c------------------------------() {} */ // The Doctor in his red energy form. // there is no "move" state, when he takes over Misery, // the object is moved kind of unconventionally, using an state) { case 10: { o->state = 11; o->timer = 0; } case 11: { Object *r = CreateObject(o->x, o->y+(128<angle = RIGHT; r->linkedobject = o; if (++o->timer > 150) o->state++; } break; case 20: { o->state = 21; o->timer = 0; } case 21: { if (++o->timer > 250) DeleteObjectsOfType(OBJ_RED_ENERGY); } break; } } // red energy for doctor. In a completely different role, // it's also used for the dripping blood from Ballos's final form. void ai_red_energy(Object *o) { switch(o->angle) { case UP: { o->yinertia -= 0x40; if (o->blocku && o->yinertia < 0) o->Delete(); } break; case DOWN: { o->yinertia += 0x40; if (o->blockd && o->yinertia > 0) o->Delete(); if (++o->timer > 50) o->Delete(); if (o->yinertia > 0x5ff) o->yinertia = 0x5ff; } break; case RIGHT: { if (!o->linkedobject) { o->Delete(); return; } if (o->state == 0) { o->state = 1; o->flags |= FLAG_IGNORE_SOLID; o->xinertia = random(-0x600, 0x600); o->yinertia = random(-0x600, 0x600); // accel speed o->speed = (512 / random(16, 51)); // x/y limit int limit = random(0x80, 0x100); o->timer2 = (limit * 2); // x limit o->timer3 = (limit * 3); // y limit (form elongated sphere) } int tgtx = o->linkedobject->x + (4<x < tgtx) o->xinertia += o->speed; else if (o->x > tgtx) o->xinertia -= o->speed; if (o->y < o->linkedobject->y) o->yinertia += o->speed; else if (o->y > o->linkedobject->y) o->yinertia -= o->speed; LIMITX(o->timer2); LIMITY(o->timer3); } } o->frame = random(0, 1); } /* void c------------------------------() {} */ void ai_mimiga_caged(Object *o) { switch(o->state) { case 0: { o->state = 1; o->x -= (1 << CSF); o->y -= (2 << CSF); switch(o->type) { case OBJ_CHIE_CAGED: o->sprite = SPR_CHIE; break; case OBJ_CHACO_CAGED: o->sprite = SPR_CHACO; break; case OBJ_SANTA_CAGED: o->sprite = SPR_SANTA; o->x += (2 << CSF); break; default: o->sprite = SPR_MIMIGA_CAGED; o->x += (2 << CSF); break; } } case 1: { o->frame = 0; randblink(o, 1, 12, 160); if (o->frame == 0) FACEPLAYER; } break; case 10: // blush and spawn heart { o->state = 11; o->frame = 2; Object *h = CreateObject(o->x, o->y-(16<state = 1; // not map-spawned (disappear after a moment) } case 11: { FACEPLAYER; } break; } } ================================================ FILE: ai/final_battle/final_misc.fdh ================================================ //hash:1c3a2075 //automatically generated by Makegen /* located in ObjManager.cpp */ //----------[referenced from ai/final_battle/final_misc.cpp]---------// Object *CreateObject(int x, int y, int type); /* located in ai/ai.cpp */ //----------[referenced from ai/final_battle/final_misc.cpp]---------// void DeleteObjectsOfType(int type); void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in ai/final_battle/final_misc.cpp */ //----------[referenced from ai/final_battle/final_misc.cpp]---------// void ai_doctor_ghost(Object *o); void ai_red_energy(Object *o); void ai_mimiga_caged(Object *o); /* located in common/misc.cpp */ //----------[referenced from ai/final_battle/final_misc.cpp]---------// int random(int min, int max); ================================================ FILE: ai/final_battle/misery.fdh ================================================ //hash:4f319d7c //automatically generated by Makegen /* located in ObjManager.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); void ThrowObjectAtPlayer(Object *o, int rand_variance, int speed); int xinertia_from_angle(uint8_t angle, int speed); int yinertia_from_angle(uint8_t angle, int speed); /* located in ai/ai.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// void randblink(Object *o, int blinkframe, int blinktime, int prob); void KillObjectsOfType(int type); /* located in ai/final_battle/misery.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// void ai_boss_misery(Object *o); static void run_spells(Object *o); static void run_teleport(Object *o); static void run_intro(Object *o); static void run_defeated(Object *o); static Object *CreateRing(Object *o, uint8_t angle); void ai_misery_ring(Object *o); void aftermove_misery_ring(Object *o); void ai_misery_phase(Object *o); void ai_misery_ball(Object *o); void ai_black_lightning(Object *o); /* located in ai/final_battle/doctor_frenzied.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// static void run_teleport(Object *o); /* located in ai/hell/ballos_priest.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// static void run_intro(Object *o); static void run_defeated(Object *o); /* located in ai/sym/smoke.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// void sound(int snd); /* located in common/misc.cpp */ //------------[referenced from ai/final_battle/misery.cpp]-----------// int random(int min, int max); ================================================ FILE: ai/final_battle/misery_battle.cpp ================================================ #include "../stdai.h" #include "misery.fdh" #define STATE_FIGHTING 100 // script-triggered, must be constant #define STATE_FLASH_FOR_SPELL 200 // flashes then casts either FIRE_SHOTS or SUMMON_BLOCk #define STATE_FIRE_SHOTS 210 // fires black shots at player #define STATE_SUMMON_BLOCK 220 // summons falling block over player's head #define STATE_SUMMON_BALLS 230 // summons black-lightning balls #define STATE_TP_AWAY 240 // teleports away then reappears #define STATE_DEFEATED 1000 // script-triggered, must be constant INITFUNC(AIRoutines) { ONTICK(OBJ_BOSS_MISERY, ai_boss_misery); ONTICK(OBJ_MISERY_PHASE, ai_misery_phase); ONTICK(OBJ_MISERY_SHOT, ai_generic_angled_shot); ONTICK(OBJ_MISERY_RING, ai_misery_ring); AFTERMOVE(OBJ_MISERY_RING, aftermove_misery_ring); ONTICK(OBJ_MISERY_BALL, ai_misery_ball); ONTICK(OBJ_BLACK_LIGHTNING, ai_black_lightning); } /* void c------------------------------() {} */ void ai_boss_misery(Object *o) { /*debug("state: %d", o->state); debug("timer: %d", o->timer); debug("timer2: %d", o->timer2);*/ switch(o->state) { // fight begin and default/base state case STATE_FIGHTING: { o->flags |= FLAG_SHOOTABLE; o->savedhp = o->hp; o->timer = 0; o->frame = 0; o->xinertia = 0; o->state++; } case STATE_FIGHTING+1: { FACEPLAYER; o->yinertia += (o->y < o->ymark) ? 0x20 : -0x20; LIMITY(0x200); if (++o->timer > 200 || (o->hp - o->savedhp) >= 80) { o->state = STATE_FLASH_FOR_SPELL; o->timer = 0; } } break; } run_spells(o); run_teleport(o); run_intro(o); run_defeated(o); LIMITX(0x200); LIMITY(0x400); } // her 3 attacks: black shots, black balls, and summon falling block. static void run_spells(Object *o) { switch(o->state) { // flashes for spell... // then either fires shots or casts the falling-block spell case STATE_FLASH_FOR_SPELL: { o->flags &= ~FLAG_SHOOTABLE; o->xinertia = 0; o->yinertia = 0; o->timer = 0; o->state++; } case STATE_FLASH_FOR_SPELL+1: { o->timer++; o->frame = 5 + (o->timer & 1); if (o->timer > 30) { o->timer = 0; o->frame = 4; if (++o->timer2 >= 3) { o->state = STATE_SUMMON_BLOCK; o->timer2 = 0; } else { o->state = STATE_FIRE_SHOTS; } } } break; // fire black shots at player case STATE_FIRE_SHOTS: { if ((++o->timer % 6) == 0) { EmFireAngledShot(o, OBJ_MISERY_SHOT, 4, 0x800); sound(SND_FIREBALL); } if (o->timer > 30) { o->timer = 0; o->state = STATE_TP_AWAY; } } break; // summon falling block case STATE_SUMMON_BLOCK: { if (++o->timer == 10) { int x = player->x - (8 << CSF); int y = player->y - (64 << CSF); Object *block = CreateObject(x, y, OBJ_FALLING_BLOCK); block->sprite = SPR_BALCONY_BLOCK_LARGE; block->dir = DOWN; // tell block it was spawned by Misery } if (o->timer > 30) { o->state = STATE_TP_AWAY; o->timer = 0; } } break; // summon black balls case STATE_SUMMON_BALLS: { FACEPLAYER; o->frame = 4; o->timer = 0; o->state++; } case STATE_SUMMON_BALLS+1: { o->yinertia += (o->y < o->ymark) ? 0x20 : -0x20; LIMITY(0x200); if ((++o->timer % 24) == 0) { CreateObject(o->x, o->y+(4<timer > 72) { o->state = 100; o->timer = 0; } } break; } } // runs her teleport-away and reappear states. static void run_teleport(Object *o) { switch(o->state) { // teleport away, then reappear someplace else case STATE_TP_AWAY: { o->state++; o->timer = 0; o->invisible = true; o->flags &= ~FLAG_SHOOTABLE; CreateObject(o->x, o->y, OBJ_MISERY_PHASE)->dir = LEFT; CreateObject(o->x, o->y, OBJ_MISERY_PHASE)->dir = RIGHT; sound(SND_TELEPORT); } case STATE_TP_AWAY+1: { o->timer++; // it takes exactly 8 frames for the phase-in animation to complete if (o->timer == 42) { // we don't actually move until the last possible second // in order not to bring the floattext/damage numbers with us, // which gives away our position. o->xmark = (random(9, 31) * TILE_W) << CSF; o->ymark = (random(5, 7) * TILE_H) << CSF; CreateObject(o->xmark + 0x2000, o->ymark, OBJ_MISERY_PHASE)->dir = LEFT; CreateObject(o->xmark - 0x2000, o->ymark, OBJ_MISERY_PHASE)->dir = RIGHT; } else if (o->timer == 50) { // switch back to showing real misery instead of the phase-in effect o->flags |= FLAG_SHOOTABLE; o->invisible = false; o->frame = 0; o->dir = LEFT; o->x = o->xmark; o->y = o->ymark; // spawn rings if (o->hp < 340) { CreateRing(o, 0x00); CreateRing(o, 0x80); if (o->hp < 180) { CreateRing(o, 0x40); CreateRing(o, 0xC0); } } // after tp we can summon the black balls if the player // is far enough away from us that they won't immediately trigger if (abs(player->x - o->x) > 112<state = STATE_SUMMON_BALLS; } else { o->state = STATE_FIGHTING; } // setup sinusoidal hover, both of those possible states // are in-air states that do it. o->timer = 0; o->yinertia = -0x200; // counteracts yinertia of first visible frame, so it's a // seamless transition from the phase-in effect. o->y += 0x220; } } break; } } // intro states: stuff that happens before the fight actually starts. static void run_intro(Object *o) { switch(o->state) { case 0: { // fixes her position on throne; don't use a spawn point or it'll // glitch when she turns to misery_stand in defeated cinematic o->y += (6 << CSF); // her initial target height when fight begins o->ymark = (64 << CSF); o->state = 1; } case 1: { o->frame = 0; randblink(o); } break; case 20: // fall from throne (script-triggered) { o->yinertia += 0x40; if (o->blockd) { o->state = 21; o->frame = 2; } } break; case 21: // standing/talking after fall from throne { o->frame = 2; randblink(o, 3); } break; } } // defeated states--they're all run by the ondeath script. static void run_defeated(Object *o) { // these states are all script-triggered and must be constant. switch(o->state) { // defeated! "gaah" in air case 1000: { o->flags &= ~FLAG_SHOOTABLE; KillObjectsOfType(OBJ_MISERY_RING); SmokeClouds(o, 3, 2, 2); o->xinertia = 0; o->yinertia = 0; o->state = 1001; o->timer = 0; o->frame = 4; o->xmark = o->x; } case 1001: // shake until script tells us otherwise { o->x = o->xmark; if (++o->timer & 2) o->x += (1 << CSF); } break; case 1010: // fall to ground and do defeated frame: "ergh" { o->yinertia += 10; if (o->blockd) { o->frame = 7; o->state = 1011; } } break; } } /* void c------------------------------() {} */ static Object *CreateRing(Object *o, uint8_t angle) { Object *ring; ring = CreateObject(0, 0, OBJ_MISERY_RING); ring->angle = angle; ring->linkedobject = o; return ring; } void ai_misery_ring(Object *o) { if (!o->linkedobject) { SmokeClouds(o, 3, 2, 2); o->Delete(); return; } switch(o->state) { case 0: { o->state = 1; o->timer = 0; } case 1: { // distance from misery if (o->timer < 192) o->timer++; // turn to bats when misery teleports if (o->linkedobject->state >= STATE_TP_AWAY && \ o->linkedobject->state < STATE_TP_AWAY+10) { o->state = 10; } } break; case 10: // transform to bat { o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; ThrowObjectAtPlayer(o, 3, 0x200); FACEPLAYER; o->sprite = SPR_ORANGE_BAT_FINAL; o->state = 11; } case 11: { ANIMATE(4, 0, 2); if ((o->dir == LEFT && o->blockl) || \ (o->dir == RIGHT && o->blockr) || \ o->blocku || o->blockd) { SmokeClouds(o, 3, 2, 2); o->Delete(); } } break; } } void aftermove_misery_ring(Object *o) { if (o->state == 1 && o->linkedobject) { o->angle += 2; int dist = (o->timer << CSF) / 4; o->x = o->linkedobject->x + xinertia_from_angle(o->angle, dist); o->y = o->linkedobject->y + yinertia_from_angle(o->angle, dist); } } /* void c------------------------------() {} */ // this is her phasy teleport out/teleport in effect // it's a 2-dir interlaced picture of her with each dir // containing only half the lines. We spawn two objects // in opposite dirs and then separate them. void ai_misery_phase(Object *o) { XMOVE(0x400); if (++o->timer >= 8) o->Delete(); } void ai_misery_ball(Object *o) { switch(o->state) { case 0: { o->state = 1; o->ymark = o->y; o->xinertia = 0; o->yinertia = -0x200; } case 1: { ANIMATE(2, 0, 1); o->xinertia += (o->x < player->x) ? 0x10 : -0x10; o->yinertia += (o->y < o->ymark) ? 0x20 : -0x20; LIMITX(0x200); LIMITY(0x200); if (pdistlx(8<y > o->y) { o->state = 10; o->timer = 0; } } break; case 10: // black lightning { if (++o->timer > 10) { sound(SND_LIGHTNING_STRIKE); CreateObject(o->x, o->y, OBJ_BLACK_LIGHTNING); o->Delete(); } o->frame = (o->timer & 2) ? 2 : 1; } break; } } void ai_black_lightning(Object *o) { ANIMATE(0, 0, 1); o->yinertia = 0x1000; if (o->blockd) { effect(o->CenterX(), o->Bottom(), EFFECT_BOOMFLASH); SmokeXY(o->CenterX(), o->Bottom(), 3, o->Width()>>CSF, 4); o->Delete(); } } /* void c------------------------------() {} */ ================================================ FILE: ai/final_battle/sidekicks.cpp ================================================ #include "../stdai.h" #include "sidekicks.fdh" #define SUE_BASE 20 #define SUE_PREPARE_ATTACK 30 #define SUE_SOMERSAULT 40 #define SUE_DASH 50 #define SUE_SOMERSAULT_HIT 60 // both sue and misery #define SIDEKICK_CORE_DEFEATED 99 // core defeated (script-triggered) #define SIDEKICK_DEFEATED 100 // sidekick defeated #define SIDEKICK_CORE_DEFEATED_2 110 INITFUNC(AIRoutines) { ONTICK(OBJ_SUE_FRENZIED, ai_sue_frenzied); ONTICK(OBJ_MISERY_FRENZIED, ai_misery_frenzied); ONTICK(OBJ_MISERY_CRITTER, ai_misery_critter); ONTICK(OBJ_MISERY_BAT, ai_misery_bat); ONTICK(OBJ_MISERY_MISSILE, ai_misery_missile); } bool sue_being_hurt; bool sue_was_killed; /* void c------------------------------() {} */ void ai_misery_frenzied(Object *o) { //AIDEBUG; sidekick_run_defeated(o, 600); switch(o->state) { case 0: { o->state = 1; sue_being_hurt = sue_was_killed = false; o->savedhp = o->hp; o->nxflags |= NXFLAG_SLOW_X_WHEN_HURT; sound(SND_TELEPORT); o->timer = 1; } case 1: // transforming { o->timer++; if (o->timer == 2) { // frenzied o->sprite = SPR_MISERY_FRENZIED; o->frame = 9; o->x -= 0x1000; o->y -= 0x2000; } if (o->timer == 4) { // normal o->timer = 0; o->sprite = SPR_MISERY; o->frame = 2; o->x += 0x1000; o->y += 0x2000; } if (++o->timer2 >= 50) { o->timer2 = 0; o->state = 2; } } break; case 10: // hold at "being transformed" frame { o->state = 11; o->frame = 9; } break; case 20: // fight begin / base state { o->state = 21; o->timer = 0; o->frame = 0; o->animtimer = 0; } case 21: { o->xinertia *= 7; o->xinertia /= 8; o->yinertia *= 7; o->yinertia /= 8; ANIMATE(20, 0, 1); if (++o->timer > 100) o->state = 30; FACEPLAYER; } break; case 30: { o->state = 31; o->timer = 0; o->frame = 2; o->savedhp = o->hp; } case 31: { ANIMATE(1, 2, 3); if (o->blockd) o->yinertia = -0x200; int core_x = game.stageboss.object ? game.stageboss.object->x : 0; o->xinertia += (o->x > core_x) ? -0x20 : 0x20; o->yinertia += (o->y > player->y) ? -0x10 : 0x10; LIMITX(0x200); LIMITY(0x200); FACEPLAYER; if (++o->timer > 150) { // she attacks with normal critters if you attack either her or Sue. if ((o->savedhp - o->hp) > 20 || sue_being_hurt) { sue_being_hurt = false; o->state = 40; } } // she attacks periodically with fishy missiles if you killed Sue. if (o->timer > 250 && sue_was_killed) o->state = 50; } break; case 40: // spawn bats/critters { o->state = 41; o->timer = 0; o->xinertia = 0; o->yinertia = 0; FACEPLAYER; sound(SND_CHARGE_GUN); // if you are below the 2nd little platform on the left, // she spawns critters, else bats. o->timer3 = (player->y >= MAPY(10)) ? OBJ_MISERY_CRITTER : OBJ_MISERY_BAT; } case 41: { o->timer++; o->frame = (o->timer & 2) ? 4 : 5; if ((o->timer % 6) == 1) { int x, y; if (o->timer3 == OBJ_MISERY_CRITTER) { x = o->x + (random(-64, 64) << CSF); y = o->y + (random(-32, 32) << CSF); } else { x = o->x + (random(-32, 32) << CSF); y = o->y + (random(-64, 64) << CSF); } if (x < MAPX(2)) x = MAPX(2); if (x > MAPX(map.xsize - 3)) x = MAPX(map.xsize - 3); if (y < MAPY(2)) y = MAPY(2); if (y > MAPY(map.ysize - 3)) y = MAPY(map.ysize - 3); sound(SND_EM_FIRE); CreateObject(x, y, o->timer3)->invisible = true; } if (o->timer > 50) { o->state = 42; o->timer = 0; FACEPLAYER; } } break; case 42: { o->frame = 6; if (++o->timer > 50) { o->yinertia = -0x200; XMOVE(-0x200); o->state = 30; } } break; case 50: // spawn fishy missiles { o->state = 51; o->timer = 0; o->xinertia = 0; o->yinertia = 0; FACEPLAYER; sound(SND_CHARGE_GUN); } case 51: { o->timer++; o->frame = (o->timer & 2) ? 4 : 5; int rate = (player->equipmask & EQUIP_BOOSTER20) ? 10 : 24; if ((o->timer % rate) == 1) { // pattern: booster=[0,1,3,1,2,0], no-booster=[0,0,0]: int angindex = (o->timer / 6) & 3; fm_spawn_missile(o, angindex); } if (++o->timer > 50) { o->state = 42; o->timer = 0; FACEPLAYER; } } break; } } // spawn a fishy missile in the given direction static Object *fm_spawn_missile(Object *o, int angindex) { static const int ang_table_left[] = { 0xD8, 0xEC, 0x14, 0x28 }; static const int ang_table_right[] = { 0x58, 0x6C, 0x94, 0xA8 }; Object *shot = CreateObject(o->x, o->y, OBJ_MISERY_MISSILE); sound(SND_EM_FIRE); if (o->dir == LEFT) { shot->x += (10 << CSF); shot->angle = ang_table_left[angindex]; } else { shot->x -= (10 << CSF); shot->angle = ang_table_right[angindex]; } return shot; } /* void c------------------------------() {} */ void ai_misery_critter(Object *o) { switch(o->state) { case 0: { if (++o->timer > 16) { o->frame = 2; o->invisible = false; FACEPLAYER; o->state = 10; o->damage = 2; o->flags |= FLAG_SHOOTABLE; } } break; case 10: { if (o->blockd && o->yinertia >= 0) { o->state = 11; o->frame = 0; o->timer = 0; o->xinertia = 0; FACEPLAYER; } } break; case 11: { if (++o->timer > 10) { if (++o->timer2 > 4) o->state = 12; else o->state = 10; sound(SND_ENEMY_JUMP); o->yinertia = -0x600; XMOVE(0x200); o->frame = 2; } } break; case 12: { o->flags |= FLAG_IGNORE_SOLID; if (o->y > MAPY(map.ysize)) { o->Delete(); } } break; } if (o->state >= 10) { o->yinertia += 0x40; if (o->yinertia > 0x5ff) o->yinertia = 0x5ff; } } void ai_misery_bat(Object *o) { switch(o->state) { case 0: { if (++o->timer > 16) { o->frame = 2; o->invisible = false; FACEPLAYER; o->state = 1; o->damage = 2; o->flags |= (FLAG_SHOOTABLE | FLAG_IGNORE_SOLID); o->ymark = o->y; o->yinertia = 0x400; } } break; case 1: { ANIMATE(2, 0, 2); o->yinertia += (o->y < o->ymark) ? 0x40 : -0x40; XACCEL(0x10); if (o->x < 0 || o->x > MAPX(map.xsize) || \ o->y < 0 || o->y > MAPY(map.ysize)) { o->Delete(); } } break; } } void ai_misery_missile(Object *o) { // cut & pasted from ai_x_fishy_missile vector_from_angle(o->angle, 0x400, &o->xinertia, &o->yinertia); int desired_angle = GetAngle(o->x, o->y, player->x, player->y); if (o->angle >= desired_angle) { if ((o->angle - desired_angle) < 128) { o->angle--; } else { o->angle++; } } else { if ((o->angle - desired_angle) < 128) { o->angle++; } else { o->angle--; } } // smoke trails if (++o->timer2 > 2) { o->timer2 = 0; Caret *c = effect(o->ActionPointX(), o->ActionPointY(), EFFECT_SMOKETRAIL_SLOW); c->xinertia = -o->xinertia >> 2; c->yinertia = -o->yinertia >> 2; } o->frame = (o->angle + 16) / 32; if (o->frame > 7) o->frame = 7; } /* void c------------------------------() {} */ void ai_sue_frenzied(Object *o) { //AIDEBUG; sidekick_run_defeated(o, 500); switch(o->state) { case 0: { o->state = 1; sue_being_hurt = sue_was_killed = false; o->savedhp = o->hp; o->nxflags |= NXFLAG_SLOW_X_WHEN_HURT; sound(SND_TELEPORT); o->timer = 1; } case 1: // transforming { o->timer++; if (o->timer == 2) { // frenzied sue o->sprite = SPR_SUE_FRENZIED; o->frame = 11; o->x -= 0x1000; o->y -= 0x1800; } if (o->timer == 4) { // normal sue o->timer = 0; o->sprite = SPR_SUE; o->frame = 12; o->x += 0x1000; o->y += 0x1800; } if (++o->timer2 >= 50) { KillObjectsOfType(OBJ_RED_CRYSTAL); o->timer2 = 0; o->state = 2; } } break; // fight begin/base state (script-triggered) case SUE_BASE: { o->state++; o->timer = 0; o->frame = 0; o->animtimer = 0; o->damage = 0; o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_IGNORE_SOLID; } case SUE_BASE+1: { ANIMATE(20, 0, 1); FACEPLAYER; o->xinertia *= 7; o->xinertia /= 8; o->yinertia *= 7; o->yinertia /= 8; if ((o->savedhp - o->hp) > 50) { o->savedhp = o->hp; sue_being_hurt = true; // trigger Misery to spawn monsters } if (++o->timer > 80) o->state = SUE_PREPARE_ATTACK; } break; // prepare to attack case SUE_PREPARE_ATTACK: { o->state++; o->timer = 0; o->frame = 2; o->xinertia = 0; o->yinertia = 0; } case SUE_PREPARE_ATTACK+1: { if (++o->timer > 16) { o->state = (o->timer2 ^= 1) ? SUE_SOMERSAULT : SUE_DASH; o->timer = 0; } } break; } sue_somersault(o); sue_dash(o); } // somersault attack. this is the only time she can actually hurt you. static void sue_somersault(Object *o) { switch(o->state) { case SUE_SOMERSAULT: { o->state++; o->timer = 0; o->damage = 4; o->frame = 2; FACEPLAYER; ThrowObjectAtPlayer(o, 0, 0x600); set_ignore_solid(o); } case SUE_SOMERSAULT+1: { // passes through frame 3 (prepare/dash) before entering anim loop ANIMATE(1, 4, 7); o->timer++; if (o->shaketime && o->timer > 20) { // hurt fall o->state = SUE_SOMERSAULT_HIT; break; } // hit wall or timeout? if (o->timer > 50 || \ (o->blockr && o->xinertia > 0) || \ (o->blockl && o->xinertia < 0)) { // back to base state o->state = SUE_BASE; } if ((o->timer % 5) == 1) sound(SND_CRITTER_FLY); } break; // hit during somersault case SUE_SOMERSAULT_HIT: { o->state++; o->timer = 0; o->frame = 2; // stop somersault; back to normal stand frame o->damage = 0; o->flags &= ~FLAG_IGNORE_SOLID; } case SUE_SOMERSAULT_HIT+1: // slowing down { o->xinertia *= 7; o->xinertia /= 8; o->yinertia *= 7; o->yinertia /= 8; if (++o->timer > 6) { o->state++; o->timer = 0; o->yinertia = -0x200; XMOVE(-0x200); } } break; // falling/egads case SUE_SOMERSAULT_HIT+2: { o->frame = 9; // egads! if (o->blockd && o->yinertia > 0) { o->state++; o->timer = 0; o->frame = 2; // standing FACEPLAYER; } o->yinertia += 0x20; LIMITY(0x5ff); } break; // hit ground: slide a bit then recover case SUE_SOMERSAULT_HIT+3: { if (++o->timer > 16) o->state = 20; } break; } } // non-harmful dash. she cannot be hurt, but cannot hurt you, either. static void sue_dash(Object *o) { int x; switch(o->state) { case SUE_DASH: { o->state++; o->timer = 0; FACEPLAYER; o->flags &= ~FLAG_SHOOTABLE; if (player->x < o->x) x = player->x - (160<x + (160<y, 0, 0x600); set_ignore_solid(o); } case SUE_DASH+1: { // flash o->frame = (++o->timer & 2) ? 8 : 3; // frame 8 is invisible if (o->shaketime < 8) o->nxflags &= ~NXFLAG_SLOW_X_WHEN_HURT; if (o->timer > 50 || \ (o->blockr && o->xinertia > 0) || \ (o->blockl && o->xinertia < 0)) { o->invisible = false; o->state = SUE_BASE; o->nxflags |= NXFLAG_SLOW_X_WHEN_HURT; } } break; } } // sets FLAG_IGNORE_SOLID if the object is heading towards the center // of the room, clears it otherwise. static void set_ignore_solid(Object *o) { int map_right_half = ((map.xsize * TILE_W) << CSF) / 2; int map_bottom_half = ((map.ysize * TILE_H) << CSF) / 2; o->flags &= ~FLAG_IGNORE_SOLID; if ((o->x < map_right_half && o->xinertia > 0) || \ (o->x > map_right_half && o->xinertia < 0)) { if ((o->y < map_bottom_half && o->yinertia > 0) || \ (o->y > map_bottom_half && o->yinertia < 0)) { o->flags |= FLAG_IGNORE_SOLID; } } } /* void c------------------------------() {} */ // shared between both Sue and Misery. static void sidekick_run_defeated(Object *o, int health) { // die if still around when core explodes if (o->state == SIDEKICK_CORE_DEFEATED_2) { if (!game.stageboss.object) o->hp = 0; } // trigger die if (o->hp < (1000 - health)) { o->flags &= ~FLAG_SHOOTABLE; o->hp = 9999; // don't re-trigger o->state = SIDEKICK_DEFEATED; } switch(o->state) { // the script triggers this if you defeat the core // without killing one or both sidekicks. // // once the core explodes and game.stageboss.object becomes NULL, // the sidekicks then enter the full defeated state and collapse. case SIDEKICK_CORE_DEFEATED: { if (o->hp == 9999) { // we were already dead when core was killed--ignore. o->state = SIDEKICK_DEFEATED+1; } else { o->flags &= ~FLAG_SHOOTABLE; o->hp = 9999; o->xinertia = 0; o->yinertia = 0; o->frame = 9; o->state = SIDEKICK_CORE_DEFEATED_2; // cannot "state++"; that is SIDEKICK_DEFEATED } } break; case SIDEKICK_DEFEATED: { o->state++; o->frame = 9; o->damage = 0; o->flags &= ~FLAG_SHOOTABLE; o->flags |= FLAG_IGNORE_SOLID; o->yinertia = -0x200; o->shaketime += 50; if (o->type == OBJ_SUE_FRENZIED) sue_was_killed = true; // trigger Misery to start spawning missiles } case SIDEKICK_DEFEATED+1: { o->yinertia += 0x20; #define FLOOR (((13 * TILE_H) - 13) << CSF) if (o->yinertia > 0 && o->y > FLOOR) { o->y = FLOOR; o->state++; o->frame = 10; o->xinertia = 0; o->yinertia = 0; } } break; case SIDEKICK_CORE_DEFEATED_2: break; } } ================================================ FILE: ai/final_battle/sidekicks.fdh ================================================ //hash:afaf6e59 //automatically generated by Makegen /* located in ObjManager.cpp */ //-----------[referenced from ai/final_battle/sidekicks.cpp]---------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //-----------[referenced from ai/final_battle/sidekicks.cpp]---------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //-----------[referenced from ai/final_battle/sidekicks.cpp]---------// void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys); uint8_t GetAngle(int curx, int cury, int tgtx, int tgty); void ThrowObjectAtPlayer(Object *o, int rand_variance, int speed); void ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed); /* located in ai/ai.cpp */ //-----------[referenced from ai/final_battle/sidekicks.cpp]---------// void KillObjectsOfType(int type); /* located in ai/final_battle/sidekicks.cpp */ //-----------[referenced from ai/final_battle/sidekicks.cpp]---------// void ai_misery_frenzied(Object *o); static Object *fm_spawn_missile(Object *o, int angindex); void ai_misery_critter(Object *o); void ai_misery_bat(Object *o); void ai_misery_missile(Object *o); void ai_sue_frenzied(Object *o); static void sue_somersault(Object *o); static void sue_dash(Object *o); static void set_ignore_solid(Object *o); static void sidekick_run_defeated(Object *o, int health); /* located in sound/sound.cpp */ //-----------[referenced from ai/final_battle/sidekicks.cpp]---------// void sound(int snd); /* located in common/misc.cpp */ //-----------[referenced from ai/final_battle/sidekicks.cpp]---------// int random(int min, int max); ================================================ FILE: ai/first_cave/first_cave.cpp ================================================ #include "../stdai.h" #include "../weed/weed.fdh" // for ai_critter #include "first_cave.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_BAT_BLUE, ai_bat_up_down); ONTICK(OBJ_CRITTER_HOPPING_BLUE, ai_critter); ONTICK(OBJ_HERMIT_GUNSMITH, ai_hermit_gunsmith); ONTICK(OBJ_DOOR_ENEMY, ai_door_enemy); } /* void c------------------------------() {} */ void ai_bat_up_down(Object *o) { switch(o->state) { case 0: o->ymark = o->y; o->timer = random(0, 50); o->state = 1; case 1: if (!o->timer--) { o->state = 2; o->yinertia = 0x300; } break; case 2: { if (o->y >= o->ymark) o->yinertia -= 0x10; else o->yinertia += 0x10; LIMITY(0x300); } break; } FACEPLAYER; ANIMATE(1, 2, 4); } /* void c------------------------------() {} */ void ai_hermit_gunsmith(Object *o) { if (o->state == 0) { o->SnapToGround(); o->state = 1; } if (o->dir == RIGHT) { ai_zzzz_spawner(o); } else { o->frame = 0; randblink(o, 1, 8); } } void ai_door_enemy(Object *o) { enum { INIT = 0, WAIT, OPENEYE, CLOSEEYE }; switch(o->state) { case 0: o->state = WAIT; case WAIT: { o->frame = 0; if (pdistlx(0x8000) && pdistly(0x8000)) { o->animtimer = 0; o->state = OPENEYE; } } break; case OPENEYE: { if (++o->animtimer > 2) { o->animtimer = 0; o->frame++; } if (o->frame > 2) { o->frame = 2; if (!pdistlx(0x8000) || !pdistly(0x8000)) { o->state = CLOSEEYE; o->animtimer = 0; } } } break; case CLOSEEYE: { if (++o->animtimer > 2) { o->animtimer = 0; if (--o->frame <= 0) { o->frame = 0; o->state = WAIT; } } } break; } } ================================================ FILE: ai/first_cave/first_cave.fdh ================================================ //hash:3c4c85d2 //automatically generated by Makegen /* located in ai/ai.cpp */ //-----------[referenced from ai/first_cave/first_cave.cpp]----------// void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in ai/first_cave/first_cave.cpp */ //-----------[referenced from ai/first_cave/first_cave.cpp]----------// void ai_bat_up_down(Object *o); void ai_hermit_gunsmith(Object *o); void ai_door_enemy(Object *o); /* located in ai/sand/puppy.cpp */ //-----------[referenced from ai/first_cave/first_cave.cpp]----------// void ai_zzzz_spawner(Object *o); /* located in common/misc.cpp */ //-----------[referenced from ai/first_cave/first_cave.cpp]----------// int random(int min, int max); ================================================ FILE: ai/hell/ballos_misc.cpp ================================================ #include "../stdai.h" #include "ballos_misc.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_BALLOS_SKULL, ai_ballos_skull); ONTICK(OBJ_BALLOS_SPIKES, ai_ballos_spikes); ONTICK(OBJ_GREEN_DEVIL, ai_green_devil); ONTICK(OBJ_GREEN_DEVIL_SPAWNER, ai_green_devil_spawner); ONTICK(OBJ_BUTE_SWORD_RED, ai_bute_sword_red); ONTICK(OBJ_BUTE_ARCHER_RED, ai_bute_archer_red); ONTICK(OBJ_WALL_COLLAPSER, ai_wall_collapser); } /* void c------------------------------() {} */ void ai_ballos_skull(Object *o) { ANIMATE(8, 0, 3); switch(o->state) { case 0: { o->state = 100; o->frame = random(0, 16) & 3; } case 100: { o->yinertia += 0x40; LIMITY(0x700); if (o->timer++ & 2) { (SmokePuff(o->x, o->y))->PushBehind(o); } if (o->y > 0x10000) { o->flags &= ~FLAG_IGNORE_SOLID; if (o->blockd) { o->yinertia = -0x200; o->state = 110; o->flags |= FLAG_IGNORE_SOLID; quake(10, SND_BLOCK_DESTROY); for(int i=0;i<4;i++) { Object *s = SmokePuff(o->x + random(-12<y + 0x2000); s->xinertia = random(-0x155, 0x155); s->yinertia = random(-0x600, 0); s->PushBehind(o); } } } } break; case 110: { o->yinertia += 0x40; if (o->Top() >= (map.ysize * TILE_H) << CSF) { o->Delete(); } } break; } } void ai_ballos_spikes(Object *o) { switch(o->state) { case 0: { if (++o->timer < 128) { o->y -= 0x80; o->frame = (o->timer & 2) ? 0 : 1; } else { o->state = 1; o->damage = 2; } } break; } } /* void c------------------------------() {} */ void ai_green_devil_spawner(Object *o) { switch(o->state) { case 0: { o->timer = random(0, 40); o->state = 1; } case 1: { if (--o->timer < 0) { Object *dv = CreateObject(o->x, o->y, OBJ_GREEN_DEVIL, 0, 0, o->dir); dv->xinertia = random(-16<state = 0; } } break; } } void ai_green_devil(Object *o) { switch(o->state) { case 0: { o->flags |= FLAG_SHOOTABLE; o->ymark = o->y; o->yinertia = random(-5<damage = 3; o->state = 1; } case 1: { ANIMATE(2, 0, 1); o->yinertia += (o->y < o->ymark) ? 0x80 : -0x80; XACCEL(0x20); LIMITX(0x400); if (o->dir == LEFT) { if (o->x < -o->Width()) o->Delete(); } else { if (o->x > ((map.xsize * TILE_W) << CSF) + o->Width()) o->Delete(); } } break; } } /* void c------------------------------() {} */ void ai_bute_sword_red(Object *o) { switch(o->state) { case 0: { o->state = 1; o->sprite = SPR_BUTE_SWORD_RED_FALLING; o->MoveAtDir(o->dir, 0x600); o->dir = 0; } case 1: { ANIMATE(2, 0, 3); if (++o->timer == 8) o->flags &= ~FLAG_IGNORE_SOLID; if (o->timer >= 16) { o->state = 10; o->sprite = SPR_BUTE_SWORD_RED; o->frame = 0; o->flags |= FLAG_SHOOTABLE; o->damage = 5; } } break; case 10: { ANIMATE(1, 0, 1); FACEPLAYER; // when player is below them, they come towards him, // when player is above, they sweep away. if (player->CenterY() > (o->y + (24 << CSF))) { XACCEL(0x10); } else { XACCEL(-0x10); } o->yinertia += (o->y <= player->y) ? 0x10 : -0x10; if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0)) { o->xinertia = -o->xinertia; } if ((o->blocku && o->yinertia <= 0) || \ (o->blockd && o->yinertia >= 0)) { o->yinertia = -o->yinertia; } LIMITX(0x5ff); LIMITY(0x5ff); } break; } } void ai_bute_archer_red(Object *o) { //DebugCrosshair(o->x, o->y, 0, 255, 255); switch(o->state) { case 0: { o->state = 1; o->xmark = o->x; o->ymark = o->y; if (o->dir == LEFT) o->xmark -= (128<xmark += (128<xinertia = random(-0x400, 0x400); o->yinertia = random(-0x400, 0x400); } case 1: // come on screen { ANIMATE(1, 0, 1); if ((o->dir == LEFT && o->x < o->xmark) || \ (o->dir == RIGHT && o->x > o->xmark)) { o->state = 20; } } break; case 20: // aiming { o->state = 21; o->timer = random(0, 150); o->frame = 2; o->animtimer = 0; } case 21: { ANIMATE(2, 2, 3); if (++o->timer > 300 || \ (pdistlx(112<state = 30; } } break; case 30: // flashing to fire { o->state = 31; o->timer = 0; o->animtimer = 0; o->frame = 3; } case 31: { ANIMATE(1, 3, 4); if (++o->timer > 30) { o->state = 40; o->frame = 5; Object *arrow = CreateObject(o->x, o->y, OBJ_BUTE_ARROW); arrow->dir = o->dir; arrow->xinertia = (o->dir == RIGHT) ? 0x800 : -0x800; } } break; case 40: // fired { o->state = 41; o->timer = 0; o->animtimer = 0; } case 41: { ANIMATE(2, 5, 6); if (++o->timer > 40) { o->state = 50; o->timer = 0; o->xinertia = 0; o->yinertia = 0; } } break; case 50: // retreat offscreen { ANIMATE(1, 0, 1); XACCEL(-0x20); if (o->Right() < 0 || o->Left() > ((map.xsize * TILE_W) << CSF)) o->Delete(); } break; } // sinusoidal hover around set point if (o->state != 50) { o->xinertia += (o->x < o->xmark) ? 0x2A : -0x2A; o->yinertia += (o->y < o->ymark) ? 0x2A : -0x2A; LIMITX(0x400); LIMITY(0x400); } } /* void c------------------------------() {} */ // This object is responsible for collapsing the walls in the final best-ending sequence. // All the original object does is collapse one tile further every 101 frames. // However, since it's triggered at the beginning of the cinematic and then is let to run // through almost the entire thing it needs to be sync'd really-really perfect with a // number of other systems; the textboxes, etc. // // I spent several hours trying to get my events to run in perfect frame-by-frame // exactness with the original engine, and found several things that were slightly off. // However, I've decided that even if I got it absolutely perfect, it's too liable to // get broken by some minor innocent change in the future, and requires too much of // the engine to be tuned just so. // // So, I've added some event-based triggers to the object, that are NOT technically supposed // to be there. These will make extra sure that nothing embarrassing happens during this great // finale, such as the walls being one tile too far at one point, or even worse, having // them collapse onto Balrog before he makes it to the exit. Because there are no triggers // in the script and I can't change the script, I had to do a bit of sneaky spying on program // state to implement them. void ai_wall_collapser(Object *o) { int y; switch(o->state) { case 0: { o->invisible = true; o->timer = 0; o->state = 1; } break; case 10: // trigger { if (++o->timer > 100) { o->timer2++; o->timer = 0; int xa = (o->x >> CSF) / TILE_W; int ya = (o->y >> CSF) / TILE_H; for(y=0;y<20;y++) { // pushing the smoke behind all objects prevents it from covering // up the NPC's on the collapse just before takeoff. map_ChangeTileWithSmoke(xa, ya+y, 109, 4, false, lowestobject); } sound(SND_BLOCK_DESTROY); quake(20); if (o->dir == LEFT) o->x -= (TILE_W << CSF); else o->x += (TILE_W << CSF); // reached the solid tile in the center of the throne. // it isn't supposed to cover this tile until after Curly // says we're gonna get crushed. if (o->timer2 == 6) o->state = 20; // balrog is about to take off/rescue you. if (o->timer2 == 9) o->state = 30; } } break; // "gonna get crushed" event case 20: { // wait for text to come up if (textbox.IsVisible()) o->state = 21; } break; case 21: { // wait for text to dismiss, then tile immediately collapses if (!textbox.IsVisible()) { o->state = 10; o->timer = 1000; } } break; // balrog is about to take off. the video I took shows that // the walls are supposed to collapse into your space on the // exact same frame that he breaks the first ceiling tile. case 30: { o->linkedobject = Objects::FindByType(OBJ_BALROG_DROP_IN); if (o->linkedobject) o->state = 31; } break; case 31: { //debug("%x", o->linkedobject->y); if (o->linkedobject && o->linkedobject->y <= 0x45800) { o->state = 10; o->timer = 1000; } } break; } } ================================================ FILE: ai/hell/ballos_misc.fdh ================================================ //hash:5423cebb //automatically generated by Makegen /* located in game.cpp */ //--------------[referenced from ai/hell/ballos_misc.cpp]------------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //--------------[referenced from ai/hell/ballos_misc.cpp]------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //--------------[referenced from ai/hell/ballos_misc.cpp]------------// void map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind); /* located in ai/hell/ballos_misc.cpp */ //--------------[referenced from ai/hell/ballos_misc.cpp]------------// void ai_ballos_skull(Object *o); void ai_ballos_spikes(Object *o); void ai_green_devil_spawner(Object *o); void ai_green_devil(Object *o); void ai_bute_sword_red(Object *o); void ai_bute_archer_red(Object *o); void ai_wall_collapser(Object *o); /* located in ai/sym/smoke.cpp */ //--------------[referenced from ai/hell/ballos_misc.cpp]------------// Object *SmokePuff(int x, int y); /* located in sound/sound.cpp */ //--------------[referenced from ai/hell/ballos_misc.cpp]------------// void sound(int snd); /* located in common/misc.cpp */ //--------------[referenced from ai/hell/ballos_misc.cpp]------------// int random(int min, int max); ================================================ FILE: ai/hell/ballos_priest.cpp ================================================ #include "../stdai.h" #include "ballos_priest.fdh" enum STATES { BP_FIGHTING_STANCE = 100, // show fighting stance, then prepare to fly lr BP_PREPARE_FLY_LR = 110, // duck a moment, then fly horizontally at player BP_PREPARE_FLY_UD = 120, // duck a moment, then fly vertically at player BP_FLY_LR = 130, // flying horizontally BP_FLY_UP = 140, // flying up BP_FLY_DOWN = 150, // flying down BP_HIT_WALL = 160, // hit wall while flying horizontally BP_HIT_CEILING = 170, // hit ceiling while flying up BP_HIT_FLOOR = 180, // hit floor while flying down BP_RETURN_TO_GROUND = 190, // faces screen and floats down to ground BP_LIGHTNING_STRIKE = 200, // lightning attack BP_DEFEATED = 1000 // defeated (script-triggered) }; #define DMG_NORMAL 3 // normal damage for touching him #define DMG_RUSH 10 // damage when he is rushing/flying at you #define RUSH_SPEED 0x800 // how fast he flies #define RUSH_DIST (16<timer3); /*if (o->state < 1000) { FindObjectByID2(500)->Delete(); StartScript(900); return; }*/ run_intro(o); run_defeated(o); run_flight(o); run_lightning(o); switch(o->state) { // show "ninja" stance for "timer" ticks, // then prepare to fly horizontally case BP_FIGHTING_STANCE: { o->frame = 1; o->animtimer = 0; o->state++; o->damage = DMG_NORMAL; o->savedhp = o->hp; } case BP_FIGHTING_STANCE+1: { ANIMATE(10, 1, 2); FACEPLAYER; if (--o->timer < 0 || (o->savedhp - o->hp) > 50) { if (++o->timer3 > 4) { o->state = BP_LIGHTNING_STRIKE; o->timer3 = 0; } else { o->state = BP_PREPARE_FLY_LR; o->timer2 = 0; } } } break; // prepare for flight attack case BP_PREPARE_FLY_LR: case BP_PREPARE_FLY_UD: { o->timer2++; o->state++; o->timer = 0; o->frame = 3; // fists in o->damage = DMG_NORMAL; // Fly/UD faces player only once, at start FACEPLAYER; } case BP_PREPARE_FLY_LR+1: { FACEPLAYER; } case BP_PREPARE_FLY_UD+1: { // braking, if we came here out of another fly state o->xinertia *= 8; o->xinertia /= 9; o->yinertia *= 8; o->yinertia /= 9; if (++o->timer > 20) { sound(SND_FUNNY_EXPLODE); if (o->state == BP_PREPARE_FLY_LR+1) { o->state = BP_FLY_LR; // flying left/right } else if (player->y < (o->y + (12 << CSF))) { o->state = BP_FLY_UP; // flying up } else { o->state = BP_FLY_DOWN; // flying down } } } break; } // his bounding box is in a slightly different place on L/R frames if (o->dirparam != o->dir) { sprites[o->sprite].bbox = sprites[o->sprite].frame[0].dir[o->dir].pf_bbox; o->dirparam = o->dir; } } /* void c------------------------------() {} */ // handles his "looping" flight/rush attacks static void run_flight(Object *o) { switch(o->state) { // flying left or right case BP_FLY_LR: { o->state++; o->animtimer = 0; o->frame = 6; // flying horizontally o->yinertia = 0; o->damage = DMG_RUSH; FACEPLAYER; XMOVE(RUSH_SPEED); } case BP_FLY_LR+1: { ANIMATE(1, 6, 7); // smacked into wall? if ((o->blockl && o->dir == LEFT) || \ (o->blockr && o->dir == RIGHT)) { o->xinertia = 0; o->state = BP_HIT_WALL; o->damage = DMG_NORMAL; o->timer = 0; megaquake(10); } // reached player? // this has to be AFTER smacked-into-wall check for proper behavior // if player stands in spikes at far left/right of arena. if (pdistlx(RUSH_DIST)) o->state = BP_PREPARE_FLY_UD; } break; // smacked into wall while flying L/R case BP_HIT_WALL: { o->frame = 6; if (++o->timer > 30) { if (o->timer2 <= 3) o->state = BP_PREPARE_FLY_LR; else o->state = BP_RETURN_TO_GROUND; } } break; // flying up case BP_FLY_UP: { o->state++; o->timer = 0; o->animtimer = 0; o->frame = 8; // vertical flight o->dir = LEFT; // up-facing frame o->yinertia = -RUSH_SPEED; o->xinertia = 0; o->damage = DMG_RUSH; } case BP_FLY_UP+1: { ANIMATE(1, 8, 9); // hit ceiling? (to make this happen, break his loop and jump ABOVE him // while he is in the air, at the part where he would normally be // coming back down at you). if (o->blocku) { o->state = BP_HIT_CEILING; o->damage = DMG_NORMAL; o->timer = 0; SmokeXY(o->CenterX(), o->Top(), 8); megaquake(10); spawn_bones(o, UP); } // reached player? (this check here isn't exactly the same as pdistly; // it's important that it checks the player's top and not his center). if ((abs(player->y - o->y) < RUSH_DIST) && o->timer2 < 4) o->state = BP_PREPARE_FLY_LR; } break; case BP_HIT_CEILING: // hit ceiling { o->frame = 8; if (++o->timer > 30) { if (o->timer2 <= 3) o->state = BP_PREPARE_FLY_LR; else o->state = BP_RETURN_TO_GROUND; } } break; // flying down case BP_FLY_DOWN: { o->state++; o->timer = 0; o->animtimer = 0; o->frame = 8; // vertical flight o->dir = RIGHT; // down-facing frame o->yinertia = RUSH_SPEED; o->xinertia = 0; o->damage = DMG_RUSH; } case BP_FLY_DOWN+1: { ANIMATE(1, 8, 9); if (o->blockd) { o->state = BP_HIT_FLOOR; o->damage = DMG_NORMAL; o->timer = 0; SmokeXY(o->CenterX(), o->Bottom(), 8); megaquake(10); spawn_bones(o, DOWN); FACEPLAYER; } if (pdistly(RUSH_DIST) && o->timer2 < 4) o->state = BP_PREPARE_FLY_LR; } break; case BP_HIT_FLOOR: // hit floor { o->frame = 3; if (++o->timer > 30) { o->state = BP_FIGHTING_STANCE; o->timer = 120; } } break; // come back to ground while facing head on case BP_RETURN_TO_GROUND: { o->frame = 4; // face screen frame o->dir = LEFT; // non-flashing version o->state++; } case BP_RETURN_TO_GROUND+1: { ANIMATE(1, 4, 5); o->yinertia += 0x40; LIMITY(0x5ff); if (o->blockd && o->yinertia >= 0) { o->state++; o->timer = 0; o->frame = 3; // landed FACEPLAYER; } } break; case BP_RETURN_TO_GROUND+2: { o->xinertia *= 3; o->xinertia /= 4; if (++o->timer > 10) { o->state = BP_FIGHTING_STANCE; o->timer = 140; } } break; } } // creates the two bone spawners which appear when he crashes into the floor or ceiling. // pass UP if he has hit the ceiling, DOWN if he has hit the floor. static void spawn_bones(Object *o, int dir) { int y; if (dir == UP) y = (o->y - (12 << CSF)); else y = (o->y + (12 << CSF)); CreateObject(o->x - (12<dir = LEFT; CreateObject(o->x + (12<dir = RIGHT; } /* void c------------------------------() {} */ // his lightning-strike attack static void run_lightning(Object *o) { switch(o->state) { // lightning strikes (targeting player) case BP_LIGHTNING_STRIKE: { o->xmark = player->x; o->yinertia = -0x600; o->timer = 0; o->timer2 = 0; o->animtimer = 0; o->frame = 4; // facing screen o->dir = LEFT; // not flashing o->state++; } case BP_LIGHTNING_STRIKE+1: { ANIMATE(1, 4, 5); o->xinertia += (o->x < o->xmark) ? 0x40 : -0x40; o->yinertia += (o->y < FLOAT_Y) ? 0x40 : -0x40; LIMITX(0x400); LIMITY(0x400); // run firing if (++o->timer > 200) { int pos = (o->timer % 40); if (pos == 1) { // spawn lightning target CreateObject(player->CenterX(), LIGHTNING_Y, OBJ_BALLOS_TARGET)->dir = LEFT; o->dir = RIGHT; // switch to flashing frames o->animtimer = 0; // after 8 attacks, switch to even-spaced strikes if (++o->timer2 >= 8) { o->xinertia = 0; o->yinertia = 0; o->dir = RIGHT; // flashing o->frame = 5; // flash red then white during screen flash o->animtimer = 1; // desync animation from screen flashes so it's visible o->state++; o->timer = 0; o->timer2 = 0; } } else if (pos == 20) { o->dir = LEFT; // stop flashing } } } break; // lightning strikes (evenly-spaced everywhere) case BP_LIGHTNING_STRIKE+2: { ANIMATE(1, 4, 5); o->timer++; if (o->timer == 40) flashscreen.Start(); if (o->timer > 50) { if ((o->timer % 10) == 1) { CreateObject((o->timer2 * TILE_W) << CSF, \ LIGHTNING_Y, OBJ_BALLOS_TARGET)->dir = LEFT; o->timer2 += 4; if (o->timer2 >= 40) o->state = BP_RETURN_TO_GROUND; } } } break; } } /* void c------------------------------() {} */ // intro cinematic sequence static void run_intro(Object *o) { switch(o->state) { // idle/talking to player case 0: { // setup o->y -= (6<dir = LEFT; o->damage = 0; // ensure copy pfbox first time o->dirparam = -1; // closed eyes/mouth o->linkedobject = CreateObject(o->x, o->y - (16 << CSF), OBJ_BALLOS_SMILE); o->state = 1; } break; // fight begin // he smiles, then enters base attack state case 10: { o->timer++; // animate smile/open eyes if (o->timer > 50) { Object *smile = o->linkedobject; if (smile) { if (++smile->animtimer > 4) { smile->animtimer = 0; smile->frame++; if (smile->frame > 2) smile->Delete(); } } if (o->timer > 100) { o->state = BP_FIGHTING_STANCE; o->timer = 150; o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; } } } break; } } // defeat sequence // he flies away, then the script triggers the next form static void run_defeated(Object *o) { switch(o->state) { // defeated (script triggered; constant value 1000) case BP_DEFEATED: { o->state++; o->timer = 0; o->frame = 10; o->flags &= ~FLAG_SHOOTABLE; effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); SmokeClouds(o, 16, 16, 16); sound(SND_BIG_CRASH); o->xmark = o->x; o->xinertia = 0; } case BP_DEFEATED+1: // fall to ground, shaking { o->yinertia += 0x20; LIMITY(0x5ff); o->x = o->xmark; if (++o->timer & 2) o->x += (1 << CSF); else o->x -= (1 << CSF); if (o->blockd && o->yinertia >= 0) { if (++o->timer > 150) { o->state++; o->timer = 0; o->frame = 3; FACEPLAYER; } } } break; case BP_DEFEATED+2: // prepare to jump { if (++o->timer > 30) { o->yinertia = -0xA00; o->state++; o->frame = 8; o->flags |= FLAG_IGNORE_SOLID; } } break; case BP_DEFEATED+3: // jumping { ANIMATE(1, 8, 9); o->dir = LEFT; // up frame if (o->y < 0) { flashscreen.Start(); sound(SND_TELEPORT); o->xinertia = 0; o->yinertia = 0; o->state++; } } break; } } /* void c------------------------------() {} */ // targeter for lightning strikes void ai_ballos_target(Object *o) { switch(o->state) { case 0: { // position to shoot lightning at passed as x,y o->xmark = o->CenterX() - ((sprites[SPR_LIGHTNING].w / 2) << CSF); o->ymark = o->CenterY(); // adjust our Y coordinate to match player's o->y = player->CenterY(); sound(SND_CHARGE_GUN); o->state = 1; } case 1: { ANIMATE(1, 0, 1); o->timer++; if (o->timer == 20 && o->dir == LEFT) { // lightning attack // setting lightning dir=left: tells it do not flash screen CreateObject(o->xmark, o->ymark, OBJ_LIGHTNING)->dir = LEFT; } if (o->timer > 40) o->Delete(); } break; } } // white sparky thing that moves along floor throwing out bones, // spawned he hits the ground. // similar to the red smoke-spawning ones from Undead Core. void ai_ballos_bone_spawner(Object *o) { switch(o->state) { case 0: { sound(SND_MISSILE_HIT); o->state = 1; XMOVE(0x400); } case 1: { ANIMATE(1, 0, 2); o->timer++; if ((o->timer % 6) == 1) { int xi = (random(4, 16) << CSF) / 8; if (o->dir == LEFT) xi = -xi; CreateObject(o->x, o->y, OBJ_BALLOS_BONE, xi, -0x400); sound(SND_BLOCK_DESTROY); } if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0)) { o->Delete(); } } break; } } // bones emitted by bone spawner void ai_ballos_bone(Object *o) { ANIMATE(3, 0, 2); if (o->blockd && o->yinertia >= 0) { if (o->state == 0) { o->yinertia = -0x200; o->state = 1; } else { effect(o->CenterX(), o->CenterY(), EFFECT_FISHY); o->Delete(); } } o->yinertia += 0x40; LIMITY(0x5ff); } ================================================ FILE: ai/hell/ballos_priest.fdh ================================================ //hash:23301a33 //automatically generated by Makegen /* located in game.cpp */ //-------------[referenced from ai/hell/ballos_priest.cpp]-----------// void megaquake(int quaketime, int snd); /* located in ObjManager.cpp */ //-------------[referenced from ai/hell/ballos_priest.cpp]-----------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //-------------[referenced from ai/hell/ballos_priest.cpp]-----------// Caret *effect(int x, int y, int effectno); /* located in ai/hell/ballos_priest.cpp */ //-------------[referenced from ai/hell/ballos_priest.cpp]-----------// void ai_ballos_priest(Object *o); static void run_flight(Object *o); static void spawn_bones(Object *o, int dir); static void run_lightning(Object *o); static void run_intro(Object *o); static void run_defeated(Object *o); void ai_ballos_target(Object *o); void ai_ballos_bone_spawner(Object *o); void ai_ballos_bone(Object *o); /* located in ai/sym/smoke.cpp */ //-------------[referenced from ai/hell/ballos_priest.cpp]-----------// void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //-------------[referenced from ai/hell/ballos_priest.cpp]-----------// void sound(int snd); /* located in common/misc.cpp */ //-------------[referenced from ai/hell/ballos_priest.cpp]-----------// int random(int min, int max); ================================================ FILE: ai/hell/hell.cpp ================================================ #include "../stdai.h" #include "hell.fdh" #define BUTE_HP 4 #define MESA_HP 64 #define DELEET_HP 32 #define STATUE_HP 100 INITFUNC(AIRoutines) { ONTICK(OBJ_BUTE_FLYING, ai_bute_flying); ONTICK(OBJ_BUTE_DYING, ai_bute_dying); ONTICK(OBJ_BUTE_SPAWNER, ai_bute_spawner); ONTICK(OBJ_BUTE_FALLING, ai_bute_falling); ONTICK(OBJ_BUTE_SWORD, ai_bute_sword); ONTICK(OBJ_BUTE_ARCHER, ai_bute_archer); ONTICK(OBJ_BUTE_ARROW, ai_bute_arrow); ONTICK(OBJ_MESA, ai_mesa); ONTICK(OBJ_MESA_BLOCK, ai_mesa_block); ONTICK(OBJ_MESA_DYING, ai_bute_dying); ONTICK(OBJ_DELEET, ai_deleet); ONTICK(OBJ_ROLLING, ai_rolling); ONTICK(OBJ_STATUE, ai_statue); ONTICK(OBJ_STATUE_BASE, ai_statue_base); ONTICK(OBJ_PUPPY_GHOST, ai_puppy_ghost); } /* void c------------------------------() {} */ void ai_bute_flying(Object *o) { //AIDEBUG; if (run_bute_defeated(o, BUTE_HP)) return; switch(o->state) { case 0: { o->invisible = true; o->state = 1; } case 1: { if (o->dir == LEFT) { if (player->x > (o->x - (288<x < (o->x - (272<state = 10; } } else { if (player->x < (o->x + (288<x > (o->x + (272<state = 10; } } } break; case 10: { o->state = 11; o->invisible = false; o->flags |= FLAG_SHOOTABLE; o->damage = 5; } case 11: { FACEPLAYER; ANIMATE(1, 0, 1); XACCEL(0x10); o->yinertia += (o->y > player->y) ? -0x10 : 0x10; LIMITX(0x5ff); LIMITY(0x5ff); if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0)) { o->xinertia = -o->xinertia; } if ((o->blockd && o->yinertia > 0) || \ (o->blocku && o->yinertia < 0)) { o->yinertia = -o->yinertia; } } break; } } /* void c------------------------------() {} */ // Butes that come down from ceiling void ai_bute_spawner(Object *o) { static const int NUM_BUTES = 8; switch(o->state) { case 10: // script trigger (dir set by script at same time) { o->state = 11; o->timer = 0; } case 11: { o->timer++; if ((o->timer % 50) == 1) { CreateObject(o->x, o->y, OBJ_BUTE_FALLING, 0, 0, o->dir); if (o->timer == ((NUM_BUTES - 1) * 50) + 1) o->state = 0; } } break; } } void ai_bute_falling(Object *o) { ANIMATE(3, 0, 3); switch(o->state) { case 0: { o->state = 1; o->MoveAtDir(o->dir, 0x600); o->flags |= FLAG_IGNORE_SOLID; } case 1: { o->timer++; if (o->timer == 16) { o->flags &= ~FLAG_IGNORE_SOLID; } else if (o->timer > 16 && o->block[o->dir]) { o->state = 10; } if (o->timer > 20) { switch(o->dir) { case LEFT: if (o->CenterX() <= player->CenterX() + (32<state = 10; break; case RIGHT: if (o->CenterX() >= player->CenterX() - (32<state = 10; break; case UP: if (o->CenterY() <= player->CenterY() + (32<state = 10; break; case DOWN: if (o->CenterY() >= player->CenterY() - (32<state = 10; break; } } } break; case 10: { o->y += (4 << CSF); o->ChangeType(OBJ_BUTE_FLYING); o->state = 10; // trigger flight immediately o->frame = 0; o->xinertia = 0; o->yinertia = 0; } break; } } /* void c------------------------------() {} */ void ai_bute_sword(Object *o) { if (run_bute_defeated(o, BUTE_HP)) return; switch(o->state) { case 0: { o->flags |= (FLAG_SHOOTABLE | FLAG_INVULNERABLE); o->nxflags |= NXFLAG_FOLLOW_SLOPE; o->damage = 0; o->state = 1; } case 1: // lying in wait { FACEPLAYER; if (pdistlx(128<state = 10; } } break; // wait a moment, then start running at player case 10: { o->flags |= FLAG_INVULNERABLE; o->damage = 0; o->frame = 0; o->state = 11; o->timer = 0; } case 11: { if (++o->timer > 30) { o->state = 20; o->timer = 0; } } break; // run at player and jump case 20: { o->flags &= ~FLAG_INVULNERABLE; o->state = 21; FACEPLAYER; } case 21: { ANIMATE(3, 0, 1); XMOVE(0x400); if (pdistlx(40<xinertia /= 2; o->yinertia = -0x300; o->state = 30; o->frame = 2; // sword back, jumping sound(SND_ENEMY_JUMP); } else if (++o->timer > 50) { // timeout, p got away o->state = 10; o->xinertia = 0; } } break; // jumping up case 30: { if (o->yinertia > -0x80) { o->frame = 3; // sword swipe fwd o->damage = 9; o->state = 31; o->timer = 0; } } break; // swiping sword, in air case 31: { if (++o->timer > 2) { o->timer = 0; o->frame = 4; // sword down, in front } if (o->blockd && o->yinertia > 0) { o->xinertia = 0; o->damage = 3; o->state = 32; o->timer = 0; } } break; case 32: { if (++o->timer > 30) { o->state = 10; o->timer = 0; } } break; } o->yinertia += 0x20; LIMITY(0x5ff); } void ai_bute_archer(Object *o) { if (run_bute_defeated(o, BUTE_HP)) return; switch(o->state) { case 0: // waiting for player (when haven't seen him yet) { if ((o->dir == LEFT && player->CenterX() < o->CenterX()) || \ (o->dir == RIGHT && player->CenterX() > o->CenterX())) { if (pdistlx(320<state = 10; } } } break; // aiming--can track player here for a brief period case 10: { FACEPLAYER; if (!pdistlx(224<y <= (o->y - (8<frame = 4; // shooting up o->timer2 = 1; } else { o->frame = 1; // shooting straight o->timer2 = 0; } if (++o->timer > 10) { o->state = 20; o->timer = 0; } } break; // flashing to fire case 20: { if (o->timer2 == 0) ANIMATE(0, 1, 2) else ANIMATE(0, 4, 5) if (++o->timer > 30) o->state = 30; } break; // fire case 30: { o->state = 31; o->timer = 0; Object *arrow = CreateObject(o->CenterX(), o->CenterY(), OBJ_BUTE_ARROW); arrow->xinertia = (o->dir == RIGHT) ? 0x600 : -0x600; if (o->timer2 == 1) // shooting up arrow->yinertia = -0x600; // frame: arrow away o->frame = (o->timer2 == 1) ? 6 : 3; } case 31: { if (++o->timer > 30) { o->state = 40; o->frame = 0; o->timer = random(50, 150); } } break; // after fire, and the "woken up" waiting-for-player state case 40: { if (pdistlx(352<timer < 0) o->state = 10; // fire again } else { // player got away, do nothing until he returns o->timer = 150; } } break; } } void ai_bute_arrow(Object *o) { // check for hit wall/floor etc if (o->state < 20) { if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0) || \ (o->blocku && o->yinertia <= 0) || \ (o->blockd && o->yinertia >= 0)) { if (!(o->flags & FLAG_IGNORE_SOLID)) o->state = 20; } } switch(o->state) { case 0: { // set appropriate frame for initial direction o->sprite = (o->xinertia < 0) ? SPR_BUTE_ARROW_LEFT : SPR_BUTE_ARROW_RIGHT; o->frame = (o->yinertia < 0) ? 0 : 2; o->state = 1; } case 1: { if (++o->timer == 4) o->flags &= ~FLAG_IGNORE_SOLID; if (o->timer > 10) o->state = 10; } break; case 10: { o->state = 11; // slow down a bit (was going real fast from bow) o->xinertia *= 3; o->xinertia /= 4; o->yinertia *= 3; o->yinertia /= 4; } case 11: { o->yinertia += 0x20; ANIMATE_FWD(10); if (o->frame > 4) o->frame = 4; } break; case 20: // hit something { o->state = 21; o->timer = 0; o->damage = 0; o->xinertia = 0; o->yinertia = 0; } case 21: { o->timer++; if (o->timer > 30) o->invisible = (o->timer & 2); if (o->timer > 61) o->Delete(); } break; } LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_bute_dying(Object *o) { switch(o->state) { case 0: { o->flags &= ~(FLAG_SHOOTABLE | FLAG_IGNORE_SOLID | FLAG_SHOW_FLOATTEXT); o->damage = 0; o->frame = 0; o->animtimer = 0; o->state = 1; o->yinertia = -0x200; } case 1: { if (o->blockd && o->yinertia >= 0) { o->state = 2; o->timer = 0; o->frame = 1; } } break; case 2: { o->xinertia *= 8; o->xinertia /= 9; ANIMATE(3, 1, 2); if (++o->timer > 50) o->DealDamage(10000); } break; } o->yinertia += 0x20; LIMITY(0x5ff); } static bool run_bute_defeated(Object *o, int hp) { if (o->hp <= (1000 - hp)) { if (o->type == OBJ_MESA) { o->ChangeType(OBJ_MESA_DYING); } else { o->x -= (4 << CSF); o->y -= (4 << CSF); o->ChangeType(OBJ_BUTE_DYING); sound(SND_ENEMY_SQUEAK); XMOVE(-0x100); } ai_bute_dying(o); return 1; } return 0; } /* void c------------------------------() {} */ void ai_mesa(Object *o) { if (run_bute_defeated(o, MESA_HP)) return; switch(o->state) { case 0: { o->y += (4<state = 1; } case 1: { ANIMATE(40, 0, 1); FACEPLAYER; if (pdistlx(320<timer > 50) o->state = 10; } } break; case 10: { o->state = 11; o->timer = 0; o->frame = 2; // hand down int x = o->x + ((o->dir == LEFT) ? (7<y + (10<linkedobject = CreateObject(x, y, OBJ_MESA_BLOCK); o->linkedobject->linkedobject = o; } case 11: { if (++o->timer > 50) { o->state = 20; o->timer = 0; o->frame = 3; // hand up, throwing if (o->linkedobject) { Object *&block = o->linkedobject; block->y = (o->y - (4<xinertia = (o->dir == RIGHT) ? 0x400 : -0x400; block->yinertia = -0x400; block->state = 1; sound(SND_EM_FIRE); block->linkedobject = NULL; o->linkedobject = NULL; } } } break; case 20: { if (++o->timer > 20) { // throw again, if player still near o->state = 1; o->timer = 0; } } break; } o->yinertia += 0x55; LIMITY(0x5ff); } void ai_mesa_block(Object *o) { ANIMATE(0, 0, 1); switch(o->state) { case 0: // being held { if (!o->linkedobject || o->linkedobject->type == OBJ_MESA_DYING) { o->Delete(); } } break; case 1: // launched { if (++o->timer == 4) o->flags &= ~FLAG_IGNORE_SOLID; o->yinertia += 0x2A; LIMITY(0x5ff); if (o->blockd && o->yinertia >= 0) { sound(SND_BLOCK_DESTROY); o->Delete(); } } break; } if (o->deleted) { SmokeClouds(o, 3, 0, 0); effect(o->x, o->y, EFFECT_BOOMFLASH); } } /* void c------------------------------() {} */ void ai_deleet(Object *o) { // trigger counter if (o->hp < (1000 - DELEET_HP) && o->state < 2) { o->state = 2; o->timer = 0; o->frame = 2; o->flags |= FLAG_INVULNERABLE; sound(SND_CHEST_OPEN); } switch(o->state) { case 0: { o->state = 1; o->x += (TILE_W / 2) << CSF; o->y += (TILE_H / 2) << CSF; if (o->dir == LEFT) o->y += (8<x += (8<shaketime) o->timer2++; else o->timer2 = 0; o->frame = (o->timer2 & 2) ? 1 : 0; } break; case 2: { int counter = -1; switch(o->timer) { case 0: counter = 0; break; // 5 case 50: counter = 1; break; // 4 case 100: counter = 2; break; // 3 case 150: counter = 3; break; // 2 case 200: counter = 4; break; // 1 case 250: { o->state = 3; o->sprite = SPR_BBOX_PUPPET_1; o->invisible = true; sprites[o->sprite].bbox.x1 = -48; sprites[o->sprite].bbox.x2 = 48; sprites[o->sprite].bbox.y1 = -48; sprites[o->sprite].bbox.y2 = 48; o->damage = 12; quake(10); SmokeXY(o->x, o->y, 40, 48, 48); o->flags &= ~FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; if (o->dir == LEFT) { int x = (o->x >> CSF) / TILE_W; int y = ((o->y >> CSF) - 8) / TILE_H; map.tiles[x][y] = 0; map.tiles[x][y+1] = 0; } else { int x = ((o->x >> CSF) - 8) / TILE_W; int y = (o->y >> CSF) / TILE_H; map.tiles[x][y] = 0; map.tiles[x+1][y] = 0; } } break; } if (counter != -1) { CreateObject(o->x, o->y - (8<frame = counter; } o->timer++; } break; case 3: { // make the explosion sound and drop powerups o->Kill(); } break; } } void ai_rolling(Object *o) { if (o->state == 0) { // exploding out of blocks (Rollings in Heavy Press area) int mx = (o->CenterX() >> CSF) / TILE_W; int my = (o->CenterY() >> CSF) / TILE_H; if (map.tiles[mx][my]) map_ChangeTileWithSmoke(mx, my, 0, 8); o->state = 1; } switch(o->dir) { case LEFT: { o->xinertia -= 0x40; o->yinertia = 0; if (o->blockl) o->dir = UP; } break; case UP: { o->yinertia -= 0x40; o->xinertia = 0; if (o->blocku) o->dir = RIGHT; } break; case RIGHT: { o->xinertia += 0x40; o->yinertia = 0; if (o->blockr) o->dir = DOWN; } break; case DOWN: { o->yinertia += 0x40; o->xinertia = 0; if (o->blockd) o->dir = LEFT; } break; } ANIMATE(1, 0, 2); LIMITX(0x400); LIMITY(0x400); } /* void c------------------------------() {} */ // I don't think it does anything, it seems to be just an invisible marker // used to bring up the signs when you press DOWN in front of the statues. // But unlike OBJ_NULL, it can be positioned in-between a tile boundary. // There's also one on top of the clockroom sign on the Outer Wall. void ai_statue_base(Object *o) { if (o->state == 0) { o->state = 1; o->sprite = SPR_NULL; if (o->dir == LEFT) { o->x += (8 << CSF); } else if (o->dir == RIGHT) { o->y += (16 << CSF); } } } // frame is passed in the ANP as if it were a dir, and all of these state numbers can // also be set by the scripts, so they really shouldn't be messed with. void ai_statue(Object *o) { switch(o->state) { case 0: { o->frame = (o->dirparam / 10); o->state = 1; } break; case 10: { if (game.flags[o->id1]) { // already been destroyed o->state = 20; } else { o->state = 11; o->flags |= FLAG_SHOOTABLE; } } case 11: { if (o->hp < (1000 - STATUE_HP)) { Object *ns = CreateObject(o->x, o->y, o->type); ns->dirparam = (o->frame + 4) * 10; o->Kill(); } } break; case 20: { o->frame += 4; o->state = 1; } break; } } /* void c------------------------------() {} */ void ai_puppy_ghost(Object *o) { o->timer++; switch(o->state) { case 10: // disappear after talking { o->state = 11; o->timer = 2; sound(SND_TELEPORT); } case 11: { o->invisible = (o->timer & 2); if (o->timer > 50) o->Delete(); } break; } if ((o->timer % 8) == 1) { effect(random(o->Left(), o->Right()), o->Bottom(), EFFECT_GHOST_SPARKLE); } } /* void c------------------------------() {} */ ================================================ FILE: ai/hell/hell.fdh ================================================ //hash:513da2f0 //automatically generated by Makegen /* located in game.cpp */ //-----------------[referenced from ai/hell/hell.cpp]----------------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //-----------------[referenced from ai/hell/hell.cpp]----------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //-----------------[referenced from ai/hell/hell.cpp]----------------// void map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind); /* located in caret.cpp */ //-----------------[referenced from ai/hell/hell.cpp]----------------// Caret *effect(int x, int y, int effectno); /* located in ai/hell/hell.cpp */ //-----------------[referenced from ai/hell/hell.cpp]----------------// void ai_bute_flying(Object *o); void ai_bute_spawner(Object *o); void ai_bute_falling(Object *o); void ai_bute_sword(Object *o); void ai_bute_archer(Object *o); void ai_bute_arrow(Object *o); void ai_bute_dying(Object *o); static bool run_bute_defeated(Object *o, int hp); void ai_mesa(Object *o); void ai_mesa_block(Object *o); void ai_deleet(Object *o); void ai_rolling(Object *o); void ai_statue_base(Object *o); void ai_statue(Object *o); void ai_puppy_ghost(Object *o); /* located in ai/sym/smoke.cpp */ //-----------------[referenced from ai/hell/hell.cpp]----------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //-----------------[referenced from ai/hell/hell.cpp]----------------// void sound(int snd); /* located in common/misc.cpp */ //-----------------[referenced from ai/hell/hell.cpp]----------------// int random(int min, int max); ================================================ FILE: ai/last_cave/last_cave.cpp ================================================ #include "../stdai.h" #include "../plantation/plantation.fdh" // ai_droll_shot #include "../sym/sym.fdh" // ai_press #include "last_cave.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_CRITTER_HOPPING_RED, ai_critter_hopping_red); ONTICK(OBJ_LAVA_DRIP_SPAWNER, ai_lava_drip_spawner); ONTICK(OBJ_LAVA_DRIP, ai_lava_drip); ONTICK(OBJ_RED_BAT_SPAWNER, ai_red_bat_spawner); ONTICK(OBJ_RED_BAT, ai_red_bat); ONTICK(OBJ_RED_DEMON, ai_red_demon); ONTICK(OBJ_RED_DEMON_SHOT, ai_droll_shot); ONTICK(OBJ_PROXIMITY_PRESS_VERT, ai_proximity_press_vert); } /* void c------------------------------() {} */ void ai_proximity_press_vert(Object *o) { switch(o->state) { case 0: { if (pdistlx(8<blockd) { o->state = 10; o->animtimer = 0; o->frame = 1; } } break; case 10: { if (o->frame < 2) ANIMATE_FWD(2); if (o->blockd) { if (o->frame >= 2) // make sure eye fully open { SmokeSide(o, 4, DOWN); quake(10); } o->flags |= FLAG_SOLID_BRICK; o->damage = 0; o->state = 11; o->frame = 0; } else { if (player->Top() > o->CenterY()) { o->flags &= ~FLAG_SOLID_BRICK; o->damage = 127; } else { o->flags |= FLAG_SOLID_BRICK; o->damage = 0; } } } break; } if (o->state >= 5) { o->yinertia += 0x80; LIMITY(0x5ff); } } /* void c------------------------------() {} */ void ai_critter_hopping_red(Object *o) { switch(o->state) { case 0: { FACEPLAYER; o->frame = 0; if (o->shaketime) { o->state = 2; o->timer = 0; } else if (++o->timer >= 8) { if (pdistly((5 * TILE_H) << CSF)) { if (pdistlx((6 * TILE_W) << CSF)) { o->state = 1; o->timer = 0; } else if (pdistlx((9 * TILE_W) << CSF)) { o->frame = 1; } } } } break; case 1: // prepare to jump { if (++o->timer > 8) { o->state = 2; o->frame = 2; sound(SND_ENEMY_JUMP); o->yinertia = -0x5ff; o->xinertia = (o->dir == RIGHT) ? 0x200 : -0x200; } } break; case 2: // in air { if (o->blockd && o->yinertia > 0) { sound(SND_THUD); o->xinertia = 0; o->state = 0; o->timer = 0; o->frame = 1; } } break; } o->yinertia += 0x55; LIMITY(0x5ff); } /* void c------------------------------() {} */ // lava drip spawner in Last Cave (hidden) and used extensively in Final Cave. // the id1 tag sets the frequency of the drip, the id2 tag sets an amount to // delay the first drip in order to desync a group of drips. void ai_lava_drip_spawner(Object *o) { switch(o->state) { case 0: { o->sprite = SPR_LAVA_DRIP; o->x += (4 << CSF); o->timer = (o->id2 - o->id1); o->state = 1; } case 1: { if (--o->timer < 0) { o->state = 2; o->animtimer = 0; o->timer2 = 0; } } break; case 2: { o->display_xoff = (++o->timer2 & 2) ? 0 : 1; ANIMATE_FWD(10); if (o->frame > 3) { o->frame = 0; o->state = 1; o->timer = o->id1; ai_lava_drip(CreateObject(o->x, o->y, OBJ_LAVA_DRIP)); } } break; } } void ai_lava_drip(Object *o) { o->frame = 4; o->yinertia += 0x40; LIMITY(0x5ff); if (o->blockd || \ (++o->timer > 10 && o->CheckAttribute(&sprites[o->sprite].block_u, TA_WATER))) { for(int i=0;i<3;i++) { Caret *c = effect(o->CenterX(), o->Bottom(), EFFECT_LAVA_SPLASH); c->xinertia = random(-0x400, 0x400); c->yinertia = random(-0x400, 0); } if (o->onscreen) sound(SND_BUBBLE); o->Delete(); } } /* void c------------------------------() {} */ void ai_red_bat_spawner(Object *o) { switch(o->state) { case 0: { o->state = 1; o->timer = random(0, 500); } case 1: { if (--o->timer < 0) { Object *bat = CreateObject(o->CenterX(), \ o->CenterY() + random(-32<x -= (bat->Width() / 2); bat->y -= (bat->Height() / 2); bat->dir = o->dir; o->state = 0; } } } } void ai_red_bat(Object *o) { ANIMATE(1, 0, 2); switch(o->state) { case 0: { o->state = 1; o->ymark = o->y; o->timer = random(0, 50); } case 1: { if (--o->timer < 0) { o->state = 2; o->yinertia = 0x400; } else break; } case 2: { o->yinertia += (o->y < o->ymark) ? 0x10 : -0x10; LIMITY(0x300); XMOVE(0x100); } break; } if (o->x < 0 || o->x > (map.xsize * TILE_W) << CSF) { effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); o->Delete(); } } /* void c------------------------------() {} */ void ai_red_demon(Object *o) { switch(o->state) { case 0: { o->xmark = o->x; o->xinertia = 0; o->frame = 0; o->state = 1; } case 1: { ANIMATE(20, 0, 1); FACEPLAYER; } break; case 10: // prepare to jump { o->flags |= FLAG_SHOOTABLE; o->state = 11; o->frame = 3; o->timer = 0; } case 11: { switch(++o->timer) { case 30: case 40: case 50: { o->frame = 4; EmFireAngledShot(o, OBJ_RED_DEMON_SHOT, 0, 0x800); sound(SND_EM_FIRE); } break; case 34: case 44: case 54: { o->frame = 3; } break; case 61: { o->state = 20; o->timer = 0; o->frame = 2; } break; } } break; case 20: // pause before jump { if (++o->timer > 20) { o->state = 21; o->timer = 0; o->frame = 5; o->yinertia = -0x5ff; o->xinertia = (o->CenterX() < player->CenterX()) ? 0x100 : -0x100; } } break; case 21: // in air { switch(++o->timer) { case 30: case 40: case 50: { o->frame = 6; EmFireAngledShot(o, OBJ_RED_DEMON_SHOT, 0, 0x800); sound(SND_EM_FIRE); } break; case 34: case 44: { o->frame = 5; } break; case 54: { o->frame = 7; } break; } if (o->blockd && o->yinertia >= 0) { quake(10); o->state = 22; o->timer = 0; o->frame = 2; } } break; case 22: // landed { o->xinertia /= 2; if (++o->timer > 22) { o->state = 10; } } break; // defeated/turned to stone (set by script) case 50: { o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; if (o->blockd) { o->state = 51; o->frame = 2; game.quaketime = 10; SmokeClouds(o, 12, 4, 4); o->SpawnXP(19); sound(SND_BIG_CRASH); // needed to prevent status bars from not disappearing game.bossbar.object = NULL; } } break; case 51: { o->xinertia *= 7; o->xinertia /= 8; o->frame = 8; } break; } if (o->state < 50) { FACEPLAYER; } o->yinertia += 0x20; LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_press_vert(Object *o) { switch(o->state) { case 0: { o->state = 1; o->y -= (4 << CSF); if (pdistlx((8<state = 5; } } break; case 5: { if (o->blockd) { o->state = 10; o->animtimer = 0; o->frame = 1; } } break; case 10: { ANIMATE_FWD(2); if (o->frame > 2) o->frame = 2; if (player->y > o->y) o->flags |= FLAG_SOLID_BRICK; } break; } } ================================================ FILE: ai/last_cave/last_cave.fdh ================================================ //hash:6dac387f //automatically generated by Makegen /* located in game.cpp */ //------------[referenced from ai/last_cave/last_cave.cpp]-----------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //------------[referenced from ai/last_cave/last_cave.cpp]-----------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //------------[referenced from ai/last_cave/last_cave.cpp]-----------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //------------[referenced from ai/last_cave/last_cave.cpp]-----------// void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/last_cave/last_cave.cpp */ //------------[referenced from ai/last_cave/last_cave.cpp]-----------// void ai_proximity_press_vert(Object *o); void ai_critter_hopping_red(Object *o); void ai_lava_drip_spawner(Object *o); void ai_lava_drip(Object *o); void ai_red_bat_spawner(Object *o); void ai_red_bat(Object *o); void ai_red_demon(Object *o); void ai_press_vert(Object *o); /* located in ai/sym/smoke.cpp */ //------------[referenced from ai/last_cave/last_cave.cpp]-----------// void SmokeSide(Object *o, int nclouds, int dir); void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //------------[referenced from ai/last_cave/last_cave.cpp]-----------// void sound(int snd); /* located in common/misc.cpp */ //------------[referenced from ai/last_cave/last_cave.cpp]-----------// int random(int min, int max); ================================================ FILE: ai/maze/balrog_boss_missiles.cpp ================================================ #include "../stdai.h" #include "../balrog_common.h" #include "balrog_boss_missiles.fdh" #define STATE_CHARGE 10 #define STATE_JUMP_FIRE 20 #define STATE_PAUSE 30 #define STATE_CAUGHT_PLAYER 40 INITFUNC(AIRoutines) { ONTICK(OBJ_BALROG_BOSS_MISSILES, ai_balrog_boss_missiles); ONDEATH(OBJ_BALROG_BOSS_MISSILES, ondeath_balrog_boss_missiles); ONTICK(OBJ_BALROG_MISSILE, ai_balrog_missile); } /* void c------------------------------() {} */ void ai_balrog_boss_missiles(Object *o) { // try to catch player switch(o->state) { case STATE_CHARGE+1: case STATE_JUMP_FIRE+1: { if (pdistlx(12<state = STATE_CAUGHT_PLAYER; } } break; } // main state engine switch(o->state) { case 0: { o->nxflags |= NXFLAG_FOLLOW_SLOPE; FACEPLAYER; o->state = 1; o->frame = 0; o->timer = 0; } case 1: { if (++o->timer > 30) { o->state = STATE_CHARGE; o->timer2 ^= 1; // affects how we react if we miss the player } } break; // charge the player case STATE_CHARGE: { o->timer = 0; o->frame = 9; o->animtimer = 0; o->state++; } case STATE_CHARGE+1: { XACCEL(0x20); walking_animation(o); // stuck against the wall? if ((o->dir == LEFT && o->blockl) || \ (o->dir == RIGHT && o->blockr)) { if (++o->timer3 > 5) o->state = STATE_JUMP_FIRE; } else { o->timer3 = 0; } // he behaves differently after every other time he pauses if (o->timer2) { if (++o->timer > 75) { o->frame = 0; o->state = STATE_PAUSE; } } else { if (++o->timer > 24) o->state = STATE_JUMP_FIRE; } } break; // jump and fire missiles case STATE_JUMP_FIRE: { o->state++; o->timer = 0; o->frame = 3; o->yinertia = -0x5ff; } case STATE_JUMP_FIRE+1: { FACEPLAYER; // fire missiles if (++o->timer < 30) { if ((o->timer % 6) == 1) { sound(SND_EM_FIRE); Object *shot = SpawnObjectAtActionPoint(o, OBJ_BALROG_MISSILE); shot->dir = o->dir; shot->xinertia = 0x100; } } // landed? if (o->blockd && o->yinertia >= 0) { o->frame = 2; o->state = STATE_PAUSE; quake(30); } } break; // stop for a moment case STATE_PAUSE: { o->xinertia *= 4; o->xinertia /= 5; if (o->xinertia != 0) break; o->state = 0; } break; case STATE_CAUGHT_PLAYER: // caught player { if (balrog_toss_player_away(o)) o->state = 0; } break; } o->yinertia += 0x20; LIMITX(0x300); LIMITY(0x5ff); } void ondeath_balrog_boss_missiles(Object *o) { o->xinertia = 0; } static void walking_animation(Object *o) { if (++o->animtimer > 3) { o->animtimer = 0; o->frame++; if (o->frame == 12) { sound(SND_THUD); } else if (o->frame > 12) { o->frame = 9; } } } /* void c------------------------------() {} */ void ai_balrog_missile(Object *o) { if ((o->dir == RIGHT && o->blockr) || \ (o->dir == LEFT && o->blockl)) { SmokeClouds(o, 3, 0, 0); effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); sound(SND_MISSILE_HIT); o->Delete(); return; } if (o->state == 0) { // recoil in oppisite direction o->xinertia = random(-2, -1) << CSF; if (o->dir == LEFT) o->xinertia = -o->xinertia; o->yinertia = random(-2, 0) << CSF; o->state = 1; } XACCEL(0x20); if ((++o->timer2 % 4) == 1) { effect(o->CenterX() - o->xinertia, o->CenterY(), EFFECT_SMOKETRAIL_SLOW); } // heat-seeking at start, then level out straight if (o->timer2 < 50) { if (o->y < player->y) o->yinertia += 0x20; else o->yinertia -= 0x20; } else { o->yinertia = 0; } // flash o->frame ^= 1; if (o->xinertia < -0x400) o->xinertia = -0x600; if (o->xinertia > 0x400) o->xinertia = 0x600; } ================================================ FILE: ai/maze/balrog_boss_missiles.fdh ================================================ //hash:ce2d6225 //automatically generated by Makegen /* located in game.cpp */ //---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------// void quake(int quaketime, int snd); /* located in caret.cpp */ //---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------// Caret *effect(int x, int y, int effectno); /* located in player.cpp */ //---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------// void hurtplayer(int damage); /* located in ai/ai.cpp */ //---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------// Object *SpawnObjectAtActionPoint(Object *o, int otype); /* located in ai/maze/balrog_boss_missiles.cpp */ //---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------// void ai_balrog_boss_missiles(Object *o); void ondeath_balrog_boss_missiles(Object *o); static void walking_animation(Object *o); void ai_balrog_missile(Object *o); /* located in ai/sym/smoke.cpp */ //---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in ai/balrog_common.cpp */ //---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------// void balrog_grab_player(Object *o); bool balrog_toss_player_away(Object *o); /* located in sound/sound.cpp */ //---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------// void sound(int snd); /* located in common/misc.cpp */ //---------[referenced from ai/maze/balrog_boss_missiles.cpp]--------// int random(int min, int max); ================================================ FILE: ai/maze/critter_purple.cpp ================================================ #include "../stdai.h" #include "critter_purple.fdh" #define STATE_IDLE 1 // waiting for player to come near #define STATE_PREPARE_JUMP 2 // on ground, prepare to jump #define STATE_JUMP 3 // jumping up #define STATE_HOVER 4 // hovering and firing #define STATE_END_JUMP 5 // falling back down #define CRITTER_DAMAGE 2 // normal damage #define CRITTER_FALL_DAMAGE 3 // damage if it falls on you INITFUNC(AIRoutines) { ONTICK(OBJ_CRITTER_SHOOTING_PURPLE, ai_critter_shooting_purple); ONTICK(OBJ_CRITTER_SHOT, ai_generic_angled_shot); } /* void c------------------------------() {} */ // used only for purple ones in maze void ai_critter_shooting_purple(Object *o) { switch(o->state) { case 0: o->state = STATE_IDLE; o->damage = CRITTER_DAMAGE; case STATE_IDLE: { o->frame = 0; // assume not at attention if (o->timer >= 8) { if (pdistlx(96<state = STATE_PREPARE_JUMP; o->frame = 0; o->timer = 0; } else { // no, but stand at "attention" o->frame = 1; } } } else { o->timer++; } // also attack if shot if (o->shaketime) { o->state = STATE_PREPARE_JUMP; o->frame = 0; o->timer = 0; } } break; case STATE_PREPARE_JUMP: { o->frame = 1; if (++o->timer > 8) { FACEPLAYER; o->state = STATE_JUMP; o->timer = 0; o->frame = 2; sound(SND_ENEMY_JUMP); o->yinertia = -0x5ff; } } break; case STATE_JUMP: { if (o->yinertia > 0x100 || \ (o->blockd && ++o->timer > 16)) // failsafe { o->ymark = o->y; o->state = STATE_HOVER; o->frame = 3; o->timer = 0; o->CurlyTargetHere(60, 100); } } break; case STATE_HOVER: { // sinusoidal hover o->yinertia += (o->y > o->ymark) ? -0x10 : 0x10; LIMITY(0x200); FACEPLAYER; ANIMATE(0, 3, 5); // time to end flight? if (++o->timer > 60 || o->blocku) { o->damage = CRITTER_FALL_DAMAGE; o->state = STATE_END_JUMP; o->frame = 2; break; } if ((o->timer % 4) == 1) sound(SND_CRITTER_FLY); if ((o->timer % 30) == 6) { EmFireAngledShot(o, OBJ_CRITTER_SHOT, 6, 0x600); sound(SND_EM_FIRE); } if (o->blockd) o->yinertia = -0x200; } break; case STATE_END_JUMP: { if (o->blockd) { o->damage = 2; o->xinertia = 0; o->timer = 0; o->frame = 0; o->state = 0; sound(SND_THUD); } } break; } if (o->state != STATE_HOVER) { o->yinertia += 0x20; LIMITY(0x5ff); } } ================================================ FILE: ai/maze/critter_purple.fdh ================================================ //hash:ef256ea0 //automatically generated by Makegen /* located in trig.cpp */ //------------[referenced from ai/maze/critter_purple.cpp]-----------// void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/maze/critter_purple.cpp */ //------------[referenced from ai/maze/critter_purple.cpp]-----------// void ai_critter_shooting_purple(Object *o); /* located in sound/sound.cpp */ //------------[referenced from ai/maze/critter_purple.cpp]-----------// void sound(int snd); ================================================ FILE: ai/maze/gaudi.cpp ================================================ #include "../stdai.h" #include "gaudi.fdh" #define GAUDI_HP 15 #define GAUDI_FLYING_HP 15 #define GAUDI_ARMORED_HP 15 #define PLAYER_NEAR_ENOUGH() (pdistlx(SCREEN_WIDTH << CSF) && pdistly(SCREEN_HEIGHT << CSF)) INITFUNC(AIRoutines) { ONTICK(OBJ_GAUDI, ai_gaudi); ONTICK(OBJ_GAUDI_ARMORED, ai_gaudi_armored); ONTICK(OBJ_GAUDI_ARMORED_SHOT, ai_gaudi_armored_shot); ONTICK(OBJ_GAUDI_FLYING, ai_gaudi_flying); ONTICK(OBJ_GAUDI_FLYING_SHOT, ai_generic_angled_shot); ONTICK(OBJ_GAUDI_DYING, ai_gaudi_dying); } /* void c------------------------------() {} */ void ai_gaudi(Object *o) { if (o->hp <= (1000 - GAUDI_HP)) { o->ChangeType(OBJ_GAUDI_DYING); ai_gaudi_dying(o); return; } if (!PLAYER_NEAR_ENOUGH()) return; switch(o->state) { case 0: { // Gaudi's in shop if (o->flags & FLAG_SCRIPTONACTIVATE) { o->damage = 0; o->flags &= ~FLAG_SHOOTABLE; } o->xinertia = 0; o->state = 1; } case 1: { o->frame = 0; randblink(o, 1, 20, 100); if (!random(0, 100)) { if (random(0, 1)) { o->dir ^= 1; } else { o->state = 10; } } } break; case 10: // walking { o->state = 11; o->timer = random(25, 100); // how long to walk for o->frame = 2; o->animtimer = 0; } case 11: { ANIMATE(3, 2, 5); XMOVE(0x200); // time to stop walking? if (--o->timer <= 0) o->state = 0; // try to jump over any walls we come to if ((o->xinertia < 0 && o->blockl) || \ (o->xinertia > 0 && o->blockr)) { o->yinertia = -0x5ff; o->frame = 2; o->state = 20; if (!player->inputs_locked) // no sound during ending cutscene sound(SND_ENEMY_JUMP); } } break; case 20: // jumping { // landed? if (o->yinertia >= 0 && o->blockd) { o->xinertia = 0; o->state = 21; o->frame = 12; o->timer = 0; if (!player->inputs_locked) // no sound during ending cutscene sound(SND_THUD); } // count how long we've been touching the wall // we're trying to jump over..if it's not working // go the other way. if ((o->dir == LEFT && o->blockl) || \ (o->dir == RIGHT && o->blockr)) { if (++o->timer2 > 10) { o->timer2 = 0; o->dir ^= 1; } } else { o->timer2 = 0; } XMOVE(0x100); } break; case 21: // landed from jump { if (++o->timer > 10) o->state = 0; } break; } o->yinertia += 0x40; LIMITY(0x5ff); } void ai_gaudi_dying(Object *o) { switch(o->state) { case 0: // just died (initilizing) { o->flags &= ~(FLAG_SHOOTABLE | FLAG_IGNORE_SOLID | FLAG_SHOW_FLOATTEXT); o->damage = 0; o->sprite = SPR_GAUDI; o->frame = 9; o->yinertia = -0x200; XMOVE(-0x100); sound(SND_ENEMY_HURT_SMALL); o->state = 1; } break; case 1: // flying backwards through air { if (o->blockd && o->yinertia >= 0) { o->frame = 10; o->state = 2; o->timer = 0; } } break; case 2: // landed, shake { o->xinertia *= 8; o->xinertia /= 9; ANIMATE(3, 10, 11); if (++o->timer > 50) { // this deletes object while generating smoke effects and boom o->DealDamage(10000); } } break; } o->yinertia += 0x20; LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_gaudi_flying(Object *o) { if (o->hp <= (1000 - GAUDI_FLYING_HP)) { if (o->dir == LEFT) o->x -= (2 << CSF); else o->x += (2 << CSF); o->ChangeType(OBJ_GAUDI_DYING); ai_gaudi_dying(o); return; } if (!PLAYER_NEAR_ENOUGH()) return; switch(o->state) { case 0: { vector_from_angle(random(0, 255), (1 << CSF), &o->xinertia, &o->yinertia); o->xmark = o->x + (o->xinertia * 8); o->ymark = o->y + (o->yinertia * 8); o->timer2 = 120; } case 1: { o->timer = random(70, 150); o->state = 2; } case 2: { if (!--o->timer) { o->state = 3; o->frame |= 0x02; // switch us into using flashing purple animation } } break; case 3: // preparing to fire { o->timer++; if (++o->timer > 30) { EmFireAngledShot(o, OBJ_GAUDI_FLYING_SHOT, 6, 0x500); sound(SND_EM_FIRE); o->state = 1; o->frame &= 1; // stop flashing purple } } } o->frame ^= 1; // animate wings FACEPLAYER; // sinusoidal circling pattern o->xinertia += (o->x > o->xmark) ? -0x10 : 0x10; o->yinertia += (o->y > o->ymark) ? -0x10 : 0x10; LIMITX(0x200); LIMITY(0x200); } /* void c------------------------------() {} */ void ai_gaudi_armored(Object *o) { if (o->hp <= (1000 - GAUDI_ARMORED_HP)) { o->ChangeType(OBJ_GAUDI_DYING); ai_gaudi_dying(o); return; } if (!PLAYER_NEAR_ENOUGH()) return; FACEPLAYER; //debug("%d", o->state); //debugVline(o->x, 0, 0, 255); //debugVline(o->xmark, 0, 255, 0); switch(o->state) { case 0: { o->xmark = o->x; o->state = 1; } case 1: { o->frame = 0; o->xinertia = 0; if (++o->timer >= 5) { if (pdistlx(192 << CSF) && pdistly(160 << CSF)) { // begin hopping o->state = 10; o->timer = 0; o->frame = 1; } } } break; case 10: // on ground inbetween hops { if (++o->timer > 3) { sound(SND_ENEMY_JUMP); o->frame = 2; o->timer = 0; if (++o->timer2 < 3) { // hopping back and forth o->state = 20; o->yinertia = -0x200; o->xinertia = (o->x < o->xmark) ? 0x200 : -0x200; } else { // big jump and attack o->state = 30; o->yinertia = -0x600; o->xinertia = (o->x < o->xmark) ? 0x80 : -0x80; o->timer2 = 0; } } } break; case 20: // jumping (small hop) { // landed? if (o->blockd && o->yinertia >= 0) { // drop sub-pixel precision // (required to maintain stability of back-and-forth sequence). o->y >>= CSF; o->y <<= CSF; sound(SND_THUD); o->state = 40; o->frame = 1; o->timer = 0; } } break; case 30: // jumping (big jump + attack) { o->timer++; // throw attacks at player if (o->timer == 30 || o->timer == 40) { EmFireAngledShot(o, OBJ_GAUDI_ARMORED_SHOT, 6, 0x600); sound(SND_EM_FIRE); o->frame = 3; o->CurlyTargetHere(); } // stop throwing animation if (o->timer == 35 || o->timer == 45) o->frame = 2; if (o->blockd && o->yinertia > 0) { sound(SND_THUD); o->state = 40; o->frame = 1; o->timer = 0; } } break; case 40: // landed { o->xinertia *= 7; o->xinertia /= 8; if (++o->timer >= 2) { //stat("dtt= %d", abs(o->xmark - o->x)>>CSF); o->frame = 0; o->xinertia = 0; o->state = 1; o->timer = 0; } } break; } o->yinertia += 0x33; LIMITY(0x5ff); } void ai_gaudi_armored_shot(Object *o) { ANIMATE(0, 0, 2); switch(o->state) { case 0: { bool bounced = false; if (o->blockl && o->xinertia <= 0) { o->xinertia = 0x200; bounced = true; } if (o->blockr && o->xinertia >= 0) { o->xinertia = -0x200; bounced = true; } if (o->blockd && o->yinertia >= 0) { o->yinertia = -0x200; bounced = true; } if (o->blocku && o->yinertia <= 0) { o->yinertia = 0x200; bounced = true; } if (bounced) { o->state = 1; sound(SND_TINK); } } break; case 1: { o->yinertia += 0x40; LIMITY(0x5ff); if (o->blockd && o->yinertia >= 0) { effect(o->CenterX(), o->CenterY(), EFFECT_STARPOOF); o->Delete(); return; } } break; } } ================================================ FILE: ai/maze/gaudi.fdh ================================================ //hash:f9425f6f //automatically generated by Makegen /* located in caret.cpp */ //-----------------[referenced from ai/maze/gaudi.cpp]---------------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //-----------------[referenced from ai/maze/gaudi.cpp]---------------// void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys); void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/ai.cpp */ //-----------------[referenced from ai/maze/gaudi.cpp]---------------// void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in ai/maze/gaudi.cpp */ //-----------------[referenced from ai/maze/gaudi.cpp]---------------// void ai_gaudi(Object *o); void ai_gaudi_dying(Object *o); void ai_gaudi_flying(Object *o); void ai_gaudi_armored(Object *o); void ai_gaudi_armored_shot(Object *o); /* located in sound/sound.cpp */ //-----------------[referenced from ai/maze/gaudi.cpp]---------------// void sound(int snd); /* located in common/misc.cpp */ //-----------------[referenced from ai/maze/gaudi.cpp]---------------// int random(int min, int max); ================================================ FILE: ai/maze/labyrinth_m.cpp ================================================ #include "../stdai.h" #include "labyrinth_m.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_FIREWHIRR, ai_firewhirr); ONTICK(OBJ_FIREWHIRR_SHOT, ai_firewhirr_shot); ONTICK(OBJ_GAUDI_EGG, ai_gaudi_egg); ONTICK(OBJ_FUZZ_CORE, ai_fuzz_core); ONTICK(OBJ_FUZZ, ai_fuzz); AFTERMOVE(OBJ_FUZZ, aftermove_fuzz); ONTICK(OBJ_BUYOBUYO_BASE, ai_buyobuyo_base); ONTICK(OBJ_BUYOBUYO, ai_buyobuyo); } /* void c------------------------------() {} */ void ai_firewhirr(Object *o) { Object *shot; FACEPLAYER; switch(o->state) { case 0: o->state = 1; o->timer = random(0, 50); o->ymark = o->y; //o->yinertia = -0x200; case 1: if (!o->timer) { o->state = 10; o->yinertia = -0x200; } else o->timer--; case 10: o->frame ^= 1; o->yinertia += (o->y < o->ymark) ? 0x10 : -0x10; LIMITY(0x200); // inc time-to-fire while player near if (pdistly(80 << CSF)) { if (o->dir==LEFT && player->x < o->x && pdistlx(160 << CSF)) o->timer2++; if (o->dir==RIGHT && player->x > o->x && pdistlx(160 << CSF)) o->timer2++; } // if time to fire, spawn a shot if (o->timer2 > 20) { shot = SpawnObjectAtActionPoint(o, OBJ_FIREWHIRR_SHOT); o->timer2 = -100 + random(0, 20); // tell Curly to acquire us as a target if (o->onscreen) { o->CurlyTargetHere(); } } break; } } void ai_firewhirr_shot(Object *o) { ANIMATE(1, 0, 2); o->x += (o->dir==LEFT) ? -0x200 : 0x200; if ((o->dir==LEFT && o->blockl) || (o->dir==RIGHT && o->blockr)) { if (o->dir == RIGHT) o->x += o->Width(); effect(o->x, o->CenterY(), EFFECT_FISHY); o->Delete(); } } /* void c------------------------------() {} */ void ai_gaudi_egg(Object *o) { if (!o->state) { if (o->dir==LEFT) { // on floor // align properly with ground o->y -= (4<x -= (4<blocku) { o->y -= (14 << CSF); } } o->state = 1; } else if (o->state == 1) { if (o->hp < 90) { o->frame = 1; o->damage = 0; o->flags &= ~FLAG_SHOOTABLE; SmokeSide(o, 6, (o->dir==LEFT)?DOWN:UP); o->SpawnPowerups(); sound(objprop[o->type].death_sound); o->state = 2; } } } /* void c------------------------------() {} */ void ai_fuzz_core(Object *o) { ANIMATE(2, 0, 1); switch(o->state) { case 0: { // spawn mini-fuzzes int angle = 120; for(int i=0;i<5;i++) { Object *f = CreateObject(o->CenterX(), o->CenterY(), OBJ_FUZZ); f->linkedobject = o; f->angle = angle; angle += (256 / 5); } o->timer = random(1, 50); o->state = 1; } case 1: // de-syncs the Y positions when multiple cores are present at once { if (--o->timer <= 0) { o->state = 2; o->yinertia = 0x300; o->ymark = o->y; } } break; case 2: { FACEPLAYER; if (o->y > o->ymark) o->yinertia -= 0x10; if (o->y < o->ymark) o->yinertia += 0x10; LIMITY(0x355); } break; } } void ai_fuzz(Object *o) { FACEPLAYER; switch(o->state) { case 0: { o->angle += 4; if (!o->linkedobject) { o->xinertia = random(-0x200, 0x200); o->yinertia = random(-0x200, 0x200); o->state = 1; } } break; // base destroyed, simple sinusoidal player-seek case 1: { o->xinertia += (o->x > player->x) ? -0x20 : 0x20; o->yinertia += (o->y > player->y) ? -0x20 : 0x20; LIMITX(0x800); LIMITY(0x200); } break; } } void aftermove_fuzz(Object *o) { if (o->state == 0 && o->linkedobject) { vector_from_angle(o->angle, (20 << CSF), &o->x, NULL); vector_from_angle(o->angle, (32 << CSF), NULL, &o->y); o->x += o->linkedobject->CenterX() - (o->Width() / 2); o->y += o->linkedobject->CenterY() - (o->Height() / 2); } } /* void c------------------------------() {} */ #define BUYOBUYO_BASE_HP 60 void ai_buyobuyo_base(Object *o) { /*if (o->onscreen) { debug("state: %d", o->state); debug("timer: %d", o->timer); debug("timer2: %d", o->timer2); }*/ if (o->state < 3 && o->hp < (1000 - BUYOBUYO_BASE_HP)) { SmokeClouds(o, objprop[o->type].death_smoke_amt, 8, 8); effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); o->SpawnPowerups(); o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; o->state = 10; o->frame = 2; } switch(o->state) { case 0: { // ceiling has different bounding box and action point if (o->dir == RIGHT) o->sprite = SPR_BUYOBUYO_BASE_CEILING; o->state = 1; o->timer = 10; } case 1: { if (pdistlx(0x14000)) { if ((o->dir == LEFT && pdistly2(0x14000, 0x2000)) || \ (o->dir == RIGHT && pdistly2(0x2000, 0x14000))) { if (--o->timer < 0) { o->state = 2; o->timer = 0; o->animtimer = 0; } } } } break; case 2: { ANIMATE(3, 0, 1); if (++o->timer > 10) { Object *buyo = SpawnObjectAtActionPoint(o, OBJ_BUYOBUYO); buyo->dir = o->dir; sound(SND_EM_FIRE); o->frame = 0; o->CurlyTargetHere(); // cyclic: three firings then pause o->state = 1; if (++o->timer2 > 2) { o->timer = 100; o->timer2 = 0; } else { o->timer = 20; } } } break; } } void ai_buyobuyo(Object *o) { bool deleteme = false; ANIMATE(6, 0, 1); switch(o->state) { case 0: { // shoot up down at player... o->yinertia = (o->dir == LEFT) ? -0x600 : 0x600; o->state = 1; o->timer = 0; } case 1: { o->timer++; // inc fly time // reached height of player yet? if (pdistly(0x2000)) { o->state = 2; ai_buyobuyo(o); return; } } break; case 2: { // this slight "minimum fly time" keeps the underwater ones from // smacking into the floor if the player is underwater with them if (++o->timer > 3) { FACEPLAYER; o->xmark = o->x; o->ymark = o->y; o->xinertia = random(0, 1) ? 0x200 : -0x200; o->yinertia = random(0, 1) ? 0x200 : -0x200; o->state = 3; } } break; case 3: { if (o->x > o->xmark) o->xinertia -= 0x20; if (o->x < o->xmark) o->xinertia += 0x20; if (o->y > o->ymark) o->yinertia -= 0x20; if (o->y < o->ymark) o->yinertia += 0x20; LIMITX(0x400); LIMITY(0x400); // move the point we are bobbling around o->xmark += (o->dir == LEFT) ? -(1 << CSF) : (1 << CSF); //debugVline(o->xmark, 0, 0xff, 0); if (++o->timer > 300) deleteme = true; } break; } if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0) || \ (o->blocku && o->yinertia < 0) || \ (o->blockd && o->yinertia > 0)) { deleteme = true; } if (deleteme) { effect(o->CenterX(), o->CenterY(), EFFECT_STARPOOF); o->Delete(); return; } } ================================================ FILE: ai/maze/labyrinth_m.fdh ================================================ //hash:00879ec8 //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------[referenced from ai/maze/labyrinth_m.cpp]------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //--------------[referenced from ai/maze/labyrinth_m.cpp]------------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //--------------[referenced from ai/maze/labyrinth_m.cpp]------------// void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys); /* located in ai/ai.cpp */ //--------------[referenced from ai/maze/labyrinth_m.cpp]------------// Object *SpawnObjectAtActionPoint(Object *o, int otype); /* located in ai/maze/labyrinth_m.cpp */ //--------------[referenced from ai/maze/labyrinth_m.cpp]------------// void ai_firewhirr(Object *o); void ai_firewhirr_shot(Object *o); void ai_gaudi_egg(Object *o); void ai_fuzz_core(Object *o); void ai_fuzz(Object *o); void aftermove_fuzz(Object *o); void ai_buyobuyo_base(Object *o); void ai_buyobuyo(Object *o); /* located in ai/sym/smoke.cpp */ //--------------[referenced from ai/maze/labyrinth_m.cpp]------------// void SmokeSide(Object *o, int nclouds, int dir); void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //--------------[referenced from ai/maze/labyrinth_m.cpp]------------// void sound(int snd); /* located in common/misc.cpp */ //--------------[referenced from ai/maze/labyrinth_m.cpp]------------// int random(int min, int max); ================================================ FILE: ai/maze/maze.cpp ================================================ #include "../stdai.h" #include "maze.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_BLOCK_MOVEH, ai_block_moveh); ONTICK(OBJ_BLOCK_MOVEV, ai_block_movev); ONTICK(OBJ_BOULDER, ai_boulder); GENERIC_NPC_NOFACEPLAYER(OBJ_GAUDI_SHOPKEEP); } /* void c------------------------------() {} */ void ai_block_moveh(Object *o) { int px = player->CenterX(); int objx = o->CenterX(); switch(o->state) { case 0: o->flags |= FLAG_SOLID_BRICK; o->smushdamage = 100; o->state = (o->dir == LEFT) ? 10:20; break; case 10: // at right edge, ready to travel left if (((px > objx) && (px - objx) < 0x3200) || \ ((px < objx) && (objx - px) < 0x32000)) { if (pdistly(0x3200)) { o->state = 30; o->timer = 0; } } break; case 20: // at left edge, ready to travel right if (((px > objx) && (px - objx) < 0x32000) || \ ((px < objx) && (objx - px) < 0x3200)) { if (pdistly(0x3200)) { o->state = 30; o->timer = 0; } } break; case 30: // traveling { XACCEL(0x20); LIMITX(0x200); // hit edge if ((o->dir == RIGHT && o->blockr) || (o->dir == LEFT && o->blockl)) { SmokeSide(o, 4, o->dir); quake(10); o->xinertia = 0; o->dir ^= 1; o->state = (o->dir==LEFT) ? 10 : 20; } if ((++o->timer % 10) == 6) sound(SND_BLOCK_MOVE); } break; } } void ai_block_movev(Object *o) { int py = player->CenterY(); int objy = o->CenterY(); switch(o->state) { case 0: o->flags |= FLAG_SOLID_BRICK; o->smushdamage = 100; o->dir = (o->dir == LEFT) ? UP : DOWN; o->state = (o->dir == DOWN) ? 10 : 20; break; case 10: // at top edge, ready to travel down if (((py > objy) && (py - objy) < 0x32000) || \ ((py < objy) && (objy - py) < 0x3200)) { if (pdistlx(0x3200)) { o->state = 30; o->timer = 0; } } break; case 20: // at bottom edge, ready to travel up if (((py > objy) && (py - objy) < 0x3200) || \ ((py < objy) && (objy - py) < 0x32000)) { if (pdistlx(0x3200)) { o->state = 30; o->timer = 0; } } break; case 30: // traveling { YACCEL(0x20); LIMITY(0x200); // hit edge if ((o->dir == DOWN && o->blockd) || (o->dir == UP && o->blocku)) { SmokeSide(o, 4, o->dir); quake(10); o->yinertia = 0; o->dir ^= 1; o->state = (o->dir==DOWN) ? 10 : 20; } if ((++o->timer % 10) == 6) sound(SND_BLOCK_MOVE); } break; } } /* void c------------------------------() {} */ void ai_boulder(Object *o) { switch(o->state) { // shaking case 10: { o->state = 11; o->timer = 0; o->xmark = o->x; } case 11: { if ((++o->timer % 3) != 0) o->x = o->xmark + (1 << CSF); else o->x = o->xmark; } break; // thrown away by Balrog case 20: { o->yinertia = -0x400; o->xinertia = 0x100; sound(SND_FUNNY_EXPLODE); o->state = 21; o->timer = 0; } case 21: { o->yinertia += 0x10; if (o->blockd && o->yinertia >= 0) { sound(SND_EXPLOSION1); game.quaketime = 40; o->xinertia = 0; o->yinertia = 0; o->state = 0; } } break; } } ================================================ FILE: ai/maze/maze.fdh ================================================ //hash:c7e432c2 //automatically generated by Makegen /* located in game.cpp */ //-----------------[referenced from ai/maze/maze.cpp]----------------// void quake(int quaketime, int snd); /* located in ai/maze/maze.cpp */ //-----------------[referenced from ai/maze/maze.cpp]----------------// void ai_block_moveh(Object *o); void ai_block_movev(Object *o); void ai_boulder(Object *o); /* located in ai/sym/smoke.cpp */ //-----------------[referenced from ai/maze/maze.cpp]----------------// void SmokeSide(Object *o, int nclouds, int dir); /* located in sound/sound.cpp */ //-----------------[referenced from ai/maze/maze.cpp]----------------// void sound(int snd); ================================================ FILE: ai/maze/pooh_black.cpp ================================================ #include "../stdai.h" #include "pooh_black.fdh" #define FRAME_STAND 0 #define FRAME_DYING 1 #define FRAME_LANDED 2 #define FRAME_FLYING 3 static int bubble_xmark = 0, bubble_ymark = 0; INITFUNC(AIRoutines) { ONTICK(OBJ_POOH_BLACK, ai_pooh_black); ONTICK(OBJ_POOH_BLACK_BUBBLE, ai_pooh_black_bubble); ONTICK(OBJ_POOH_BLACK_DYING, ai_pooh_black_dying); } /* void c------------------------------() {} */ void ai_pooh_black(Object *o) { // assume flying frame as it's the one used in most of the states o->frame = FRAME_FLYING; //debugVline(o->CenterX(), 255,192,192); //debugVline(bubble_xmark, 0,0,255); switch(o->state) { case 0: { FACEPLAYER; o->yinertia = 0xA00; o->flags |= FLAG_IGNORE_SOLID; if (o->y >= (8 * TILE_H) << CSF) { o->flags &= ~FLAG_IGNORE_SOLID; o->state = 1; } } break; case 1: { o->yinertia = 0xA00; if (o->blockd) { SmokeSide(o, 8, DOWN); sound(SND_BIG_CRASH); quake(30); KillObjectsOfType(OBJ_POOH_BLACK_BUBBLE); o->state = 2; } // damage player if he falls on him o->damage = (o->y < player->y && player->blockd) ? 20 : 0; } break; case 2: // landed, showing landed frame { o->frame = FRAME_LANDED; o->damage = 0; if (++o->timer > 24) { o->state = 3; o->timer = 0; } } break; case 3: // standing, stare at player till he shoots us. { o->frame = FRAME_STAND; bubble_xmark = o->CenterX(); bubble_ymark = o->CenterY(); // spawn bubbles when hit if (o->shaketime && (o->shaketime & 1)) { int x = o->CenterX() + random(-12<CenterY() + random(-12<xinertia = random(-0x600, 0x600); bubble->yinertia = random(-0x600, 0x600); // fly away after hit enough times if (++o->timer > 30) { o->state = 4; o->timer = 0; o->flags |= FLAG_IGNORE_SOLID; o->yinertia = -0xC00; } } } break; case 4: // flying away off-screen { o->timer++; // bubbles shoot down past player just before // he falls. if (o->timer == 60) { bubble_xmark = player->CenterX(); bubble_ymark = (10000 << CSF); } else if (o->timer < 60) { bubble_xmark = o->CenterX(); bubble_ymark = o->CenterY(); } // fall on player if (o->timer >= 170) { o->x = player->CenterX() - (o->Width() / 2); o->y = 0; o->yinertia = 0x5ff; o->state = 0; o->timer = 0; } } break; } static const int frames[] = { 3, 3, 2, 0, 3 }; o->frame = frames[o->state]; } void ai_pooh_black_bubble(Object *o) { if (o->hp < 100) { o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; o->frame = 2; } else if (!random(0, 10)) { o->frame = 0; } else { o->frame = 1; } // adjust bubble target position so that they try to align // their centers with the mark instead of their upper-left corners. int xmark = bubble_xmark - ((sprites[SPR_POOH_BLACK_BUBBLE].w / 2) << CSF); int ymark = bubble_ymark - ((sprites[SPR_POOH_BLACK_BUBBLE].h / 2) << CSF); o->xinertia += (o->x > xmark) ? -0x40 : 0x40; o->yinertia += (o->y > ymark) ? -0x40 : 0x40; LIMITX(0x11FD); LIMITY(0x11FD); } void ai_pooh_black_dying(Object *o) { bubble_xmark = o->CenterX(); bubble_ymark = -(10000 << CSF); switch(o->state) { case 0: { o->frame = FRAME_DYING; FACEPLAYER; sound(SND_BIG_CRASH); SmokeClouds(o, 10, 12, 12); KillObjectsOfType(OBJ_POOH_BLACK_BUBBLE); o->state = 1; } break; case 1: case 2: { game.quaketime = 2; if (++o->timer > 200) { o->state = 2; o->timer2++; o->clip_enable = true; o->clipy1 = (o->timer2 / 8); o->display_xoff = (o->timer2 & 1); if ((o->timer2 % 4) == 2) sound(SND_BUBBLE); if (o->clipy1 >= o->clipy2) o->Delete(); } } break; } if (o->timer & 1) { int x = o->CenterX() + random(-12<state == 2) y = o->y + (o->clipy1 << CSF) + random(-4<CenterY() + random(-12<xinertia = random(-0x200, 0x200); bubble->yinertia = -0x100; } } ================================================ FILE: ai/maze/pooh_black.fdh ================================================ //hash:cf376552 //automatically generated by Makegen /* located in game.cpp */ //--------------[referenced from ai/maze/pooh_black.cpp]-------------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //--------------[referenced from ai/maze/pooh_black.cpp]-------------// Object *CreateObject(int x, int y, int type); /* located in ai/ai.cpp */ //--------------[referenced from ai/maze/pooh_black.cpp]-------------// void KillObjectsOfType(int type); /* located in ai/maze/pooh_black.cpp */ //--------------[referenced from ai/maze/pooh_black.cpp]-------------// void ai_pooh_black(Object *o); void ai_pooh_black_bubble(Object *o); void ai_pooh_black_dying(Object *o); /* located in ai/sym/smoke.cpp */ //--------------[referenced from ai/maze/pooh_black.cpp]-------------// void SmokeSide(Object *o, int nclouds, int dir); void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //--------------[referenced from ai/maze/pooh_black.cpp]-------------// void sound(int snd); /* located in common/misc.cpp */ //--------------[referenced from ai/maze/pooh_black.cpp]-------------// int random(int min, int max); ================================================ FILE: ai/npc/balrog.cpp ================================================ #include "../stdai.h" #include "balrog.fdh" INITFUNC(AIRoutines) { ONSPAWN(OBJ_BALROG, onspawn_balrog); ONTICK(OBJ_BALROG, ai_balrog); ONTICK(OBJ_BALROG_DROP_IN, ai_balrog_drop_in); ONTICK(OBJ_BALROG_BUST_IN, ai_balrog_bust_in); } /* void c------------------------------() {} */ void onspawn_balrog(Object *o) { // in the Boulder Chamber boss fight, Balrog is supposed to go BEHIND Curly. if (game.curmap == STAGE_BOULDER_CHAMBER) { Object *curly = Objects::FindByType(OBJ_CURLY); if (curly) { o->PushBehind(curly); // nasty hack to adjust his starting position in the post-fight cutscene. // I'm not sure why this is otherwise wrong. if (GetCurrentScript() == 600) { o->x -= (6 << CSF); } } } } void ai_balrog(Object *o) { bool fall = true; // he is greenish when he first appears in Gum Room if (DoesCurrentStageUseSpriteset(NPCSET_FROG)) o->sprite = SPR_BALROG_GREEN; switch(o->state) { case 0: { o->flags &= ~FLAG_IGNORE_SOLID; o->xinertia = 0; o->balrog.smoking = false; o->frame = 0; randblink(o, 4, 8); } break; case 10: // he jumps and flys away o->xinertia = 0; o->frame = 2; o->timer = 0; o->state++; case 11: { if (++o->timer <= 20) break; o->state++; o->yinertia = -0x800; o->flags |= FLAG_IGNORE_SOLID; } case 12: { fall = false; o->frame = 3; o->yinertia -= 0x10; if (o->y < 0) { o->Delete(); sound(SND_QUAKE); game.quaketime = 30; } } break; // he looks shocked and shakes, then flys away // used when he is "hit by something" case 20: { o->state = 21; o->frame = 5; o->xinertia = 0; o->timer = o->timer2 = 0; SmokeClouds(o, 4, 8, 8); sound(SND_BIG_CRASH); o->balrog.smoking = 1; } case 21: { o->timer2++; o->x += ((o->timer2 >> 1) & 1) ? (1<timer > 100) o->state = 10; o->yinertia += 0x20; LIMITY(0x5ff); } break; case 30: // he smiles for a moment o->frame = 6; o->timer = 0; o->state = 31; case 31: if (++o->timer > 100) o->state = o->frame = 0; break; // flashing white (spell casted on him) // this only works in Gum Room before balfrog fight, as the normal // non-greenish spritesheet doesn't include the required frame. case 40: o->state = 41; o->animtimer = 0; o->animframe = 0; case 41: { static const int flash_seq[] = { 5, 7 }; o->animate_seq(1, flash_seq, 2); } break; case 42: o->timer = 0; o->state = 43; case 43: // flashing visibility // (transforming into Balfrog stage boss; // our flashing is interlaced with his) o->timer++; o->invisible = (o->timer & 2) ? false : true; break; case 50: // he faces away o->frame = 8; o->xinertia = 0; break; case 60: // he walks o->state = 61; balrog_walk_init(o); case 61: { balrog_walk_animation(o); XMOVE(0x200); } break; // he is teleported away (looking distressed) // this is when he is sent to Labyrinth at end of Sand Zone case 70: o->xinertia = 0; o->timer = 0; o->frame = 7; o->state++; case 71: if (DoTeleportOut(o, 2)) o->Delete(); break; case 80: // hands up and shakes o->frame = 5; o->state = 81; case 81: { if (++o->timer & 2) o->x += (1 << CSF); else o->x -= (1 << CSF); } break; // fly up and lift Curly & PNPC // (post-Ballos ending scene) case 100: { o->state = 101; o->timer = 0; o->frame = 2; // prepare for jump } case 101: { if (++o->timer > 20) { o->state = 102; o->timer = 0; o->frame = 3; // fly up DeleteObjectsOfType(OBJ_NPC_PLAYER); DeleteObjectsOfType(OBJ_CURLY); CreateObject(0, 0, OBJ_BALROG_PASSENGER, 0, 0, LEFT)->linkedobject = o; CreateObject(0, 0, OBJ_BALROG_PASSENGER, 0, 0, RIGHT)->linkedobject = o; o->yinertia = -0x800; o->flags |= FLAG_IGNORE_SOLID; // so can fly through ceiling fall = false; } } break; case 102: // flying up during escape seq { fall = false; // bust through ceiling int y = ((o->y + (4<> CSF) / TILE_H; if (y < 35 && y >= 0) { int x = (o->CenterX() >> CSF) / TILE_W; if (map.tiles[x][y] != 0) { // smoke needs to go at the bottom of z-order or you can't // see any of the characters through all the smoke. map_ChangeTileWithSmoke(x, y, 0, 4, false, lowestobject); map_ChangeTileWithSmoke(x-1, y, 0, 4, false, lowestobject); map_ChangeTileWithSmoke(x+1, y, 0, 4, false, lowestobject); megaquake(10, 0); sound(SND_MISSILE_HIT); } } if (o->Bottom() < -(20<Delete(); } } break; case 500: // used during Balfrog death scene { fall = false; } break; } if (o->balrog.smoking) { if (++o->balrog.smoketimer > 20 || !random(0, 16)) { SmokeClouds(o, 1, 4, 4); o->balrog.smoketimer = 0; } } if (fall) { o->yinertia += 0x20; if (o->yinertia >= 0x5ff) o->yinertia = 0x5ff; } } void ai_balrog_drop_in(Object *o) { switch(o->state) { case 0: { // he is greenish when he first appears in Gum Room if (DoesCurrentStageUseSpriteset(NPCSET_FROG)) o->sprite = SPR_BALROG_GREEN; // z-order hacking if (game.curmap == STAGE_SEAL_CHAMBER_2) o->PushBehind(lowestobject); o->state = 1; o->frame = 3; // falling o->flags |= FLAG_IGNORE_SOLID; } case 1: { // since balrog often falls through the ceiling we must wait until he is free-falling // before we start checking to see if he hit the floor if (!o->blockd && !o->blocku) { o->state = 2; o->flags &= ~FLAG_IGNORE_SOLID; } } break; case 2: // free-falling if (o->blockd) { o->yinertia = 0; o->frame = 2; o->state = 3; o->timer = 0; SmokeSide(o, 4, DOWN); quake(30); } break; case 3: // landed if (++o->timer > 20) { o->state = 4; o->frame = 0; } break; } if (o->state == 1 || o->state == 2) o->yinertia += 0x20; } // Balrog busting in the door of the Shack. // he exists like this for only a moment, then the script // changes him to a standard OBJ_BALROG. void ai_balrog_bust_in(Object *o) { switch(o->state) { case 0: SmokeClouds(o, 10, 8, 8); o->y += (10 << CSF); o->yinertia = -0x100; sound(SND_BLOCK_DESTROY); quake(30); o->state = 1; o->frame = 3; case 1: // falling the short distance to ground { o->yinertia += 0x10; if (o->yinertia > 0 && o->blockd) { o->state = 2; o->frame = 2; o->timer = 0; quake(30); } } break; // landing animation case 2: { if (++o->timer > 16) { o->state = 3; o->frame = 0; o->animtimer = 0; } } break; // standing and blinking case 3: case 4: { o->frame = 0; randblink(o, 4, 16, 100); } break; } LIMITY(0x5FF); } /* void c------------------------------() {} */ void balrog_walk_init(Object *o) { o->frame = 9; o->animtimer = 0; } void balrog_walk_animation(Object *o) { if (++o->animtimer > 3) { o->animtimer = 0; o->frame++; if (o->frame == 10 || o->frame == 11) sound(SND_THUD); if (o->frame > 12) o->frame = 9; } } ================================================ FILE: ai/npc/balrog.fdh ================================================ //hash:f6097911 //automatically generated by Makegen /* located in game.cpp */ //-----------------[referenced from ai/npc/balrog.cpp]---------------// void megaquake(int quaketime, int snd); void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //-----------------[referenced from ai/npc/balrog.cpp]---------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //-----------------[referenced from ai/npc/balrog.cpp]---------------// void map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind); /* located in tsc.cpp */ //-----------------[referenced from ai/npc/balrog.cpp]---------------// int GetCurrentScript(void); /* located in ai/ai.cpp */ //-----------------[referenced from ai/npc/balrog.cpp]---------------// void randblink(Object *o, int blinkframe, int blinktime, int prob); bool DoTeleportOut(Object *o, int slowness); void DeleteObjectsOfType(int type); /* located in ai/npc/balrog.cpp */ //-----------------[referenced from ai/npc/balrog.cpp]---------------// void onspawn_balrog(Object *o); void ai_balrog(Object *o); void ai_balrog_drop_in(Object *o); void ai_balrog_bust_in(Object *o); void balrog_walk_init(Object *o); void balrog_walk_animation(Object *o); /* located in ai/sym/smoke.cpp */ //-----------------[referenced from ai/npc/balrog.cpp]---------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); void SmokeSide(Object *o, int nclouds, int dir); /* located in sound/sound.cpp */ //-----------------[referenced from ai/npc/balrog.cpp]---------------// void sound(int snd); /* located in common/misc.cpp */ //-----------------[referenced from ai/npc/balrog.cpp]---------------// int random(int min, int max); ================================================ FILE: ai/npc/curly.cpp ================================================ #include "../stdai.h" #include "curly.fdh" #define CURLY_STAND 0 #define CURLY_WALK 3 #define CURLY_WALKING 4 INITFUNC(AIRoutines) { ONTICK(OBJ_CURLY, ai_curly); AFTERMOVE(OBJ_CURLY_CARRIED, aftermove_curly_carried); ONTICK(OBJ_CURLY_CARRIED_SHOOTING, ai_curly_carried_shooting); ONTICK(OBJ_CCS_GUN, ai_ccs_gun); } /* void c------------------------------() {} */ // regular NPC curly void ai_curly(Object *o) { switch(o->state) { case 0: // state 0: stand and do nothing o->frame = 0; o->flags |= FLAG_SCRIPTONACTIVATE; // needed for after Almond battle case 1: // important that state 1 does not change look-away frame for Drain cutscene if (o->frame != 12) o->frame = 0; o->xinertia = 0; break; case 3: // state 3: walk forward case 10: // state 10: walk to player and stop { if (o->state == 10) FACEPLAYER; o->state++; o->animtimer = 0; o->frame = 0; } case 4: case 11: { if (o->state == 11 && pdistlx(20<state = 0; break; } ANIMATE(5, 0, 3); if (!o->blockd) o->frame = 3; XMOVE(0x200); } break; // state 5: curly makes a "kaboom", then looks sad. case 5: o->state = 6; SmokeClouds(o, 8, 0, 0); case 6: o->frame = 16; break; case 20: // face away o->xinertia = 0; o->frame = 12; break; case 21: // look up o->xinertia = 0; o->frame = 4; break; case 30: // state 30: curly goes flying through the air and is knocked out { o->state = 31; o->frame = 14; o->timer2 = 0; o->yinertia = -0x400; XMOVE(-0x200); } case 31: { if (o->blockd && o->yinertia >= 0) o->state = 32; else break; } case 32: // state 32: curly is laying knocked out { o->frame = 15; o->xinertia = 0; } break; // walk backwards from collapsing wall during final cutscene case 70: { o->state = 71; o->timer = 0; o->frame = 1; o->animtimer = 0; } case 71: { XMOVE(-0x100); ANIMATE(8, 0, 3); } break; } o->yinertia += 0x40; LIMITY(0x5ff); } // curly being carried by Tow Rope void aftermove_curly_carried(Object *o) { switch(o->state) { case 0: { o->state = 1; o->frame = 17; o->flags &= ~FLAG_SCRIPTONACTIVATE; // turn on the HVTrigger in Waterway that kills Curly if you haven't // drained the water out of her if (game.curmap == STAGE_WATERWAY) { Object *t = FindObjectByID2(220); if (t) t->ChangeType(OBJ_HVTRIGGER); } } case 1: { // carried by player StickToPlayer(o, -2, -13, -18); } break; // floating away after Ironhead battle case 10: { o->xinertia = 0x40; o->yinertia = -0x20; o->state = 11; } case 11: { if (o->y < MAPY(4)) // if in top part of screen, reverse before hitting wall o->yinertia = 0x20; } break; case 20: { o->Delete(); } break; } } /* void c------------------------------() {} */ void ai_curly_carried_shooting(Object *o) { if (o->state == 0) { o->x = player->CenterX(); o->y = player->CenterY(); o->state = 1; o->BringToFront(); Object *gun; gun = CreateObject(0, 0, OBJ_CCS_GUN); gun->linkedobject = o; gun->PushBehind(o); } // get player center position-- // coordinates make more sense when figured this way int px = player->x + (8 << CSF); int py = player->y + (8 << CSF); o->dir = player->dir ^ 1; if (player->look) { o->xmark = px; if (player->look == UP) { if (player->blockd) { o->ymark = py - (12 << CSF); o->frame = 1; } else { o->ymark = py + (8 << CSF); o->frame = 2; } } else { // player looking down (and implicitly, not blockd) o->ymark = py - (8 << CSF); o->frame = 1; } } else // normal/horizontal { if (player->dir == LEFT) o->xmark = px + (7 << CSF); else o->xmark = px - (7 << CSF); o->ymark = py - (3 << CSF); o->frame = 0; } o->x += (o->xmark - o->x) / 2; o->y += (o->ymark - o->y) / 2; // bounce as player walks if (player->walking && (player->walkanimframe & 1)) o->y -= (1 << CSF); } void ai_ccs_gun(Object *o) { Object *curly = o->linkedobject; if (!curly) return; o->dir = curly->dir; o->frame = curly->frame; switch(o->frame) { case 0: // horizontal/normal { if (curly->dir == RIGHT) o->x = curly->x + (8 << CSF); else o->x = curly->x - (8 << CSF); o->y = curly->y; } break; case 1: // looking up { o->x = curly->x; o->y = curly->y - (10 << CSF); } break; case 2: // looking down { o->x = curly->x; o->y = curly->y + (10 << CSF); } break; } if (pinputs[FIREKEY] != o->timer2) { o->timer2 = pinputs[FIREKEY]; if (pinputs[FIREKEY]) { if (CountObjectsOfType(OBJ_NEMESIS_SHOT_CURLY) < 2) { int shotdir = curly->dir; if (curly->frame == 1) shotdir = UP; if (curly->frame == 2) shotdir = DOWN; Object *shot = CreateObject(0, 0, OBJ_NEMESIS_SHOT_CURLY); SetupBullet(shot, curly->x, curly->y, B_CURLYS_NEMESIS, shotdir); } } } } ================================================ FILE: ai/npc/curly.fdh ================================================ //hash:d9c51670 //automatically generated by Makegen /* located in ObjManager.cpp */ //-----------------[referenced from ai/npc/curly.cpp]----------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //-----------------[referenced from ai/npc/curly.cpp]----------------// Object *FindObjectByID2(int id2); /* located in p_arms.cpp */ //-----------------[referenced from ai/npc/curly.cpp]----------------// void SetupBullet(Object *shot, int x, int y, int btype, int dir); /* located in ai/ai.cpp */ //-----------------[referenced from ai/npc/curly.cpp]----------------// void StickToPlayer(Object *o, int x_left, int x_right, int off_y); /* located in ai/npc/curly.cpp */ //-----------------[referenced from ai/npc/curly.cpp]----------------// void ai_curly(Object *o); void aftermove_curly_carried(Object *o); void ai_curly_carried_shooting(Object *o); void ai_ccs_gun(Object *o); /* located in ai/sym/smoke.cpp */ //-----------------[referenced from ai/npc/curly.cpp]----------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); ================================================ FILE: ai/npc/curly_ai.cpp ================================================ #include "../stdai.h" #include "curly_ai.fdh" #define CAI_INIT 20 // ANP'd to this by the entry script in Lab M #define CAI_START 21 // ANP'd to this by Almond script #define CAI_RUNNING 22 #define CAI_KNOCKEDOUT 40 // knocked out at beginning of Almond battle #define CAI_ACTIVE 99 INITFUNC(AIRoutines) { ONTICK(OBJ_CURLY_AI, ai_curly_ai); ONTICK(OBJ_CAI_GUN, ai_cai_gun); AFTERMOVE(OBJ_CAI_GUN, aftermove_cai_gun); AFTERMOVE(OBJ_CAI_WATERSHIELD, aftermove_cai_watershield); } // curly that fights beside you void ai_curly_ai(Object *o) { int xdist, ydist; int xlimit; char reached_p; int otiley; char seeking_player = 0; char wantdir; /* debug("Curly Console"); debug("TGT: [%d,%d] %d", o->xmark>>CSF, o->ymark>>CSF, game.curlytarget.timeleft); debug("State: %d", o->state); debug(""); debug("RPT %d", o->curly.reachptimer); debug("TJT %d", o->curly.tryjumptime); debug("IJT %d:%d", o->curly.impjumptime, o->curly.impjump); game.debug.god = 1; if (inputs[DEBUGKEY7]) o->state=999; */ // put these here so she'll spawn the shield immediately, even while she's still // knocked out. otherwise she wouldn't have it turned on in the cutscene if the // player defeats the core before she gets up. I know that's unlikely but still. if (!o->curly.spawned_watershield) { Object *shield = CreateObject(0, 0, OBJ_CAI_WATERSHIELD); shield->sprite = SPR_WATER_SHIELD; shield->linkedobject = o; o->BringToFront(); // curly in front of monsters, shield->BringToFront(); // and shield in front of curly o->curly.spawned_watershield = 1; } switch(o->state) { case 0: o->xinertia = 0; o->yinertia += 0x20; break; case CAI_INIT: // set to this by an ANP in Maze M o->x = player->x; o->y = player->y; case CAI_START: // set here after she stops being knocked out in Almond { o->invisible = 0; o->xmark = o->x; o->ymark = o->y; o->dir = player->dir; o->state = CAI_ACTIVE; o->timer = 0; // spawn her gun Object *gun = CreateObject(0, 0, OBJ_CAI_GUN); gun->linkedobject = o; gun->PushBehind(o); if (player->weapons[WPN_MGUN].hasWeapon) o->curly.gunsprite = SPR_PSTAR; else o->curly.gunsprite = SPR_MGUN; } break; case CAI_KNOCKEDOUT: { o->timer = 0; o->state = CAI_KNOCKEDOUT+1; o->frame = 15; } case CAI_KNOCKEDOUT+1: { if (++o->timer > 1000) { // start fighting o->state = CAI_START; } else if (o->timer > 750) { // stand up o->flags &= ~FLAG_SCRIPTONACTIVATE; o->frame = 0; } } break; } if (o->state != CAI_ACTIVE) return; // first figure out where our target is // hack in case player REALLY leaves her behind. this works because of the way // the level is in a Z shape. first we check to see if the player is on the level below ours. if ((player->y > o->y && ((player->y - o->y) > 160<state==999) { // if we're on the top section, head all the way to right, else if we're on the // middle section, head for the trap door that was destroyed by the button otiley = (o->y >> CSF) / TILE_H; game.curlytarget.timeleft = 0; if (otiley < 22) { o->xmark = ((126 * TILE_W) + 8) << CSF; // center of big chute on right top } else if (otiley > 36 && otiley < 47) { // fell down chute in center of middle section // continue down chute, don't get hung up on sides o->xmark = (26 * TILE_W) << CSF; } else if (otiley >= 47) { // bottom section - head for exit door // (this shouldn't ever execute, though, because player can't be lower than this) o->xmark = (81 * TILE_W) << CSF; seeking_player = 1; // stop when reach exit door } else { // on middle section o->xmark = ((7 * TILE_W) + 8) << CSF; // trap door which was destroyed by switch } o->ymark = o->y; } else { // if we get real far away from the player leave the enemies alone and come find him if (!pdistlx(160<xmark = game.curlytarget.x; o->ymark = game.curlytarget.y; game.curlytarget.timeleft--; if (game.curlytarget.timeleft==60 && random(0, 2)==0) CaiJUMP(o); } else { o->xmark = player->x; o->ymark = player->y; seeking_player = 1; } } // do not fall off the middle railing in Almond if (game.curmap == STAGE_ALMOND) { #define END_OF_RAILING (((72*TILE_W)-8)<xmark > END_OF_RAILING) { o->xmark = END_OF_RAILING; } } // calculate distance to target xdist = abs(o->x - o->xmark); ydist = abs(o->y - o->ymark); // face target. I used two seperate IF statements so she doesn't freak out at start point // when her x == xmark. if (o->x < o->xmark) wantdir = RIGHT; if (o->x > o->xmark) wantdir = LEFT; if (wantdir != o->dir) { if (++o->curly.changedirtimer > 4) { o->curly.changedirtimer = 0; o->dir = wantdir; } } else o->curly.changedirtimer = 0; // if trying to return to the player then go into a rest state when we've reached him reached_p = 0; if (seeking_player && xdist < (32<curly.reachptimer > 80) { o->xinertia *= 7; o->xinertia /= 8; o->frame = 0; reached_p = 1; } } else o->curly.reachptimer = 0; if (!reached_p) // if not at rest walk towards target { // walking animation if (++o->animtimer > 4) { o->animtimer = 0; if (++o->animframe > 3) o->animframe = 0; } // walk towards target if (o->x > o->xmark) o->xinertia -= 0x20; if (o->x < o->xmark) o->xinertia += 0x20; o->frame = o->animframe; // jump if we hit a wall if ((o->blockr && o->xinertia > 0) || (o->blockl && o->xinertia < 0)) { if (++o->curly.blockedtime > 8) { CaiJUMP(o); } } else o->curly.blockedtime = 0; // if our target gets really far away (like p is leaving us behind) and // the above jumping isn't getting us anywhere, activate the Improbable Jump if ((o->blockl || o->blockr) && xdist > (80<curly.impjumptime > 60) { if (o->blockd) { CaiJUMP(o); o->curly.impjumptime = -100; o->curly.impjump = 1; } } } else o->curly.impjumptime = 0; // if we're below the target try jumping around randomly if (o->y > o->ymark && (o->y - o->ymark) > (16<curly.tryjumptime > 20) { o->curly.tryjumptime = 0; if (random(0, 1)) CaiJUMP(o); } } else o->curly.tryjumptime = 0; } else o->animtimer = o->animframe = 0; // reset walk anim // force jump/fall frames if (o->yinertia < 0) o->frame = 3; else if (!o->blockd) o->frame = 1; else if (o->x==o->xmark) o->frame = 0; // the improbable jump - when AI gets confused, just cheat! // jump REALLY high by reducing gravity until we clear the wall if (o->curly.impjump > 0) { o->yinertia += 0x10; // deactivate Improbable Jump once we clear the wall or hit the ground if (o->dir==LEFT && !o->blockl) o->curly.impjump--; if (o->dir==RIGHT && !o->blockr) o->curly.impjump--; if (o->yinertia > 0 && o->blockd) o->curly.impjump--; } else o->yinertia += 0x33; // slow down when we hit bricks if (o->blockl || o->blockr) { // full stop if on ground, partial stop if in air xlimit = o->blockd ? 0x000:0x180; if (o->blockl) { if (o->xinertia < -xlimit) o->xinertia = -xlimit; } else if (o->xinertia > xlimit) // we don't have to test blockr because we already know one or the other is set and that it's not blockl { o->xinertia = xlimit; } } // look up/down at target o->curly.look = 0; if (!reached_p || abs(o->y - player->y) > (48<y > o->ymark && ydist >= (12<= (80<curly.look = UP; else if (o->y < o->ymark && !o->blockd && ydist >= (80<curly.look = DOWN; } if (o->curly.look == UP) o->frame += 4; else if (o->curly.look == DOWN) o->frame += 8; LIMITX(0x300); LIMITY(0x5ff); } static void CaiJUMP(Object *o) { if (o->blockd && !o->blocku) { o->yinertia = random(-0x600, -0x300); o->frame = 3; sound(SND_PLAYER_JUMP); } } /* void c------------------------------() {} */ void ai_cai_gun(Object *o) { Object *curly = o->linkedobject; Object *shot; uchar fire; int x, y, dir; #define SMALLDIST (32 << CSF) #define BIGDIST (160 << CSF) if (!curly) { o->Delete(); return; } o->frame = 0; if (curly->curly.look) { o->sprite = (curly->curly.gunsprite + 1); if (curly->curly.look==DOWN) o->frame = 1; } else { o->sprite = curly->curly.gunsprite; } if (game.curlytarget.timeleft) { // fire when we get close to the target if (!curly->curly.look) { // firing LR-- fire when lined up vertically and close by horizontally fire = ((abs(o->x - game.curlytarget.x) <= BIGDIST) && (abs(o->y - game.curlytarget.y) <= SMALLDIST)); } else { // firing vertically-- fire when lined up horizontally and close by vertically fire = ((abs(o->x - game.curlytarget.x) <= SMALLDIST) && (abs(o->y - game.curlytarget.y) <= BIGDIST)); } if (fire) { // get coordinate of our action point x = (o->ActionPointX() - o->DrawPointX()); y = (o->ActionPointY() - o->DrawPointY()); dir = curly->curly.look ? curly->curly.look : o->dir; if (curly->curly.gunsprite==SPR_MGUN) { // she has the Machine Gun if (!o->timer) { o->timer2 = random(2, 6); // no. shots to fire o->timer = random(40, 50); o->animtimer = 0; } if (o->timer2) { // create the MGun blast if (!o->animtimer) { FireLevel23MGun(x, y, 2, dir); o->animtimer = 5; o->timer2--; } else o->animtimer--; } } else { // she has the Polar Star if (!o->timer) { o->timer = random(4, 16); if (random(0, 10)==0) o->timer += random(20, 30); // create the shot shot = CreateObject(x, y, OBJ_POLAR_SHOT); SetupBullet(shot, x, y, B_PSTAR_L3, dir); } } } } if (o->timer) o->timer--; } void aftermove_cai_gun(Object *o) { Object *curly = o->linkedobject; if (curly) { o->x = curly->ActionPointX(); o->y = curly->ActionPointY(); o->dir = curly->dir; } } // curly's air bubble when she goes underwater void aftermove_cai_watershield(Object *o) { Object *curly = o->linkedobject; if (!curly) { o->Delete(); return; } static const Point cwp = { 8, 5 }; if (curly->GetAttributes(&cwp, 1, NULL) & TA_WATER) { o->invisible = false; o->x = curly->x; o->y = curly->y; o->frame = (++o->timer & 2) ? 1 : 0; } else { o->invisible = true; o->timer = o->frame = 0; } } ================================================ FILE: ai/npc/curly_ai.fdh ================================================ //hash:c172b805 //automatically generated by Makegen /* located in ObjManager.cpp */ //----------------[referenced from ai/npc/curly_ai.cpp]--------------// Object *CreateObject(int x, int y, int type); /* located in p_arms.cpp */ //----------------[referenced from ai/npc/curly_ai.cpp]--------------// void FireLevel23MGun(int x, int y, int level, int dir); void SetupBullet(Object *shot, int x, int y, int btype, int dir); /* located in ai/npc/curly_ai.cpp */ //----------------[referenced from ai/npc/curly_ai.cpp]--------------// void ai_curly_ai(Object *o); static void CaiJUMP(Object *o); void ai_cai_gun(Object *o); void aftermove_cai_gun(Object *o); void aftermove_cai_watershield(Object *o); /* located in sound/sound.cpp */ //----------------[referenced from ai/npc/curly_ai.cpp]--------------// void sound(int snd); /* located in common/misc.cpp */ //----------------[referenced from ai/npc/curly_ai.cpp]--------------// int random(int min, int max); ================================================ FILE: ai/npc/misery.fdh ================================================ //hash:1c683b9c //automatically generated by Makegen /* located in ObjManager.cpp */ //-----------------[referenced from ai/npc/misery.cpp]---------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //-----------------[referenced from ai/npc/misery.cpp]---------------// Object *FindObjectByID2(int id2); /* located in trig.cpp */ //-----------------[referenced from ai/npc/misery.cpp]---------------// void ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed); /* located in ai/ai.cpp */ //-----------------[referenced from ai/npc/misery.cpp]---------------// bool DoTeleportIn(Object *o, int slowness); void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in ai/npc/misery.cpp */ //-----------------[referenced from ai/npc/misery.cpp]---------------// void ai_misery_float(Object *o); void ai_miserys_bubble(Object *o); static Object *mbubble_find_target(void); void ai_misery_stand(Object *o); /* located in sound/sound.cpp */ //-----------------[referenced from ai/npc/misery.cpp]---------------// void sound(int snd); /* located in common/stat.cpp */ //-----------------[referenced from ai/npc/misery.cpp]---------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //-----------------[referenced from ai/npc/misery.cpp]---------------// int random(int min, int max); ================================================ FILE: ai/npc/misery_ai.cpp ================================================ #include "../stdai.h" #include "misery.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_MISERY_FLOAT, ai_misery_float); ONTICK(OBJ_MISERY_STAND, ai_misery_stand); ONTICK(OBJ_MISERYS_BUBBLE, ai_miserys_bubble); } /* void c------------------------------() {} */ // teleport in and float void ai_misery_float(Object *o) { switch(o->state) { case 0: o->state = 1; o->x += (1 << CSF); // check Undead Core intro to prove this is correct o->xmark = o->x; o->ymark = o->y; o->frame = 0; o->timer = 0; case 1: if (DoTeleportIn(o, 1)) o->state = 10; break; case 10: // floating o->state = 11; o->timer = 0; o->animframe = 0; o->yinertia = (1<y > o->ymark) o->yinertia -= 16; if (o->y < o->ymark) o->yinertia += 16; if (o->yinertia > 0x100) o->yinertia = 0x100; if (o->yinertia < -0x100) o->yinertia = -0x100; break; case 13: // fall from floaty o->frame = 1; o->flags &= ~FLAG_IGNORE_SOLID; o->yinertia += 0x40; if (o->yinertia > 0x5ff) o->yinertia = 0x5ff; if (o->blockd) { sound(SND_THUD); o->yinertia = 0; o->state = 14; o->flags |= FLAG_IGNORE_SOLID; o->animframe = 2; o->animtimer = 30; // blink as soon as hit ground } break; case 14: break; // standing // spawn the bubble which picks up Toroko in Shack case 15: o->frame = 4; o->timer = 0; o->state = 16; case 16: { o->timer++; if (o->timer == 30) { sound(SND_BUBBLE); CreateObject(o->x, o->y - (16 << CSF), OBJ_MISERYS_BUBBLE); } if (o->timer >= 50) o->state = 14; } break; case 20: // fly away o->state = 21; o->frame = 0; o->yinertia = 0; o->flags |= FLAG_IGNORE_SOLID; case 21: o->yinertia -= 0x20; if (o->y < -0x1000) o->Delete(); break; case 25: // big spell case 26: // she flashes, then a clap of thunder ai_misery_stand(o); break; case 27: // return to standing after lightning strike if (++o->timer > 16) o->state = 14; break; } if (o->state==11 || o->state==14) { // blink if (o->animtimer) { o->animtimer--; o->frame = 1; } else { o->frame = 0; if (random(0, 100) == 1) { o->animtimer = 30; } } o->frame += o->animframe; } } void ai_miserys_bubble(Object *o) { Object *target; switch(o->state) { case 0: { // find the Toroko object we are to home in on target = mbubble_find_target(); if (!target) { o->state = 9999; return; } o->xmark = target->x - (6 << CSF); o->ymark = target->y - (6 << CSF); ThrowObject(o, o->xmark, o->ymark, 0, (2 << CSF)); o->state = 1; // correct values: 0x3F0, 0xAE stat("Computed toss values xi: 0x%x, 0x%x", o->xinertia, o->yinertia); stat("Target x/y: 0x%x, 0x%x", target->x, target->y); } case 1: ANIMATE(1, 0, 1); if (abs(o->x - o->xmark) <= (3 << CSF) && \ abs(o->y - o->ymark) <= (3 << CSF)) { o->state = 2; o->frame = 2; sound(SND_BUBBLE); if ((target = mbubble_find_target())) target->invisible = true; } break; case 2: { ANIMATE(1, 2, 3); o->xinertia -= 0x20; o->yinertia -= 0x20; LIMITX(0x5FF); LIMITY(0x5FF); if (o->y < -1000) o->Delete(); } break; } } static Object *mbubble_find_target(void) { Object *target = FindObjectByID2(1000); if (!target) { staterr("ai_miserys_bubble: failed to find a target object with ID2=1000"); return NULL; } return target; } /* void c------------------------------() {} */ void ai_misery_stand(Object *o) { switch(o->state) { case 0: o->state = 1; case 1: o->frame = 2; randblink(o, 3, 4); break; case 20: // she flys away o->state = 21; o->frame = 0; o->yinertia = 0; o->flags |= FLAG_IGNORE_SOLID; case 21: o->yinertia -= 0x20; if (o->y < -0x1000) o->Delete(); break; // big spell // she flashes, then a clap of thunder, // and she teleports away. case 25: o->state = 26; o->timer = 0; o->frame = 5; o->animtimer = 0; case 26: ANIMATE(0, 5, 7); if (++o->timer == 20) { sound(SND_LIGHTNING_STRIKE); flashscreen.Start(); o->state = 27; o->timer = 0; o->frame = 4; } break; case 27: { if (++o->timer > 50) { // return to standing o->state = 0; } } break; case 30: // she throws up her staff like she's summoning something o->timer = 0; o->state++; o->frame = 2; case 31: if (o->timer==10) o->frame = 4; if (o->timer==130) o->state = 1; o->timer++; break; // fire at DOCTOR_GHOST case 40: { o->state = 41; o->timer = 0; o->frame = 4; } case 41: { o->timer++; if (o->timer == 30 || \ o->timer == 40 || \ o->timer == 50) { Object *shot = CreateObject(o->x+(16<y, OBJ_IGOR_SHOT); shot->xinertia = 0x600; shot->yinertia = random(-0x200, 0); sound(SND_SNAKE_FIRE); } if (o->timer > 50) o->state = 0; } break; } } ================================================ FILE: ai/npc/npcguest.cpp ================================================ #include "../stdai.h" #include "npcguest.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_MAHIN, ai_npc_mahin); ONSPAWN(OBJ_YAMASHITA_FLOWERS, onspawn_set_frame_from_id2); ONTICK(OBJ_YAMASHITA_PAVILION, ai_yamashita_pavilion); ONTICK(OBJ_CHTHULU, ai_chthulu); GENERIC_NPC_NOFACEPLAYER(OBJ_DR_GERO); GENERIC_NPC_NOFACEPLAYER(OBJ_NURSE_HASUMI); } /* void c------------------------------() {} */ void ai_chthulu(Object *o) { if (!o->state) { o->SnapToGround(); o->state = 1; } // open eyes when player comes near o->frame = (pdistlx((48<state) { case 0: o->SnapToGround(); o->state = 1; o->frame = 2; case 1: // facing away break; case 2: // talking to player o->frame = 0; randblink(o); break; } } /* void c------------------------------() {} */ // Sandaime's Pavilion from Yamashita Farm void ai_yamashita_pavilion(Object *o) { if (!o->state) { if (o->dir == LEFT) { // Sandaime present o->state = 1; } else { // Sandaime gone o->x -= (TILE_W << CSF); o->state = 2; o->frame = 2; } } if (o->state == 1) { o->frame = 0; randblink(o); } } ================================================ FILE: ai/npc/npcguest.fdh ================================================ //hash:156aa096 //automatically generated by Makegen /* located in ai/ai.cpp */ //----------------[referenced from ai/npc/npcguest.cpp]--------------// void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in ai/npc/npcguest.cpp */ //----------------[referenced from ai/npc/npcguest.cpp]--------------// void ai_chthulu(Object *o); void ai_npc_mahin(Object *o); void ai_yamashita_pavilion(Object *o); ================================================ FILE: ai/npc/npcplayer.cpp ================================================ #include "../stdai.h" #include "npcplayer.fdh" /* This is an object which looks exactly like the player, but is controlled as if he is an NPC. Used during cutscenes. */ INITFUNC(AIRoutines) { ONTICK(OBJ_NPC_PLAYER, ai_npc_player); ONTICK(OBJ_PTELIN, ai_ptelin); ONTICK(OBJ_PTELOUT, ai_ptelout); } /* void c------------------------------() {} */ void ai_npc_player(Object *o) { static const int pwalkanimframes[] = { 0, 1, 0, 2 }; #define NUM_PWALK_FRAMES 4 switch(o->state) { case 0: { o->frame = 0; o->xinertia = 0; // used during Hermit Gunsmith scene when he is awake if (o->dirparam >= 10) { o->x = player->x; o->y = player->y; o->dir = CVTDir(o->dirparam - 10); o->dirparam = 0; } } break; case 2: // looking up { o->frame = 3; } break; case 10: // he gets flattened { sound(SND_LITTLE_CRASH); SmokeClouds(o, 6, 8, 8); o->state++; } case 11: { o->frame = 9; } break; case 20: // he teleports away { if (DoTeleportOut(o, 2)) o->Delete(); } break; case 50: // walking { // z-order tweaking for oside bad-ending Object *dragon = Objects::FindByType(OBJ_SKY_DRAGON); if (dragon) o->PushBehind(dragon); o->state = 51; o->animframe = 0; o->animtimer = 0; } case 51: { o->animate_seq(4, pwalkanimframes, NUM_PWALK_FRAMES); XMOVE(0x200); } break; // falling, upside-down (from good ending; Fall stage) case 60: { o->state = 61; o->frame = 10; o->xmark = o->x; o->ymark = o->y; } case 61: { o->ymark += 0x100; o->x = o->xmark + (random(-1, 1) << CSF); o->y = o->ymark + (random(-1, 1) << CSF); } break; case 80: // face away o->frame = 11; break; // walking in place during credits case 99: case 100: { o->state = 101; o->frame = 1; o->animtimer = 0; if ((player->equipmask & EQUIP_MIMIGA_MASK) || game.flags[1020]) o->sprite = SPR_MYCHAR_MIMIGA; } case 101: // falling a short dist case 102: // walk in place { if (!o->blockd) { o->yinertia += 0x40; LIMITY(0x5ff); } else { o->yinertia = 0; o->animate_seq(8, pwalkanimframes, NUM_PWALK_FRAMES); } } break; } } /* void c------------------------------() {} */ // player (teleporting in) void ai_ptelin(Object *o) { switch(o->state) { case 0: { o->flags &= ~FLAG_IGNORE_SOLID; o->frame = 0; o->timer = 0; o->x += (TILE_W << CSF); o->y += (TILE_H / 2) << CSF; o->state++; // note, it looks sort of like we might be supposed to face left when // appearing at the Labyrinth teleporter as well, but the original engine // does not do this, so I'm following what it does. if (game.curmap == STAGE_SAND) o->dir = LEFT; // for Sand Zone, hackety } case 1: { if (DoTeleportIn(o, 2)) { o->timer = 0; o->state = 2; } } break; case 2: { if (++o->timer > 20) { o->yinertia += 0x40; o->frame = 1; o->state = 3; } } break; case 3: { o->yinertia += 0x40; if (o->blockd) { o->frame = 0; o->state = 4; } } } } // player (teleporting out) void ai_ptelout(Object *o) { switch(o->state) { case 0: { o->y -= (TILE_H << CSF); o->ymark = o->y - (8 << CSF); o->frame = 0; o->timer = 0; o->state = 1; } break; case 1: { if (++o->timer > 20) { o->state = 2; o->frame = 1; o->timer = 0; o->yinertia = -0x2FF; } } break; case 2: { if (o->yinertia >= 0 && o->y >= o->ymark) { o->y = o->ymark; o->yinertia = 0; o->state = 3; o->frame = 0; o->timer = 0; } } break; case 3: { if (++o->timer > 40) { o->state = 4; o->timer = 0; } } break; case 4: { if (DoTeleportOut(o, 2)) o->Delete(); } break; } if (o->state < 3) o->yinertia += 50; LIMITY(0x5ff); } ================================================ FILE: ai/npc/npcplayer.fdh ================================================ //hash:6572894a //automatically generated by Makegen /* located in tsc.cpp */ //---------------[referenced from ai/npc/npcplayer.cpp]--------------// int CVTDir(int csdir); /* located in ai/ai.cpp */ //---------------[referenced from ai/npc/npcplayer.cpp]--------------// bool DoTeleportOut(Object *o, int slowness); bool DoTeleportIn(Object *o, int slowness); /* located in ai/npc/npcplayer.cpp */ //---------------[referenced from ai/npc/npcplayer.cpp]--------------// void ai_npc_player(Object *o); void ai_ptelin(Object *o); void ai_ptelout(Object *o); /* located in ai/sym/smoke.cpp */ //---------------[referenced from ai/npc/npcplayer.cpp]--------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //---------------[referenced from ai/npc/npcplayer.cpp]--------------// void sound(int snd); /* located in common/misc.cpp */ //---------------[referenced from ai/npc/npcplayer.cpp]--------------// int random(int min, int max); ================================================ FILE: ai/npc/npcregu.cpp ================================================ #include "../stdai.h" #include "../final_battle/doctor.h" // for Red Crystal variables (Sue) #include "npcregu.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_KAZUMA_AT_COMPUTER, ai_npc_at_computer); ONTICK(OBJ_SUE_AT_COMPUTER, ai_npc_at_computer); ONTICK(OBJ_JENKA, ai_jenka); ONTICK(OBJ_BLUE_ROBOT, ai_blue_robot); ONTICK(OBJ_DOCTOR, ai_doctor); ONTICK(OBJ_TOROKO, ai_toroko); ONTICK(OBJ_TOROKO_TELEPORT_IN, ai_toroko_teleport_in); ONTICK(OBJ_SUE, ai_npc_sue); AFTERMOVE(OBJ_SUE, aftermove_npc_sue); ONSPAWN(OBJ_SUE, onspawn_npc_sue); ONTICK(OBJ_SUE_TELEPORT_IN, ai_sue_teleport_in); ONTICK(OBJ_KING, ai_king); AFTERMOVE(OBJ_KINGS_SWORD, aftermove_StickToLinkedActionPoint); ONTICK(OBJ_KANPACHI_FISHING, ai_kanpachi_fishing); ONTICK(OBJ_PROFESSOR_BOOSTER, ai_professor_booster); ONTICK(OBJ_BOOSTER_FALLING, ai_booster_falling); GENERIC_NPC(OBJ_SANTA); GENERIC_NPC(OBJ_CHACO); GENERIC_NPC(OBJ_JACK); GENERIC_NPC_NOFACEPLAYER(OBJ_KAZUMA); } /* void c------------------------------() {} */ void ai_jenka(Object *o) { switch(o->state) { case 0: o->state = 1; o->frame = 0; case 1: if (random(0, 120) < 10) { o->state = 2; o->timer = 0; o->frame = 1; } break; case 2: if (++o->timer > 8) { o->state = 1; o->frame = 0; } break; } } void ai_doctor(Object *o) { switch(o->state) { case 10: // he chuckles o->state = 11; o->timer2 = 0; o->frame = 1; o->animtimer = 0; case 11: ANIMATE(6, 0, 1); if (++o->timer2 > 8*6) { o->frame = 0; o->state = 1; } break; case 20: // he rises up and hovers { o->state = 21; o->timer = 0; o->frame = 2; o->ymark = o->y - (32 << CSF); } case 21: { o->yinertia += (o->y > o->ymark) ? -0x20 : 0x20; LIMITY(0x200); } break; case 30: // he teleports away { o->timer = 0; o->frame = 2; o->yinertia = 0; o->state++; } case 31: { if (DoTeleportOut(o, 1)) o->Delete(); } break; case 40: // he teleports in and hovers { o->timer = 0; o->state = 41; o->frame = 2; } case 41: { if (DoTeleportIn(o, 1)) { o->state = 20; o->yinertia = -0x200; } } break; } } /* void c------------------------------() {} */ void ai_toroko(Object *o) { switch(o->state) { case 0: // stand and blink o->frame = 0; o->xinertia = 0; randblink(o, 1, 4); break; case 3: // run away!! o->state = 4; o->frame = 1; o->animtimer = 0; case 4: ANIMATE(2, 1, 4); if (o->blockl) { o->dir = RIGHT; o->xinertia = 0x200; } if (o->blockr) { o->dir = LEFT; o->xinertia = -0x200; } XMOVE(0x400); break; case 6: // hop and run away!! o->state = 7; o->frame = 1; o->animtimer = 0; o->yinertia = -0x400; o->toro.left_ground = false; case 7: ANIMATE(2, 1, 4); XMOVE(0x100); if (!o->toro.left_ground) { if (!o->blockd) o->toro.left_ground = true; } else { if (o->blockd) { o->toro.left_ground = false; o->state = 3; } } break; // small hop straight up/down from Balrog // shaking the ground, used in Shack case 8: o->frame = 1; o->timer = 0; o->state = 9; o->yinertia = -0x200; o->toro.left_ground = false; case 9: { if (!o->toro.left_ground) { if (!o->blockd) o->toro.left_ground = true; } else { if (o->blockd) { o->toro.left_ground = false; o->state = 0; } } } break; case 10: // eeks and falls down o->state = 11; o->frame = 5; o->yinertia = -(2 << CSF); sound(SND_ENEMY_SQUEAK); XMOVE(0x100); break; case 11: // falling down if (o->blockd) { o->state = 12; o->frame = 6; o->flags |= FLAG_SCRIPTONACTIVATE; o->xinertia = 0; } break; } o->yinertia += 0x40; LIMITX(0x400); LIMITY(0x5ff); } void ai_toroko_teleport_in(Object *o) { switch(o->state) { case 0: { o->state = 1; o->timer = 0; o->flags &= ~FLAG_IGNORE_SOLID; // this is set in npc.tbl, but uh, why? } case 1: { if (DoTeleportIn(o, 2)) { o->frame = 1; o->state = 2; o->animtimer = 0; } } break; case 2: ANIMATE(2, 1, 4); if (o->blockd) { o->state = 4; o->frame = 6; // tripping frame sound(SND_THUD); } break; case 4: break; // knocked out } // fall unless teleporting if (o->state >= 2) { o->yinertia += 0x20; LIMITY(0x5ff); } } /* void c------------------------------() {} */ void ai_npc_sue(Object *o) { switch(o->state) { case 0: // stand and blink o->timer = 0; o->frame = 0; o->xinertia = 0; o->sue.carried_by = NULL; randblink(o, 1, 4); break; case 3: // walking case 4: // walking case 5: // face away ai_generic_npc(o); break; // got punched by Igor case 6: o->state = 7; o->frame = 7; o->timer = 0; sound(SND_ENEMY_SQUEAK); case 7: if (++o->timer > 10) o->state = 0; break; // got punched extra hard by Igor // flys through air backwards and crashes case 8: o->state = 9; o->frame = 7; o->timer = 0; sound(SND_ENEMY_SQUEAK); o->yinertia = -0x200; XMOVE(-0x400); case 9: if (++o->timer > 3 && o->blockd) { o->state = 10; o->dir ^= 1; } break; case 10: o->xinertia = 0; o->frame = 8; break; // punching the air (when she tells Igor "I'm not afraid of you!") case 11: o->state = 12; o->timer = 0; o->animframe = 0; o->animtimer = 0; case 12: { const static int punchframes[] = { 10, 0 }; o->animate_seq(8, punchframes, 2); } break; // picked up & carried away by Igor case 13: o->frame = 11; o->xinertia = 0; o->yinertia = 0; o->state = 14; // find Igor o->sue.carried_by = FindObjectByID2(501); if (!o->sue.carried_by) staterr("-- Could not find entity carrying Sue (ID 501)"); case 14: // being carried--see aftermove routine o->frame = 9; break; // spawn red crystal and call it to us (Undead Core intro) case 15: { o->PushBehind(dr_create_red_crystal(o->x+(128<y)); o->state = 16; o->xinertia = 0; o->frame = 0; } case 16: { crystal_xmark = o->x - (18<y - (8<xinertia = 0; o->frame = 12; crystal_xmark = o->x; crystal_ymark = o->y - (8<state = 21; o->frame = 2; o->animtimer = 0; } case 21: { ANIMATE(2, 2, 5); XMOVE(0x400); if (o->x < player->x - (8<dir = RIGHT; o->state = 0; } } break; // run, during "we've got to get out of here" post-undead core cutscene. case 30: { o->state = 31; o->frame = 2; o->animtimer = 0; } case 31: { ANIMATE(2, 2, 5); XMOVE(0x400); } break; case 40: // she jumps off the island { o->state = 41; o->frame = 9; o->yinertia = -0x400; } break; /*default: staterr("-- Sue entered unhandled state %d (0x%02x)", o->state, o->state); exit(1);*/ } o->yinertia += 0x40; LIMITX(0x400); LIMITY(0x5ff); } void aftermove_npc_sue(Object *o) { // for being carried by igor if (o->sue.carried_by) { Object *link = o->sue.carried_by; o->x = ((link->x >> CSF) + sprites[link->sprite].frame[link->frame].dir[link->dir].actionpoint2.x) << CSF; o->y = ((link->y >> CSF) + sprites[link->sprite].frame[link->frame].dir[link->dir].actionpoint2.y) << CSF; o->dir = (link->dir ^ 1); } } void onspawn_npc_sue(Object *o) { // fix a short falling glitch in Arthur's House cutscene // after Egg Corridor. // when we are SnapToGround(); } void ai_sue_teleport_in(Object *o) { switch(o->state) { case 0: { o->x += (6 << CSF); //o->PushBehind(OBJ_MISERY_STAND); o->timer = 0; o->state = 1; o->frame = 9; // her "hanging on a hook" frame } case 1: { if (DoTeleportIn(o, 2)) { o->state = 2; o->timer = 0; } } break; case 2: { if (o->blockd) { o->frame = 13; // crumpled o->state = 3; o->timer = 0; sound(SND_THUD); } } break; } // fall unless teleporting if (o->state >= 2) { o->yinertia += 0x20; LIMITY(0x5ff); } } /* void c------------------------------() {} */ void ai_king(Object *o) { Object *sword = o->linkedobject; switch(o->state) { case 0: o->frame = 0; randblink(o, 1, 8); o->xinertia = o->yinertia = 0; break; case 5: // he is knocked out o->frame = 3; o->xinertia = 0; break; case 6: // hop in air then fall and knocked out o->state = 7; o->timer = 0; o->yinertia = -0x400; case 7: // he falls and is knocked out o->frame = 2; XMOVE(0x200); o->yinertia += 0x40; if (o->timer++) { if (o->blockd) { o->state = 5; } } break; case 8: // walking o->state = 9; o->frame = 4; o->animtimer = 0; case 9: ANIMATE(3, 4, 7); XMOVE(0x200); break; case 10: // run o->state = 11; o->frame = 4; o->animtimer = 0; case 11: ANIMATE(2, 4, 7); XMOVE(0x400); break; case 20: // pull out sword if (!sword) { sword = CreateObject(0, 0, OBJ_KINGS_SWORD); sword->linkedobject = o; o->linkedobject = sword; } o->frame = 0; o->state = 0; break; case 30: // he goes flying in spec'd direction and smacks wall o->state = 31; o->timer = 0; o->frame = 2; XMOVE(0x600); o->yinertia = 0; o->nxflags &= ~NXFLAG_FOLLOW_SLOPE; // necessary to keep him from going down slope... case 31: if (o->blockl) { o->dir = RIGHT; o->state = 7; o->timer = 0; o->yinertia = -0x400; o->xinertia = 0x200; sound(SND_LITTLE_CRASH); SmokeClouds(o, 4, 8, 8); o->nxflags |= NXFLAG_FOLLOW_SLOPE; } break; case 40: // he flickers away and is replaced by the Blade o->state = 41; o->timer = 0; case 41: o->invisible ^= 1; if (++o->timer > 100) { SmokeClouds(o, 4, 8, 8); o->state = 42; o->sprite = SPR_BLADE; o->frame = o->yinertia = o->invisible = 0; } break; case 42: break; case 60: // jump (used when he lunges with sword) o->frame = 6; o->state = 61; o->yinertia = -0x5FF; o->xinertia = 0x400; if (sword) sword->carry.flip = 1; break; case 61: // jumping o->yinertia += 0x80; if (o->blockd) { o->state = 0; o->xinertia = 0; if (sword) sword->carry.flip = 0; } break; } LIMITX(0x400); LIMITY(0x5FF); } /* void c------------------------------() {} */ void ai_blue_robot(Object *o) { o->frame = 0; randblink(o, 1, 4); o->yinertia += 0x40; LIMITY(0x5ff); } void ai_kanpachi_fishing(Object *o) { if (!o->state) { o->SnapToGround(); o->state = 1; } // open eyes when player comes near o->frame = (pdistlx((64<state) { case 0: o->state = 1; o->timer = 0; o->xinertia = o->yinertia = 0; o->nxflags |= NXFLAG_FOLLOW_SLOPE; case 1: o->frame = 0; randblink(o, 1, 8, 120); break; case 30: // teleporting in at Shelter { o->frame = 0; sound(SND_TELEPORT); // move into middle of teleporter o->x -= (TILE_W << CSF); o->y += (TILE_H / 2) << CSF; o->state++; o->timer = 0; } case 31: // teleporting-in animation { if (DoTeleportIn(o, 2)) { o->state++; o->timer = 0; } } break; case 32: // wait before hop out of teleporter { if (++o->timer > 20) { o->state++; o->frame = 1; } } break; case 33: // hopping out of teleporter { if (o->blockd) { o->state++; o->timer = 0; o->frame = 0; } } break; default: ai_generic_npc(o); break; } // no fall when teleporting in if (o->state != 31 && o->state != 32) o->yinertia += 0x40; } void ai_booster_falling(Object *o) { switch(o->state) { case 0: // sitting on ground after fall o->frame = 7; break; case 10: // falling { o->frame = 8; o->yinertia += 0x40; LIMITY(0x5ff); } break; case 20: // dying (flickering away) { sound(SND_TELEPORT); o->state = 21; o->timer = 0; } case 21: { o->invisible ^= 1; if (++o->timer > 100) { SmokeClouds(o, 4, 16, 16); o->Delete(); } } break; } } /* void c------------------------------() {} */ // shared between OBJ_KAZUMA_AT_COMPUTER and OBJ_SUE_AT_COMPUTER void ai_npc_at_computer(Object *o) { enum { INIT=0, TYPING, PAUSE_SLOUCH, PAUSE_UPRIGHT }; switch(o->state) { case 0: o->SnapToGround(); o->state = TYPING; o->frame = 0; case TYPING: { ANIMATE(2, 0, 1); if (!random(0, 80)) { o->state = PAUSE_SLOUCH; o->frame = 1; o->timer = 0; } else if (!random(0, 120)) { o->state = PAUSE_UPRIGHT; o->frame = 2; o->timer = 0; } } break; case PAUSE_SLOUCH: { if (++o->timer > 40) { o->state = PAUSE_UPRIGHT; o->frame = 2; o->timer = 0; } } break; case PAUSE_UPRIGHT: { if (++o->timer > 80) { o->state = TYPING; o->frame = 0; o->timer = 0; } } break; } } /* void c------------------------------() {} */ void onspawn_generic_npc(Object *o) { // these exceptions are because the Balcony helicopter has a state // which lets them ride in it and executing this messes it up. if (o->type != OBJ_SANTA && o->type != OBJ_CHACO) { o->SnapToGround(); } } void ai_generic_npc(Object *o) { if (o->state == 0) { FACEPLAYER; } ai_generic_npc_nofaceplayer(o); } void ai_generic_npc_nofaceplayer(Object *o) { switch(o->state) { case 0: // stand { o->nxflags |= NXFLAG_FOLLOW_SLOPE; o->frame = 0; o->xinertia = 0; o->yinertia = 0; randblink(o, 1, 8, 100); } break; case 3: // walking case 4: npc_generic_walk(o, 3); break; case 5: // face away o->frame = 6; o->xinertia = 0; break; case 8: // walk (alternate state used by OBJ_NPC_JACK) if (o->type == OBJ_JACK) { o->state = 3; ai_generic_npc(o); return; } break; } } void npc_generic_walk(Object *o, int basestate) { if (o->state == basestate) { o->frame = 2; o->animtimer = 0; o->state++; } ANIMATE(3, 2, 5); XMOVE(0x200); } ================================================ FILE: ai/npc/npcregu.fdh ================================================ //hash:37dc1b77 //automatically generated by Makegen /* located in ObjManager.cpp */ //----------------[referenced from ai/npc/npcregu.cpp]---------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //----------------[referenced from ai/npc/npcregu.cpp]---------------// Object *FindObjectByID2(int id2); /* located in ai/ai.cpp */ //----------------[referenced from ai/npc/npcregu.cpp]---------------// bool DoTeleportOut(Object *o, int slowness); bool DoTeleportIn(Object *o, int slowness); void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in ai/final_battle/doctor_common.cpp */ //----------------[referenced from ai/npc/npcregu.cpp]---------------// Object *dr_create_red_crystal(int x, int y); /* located in ai/npc/npcregu.cpp */ //----------------[referenced from ai/npc/npcregu.cpp]---------------// void ai_jenka(Object *o); void ai_doctor(Object *o); void ai_toroko(Object *o); void ai_toroko_teleport_in(Object *o); void ai_npc_sue(Object *o); void aftermove_npc_sue(Object *o); void onspawn_npc_sue(Object *o); void ai_sue_teleport_in(Object *o); void ai_king(Object *o); void ai_blue_robot(Object *o); void ai_kanpachi_fishing(Object *o); void ai_professor_booster(Object *o); void ai_booster_falling(Object *o); void ai_npc_at_computer(Object *o); void onspawn_generic_npc(Object *o); void ai_generic_npc(Object *o); void ai_generic_npc_nofaceplayer(Object *o); void npc_generic_walk(Object *o, int basestate); /* located in ai/sym/smoke.cpp */ //----------------[referenced from ai/npc/npcregu.cpp]---------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //----------------[referenced from ai/npc/npcregu.cpp]---------------// void sound(int snd); /* located in common/stat.cpp */ //----------------[referenced from ai/npc/npcregu.cpp]---------------// void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //----------------[referenced from ai/npc/npcregu.cpp]---------------// int random(int min, int max); ================================================ FILE: ai/oside/oside.cpp ================================================ #include "../stdai.h" #include "../sand/sand.fdh" #include "oside.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_SKY_DRAGON, ai_sky_dragon); ONTICK(OBJ_SANDCROC_OSIDE, ai_sandcroc); ONTICK(OBJ_NIGHT_SPIRIT, ai_night_spirit); ONTICK(OBJ_NIGHT_SPIRIT_SHOT, ai_night_spirit_shot); ONTICK(OBJ_HOPPY, ai_hoppy); ONTICK(OBJ_PIXEL_CAT, ai_pixel_cat); ONTICK(OBJ_LITTLE_FAMILY, ai_little_family); } /* void c------------------------------() {} */ #define NS_WAIT 1 #define NS_SEEK_PLAYER 2 #define NS_PREPARE_FIRE 3 #define NS_FIRING 4 #define NS_RETURN_TO_SET_POINT 5 #define NS_GUARD_SET_POINT 6 void ai_night_spirit(Object *o) { //debug("ns state: %d", o->state); switch(o->state) { case 0: { o->state = NS_WAIT; o->nxflags |= NXFLAG_SLOW_WHEN_HURT; o->invisible = true; o->ymark = o->y + (12 << CSF); } case NS_WAIT: { if (pdistly((TILE_H / 2) << CSF)) { static const int distance = (SCREEN_HEIGHT << CSF); o->y += (o->dir == RIGHT) ? distance : -distance; o->state = NS_SEEK_PLAYER; o->timer = 0; o->invisible = false; o->yinertia = 0; o->flags |= FLAG_SHOOTABLE; } } break; case NS_SEEK_PLAYER: { ANIMATE(2, 0, 2); if (++o->timer > 200) { o->state = NS_PREPARE_FIRE; o->timer = 0; o->frame += 3; } } break; case NS_PREPARE_FIRE: { ANIMATE(2, 3, 5); if (++o->timer > 50) { o->state = NS_FIRING; o->timer = 0; o->frame += 3; } } break; case NS_FIRING: { ANIMATE(2, 6, 8); if ((++o->timer % 5) == 1) { Object *shot = SpawnObjectAtActionPoint(o, OBJ_NIGHT_SPIRIT_SHOT); shot->xinertia = random(0x100, 0x600); shot->yinertia = random(-0x200, 0x200); sound(SND_BUBBLE); } if (o->timer > 50) { o->state = NS_SEEK_PLAYER; o->timer = 0; o->frame -= 6; } } break; case NS_RETURN_TO_SET_POINT: { ANIMATE(2, 3, 5); // lie in wait at original set point o->yinertia += (o->y > o->ymark) ? -0x40 : 0x40; LIMITY(0x400); if (abs(o->y - o->ymark) < (SCREEN_HEIGHT/2)<state = NS_GUARD_SET_POINT; } } break; case NS_GUARD_SET_POINT: { ANIMATE(2, 3, 5); // lie in wait at original set point o->yinertia += (o->y > o->ymark) ? -0x40 : 0x40; LIMITY(0x400); // and if player appears again... if (pdistly(SCREEN_HEIGHT << CSF)) { // ..jump out and fire immediately o->state = NS_PREPARE_FIRE; o->timer = 0; } } break; } if (o->state >= NS_SEEK_PLAYER && o->state < NS_GUARD_SET_POINT) { // sinusoidal player seek o->yinertia += (o->y < player->y) ? 0x19 : -0x19; // rarely seen, but they do bounce off walls if (o->blocku) o->yinertia = 0x200; if (o->blockd) o->yinertia = -0x200; //debugHline(o->ymark - (SCREEN_HEIGHT<y - o->ymark) > SCREEN_HEIGHT<state != NS_FIRING) { o->state = NS_RETURN_TO_SET_POINT; } } } LIMITY(0x400); } void ai_night_spirit_shot(Object *o) { ANIMATE(2, 0, 2); o->xinertia -= 0x19; if (o->xinertia >= 0) { o->flags |= FLAG_IGNORE_SOLID; } else { o->flags &= ~FLAG_IGNORE_SOLID; if (o->blockl) { SmokeClouds(o, 4, 3, 3); sound(SND_SHOT_HIT); o->Delete(); } } } /* void c------------------------------() {} */ void ai_hoppy(Object *o) { switch(o->state) { case 0: { o->state = 1; o->nxflags |= NXFLAG_FOLLOW_SLOPE; } case 1: // wait for player... { o->frame = 0; if (pdistly(0x10000)) { o->state = 2; o->timer = 0; o->frame = 1; } } break; case 2: // jump { o->timer++; if (o->timer == 4) o->frame = 2; if (o->timer > 12) { o->state = 3; o->frame = 3; sound(SND_HOPPY_JUMP); o->xinertia = 0x700; } } break; case 3: // in air... { if (o->y < player->y) o->yinertia = 0xAA; else if (o->y > player->y) o->yinertia = -0xAA; if (o->blockl) { // don't stop if all of the blockl's are just touching slope bool stop = false; for(int i=0;isprite].block_l.count;i++) { uint32_t attr = o->GetAttributes(&sprites[o->sprite].block_l[i], 1, NULL); if (!(attr & TA_SLOPE)) { stop = true; break; } } if (stop) { o->xinertia = 0; o->yinertia = 0; o->state = 4; o->frame = 2; o->timer = 0; } } } break; case 4: { o->timer++; if (o->timer == 2) o->frame = 1; if (o->timer == 6) o->frame = 0; if (o->timer > 16) o->state = 1; } break; } o->xinertia -= 0x2A; LIMITX(0x5ff); } /* void c------------------------------() {} */ void ai_sky_dragon(Object *o) { switch(o->state) { case 0: // standing { ANIMATE(30, 0, 1); } break; case 10: // player and kazuma gets on, dragon floats up { o->state = 11; o->frame = 2; o->animtimer = 0; o->xmark = o->x - (6 << CSF); o->ymark = o->y - (16 << CSF); o->yinertia = 0; } case 11: { ANIMATE(5, 2, 3); o->xinertia += (o->x < o->xmark) ? 0x08 : -0x08; o->yinertia += (o->y < o->ymark) ? 0x08 : -0x08; } break; case 20: // fly away { ANIMATE(2, 2, 3); o->yinertia += (o->y < o->ymark) ? 0x08 : -0x08; o->xinertia += 0x20; LIMITX(0x600); /*player->x = o->x; player->y = o->y; run_phase_compensator();*/ } break; case 30: // spawn a Sue hanging from mouth { } break; } } /* void c------------------------------() {} */ void ai_pixel_cat(Object *o) { #ifdef SHOW_DEBUG_KITTY if (o->state == 0) { o->y -= (32 << CSF); o->state = 1; } #endif } void ai_little_family(Object *o) { o->frame &= 1; switch(o->state) { case 0: { o->state = 1; o->frame = 0; o->xinertia = 0; o->nxflags |= NXFLAG_FOLLOW_SLOPE; } case 1: { if (!random(0, 60)) { o->state = random(0, 1) ? 2 : 10; o->timer = 0; o->frame = 1; } } break; case 2: { if (++o->timer > 8) { o->state = 1; o->frame = 0; } } break; case 10: { o->state = 11; o->frame = 0; o->animtimer = 0; o->dir = random(0, 1) ? LEFT : RIGHT; o->timer = random(16, 32); } case 11: { if ((o->blockl && o->dir == LEFT) || \ (o->blockr && o->dir == RIGHT)) { o->dir ^= 1; } XMOVE(0x100); ANIMATE(4, 0, 1); if (--o->timer < 0) o->state = 0; } break; } switch(o->id2) { case 210: o->frame += 2; break; // red mom case 220: o->frame += 4; break; // little son } o->yinertia += 0x20; LIMITY(0x5ff); } ================================================ FILE: ai/oside/oside.fdh ================================================ //hash:10bf31fc //automatically generated by Makegen /* located in ai/ai.cpp */ //----------------[referenced from ai/oside/oside.cpp]---------------// Object *SpawnObjectAtActionPoint(Object *o, int otype); /* located in ai/oside/oside.cpp */ //----------------[referenced from ai/oside/oside.cpp]---------------// void ai_night_spirit(Object *o); void ai_night_spirit_shot(Object *o); void ai_hoppy(Object *o); void ai_sky_dragon(Object *o); void ai_pixel_cat(Object *o); void ai_little_family(Object *o); /* located in ai/sym/smoke.cpp */ //----------------[referenced from ai/oside/oside.cpp]---------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //----------------[referenced from ai/oside/oside.cpp]---------------// void sound(int snd); /* located in common/misc.cpp */ //----------------[referenced from ai/oside/oside.cpp]---------------// int random(int min, int max); ================================================ FILE: ai/plantation/plantation.cpp ================================================ #include "../stdai.h" #include "../sand/puppy.fdh" #include "plantation.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_ORANGEBELL, ai_orangebell); ONTICK(OBJ_ORANGEBELL_BABY, ai_orangebell_baby); ONTICK(OBJ_STUMPY, ai_stumpy); ONTICK(OBJ_MIDORIN, ai_midorin); ONTICK(OBJ_GUNFISH, ai_gunfish); ONTICK(OBJ_GUNFISH_SHOT, ai_gunfish_shot); ONTICK(OBJ_DROLL, ai_droll); ONTICK(OBJ_DROLL_SHOT, ai_droll_shot); ONTICK(OBJ_DROLL_GUARD, ai_droll_guard); ONTICK(OBJ_MIMIGA_FARMER_STANDING, ai_mimiga_farmer); ONTICK(OBJ_MIMIGA_FARMER_WALKING, ai_mimiga_farmer); ONTICK(OBJ_ROCKET, ai_rocket); ONTICK(OBJ_PROXIMITY_PRESS_HOZ, ai_proximity_press_hoz); ONTICK(OBJ_PUPPY_ITEMS, ai_puppy_wag); ONTICK(OBJ_NUMAHACHI, ai_numahachi); // nothing special is needed to keep them from leaving their cages // because the regular background tiles are set to be solid to NPC's. // Thus, they are no different from the mimiga farmer object. ONTICK(OBJ_MIMIGA_JAILED, ai_mimiga_farmer); ONSPAWN(OBJ_MIMIGA_CAGE, onspawn_mimiga_cage); GENERIC_NPC_NOFACEPLAYER(OBJ_MEGANE); GENERIC_NPC_NOFACEPLAYER(OBJ_CHIE); ONTICK(OBJ_ITOH, ai_npc_itoh); ONTICK(OBJ_KANPACHI_STANDING, ai_kanpachi_standing); ONTICK(OBJ_MOMORIN, ai_npc_momorin); } /* void c------------------------------() {} */ // dragonfly creature void ai_stumpy(Object *o) { //debug("state: %d",o->state); //debug("timer: %d",o->timer); o->frame ^= 1; switch(o->state) { case 0: { o->state = 1; o->flags |= NXFLAG_FOLLOW_SLOPE; } case 1: { if (pdistlx(240 << CSF) && pdistly(192 << CSF)) { o->state = 2; } } break; case 2: { o->state = 3; o->timer = 0; FACEPLAYER; } case 3: { if (++o->timer > 50) o->state = 4; if (!pdistlx(SCREEN_WIDTH<state = 0; } break; case 4: { o->state = 5; o->timer = 0; // throw ourselves at player ThrowObjectAtPlayer(o, 3, 0x400); o->dir = (o->xinertia >= 0) ? RIGHT : LEFT; } case 5: { SIFSprite *sprite = &sprites[o->sprite]; // don't bounce off slopes--some crap in here that should probably // be handled by the main engine somehow, maybe not setting blockl/r // for contact with slopes. if (o->xinertia < 0 && o->blockl) { if (++o->timer > 2 && !IsSlopeAtPointList(o, &sprite->block_l)) { o->xinertia = -o->xinertia; o->dir ^= 1; } } else if (o->xinertia > 0 && o->blockr) { if (++o->timer > 2 && !IsSlopeAtPointList(o, &sprite->block_r)) { o->xinertia = -o->xinertia; o->dir ^= 1; } } if (CheckStandOnSlope(o)) { o->yinertia = -0x100; } else if (o->CheckAttribute(&sprite->block_d, TA_WATER)) { o->yinertia = -0x200; } else if ((o->yinertia < 0 && o->blocku) || \ (o->yinertia >= 0 && o->blockd)) { o->yinertia = -o->yinertia; } if (++o->timer > 50) { o->state = 2; o->xinertia = 0; o->yinertia = 0; } } break; } } // very happy green guy who runs back and forth void ai_midorin(Object *o) { switch(o->state) { case 0: { o->state = 1; o->timer = 0; o->frame = 0; o->xinertia = 0; } case 1: { if (!random(0, 30)) { o->state = 2 + random(0, 1); o->frame = 1; } } break; case 2: // blinking { if (++o->timer > 8) { o->state = 1; o->timer = 0; o->frame = 0; } } break; case 3: // running { o->state = 4; o->frame = 0; // this will be toggled into frame 2 just below o->animtimer = 0; o->timer = random(48, 64); // how long to run o->dir = random(0, 1) ? LEFT : RIGHT; } case 4: { if (o->animtimer ^= 1) o->frame ^= 2; if ((o->dir==LEFT && o->blockl) || \ (o->dir==RIGHT && o->blockr)) { o->dir ^= 1; } XMOVE(0x400); if (--o->timer <= 0) o->state = 0; } break; } o->yinertia += 0x20; LIMITY(0x5ff); } /* void c------------------------------() {} */ // large bat with many baby bats void ai_orangebell(Object *o) { switch(o->state) { case 0: { o->state = 1; o->ymark = o->y; o->yinertia = 0x200; // create baby bats for(int i=0;i<8;i++) { Object *bat = CreateObject(o->CenterX() + random(-0x1000, 0x1000), \ o->CenterY() + random(-0x1000, 0x1000), \ OBJ_ORANGEBELL_BABY); bat->linkedobject = o; } } case 1: { ANIMATE(5, 0, 2); if ((o->dir==LEFT && o->blockl) || \ (o->dir==RIGHT && o->blockr)) { o->xinertia = 0; o->dir ^= 1; } XMOVE(0x100); o->yinertia += (o->y < o->ymark) ? 0x08 : -0x08; LIMITY(0x200); } break; } } void ai_orangebell_baby(Object *o) { switch(o->state) { case 0: { o->xinertia = xinertia_from_angle(random(0, 255), 0x200); o->yinertia = yinertia_from_angle(random(0, 255), 0x200); o->flags |= FLAG_IGNORE_SOLID; o->timer = 0; // time until can dive-bomb o->ymark2 = random(-32<state = 1; } case 1: { ANIMATE(1, 0, 2); if (o->linkedobject) { o->xmark = o->linkedobject->CenterX(); o->ymark = o->linkedobject->CenterY() + o->ymark2; o->dir = o->linkedobject->dir; } //DebugCrosshair(o->xmark, o->ymark, random(0,255),random(128,255),random(128,255)); o->xinertia += (o->x < o->xmark) ? 0x08 : -0x08; o->yinertia += (o->y < o->ymark) ? 0x20 : -0x20; LIMITX(0x400); LIMITY(0x400); // dive-bomb if (o->timer) o->timer--; if (pdistlx(8 << CSF) && !o->timer) { if (player->y > o->y && ((player->y - o->y) < 175<xinertia /= 4; o->yinertia = 0; o->state = 2; o->flags &= ~FLAG_IGNORE_SOLID; } } } break; case 2: // dive-bombing { o->frame = 3; o->yinertia += 0x40; LIMITY(0x5ff); if (o->blockd) { o->xinertia *= 2; o->yinertia = 0; o->timer = 120; o->state = 1; o->flags |= FLAG_IGNORE_SOLID; } } break; } } /* void c------------------------------() {} */ void ai_gunfish(Object *o) { if (player->Bottom() > o->y && \ player->Bottom() < o->Top() + (2<flags &= ~FLAG_SOLID_MUSHY; o->flags |= FLAG_SOLID_BRICK; } else { // nice repel effects if he hits sides o->flags &= ~FLAG_SOLID_BRICK; o->flags |= FLAG_SOLID_MUSHY; } switch(o->state) { case 0: { o->yinertia = 0; o->ymark = o->y; o->state = 1; o->timer = random(1, 50); } case 1: // desync { if (--o->timer <= 0) { o->yinertia = 0x200; o->state = 2; o->timer = 0; } } break; case 2: { ANIMATE(1, 0, 1); // this variation on FACEPLAYER helps keep them from turning // around so much when you are on standing on their platform. if (player->Right() < o->Left()) o->dir = LEFT; if (player->Left() > o->Right()) o->dir = RIGHT; if (pdistlx(128<timer > 80) { o->state = 10; o->timer = 0; o->frame += 2; } } } break; case 10: { ANIMATE(1, 2, 3); if (++o->timer > 20) { o->state = 20; o->timer = 0; o->frame += 2; } } break; case 20: { ANIMATE(1, 4, 5); if ((++o->timer % 10) == 3) { Object *shot = SpawnObjectAtActionPoint(o, OBJ_GUNFISH_SHOT); shot->xinertia = (o->dir == LEFT) ? -0x400 : 0x400; shot->yinertia = -0x400; sound(SND_EM_FIRE); } if (o->timer > 60) { o->state = 2; o->timer = 0; o->frame -= 4; } } break; } o->yinertia += (o->y < o->ymark) ? 0x10 : -0x10; LIMITY(0x100); } void ai_gunfish_shot(Object *o) { bool hit_something = false; if (o->xinertia <= 0 && o->blockl) hit_something = true; if (o->xinertia >= 0 && o->blockr) hit_something = true; if (o->yinertia <= 0 && o->blocku) hit_something = true; if (o->yinertia >= 0 && o->blockd) hit_something = true; if (++o->timer > 10) { SIFSprite *sprite = &sprites[o->sprite]; if (o->CheckAttribute(&sprite->block_u, TA_WATER)) { hit_something = true; } } if (hit_something) { for(int i=0;i<5;i++) { Caret *c = effect(o->CenterX(), o->CenterY(), EFFECT_GUNFISH_BUBBLE); c->xinertia = random(-0x400, 0x400); c->yinertia = random(-0x400, 0); } sound(SND_BUBBLE); o->Delete(); } o->yinertia += 0x20; LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_droll(Object *o) { switch(o->state) { case 0: { o->xmark = o->x; o->state = 1; } case 1: { ANIMATE(40, 0, 1); FACEPLAYER; if (o->shaketime) o->state = 10; } break; case 10: // prepare to jump { o->state = 11; o->frame = 2; o->timer = 0; } case 11: { if (++o->timer > 10) { // jump o->state = 12; o->frame = 6; o->timer2 = 0; // have not fired yet o->xinertia = (o->x >= o->xmark) ? -0x200 : 0x200; o->yinertia = -0x600; } } break; case 12: // in air { if (o->yinertia >= 0) { if (!o->timer2) // have fired yet? { FACEPLAYER; o->timer2 = 1; o->frame = 7; EmFireAngledShot(o, OBJ_DROLL_SHOT, 0, 0x600); sound(SND_EM_FIRE); } else if (o->yinertia > 0x200) { // after-fire frame o->frame = 3; } if (o->blockd) // already know that yinertia >= 0 { o->y >>= CSF; o->y <<= CSF; o->xinertia = 0; o->state = 13; o->frame = 2; o->timer = 0; } } } break; case 13: // landed { o->xinertia /= 2; if (++o->timer > 10) { o->xinertia = 0; o->state = 1; } } break; } o->yinertia += 0x55; LIMITY(0x5ff); } void ai_droll_shot(Object *o) { ANIMATE(0, 0, 2); if ((++o->timer % 5) == 0) sound(SND_DROLL_SHOT_FLY); bool hit_something = false; if (o->xinertia <= 0 && o->blockl) hit_something = true; if (o->xinertia >= 0 && o->blockr) hit_something = true; if (o->yinertia <= 0 && o->blocku) hit_something = true; if (o->yinertia >= 0 && o->blockd) hit_something = true; if (hit_something) { SmokeClouds(o, 4, 2, 2); effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); o->Delete(); } } // stomps you in Teleporter Room void ai_droll_guard(Object *o) { switch(o->state) { case 0: { o->x += (8 << CSF); o->state = 1; } case 1: { ANIMATE(30, 0, 1); FACEPLAYER; } break; case 10: { o->timer = 0; o->state = 11; } case 11: { o->frame = 2; if (++o->timer > 10) { o->state = 12; o->frame = 3; o->yinertia = -0x600; XMOVE(0x200); } } break; case 12: // in air... { if (o->yinertia >= 0 && o->blockd) { o->frame = 2; o->state = 13; o->timer = 0; } } break; case 13: // landed { o->xinertia /= 2; if (++o->timer > 10) { o->xinertia = 0; o->frame = 0; o->state = 1; } } break; } o->yinertia += 0x40; LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_mimiga_farmer(Object *o) { switch(o->state) { case 0: { o->frame = 0; o->xinertia = 0; o->state = 1; } case 1: { if (!random(0, 60)) { if (o->type != OBJ_MIMIGA_FARMER_STANDING && random(0, 1)) { // walk o->state = 10; } else { // blink o->state = 2; o->frame = 1; } } } break; case 2: // blinking { if (++o->timer >= 8) { o->state = 0; o->timer = 0; } } break; case 10: // walk { o->state = 11; o->frame = 2; o->animtimer = 0; o->timer = random(16, 32); o->dir = random(0, 1); } case 11: { if ((o->dir == LEFT && o->blockl) || \ (o->dir == RIGHT && o->blockr)) { o->dir ^= 1; } XMOVE(0x200); ANIMATE(4, 2, 5); if (!--o->timer) o->state = 0; } break; } o->yinertia += 0x20; LIMITY(0x5ff); } void onspawn_mimiga_cage(Object *o) { // ...because it isn't guaranteed that onspawn events // will only be called once during object creation. if (o->state == 1) return; o->state = 1; // object is used both in Jail2 and then reused in Ring2 (Doctor battle), // but tileset is different then. if (game.curmap == STAGE_KINGS_TABLE) o->sprite = SPR_MIMIGA_CAGE_FINAL; else o->sprite = SPR_JAIL2_CAGE; o->x -= (16 << CSF); } /* void c------------------------------() {} */ void ai_npc_itoh(Object *o) { switch(o->state) { case 0: { // Option 2 is set when he is in plantation, // but he still should face left. o->dir = LEFT; o->state = 1; } case 1: { o->xinertia = 0; o->frame = 0; randblink(o); } break; case 10: // cower { o->frame = 2; o->xinertia = 0; } break; case 20: // leap away { o->state = 21; o->frame = 2; o->xinertia = 0x200; o->yinertia = -0x400; } case 21: { if (o->blockd && o->yinertia >= 0) { o->xinertia = 0; o->frame = 3; o->state = 30; o->timer = 0; } } break; case 30: // shaking after leap { o->xmark = o->x; o->state = 31; } case 31: { o->x = o->xmark; if (++o->timer & 2) o->x += (1 << CSF); } break; case 40: // small vertical hop (from when he jumps out of helicopter at end) { o->state = 41; o->yinertia = -0x200; o->frame = 2; } case 41: { if (o->blockd && o->yinertia > 0) { o->xinertia = 0; o->state = 42; o->frame = 0; o->dir = RIGHT; } } break; case 42: // stop begin shocked after blocks fall (same as 0 except he doesn't blink) { o->frame = 0; o->dir = RIGHT; } break; case 50: // run a moment then stop { o->state = 51; o->timer = 0; o->animtimer = 0; o->dir = RIGHT; o->frame = 5; } case 51: { ANIMATE(3, 4, 7); XMOVE(0x200); if (++o->timer > 32) { o->frame = 0; o->xinertia = 0; o->state = 52; } } break; } o->yinertia += 0x40; LIMITY(0x5ff); } void ai_kanpachi_standing(Object *o) { switch(o->state) { case 10: // walking case 11: { npc_generic_walk(o, 10); } break; case 20: // face away/enter door { o->xinertia = 0; o->frame = 6; } break; default: ai_generic_npc_nofaceplayer(o); break; } } void ai_npc_momorin(Object *o) { switch(o->state) { case 0: o->frame = 0; randblink(o); FACEPLAYER; break; case 3: // surprised o->frame = 2; break; } } /* void c------------------------------() {} */ void ai_proximity_press_hoz(Object *o) { switch(o->state) { case 0: { if (o->dir == LEFT) o->x -= (8 << CSF); o->xmark = o->x; o->state = 1; } case 1: { if (pdistly2(0x800, 0x1000)) { if (o->dir == LEFT) { if (player->Right() <= o->x) { if ((o->x - player->Right()) <= (192<state = 2; o->frame = 2; o->timer = 0; } } } else { if (player->x >= o->x) { if ((player->x - o->x) <= (192<state = 2; o->frame = 2; o->timer = 0; } } } } } break; case 2: // activated { o->damage = 127; XMOVE(0xC00); if (++o->timer == 8) { sound(SND_BLOCK_DESTROY); SmokeSide(o, 4, o->dir); } if (o->timer > 8) { o->damage = 0; o->xinertia = 0; o->state = 3; o->timer = 0; } } break; case 3: // hit other press { if (++o->timer > 50) { o->state = 4; // return o->frame = 1; o->timer = 0; } } break; case 4: // return to start pos { XMOVE(-0x800); if (++o->timer > 10) { o->frame = 0; o->xinertia = 0; o->x = o->xmark; o->state = 1; o->timer = 0; } } break; } } /* void c------------------------------() {} */ void ai_rocket(Object *o) { switch(o->state) { case 0: break; case 10: // activated { o->state = 11; o->timer = 0; } case 11: { o->timer++; o->yinertia += 8; if (o->blockd) { if (o->timer < 10) { o->state = 12; } else { o->state = 0; } } } break; case 12: { o->flags &= ~FLAG_SCRIPTONACTIVATE; o->state = 13; o->timer = 0; o->frame = 1; SmokeClouds(o, 10, 16, 8); sound(SND_BLOCK_DESTROY); } case 13: { o->yinertia -= 0x08; // boosters fire left/right alternating: o->timer++; SpawnRocketTrail(o, (o->timer & 1) ? RIGHT : LEFT); // noise if ((o->timer % 4) == 1) sound(SND_FIREBALL); // smacked into ceiling. note that I didn't check that we're actually // riding the rocket when I test player->blocku--the original doesn't // seem to either, so I'm emulating that bug. if (o->blocku || player->blocku) { if (player->cannotride == o) player->cannotride = NULL; if (!player->blocku && (player->riding == o || player->lastriding == o)) { if (o->yinertia < 0 && o->yinertia < player->yinertia) player->yinertia = o->yinertia; } SmokeClouds(o, 6, 16, 8); sound(SND_BLOCK_DESTROY); o->yinertia = 0; o->state = 14; } } break; case 14: // falling back down { o->yinertia += 8; o->timer++; if (o->yinertia < 0) { if ((o->timer % 4) == 0) SpawnRocketTrail(o, (o->timer & 8) ? RIGHT : LEFT); // sound if ((o->timer % 16) == 1) sound(SND_FIREBALL); } else if (o->blockd) { o->y >>= CSF; o->y <<= CSF; o->flags |= FLAG_SCRIPTONACTIVATE; o->frame = 0; o->state = 0; } } break; } LIMITY(0x5ff); } static Caret *SpawnRocketTrail(Object *o, int side) { Caret *trail; int x, y; if (side == LEFT) { x = o->ActionPointX(); y = o->ActionPointY(); } else { x = o->ActionPoint2X(); y = o->ActionPoint2Y(); } trail = effect(x, y, EFFECT_SMOKETRAIL); trail->yinertia = 0x400; return trail; } /* void c------------------------------() {} */ // in the Statue Room, if you enter via the Plantation void ai_numahachi(Object *o) { switch(o->state) { case 0: case 1: { o->xinertia = 0; o->state = 2; } case 2: { ANIMATE(50, 0, 1); } break; } o->yinertia += 0x40; LIMITY(0x5ff); } ================================================ FILE: ai/plantation/plantation.fdh ================================================ //hash:b57ca8a0 //automatically generated by Makegen /* located in ObjManager.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// Caret *effect(int x, int y, int effectno); /* located in slope.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// bool IsSlopeAtPointList(Object *o, SIFPointList *points); int CheckStandOnSlope(Object *o); /* located in trig.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// void ThrowObjectAtPlayer(Object *o, int rand_variance, int speed); int xinertia_from_angle(uint8_t angle, int speed); int yinertia_from_angle(uint8_t angle, int speed); void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/ai.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// Object *SpawnObjectAtActionPoint(Object *o, int otype); void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in ai/plantation/plantation.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// void ai_stumpy(Object *o); void ai_midorin(Object *o); void ai_orangebell(Object *o); void ai_orangebell_baby(Object *o); void ai_gunfish(Object *o); void ai_gunfish_shot(Object *o); void ai_droll(Object *o); void ai_droll_shot(Object *o); void ai_droll_guard(Object *o); void ai_mimiga_farmer(Object *o); void onspawn_mimiga_cage(Object *o); void ai_npc_itoh(Object *o); void ai_kanpachi_standing(Object *o); void ai_npc_momorin(Object *o); void ai_proximity_press_hoz(Object *o); void ai_rocket(Object *o); static Caret *SpawnRocketTrail(Object *o, int side); void ai_numahachi(Object *o); /* located in ai/npc/npcregu.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// void npc_generic_walk(Object *o, int basestate); void ai_generic_npc_nofaceplayer(Object *o); /* located in ai/sym/smoke.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); void SmokeSide(Object *o, int nclouds, int dir); /* located in sound/sound.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// void sound(int snd); /* located in common/misc.cpp */ //-----------[referenced from ai/plantation/plantation.cpp]----------// int random(int min, int max); ================================================ FILE: ai/sand/curly_boss.cpp ================================================ #include "../stdai.h" #include "curly_boss.fdh" #define CURLYB_FIGHT_START 10 #define CURLYB_WAIT 11 #define CURLYB_WALK_PLAYER 13 #define CURLYB_WALKING_PLAYER 14 #define CURLYB_CHARGE_GUN 20 #define CURLYB_FIRE_GUN 21 #define CURLYB_SHIELD 30 INITFUNC(AIRoutines) { ONTICK(OBJ_CURLY_BOSS, ai_curly_boss); ONTICK(OBJ_CURLYBOSS_SHOT, ai_curlyboss_shot); } /* void c------------------------------() {} */ void ai_curly_boss(Object *o) { switch(o->state) { case CURLYB_FIGHT_START: { //o->hp = 12; o->state = CURLYB_WAIT; o->timer = random(50, 100); o->frame = 0; if (o->x > player->x) o->dir = LEFT; else o->dir = RIGHT; o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; } case CURLYB_WAIT: if (o->timer) o->timer--; else { o->state = CURLYB_WALK_PLAYER; } break; case CURLYB_WALK_PLAYER: o->state = CURLYB_WALKING_PLAYER; o->frame = 3; o->timer = random(50, 100); if (o->x > player->x) o->dir = LEFT; else o->dir = RIGHT; case CURLYB_WALKING_PLAYER: if (++o->animtimer > 2) { o->animtimer = 0; if (++o->frame > 6) o->frame = 3; } XACCEL(0x40); if (o->timer) o->timer--; else { o->flags |= FLAG_SHOOTABLE; o->state = CURLYB_CHARGE_GUN; o->timer = 0; sound(SND_CHARGE_GUN); } break; case CURLYB_CHARGE_GUN: if (o->x > player->x) o->dir = LEFT; else o->dir = RIGHT; o->xinertia *= 8; o->xinertia /= 9; if (++o->frame > 1) o->frame = 0; if (++o->timer > 50) { o->state = CURLYB_FIRE_GUN; o->frame = 0; o->timer = 0; } break; case CURLYB_FIRE_GUN: o->timer++; if (!(o->timer & 3)) { // time to fire // check if player is trying to jump over if ((abs(o->x - player->x) < (32<y + (10 << CSF)) < o->y)) { // shoot up instead o->frame = 2; curlyboss_fire(o, UP); } else { o->frame = 0; curlyboss_fire(o, o->dir); } } if (o->timer > 30) o->state = 10; break; case CURLYB_SHIELD: if (++o->frame > 8) o->frame = 7; if (++o->timer > 30) { o->frame = 0; o->state = CURLYB_FIGHT_START; } break; } if (o->state > CURLYB_FIGHT_START && o->state < CURLYB_SHIELD) { // curly activates her shield anytime a missile's explosion goes off, // even if it's nowhere near her at all if (sound_is_playing(SND_MISSILE_HIT)) { o->timer = 0; o->state = CURLYB_SHIELD; o->frame = 7; o->flags &= ~FLAG_SHOOTABLE; o->flags |= FLAG_INVULNERABLE; o->xinertia = 0; } } if (o->xinertia > 0x1FF) o->xinertia = 0x1FF; if (o->xinertia < -0x1FF) o->xinertia = -0x1FF; o->yinertia += 0x40; LIMITY(0x5ff); } static void curlyboss_fire(Object *o, int dir) { Object *shot = SpawnObjectAtActionPoint(o, OBJ_CURLYBOSS_SHOT); shot->damage = 6; shot->sprite = SPR_SHOT_MGUN_L1; shot->dir = o->dir; shot->shot.dir = dir; effect(shot->CenterX(), shot->CenterY(), EFFECT_STARPOOF); switch(dir) { case LEFT: shot->xinertia = -4096; o->apply_xinertia(1 << CSF); break; case RIGHT: shot->xinertia = 4096; o->apply_xinertia(-(1 << CSF)); break; case UP: shot->yinertia = -4096; shot->sprite++; break; } sound(SND_POLAR_STAR_L1_2); } /* void c------------------------------() {} */ void ai_curlyboss_shot(Object *o) { if (hitdetect(o, player) && !player->hurt_time) { hurtplayer(o->shot.damage); } else if (IsBlockedInShotDir(o)) { } else { return; } // we get here only if we've hit the player, or the wall shot_spawn_effect(o, EFFECT_STARSOLID); o->Delete(); } ================================================ FILE: ai/sand/curly_boss.fdh ================================================ //hash:676e013b //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------[referenced from ai/sand/curly_boss.cpp]-------------// bool hitdetect(Object *o1, Object *o2); /* located in caret.cpp */ //--------------[referenced from ai/sand/curly_boss.cpp]-------------// Caret *effect(int x, int y, int effectno); /* located in player.cpp */ //--------------[referenced from ai/sand/curly_boss.cpp]-------------// void hurtplayer(int damage); /* located in ai/ai.cpp */ //--------------[referenced from ai/sand/curly_boss.cpp]-------------// Object *SpawnObjectAtActionPoint(Object *o, int otype); /* located in ai/sand/curly_boss.cpp */ //--------------[referenced from ai/sand/curly_boss.cpp]-------------// void ai_curly_boss(Object *o); static void curlyboss_fire(Object *o, int dir); void ai_curlyboss_shot(Object *o); /* located in ai/weapons/weapons.cpp */ //--------------[referenced from ai/sand/curly_boss.cpp]-------------// bool IsBlockedInShotDir(Object *o); void shot_spawn_effect(Object *o, int effectno); /* located in sound/sound.cpp */ //--------------[referenced from ai/sand/curly_boss.cpp]-------------// void sound(int snd); bool sound_is_playing(int snd); /* located in common/misc.cpp */ //--------------[referenced from ai/sand/curly_boss.cpp]-------------// int random(int min, int max); ================================================ FILE: ai/sand/puppy.cpp ================================================ #include "../stdai.h" #include "puppy.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_PUPPY_WAG, ai_puppy_wag); ONTICK(OBJ_PUPPY_BARK, ai_puppy_bark); ONTICK(OBJ_PUPPY_SLEEP, ai_zzzz_spawner); ONTICK(OBJ_PUPPY_RUN, ai_puppy_run); AFTERMOVE(OBJ_PUPPY_CARRY, aftermove_puppy_carry); } /* void c------------------------------() {} */ // these seem to be used for the the ones in jenka's house // that you have already gotten. void ai_puppy_wag(Object *o) { // code shared with talking item-giving puppy from Plantation-- // that one doesn't face you. if (o->type != OBJ_PUPPY_ITEMS) { FACEPLAYER; } // needed so you can talk to them immediately after giving them to jenka o->flags |= FLAG_SCRIPTONACTIVATE; // only wag when player is near if (pdistlx(56 << CSF)) { if (++o->animtimer >= 4) { o->animtimer = 0; o->animframe ^= 1; } o->frame = o->animframe; } else { o->animframe = 1; o->animtimer = 0; o->frame = 0; } randblink(o, 2, 4); o->yinertia += 0x40; LIMITY(0x5ff); } void ai_puppy_bark(Object *o) { #define BARK 5 #define NOBARK 3 if (o->state < 100) { FACEPLAYER; } switch(o->state) { case 0: case 100: o->state++; o->animframe = 0; o->timer2 = 0; case 1: case 101: // bark when player is near // note: this is also supposed to run at jenka's house when balrog appears // but it's ok: // the player is always near enough because of the way the cutscene is set up if ((abs(o->x - player->x) < (64 << CSF)) && ((abs(o->y - player->y) < (16 << CSF)))) { if (++o->animtimer > 6) { o->animtimer = 0; if (o->frame==NOBARK) { o->frame = BARK; sound(SND_PUPPY_BARK); } else { o->frame = NOBARK; if (random(0, 8)==0 || ++o->timer2 > 5) { // stop barking for a sec o->state++; o->timer = o->timer2 = 0; o->frame = 0; } } } } else { o->frame = 0; o->animtimer = 9999; // begin barking as SOON as player gets near } break; case 2: case 102: o->frame = 0; if (++o->timer > 8) { // start barking again o->state--; o->animtimer = 0; o->timer2 = 0; } break; // do not bark at all--set during jenka's 1st cutscene with balrog case 20: case 120: o->frame = 0; break; } o->yinertia += 0x40; LIMITY(0x5ff); } void ai_zzzz_spawner(Object *o) { if (!o->timer) { effect(o->CenterX(), o->CenterY(), EFFECT_ZZZZ); o->timer = 99; } else o->timer--; } void ai_puppy_run(Object *o) { switch(o->state) { case 0: o->nxflags |= NXFLAG_FOLLOW_SLOPE; o->flags |= FLAG_SCRIPTONACTIVATE; // for some reason this isn't set on puppy in map o->state = 1; case 1: FACEPLAYER; o->frame = 0; // necessary for randblink if (pdistly2((32 << CSF), (16 << CSF))) { if (pdistlx(32 << CSF)) { // run away!!! FACEAWAYPLAYER; o->state = 10; } else if (pdistlx(96 << CSF)) { // wag tail if (++o->animtimer >= 4) { o->animtimer = 0; o->animframe ^= 1; } o->frame = o->animframe; } } randblink(o, 2, 4); break; case 10: o->state = 11; o->frame = 4; o->animtimer = 0; case 11: // running if (o->blockd) { if (++o->animtimer > 2) { o->animtimer = 0; o->frame = (o->frame==4) ? 3:4; } } // "bounce" off walls if (o->dir==RIGHT) { if (o->blockr) { o->xinertia = -(o->xinertia >> 1); o->dir = LEFT; } } else { if (o->blockl) { o->xinertia = -(o->xinertia >> 1); o->dir = RIGHT; } } o->xinertia += (o->dir==RIGHT) ? 0x40 : -0x40; if (o->xinertia > 0x5ff) o->xinertia = 0x400; if (o->xinertia < -0x5ff) o->xinertia = -0x400; break; } } /* void c------------------------------() {} */ void aftermove_puppy_carry(Object *o) { StickToPlayer(o, -1, -13, -23); o->frame = 0; randblink(o, 2, 4); } ================================================ FILE: ai/sand/puppy.fdh ================================================ //hash:a6684331 //automatically generated by Makegen /* located in caret.cpp */ //-----------------[referenced from ai/sand/puppy.cpp]---------------// Caret *effect(int x, int y, int effectno); /* located in ai/ai.cpp */ //-----------------[referenced from ai/sand/puppy.cpp]---------------// void randblink(Object *o, int blinkframe, int blinktime, int prob); void StickToPlayer(Object *o, int x_left, int x_right, int off_y); /* located in ai/sand/puppy.cpp */ //-----------------[referenced from ai/sand/puppy.cpp]---------------// void ai_puppy_wag(Object *o); void ai_puppy_bark(Object *o); void ai_zzzz_spawner(Object *o); void ai_puppy_run(Object *o); void aftermove_puppy_carry(Object *o); /* located in sound/sound.cpp */ //-----------------[referenced from ai/sand/puppy.cpp]---------------// void sound(int snd); /* located in common/misc.cpp */ //-----------------[referenced from ai/sand/puppy.cpp]---------------// int random(int min, int max); ================================================ FILE: ai/sand/sand.cpp ================================================ #include "../stdai.h" #include "../egg/egg.fdh" // for ai_beetle_horiz #include "sand.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_BEETLE_BROWN, ai_beetle_horiz); ONTICK(OBJ_POLISH, ai_polish); ONDEATH(OBJ_POLISH, ondeath_polish); ONTICK(OBJ_POLISHBABY, ai_polishbaby); ONTICK(OBJ_SANDCROC, ai_sandcroc); ONTICK(OBJ_MIMIGAC1, ai_curlys_mimigas); ONTICK(OBJ_MIMIGAC2, ai_curlys_mimigas); ONTICK(OBJ_MIMIGAC_ENEMY, ai_curlys_mimigas); ONTICK(OBJ_SUNSTONE, ai_sunstone); ONTICK(OBJ_ARMADILLO, ai_armadillo); ONTICK(OBJ_CROW, ai_crow); ONTICK(OBJ_CROWWITHSKULL, ai_crowwithskull); ONTICK(OBJ_SKULLHEAD, ai_skullhead); ONTICK(OBJ_SKULLHEAD_CARRIED, ai_skullhead_carried); AFTERMOVE(OBJ_SKULLHEAD_CARRIED, aftermove_skullhead_carried); ONTICK(OBJ_SKULLSTEP, ai_skullstep); ONTICK(OBJ_SKULLSTEP_FOOT, ai_skullstep_foot); ONTICK(OBJ_SKELETON, ai_skeleton); ONTICK(OBJ_SKELETON_SHOT, ai_skeleton_shot); } /* void c------------------------------() {} */ void ai_polish(Object *o) { #define POLISH_ACCEL 0x20 #define POLISH_SPEED 0x200 #define POLISH_BOUNCE 0x100 #define POLISH_CCW_LEFT 1 #define POLISH_CCW_UP 2 #define POLISH_CCW_RIGHT 3 #define POLISH_CCW_DOWN 4 #define POLISH_CW_LEFT 5 #define POLISH_CW_UP 6 #define POLISH_CW_RIGHT 7 #define POLISH_CW_DOWN 8 switch(o->state) { case 0: // initilization { o->state = (o->dir == LEFT) ? POLISH_CW_RIGHT : POLISH_CCW_LEFT; // reprocess first frame ai_polish(o); } break; // -------------- Traveling around counter-clockwise -------------- case POLISH_CCW_LEFT: // traveling left on ceiling { o->yinertia -= POLISH_ACCEL; if (o->yinertia < 0 && o->blocku) { o->yinertia = POLISH_BOUNCE; o->xinertia -= POLISH_BOUNCE; } if (o->blockl) o->state = POLISH_CCW_DOWN; } break; case POLISH_CCW_UP: // traveling up right wall { o->xinertia += POLISH_ACCEL; if (o->xinertia > 0 && o->blockr) { o->xinertia = -POLISH_BOUNCE; o->yinertia -= POLISH_BOUNCE; } if (o->blocku) o->state = POLISH_CCW_LEFT; } break; case POLISH_CCW_RIGHT: // traveling right on floor { o->yinertia += POLISH_ACCEL; if (o->yinertia > 0 && o->blockd) { o->yinertia = -POLISH_BOUNCE; o->xinertia += POLISH_BOUNCE; } if (o->blockr) o->state = POLISH_CCW_UP; } break; case POLISH_CCW_DOWN: // traveling down left wall { o->xinertia -= POLISH_ACCEL; if (o->xinertia < 0 && o->blockl) { o->xinertia = POLISH_BOUNCE; o->yinertia += POLISH_BOUNCE; } if (o->blockd) o->state = POLISH_CCW_RIGHT; } break; // -------------- Traveling around clockwise -------------- case POLISH_CW_LEFT: // traveling left on floor { o->yinertia += POLISH_ACCEL; if (o->yinertia > 0 && o->blockd) { o->yinertia = -POLISH_BOUNCE; o->xinertia -= POLISH_BOUNCE; } if (o->blockl) o->state = POLISH_CW_UP; } break; case POLISH_CW_UP: // traveling up left wall { o->xinertia -= POLISH_ACCEL; if (o->xinertia < 0 && o->blockl) { o->xinertia = POLISH_BOUNCE; o->yinertia -= POLISH_BOUNCE; } if (o->blocku) o->state = POLISH_CW_RIGHT; } break; case POLISH_CW_RIGHT: // traveling right on ceiling { o->yinertia -= POLISH_ACCEL; if (o->yinertia < 0 && o->blocku) { o->yinertia = POLISH_BOUNCE; o->xinertia += POLISH_BOUNCE; } if (o->blockr) o->state = POLISH_CW_DOWN; } break; case POLISH_CW_DOWN: // traveling down right wall { o->xinertia += POLISH_ACCEL; if (o->xinertia > 0 && o->blockr) { o->xinertia = -POLISH_BOUNCE; o->yinertia += POLISH_BOUNCE; } if (o->blockd) o->state = POLISH_CW_LEFT; } break; } LIMITX(POLISH_SPEED); LIMITY(POLISH_SPEED); // animation o->animframe ^= 1; o->frame = o->animframe + 2; //if (o->state==P_DOWNRIGHT || o->state==P_UPRIGHT) o->frame += 2; o->dir = RIGHT; } void ondeath_polish(Object *o) { int i; int x, y; x = o->CenterX(); y = o->CenterY(); for(i=0;i<10;i++) { CreateObject(x, y, OBJ_POLISHBABY); } o->Delete(); } void ai_polishbaby(Object *o) { if (!o->state) { o->state = 1; if (!random(0, 1)) o->xinertia = random(0x100, 0x200); else o->xinertia = random(-0x200, -0x100); if (!random(0, 1)) o->yinertia = random(0x100, 0x200); else o->yinertia = random(-0x200, -0x100); } if (o->xinertia > 0 && o->blockr) o->xinertia = -o->xinertia; if (o->xinertia < 0 && o->blockl) o->xinertia = -o->xinertia; if (o->yinertia > 0 && o->blockd) o->yinertia = -o->yinertia; if (o->yinertia < 0 && o->blocku) o->yinertia = -o->yinertia; o->frame ^= 1; } /* void c------------------------------() {} */ void ai_sandcroc(Object *o) { int pbottom, crocbottom; switch(o->state) { case 0: o->state = 1; o->timer = 0; o->ymark = o->y; o->flags &= ~(FLAG_SOLID_MUSHY | FLAG_SHOOTABLE | FLAG_INVULNERABLE | FLAG_IGNORE_SOLID); case 1: // track player invisibly underground o->xinertia = (o->CenterX() < player->CenterX()) ? 0x400:-0x400; if (pdistlx(19 << CSF)) { // check if bottoms of player and croc are near pbottom = player->y + (sprites[player->sprite].bbox.y2 << CSF); crocbottom = o->y + (sprites[o->sprite].bbox.y2 << CSF) + 0x600; if (pbottom <= crocbottom && crocbottom - pbottom < (12 << CSF)) { // attack!! o->xinertia = 0; o->state = 2; o->timer = 0; sound(SND_JAWS); o->frame = 0; } } break; case 2: // attacking if (++o->animtimer > 3) { o->animtimer = 0; o->frame++; } if (o->frame==3) o->damage = (o->type==OBJ_SANDCROC_OSIDE) ? 15:10; else if (o->frame==4) { o->flags |= FLAG_SHOOTABLE; o->state = 3; o->timer = 0; } break; case 3: o->flags |= FLAG_SOLID_MUSHY; o->damage = 0; o->timer++; if (o->shaketime) { o->state = 4; o->timer = 0; o->yinertia = 0; o->shaketime += 25; // delay floattext until after we're underground } break; case 4: // retreat o->y += 0x280; if (++o->timer == 30) { o->flags &= ~(FLAG_SOLID_MUSHY | FLAG_SHOOTABLE); o->state = 5; o->timer = 0; } break; case 5: o->frame = 0; o->y = o->ymark; if (o->timer < 100) { o->timer++; // have to wait before moving: till floattext goes away // else they can see us jump if (o->timer==98) { o->xinertia = (player->CenterX() - o->CenterX()); } else o->xinertia = 0; } else { o->state = 0; } break; } LIMITY(0x100); // these guys (from oside) don't track if (o->type == OBJ_SANDCROC_OSIDE) o->xinertia = 0; } void ai_sunstone(Object *o) { switch(o->state) { case 0: o->flags |= FLAG_IGNORE_SOLID; o->state = 1; break; case 10: // triggered to move by hvtrigger script o->frame = 1; o->timer = 0; o->state++; case 11: if (o->dir==LEFT) o->x -= 0x80; else o->x += 0x80; if ((o->timer & 7) == 0) sound(SND_QUAKE); o->timer++; game.quaketime = 20; break; } } void ai_crow(Object *o) { // for crows carrying skullheads if (o->state >= 100) { // if our skullhead dies, go into attack mode if (!o->linkedobject) { o->state = 2; } else { // link our blockd with it's blockd so we don't fly it through the floor o->blockd |= o->linkedobject->blockd; } } switch(o->state) { case 0: { uint8_t angle = random(0, 255); vector_from_angle(angle, (1<xinertia, &o->yinertia); o->xmark = o->x + (o->xinertia * 8); o->ymark = o->y + (o->yinertia * 8); o->state = 1; o->nxflags |= NXFLAG_FOLLOW_SLOPE; o->animframe = random(0, 1); o->animtimer = random(0, 4); } case 1: case 101: { if (o->x > o->xmark) o->xinertia -= 16; else if (o->x < o->xmark) o->xinertia += 16; if (o->y > o->ymark) o->yinertia -= 16; else if (o->y < o->ymark) o->yinertia += 16; FACEPLAYER; LIMITX(0x200); LIMITY(0x200); if (o->shaketime) { o->state++; // state 2/102 o->timer = 0; if (!o->linkedobject) { if (o->dir==RIGHT) o->xinertia = -0x200; else o->xinertia = 0x200; } o->yinertia = 0; } } break; case 2: case 102: { FACEPLAYER; if (o->shaketime) { // fall while hurt o->yinertia += 0x20; o->xinertia = 0; } else { if (!o->linkedobject) { // move towards player if (o->x < player->x) o->xinertia += 0x10; else o->xinertia -= 0x10; if (o->y < player->y) o->yinertia += 0x10; else o->yinertia -= 0x10; } else { // carrying a skull; don't chase him o->state--; // state 1/101 } } // bounce off walls if (o->xinertia < 0 && o->blockl) o->xinertia = 0x200; if (o->xinertia > 0 && o->blockr) o->xinertia = -0x200; if (o->yinertia < 0 && o->blocku) o->yinertia = 0x200; if (o->yinertia > 0 && o->blockd) o->yinertia = -0x200; LIMITX(0x5ff); LIMITY(0x5ff); } break; } if (++o->animtimer >= 2) { o->animtimer = 0; o->animframe ^= 1; } o->frame = o->animframe; if (o->shaketime) o->frame = 4; } void ai_crowwithskull(Object *o) { Object *skull; // create the skullhead we're carrying skull = CreateObject(0, 0, OBJ_SKULLHEAD_CARRIED); skull->linkedobject = o; skull->timer = random(0, 50); o->linkedobject = skull; // switch over to the main crow AI, but only move up & down o->yinertia = random(-0x200, -0x100); o->xmark = o->x; o->ymark = o->y + random(-(28 << CSF), (10 << CSF)); o->animframe = random(0, 1); o->animtimer = random(0, 4); o->state = 101; o->type = OBJ_CROW; // run the ai for the normal crow for this first frame ai_crow(o); } /* void c------------------------------() {} */ void ai_skullhead(Object *o) { switch(o->state) { case 0: { o->speed = 0x100; // skullhead_carried shares ai but moves faster o->state = 1; o->timer = random(-5, 0); } case 1: { if (++o->timer > 3) { o->yinertia = -0x350; o->state = 2; o->frame = 1; XMOVE(o->speed); } else break; } case 2: { if (o->blockd) { o->xinertia = 0; o->state = 1; o->timer = 0; o->frame = 0; } if (o->blocku && o->yinertia < 0) o->yinertia = 0; if (o->yinertia > 0) o->frame = 0; else o->frame = 1; } break; } if (o->xinertia) { if (o->blockl) { o->dir = RIGHT; o->xinertia = o->speed; } if (o->blockr) { o->dir = LEFT; o->xinertia = -o->speed; } } o->yinertia += 0x40; LIMITY(0x5ff); } void ai_skullhead_carried(Object *o) { // if our crow dies, change into a regular skullhead if (!o->linkedobject) { o->type = OBJ_SKULLHEAD; o->state = 2; // falling o->speed = 0x200; XMOVE(o->speed); ai_skullhead(o); return; } switch(o->state) { case 0: case 1: // mouth closed { o->frame = 0; // shoot only when player near if ((abs(player->x - o->x) < (130 << CSF)) && (abs(player->y - o->y) < (100 << CSF))) { o->timer++; } else o->timer = 49; if (o->timer >= 50) { o->frame = 1; o->state = 2; o->timer = 0; } } break; case 2: // mouth opened { o->frame = 1; o->timer++; if ((o->timer==30 || o->timer==35) && o->onscreen) { EmFireAngledShot(o, OBJ_SKELETON_SHOT, 2, 0x300); sound(SND_EM_FIRE); } else if (o->timer > 50) { o->frame = 0; o->state = 1; o->timer = 0; } } break; } } void aftermove_skullhead_carried(Object *o) { Object *crow; // keep us in the right spot relative to our crow if (o->linkedobject) { crow = o->linkedobject; o->x = crow->x + (1 << CSF); o->y = crow->y + (21 << CSF); o->dir = crow->dir; } } /* void c------------------------------() {} */ void ai_skeleton_shot(Object *o) { ai_animate2(o); // animate at 1 frame per 2 ticks // bounce off walls if ((o->blockl && o->xinertia < 0) || (o->blockr && o->xinertia > 0)) { o->xinertia = -o->xinertia; o->timer += 5; } // bounce off ceiling if ((o->blocku && o->yinertia < 0)) { o->yinertia = -o->yinertia; o->timer += 5; } // if hit floor bounce along it... if (o->blockd) { o->yinertia = -0x180; o->state = 1; // begin falling o->timer += 4; } if (o->state == 1) { o->yinertia += 0x10; LIMITY(0x5ff); } if (o->timer >= 10) { effect(o->CenterX(), o->CenterY(), EFFECT_FISHY); o->Delete(); } } void ai_armadillo(Object *o) { switch(o->state) { case 0: { FACEPLAYER; o->state = 1; } case 1: { if (o->blockl && o->dir == LEFT) o->dir = RIGHT; if (o->blockr && o->dir == RIGHT) o->dir = LEFT; XMOVE(0x100); ANIMATE(4, 0, 1); } break; } o->yinertia += 0x40; LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_skullstep(Object *o) { Object *foot; switch(o->state) { case 0: { o->y += (7 << CSF); // spawn the feet foot = CreateObject(0, 0, OBJ_SKULLSTEP_FOOT); foot->linkedobject = o; foot = CreateObject(0, 0, OBJ_SKULLSTEP_FOOT); foot->linkedobject = o; foot->angleoffset = 128; o->state = 1; o->angle = 200; } case 1: { // spin the feet o->angle += (o->dir==RIGHT) ? 6 : -6; // if we hit the ground, slow down. if we have been there for a while, // our feet must have gone away, so go to explode state if (o->blockd) { o->xinertia *= 3; o->xinertia /= 4; if (++o->timer > 60) { o->state = 2; o->timer = 0; } } else o->timer = 0; // turn around if we run into a wall if ((o->dir==RIGHT && o->blockr) || (o->dir==LEFT && o->blockl)) { if (++o->timer2 > 8) { o->dir ^= 1; } } else o->timer2 = 0; } break; case 2: { o->timer++; o->shaketime = o->timer; // have to set it to timer and not a constant so it alternates if (o->timer > 50) { SmokeClouds(o, 8, 8, 8); sound(SND_FUNNY_EXPLODE); o->Delete(); } } break; } o->yinertia += 0x80; if (o->blockd) o->yinertia = 0; LIMITX(0x2ff); LIMITY(0x2ff); } void ai_skullstep_foot(Object *o) { Object *skull = o->linkedobject; uchar angle; int circle_x, circle_y; // skull was destroyed before us? if (!skull || skull->state==2) { o->Delete(); return; } angle = skull->angle; angle += o->angleoffset; // handle moving up when stepping on the ground if (o->blockd) skullstep_do_step(o, skull, angle); o->dir = skull->dir; // spin around vector_from_angle(angle, (10 << CSF), &circle_x, &circle_y); o->x = skull->x + (3 << CSF) + circle_x; o->y = skull->y + (8 << CSF) + circle_y; o->frame = (angle >= 20 && angle <= 108) ? 0:1; } // prevent climbing the walls. this didn't seem to be a problem in the original // game but to me, the feet tend to spin into walls when they're near them and // "falsely" set blockd resulting in skipping up the wall. void skullstep_do_step(Object *o, Object *skull, int angle) { int x, y; int i; // get the coordinates of the tile that's blocking us // we already KNOW we're blockd, so if it returns false, we're standing on a slope if (o->CheckAttribute(&sprites[o->sprite].block_d, TA_SOLID_NPC, &x, &y)) { // if the tile above it is also solid, it can't be a floor, it's a wall! if (tileattr[map.tiles[x][y-1]] & TA_SOLID_NPC) { return; } else { // it's also a wall if the tile below is solid and neither of the tiles to // the left or right are solid (top of a wall) if (tileattr[map.tiles[x][y+1]] & TA_SOLID_NPC) { // we have to check TWO tiles to the right and see if EITHER is nonsolid because // of the two-tile wall on the right-lower "arena" slopey part--kind of a hack, // i hate to have to put map-specific code in if (!(tileattr[map.tiles[x+1][y]] & TA_SOLID_NPC) || \ !(tileattr[map.tiles[x+2][y]] & TA_SOLID_NPC)) { if (!(tileattr[map.tiles[x-1][y]] & TA_SOLID_NPC)) { return; } } } } } // move us up until we're no longer in the ground for(i=0;i<10;i++) { o->y -= (1<y -= (1<UpdateBlockStates(DOWNMASK); if (!o->blockd) break; } // now move us down so we're just touching the ground o->y += (1<y += (1<xinertia += (o->dir==RIGHT) ? 0x80 : -0x80; } /* void c------------------------------() {} */ void ai_skeleton(Object *o) { uchar pnear; #define SKNEAR_X (352<state) { case 0: { o->frame = o->blockd ? 0:1; o->xinertia = 0; // if player comes near, enter attack state // also if he shoots us while we're inactive, don't just stand there // like a ninny, jump around! if (o->shaketime) o->state = 20; if (pnear) o->state = 10; } break; case 10: // prepare for jump o->timer = o->timer2 = o->frame = o->xinertia = 0; o->state = 11; case 11: if (++o->timer > 5 && o->blockd) { // jump if player near, else go to idle o->state = pnear ? 20:0; } if (o->state != 20) break; case 20: { o->state = 21; o->frame = 1; o->timer2 = 0; o->yinertia = -(random(1, 3) << CSF); // jump towards player, unless we've been hurt; in that case jump away if (!o->shaketime) { o->xinertia += (o->x > player->x) ? -0x100:0x100; } else { o->xinertia += (o->x > player->x) ? 0x100:-0x100; } } case 21: { if (o->yinertia > 0) { if (o->timer2 == 0) { o->timer2++; EmFireAngledShot(o, OBJ_SKELETON_SHOT, 0, 0x300); if (o->onscreen) sound(SND_EM_FIRE); } if (o->blockd) { o->state = 10; o->frame = 0; } } else { if (o->blocku) o->yinertia = 0; } } break; } if (o->state >= 10) FACEPLAYER; o->yinertia += 0x33; LIMITX(0x5ff); LIMITY(0x5ff); } // curly's mimiga's void ai_curlys_mimigas(Object *o) { static const uint8_t mimiga_walk_frames[5] = { 0, 2, 0, 3 }; switch(o->state) { case 0: // init/set initial anim state o->frame = 0; if (o->type==OBJ_MIMIGAC1) o->state = 100; else { // OBJ_MIMIGAC2 & OBJ_MIMIGA_ENEMY o->state = 2; // stand and blink if (o->type==OBJ_MIMIGAC2) { if (o->dir == RIGHT) o->state = 110; // sleeping } } ai_curlys_mimigas(o); // re-process again with correct state break; case 2: // init stand and blink o->state = 3; case 3: // stand and blink o->frame = 0; randblink(o, 1, 8); break; // sitting mimiga (when facing right) // facing away mimiga (when facing left) case 100: o->frame = 4; break; case 110: // sleeping facing left mimiga o->frame = 7; ai_zzzz_spawner(o); break; /// ******************** Fighting Mimiga Code ******************** case 10: o->flags |= FLAG_SHOOTABLE; o->hp = 1000; o->state = 11; o->timer = random(0, 50); o->frame = 0; //fall thru to state 11 case 11: if (o->timer) o->timer--; else o->state = 13; break; case 13: o->state = 14; o->timer = random(0, 50); o->animframe = 0; if (o->x <= player->x) o->dir = RIGHT; else o->dir = LEFT; // fall thru case 14: if (++o->animtimer > 2) { o->animtimer = 0; if (++o->animframe > 3) o->animframe = 0; } o->frame = mimiga_walk_frames[o->animframe]; if (o->dir==LEFT) o->xinertia -= 0x40; else o->xinertia += 0x40; if (o->timer) { o->timer--; } else { // enter hop state o->state = 15; o->frame = 2; o->yinertia = -0x200; o->damage = 2; } break; case 15: // hopping if (o->blockd) { // landed o->xinertia = 0; o->state = 10; o->damage = 0; } break; case 20: // aiiie! got shot!! if (o->blockd) { o->xinertia = 0; o->state = 21; if (o->frame==6) o->frame = 7; else o->frame = 8; o->timer = random(300, 400); } break; case 21: // lying on ground knocked out if (o->timer) { o->timer--; break; } o->flags |= FLAG_SHOOTABLE; o->hp = 1000; o->state = 11; o->timer = random(0, 50); o->frame = 0; break; } if (o->state > 10 && o->state < 20 && o->hp != 1000) { // got shot by player o->state = 20; o->yinertia = -0x200; o->frame = random(5, 6); o->damage = 0; o->flags &= ~FLAG_SHOOTABLE; } o->yinertia += 0x20; LIMITY(0x5ff); LIMITX(0x1ff); } ================================================ FILE: ai/sand/sand.fdh ================================================ //hash:00b4d2dc //automatically generated by Makegen /* located in ObjManager.cpp */ //-----------------[referenced from ai/sand/sand.cpp]----------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //-----------------[referenced from ai/sand/sand.cpp]----------------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //-----------------[referenced from ai/sand/sand.cpp]----------------// void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys); void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/ai.cpp */ //-----------------[referenced from ai/sand/sand.cpp]----------------// void ai_animate2(Object *o); void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in ai/sand/sand.cpp */ //-----------------[referenced from ai/sand/sand.cpp]----------------// void ai_polish(Object *o); void ondeath_polish(Object *o); void ai_polishbaby(Object *o); void ai_sandcroc(Object *o); void ai_sunstone(Object *o); void ai_crow(Object *o); void ai_crowwithskull(Object *o); void ai_skullhead(Object *o); void ai_skullhead_carried(Object *o); void aftermove_skullhead_carried(Object *o); void ai_skeleton_shot(Object *o); void ai_armadillo(Object *o); void ai_skullstep(Object *o); void ai_skullstep_foot(Object *o); void skullstep_do_step(Object *o, Object *skull, int angle); void ai_skeleton(Object *o); void ai_curlys_mimigas(Object *o); /* located in ai/sand/puppy.cpp */ //-----------------[referenced from ai/sand/sand.cpp]----------------// void ai_zzzz_spawner(Object *o); /* located in ai/sym/smoke.cpp */ //-----------------[referenced from ai/sand/sand.cpp]----------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //-----------------[referenced from ai/sand/sand.cpp]----------------// void sound(int snd); /* located in common/misc.cpp */ //-----------------[referenced from ai/sand/sand.cpp]----------------// int random(int min, int max); ================================================ FILE: ai/sand/toroko_frenzied.cpp ================================================ #include "../stdai.h" #include "toroko_frenzied.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_TOROKO_FRENZIED, ai_toroko_frenzied); ONTICK(OBJ_TOROKO_BLOCK, ai_toroko_block); AFTERMOVE(OBJ_TOROKO_BLOCK, aftermove_toroko_block); ONTICK(OBJ_TOROKO_FLOWER, ai_toroko_flower); } /* void c------------------------------() {} */ void ai_toroko_frenzied(Object *o) { Object *block = o->linkedobject; #define SPAWNBLOCK \ { \ block = CreateObject(0, 0, OBJ_TOROKO_BLOCK); \ block->PushBehind(o); \ block->linkedobject = o; \ o->linkedobject = block; \ block->flags &= ~FLAG_INVULNERABLE; \ } #define THROWBLOCK \ { \ block->x += (16 << CSF) * ((o->dir==RIGHT) ? 1 : -1); \ block->y += (9 << CSF); \ block->flags |= FLAG_INVULNERABLE; \ ThrowObjectAtPlayer(block, 1, 0x900); \ o->linkedobject = block->linkedobject = NULL; \ sound(SND_EM_FIRE); \ } #define HOLDBRICKTIME 30 switch(o->state) { case 0: o->state = 1; o->frame = 9; o->flags &= ~(FLAG_SCRIPTONACTIVATE | FLAG_SHOOTABLE | FLAG_IGNORE_SOLID); case 1: // wait a sec before morphing if (++o->timer > 50) { o->timer = 0; o->state = 2; o->frame = 8; } break; case 2: // morph into big toroko ANIMATE(0, 9, 10); if (++o->timer > 50) { o->state = 3; o->timer = 0; o->flags |= FLAG_SHOOTABLE; } break; case 3: // rest a moment, then jump o->frame = 1; if (++o->timer > 5) { o->state = 10; o->flags |= FLAG_SHOOTABLE; } break; case 10: // wait a moment then ATTACK!! o->state = 11; o->frame = 0; o->animtimer = 0; o->timer = random(20, 130); o->xinertia = 0; case 11: FACEPLAYER; ANIMATE(4, 0, 1); ///FIXME:: I think Toroko does not like fireball either? if (o->frame==0 && (sound_is_playing(SND_MISSILE_HIT) /*|| sound_is_playing(0)*/)) { o->state = 20; } if (!o->timer) { o->state = (random(0, 1) ? 20 : 50); } else o->timer--; break; case 20: // init for a jump o->state = 21; o->frame = 2; o->timer = 0; case 21: // preparing to jump if (++o->timer > 10) { o->state = 22; o->timer = 0; o->frame = 3; o->yinertia = -0x5ff; XMOVE(0x200); } break; case 22: // jumping up if (++o->timer > 10) { o->state = 23; o->timer = 0; o->frame = 6; SPAWNBLOCK; } break; case 23: // preparing to throw block if (++o->timer > HOLDBRICKTIME) { o->state = 24; o->timer = 0; o->frame = 7; THROWBLOCK; } FACEPLAYER; break; case 24: // threw block if (++o->timer > 3) { o->state = 25; o->frame = 3; } break; case 25: // coming back down if (o->blockd) { o->state = 26; o->timer = 0; o->frame = 2; sound(SND_QUAKE); game.quaketime = 20; } break; case 26: // landed o->xinertia *= 8; o->xinertia /= 9; if (++o->timer > 20) { o->state = 10; o->frame = 0; } break; case 50: // throw a block (standing on ground) o->state = 51; o->timer = 0; o->frame = 4; SPAWNBLOCK; case 51: if (++o->timer > HOLDBRICKTIME) { o->state = 52; o->timer = 0; o->frame = 5; THROWBLOCK; } FACEPLAYER; break; case 52: if (++o->timer > 3) { o->state = 10; o->frame = 0; } break; case 100: // defeated (set by Script On Death) o->frame = 3; o->state = 101; o->flags &= ~FLAG_SHOOTABLE; SmokeClouds(o, 8, 8, 8); case 101: // wait till fall to ground if (o->blockd) { o->state = 102; o->frame = 2; o->timer = 0; sound(SND_QUAKE); game.quaketime = 20; } break; case 102: // crouching & smoking o->xinertia *= 8; o->xinertia /= 9; if (++o->timer > 50) { o->state = 103; o->timer = 0; o->frame = 10; } break; case 103: // looks pained if (++o->timer > 50) { o->state = 104; o->timer = 0; o->frame = 9; } break; case 104: // morphing back into normal toroko o->frame = (o->frame==9) ? 10:9; if (++o->timer > 100) { o->state = 105; o->timer = 0; o->frame = 9; } break; case 105: // back to normal if (++o->timer > 50) { o->state = 106; o->animtimer = 0; o->frame = 11; } break; case 106: // red goes out of her eyes, she falls down if (++o->animtimer > 50) { // collapse o->animtimer = 0; if (++o->frame > 12) o->frame = 12; } break; case 140: // disappear o->state = 141; o->timer = 0; o->frame = 12; sound(SND_TELEPORT); case 141: o->invisible ^= 1; if (++o->timer > 100) { // normal SmokeClouds() doesn't spawn in the right place because the sprite // is still sized for big toroko, so I made an Action Point for this frame. SmokePuff(o->ActionPointX(), o->ActionPointY()); SmokePuff(o->ActionPointX(), o->ActionPointY()); SmokePuff(o->ActionPointX(), o->ActionPointY()); SmokePuff(o->ActionPointX(), o->ActionPointY()); o->Delete(); } break; } if (o->state > 100 && o->state <= 105) { if ((o->timer % 9)==1) { SmokeClouds(o, 1, 8, 8); } } o->yinertia += 0x20; LIMITY(0x5ff); } /* void c------------------------------() {} */ // the blocks Frenzied Toroko throws void ai_toroko_block(Object *o) { int hit; o->frame ^= 1; // if he's still holding us, just let the _am routine stick us to his action point if (o->linkedobject) return; hit = 0; if (o->xinertia < 0) hit = o->blockl; else if (o->xinertia > 0) hit = o->blockr; if (o->yinertia < 0) hit |= o->blocku; else if (o->yinertia > 0) hit |= o->blockd; if (hit) { SmokeClouds(o, 6, 8, 8); effect(o->CenterX(), o->CenterY(), EFFECT_FISHY); sound(SND_BLOCK_DESTROY); o->ChangeType(OBJ_TOROKO_FLOWER); o->frame = 0; o->state = 20; o->xinertia = 0; o->flags &= ~FLAG_INVULNERABLE; o->flags |= FLAG_SHOOTABLE; o->BringToFront(); // block was behind toro, but flowers are in front } } void aftermove_toroko_block(Object *o) { if (o->linkedobject) aftermove_StickToLinkedActionPoint(o); } void ai_toroko_flower(Object *o) { switch(o->state) { case 10: o->state = 11; o->timer = o->frame = 0; case 11: if (++o->timer > 30) { o->state = 12; o->frame = 1; o->animtimer = 0; } break; case 12: ANIMATE_FWD(8); if (o->frame == 3) { o->state = 20; o->yinertia = -0x200; o->xinertia = (o->x > player->x) ? -0x200 : 0x200; } break; case 20: // falling/jumping if (o->yinertia > -0x80) o->frame = 4; else o->frame = 3; if (o->blockd) { o->frame = 2; o->state = 21; o->timer = o->xinertia = 0; sound(SND_THUD); } break; case 21: if (++o->timer > 10) { o->state = 10; o->frame = 0; } break; } o->yinertia += 0x40; LIMITY(0x5ff); } ================================================ FILE: ai/sand/toroko_frenzied.fdh ================================================ //hash:d1502efe //automatically generated by Makegen /* located in ObjManager.cpp */ //------------[referenced from ai/sand/toroko_frenzied.cpp]----------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //------------[referenced from ai/sand/toroko_frenzied.cpp]----------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //------------[referenced from ai/sand/toroko_frenzied.cpp]----------// void ThrowObjectAtPlayer(Object *o, int rand_variance, int speed); /* located in ai/ai.cpp */ //------------[referenced from ai/sand/toroko_frenzied.cpp]----------// void aftermove_StickToLinkedActionPoint(Object *o); /* located in ai/sand/toroko_frenzied.cpp */ //------------[referenced from ai/sand/toroko_frenzied.cpp]----------// void ai_toroko_frenzied(Object *o); void ai_toroko_block(Object *o); void aftermove_toroko_block(Object *o); void ai_toroko_flower(Object *o); /* located in ai/sym/smoke.cpp */ //------------[referenced from ai/sand/toroko_frenzied.cpp]----------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); Object *SmokePuff(int x, int y); /* located in sound/sound.cpp */ //------------[referenced from ai/sand/toroko_frenzied.cpp]----------// void sound(int snd); bool sound_is_playing(int snd); /* located in common/misc.cpp */ //------------[referenced from ai/sand/toroko_frenzied.cpp]----------// int random(int min, int max); ================================================ FILE: ai/stdai.h ================================================ #ifndef _STDAI_H #define _STDAI_H #include "../nx.h" extern InitList AIRoutines; #define ONTICK(OBJTYPE, FUNCTION) objprop[OBJTYPE].ai_routines.ontick = FUNCTION; #define ONDEATH(OBJTYPE, FUNCTION) objprop[OBJTYPE].ai_routines.ondeath = FUNCTION; #define AFTERMOVE(OBJTYPE, FUNCTION) objprop[OBJTYPE].ai_routines.aftermove = FUNCTION; #define ONSPAWN(OBJTYPE, FUNCTION) objprop[OBJTYPE].ai_routines.onspawn = FUNCTION; #define GENERIC_NPC(O) \ { \ ONSPAWN(O, onspawn_generic_npc); \ ONTICK(O, ai_generic_npc); \ } #define GENERIC_NPC_NOFACEPLAYER(O) \ { \ ONSPAWN(O, onspawn_generic_npc); \ ONTICK(O, ai_generic_npc_nofaceplayer); \ } void aftermove_StickToLinkedActionPoint(Object *o); void onspawn_set_frame_from_id2(Object *o); void onspawn_snap_to_ground(Object *o); void ai_generic_angled_shot(Object *o); void ai_generic_npc(Object *o); void ai_generic_npc_nofaceplayer(Object *o); void onspawn_generic_npc(Object *o); void ai_animate1(Object *o); void ai_animate2(Object *o); void ai_animate3(Object *o); void ai_animate4(Object *o); void ai_animate5(Object *o); void KillObjectsOfType(int type); void DeleteObjectsOfType(int type); #endif ================================================ FILE: ai/sym/smoke.cpp ================================================ #include "../stdai.h" #include "smoke.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_SMOKE_CLOUD, ai_smokecloud); } /* void c------------------------------() {} */ // spawn a single smoke puff at x,y and heading off in a random direction Object *SmokePuff(int x, int y) { Object *o = CreateObject(x, y, OBJ_SMOKE_CLOUD); vector_from_angle(random(0,255), random(0x200,0x5ff), &o->xinertia, &o->yinertia); return o; } // spawn a cloud of smoke centered around object o and starting within "range" distance. void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind) { SmokeXY(o->CenterX(), o->CenterY(), nclouds, rangex, rangey, push_behind); } void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind) { Object *s; for(int i=0;iPushBehind(push_behind); } } // spawns smoke from the given side of the object, // as if it the object had smacked into something. // for example if an object smashed into ground you could pass DOWN in dir. void SmokeSide(Object *o, int nclouds, int dir) { int xmin, xmax, ymin, ymax; int xi_min, xi_max, yi_min, yi_max; static const int SSLOW = 0x155; static const int SFAST = 0x600; switch(dir) { case UP: case DOWN: { xmin = 0; xmax = o->Width(); xi_min = -SSLOW; xi_max = SSLOW; if (dir == UP) { ymin = ymax = 0; yi_min = 0; yi_max = SFAST; } else { ymin = ymax = (o->Height() - (2<Height(); yi_min = -SSLOW; yi_max = SSLOW; if (dir == LEFT) { xmin = xmax = 0; xi_min = 0; xi_max = SFAST; } else { xmin = xmax = (o->Width() - (2<Width(); ymin = 0; ymax = o->Height(); xi_min = -SSLOW; xi_max = SSLOW; yi_min = -SSLOW; yi_max = 0; } break; } for(int i=0;ix + random(xmin, xmax), o->y + random(ymin, ymax), OBJ_SMOKE_CLOUD, random(xi_min, xi_max), random(yi_min, yi_max)); } } void SmokeCloudsSlow(int x, int y, int nclouds) { for(int i=0;iCenterX() + random(-16<CenterY() + random(-16<state) { if (!random(0, 1)) o->frame = 1; o->state = 1; } if (++o->animtimer >= 5) { o->animtimer = 0; if (++o->frame >= sprites[o->sprite].nframes) o->Delete(); } o->xinertia *= 20; o->xinertia /= 21; o->yinertia *= 20; o->yinertia /= 21; } ================================================ FILE: ai/sym/smoke.fdh ================================================ //hash:19c7b1dc //automatically generated by Makegen /* located in ObjManager.cpp */ //-----------------[referenced from ai/sym/smoke.cpp]----------------// Object *CreateObject(int x, int y, int type); /* located in trig.cpp */ //-----------------[referenced from ai/sym/smoke.cpp]----------------// void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys); /* located in ai/sym/smoke.cpp */ //-----------------[referenced from ai/sym/smoke.cpp]----------------// Object *SmokePuff(int x, int y); void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); void SmokeSide(Object *o, int nclouds, int dir); void SmokeCloudsSlow(int x, int y, int nclouds); void SmokeBoomUp(Object *o); void ai_smokecloud(Object *o); /* located in common/misc.cpp */ //-----------------[referenced from ai/sym/smoke.cpp]----------------// int random(int min, int max); ================================================ FILE: ai/sym/sym.cpp ================================================ #include "../stdai.h" #include "sym.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_NULL, ai_null); ONTICK(OBJ_HVTRIGGER, ai_hvtrigger); ONTICK(OBJ_XP, ai_xp); ONTICK(OBJ_HEART, ai_powerup); ONTICK(OBJ_HEART3, ai_powerup); ONTICK(OBJ_MISSILE, ai_powerup); ONTICK(OBJ_MISSILE3, ai_powerup); ONTICK(OBJ_HIDDEN_POWERUP, ai_hidden_powerup); ONTICK(OBJ_DOOR, ai_door); ONTICK(OBJ_LARGEDOOR, ai_largedoor); ONTICK(OBJ_SAVE_POINT, ai_save_point); ONTICK(OBJ_RECHARGE, ai_recharge); ONTICK(OBJ_CHEST_CLOSED, ai_chest_closed); ONTICK(OBJ_CHEST_OPEN, ai_chest_open); ONTICK(OBJ_TELEPORTER, ai_teleporter); ONTICK(OBJ_TELEPORTER_LIGHTS, ai_animate2); ONTICK(OBJ_COMPUTER, ai_animate4); ONTICK(OBJ_TERMINAL, ai_terminal); ONTICK(OBJ_LIFE_CAPSULE, ai_animate4); ONTICK(OBJ_XP_CAPSULE, ai_xp_capsule); ONTICK(OBJ_SPRINKLER, ai_sprinkler); ONTICK(OBJ_WATER_DROPLET, ai_water_droplet); ONTICK(OBJ_LAVA_DROPLET, ai_water_droplet); ONTICK(OBJ_DROPLET_SPAWNER, ai_droplet_spawner); ONTICK(OBJ_FAN_UP, ai_fan_vert); ONTICK(OBJ_FAN_DOWN, ai_fan_vert); ONTICK(OBJ_FAN_LEFT, ai_fan_hoz); ONTICK(OBJ_FAN_RIGHT, ai_fan_hoz); ONTICK(OBJ_FAN_DROPLET, ai_fan_droplet); ONTICK(OBJ_PRESS, ai_press); ONTICK(OBJ_HIDDEN_SPARKLE, ai_animate4); ONTICK(OBJ_LIGHTNING, ai_lightning); ONTICK(OBJ_STRAINING, ai_straining); ONTICK(OBJ_BUBBLE_SPAWNER, ai_bubble_spawner); ONTICK(OBJ_CHINFISH, ai_chinfish); ONTICK(OBJ_FIREPLACE, ai_fireplace); ONTICK(OBJ_SMOKE_DROPPER, ai_smoke_dropper); ONSPAWN(OBJ_SPIKE_SMALL, onspawn_spike_small); ONTICK(OBJ_SCROLL_CONTROLLER, ai_scroll_controller); ONTICK(OBJ_QUAKE, ai_quake); } /* void c------------------------------() {} */ // ai routine for OBJ_NULL void ai_null(Object *o) { if (o->state == 0) { o->state = 1; // FLAG_FACES_RIGHT is causes the object to drop down one tile when actually // seen in the game. I think this was used to make map editing easier in // places where things were getting really crouded with entities. if (o->dir == RIGHT) { o->y += (TILE_H << CSF); // precedence hack for Boulder Chamber if (game.curmap == STAGE_BOULDER_CHAMBER) { Object *boulder = Objects::FindByType(OBJ_BOULDER); if (boulder) o->PushBehind(boulder); } } } } // H/V Trigger // // By default, triggers on vertical axis. // If set to face right, it triggers on horizontal axis instead. // // If FLAG_SCRIPTONTOUCH is set, projects an invisible horizontal or vertical "Beam" // which is blocked by solid bricks, and only by intersecting the beam // can the player trip the trigger. // void ai_hvtrigger(Object *o) { // init: find bounding box within which we will trigger if (o->state == 0) { o->state = 1; o->hvt.is_horizontal = (o->dir == LEFT); // start with a trigger box around object which // encloses only the object's tile itself. o->hvt.x1 = o->x; o->hvt.y1 = o->y; o->hvt.x2 = o->x + ((TILE_W - 1) << CSF); o->hvt.y2 = o->y + ((TILE_H - 1) << CSF); // now expand the trigger box as appropriate if (o->flags & FLAG_SCRIPTONTOUCH) { o->flags &= ~FLAG_SCRIPTONTOUCH; hv_project_beam(o); } else if (o->hvt.is_horizontal) { o->hvt.x1 = 0; o->hvt.x2 = (map.xsize * TILE_W) << CSF; } else { o->hvt.y1 = 0; o->hvt.y2 = (map.ysize * TILE_H) << CSF; } } if (game.debug.DrawBoundingBoxes) AddDebugMark(o->hvt.x1, o->hvt.y1, o->hvt.x2, o->hvt.y2, DM_BOX, 255, 0, 255); int px = player->CenterX(); if (px > o->hvt.x2) return; if (px < o->hvt.x1) return; int py = player->CenterY(); if (py > o->hvt.y2) return; if (py < o->hvt.y1) return; if (game.debug.DrawBoundingBoxes) AddDebugMark(o->hvt.x1, o->hvt.y1, o->hvt.x2, o->hvt.y2, DM_BOX, 0, 255, 0); // ok then, we can trigger, except for: if (GetCurrentScript() == -1 && // no override other scripts game.switchstage.mapno == -1) // no repeat exec after id2, o); StartScript(o->id2); } } // project the Option 1 beam and set the hvtrigger's y1/y2 or x1/x2 static void hv_project_beam(Object *o) { int tilex = (o->x >> CSF) / TILE_W; int tiley = (o->y >> CSF) / TILE_H; int x, y, t; if (!o->hvt.is_horizontal) { for(y=tiley;y>=0;y--) { t = map.tiles[tilex][y]; if (tileattr[t] & TA_SOLID) { y++; break; } } o->hvt.y1 = (y * TILE_H) << CSF; for(y=tiley;yhvt.y2 = ((y * TILE_H) + (TILE_H - 1)) << CSF; } else { for(x=tilex;x>=0;x--) { t = map.tiles[x][tiley]; if (tileattr[t] & TA_SOLID) { x++; break; } } o->hvt.x1 = (x * TILE_W) << CSF; for(x=tilex;xhvt.x2 = ((x * TILE_W) + (TILE_W - 1)) << CSF; } } /* void c------------------------------() {} */ void ai_xp(Object *o) { if (o->state == 0) { o->yinertia = random(-400, 0); o->state = 1; } if (Handle_Falling_Left(o)) { // left-falling bouncing if (map.scrolltype == BK_FASTLEFT_LAYERS) // as opposed to Ironhead (BK_FASTLEFT) { if (o->blockl) { if (o->onscreen || pdistly((SCREEN_HEIGHT - (SCREEN_HEIGHT / 3)) << CSF)) sound(SND_XP_BOUNCE); o->xinertia = 0x100; o->yinertia *= 2; o->yinertia /= 3; } if (o->blocku || o->blockd) { o->yinertia = -o->yinertia; } } } else { // normal bouncing if (o->blockd) { // disappear if we were spawned embedded in ground // added for XP spawned by sandcrocs if (o->blocku || (o->blockl && o->blockr)) { o->Delete(); return; } if (o->onscreen || pdistlx((SCREEN_WIDTH - (SCREEN_WIDTH / 3)) << CSF)) sound(SND_XP_BOUNCE); o->yinertia = -0x280; o->xinertia *= 2; o->xinertia /= 3; } else { o->yinertia += 42; } if (o->blockl || o->blockr) { o->xinertia = -o->xinertia; } } if (++o->animtimer >= 3) { o->animtimer = 0; if (++o->frame > 5) o->frame = 0; } if (++o->timer > 0x1f4) { o->Delete(); return; } else if (o->timer > 0x1f2) { // twinkle before disappearing o->frame = 0; o->invisible = 0; return; } else if (o->timer > 0x190) { o->invisible = (o->timer & 2); } // let player get it! if (hitdetect(o, player)) { switch(o->sprite) { case SPR_XP_SMALL: AddXP(XP_SMALL_AMT); break; case SPR_XP_MED: AddXP(XP_MED_AMT); break; case SPR_XP_LARGE: AddXP(XP_LARGE_AMT); break; } o->Delete(); } } // Hearts and Missiles void ai_powerup(Object *o) { // if o->state == 0, then was present in map; not dropped by an enemy...lasts forever if (o->state > 0) { Handle_Falling_Left(o); switch(o->state) { case 1: // animating case 101: // animating (in left-fall mode) if (++o->timer >= 256) { o->timer = 0; o->state++; } else break; case 2: // start blinking--we're about to go away!! case 102: // blinking (in left-fall mode) if (++o->timer > 48) { effect(o->CenterX()-(1<CenterY()-(1<Delete(); return; } o->invisible = (o->timer2 & 2); o->timer2++; break; } // animation/frame selection if (++o->animtimer > 2) { o->animtimer = 0; o->frame ^= 1; } } else if (!o->state) { // adjust position of map-spawned missiles if (o->type == OBJ_MISSILE) { o->x += (3 << CSF); o->y += (4 << CSF); } o->state = -1; } // hand over the powerup if player touches it if (hitdetect(o, player)) { switch(o->type) { case OBJ_HEART: sound(SND_HEALTH_REFILL); AddHealth(2); break; case OBJ_HEART3: sound(SND_HEALTH_REFILL); AddHealth(6); break; case OBJ_MISSILE: case OBJ_MISSILE3: { int amt = (o->type == OBJ_MISSILE3) ? 3 : 1; int wpn = (player->weapons[WPN_SUPER_MISSILE].hasWeapon) ? \ WPN_SUPER_MISSILE : WPN_MISSILE; sound(SND_GET_MISSILE); AddAmmo(wpn, amt); } break; } o->Delete(); } } bool Handle_Falling_Left(Object *o) { if (map.scrolltype == BK_FASTLEFT || \ map.scrolltype == BK_FASTLEFT_LAYERS) { if (o->state < 100) // initilize { o->state += 100; o->yinertia = random(-0x20, 0x20); o->xinertia = random(127, 256); //o->nxflags |= NXFLAG_FOLLOW_SLOPE; } o->xinertia -= 0x08; if (o->xinertia < -0x600) o->xinertia = -0x600; if (map.scrolltype == BK_FASTLEFT) { if (o->x < ((5 * TILE_W) << CSF)) o->Delete(); // went off screen in IronH } if (o->blockl && o->xinertia <= 0) o->xinertia = 0x40; if (o->blocku && o->yinertia <= 0) o->yinertia = 0x40; if (o->blockd && o->yinertia >= 0) o->yinertia = -0x40; return 1; } return 0; } // hidden heart/missile void ai_hidden_powerup(Object *o) { if (o->hp < 990) { SmokeBoomUp(o); sound(SND_EXPL_SMALL); o->ChangeType((o->dir == LEFT) ? OBJ_HEART : OBJ_MISSILE); if (o->type == OBJ_HEART) { o->x += (3 << CSF); o->y += (4 << CSF); } } } void ai_xp_capsule(Object *o) { ANIMATE(4, 0, 1); if (o->hp < 100) { o->SpawnXP(o->id1); SmokeClouds(o, 8, 2, 2); sound(SND_FUNNY_EXPLODE); o->Delete(); } } /* void c------------------------------() {} */ void ai_save_point(Object *o) { if (o->state == 0) { smoke_if_bonus_item(o); o->flags |= FLAG_SCRIPTONACTIVATE; // needed for SP after Sisters fight o->state = 1; } ai_animate3(o); o->yinertia += 0x40; LIMITY(0x5ff); } void ai_recharge(Object *o) { switch(o->state) { case 0: { smoke_if_bonus_item(o); o->state = 1; } case 1: // flickery animation { int x = random(0, 30); if (x < 10) o->state = 2; else if (x < 25) o->state = 3; else o->state = 4; o->timer = random(16, 64); o->animtimer = 0; } break; case 2: o->frame = 0; break; // solid on case 3: // flickery o->animtimer++; o->frame = (o->animtimer & 1); break; case 4: o->frame = 1; break; // solid off } if (--o->timer <= 0) o->state = 1; o->yinertia += 0x40; LIMITY(0x5ff); } void ai_chest_closed(Object *o) { if (o->state == 0) { smoke_if_bonus_item(o); o->flags |= FLAG_SCRIPTONACTIVATE; // isn't always set o->state = 1; // stop motion of chest spawned from Kulala if (settings->emulate_bugs) o->xinertia = 0; } // gleaming animation if (++o->timer < 3) o->frame = 1; else if (o->timer < 6) o->frame = 2; else { o->frame = 0; if (o->timer >= 80) o->timer = 0; } // need this for the big jelly that drops a chest in Weed if (o->blockd) o->xinertia = 0; // fall o->yinertia += 0x40; LIMITY(0x5ff); } void ai_chest_open(Object *o) { o->flags |= FLAG_SCRIPTONACTIVATE; } // save points, recharges, and chests make smoke and jump in air for a moment // when spawned as a bonus item (e.g. after a boss fight). That they should do // this is indicated by the script setting it's direction to RIGHT. static void smoke_if_bonus_item(Object *o) { if (o->dir == RIGHT) { SmokeClouds(o, 4, 8, 8); o->yinertia = -0x200; } } /* void c------------------------------() {} */ void ai_lightning(Object *o) { switch(o->state) { case 0: { o->invisible = true; o->state = 1; if (o->dir == RIGHT) flashscreen.Start(); } case 1: { if (++o->timer > 10) { o->state = 2; o->invisible = false; sound(SND_LIGHTNING_STRIKE); } } break; case 2: { if (++o->animtimer > 2) { o->animtimer = 0; if (o->frame >= 3) { for(int i=0;i<5;i++) SmokePuff(o->ActionPointX(), o->ActionPointY()); effect(o->ActionPointX(), o->ActionPointY(), EFFECT_BOOMFLASH); o->Delete(); } else { if (++o->frame == 2) o->damage = 10; } } } break; } } void ai_teleporter(Object *o) { if (o->state==0) { o->frame = 0; } else { o->frame ^= 1; } } void ai_door(Object *o) { switch(o->state) { case 0: o->frame = (o->dir == RIGHT) ? 1:0; break; case 1: // being banged on o->shaketime = 20; o->state = 0; break; } } void ai_largedoor(Object *o) { switch(o->state) { case 0: o->state = 1; if (o->dir==RIGHT) { //o->frame = 1; o->x -= (TILE_W << CSF); } o->xmark = o->x; break; case 10: // door opens into frame o->state = 11; o->timer = 0; o->flags |= FLAG_IGNORE_SOLID; o->clip_enable = 1; case 11: { int px; o->timer++; if ((o->timer & 7)==0) { sound(SND_QUAKE); } px = (o->timer >> 3); if (o->dir==LEFT) { o->x = o->xmark - (px << CSF); o->clipx1 = px; } else { o->x = o->xmark + (px << CSF); o->clipx2 = (16 - px); } if (o->timer==104) o->Delete(); } } } void ai_press(Object *o) { switch(o->state) { case 0: { if (!o->blockd) { o->state = 10; o->frame = 1; } } break; case 10: // fall { if (o->frame < 2) ANIMATE_FWD(2); o->yinertia += 0x20; LIMITY(0x5ff); if (o->y < player->y) { o->flags &= ~FLAG_SOLID_BRICK; o->damage = 127; } else { o->flags |= FLAG_SOLID_BRICK; o->damage = 0; } if (o->blockd) { SmokeSide(o, 4, DOWN); quake(10); o->state = 0; o->frame = 0; o->damage = 0; o->flags |= FLAG_SOLID_BRICK; } } break; } } void ai_terminal(Object *o) { switch(o->state) { case 0: case 1: o->frame = 0; if (pdistlx(8<frame = 1; o->state = 10; } break; case 10: ANIMATE(0, 1, 2); break; } } /* void c------------------------------() {} */ #define FAN_BLOW_FORCE 0x88 void ai_fan_vert(Object *o) { if (o->dir == LEFT) { // fan off o->frame = 0; return; } int blowdir = (o->type == OBJ_FAN_UP) ? UP : DOWN; ANIMATE(0, 0, 2); // spawn droplet effects if (pdistlx(SCREEN_WIDTH << CSF) && pdistly(SCREEN_HEIGHT << CSF)) { if (!random(0, 5)) { int x = o->x + (random(4, 12) << CSF); int y = (blowdir == DOWN) ? o->Bottom() : o->y; Object *drop = CreateObject(x, y, OBJ_FAN_DROPLET); drop->dir = blowdir; } } // blow player if (pdistlx(8 << CSF) && pdistly(96 << CSF)) { if (blowdir == UP && player->y < o->y) player->yinertia -= FAN_BLOW_FORCE; if (blowdir == DOWN && player->y > o->Bottom()) player->yinertia += FAN_BLOW_FORCE; } } void ai_fan_hoz(Object *o) { if (o->dir == LEFT) { // fan off o->frame = 0; return; } int blowdir = (o->type == OBJ_FAN_LEFT) ? LEFT : RIGHT; ANIMATE(0, 0, 2); // spawn droplet effects if (pdistlx(SCREEN_WIDTH << CSF) && pdistly(SCREEN_HEIGHT << CSF)) { if (!random(0, 5)) { int x = (blowdir == LEFT) ? o->x : o->Right(); int y = o->y + (random(4, 12) << CSF); Object *drop = CreateObject(x, y, OBJ_FAN_DROPLET); drop->dir = blowdir; } } // blow player if (pdistlx(96 << CSF) && pdistly(8 << CSF)) { if (blowdir == LEFT && player->x < o->x) player->xinertia -= FAN_BLOW_FORCE; if (blowdir == RIGHT && player->x > o->Right()) player->xinertia += FAN_BLOW_FORCE; } } // the visible moving air current from fans void ai_fan_droplet(Object *o) { switch(o->state) { case 0: o->state = 1; o->frame = random(0, 2); o->xinertia = o->yinertia = 0; switch(o->dir) { case LEFT: o->xinertia = -1; break; case RIGHT: o->xinertia = 1; break; case UP: o->yinertia = -1; break; case DOWN: o->yinertia = 1; break; } o->dir = RIGHT; // so frame is correct o->xinertia *= random((2 << CSF), (4 << CSF)); o->yinertia *= random((2 << CSF), (4 << CSF)); case 1: ANIMATE_FWD(6); if (o->frame > 4) o->Delete(); break; } } /* void c------------------------------() {} */ // Yamashita Farm and Plantation water-droplet emitter // throws out oodles of water splash droplets void ai_sprinkler(Object *o) { if (o->dir == RIGHT) return; if (++o->animtimer & 1) o->frame ^= 1; if (pdistlx(0x28000) && pdistly(0x1E000)) { Object *drop; drop = CreateObject(o->CenterX() + (1<CenterY() + (1<xinertia = random(-(2 << CSF), (2 << CSF)); drop->yinertia = random(-(3 << CSF), 384); } } // generates small splash water droplets void ai_droplet_spawner(Object *o) { if (pdistlx(SCREEN_WIDTH << CSF) && pdistly(SCREEN_HEIGHT << CSF)) { if (!random(0, 80)) { CreateObject(o->x + (random(2, (TILE_W - 2)) << CSF), o->y, OBJ_WATER_DROPLET); } } } // small flying water droplet from splashes or sprinklers void ai_water_droplet(Object *o) { static const Point waterattrpoint[] = { 0, -3 }; o->flags &= ~FLAG_IGNORE_SOLID; o->yinertia += 0x20; if (o->yinertia > 0x5ff) o->yinertia = 0x5ff; o->frame = random(0, 4); if (++o->timer > 10) { if (o->blockl || o->blockr || o->blockd || \ (o->GetAttributes(waterattrpoint, 1, NULL) & TA_WATER)) { o->Delete(); } } } /* void c------------------------------() {} */ void ai_bubble_spawner(Object *o) { Object *ko; if (o->dir == LEFT) { // spawn smoke (broken motorcycle in Grass) if (!random(0, 40)) { ko = CreateObject(o->x + (random(-20, 20) << CSF), o->y, OBJ_SMOKE_CLOUD); ko->xinertia = 0x100; ko->yinertia = -0x200; } } else { // spawn "bubbles" (IronH battle) ko = CreateObject(o->x + (random(-160, 160) << CSF), \ o->y + (random(-128, 128) << CSF), \ OBJ_FAN_DROPLET); ko->dir = RIGHT; ko->xinertia = 0x100; } } void ai_chinfish(Object *o) { switch(o->state) { case 0: o->state = 1; o->xmark = o->x; o->ymark = o->y; o->yinertia = 0x88; case 1: o->yinertia += (o->y > o->ymark) ? -8:8; LIMITY(0x100); ANIMATE(4, 0, 1); if (o->shaketime) o->frame = 2; break; } } void ai_fireplace(Object *o) { switch(o->state) { case 0: // burn o->frame = 0; o->state = 1; o->invisible = 0; case 1: ai_animate4(o); break; case 10: // extinguished by Jellyfish Juice o->state = 11; effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); SmokeClouds(o, 8, 16, 16); case 11: o->invisible = 1; break; } } // straining effect from Boulder Chamber void ai_straining(Object *o) { switch(o->state) { case 0: { if (o->dir == LEFT) { // curly's straining o->x += (14 << CSF); o->y -= (18 << CSF); } else { // player's straining o->x = player->x - (6 << CSF); o->y = player->y - (2 << CSF); } o->state = 1; } case 1: { if (++o->animtimer > 8) { o->animtimer = 0; o->frame ^= 1; if (++o->timer2 >= 8) o->Delete(); } } break; } } // used by CMP to delay smoke created during a PRI until the PRI is released. // See the description in tsc.cpp. void ai_smoke_dropper(Object *o) { SmokeXY(o->x, o->y, o->timer2, TILE_W/2, TILE_H/2); o->Delete(); } /* void c------------------------------() {} */ // this object is used in a few places, such as during the Red Demon fight (last cave), // and during some of the end sequences. It seems to be primarily involved with providing // "extra" map scrolling modes. Generally you'll state, o->dirparam, o->linkedobject); switch(o->state) { // stay above player's head. This is used during the "mad run" Balcony2 stage; // you'll notice there is not normal scrolling during this part. case 10: { o->x = player->x; o->y = player->y - (32 << CSF); } break; // pan in the specified direction. used when you get the good ending // to pan over all the scenes from the island just before it crashes. case 20: { switch(o->dir) { case LEFT: o->x -= (2 << CSF); break; case UP: o->y -= (2 << CSF); break; case RIGHT: o->x += (2 << CSF); break; case DOWN: o->y += (2 << CSF); break; } // player is invisible during this part. dragging him along is // what makes all the monsters, falling spikes etc react. player->x = o->x; player->y = o->y; } break; // stay below player. case 30: { o->x = player->x; o->y = player->y + (80 << CSF); } break; // stay mid-way between player and the specified object. // used during the Red Demon fight in Last Cave (hidden). case 100: { o->state = 101; if (o->dirparam == 0) { o->linkedobject = game.stageboss.object; if (!o->linkedobject) { staterr("sctrl: no stageboss object!"); o->Delete(); } } else { o->linkedobject = FindObjectByID2(o->dirparam); if (o->linkedobject) { staterr("sctrl: successfully linked to object %08x", o->linkedobject); } else { staterr("sctrl: failed to link to id2 %d: object not found", o->id2); o->Delete(); } } } case 101: { if (o->linkedobject) { o->x = (player->x + o->linkedobject->x) / 2; o->y = (player->y + o->linkedobject->y) / 2; } } break; } } // makes a perpetual quake. used during end-run and Hell. void ai_quake(Object *o) { if (!settings->no_quake_in_hell || \ (game.curmap != STAGE_HELL1 && \ game.curmap != STAGE_HELL2 && \ game.curmap != STAGE_HELL3 && \ game.curmap != STAGE_HELL4 && \ game.curmap != STAGE_HELL42 && \ game.curmap != STAGE_STATUE_CHAMBER && \ game.curmap != STAGE_CORRIDOR && \ game.curmap != STAGE_SEAL_CHAMBER)) { game.quaketime = 10; } } /* void c------------------------------() {} */ void ai_generic_angled_shot(Object *o) { // enemies can set the shot's ttl by setting an initial timer value // after they spawn us. Or, they can leave it at zero and we // will set a default. if (o->state == 0) { o->state = 1; if (o->timer == 0) o->timer = 200; } if (o->sprite == SPR_GAUDI_FLYING_SHOT) { ANIMATE(0, 0, sprites[o->sprite].nframes - 1); } else { ANIMATE(2, 0, sprites[o->sprite].nframes - 1); } if (o->blockl && o->xinertia < 0) goto del; if (o->blockr && o->xinertia > 0) goto del; if (o->blocku && o->yinertia < 0) goto del; if (o->blockd && o->yinertia > 0) goto del; if (--o->timer < 0) { del: ; effect(o->CenterX(), o->CenterY(), EFFECT_FISHY); o->Delete(); } } /* void c------------------------------() {} */ void onspawn_spike_small(Object *o) { o->frame = o->id2; // hack to remove 2 spikes in First Cave which are // extraneous and invisible because they are embedded // in the wall, but due to slight engine differences // you can still sometimes get hurt by them in our engine. int tile = map.tiles[(o->CenterX() >> CSF) / TILE_W][(o->CenterY() >> CSF) / TILE_H]; if (tileattr[tile] & TA_SOLID) { stat("onspawn_spike_small: spike %08x embedded in wall, deleting", o); o->Delete(); } } ================================================ FILE: ai/sym/sym.fdh ================================================ //hash:3ee94f7a //automatically generated by Makegen /* located in game.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// bool hitdetect(Object *o1, Object *o2); Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// Object *FindObjectByID2(int id2); /* located in caret.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// Caret *effect(int x, int y, int effectno); /* located in playerstats.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// void AddXP(int xp, bool quiet); void AddHealth(int hp); void AddAmmo(int wpn, int ammo); /* located in tsc.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// int GetCurrentScript(void); ScriptInstance *StartScript(int scriptno, int pageno); /* located in debug.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// void AddDebugMark(int x, int y, int x2, int y2, char type, uchar r, uchar g, uchar b); /* located in ai/ai.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// void ai_animate3(Object *o); void ai_animate4(Object *o); /* located in ai/sym/sym.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// void ai_null(Object *o); void ai_hvtrigger(Object *o); static void hv_project_beam(Object *o); void ai_xp(Object *o); void ai_powerup(Object *o); bool Handle_Falling_Left(Object *o); void ai_hidden_powerup(Object *o); void ai_xp_capsule(Object *o); void ai_save_point(Object *o); void ai_recharge(Object *o); void ai_chest_closed(Object *o); void ai_chest_open(Object *o); static void smoke_if_bonus_item(Object *o); void ai_lightning(Object *o); void ai_teleporter(Object *o); void ai_door(Object *o); void ai_largedoor(Object *o); void ai_press(Object *o); void ai_terminal(Object *o); void ai_fan_vert(Object *o); void ai_fan_hoz(Object *o); void ai_fan_droplet(Object *o); void ai_sprinkler(Object *o); void ai_droplet_spawner(Object *o); void ai_water_droplet(Object *o); void ai_bubble_spawner(Object *o); void ai_chinfish(Object *o); void ai_fireplace(Object *o); void ai_straining(Object *o); void ai_smoke_dropper(Object *o); void ai_scroll_controller(Object *o); void ai_quake(Object *o); void ai_generic_angled_shot(Object *o); void onspawn_spike_small(Object *o); /* located in ai/sym/smoke.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// void SmokeBoomUp(Object *o); void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); Object *SmokePuff(int x, int y); void SmokeSide(Object *o, int nclouds, int dir); void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// void sound(int snd); /* located in common/stat.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //------------------[referenced from ai/sym/sym.cpp]-----------------// int random(int min, int max); ================================================ FILE: ai/village/balrog_boss_running.cpp ================================================ #include "../stdai.h" #include "../balrog_common.h" #include "balrog_boss_running.fdh" #define STATE_CHARGE 10 #define STATE_JUMP 20 #define STATE_SLOW_DOWN 30 #define STATE_CAUGHT_PLAYER 40 INITFUNC(AIRoutines) { ONTICK(OBJ_BALROG_BOSS_RUNNING, ai_balrog_boss_running); ONDEATH(OBJ_BALROG_BOSS_RUNNING, ondeath_balrog_boss_running); } /* void c------------------------------() {} */ void ai_balrog_boss_running(Object *o) { // try to catch player if (o->state == STATE_CHARGE+1 || o->state == STATE_JUMP) { if ((pdistlx(12 << CSF) && pdistly(8 << CSF)) && o->timer > 8) { hurtplayer(2); balrog_grab_player(o); o->state = STATE_CAUGHT_PLAYER; } } switch(o->state) { case 0: { FACEPLAYER; o->flags |= FLAG_SHOOTABLE; o->frame = 0; o->state = 1; } case 1: { if (++o->timer > 30) { o->state = STATE_CHARGE; o->timer2++; } } break; // running towards player case STATE_CHARGE: { o->state++; o->timer = 0; o->frame = 9; o->animtimer = 0; } case STATE_CHARGE+1: { XACCEL(0x10); walking_animation(o); if (++o->timer > 75 || \ (o->dir == LEFT && o->blockl) || (o->dir == RIGHT && o->blockr)) { o->frame = 0; o->state = STATE_SLOW_DOWN; break; } // can jump every 3rd time, but if he catches the player // before he gets a chance to he does NOT jump on the next charge. if ((o->timer2 & 3) == 0) { if (o->timer > 25) { // initiate jump o->frame = 3; o->yinertia = -0x400; o->state = STATE_JUMP; } } } break; // jumping case STATE_JUMP: { if (o->blockd && o->yinertia >= 0) { o->frame = 2; // <-- Landed frame. quake(30); o->state = STATE_SLOW_DOWN; } } break; // slowing down after charging or jumping case STATE_SLOW_DOWN: { o->xinertia *= 4; o->xinertia /= 5; if (o->xinertia == 0) o->state = 0; } break; // caught player case STATE_CAUGHT_PLAYER: { if (balrog_toss_player_away(o)) o->state = 0; } break; } o->yinertia += 0x20; LIMITX(0x400); LIMITY(0x5FF); } static void walking_animation(Object *o) { if (++o->animtimer > 3) { o->animtimer = 0; if (++o->frame > 12) o->frame = 9; if (o->frame == 10 || o->frame == 12) { sound(SND_THUD); } } } /* void c------------------------------() {} */ void ondeath_balrog_boss_running(Object *o) { o->xinertia = 0; o->yinertia = 0; } ================================================ FILE: ai/village/balrog_boss_running.fdh ================================================ //hash:01c3aee9 //automatically generated by Makegen /* located in game.cpp */ //--------[referenced from ai/village/balrog_boss_running.cpp]-------// void quake(int quaketime, int snd); /* located in player.cpp */ //--------[referenced from ai/village/balrog_boss_running.cpp]-------// void hurtplayer(int damage); /* located in ai/village/balrog_boss_running.cpp */ //--------[referenced from ai/village/balrog_boss_running.cpp]-------// void ai_balrog_boss_running(Object *o); static void walking_animation(Object *o); void ondeath_balrog_boss_running(Object *o); /* located in ai/maze/balrog_boss_missiles.cpp */ //--------[referenced from ai/village/balrog_boss_running.cpp]-------// static void walking_animation(Object *o); /* located in ai/balrog_common.cpp */ //--------[referenced from ai/village/balrog_boss_running.cpp]-------// void balrog_grab_player(Object *o); bool balrog_toss_player_away(Object *o); /* located in sound/sound.cpp */ //--------[referenced from ai/village/balrog_boss_running.cpp]-------// void sound(int snd); ================================================ FILE: ai/village/ma_pignon.cpp ================================================ #include "../stdai.h" #include "ma_pignon.fdh" enum { MP_Fight_Start = 100, // scripted MP_BaseState = 110, MP_Jump = 120, MP_In_Air = 130, MP_Landed = 140, MP_ChargeAttack = 200, MP_Hit_Wall = 220, MP_CloneAttack = 300, MP_Fly_Up = 310, MP_Spawn_Clones = 330, MP_Defeated = 500 // scripted }; INITFUNC(AIRoutines) { ONTICK(OBJ_MA_PIGNON, ai_ma_pignon); ONTICK(OBJ_MA_PIGNON_ROCK, ai_ma_pignon_rock); ONTICK(OBJ_MA_PIGNON_CLONE, ai_ma_pignon_clone); } /* void c------------------------------() {} */ void ai_ma_pignon(Object *o) { /*debug("state: %d", o->state); debug("timer: %d", o->timer); debug("timer2: %d", o->timer2); debug("timer3: %d", o->timer3); debug("xinertia: %d", o->xinertia); debug("yinertia: %d", o->yinertia); debug("frame: %d", o->frame); */ switch(o->state) { case 0: { o->SnapToGround(); o->state = 1; } case 1: { FACEPLAYER; o->frame = 0; randblink(o); } break; case MP_Fight_Start: // set by script { o->state = MP_BaseState; o->timer = 0; o->timer2 = 0; o->flags |= FLAG_SHOOTABLE; } case MP_BaseState: { FACEPLAYER; o->damage = 1; o->frame = 0; if (++o->timer > 4) { o->timer = 0; o->state = MP_Jump; if (++o->timer3 > 12) { o->timer3 = 0; o->state = MP_CloneAttack; } } } break; case MP_Jump: // pause a moment and jump { o->frame = 2; if (++o->timer > 4) { o->state = MP_In_Air; o->frame = 3; o->xinertia = random(-0x400, 0x400); o->yinertia = -0x800; sound(SND_ENEMY_JUMP); o->timer2++; } } break; case MP_In_Air: // jumping or falling after clone attack { o->yinertia += 0x80; // for when falling back onscreen after clone attack if (o->y > (8 * TILE_H) << CSF) o->flags &= ~FLAG_IGNORE_SOLID; else o->blockd = false; // bounce off walls if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0)) { o->xinertia = -o->xinertia; } FACEPLAYER; // select frame if (o->yinertia < -0x200) { o->frame = 3; } else if (o->yinertia > 0x200) { o->frame = 4; } else { o->frame = 0; } if (o->blockd && o->yinertia > 0) { o->state = MP_Landed; o->timer = 0; o->frame = 2; o->xinertia = 0; } if (o->timer2 > 4) { if (player->y < (o->y + 0x800)) { o->state = MP_ChargeAttack; o->timer = 0; o->xinertia = 0; o->yinertia = 0; } } } break; case MP_Landed: { o->frame = 2; if (++o->timer > 4) { o->state = MP_BaseState; } } break; case MP_ChargeAttack: // charge attack { o->frame = 5; if (++o->timer > 10) { o->state = MP_ChargeAttack+1; o->frame = 6; XMOVE(0x5ff); sound(SND_FUNNY_EXPLODE); o->flags &= ~FLAG_SHOOTABLE; o->flags |= FLAG_INVULNERABLE; o->damage = 10; } } break; case MP_ChargeAttack+1: // in-air during charge attack { ANIMATE(0, 6, 7); if ((o->xinertia < 0 && o->blockl) || \ (o->xinertia > 0 && o->blockr)) { o->state = MP_Hit_Wall; } } break; case MP_Hit_Wall: // hit wall { o->state++; o->timer = 0; quake(16); } case MP_Hit_Wall+1: { o->damage = 4; ANIMATE(0, 6, 7); if ((++o->timer % 6) == 0) { int x = (random(4, 16) * TILE_W) << CSF; CreateObject(x, (16 << CSF), OBJ_MA_PIGNON_ROCK); } if (o->timer > 30) { o->timer2 = 0; o->state = MP_In_Air; o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; o->damage = 3; } } break; case MP_CloneAttack: // begin clone-attack sequence { o->state++; o->frame = 9; FACEPLAYER; } case MP_CloneAttack+1: // walk at player before attack { ANIMATE(0, 9, 11); XMOVE(0x400); if (pdistlx(3 << CSF)) { o->state = MP_Fly_Up; o->timer = 0; o->frame = 2; o->xinertia = 0; } } break; case MP_Fly_Up: // jump and fly up for clone attack { o->frame = 2; if (++o->timer > 4) { o->state++; o->frame = 12; o->yinertia = -0x800; sound(SND_FUNNY_EXPLODE); o->flags |= FLAG_IGNORE_SOLID; o->flags &= ~FLAG_SHOOTABLE; o->flags |= FLAG_INVULNERABLE; o->damage = 10; } } break; case MP_Fly_Up+1: // flying up { ANIMATE(0, 12, 13); if (o->y < (16<state = MP_Spawn_Clones; } break; case MP_Spawn_Clones: // offscreen, spawning clones { o->yinertia = 0; o->state++; o->timer = 0; quake(10); } case MP_Spawn_Clones+1: { ANIMATE(0, 12, 13); if ((++o->timer % 6) == 0) { int x = (random(4, 16) * TILE_W) << CSF; CreateObject(x, (16 << CSF), OBJ_MA_PIGNON_CLONE); } if (o->timer > 30) { o->timer2 = 0; o->state = MP_In_Air; // fall back down to ground o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; } } break; case MP_Defeated: // defeated -- set by script { KillObjectsOfType(OBJ_MA_PIGNON_CLONE); o->flags &= ~FLAG_SHOOTABLE; o->state++; o->timer = 0; o->frame = 8; o->damage = 0; } case MP_Defeated+1: { o->yinertia += 0x20; if (o->blockd) { o->xinertia *= 7; o->xinertia /= 8; } o->display_xoff = (++o->timer & 1); } break; } // ma pignon is invulnerable to missiles and Blade. if (o->state >= MP_Fight_Start && o->state < MP_Defeated) { // ....he's invulnerable anyway during these two states so don't mess with that. if (o->state != MP_ChargeAttack+1 && o->state != MP_Fly_Up+1) { bool found_weapons = false; if (o->type != OBJ_MA_PIGNON_CLONE) { Object *c; FOREACH_OBJECT(c) { if (c->type == OBJ_MISSILE_SHOT || \ c->type == OBJ_SUPERMISSILE_SHOT || \ c->type == OBJ_MISSILE_BOOM_SPAWNER || \ c->type == OBJ_BLADE12_SHOT || \ c->type == OBJ_BLADE3_SHOT || \ c->type == OBJ_BLADE_SLASH) { found_weapons = true; break; } } } if (found_weapons) { o->flags &= ~FLAG_SHOOTABLE; o->flags |= FLAG_INVULNERABLE; } else { o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; } } } // don't use LIMITY, it limits upwards too and breaks his jumps if (o->yinertia > 0x5ff) o->yinertia = 0x5ff; } /* void c------------------------------() {} */ void ai_ma_pignon_rock(Object *o) { ANIMATE(6, 0, 2); switch(o->state) { case 0: { o->timer3 = 0; o->state = 1; o->flags |= (FLAG_INVULNERABLE | FLAG_IGNORE_SOLID); o->frame = random(0, 2); o->damage = 10; } case 1: { o->yinertia += 0x40; LIMITY(0x700); if (o->y > (8 * TILE_H) << CSF) { o->flags &= ~FLAG_IGNORE_SOLID; if (o->blockd) { o->yinertia = -0x200; o->state = 2; o->flags |= FLAG_IGNORE_SOLID; sound(SND_BLOCK_DESTROY); game.quaketime = 10; // these smoke clouds appear BEHIND the map tiles for(int i=0;i<2;i++) { Object *smoke = CreateObject(o->CenterX() + random(-12<Bottom()+(16<xinertia = random(-0x155, 0x155); smoke->yinertia = random(-0x600, 0); } } } } break; case 2: { o->yinertia += 0x40; if (o->y > (map.ysize * TILE_H) << CSF) o->Delete(); } break; } } void ai_ma_pignon_clone(Object *o) { switch(o->state) { case 0: { o->frame = 3; o->yinertia += 0x80; LIMITY(0x5ff); if (o->y > (8 * TILE_H) << CSF) { o->state = 130; o->flags &= ~FLAG_IGNORE_SOLID; } } break; default: o->timer2 = o->timer3 = 0; ai_ma_pignon(o); break; } if (++o->substate > 300) { effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); o->Delete(); } } ================================================ FILE: ai/village/ma_pignon.fdh ================================================ //hash:976221c5 //automatically generated by Makegen /* located in game.cpp */ //-------------[referenced from ai/village/ma_pignon.cpp]------------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //-------------[referenced from ai/village/ma_pignon.cpp]------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //-------------[referenced from ai/village/ma_pignon.cpp]------------// Caret *effect(int x, int y, int effectno); /* located in ai/ai.cpp */ //-------------[referenced from ai/village/ma_pignon.cpp]------------// void randblink(Object *o, int blinkframe, int blinktime, int prob); void KillObjectsOfType(int type); /* located in ai/village/ma_pignon.cpp */ //-------------[referenced from ai/village/ma_pignon.cpp]------------// void ai_ma_pignon(Object *o); void ai_ma_pignon_rock(Object *o); void ai_ma_pignon_clone(Object *o); /* located in sound/sound.cpp */ //-------------[referenced from ai/village/ma_pignon.cpp]------------// void sound(int snd); /* located in common/misc.cpp */ //-------------[referenced from ai/village/ma_pignon.cpp]------------// int random(int min, int max); ================================================ FILE: ai/village/village.cpp ================================================ #include "../stdai.h" #include "../weed/weed.fdh" #include "village.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_TOROKO_SHACK, ai_toroko_shack); ONTICK(OBJ_MUSHROOM_ENEMY, ai_mushroom_enemy); ONTICK(OBJ_GIANT_MUSHROOM_ENEMY, ai_mushroom_enemy); ONTICK(OBJ_GRAVEKEEPER, ai_gravekeeper); ONTICK(OBJ_CAGE, ai_cage); ONSPAWN(OBJ_FLOWERS_PENS1, onspawn_snap_to_ground); } /* void c------------------------------() {} */ // scared toroko attacking in Shack void ai_toroko_shack(Object *o) { //debug("Y:%d Yinertia:%d blockd:%d flags:%d", o->y>>CSF, o->yinertia, o->blockd, o->flags); switch(o->state) { case 0: o->timer = 0; o->yinertia = -(2 << CSF); o->y -= (2 << CSF); o->flags |= FLAG_IGNORE_SOLID; o->state = 1; case 1: { ANIMATE(2, 0, 3); XMOVE(0x100); if (o->yinertia >= 0) { o->flags &= ~FLAG_IGNORE_SOLID; if (o->blockd) { ASSERT((o->y % TILE_H) == 0); o->yinertia = 0; o->state = 2; } } } break; case 2: o->frame = o->timer = o->animtimer = 0; o->state = 3; case 3: { ANIMATE(2, 0, 3); XACCEL(0x40); if (++o->timer >= 50) { o->timer = 40; o->xinertia = -o->xinertia; o->dir = (o->dir == RIGHT) ? LEFT:RIGHT; } if (o->timer >= 35) o->flags |= FLAG_SHOOTABLE; if (o->shaketime) { o->state = 4; o->frame = 4; o->yinertia = -(2 << CSF); o->flags &= ~FLAG_SHOOTABLE; o->damage = 0; o->timer = 0; } } break; case 4: XMOVE(0x100); if (++o->timer > 2 && o->blockd) { o->state = 5; o->flags |= FLAG_SCRIPTONACTIVATE; } break; case 5: o->xinertia = 0; o->frame = 5; break; } o->yinertia += 0x40; LIMITX(0x400); LIMITY(0x5ff); } /* void c------------------------------() {} */ // mushroom enemy ("Pignon") from Mimiga Graveyard void ai_mushroom_enemy(Object *o) { enum { INIT = 0, STANDING, BLINKING, WALKING, WALKING2, SHOT }; switch(o->state) { case 0: o->frame = 0; o->animtimer = 0; o->xinertia = 0; o->state = STANDING; case STANDING: // stand around { if (!random(0, 100)) { // blink o->state = BLINKING; o->frame = 1; o->timer = 0; } else { if (!random(0, 150)) o->dir ^= 1; // start walking if (!random(0, 150)) { o->state = WALKING; o->frame = 0; o->timer = 50; } } } break; case BLINKING: // eyes closed/blinking { if (++o->timer > 8) { o->frame = 0; o->state = STANDING; } } break; case WALKING: // walking o->state++; o->frame = 2; o->animtimer = 0; case WALKING+1: { if (!--o->timer) o->state = INIT; if (o->blockl && o->dir == LEFT) { o->dir = RIGHT; o->xinertia = 0x200; } else if (o->blockr && o->dir == RIGHT) { o->dir = LEFT; o->xinertia = -0x200; } ANIMATE(2, 2, 4); XMOVE(0x100); } break; case SHOT: // hit by shot if (o->blockd) o->state = INIT; break; } if (o->shaketime && o->state != SHOT) { o->state = SHOT; o->yinertia = -0x200; o->frame = 6; } o->yinertia += 0x40; LIMITY(0x5ff); } // guy with knife, Mimiga Graveyard void ai_gravekeeper(Object *o) { switch(o->state) { case 0: o->flags |= FLAG_SHOOTABLE; o->flags |= FLAG_INVULNERABLE; o->nxflags |= NXFLAG_FOLLOW_SLOPE; o->damage = 0; o->state = 1; case 1: { o->frame = 0; FACEPLAYER; // start walking when player comes near if (pdistlx(128 << CSF) && pdistly2(48<state = 2; o->animtimer = 0; } // start walking if shot if (o->shaketime) { o->state = 2; o->frame = 1; o->animtimer = 0; o->flags |= FLAG_INVULNERABLE; } } break; case 2: // walking { ANIMATE(6, 0, 3); // reached knife range of player? // (no, he doesn't check Y) if (pdistlx(10 << CSF)) { o->state = 3; o->timer = 0; sound(SND_FIREBALL); o->flags &= ~FLAG_INVULNERABLE; } FACEPLAYER; XMOVE(0x100); } break; case 3: // knife raised { o->frame = 4; o->xinertia = 0; if (++o->timer > 40) { o->state = 4; o->timer = 0; sound(SND_SLASH); } } break; case 4: // knife frame 2 { o->frame = 5; o->damage = 10; if (++o->timer > 2) { o->state = 5; o->timer = 0; } } break; case 5: // knife frame 3 { o->frame = 6; if (++o->timer > 60) o->state = 0; if (o->xinertia > 0 && o->blockl) o->xinertia = 0; if (o->xinertia < 0 && o->blockr) o->xinertia = 0; } break; } o->yinertia += 0x20; LIMITX(0x400); LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_cage(Object *o) { if (o->state == 0) { // the Cage's drawpoint is used to tweak the positioning // of the camera, which is x += o->DrawPointX(); o->y += o->DrawPointY(); o->state = 1; } } ================================================ FILE: ai/village/village.fdh ================================================ //hash:8be69c8c //automatically generated by Makegen /* located in ai/village/village.cpp */ //--------------[referenced from ai/village/village.cpp]-------------// void ai_toroko_shack(Object *o); void ai_mushroom_enemy(Object *o); void ai_gravekeeper(Object *o); void ai_cage(Object *o); /* located in sound/sound.cpp */ //--------------[referenced from ai/village/village.cpp]-------------// void sound(int snd); /* located in common/misc.cpp */ //--------------[referenced from ai/village/village.cpp]-------------// int random(int min, int max); ================================================ FILE: ai/weapons/blade.cpp ================================================ #include "weapons.h" #include "blade.fdh" // how far away the area-of-effect slashes are spawned when // the blade hits something and pauses for a moment dealing extra damage. #define BLADE_AOE (64 << CSF) #define STATE_FLYING 0 #define STATE_AOE 1 INITFUNC(AIRoutines) { AFTERMOVE(OBJ_BLADE12_SHOT, aftermove_blade_l12_shot); ONTICK(OBJ_BLADE3_SHOT, ai_blade_l3_shot); AFTERMOVE(OBJ_BLADE_SLASH, aftermove_blade_slash); } /* void c------------------------------() {} */ void ai_blade_l3_shot(Object *o) { switch(o->state) { case STATE_FLYING: { if ((++o->timer % 4) == 1) { Object *slash = CreateObject(o->x, o->y - (12 << CSF), OBJ_BLADE_SLASH); if (++o->timer2 & 1) { slash->dir = LEFT; slash->x += (10 << CSF); } else { slash->dir = RIGHT; slash->x -= (10 << CSF); } sound(SND_SLASH); } if (++o->timer2 > o->shot.ttl) { shot_dissipate(o); return; } // damage enemies and hit walls if (o->timer2 >= 5) { Object *enemy; if ((enemy = damage_enemies(o))) { if (enemy->flags & FLAG_INVULNERABLE) { shot_spawn_effect(o, EFFECT_STARSOLID); sound(SND_SHOT_HIT); o->Delete(); } else { o->x += o->xinertia; o->y += o->yinertia; o->xinertia = 0; o->yinertia = 0; o->state = STATE_AOE; o->frame = 1; o->timer = 0; } } else if (IsBlockedInShotDir(o)) { if (!shot_destroy_blocks(o)) sound(SND_SHOT_HIT); shot_spawn_effect(o, EFFECT_STARSOLID); o->Delete(); } } } break; case STATE_AOE: { if (!random(0, 2)) { Object *slash = CreateObject(o->x + random(-BLADE_AOE, BLADE_AOE), o->y + random(-BLADE_AOE, BLADE_AOE), OBJ_BLADE_SLASH); slash->dir = random(0, 1) ? LEFT : RIGHT; sound(SND_SLASH); } if (++o->timer > 50) o->Delete(); } break; } o->invisible = (o->timer & 1); } void aftermove_blade_slash(Object *o) { ANIMATE_FWD(2); if (o->frame >= 4) { o->Delete(); return; } o->x += (o->dir == LEFT) ? -0x400 : 0x400; o->y += 0x400; static const int damage_for_frames[] = { 0, 1, 2, 2, 2 }; o->shot.damage = damage_for_frames[o->frame]; // deal damage to anything we touch. Object *enemy = damage_enemies(o); if (enemy && (enemy->flags & FLAG_INVULNERABLE)) o->Delete(); } /* void c------------------------------() {} */ void aftermove_blade_l12_shot(Object *o) { int level = (o->shot.btype - B_BLADE_L1); ANIMATE(1, 0, 3); if (--o->shot.ttl < 0) { shot_dissipate(o); return; } // only start damaging enemies after we've passed the player // as it starts slightly behind him if (++o->timer >= 4) { Object *enemy; if ((enemy = damage_enemies(o))) { // on level 2 we can deal damage up to 3 times (18 max) if (level == 0 || \ ++o->timer2 >= 3 || (enemy->flags & FLAG_INVULNERABLE)) { o->Delete(); return; } } else if (IsBlockedInShotDir(o)) { if (!shot_destroy_blocks(o)) sound(SND_SHOT_HIT); shot_dissipate(o, EFFECT_STARSOLID); return; } } switch(level) { case 0: if ((o->timer % 5) == 1) sound(SND_FIREBALL); break; case 1: if ((o->timer % 7) == 1) sound(SND_SLASH); break; } } ================================================ FILE: ai/weapons/blade.fdh ================================================ //hash:90bd36fc //automatically generated by Makegen /* located in ObjManager.cpp */ //---------------[referenced from ai/weapons/blade.cpp]--------------// Object *CreateObject(int x, int y, int type); /* located in ai/weapons/weapons.cpp */ //---------------[referenced from ai/weapons/blade.cpp]--------------// void shot_dissipate(Object *o, int effectno); Object *damage_enemies(Object *o, uint32_t flags_to_exclude); void shot_spawn_effect(Object *o, int effectno); bool IsBlockedInShotDir(Object *o); bool shot_destroy_blocks(Object *o); /* located in ai/weapons/blade.cpp */ //---------------[referenced from ai/weapons/blade.cpp]--------------// void ai_blade_l3_shot(Object *o); void aftermove_blade_slash(Object *o); void aftermove_blade_l12_shot(Object *o); /* located in sound/sound.cpp */ //---------------[referenced from ai/weapons/blade.cpp]--------------// void sound(int snd); /* located in common/misc.cpp */ //---------------[referenced from ai/weapons/blade.cpp]--------------// int random(int min, int max); ================================================ FILE: ai/weapons/bubbler.cpp ================================================ #include "weapons.h" #include "bubbler.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_BUBBLER12_SHOT, ai_bubbler_l12); ONTICK(OBJ_BUBBLER3_SHOT, ai_bubbler_l3); ONTICK(OBJ_BUBBLER_SHARP, ai_bubbler_sharp); } /* void c------------------------------() {} */ void ai_bubbler_l12(Object *o) { int decel; if (o->shot.level == 1 && o->state == 0) { o->nxflags |= NXFLAG_FOLLOW_SLOPE; o->state = 1; int variance = random(-0x100, 0x100); switch(o->shot.dir) { case LEFT: case RIGHT: o->yinertia = variance; break; case UP: case DOWN: o->xinertia = variance; break; } } if (damage_enemies(o)) { o->Delete(); return; } if (IsBlockedInShotDir(o)) { shot_dissipate(o, EFFECT_FISHY); return; } if (--o->shot.ttl < 0) { effect(o->x, o->y, EFFECT_BUBBLE_BURST); o->Delete(); return; } if (o->shot.level == 0) decel = 0x2A; else decel = 0x10; switch(o->shot.dir) { case LEFT: o->xinertia += decel; break; case RIGHT: o->xinertia -= decel; break; case UP: o->yinertia += decel; break; case DOWN: o->yinertia -= decel; break; } if (o->frame < 3) ANIMATE_FWD(3); } void ai_bubbler_l3(Object *o) { if (damage_enemies(o)) { o->Delete(); return; } if (--o->shot.ttl < 0 || !inputs[FIREKEY]) { effect(o->CenterX(), o->CenterY(), EFFECT_FISHY); sound(SND_BUBBLER_LAUNCH); Object *shot = CreateObject(o->x, o->y, OBJ_BUBBLER_SHARP); shot->dir = player->dir; shot->shot.dir = (player->look) ? player->look : player->dir; shot->shot.damage = 3; shot->shot.ttl = 32; o->Delete(); return; } if (o->state == 0) { int bigspeed = random(0x200, 0x400); int smallspeed = (random(-4, 4) << CSF) / 2; switch(o->shot.dir) { case LEFT: o->xinertia = -bigspeed; o->yinertia = smallspeed; break; case RIGHT: o->xinertia = bigspeed; o->yinertia = smallspeed; break; case UP: o->xinertia = smallspeed; o->yinertia = -bigspeed; break; case DOWN: o->xinertia = smallspeed; o->yinertia = bigspeed; break; } o->state = 1; } // track player if (o->CenterX() > player->CenterX()) o->xinertia -= 0x20; if (o->CenterX() < player->CenterX()) o->xinertia += 0x20; if (o->CenterY() > player->CenterY()) o->yinertia -= 0x20; if (o->CenterY() < player->CenterY()) o->yinertia += 0x20; // bouncy if (o->xinertia < 0 && o->blockl) o->xinertia = 0x400; if (o->xinertia > 0 && o->blockr) o->xinertia = -0x400; if (o->yinertia < 0 && o->blocku) o->yinertia = 0x400; if (o->yinertia > 0 && o->blockd) o->yinertia = -0x400; // animate if (o->frame < 3) ANIMATE_FWD(3); } void ai_bubbler_sharp(Object *o) { if (run_shot(o, true)) return; if (o->state == 0) { o->state = 1; int speed = (random(10, 16) << CSF) / 2; switch(o->shot.dir) { case LEFT: o->xinertia = -speed; break; case RIGHT: o->xinertia = speed; break; case UP: o->yinertia = -speed; break; case DOWN: o->yinertia = speed; break; } o->x -= o->xinertia; o->y -= o->yinertia; } else { ANIMATE(1, 0, 1); } } ================================================ FILE: ai/weapons/bubbler.fdh ================================================ //hash:5ebaab6e //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------[referenced from ai/weapons/bubbler.cpp]-------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //--------------[referenced from ai/weapons/bubbler.cpp]-------------// Caret *effect(int x, int y, int effectno); /* located in ai/weapons/weapons.cpp */ //--------------[referenced from ai/weapons/bubbler.cpp]-------------// Object *damage_enemies(Object *o, uint32_t flags_to_exclude); bool IsBlockedInShotDir(Object *o); void shot_dissipate(Object *o, int effectno); uint8_t run_shot(Object *o, bool destroys_blocks); /* located in ai/weapons/bubbler.cpp */ //--------------[referenced from ai/weapons/bubbler.cpp]-------------// void ai_bubbler_l12(Object *o); void ai_bubbler_l3(Object *o); void ai_bubbler_sharp(Object *o); /* located in sound/sound.cpp */ //--------------[referenced from ai/weapons/bubbler.cpp]-------------// void sound(int snd); /* located in common/misc.cpp */ //--------------[referenced from ai/weapons/bubbler.cpp]-------------// int random(int min, int max); ================================================ FILE: ai/weapons/fireball.cpp ================================================ #include "weapons.h" #include "fireball.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_FIREBALL1, ai_fireball); ONTICK(OBJ_FIREBALL23, ai_fireball_level_23); ONTICK(OBJ_FIREBALL_TRAIL, ai_fireball_trail); } /* void c------------------------------() {} */ // shared between all weapon levels void ai_fireball(Object *o) { if (--o->shot.ttl < 0) { shot_dissipate(o, EFFECT_STARPOOF); return; } // bounce if (o->blockl || o->blockr || o->blockd) { sound(SND_FIREBALL); if (o->blockd) o->yinertia = -0x400; if (o->blockl) o->xinertia = 0x400; if (o->blockr) o->xinertia = -0x400; // dissipate immediately if we somehow get entirely embedded in a wall. if (o->blockl && o->blockr && o->blocku && o->blockd) { shot_dissipate(o, EFFECT_STARPOOF); return; } } // fall o->yinertia += 0x55; if (o->yinertia > 0x3ff) o->yinertia = 0x3ff; // hit ceil if (o->blocku && o->yinertia < 0) o->yinertia = 0; // spin in shot direction if (o->dir==RIGHT) { if (++o->frame >= sprites[o->sprite].nframes) o->frame = 0; } else { if (--o->frame < 0) o->frame = sprites[o->sprite].nframes-1; } Object *enemy; if ((enemy = check_hit_enemy(o))) { // bounce off of invulnerable non-enemy objects instead of dissipating // (prevents incorrect dissipation if a fireball hits the Lift in Almond) if ((enemy->flags & FLAG_INVULNERABLE) && enemy->damage == 0) { static const Point embedpt[] = { 8, 8 }; static const Point pcheckl[] = { { -1, 4 }, { -1, 12 } }; static const Point pcheckr[] = { { 16, 4 }, { 16, 12 } }; static const Point pchecku[] = { { 4, -1 }, { 12, -1 } }; static const Point pcheckd[] = { { 4, 16 }, { 12, 16 } }; // keeps us from bouncing around forever if something gets screwed up if (!o->CheckSolidIntersect(enemy, embedpt, 1)) { // figure out whether we're on top, to the left, or etc of whatever we hit // so we know which way to bounce off if (o->CheckSolidIntersect(enemy, pcheckl, 2)) { o->xinertia = 0x400; return; } if (o->CheckSolidIntersect(enemy, pcheckr, 2)) { o->xinertia = -0x400; return; } if (o->CheckSolidIntersect(enemy, pchecku, 2)) { o->yinertia = 0x400; return; } if (o->CheckSolidIntersect(enemy, pcheckd, 2)) { o->yinertia = -0x400; return; } } shot_dissipate(o, EFFECT_STARPOOF); return; } // "Fireball will barrel through weaker enemies, dealing only half damage // and continuing on if the enemy is killed by that much damage." // So, our damage is set to half of what it should be, and we'll let ourselves // deal it up to twice. enemy->DealDamage(o->shot.damage); if (o->timer3 == 1) shot_dissipate(o, EFFECT_STARPOOF); else o->timer3 = 1; } } void ai_fireball_level_23(Object *o) { // everything from level 1, and... ai_fireball(o); if (o->deleted) return; // ...spawn trails if ((++o->timer2 & 1) == 0) { create_fire_trail(o, OBJ_FIREBALL_TRAIL, o->shot.level); } } /* void c------------------------------() {}` */ // shared between Fireball and Snake Object *create_fire_trail(Object *o, int objtype, int level) { Object *trail = CreateObject(o->x, o->y, objtype); trail->sprite = (level == 2) ? SPR_FIREBALL_TRAIL3 : SPR_FIREBALL_TRAIL2; trail->dir = o->dir; // be sure and show the 1st frame trail->animframe = -1; // draw the trail BEHIND the lead fireball trail->PushBehind(o); return trail; } void ai_fireball_trail(Object *o) { static const int ccw_trail_frames[] = { 2, 1, 0, 5, 4, 3, 8, 7, 6 }; if (++o->animframe >= sprites[o->sprite].nframes) { o->Delete(); } else { if (o->dir == RIGHT) { o->frame = o->animframe; } else { o->frame = ccw_trail_frames[o->animframe]; } } } ================================================ FILE: ai/weapons/fireball.fdh ================================================ //hash:b87b3dad //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------[referenced from ai/weapons/fireball.cpp]------------// Object *CreateObject(int x, int y, int type); /* located in ai/weapons/weapons.cpp */ //--------------[referenced from ai/weapons/fireball.cpp]------------// void shot_dissipate(Object *o, int effectno); Object *check_hit_enemy(Object *shot, uint32_t flags_to_exclude); /* located in ai/weapons/fireball.cpp */ //--------------[referenced from ai/weapons/fireball.cpp]------------// void ai_fireball(Object *o); void ai_fireball_level_23(Object *o); Object *create_fire_trail(Object *o, int objtype, int level); void ai_fireball_trail(Object *o); /* located in sound/sound.cpp */ //--------------[referenced from ai/weapons/fireball.cpp]------------// void sound(int snd); ================================================ FILE: ai/weapons/missile.cpp ================================================ #include "weapons.h" #include "missile.fdh" #define STATE_WAIT_RECOIL_OVER 1 #define STATE_RECOIL_OVER 2 #define STATE_MISSILE_CAN_EXPLODE 3 struct MissileSettings { int maxspeed; // max speed of missile int accel; // rate of acceleration int smokeamt; // how much smoke to make on explosion (higher = more) int num_booms; // number of boomflashes to create on impact int boomrange; // max dist away to create the boomflashes int damage; // damage dealt by a direct hit of the missile itself int boomdamage; // damage dealt by contact with a boomflash (AoE damage) } missile_settings[] = { // Level 1-3 regular missile // have on record here for damage 4, 6, 4; check if that's correct // maxspd acl smk, nboom, range, dmg, bmdmg 0xA00, 0x80, 4, 4, 16, 8, 1, 0xA00, 0x100, 6, 6, 32, 15, 2, 0xA00, 0x80, 12, 2, 40, 8, 2, // Level 1-3 super missile // maxspd acl smk, nboom, range, dmg, bmdmg 0x1400, 0x200, 8, 4, 16, 18, 1, 0x1400, 0x200, 6, 5, 32, 30, 2, 0x1400, 0x200, 12, 3, 40, 18, 2, }; /* Direct Hits: L1 Super Missile deals 18 damage, boomflashes are 2 apiece I think l1 super missile spawns 8 smoke clouds, 2 per frame and so it appears that there are 4 booms and the booms are spawning the smoke */ INITFUNC(AIRoutines) { AFTERMOVE(OBJ_MISSILE_SHOT, ai_missile_shot); AFTERMOVE(OBJ_SUPERMISSILE_SHOT, ai_missile_shot); AFTERMOVE(OBJ_MISSILE_BOOM_SPAWNER, ai_missile_boom_spawner); } /* void c------------------------------() {} */ void ai_missile_shot(Object *o) { int index = o->shot.level + ((o->type == OBJ_SUPERMISSILE_SHOT) ? 3 : 0); MissileSettings *settings = &missile_settings[index]; if (o->state == 0) { o->shot.damage = settings->damage; if (o->shot.level == 2) { // initilize wavey effect if (o->shot.dir == LEFT || o->shot.dir == RIGHT) o->ymark = -0x20; else o->xmark = -0x20; // don't let it explode until the "recoil" effect is over. o->state = STATE_WAIT_RECOIL_OVER; // record position we were fired at (we won't explode until we pass it) o->xmark2 = player->x; o->ymark2 = player->y; } else { o->state = STATE_MISSILE_CAN_EXPLODE; } } // accelerate according to current type and level of missile // don't use LIMITX here as it can mess up recoil of level 3 super missiles switch(o->shot.dir) { case RIGHT: o->xinertia += settings->accel; if (o->xinertia > settings->maxspeed) o->xinertia = settings->maxspeed; break; case LEFT: o->xinertia -= settings->accel; if (o->xinertia < -settings->maxspeed) o->xinertia = -settings->maxspeed; break; case UP: o->yinertia -= settings->accel; if (o->yinertia < -settings->maxspeed) o->yinertia = -settings->maxspeed; break; case DOWN: o->yinertia += settings->accel; if (o->yinertia > settings->maxspeed) o->yinertia = settings->maxspeed; break; } // wavey effect for level 3 // (markx/y is used as a "speed" value here) if (o->shot.level == 2) { if (o->shot.dir == LEFT || o->shot.dir == RIGHT) { o->yinertia += o->ymark; if (o->ymark > 0 && o->yinertia > 0x100) o->ymark = -o->ymark; if (o->ymark < 0 && o->yinertia < -0x100) o->ymark = -o->ymark; } else { o->xinertia += o->xmark; if (o->xmark > 0 && o->xinertia > 0x100) o->xmark = -o->xmark; if (o->xmark < 0 && o->xinertia < -0x100) o->xmark = -o->xmark; } } // check if we hit an enemy // level 3 missiles can not blow up while they are "recoiling" // what we do is first wait until they're traveling in the direction // they're pointing, then wait till they pass the player's original position. switch(o->state) { case STATE_WAIT_RECOIL_OVER: switch(o->shot.dir) { case LEFT: if (o->xinertia <= 0) o->state = STATE_RECOIL_OVER; break; case RIGHT: if (o->xinertia >= 0) o->state = STATE_RECOIL_OVER; break; case UP: if (o->yinertia <= 0) o->state = STATE_RECOIL_OVER; break; case DOWN: if (o->yinertia >= 0) o->state = STATE_RECOIL_OVER; break; } if (o->state != STATE_RECOIL_OVER) break; case STATE_RECOIL_OVER: switch(o->shot.dir) { case LEFT: if (o->x <= o->xmark2-(2<state = STATE_MISSILE_CAN_EXPLODE; break; case RIGHT: if (o->x >= o->xmark2+(2<state = STATE_MISSILE_CAN_EXPLODE; break; case UP: if (o->y <= o->ymark2-(2<state = STATE_MISSILE_CAN_EXPLODE; break; case DOWN: if (o->y >= o->ymark2+(2<state = STATE_MISSILE_CAN_EXPLODE; break; } if (o->state != STATE_MISSILE_CAN_EXPLODE) break; case STATE_MISSILE_CAN_EXPLODE: { bool blow_up = false; if (damage_enemies(o)) { blow_up = true; } else { // check if we hit a wall if (o->shot.dir==LEFT && o->blockl) blow_up = true; else if (o->shot.dir==RIGHT && o->blockr) blow_up = true; else if (o->shot.dir==UP && o->blocku) blow_up = true; else if (o->shot.dir==DOWN && o->blockd) blow_up = true; } if (blow_up) { sound(SND_MISSILE_HIT); // create the boom-spawner object for the flashes, smoke, and AoE damage Object *sp = CreateObject(o->CenterX(), o->CenterY(), OBJ_MISSILE_BOOM_SPAWNER); sp->shot.boomspawner.range = settings->boomrange; sp->shot.boomspawner.booms_left = settings->num_booms; sp->shot.damage = settings->boomdamage; o->Delete(); return; } } break; } if (--o->shot.ttl < 0) shot_dissipate(o, EFFECT_STARPOOF); // smoke trails if (++o->timer > 2) { o->timer = 0; Caret *trail = effect(o->CenterX() - o->xinertia, \ o->CenterY() - o->yinertia, EFFECT_SMOKETRAIL); const int trailspd = 0x400; switch(o->shot.dir) { case LEFT: trail->xinertia = trailspd; trail->y -= (2<xinertia = -trailspd; trail->y -= (2<yinertia = trailspd; trail->x -= (1<yinertia = -trailspd; trail->x -= (1<timer % 3) != 1) return; if (o->state == 0) { o->state = 1; o->timer = 0; o->xmark = o->x; o->ymark = o->y; // give us the same bounding box as the boomflash effects o->sprite = SPR_BOOMFLASH; o->invisible = true; } int range = o->shot.boomspawner.range; o->x = o->xmark + (random(-range, range) << CSF); o->y = o->ymark + (random(-range, range) << CSF); effect(o->x, o->y, EFFECT_BOOMFLASH); missilehitsmoke(o); damage_all_enemies_in_bb(o, FLAG_INVULNERABLE); if (--o->shot.boomspawner.booms_left <= 0) o->Delete(); } static void missilehitsmoke(Object *o) { int smokex = o->CenterX() - (8 << CSF); int smokey = o->CenterY() - (8 << CSF); Object *smoke; for(int i=0;i<2;i++) { smoke = CreateObject(smokex, smokey, OBJ_SMOKE_CLOUD); smoke->sprite = SPR_MISSILEHITSMOKE; vector_from_angle(random(0,255), random(0x100,0x3ff), &smoke->xinertia, &smoke->yinertia); } } ================================================ FILE: ai/weapons/missile.fdh ================================================ //hash:52b1c23b //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------[referenced from ai/weapons/missile.cpp]-------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //--------------[referenced from ai/weapons/missile.cpp]-------------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //--------------[referenced from ai/weapons/missile.cpp]-------------// void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys); /* located in ai/weapons/weapons.cpp */ //--------------[referenced from ai/weapons/missile.cpp]-------------// Object *damage_enemies(Object *o, uint32_t flags_to_exclude); void shot_dissipate(Object *o, int effectno); int damage_all_enemies_in_bb(Object *o, uint32_t flags_to_exclude); /* located in ai/weapons/missile.cpp */ //--------------[referenced from ai/weapons/missile.cpp]-------------// void ai_missile_shot(Object *o); void ai_missile_boom_spawner(Object *o); static void missilehitsmoke(Object *o); /* located in sound/sound.cpp */ //--------------[referenced from ai/weapons/missile.cpp]-------------// void sound(int snd); /* located in common/misc.cpp */ //--------------[referenced from ai/weapons/missile.cpp]-------------// int random(int min, int max); ================================================ FILE: ai/weapons/nemesis.cpp ================================================ #include "weapons.h" #include "nemesis.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_NEMESIS_SHOT, ai_nemesis_shot); ONTICK(OBJ_NEMESIS_SHOT_CURLY, ai_nemesis_shot); } /* void c------------------------------() {} */ void ai_nemesis_shot(Object *o) { if (run_shot(o, (o->shot.level != 2))) return; // smoke trails on level 1 if (o->shot.level == 0) { // observe, first smokecloud is on 3rd frame; // it goes BLUE, YELLOW, BLUE--that's when the first cloud appears. if ((++o->timer % 4) == 3) { int x, y, xi, yi; switch(o->shot.dir) { case RIGHT: { x = o->Left(); y = o->CenterY(); xi = 0x200; yi = random(-0x200, 0x200); } break; case LEFT: { x = o->Right(); y = o->CenterY(); xi = -0x200; yi = random(-0x200, 0x200); } break; case UP: { x = o->CenterX(); y = o->Bottom(); xi = random(-0x200, 0x200); yi = -0x200; } break; case DOWN: { x = o->CenterX(); y = o->Top(); xi = random(-0x200, 0x200); yi = 0x200; } break; } x += o->xinertia; y += o->yinertia; Object *smoke = CreateObject(x, y, OBJ_SMOKE_CLOUD); smoke->xinertia = xi; smoke->yinertia = yi; smoke->PushBehind(o); if (o->timer2 == 0) { smoke->frame = 3; o->timer2 = 1; } else if (random(0, 1)) { smoke->frame = 1; } } } o->frame ^= 1; } ================================================ FILE: ai/weapons/nemesis.fdh ================================================ //hash:8e5ea205 //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------[referenced from ai/weapons/nemesis.cpp]-------------// Object *CreateObject(int x, int y, int type); /* located in ai/weapons/weapons.cpp */ //--------------[referenced from ai/weapons/nemesis.cpp]-------------// uint8_t run_shot(Object *o, bool destroys_blocks); /* located in ai/weapons/nemesis.cpp */ //--------------[referenced from ai/weapons/nemesis.cpp]-------------// void ai_nemesis_shot(Object *o); /* located in common/misc.cpp */ //--------------[referenced from ai/weapons/nemesis.cpp]-------------// int random(int min, int max); ================================================ FILE: ai/weapons/polar_mgun.cpp ================================================ #include "weapons.h" #include "polar_mgun.fdh" // code for both Polar Star _AND_ MGun. The way I handle trails on level 2 & 3 mgun shots // is a little weird, but it is already written and works ok, so leaving it for now. // when we hit something, level 2&3 mgun shots enter this state instead of immediately // destroying themselves so that they act as a "marker" for the trails, so the trails // know when to delete themselves. #define STATE_SHOT_HIT 100 INITFUNC(AIRoutines) { ONTICK(OBJ_POLAR_SHOT, ai_polar_shot); ONTICK(OBJ_MGUN_L1_SHOT, ai_polar_shot); ONTICK(OBJ_MGUN_LEADER, ai_polar_shot); ONTICK(OBJ_MGUN_TRAIL, ai_mgun_trail); ONTICK(OBJ_MGUN_SPAWNER, ai_mgun_spawner); } /* void c------------------------------() {} */ void ai_polar_shot(Object *o) { // flying/active state (as opposed to mgun leaders being a marker for their trails) if (o->state == 0) { if (damage_enemies(o)) { o->state = STATE_SHOT_HIT; } else if (IsBlockedInShotDir(o)) { shot_spawn_effect(o, EFFECT_STARSOLID); o->state = STATE_SHOT_HIT; if (!shot_destroy_blocks(o)) { sound(SND_SHOT_HIT); } } else if (--o->shot.ttl < 0) { shot_spawn_effect(o, EFFECT_STARPOOF); o->state = STATE_SHOT_HIT; } } // have we hit something? if so, stick around awhile as a marker for // any machine-gun layers which may be trailing us. if (o->state == STATE_SHOT_HIT) { // is this a layered machine gun shot? if so, we gotta get fancy if (o->type == OBJ_MGUN_LEADER) { if (o->timer == 0) { // stick around for a frame, visible, at the spot we hit at o->xmark = o->xinertia; // save for next tick o->ymark = o->yinertia; o->xinertia = o->yinertia = 0; } else if (o->timer == 1) { // go invisible, and move ourselves one more tick in the direction we // were traveling. this ensures that our trails don't disappear in mid-air. o->invisible = true; // I don't know why we need this check. It's finicky and I just // discovered it's necessity empirically. //if (o->shot.dir == RIGHT || o->shot.dir == DOWN) { // o->x += o->xmark; // o->y += o->ymark; } } // then wait idle for a moment so any layers trailing us can see where to stop at-- // this timer value must be greater than the highest possible # of trailing layers if (++o->timer > 8) o->Delete(); } else { o->Delete(); } } } // the trails of a machine-gun L2 or L3 shot void ai_mgun_trail(Object *o) { // linkedobject points to the leader ASSERT(o->linkedobject != NULL); // check if the leader has hit something if (o->linkedobject->state == STATE_SHOT_HIT) { bool passed_leader; // dissappear as we pass the point it hit at switch(o->shot.dir) { case RIGHT: passed_leader = ((o->Right() >> CSF) >= (o->linkedobject->Right() >> CSF)); break; case LEFT: passed_leader = ((o->Left() >> CSF) <= (o->linkedobject->Left() >> CSF)); break; case UP: passed_leader = ((o->Top() >> CSF) <= (o->linkedobject->Top() >> CSF)); break; case DOWN: passed_leader = ((o->Bottom() >> CSF) >= (o->linkedobject->Bottom() >> CSF)); break; } if (passed_leader) o->Delete(); } } // this invisible object is dropped by the player every time he fires an L2/3 machine-gun shot. // it spits out the leader, then the trails, one per frame in order, forming the complete // level 2 or 3 machine-gun blast. void ai_mgun_spawner(Object *o) { Object *shot; if (!o->timer) { // first layer (leader) shot = CreateObject(o->x, o->y, OBJ_MGUN_LEADER); o->linkedobject = shot; } else { // subsequent layers (trail) shot = CreateObject(o->x, o->y, OBJ_MGUN_TRAIL); shot->linkedobject = o->linkedobject; } // fire next layer SetupBullet(shot, o->x, o->y, o->mgun.bultype, o->dir); // apply the wave if (o->dir==UP || o->dir==DOWN) shot->xinertia = o->mgun.wave_amt; else shot->yinertia = o->mgun.wave_amt; // fire next layer next time o->mgun.bultype++; if (++o->timer >= o->mgun.nlayers) o->Delete(); } /* void c------------------------------() {} */ ================================================ FILE: ai/weapons/polar_mgun.fdh ================================================ //hash:646e2d68 //automatically generated by Makegen /* located in ObjManager.cpp */ //-------------[referenced from ai/weapons/polar_mgun.cpp]-----------// Object *CreateObject(int x, int y, int type); /* located in p_arms.cpp */ //-------------[referenced from ai/weapons/polar_mgun.cpp]-----------// void SetupBullet(Object *shot, int x, int y, int btype, int dir); /* located in ai/weapons/weapons.cpp */ //-------------[referenced from ai/weapons/polar_mgun.cpp]-----------// Object *damage_enemies(Object *o, uint32_t flags_to_exclude); bool IsBlockedInShotDir(Object *o); void shot_spawn_effect(Object *o, int effectno); bool shot_destroy_blocks(Object *o); /* located in ai/weapons/polar_mgun.cpp */ //-------------[referenced from ai/weapons/polar_mgun.cpp]-----------// void ai_polar_shot(Object *o); void ai_mgun_trail(Object *o); void ai_mgun_spawner(Object *o); /* located in sound/sound.cpp */ //-------------[referenced from ai/weapons/polar_mgun.cpp]-----------// void sound(int snd); ================================================ FILE: ai/weapons/snake.cpp ================================================ #include "weapons.h" #include "snake.fdh" // settings for wavy and acceleration of levels 2 & 3 #define SNAKE_VERT_SPEED 0x400 #define SNAKE_ACCEL_SPEED 0x80 INITFUNC(AIRoutines) { ONTICK(OBJ_SNAKE1_SHOT, ai_snake); ONTICK(OBJ_SNAKE23_SHOT, ai_snake_23); ONTICK(OBJ_SNAKE_TRAIL, ai_snake_trail); } /* void c------------------------------() {} */ void ai_snake(Object *o) { if (o->state == 0) { o->state = 1; o->flags |= FLAG_IGNORE_SOLID; o->frame = random(0, 2); } if (--o->shot.ttl < 0) { // emphasis wave effect if (o->shot.dir == LEFT || o->shot.dir == RIGHT) o->y += o->yinertia; else o->x += o->xinertia; shot_dissipate(o, EFFECT_STARPOOF); return; } // spin in shot direction if (o->shot.dir == LEFT) { if (--o->frame < 0) o->frame = sprites[o->sprite].nframes - 1; } else { if (++o->frame >= sprites[o->sprite].nframes) o->frame = 0; } if (damage_enemies(o)) { shot_dissipate(o, EFFECT_STARPOOF); } } void ai_snake_23(Object *o) { static int wave_dir = 0; if (o->state == 0) { // start moving off at an angle to our direction. // whether we start off going up or down alternates with each shot. int wavespeed = (wave_dir & 1) ? -SNAKE_VERT_SPEED : SNAKE_VERT_SPEED; wave_dir ^= 1; if (o->shot.dir == LEFT || o->shot.dir == RIGHT) { o->yinertia = wavespeed; } else { o->xinertia = wavespeed; } // ...we don't set state to 1, that'll be done in ai_snake common code } else { // accelerate the shot switch(o->shot.dir) { case LEFT: o->xinertia -= 0x80; break; case UP: o->yinertia -= 0x80; break; case RIGHT: o->xinertia += 0x80; break; case DOWN: o->yinertia += 0x80; break; } } // periodically abruptly change the wave's direction if ((++o->timer % 5) == 2) { if (o->shot.dir == LEFT || o->shot.dir == RIGHT) { o->yinertia = -o->yinertia; } else { o->xinertia = -o->xinertia; } } // spawn trails Object *trail = create_fire_trail(o, OBJ_SNAKE_TRAIL, o->shot.level); trail->frame = random(0, 2); trail->animtimer = 0; trail->yinertia = -0x200; // ... and all the basic logic from level 1 ai_snake(o); } /* void c------------------------------() {} */ void ai_snake_trail(Object *o) { if (++o->animtimer > 1) { o->animtimer = 0; o->frame += 3; if (o->frame >= sprites[o->sprite].nframes) o->Delete(); } } ================================================ FILE: ai/weapons/snake.fdh ================================================ //hash:e16efd5e //automatically generated by Makegen /* located in ai/weapons/weapons.cpp */ //---------------[referenced from ai/weapons/snake.cpp]--------------// void shot_dissipate(Object *o, int effectno); Object *damage_enemies(Object *o, uint32_t flags_to_exclude); /* located in ai/weapons/fireball.cpp */ //---------------[referenced from ai/weapons/snake.cpp]--------------// Object *create_fire_trail(Object *o, int objtype, int level); /* located in ai/weapons/snake.cpp */ //---------------[referenced from ai/weapons/snake.cpp]--------------// void ai_snake(Object *o); void ai_snake_23(Object *o); void ai_snake_trail(Object *o); /* located in common/misc.cpp */ //---------------[referenced from ai/weapons/snake.cpp]--------------// int random(int min, int max); ================================================ FILE: ai/weapons/spur.cpp ================================================ #include "weapons.h" #include "spur.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_SPUR_SHOT, ai_spur_shot); ONTICK(OBJ_SPUR_TRAIL, ai_spur_trail); } /* void c------------------------------() {} */ // trail l3 11 shot 12 // trail l2 6 damage 8 // trail l1 3 shot 4 void ai_spur_shot(Object *o) { if (IsBlockedInShotDir(o)) { if (!shot_destroy_blocks(o)) { sound(SND_SHOT_HIT); shot_spawn_effect(o, EFFECT_STARSOLID); shot_spawn_effect(o, EFFECT_SPUR_HIT); o->Delete(); return; } } Object *enemy; if ((enemy = damage_enemies(o))) { o->shot.damage--; if (o->shot.damage <= 0 || (enemy->flags & FLAG_INVULNERABLE)) { o->Delete(); return; } } if (--o->shot.ttl < 0) { shot_spawn_effect(o, EFFECT_STARPOOF); o->Delete(); return; } spur_spawn_trail(o); } /* void c------------------------------() {} */ static void spur_spawn_trail(Object *o) { static const int trail_sprites[] = \ { SPR_TRAIL_SPUR_L1, SPR_TRAIL_SPUR_L2, SPR_TRAIL_SPUR_L3 }; static const int trail_damage[] = { 3, 6, 11 }; // Calculate position to spawn the trail. The shot is 16x8 and the trails are 8x8. // We want the trail to cover up the back portion of the shot. The less of it we // cover up the more of a gap there will be when we hit a wall. The gap is adjusted // so that it does not go too far into the spur_hit circle, but also so that the trail // does not start too far back from the firing position. int x = o->x, y = o->y; if (o->state == 0) { if (o->shot.level != 2) o->state = 1; if (o->shot.dir == RIGHT) x += (8<shot.dir == DOWN) y += (8<shot.dir) { case LEFT: x += (6<shot.damage = trail_damage[o->shot.level]; trail->sprite = trail_sprites[o->shot.level]; if ((o->shot.dir == UP || o->shot.dir == DOWN) && o->shot.level != 2) trail->sprite++; } void ai_spur_trail(Object *o) { if (++o->timer > 20) { o->frame++; if (o->frame >= sprites[o->sprite].nframes) { o->Delete(); return; } } // keep dealing "damage" even once we are dealing 0 damage, // so that the enemy keeps making noise and shaking for as long // as it remains in the beam. if (damage_enemies(o, FLAG_INVULNERABLE)) { o->shot.damage = 0; } } ================================================ FILE: ai/weapons/spur.fdh ================================================ //hash:f4f572b1 //automatically generated by Makegen /* located in ObjManager.cpp */ //----------------[referenced from ai/weapons/spur.cpp]--------------// Object *CreateObject(int x, int y, int type); /* located in ai/weapons/weapons.cpp */ //----------------[referenced from ai/weapons/spur.cpp]--------------// bool IsBlockedInShotDir(Object *o); bool shot_destroy_blocks(Object *o); void shot_spawn_effect(Object *o, int effectno); Object *damage_enemies(Object *o, uint32_t flags_to_exclude); /* located in ai/weapons/spur.cpp */ //----------------[referenced from ai/weapons/spur.cpp]--------------// void ai_spur_shot(Object *o); static void spur_spawn_trail(Object *o); void ai_spur_trail(Object *o); /* located in sound/sound.cpp */ //----------------[referenced from ai/weapons/spur.cpp]--------------// void sound(int snd); ================================================ FILE: ai/weapons/weapons.cpp ================================================ #include "weapons.h" #include "weapons.fdh" /* void c------------------------------() {} */ // a convenience function which does some stuff common to a basic weapon-- // damage enemies, hit walls, and ttl dispersion. // if it deletes the shot, returns nonzero. uint8_t run_shot(Object *o, bool destroys_blocks) { if (damage_enemies(o)) { o->Delete(); return RS_HIT_ENEMY; } if (IsBlockedInShotDir(o)) { shot_spawn_effect(o, EFFECT_STARSOLID); if (destroys_blocks) { if (!shot_destroy_blocks(o)) sound(SND_SHOT_HIT); } o->Delete(); return RS_HIT_WALL; } if (--o->shot.ttl < 0) { shot_spawn_effect(o, EFFECT_STARPOOF); o->Delete(); return RS_TTL_EXPIRED; } return 0; } /* void c------------------------------() {} */ // checks if the shot passed in has struck an enemy. if so, returns the enemy. // optional parameter flags_to_exclude lets you pass through enemies with // certain flags set (such as if you don't want to try to hurt invulnerable enemies). Object *check_hit_enemy(Object *shot, uint32_t flags_to_exclude) { Object *enemy; FOREACH_OBJECT(enemy) { if (enemy->flags & (FLAG_SHOOTABLE | FLAG_INVULNERABLE)) { if ((enemy->flags & flags_to_exclude) == 0) { if (hitdetect(enemy, shot)) { // can't hit an enemy by shooting up when standing on it // (added for omega battle but good probably in other times too) if (player->riding != enemy || shot->yinertia >= 0) { return enemy; } } } } } return NULL; } // checks if the player shot "o" has hit an enemy and handles damaging the enemy if so. // also, if an enemy was damaged, returns it's handle. // multi is for weapons such as the spur and fireball that can "plow through" enemies // until their damage is exhausted. Object *damage_enemies(Object *o, uint32_t flags_to_exclude) { Object *enemy; // first check if we hit an enemy if ((enemy = check_hit_enemy(o, flags_to_exclude))) { if (enemy->flags & FLAG_INVULNERABLE) { shot_spawn_effect(o, EFFECT_STARSOLID); sound(SND_TINK); } else { enemy->DealDamage(o->shot.damage, o); } return enemy; } return NULL; } // used by AoE weapons, damages all enemies within the bounding box, // not just the first one found. Returns the number of enemies hit. int damage_all_enemies_in_bb(Object *o, uint32_t flags_to_exclude) { Object *enemy; int count = 0; FOREACH_OBJECT(enemy) { if (enemy->flags & (FLAG_SHOOTABLE | FLAG_INVULNERABLE)) { if ((enemy->flags & flags_to_exclude) == 0) { if (hitdetect(enemy, o)) { if (enemy->flags & FLAG_INVULNERABLE) { shot_spawn_effect(o, EFFECT_STARSOLID); sound(SND_TINK); } else { enemy->DealDamage(o->shot.damage, o); } count++; } } } } return count; } /* void c------------------------------() {} */ // spawn an effect at a shot's center point void shot_spawn_effect(Object *o, int effectno) { int x, y; // Nemesis shots are very long so just centering the star doesn't look right. // I could have gone off of aspect ratio but wanted to keep missiles the same // and not risk breaking any older weapons. if ((o->type == OBJ_NEMESIS_SHOT && o->shot.level != 2) || \ (o->type == OBJ_MGUN_LEADER)) { switch(o->shot.dir) { case LEFT: x = o->x; y = o->CenterY(); break; case RIGHT: x = (o->x + o->Width()); y = o->CenterY(); break; case UP: x = o->CenterX(); y = o->y; break; case DOWN: x = o->CenterX(); y = (o->y + o->Height()); break; } } else { x = o->CenterX(); y = o->CenterY(); } if (effectno == EFFECT_STARSOLID || effectno == EFFECT_SPUR_HIT) { // embed it in the wall, instead of the spot where we hit at switch(o->shot.dir) { case RIGHT: x += 0x400; break; case LEFT: x -= 0x400; break; case UP: y -= 0x400; break; case DOWN: y += 0x400; break; } } effect(x, y, effectno); } void shot_dissipate(Object *o, int effectno) { shot_spawn_effect(o, effectno); o->Delete(); } /* void c------------------------------() {} */ // called when certain kinds of shots hit a wall to see if it was a // destroyable brick that they hit. // this destroys star-blocks which are touching the shot. // returns nonzero if any were destroyed. bool shot_destroy_blocks(Object *o) { int x, y; SIFPointList *plist; // select which pointlist to check based on which direction shot is traveling switch(o->shot.dir) { case LEFT: plist = &sprites[o->sprite].block_l; break; case RIGHT: plist = &sprites[o->sprite].block_r; break; case UP: plist = &sprites[o->sprite].block_u; break; case DOWN: plist = &sprites[o->sprite].block_d; break; default: return 0; } // see if we've hit a destroyable block if (o->CheckAttribute(plist, TA_DESTROYABLE, &x, &y)) { map.tiles[x][y]--; SmokeCloudsSlow(((x * TILE_W) + (TILE_W / 2)) << CSF, \ ((y * TILE_H) + (TILE_H / 2)) << CSF, 4); sound(SND_BLOCK_DESTROY); shot_spawn_effect(o, EFFECT_FISHY); return 1; } return 0; } /* void c------------------------------() {} */ // returns nonzero if a shot is blocked in the direction it's traveling bool IsBlockedInShotDir(Object *o) { switch(o->shot.dir) { case LEFT: return o->blockl; case RIGHT: return o->blockr; case UP: return o->blocku; case DOWN: return o->blockd; } staterr("IsBlockedInShotDir(%x): invalid direction %d", o, o->shot.dir); return 0; } ================================================ FILE: ai/weapons/weapons.fdh ================================================ //hash:b29df477 //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------[referenced from ai/weapons/weapons.cpp]-------------// bool hitdetect(Object *o1, Object *o2); /* located in caret.cpp */ //--------------[referenced from ai/weapons/weapons.cpp]-------------// Caret *effect(int x, int y, int effectno); /* located in ai/weapons/weapons.cpp */ //--------------[referenced from ai/weapons/weapons.cpp]-------------// uint8_t run_shot(Object *o, bool destroys_blocks); Object *check_hit_enemy(Object *shot, uint32_t flags_to_exclude); Object *damage_enemies(Object *o, uint32_t flags_to_exclude); int damage_all_enemies_in_bb(Object *o, uint32_t flags_to_exclude); void shot_spawn_effect(Object *o, int effectno); void shot_dissipate(Object *o, int effectno); bool shot_destroy_blocks(Object *o); bool IsBlockedInShotDir(Object *o); /* located in ai/sym/smoke.cpp */ //--------------[referenced from ai/weapons/weapons.cpp]-------------// void SmokeCloudsSlow(int x, int y, int nclouds); /* located in sound/sound.cpp */ //--------------[referenced from ai/weapons/weapons.cpp]-------------// void sound(int snd); /* located in common/stat.cpp */ //--------------[referenced from ai/weapons/weapons.cpp]-------------// void staterr(const char *fmt, ...); ================================================ FILE: ai/weapons/weapons.h ================================================ #ifndef _WEAPONS_H #define _WEAPONS_H #include "../stdai.h" uint8_t run_shot(Object *o, bool destroys_blocks); enum run_shot_result { RS_NONE = 0, RS_HIT_ENEMY, RS_HIT_WALL, RS_TTL_EXPIRED }; Object *check_hit_enemy(Object *o, uint32_t flags_to_exclude=0); Object *damage_enemies(Object *o, uint32_t flags_to_exclude=0); int damage_multiple_enemies(Object *o, uint32_t flags_to_exclude=0); void shot_spawn_effect(Object *o, int effectno); void shot_dissipate(Object *o, int effectno = EFFECT_STARPOOF); bool shot_destroy_blocks(Object *o); bool IsBlockedInShotDir(Object *o); // --------------------------------------- // from Fireball code, shared with Snake Object *create_fire_trail(Object *o, int objtype, int level); #endif ================================================ FILE: ai/weapons/whimstar.cpp ================================================ #include "weapons.h" #include "whimstar.h" #include "whimstar.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_WHIMSICAL_STAR, ai_whimsical_star); } /* void c------------------------------() {} */ void init_whimstar(WhimsicalStar *wh) { // this offset kickstarts them into orbiting at a sufficient distance int px = player->Right();// + 0x1000; int py = player->Bottom();// + 0x1000; for(int i=0;istars[i].x = px; wh->stars[i].y = py; } } void add_whimstar(WhimsicalStar *wh) { if (wh->nstars < MAX_WHIMSTARS) wh->nstars++; } void remove_whimstar(WhimsicalStar *wh) { if (wh->nstars > 0) wh->nstars--; } void run_whimstar(WhimsicalStar *wh) { Whimstar *stars = wh->stars; int i; if (++wh->stariter > 2) wh->stariter = 0; for(i=0;iCenterX(); tgty = player->CenterY(); } else { tgtx = stars[i - 1].x; tgty = stars[i - 1].y; } stars[i].xinertia += (stars[i].x < tgtx) ? 0x80 : -0x80; stars[i].yinertia += (stars[i].y < tgty) ? 0xAA : -0xAA; if (stars[i].xinertia > 0xA00) stars[i].xinertia = 0xA00; if (stars[i].xinertia < -0xA00) stars[i].xinertia = -0xA00; if (stars[i].yinertia > 0xA00) stars[i].yinertia = 0xA00; if (stars[i].yinertia < -0xA00) stars[i].yinertia = -0xA00; stars[i].x += stars[i].xinertia; stars[i].y += stars[i].yinertia; if (player->equipmask & EQUIP_WHIMSTAR) { if (i < wh->nstars && i == wh->stariter) { CreateObject(stars[i].x, stars[i].y, OBJ_WHIMSICAL_STAR); } } } } void draw_whimstars(WhimsicalStar *wh) { Whimstar *stars = wh->stars; int i; int scr_x, scr_y; for(i=0;instars;i++) { scr_x = (stars[i].x >> CSF) - (map.displayed_xscroll >> CSF); scr_y = (stars[i].y >> CSF) - (map.displayed_yscroll >> CSF); draw_sprite_at_dp(scr_x, scr_y, SPR_WHIMSICAL_STAR, i); } } /* void c------------------------------() {} */ // invisible trail object left by whimsical star which damages enemies void ai_whimsical_star(Object *o) { Object *enemy = check_hit_enemy(o); if (enemy) { if (!(enemy->flags & FLAG_INVULNERABLE)) { enemy->DealDamage(1); } else { effect(o->x, o->y, EFFECT_STARSOLID); sound(SND_TINK); } o->Delete(); } else if (o->state == 1) { o->Delete(); } else { o->invisible = true; o->state = 1; } } ================================================ FILE: ai/weapons/whimstar.fdh ================================================ //hash:cbbcdfc9 //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------[referenced from ai/weapons/whimstar.cpp]------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //--------------[referenced from ai/weapons/whimstar.cpp]------------// Caret *effect(int x, int y, int effectno); /* located in ai/weapons/weapons.cpp */ //--------------[referenced from ai/weapons/whimstar.cpp]------------// Object *check_hit_enemy(Object *shot, uint32_t flags_to_exclude); /* located in ai/weapons/whimstar.cpp */ //--------------[referenced from ai/weapons/whimstar.cpp]------------// void init_whimstar(WhimsicalStar *wh); void add_whimstar(WhimsicalStar *wh); void remove_whimstar(WhimsicalStar *wh); void run_whimstar(WhimsicalStar *wh); void draw_whimstars(WhimsicalStar *wh); void ai_whimsical_star(Object *o); /* located in sound/sound.cpp */ //--------------[referenced from ai/weapons/whimstar.cpp]------------// void sound(int snd); ================================================ FILE: ai/weapons/whimstar.h ================================================ #ifndef _WHIMSTAR_H #define _WHIMSTAR_H #define MAX_WHIMSTARS 3 struct Whimstar { int x, y; int xinertia, yinertia; }; struct WhimsicalStar { Whimstar stars[MAX_WHIMSTARS]; int nstars; int stariter; }; #endif ================================================ FILE: ai/weed/balrog_boss_flying.cpp ================================================ #include "../stdai.h" #include "balrog_boss_flying.fdh" #define STEPS_TO_PLAYER 100 INITFUNC(AIRoutines) { ONTICK(OBJ_BALROG_BOSS_FLYING, ai_balrog_boss_flying); ONDEATH(OBJ_BALROG_BOSS_FLYING, ondeath_balrog_boss_flying); ONTICK(OBJ_BALROG_SHOT_BOUNCE, ai_balrog_shot_bounce); } /* void c------------------------------() {} */ void ai_balrog_boss_flying(Object *o) { enum { INIT = 0, WAIT_BEGIN, SHOOT_PLAYER, JUMP_BEGIN, JUMP_UP, FLYING, JUMP_END, LANDED }; switch(o->state) { case 0: o->state = WAIT_BEGIN; o->timer = 0; case WAIT_BEGIN: // wait at start of battle { FACEPLAYER; if (++o->timer > 12) { o->state = SHOOT_PLAYER; o->timer = 0; o->timer2 = 0; o->frame = 1; } } break; case SHOOT_PLAYER: { FACEPLAYER; if (++o->timer > 16) { o->timer = 0; o->frame = 1; EmFireAngledShot(o, OBJ_IGOR_SHOT, 16, 0x200); sound(SND_EM_FIRE); if (++o->timer2 > 3) // number of shots to fire { o->state = JUMP_BEGIN; o->timer = 0; } } } break; case JUMP_BEGIN: // begin jump { FACEPLAYER; if (++o->timer > 3) { o->state = JUMP_UP; o->timer = 0; o->xinertia = (player->x - o->x) / STEPS_TO_PLAYER; o->yinertia = -0x600; o->frame = 3; } } break; case JUMP_UP: // jumping up { if (o->yinertia > 0x200) { if (o->hp <= 60) { // skip flying if low health o->state = JUMP_END; } else { o->state = FLYING; o->timer = 0; o->ymark = o->y; o->frame = 13; o->animtimer = 0; } } } break; case FLYING: { if (++o->animtimer > 1) { o->animtimer = 0; o->frame = (o->frame == 13) ? 14 : 13; // wings just went down if (o->frame == 13) sound(SND_EXPLOSION2); } if (++o->timer >= STEPS_TO_PLAYER) { o->state = JUMP_END; o->frame = 3; } o->yinertia += (o->y >= o->ymark) ? -0x40 : 0x40; LIMITY(0x200); } break; case JUMP_END: // coming down from jump { if ((o->y + (16 << CSF)) < player->y) { o->damage = 10; } else { o->damage = 0; } if (o->blockd) { o->xinertia = 0; o->damage = 0; sound(SND_FUNNY_EXPLODE); quake(30); SmokeSide(o, 6, DOWN); for(int i=0;i<8;i++) { int x = random(o->Left(), o->Right()); int y = o->Bottom() - (8 << CSF); Object *shot = CreateObject(x, y, OBJ_BALROG_SHOT_BOUNCE); shot->xinertia = random(-0x400, 0x400); shot->yinertia = random(-0x400, 0); } o->state = LANDED; o->timer = 0; o->frame = 2; } } break; case LANDED: { o->frame = 2; if (++o->timer > 3) { o->state = SHOOT_PLAYER; o->timer = 0; } } break; } if (o->state != FLYING) o->yinertia += 0x33; LIMITY(0x5FF); } void ondeath_balrog_boss_flying(Object *o) { o->xinertia = 0; o->flags &= ~FLAG_SHOOTABLE; KillObjectsOfType(OBJ_BALROG_SHOT_BOUNCE); KillObjectsOfType(OBJ_IGOR_SHOT); } void ai_balrog_shot_bounce(Object *o) { ANIMATE(2, 0, 1); if (o->blockd) o->yinertia = -0x400; o->yinertia += 42; if ((o->blockl && o->xinertia < 0) || \ (o->blockr && o->xinertia > 0) || \ ++o->timer > 250) { effect(o->CenterX(), o->CenterY(), EFFECT_FISHY); o->Delete(); } } ================================================ FILE: ai/weed/balrog_boss_flying.fdh ================================================ //hash:4e9001fb //automatically generated by Makegen /* located in game.cpp */ //----------[referenced from ai/weed/balrog_boss_flying.cpp]---------// void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //----------[referenced from ai/weed/balrog_boss_flying.cpp]---------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //----------[referenced from ai/weed/balrog_boss_flying.cpp]---------// Caret *effect(int x, int y, int effectno); /* located in trig.cpp */ //----------[referenced from ai/weed/balrog_boss_flying.cpp]---------// void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); /* located in ai/ai.cpp */ //----------[referenced from ai/weed/balrog_boss_flying.cpp]---------// void KillObjectsOfType(int type); /* located in ai/weed/balrog_boss_flying.cpp */ //----------[referenced from ai/weed/balrog_boss_flying.cpp]---------// void ai_balrog_boss_flying(Object *o); void ondeath_balrog_boss_flying(Object *o); void ai_balrog_shot_bounce(Object *o); /* located in ai/sym/smoke.cpp */ //----------[referenced from ai/weed/balrog_boss_flying.cpp]---------// void SmokeSide(Object *o, int nclouds, int dir); /* located in sound/sound.cpp */ //----------[referenced from ai/weed/balrog_boss_flying.cpp]---------// void sound(int snd); /* located in common/misc.cpp */ //----------[referenced from ai/weed/balrog_boss_flying.cpp]---------// int random(int min, int max); ================================================ FILE: ai/weed/frenzied_mimiga.cpp ================================================ // frenzied mimiga subboss seen in Grasstown Hut #include "../stdai.h" #include "frenzied_mimiga.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_FRENZIED_MIMIGA, ai_frenzied_mimiga); } /* void c------------------------------() {} */ void ai_frenzied_mimiga(Object *o) { /*debug("state %d", o->state); debug("timer %d", o->timer); debug("xi %d", o->xinertia); debug("yi %d", o->yinertia);*/ switch(o->state) { case 0: o->xinertia = 0; o->state = 1; o->timer = 0; o->timer2 = 0; case 1: { // waiting-- attack once player gets too close or shoots us if (++o->timer > 40) { if (pdistlx(96<state = 10; o->timer = 0; } if (o->shaketime) { o->state = 10; o->timer = 0; } } } break; case 10: { // woken up-- preparing to attack FACEPLAYER; o->frame = 1; if (++o->timer > 20) { o->timer = 0; o->state = 20; } } break; case 20: { // hop, hop, lunge... o->damage = 0; o->xinertia = 0; ANIMATE_FWD(2); if (o->frame >= 3) { FACEPLAYER; XMOVE(0x200); if (++o->timer2 >= 3) // lunge/bite { o->timer2 = 0; sound(SND_JAWS); o->frame = 4; o->damage = 5; o->xinertia *= 2; } else { sound(SND_ENEMY_JUMP); } o->state = 21; o->yinertia = -0x400; } } break; case 21: // doing jump or lunge { if (o->blockd && o->yinertia >= 0) { sound(SND_THUD); o->state = 20; o->frame = 1; o->animtimer = 0; o->damage = 0; // if player too far away return to wait state if (!pdistlx(144<state = 0; } } } break; case 30: // jumping out of fireplace (set by script) { SmokeClouds(o, 8, 16, 16); o->frame = 0; o->state = 0; } break; case 50: // killed (as boss, in Grasstown Hut) (set by script) { sound(SND_ENEMY_HURT); o->frame = 4; o->damage = 0; o->flags &= ~(FLAG_SHOOTABLE | FLAG_SOLID_MUSHY); o->state = 51; o->yinertia = -0x200; } case 51: { if (o->blockd && o->yinertia >= 0) { o->frame = 5; o->xinertia = 0; sound(SND_THUD); o->state = 52; // falls slower } } break; } if (o->state == 52) o->yinertia += 0x20; else o->yinertia += 0x40; LIMITY(0x5ff); } ================================================ FILE: ai/weed/frenzied_mimiga.fdh ================================================ //hash:f0cdb4ba //automatically generated by Makegen /* located in ai/weed/frenzied_mimiga.cpp */ //------------[referenced from ai/weed/frenzied_mimiga.cpp]----------// void ai_frenzied_mimiga(Object *o); /* located in ai/sym/smoke.cpp */ //------------[referenced from ai/weed/frenzied_mimiga.cpp]----------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //------------[referenced from ai/weed/frenzied_mimiga.cpp]----------// void sound(int snd); ================================================ FILE: ai/weed/weed.cpp ================================================ #include "../stdai.h" #include "weed.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_CRITTER_FLYING, ai_critter); ONTICK(OBJ_POWER_CRITTER, ai_critter); ONTICK(OBJ_BAT_HANG, ai_bat_hang); ONTICK(OBJ_BAT_CIRCLE, ai_bat_circle); ONTICK(OBJ_JELLY, ai_jelly); ONTICK(OBJ_GIANT_JELLY, ai_giant_jelly); ONTICK(OBJ_MANNAN, ai_mannan); ONTICK(OBJ_MANNAN_SHOT, ai_mannan_shot); ONTICK(OBJ_FROG, ai_frog); ONTICK(OBJ_MINIFROG, ai_frog); ONTICK(OBJ_SANTAS_KEY, ai_animate2); ONTICK(OBJ_HEY_SPAWNER, ai_hey_spawner); ONTICK(OBJ_MOTORBIKE, ai_motorbike); ONTICK(OBJ_POWERCOMP, ai_animate3); ONTICK(OBJ_POWERSINE, ai_animate1); ONTICK(OBJ_MALCO, ai_malco); ONTICK(OBJ_MALCO_BROKEN, ai_malco_broken); } /* void c------------------------------() {} */ void ai_critter(Object *o) { switch(o->state) { case 0: { if (o->type == OBJ_POWER_CRITTER) { // altered physics for Power Critter o->critter.jumpheight = 0x2800; o->critter.jumpgrav = 0x1C; o->critter.falldmg = 12; } else { o->critter.jumpheight = 0; o->critter.jumpgrav = 0x40; o->critter.falldmg = 3; if (o->type == OBJ_CRITTER_HOPPING_BLUE || // first cave o->type == OBJ_CRITTER_HOPPING_GREEN || // egg 1 o->type == OBJ_CRITTER_HOPPING_AQUA || // egg 2 o->type == OBJ_CRITTER_HOPPING_RED) // last cave { o->critter.canfly = false; // critters in egg1 only 2 dmg if (o->type == OBJ_CRITTER_HOPPING_GREEN) o->critter.falldmg = 2; // critters in First Cave don't jump as high if (o->type != OBJ_CRITTER_HOPPING_BLUE) { o->critter.jumpgrav = 0x2C; } } else { // critters are purple in Maze o->sprite = SPR_CRITTER_FLYING_CYAN; o->critter.canfly = true; } } o->state = 1; } //fall thru case 1: { o->frame = 0; if (o->timer >= 8) { int attack_dist = (o->critter.canfly) ? (96 << CSF) : (64 << CSF); // close enough to attack? if (pdistlx(attack_dist) && pdistly2(96<state = 2; o->frame = 0; o->timer = 0; } else if (pdistlx(attack_dist + (32<frame = 1; o->timer = 8; // reset timer to stop watching } else { // once a little time has passed stop watching him if he turns his back if ((o->x > player->x && player->dir==LEFT) || \ (o->x < player->x && player->dir==RIGHT)) { if (++o->timer >= 150) { o->frame = 0; o->timer = 8; } } else o->timer = 8; } } else { o->timer++; } if (o->shaketime) { // attack if shot o->state = 2; o->frame = 0; o->timer = 0; } } break; case 2: // start jump { if (++o->timer > 8) { o->state = 3; o->frame = 2; o->yinertia = -1228; sound(SND_ENEMY_JUMP); FACEPLAYER; XMOVE(0x100); } } break; case 3: // jumping { // enter flying phase as we start to come down or // if we hit the ceiling. if (o->yinertia > 0x100 || o->blocku) { // during flight we will sine-wave oscilliate around this position o->ymark = (o->y - o->critter.jumpheight); o->state = 4; o->frame = 3; o->timer = 0; } else { if (o->blockd && o->yinertia >= 0) { // jumped onto a platform before we got to fly--land immediately goto landed; } break; } } // fall-thru case 4: // flying { FACEPLAYER; // time to come down yet? // (come down immediately if we are not one of the flying critters) if (!o->critter.canfly || \ o->blockl || o->blockr || o->blocku || \ ++o->timer > 100) { o->damage = o->critter.falldmg; // increased damage if falls on player o->state = 5; o->frame = 2; o->yinertia /= 2; } else { // run the propeller ANIMATE(0, 3, 5); if ((o->timer & 3)==1) sound(SND_CRITTER_FLY); if (o->blockd) o->yinertia = -0x200; } } break; case 5: // coming down from flight { if (o->blockd) { // landed landed: ; o->damage = 2; // reset to normal damage o->state = 1; o->frame = 0; o->timer = 0; o->xinertia = 0; sound(SND_THUD); } } break; } if (o->state == 4) // flying { // fly towards player o->xinertia += (o->x > player->x) ? -0x20 : 0x20; // sine-wave oscillate o->yinertia += (o->y > o->ymark) ? -0x10 : 0x10; LIMITX(0x200); LIMITY(0x200); } else if (o->state == 3 && o->yinertia < 0) // jumping up { o->yinertia += o->critter.jumpgrav; } else { o->yinertia += 0x40; } LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_bat_hang(Object *o) { switch(o->state) { case 0: o->state = 1; case 1: // hanging and waiting if (!random(0, 100)) { o->state = 2; o->timer = 0; o->frame = 1; } if (pdistlx(0x1000) && pdistly2(0x1000, 0x9000)) { o->frame = 0; o->state = 3; } break; case 2: // blinking if (++o->timer > 8) { o->state = 1; o->frame = 0; } break; case 3: // at attention o->frame = 0; if (o->shaketime || pdistlx(0x2800)) { o->frame = 1; o->animtimer = 0; o->state = 4; o->timer = 0; } break; case 4: // falling o->yinertia += 0x20; LIMITY(0x5ff); o->timer++; if (o->timer > 20 || o->blockd) { if (o->blockd || ((player->y - 0x2000) < o->y)) { // start flying o->animtimer = 0; o->frame = 2; o->state = 5; o->ymark = o->y; if (o->blockd) o->yinertia = -0x200; } } break; case 5: // flying ANIMATE(1, 2, 4); FACEPLAYER; o->xinertia += (o->x > player->x) ? -0x20 : 0x20; o->yinertia += (o->y > o->ymark) ? -0x10 : 0x10; LIMITX(0x200); LIMITY(0x200); if (o->blockd) o->yinertia = -0x200; if (o->blockr) o->yinertia = 0x200; break; } } void ai_bat_circle(Object *o) { switch(o->state) { case 0: { uint8_t angle; o->state = 1; // set up initial direction and target x,y angle = random(0, 255); o->xinertia = sin_table[angle]; angle += 64; o->xmark = (o->x + (sin_table[angle] * 8)); angle = random(0, 255); o->yinertia = sin_table[angle]; angle += 64; o->ymark = (o->y + (sin_table[angle] * 8)); } case 1: // circle around our target point ANIMATE(1, 2, 4); FACEPLAYER; o->xinertia += (o->x > o->xmark) ? -0x10 : 0x10; o->yinertia += (o->y > o->ymark) ? -0x10 : 0x10; LIMITX(0x200); LIMITY(0x200); if (!o->timer2) { if (pdistlx(0x1000) && (player->y > o->y) && pdistly(0xC000)) { // dive attack o->xinertia /= 2; o->yinertia = 0; o->state = 2; o->frame = 5; // mouth showing teeth } } else o->timer2--; break; case 2: // dive attack o->yinertia += 0x40; LIMITY(0x5ff); if (o->blockd) { o->yinertia = 0; o->xinertia *= 2; o->timer2 = 120; // delay before can dive again o->state = 1; } break; } } /* void c------------------------------() {} */ void ai_jelly(Object *o) { switch(o->state) { case 0: { o->nxflags |= NXFLAG_SLOW_WHEN_HURT; o->timer = random(0, 20); o->xmark = o->x; o->ymark = o->y; o->xinertia = (o->dir == LEFT) ? 0x200 : -0x200; o->state = 1; } case 1: { if (--o->timer <= 0) { o->state = 10; } else break; } case 10: { if (++o->timer > 10) { o->timer = o->frame = 0; o->state = 11; } } break; case 11: { if (++o->animtimer > 5) { o->animtimer = 0; o->frame++; } if (o->frame == 2) { o->xinertia += (o->dir == LEFT) ? -0x100 : +0x100; o->yinertia -= 0x200; } else if (o->frame > 2) { o->state = 12; o->frame = 3; } } break; case 12: { o->timer++; if (o->y > o->ymark && o->timer > 10) { o->timer = 0; o->state = 10; o->frame = 0; } } break; } o->dir = (o->x > o->xmark) ? LEFT : RIGHT; if (o->blockl) o->dir = RIGHT; if (o->blockr) o->dir = LEFT; if (o->blockd) o->yinertia = -0x200; o->yinertia += 0x20; LIMITX(0x100); LIMITY(0x200); } // Kulala void ai_giant_jelly(Object *o) { switch(o->state) { case 0: // frozen/in stasis. waiting for player to shoot. o->frame = 4; if (o->shaketime) { quake(30); o->state = 10; o->frame = 0; o->timer = 0; } break; case 10: // falling { o->flags |= FLAG_SHOOTABLE; o->flags &= ~FLAG_INVULNERABLE; if (++o->timer > 40) { o->timer = 0; o->animtimer = 0; o->state = 11; } } break; case 11: // animate thrust { ANIMATE_FWD(5); if (o->frame >= 3) { o->frame = 3; o->state = 12; } } break; case 12: // thrusting upwards { o->yinertia = -0x155; if (++o->timer > 20) { o->state = 10; o->frame = 0; o->timer = 0; } } break; case 20: // shot/freeze over/go invulnerable { o->frame = 4; o->xinertia >>= 1; o->yinertia += 0x20; if (!o->shaketime) { o->state = 10; o->frame = 0; o->timer = 30; } } break; } if (o->shaketime) { if (++o->timer3 > 12) { o->state = 20; o->frame = 4; o->flags &= ~FLAG_SHOOTABLE; o->flags |= FLAG_INVULNERABLE; } } else { o->timer3 = 0; } if (o->state >= 10) { if (o->blockl) { o->timer2 = 50; o->dir = RIGHT; } if (o->blockr) { o->timer2 = 50; o->dir = LEFT; } if (o->timer2 > 0) { o->timer2--; XACCEL(0x80); } else { o->timer2 = 50; FACEPLAYER; } o->yinertia += 0x10; if (o->blockd) o->yinertia = -0x300; } LIMITX(0x100); LIMITY(0x300); } /* void c------------------------------() {} */ void ai_mannan(Object *o) { // check if we were "killed" if (o->state < 3 && o->hp < 90) { sound(SND_LITTLE_CRASH); SmokeClouds(o, 8, 12, 12); o->SpawnXP(objprop[o->type].xponkill); o->flags &= ~FLAG_SHOOTABLE; o->state = 3; o->timer = 0; o->frame = 2; o->damage = 0; } switch(o->state) { case 0: if (o->shaketime) { SpawnObjectAtActionPoint(o, OBJ_MANNAN_SHOT); o->frame = 1; o->state = 2; o->timer = 0; } break; case 2: // firing if (++o->timer > 20) { o->timer = o->state = o->frame = 0; } break; case 3: // dead/blinking switch(++o->timer) { case 50: case 60: o->frame = 3; break; case 53: case 63: o->frame = 2; break; case 100: o->state = 4; break; } break; } } void ai_mannan_shot(Object *o) { XACCEL(0x20); ANIMATE(0, 1, 2); if ((o->timer & 3) == 1) sound(SND_IRONH_SHOT_FLY); if (++o->timer > 100) o->Delete(); } /* void c------------------------------() {} */ // there is an apparent bug on the sprite sheet for this monster: // right-facing frame 1 is a duplicate of frame 0, // so the mouth-twitch animation does not work when // the frog is facing right. void ai_frog(Object *o) { switch(o->state) { case 0: { o->timer = 0; o->xinertia = 0; o->yinertia = 0; // non-normal dirs are used to indicate that this frog was // spawned by balfrog: we are falling out of ceiling during fight if (o->dir != LEFT && o->dir != RIGHT) { o->dir = random(0, 1) ? LEFT : RIGHT; o->flags |= FLAG_IGNORE_SOLID; o->state = 3; o->frame = 2; } else { o->flags &= ~FLAG_IGNORE_SOLID; o->state = 1; } } case 1: // standing { o->timer++; if (!random(0, 50)) { // mouth-flitter animation o->state = 2; o->frame = 0; o->timer = 0; o->animtimer = 0; } } break; case 2: // mouth flitter { ANIMATE(2, 0, 1); if (++o->timer > 18) o->state = 1; } break; case 3: // falling out of ceiling during balfrog fight { if (++o->timer > 40) { o->flags &= ~FLAG_IGNORE_SOLID; if (o->blockd) { o->state = 0; o->frame = 0; o->timer = 0; } } } break; case 10: // jumping case 11: { if (o->blockl && o->xinertia < 0) { o->dir = RIGHT; o->xinertia = -o->xinertia; } if (o->blockr && o->xinertia > 0) { o->dir = LEFT; o->xinertia = -o->xinertia; } if (o->blockd) { o->state = 0; o->frame = 0; o->timer = 0; } } break; } // random jumping, and jump when shot if (o->state < 3 && o->timer > 10) { bool dojump = false; if (o->shaketime) { dojump = true; } else if (pdistlx(0x14000) && pdistly(0x8000)) { if (!random(0, 50)) { dojump = true; } } if (dojump) { FACEPLAYER; o->state = 10; o->frame = 2; o->yinertia = -0x5ff; // no jumping sound in cutscenes at ending if (!player->inputs_locked && !player->disabled) sound(SND_ENEMY_JUMP); XMOVE(0x200); } } o->yinertia += 0x80; LIMITY(0x5ff); } /* void c------------------------------() {} */ void ai_hey_spawner(Object *o) { if (!o->state) { effect(o->x, o->y - (8<state = 1; } } void ai_motorbike(Object *o) { switch(o->state) { case 0: // parked break; case 10: // kazuma and booster mounted o->y -= (sprites[SPR_MOTORBIKE_MOUNTED].h - sprites[SPR_MOTORBIKE].h) << CSF; o->sprite = SPR_MOTORBIKE_MOUNTED; o->state++; break; case 20: // kazuma and booster start the engine { o->state = 21; o->timer = 1; o->xmark = o->x; o->ymark = o->y; } case 21: { o->x = o->xmark + (random(-1, 1) << CSF); o->y = o->ymark + (random(-1, 1) << CSF); if (++o->timer > 30) o->state = 30; } break; case 30: // kazuma and booster take off { o->state = 31; o->timer = 1; o->xinertia = -0x800; o->ymark = o->y; sound(SND_MISSILE_HIT); } case 31: { o->xinertia += 0x20; o->timer++; o->y = o->ymark + (random(-1, 1) << CSF); if (o->timer > 10) o->dir = RIGHT; if (o->timer > 200) o->state = 40; } break; case 40: // flying away (fast out-of-control) { o->state = 41; o->timer = 2; o->dir = LEFT; o->y -= (48 << CSF); // move up... o->xinertia = -0x1000; // ...and fly fast } case 41: { o->timer += 2; // makes exhaust sound go faster if (o->timer > 1200) o->Delete(); } break; } if (o->state >= 20 && (o->timer & 3) == 0) { sound(SND_FIREBALL); // make exhaust puffs, and make them go out horizontal // instead of straight up as this effect usually does Caret *puff = effect(o->ActionPointX(), o->ActionPointY(), EFFECT_SMOKETRAIL_SLOW); puff->yinertia = 0; puff->xinertia = (o->dir == LEFT) ? 0x280 : -0x280; } } /* void c------------------------------() {} */ void ai_malco(Object *o) { switch(o->state) { case 0: o->state = 1; o->frame = 0; // smushed into ground, used on re-entry to room // if player does not choose to pull him out // after Balrog fight if (o->dir == RIGHT) o->frame = 5; break; case 10: o->state = 11; o->timer = 0; o->timer = 0; SmokeClouds(o, 4, 16, 16); case 11: // beeping and eyes flickering if (++o->timer < 100) { if ((o->timer & 1)==0) { sound(SND_COMPUTER_BEEP); o->frame ^= 1; } } else if (o->timer > 150) { o->timer = 0; o->state = 15; } break; case 15: // shaking if (o->timer & 2) { o->x += (1<x -= (1<timer > 50) o->state = 16; break; case 16: // stand up o->state = 17; o->frame = 2; o->timer = 0; sound(SND_BLOCK_DESTROY); SmokeClouds(o, 4, 16, 16); case 17: if (++o->timer > 150) { o->state = 18; } break; case 18: // gawking/bobbing up and down o->state = 19; o->timer = 0; // go into gawk frame first time o->animtimer = 999; o->frame = 9; case 19: if (++o->animtimer > 3) { o->animtimer = 0; if (++o->frame > 4) o->frame = 3; if (o->frame==3) sound(SND_DOOR); } if (++o->timer > 100) { o->state = 20; sound(SND_DOOR); SmokeClouds(o, 4, 16, 16); } break; case 20: o->frame = 4; break; case 21: // got smushed! o->state = 22; o->frame = 5; sound(SND_ENEMY_HURT); break; case 22: break; case 100: // "baby" malcos waking up during credits { o->state = 101; o->frame = 3; o->animtimer = 0; } case 101: { ANIMATE(4, 3, 4); } break; case 110: // the one that blows up { SmokeClouds(o, 16, 4, 4); o->Delete(); } break; } } void ai_malco_broken(Object *o) { switch(o->state) { case 10: // set when pulled out of ground sound(SND_BLOCK_DESTROY); SmokeClouds(o, 4, 16, 16); o->state = 0; break; case 0: { o->frame = 0; randblink(o, 1, 8, 50); if (game.mode != GM_CREDITS) FACEPLAYER; } break; } } ================================================ FILE: ai/weed/weed.fdh ================================================ //hash:55189a91 //automatically generated by Makegen /* located in game.cpp */ //-----------------[referenced from ai/weed/weed.cpp]----------------// void quake(int quaketime, int snd); /* located in caret.cpp */ //-----------------[referenced from ai/weed/weed.cpp]----------------// Caret *effect(int x, int y, int effectno); /* located in ai/ai.cpp */ //-----------------[referenced from ai/weed/weed.cpp]----------------// Object *SpawnObjectAtActionPoint(Object *o, int otype); void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in ai/weed/weed.cpp */ //-----------------[referenced from ai/weed/weed.cpp]----------------// void ai_critter(Object *o); void ai_bat_hang(Object *o); void ai_bat_circle(Object *o); void ai_jelly(Object *o); void ai_giant_jelly(Object *o); void ai_mannan(Object *o); void ai_mannan_shot(Object *o); void ai_frog(Object *o); void ai_hey_spawner(Object *o); void ai_motorbike(Object *o); void ai_malco(Object *o); void ai_malco_broken(Object *o); /* located in ai/sym/smoke.cpp */ //-----------------[referenced from ai/weed/weed.cpp]----------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //-----------------[referenced from ai/weed/weed.cpp]----------------// void sound(int snd); /* located in common/misc.cpp */ //-----------------[referenced from ai/weed/weed.cpp]----------------// int random(int min, int max); ================================================ FILE: autogen/AssignSprites.cpp ================================================ //hash: 2eeb494c //auto-generated by sifedit Tue 06 2010 07:14:33PM #include "asdefs.h" #include "sprites.h" void AssignSprites(void) { ASSIGN_SPRITE(OBJ_NULL, SPR_NULL); ASSIGN_SPRITE(OBJ_TABLECHAIRS, SPR_TABLECHAIRS); ASSIGN_SPRITE(OBJ_SIGNPOST, SPR_SIGNPOST); ASSIGN_SPRITE(OBJ_POT, SPR_POT); ASSIGN_SPRITE(OBJ_BED, SPR_BED); ASSIGN_SPRITE(OBJ_RED_PETALS, SPR_RED_PETALS); ASSIGN_SPRITE(OBJ_DOOR, SPR_DOOR); ASSIGN_SPRITE(OBJ_DOOR_BUSTED, SPR_DOOR_BUSTED); ASSIGN_SPRITE(OBJ_SAVE_SIGN, SPR_SAVE_SIGN); ASSIGN_SPRITE(OBJ_SAVE_POINT, SPR_SAVE_POINT); ASSIGN_SPRITE(OBJ_RECHARGE, SPR_RECHARGE); ASSIGN_SPRITE(OBJ_SMOKE_CLOUD, SPR_SMOKE_CLOUD); ASSIGN_SPRITE(OBJ_FIREPLACE, SPR_FIREPLACE); ASSIGN_SPRITE(OBJ_CHEST_CLOSED, SPR_CHEST_CLOSED); ASSIGN_SPRITE(OBJ_CHEST_OPEN, SPR_CHEST_OPEN); ASSIGN_SPRITE(OBJ_LIFE_CAPSULE, SPR_LIFE_CAPSULE); ASSIGN_SPRITE(OBJ_XP_CAPSULE, SPR_XP_CAPSULE); ASSIGN_SPRITE(OBJ_LIGHTNING, SPR_LIGHTNING); ASSIGN_SPRITE(OBJ_TERMINAL, SPR_TERMINAL); ASSIGN_SPRITE(OBJ_TELEPORTER, SPR_TELEPORTER); ASSIGN_SPRITE(OBJ_TELEPORTER_LIGHTS, SPR_TELEPORTER_LIGHTS); ASSIGN_SPRITE(OBJ_WATER_DROPLET, SPR_WATER_DROPLET); ASSIGN_SPRITE(OBJ_LAVA_DROPLET, SPR_LAVA_DROPLET); ASSIGN_SPRITE(OBJ_SPRINKLER, SPR_SPRINKLER); ASSIGN_SPRITE(OBJ_LARGEDOOR, SPR_LARGEDOOR); ASSIGN_SPRITE(OBJ_LARGEDOOR_FRAME, SPR_LARGEDOOR_FRAME); ASSIGN_SPRITE(OBJ_PRESS, SPR_PRESS); ASSIGN_SPRITE(OBJ_HIDDEN_SPARKLE, SPR_HIDDEN_SPARKLE); ASSIGN_SPRITE(OBJ_BIG_SPIKE, SPR_BIG_SPIKE); ASSIGN_SPRITE(OBJ_SPIKE_SMALL, SPR_SPIKE_SMALL); ASSIGN_SPRITE(OBJ_COMPUTER, SPR_COMPUTER); ASSIGN_SPRITE(OBJ_CHALKBOARD, SPR_CHALKBOARD); ASSIGN_SPRITE(OBJ_GRATE, SPR_GRATE); ASSIGN_SPRITE(OBJ_HEART, SPR_HEART); ASSIGN_SPRITE(OBJ_MISSILE, SPR_MISSILE); ASSIGN_SPRITE(OBJ_HEART3, SPR_HEART3); ASSIGN_SPRITE(OBJ_MISSILE3, SPR_MISSILE3); ASSIGN_SPRITE(OBJ_HIDDEN_POWERUP, SPR_HIDDEN_POWERUP); ASSIGN_SPRITE(OBJ_CURLY, SPR_CURLY); ASSIGN_SPRITE(OBJ_BALROG, SPR_BALROG); ASSIGN_SPRITE(OBJ_JENKA, SPR_JENKA); ASSIGN_SPRITE(OBJ_JENKA_COLLAPSED, SPR_JENKA_COLLAPSED); ASSIGN_SPRITE(OBJ_DOCTOR, SPR_DOCTOR); ASSIGN_SPRITE(OBJ_SUE, SPR_SUE); ASSIGN_SPRITE(OBJ_TOROKO, SPR_TOROKO); ASSIGN_SPRITE(OBJ_KING, SPR_KING); ASSIGN_SPRITE(OBJ_KINGS_SWORD, SPR_KINGS_SWORD); ASSIGN_SPRITE(OBJ_BLUE_ROBOT, SPR_BLUE_ROBOT); ASSIGN_SPRITE(OBJ_CHTHULU, SPR_CHTHULU); ASSIGN_SPRITE(OBJ_KAZUMA, SPR_KAZUMA); ASSIGN_SPRITE(OBJ_PROFESSOR_BOOSTER, SPR_PROFESSOR_BOOSTER); ASSIGN_SPRITE(OBJ_BEETLE_BROWN, SPR_BEETLE_BROWN); ASSIGN_SPRITE(OBJ_CURLY_BOSS, SPR_CURLY_BOSS); ASSIGN_SPRITE(OBJ_POLISH, SPR_POLISH); ASSIGN_SPRITE(OBJ_POLISHBABY, SPR_POLISHBABY); ASSIGN_SPRITE(OBJ_SANDCROC, SPR_SANDCROC); ASSIGN_SPRITE(OBJ_SUNSTONE, SPR_SUNSTONE); ASSIGN_SPRITE(OBJ_SKULLHEAD, SPR_SKULLHEAD); ASSIGN_SPRITE(OBJ_SKULLSTEP, SPR_SKULLSTEP); ASSIGN_SPRITE(OBJ_SKULLSTEP_FOOT, SPR_SKULLSTEP_FOOT); ASSIGN_SPRITE(OBJ_SKELETON, SPR_SKELETON); ASSIGN_SPRITE(OBJ_SKELETON_SHOT, SPR_SKELETON_SHOT); ASSIGN_SPRITE(OBJ_ARMADILLO, SPR_ARMADILLO); ASSIGN_SPRITE(OBJ_CROW, SPR_CROW); ASSIGN_SPRITE(OBJ_TOROKO_FRENZIED, SPR_TOROKO_FRENZIED); ASSIGN_SPRITE(OBJ_TOROKO_FLOWER, SPR_TOROKO_FLOWER); ASSIGN_SPRITE(OBJ_TOROKO_BLOCK, SPR_TOROKO_BLOCK); ASSIGN_SPRITE(OBJ_POWER_CRITTER, SPR_POWER_CRITTER); ASSIGN_SPRITE(OBJ_JELLY, SPR_JELLY); ASSIGN_SPRITE(OBJ_GIANT_JELLY, SPR_GIANT_JELLY); ASSIGN_SPRITE(OBJ_SANTA, SPR_SANTA); ASSIGN_SPRITE(OBJ_SANTAS_KEY, SPR_SANTAS_KEY); ASSIGN_SPRITE(OBJ_CHACO, SPR_CHACO); ASSIGN_SPRITE(OBJ_MANNAN, SPR_MANNAN); ASSIGN_SPRITE(OBJ_MANNAN_SHOT, SPR_MANNAN_SHOT); ASSIGN_SPRITE(OBJ_FAN_LEFT, SPR_FAN_LEFT); ASSIGN_SPRITE(OBJ_FAN_UP, SPR_FAN_UP); ASSIGN_SPRITE(OBJ_FAN_RIGHT, SPR_FAN_RIGHT); ASSIGN_SPRITE(OBJ_FAN_DOWN, SPR_FAN_DOWN); ASSIGN_SPRITE(OBJ_HEY, SPR_HEY); ASSIGN_SPRITE(OBJ_MOTORBIKE, SPR_MOTORBIKE); ASSIGN_SPRITE(OBJ_MOTORBIKE_BROKEN, SPR_MOTORBIKE_BROKEN); ASSIGN_SPRITE(OBJ_POWERCOMP, SPR_POWERCOMP); ASSIGN_SPRITE(OBJ_POWERSINE, SPR_POWERSINE); ASSIGN_SPRITE(OBJ_MALCO, SPR_MALCO); ASSIGN_SPRITE(OBJ_MALCO_BROKEN, SPR_MALCO_BROKEN); ASSIGN_SPRITE(OBJ_BALROG_SHOT_BOUNCE, SPR_BALROG_SHOT_BOUNCE); ASSIGN_SPRITE(OBJ_FRENZIED_MIMIGA, SPR_FRENZIED_MIMIGA); ASSIGN_SPRITE(OBJ_FROG, SPR_FROG); ASSIGN_SPRITE(OBJ_MINIFROG, SPR_MINIFROG); ASSIGN_SPRITE(OBJ_BALFROG, SPR_BALFROG); ASSIGN_SPRITE(OBJ_BALFROG_SHOT, SPR_BALFROG_SHOT); ASSIGN_SPRITE(OBJ_CRITTER_SHOOTING_PURPLE, SPR_CRITTER_SHOOTING_PURPLE); ASSIGN_SPRITE(OBJ_CRITTER_SHOT, SPR_CRITTER_SHOT); ASSIGN_SPRITE(OBJ_FIREWHIRR, SPR_FIREWHIRR); ASSIGN_SPRITE(OBJ_FIREWHIRR_SHOT, SPR_FIREWHIRR_SHOT); ASSIGN_SPRITE(OBJ_GAUDI_EGG, SPR_GAUDI_EGG); ASSIGN_SPRITE(OBJ_GRATING, SPR_GRATING); ASSIGN_SPRITE(OBJ_SHUTTER, SPR_SHUTTER); ASSIGN_SPRITE(OBJ_SHUTTER_BIG, SPR_SHUTTER_BIG); ASSIGN_SPRITE(OBJ_SHUTTER_STUCK, SPR_SHUTTER_STUCK); ASSIGN_SPRITE(OBJ_ALMOND_LIFT, SPR_ALMOND_LIFT); ASSIGN_SPRITE(OBJ_ALMOND_ROBOT, SPR_ALMOND_ROBOT); ASSIGN_SPRITE(OBJ_CORE_FRONT, SPR_CORE_FRONT); ASSIGN_SPRITE(OBJ_CORE_BACK, SPR_CORE_BACK); ASSIGN_SPRITE(OBJ_MINICORE, SPR_MINICORE); ASSIGN_SPRITE(OBJ_MINICORE_SHOT, SPR_MINICORE_SHOT); ASSIGN_SPRITE(OBJ_CORE_GHOSTIE, SPR_CORE_GHOSTIE); ASSIGN_SPRITE(OBJ_CORE_BLAST, SPR_CORE_BLAST); ASSIGN_SPRITE(OBJ_MOTION_WALL, SPR_MOTION_WALL); ASSIGN_SPRITE(OBJ_IRONH, SPR_IRONH); ASSIGN_SPRITE(OBJ_IRONH_FISHY, SPR_IRONH_FISHY); ASSIGN_SPRITE(OBJ_IRONH_SHOT, SPR_IRONH_SHOT); ASSIGN_SPRITE(OBJ_IRONH_BRICK, SPR_IRONH_BRICK); ASSIGN_SPRITE(OBJ_IKACHAN, SPR_IKACHAN); ASSIGN_SPRITE(OBJ_CURLY_COLLAPSED, SPR_CURLY_COLLAPSED); ASSIGN_SPRITE(OBJ_SANDCROC_OSIDE, SPR_SANDCROC_OSIDE); ASSIGN_SPRITE(OBJ_HOPPY, SPR_HOPPY); ASSIGN_SPRITE(OBJ_CHINFISH, SPR_CHINFISH); ASSIGN_SPRITE(OBJ_KANPACHI_FISHING, SPR_KANPACHI_FISHING); ASSIGN_SPRITE(OBJ_FLOWERS_PENS1, SPR_FLOWERS_PENS1); ASSIGN_SPRITE(OBJ_JACK, SPR_JACK); ASSIGN_SPRITE(OBJ_MAHIN, SPR_MAHIN); ASSIGN_SPRITE(OBJ_YAMASHITA_FLOWERS, SPR_YAMASHITA_FLOWERS); ASSIGN_SPRITE(OBJ_YAMASHITA_PAVILION, SPR_YAMASHITA_PAVILION); ASSIGN_SPRITE(OBJ_TOROKO_SHACK, SPR_TOROKO_SHACK); ASSIGN_SPRITE(OBJ_MISERYS_BUBBLE, SPR_MISERYS_BUBBLE); ASSIGN_SPRITE(OBJ_MUSHROOM_ENEMY, SPR_MUSHROOM_ENEMY); ASSIGN_SPRITE(OBJ_GIANT_MUSHROOM_ENEMY, SPR_GIANT_MUSHROOM_ENEMY); ASSIGN_SPRITE(OBJ_GRAVEKEEPER, SPR_GRAVEKEEPER); ASSIGN_SPRITE(OBJ_CAGE, SPR_CAGE); ASSIGN_SPRITE(OBJ_CRITTER_HOPPING_GREEN, SPR_CRITTER_HOPPING_GREEN); ASSIGN_SPRITE(OBJ_CRITTER_HOPPING_BLUE, SPR_CRITTER_HOPPING_BLUE); ASSIGN_SPRITE(OBJ_CRITTER_HOPPING_AQUA, SPR_CRITTER_HOPPING_AQUA); ASSIGN_SPRITE(OBJ_BAT_BLUE, SPR_BAT_BLUE); ASSIGN_SPRITE(OBJ_DOOR_ENEMY, SPR_DOOR_ENEMY); ASSIGN_SPRITE(OBJ_HERMIT_GUNSMITH, SPR_HERMIT_GUNSMITH); ASSIGN_SPRITE(OBJ_KAZUMA_AT_COMPUTER, SPR_KAZUMA_AT_COMPUTER); ASSIGN_SPRITE(OBJ_SUE_AT_COMPUTER, SPR_SUE_AT_COMPUTER); ASSIGN_SPRITE(OBJ_BASIL, SPR_BASIL); ASSIGN_SPRITE(OBJ_BEHEMOTH, SPR_BEHEMOTH); ASSIGN_SPRITE(OBJ_BEETLE_GREEN, SPR_BEETLE_GREEN); ASSIGN_SPRITE(OBJ_BEETLE_FREEFLY, SPR_BEETLE_FREEFLY); ASSIGN_SPRITE(OBJ_GIANT_BEETLE, SPR_GIANT_BEETLE); ASSIGN_SPRITE(OBJ_GIANT_BEETLE_SHOT, SPR_GIANT_BEETLE_SHOT); ASSIGN_SPRITE(OBJ_FORCEFIELD, SPR_FORCEFIELD); ASSIGN_SPRITE(OBJ_EGG_ELEVATOR, SPR_EGG_ELEVATOR); ASSIGN_SPRITE(OBJ_IGOR_SHOT, SPR_IGOR_SHOT); ASSIGN_SPRITE(OBJ_BEETLE_FREEFLY_2, SPR_BEETLE_FREEFLY_2); ASSIGN_SPRITE(OBJ_GIANT_BEETLE_2, SPR_GIANT_BEETLE_2); ASSIGN_SPRITE(OBJ_BLADE_SLASH, SPR_BLADE_SLASH); ASSIGN_SPRITE(OBJ_BLUE_ROBOT_SITTING, SPR_BLUE_ROBOT_SITTING); ASSIGN_SPRITE(OBJ_BLUE_ROBOT_REMAINS, SPR_BLUE_ROBOT_REMAINS); ASSIGN_SPRITE(OBJ_X_BODY, SPR_X_BODY); ASSIGN_SPRITE(OBJ_X_INTERNALS, SPR_X_INTERNALS); ASSIGN_SPRITE(OBJ_X_DOOR, SPR_X_DOOR); ASSIGN_SPRITE(OBJ_X_FISHY_MISSILE, SPR_X_FISHY_MISSILE); ASSIGN_SPRITE(OBJ_X_DEFEATED, SPR_X_DEFEATED); ASSIGN_SPRITE(OBJ_GAUDI_FLYING_SHOT, SPR_GAUDI_FLYING_SHOT); ASSIGN_SPRITE(OBJ_GAUDI, SPR_GAUDI); ASSIGN_SPRITE(OBJ_GAUDI_DYING, SPR_GAUDI_DYING); ASSIGN_SPRITE(OBJ_GAUDI_FLYING, SPR_GAUDI_FLYING); ASSIGN_SPRITE(OBJ_GAUDI_ARMORED, SPR_GAUDI_ARMORED); ASSIGN_SPRITE(OBJ_GAUDI_ARMORED_SHOT, SPR_GAUDI_ARMORED_SHOT); ASSIGN_SPRITE(OBJ_GAUDI_SHOPKEEP, SPR_GAUDI_SHOPKEEP); ASSIGN_SPRITE(OBJ_DR_GERO, SPR_DR_GERO); ASSIGN_SPRITE(OBJ_NURSE_HASUMI, SPR_NURSE_HASUMI); ASSIGN_SPRITE(OBJ_POOH_BLACK, SPR_POOH_BLACK); ASSIGN_SPRITE(OBJ_POOH_BLACK_BUBBLE, SPR_POOH_BLACK_BUBBLE); ASSIGN_SPRITE(OBJ_BOULDER, SPR_BOULDER); ASSIGN_SPRITE(OBJ_STRAINING, SPR_STRAINING); ASSIGN_SPRITE(OBJ_BALROG_MISSILE, SPR_BALROG_MISSILE); ASSIGN_SPRITE(OBJ_FUZZ_CORE, SPR_FUZZ_CORE); ASSIGN_SPRITE(OBJ_FUZZ, SPR_FUZZ); ASSIGN_SPRITE(OBJ_BUYOBUYO_BASE, SPR_BUYOBUYO_BASE); ASSIGN_SPRITE(OBJ_BUYOBUYO, SPR_BUYOBUYO); ASSIGN_SPRITE(OBJ_DRAGON_ZOMBIE, SPR_DRAGON_ZOMBIE); ASSIGN_SPRITE(OBJ_DRAGON_ZOMBIE_DEAD, SPR_DRAGON_ZOMBIE_DEAD); ASSIGN_SPRITE(OBJ_DRAGON_ZOMBIE_SHOT, SPR_DRAGON_ZOMBIE_SHOT); ASSIGN_SPRITE(OBJ_FALLING_SPIKE_SMALL, SPR_FALLING_SPIKE_SMALL); ASSIGN_SPRITE(OBJ_FALLING_SPIKE_LARGE, SPR_FALLING_SPIKE_LARGE); ASSIGN_SPRITE(OBJ_COUNTER_BOMB, SPR_COUNTER_BOMB); ASSIGN_SPRITE(OBJ_COUNTER_BOMB_NUMBER, SPR_COUNTER_BOMB_NUMBER); ASSIGN_SPRITE(OBJ_SISTERS_BODY, SPR_SISTERS_BODY); ASSIGN_SPRITE(OBJ_SKY_DRAGON, SPR_SKY_DRAGON); ASSIGN_SPRITE(OBJ_NIGHT_SPIRIT, SPR_NIGHT_SPIRIT); ASSIGN_SPRITE(OBJ_NIGHT_SPIRIT_SHOT, SPR_NIGHT_SPIRIT_SHOT); ASSIGN_SPRITE(OBJ_PIXEL_CAT, SPR_PIXEL_CAT); ASSIGN_SPRITE(OBJ_ITOH, SPR_ITOH); ASSIGN_SPRITE(OBJ_MOMORIN, SPR_MOMORIN); ASSIGN_SPRITE(OBJ_ORANGEBELL, SPR_ORANGEBELL); ASSIGN_SPRITE(OBJ_ORANGEBELL_BABY, SPR_ORANGEBELL_BABY); ASSIGN_SPRITE(OBJ_STUMPY, SPR_STUMPY); ASSIGN_SPRITE(OBJ_GUNFISH, SPR_GUNFISH); ASSIGN_SPRITE(OBJ_GUNFISH_SHOT, SPR_GUNFISH_SHOT); ASSIGN_SPRITE(OBJ_MIDORIN, SPR_MIDORIN); ASSIGN_SPRITE(OBJ_DROLL, SPR_DROLL); ASSIGN_SPRITE(OBJ_DROLL_SHOT, SPR_DROLL_SHOT); ASSIGN_SPRITE(OBJ_RED_FLOWERS_SPROUTS, SPR_RED_FLOWERS_SPROUTS); ASSIGN_SPRITE(OBJ_RED_FLOWERS_BLOOMING, SPR_RED_FLOWERS_BLOOMING); ASSIGN_SPRITE(OBJ_CHIE, SPR_CHIE); ASSIGN_SPRITE(OBJ_MEGANE, SPR_MEGANE); ASSIGN_SPRITE(OBJ_MIMIGA_SLEEPING, SPR_MIMIGA_SLEEPING); ASSIGN_SPRITE(OBJ_KANPACHI_STANDING, SPR_KANPACHI_STANDING); ASSIGN_SPRITE(OBJ_BUCKET, SPR_BUCKET); ASSIGN_SPRITE(OBJ_JAIL_GRATING, SPR_JAIL_GRATING); ASSIGN_SPRITE(OBJ_MIMIGA_JAILED, SPR_MIMIGA_JAILED); ASSIGN_SPRITE(OBJ_ROCKET, SPR_ROCKET); ASSIGN_SPRITE(OBJ_PROXIMITY_PRESS_HOZ, SPR_PROXIMITY_PRESS_HOZ); ASSIGN_SPRITE(OBJ_MA_PIGNON, SPR_MA_PIGNON); ASSIGN_SPRITE(OBJ_MA_PIGNON_ROCK, SPR_MA_PIGNON_ROCK); ASSIGN_SPRITE(OBJ_CRITTER_HOPPING_RED, SPR_CRITTER_HOPPING_RED); ASSIGN_SPRITE(OBJ_LAVA_DRIP, SPR_LAVA_DRIP); ASSIGN_SPRITE(OBJ_RED_BAT, SPR_RED_BAT); ASSIGN_SPRITE(OBJ_RED_DEMON, SPR_RED_DEMON); ASSIGN_SPRITE(OBJ_RED_DEMON_SHOT, SPR_RED_DEMON_SHOT); ASSIGN_SPRITE(OBJ_PROXIMITY_PRESS_VERT, SPR_PROXIMITY_PRESS_VERT); ASSIGN_SPRITE(OBJ_BOSS_MISERY, SPR_BOSS_MISERY); ASSIGN_SPRITE(OBJ_MISERY_RING, SPR_MISERY_RING); ASSIGN_SPRITE(OBJ_MISERY_SHOT, SPR_MISERY_SHOT); ASSIGN_SPRITE(OBJ_MISERY_BALL, SPR_MISERY_BALL); ASSIGN_SPRITE(OBJ_BLACK_LIGHTNING, SPR_BLACK_LIGHTNING); ASSIGN_SPRITE(OBJ_MISERY_PHASE, SPR_MISERY_PHASE); ASSIGN_SPRITE(OBJ_HELICOPTER, SPR_HELICOPTER); ASSIGN_SPRITE(OBJ_MIMIGA_CAGED, SPR_MIMIGA_CAGED); ASSIGN_SPRITE(OBJ_DOCTOR_CROWNED, SPR_DOCTOR_CROWNED); ASSIGN_SPRITE(OBJ_RED_CRYSTAL, SPR_RED_CRYSTAL); ASSIGN_SPRITE(OBJ_BOSS_DOCTOR, SPR_BOSS_DOCTOR); ASSIGN_SPRITE(OBJ_DOCTOR_SHOT, SPR_DOCTOR_SHOT); ASSIGN_SPRITE(OBJ_DOCTOR_BLAST, SPR_DOCTOR_BLAST); ASSIGN_SPRITE(OBJ_BOSS_DOCTOR_FRENZIED, SPR_BOSS_DOCTOR_FRENZIED); ASSIGN_SPRITE(OBJ_RED_ENERGY, SPR_RED_ENERGY); ASSIGN_SPRITE(OBJ_DOCTOR_BAT, SPR_DOCTOR_BAT); ASSIGN_SPRITE(OBJ_SUE_FRENZIED, SPR_SUE_FRENZIED); ASSIGN_SPRITE(OBJ_MISERY_FRENZIED, SPR_MISERY_FRENZIED); ASSIGN_SPRITE(OBJ_MISERY_CRITTER, SPR_MISERY_CRITTER); ASSIGN_SPRITE(OBJ_MISERY_MISSILE, SPR_MISERY_MISSILE); ASSIGN_SPRITE(OBJ_UD_BLAST, SPR_UD_BLAST); ASSIGN_SPRITE(OBJ_UD_PELLET, SPR_UD_PELLET); ASSIGN_SPRITE(OBJ_UD_SMOKE, SPR_UD_SMOKE); ASSIGN_SPRITE(OBJ_UD_SPINNER, SPR_UD_SPINNER); ASSIGN_SPRITE(OBJ_UD_SPINNER_TRAIL, SPR_UD_SPINNER_TRAIL); ASSIGN_SPRITE(OBJ_UDMINI_PLATFORM, SPR_UDMINI_PLATFORM); ASSIGN_SPRITE(OBJ_BALROG_FLYING, SPR_BALROG_FLYING); ASSIGN_SPRITE(OBJ_BALROG_MEDIC, SPR_BALROG_MEDIC); ASSIGN_SPRITE(OBJ_GAUDI_PATIENT, SPR_GAUDI_PATIENT); ASSIGN_SPRITE(OBJ_BABY_PUPPY, SPR_BABY_PUPPY); ASSIGN_SPRITE(OBJ_TRANSMOGRIFIER, SPR_TRANSMOGRIFIER); ASSIGN_SPRITE(OBJ_TURNING_HUMAN, SPR_TURNING_HUMAN); ASSIGN_SPRITE(OBJ_BUILDING_FAN, SPR_BUILDING_FAN); ASSIGN_SPRITE(OBJ_MISERY_WIND, SPR_MISERY_WIND); ASSIGN_SPRITE(OBJ_AHCHOO, SPR_AHCHOO); ASSIGN_SPRITE(OBJ_THANK_YOU, SPR_THANK_YOU); ASSIGN_SPRITE(OBJ_LITTLE_FAMILY, SPR_LITTLE_FAMILY); ASSIGN_SPRITE(OBJ_BUBBLER_SHARP, SPR_BUBBLER_SHARP); ASSIGN_SPRITE(OBJ_BUTE_FLYING, SPR_BUTE_FLYING); ASSIGN_SPRITE(OBJ_BUTE_DYING, SPR_BUTE_DYING); ASSIGN_SPRITE(OBJ_BUTE_FALLING, SPR_BUTE_FALLING); ASSIGN_SPRITE(OBJ_BUTE_SWORD, SPR_BUTE_SWORD); ASSIGN_SPRITE(OBJ_BUTE_ARCHER, SPR_BUTE_ARCHER); ASSIGN_SPRITE(OBJ_MESA, SPR_MESA); ASSIGN_SPRITE(OBJ_MESA_BLOCK, SPR_MESA_BLOCK); ASSIGN_SPRITE(OBJ_MESA_DYING, SPR_MESA_DYING); ASSIGN_SPRITE(OBJ_DELEET, SPR_DELEET); ASSIGN_SPRITE(OBJ_ROLLING, SPR_ROLLING); ASSIGN_SPRITE(OBJ_HEAVY_PRESS, SPR_HEAVY_PRESS); ASSIGN_SPRITE(OBJ_HP_LIGHTNING, SPR_HP_LIGHTNING); ASSIGN_SPRITE(OBJ_STATUE, SPR_STATUE); ASSIGN_SPRITE(OBJ_NUMAHACHI, SPR_NUMAHACHI); ASSIGN_SPRITE(OBJ_PUPPY_GHOST, SPR_PUPPY_GHOST); ASSIGN_SPRITE(OBJ_CURLY_CARRIED_SHOOTING, SPR_CURLY_CARRIED_SHOOTING); ASSIGN_SPRITE(OBJ_BALLOS_PRIEST, SPR_BALLOS_PRIEST); ASSIGN_SPRITE(OBJ_BALLOS_SMILE, SPR_BALLOS_SMILE); ASSIGN_SPRITE(OBJ_BALLOS_TARGET, SPR_BALLOS_TARGET); ASSIGN_SPRITE(OBJ_BALLOS_BONE_SPAWNER, SPR_BALLOS_BONE_SPAWNER); ASSIGN_SPRITE(OBJ_BALLOS_BONE, SPR_BALLOS_BONE); ASSIGN_SPRITE(OBJ_BALLOS_MAIN, SPR_BALLOS_MAIN); ASSIGN_SPRITE(OBJ_BALLOS_BODY, SPR_BALLOS_BODY); ASSIGN_SPRITE(OBJ_BALLOS_EYE, SPR_BALLOS_EYE); ASSIGN_SPRITE(OBJ_BALLOS_ROTATOR, SPR_BALLOS_ROTATOR); ASSIGN_SPRITE(OBJ_BALLOS_SKULL, SPR_BALLOS_SKULL); ASSIGN_SPRITE(OBJ_BALLOS_SPIKES, SPR_BALLOS_SPIKES); ASSIGN_SPRITE(OBJ_BALLOS_PLATFORM, SPR_BALLOS_PLATFORM); ASSIGN_SPRITE(OBJ_GREEN_DEVIL, SPR_GREEN_DEVIL); ASSIGN_SPRITE(OBJ_BUTE_SWORD_RED, SPR_BUTE_SWORD_RED); ASSIGN_SPRITE(OBJ_BUTE_ARCHER_RED, SPR_BUTE_ARCHER_RED); ASSIGN_SPRITE(OBJ_CCS_GUN, SPR_CCS_GUN); ASSIGN_SPRITE(OBJ_WHIMSICAL_STAR, SPR_WHIMSICAL_STAR); ASSIGN_SPRITE(OBJ_INTRO_KINGS, SPR_INTRO_KINGS); ASSIGN_SPRITE(OBJ_INTRO_CROWN, SPR_INTRO_CROWN); ASSIGN_SPRITE(OBJ_INTRO_DOCTOR, SPR_INTRO_DOCTOR); } ================================================ FILE: autogen/AssignSprites.fdh ================================================ //hash:fc79b590 //automatically generated by Makegen /* located in autogen/AssignSprites.cpp */ //-------------[referenced from autogen/AssignSprites.cpp]-----------// void AssignSprites(void); ================================================ FILE: autogen/asdefs.h ================================================ // this is a small file that tells AssignSprites.cpp how to do it's job, // like glue that links it with the rest of the project in a project-independent way. #include "../nx.h" #define ASSIGN_SPRITE(OBJECT, SPRITE) \ objprop[OBJECT].sprite = SPRITE; ================================================ FILE: autogen/objnames.cpp ================================================ // auto-generated by genobjnametable.cpp #include const char *object_names[] = { NULL, "XP", "BEHEMOTH", NULL, "SMOKE_CLOUD", "CRITTER_HOPPING_GREEN", "BEETLE_GREEN", "BASIL", "BEETLE_FREEFLY", "BALROG_DROP_IN", NULL, "IGOR_SHOT", "BALROG", "FORCEFIELD", "SANTAS_KEY", "CHEST_CLOSED", "SAVE_POINT", "RECHARGE", "DOOR", "BALROG_BUST_IN", "COMPUTER", "CHEST_OPEN", "TELEPORTER", "TELEPORTER_LIGHTS", "POWER_CRITTER", "EGG_ELEVATOR", "BAT_CIRCLE", "BIG_SPIKE", "CRITTER_FLYING", "CHTHULU", "HERMIT_GUNSMITH", "BAT_HANG", "LIFE_CAPSULE", "BALROG_SHOT_BOUNCE", "BED", "MANNAN", "BALROG_BOSS_FLYING", "SIGNPOST", "FIREPLACE", "SAVE_SIGN", "SANTA", "DOOR_BUSTED", "SUE", "CHALKBOARD", "POLISH", "POLISHBABY", "HVTRIGGER", "SANDCROC", NULL, "SKULLHEAD", "SKELETON_SHOT", "CROWWITHSKULL", "BLUE_ROBOT_SITTING", "SKULLSTEP_FOOT", "SKULLSTEP", "KAZUMA", "BEETLE_BROWN", "CROW", "GIANT_BEETLE", "DOOR_ENEMY", "TOROKO", "KING", "KAZUMA_AT_COMPUTER", "TOROKO_SHACK", "CRITTER_HOPPING_BLUE", "BAT_BLUE", "MISERYS_BUBBLE", "MISERY_FLOAT", "BALROG_BOSS_RUNNING", "MUSHROOM_ENEMY", "HIDDEN_SPARKLE", "CHINFISH", "SPRINKLER", "WATER_DROPLET", "JACK", "KANPACHI_FISHING", "YAMASHITA_FLOWERS", "YAMASHITA_PAVILION", "POT", "MAHIN", "GRAVEKEEPER", "GIANT_MUSHROOM_ENEMY", "MISERY_STAND", "NPC_IGOR", "GIANT_BEETLE_SHOT", "TERMINAL", "MISSILE", "HEART", "BOSS_IGOR", "BOSS_IGOR_DEFEATED", NULL, "CAGE", "SUE_AT_COMPUTER", "CHACO", "GIANT_JELLY", "JELLY", "FAN_LEFT", "FAN_UP", "FAN_RIGHT", "FAN_DOWN", "GRATE", "POWERCOMP", "POWERSINE", "MANNAN_SHOT", "FROG", "HEY", "HEY_SPAWNER", "MALCO", "BALFROG_SHOT", "MALCO_BROKEN", "MINIFROG", "PTELOUT", "PTELIN", "PROFESSOR_BOOSTER", "PRESS", "FRENZIED_MIMIGA", "RED_PETALS", "CURLY", "CURLY_BOSS", "TABLECHAIRS", "MIMIGAC1", "MIMIGAC2", "MIMIGAC_ENEMY", "CURLYBOSS_SHOT", "SUNSTONE", "HIDDEN_POWERUP", "PUPPY_RUN", NULL, NULL, NULL, "PUPPY_WAG", "PUPPY_SLEEP", "PUPPY_BARK", "JENKA", "ARMADILLO", "SKELETON", "PUPPY_CARRY", "LARGEDOOR_FRAME", "LARGEDOOR", "DOCTOR", "TOROKO_FRENZIED", "TOROKO_BLOCK", "TOROKO_FLOWER", "JENKA_COLLAPSED", "TOROKO_TELEPORT_IN", "KINGS_SWORD", "LIGHTNING", "CRITTER_SHOOTING_PURPLE", "CRITTER_SHOT", "BLOCK_MOVEH", "NPC_PLAYER", "BLUE_ROBOT", "SHUTTER_STUCK", "GAUDI", "GAUDI_DYING", "GAUDI_FLYING", "GAUDI_FLYING_SHOT", "BLOCK_MOVEV", "X_FISHY_MISSILE", "X_DEFEATED", "POOH_BLACK", "POOH_BLACK_BUBBLE", "POOH_BLACK_DYING", "DR_GERO", "NURSE_HASUMI", "CURLY_COLLAPSED", "GAUDI_SHOPKEEP", "BOOSTER_FALLING", "BOULDER", "BALROG_BOSS_MISSILES", "BALROG_MISSILE", "FIREWHIRR", "FIREWHIRR_SHOT", "GAUDI_ARMORED", "GAUDI_ARMORED_SHOT", "GAUDI_EGG", "BUYOBUYO_BASE", "BUYOBUYO", "MINICORE_SHOT", "CORE_GHOSTIE", "CURLY_AI", "CAI_GUN", "CAI_MGUN", "CAI_WATERSHIELD", "SHUTTER_BIG", "SHUTTER", "ALMOND_LIFT", "FUZZ_CORE", "FUZZ", NULL, "ALMOND_ROBOT", "WATERLEVEL", "MOTORBIKE", "MOTORBIKE_BROKEN", "BLUE_ROBOT_REMAINS", "GRATING", "MOTION_WALL", "IRONH_FISHY", "IRONH_SHOT", "FAN_DROPLET", "DRAGON_ZOMBIE", "DRAGON_ZOMBIE_DEAD", "DRAGON_ZOMBIE_SHOT", "CRITTER_HOPPING_AQUA", "FALLING_SPIKE_SMALL", "FALLING_SPIKE_LARGE", "COUNTER_BOMB", "COUNTER_BOMB_NUMBER", "GIANT_BEETLE_2", NULL, "BEETLE_FREEFLY_2", "SPIKE_SMALL", "SKY_DRAGON", "NIGHT_SPIRIT", "NIGHT_SPIRIT_SHOT", "SANDCROC_OSIDE", "PIXEL_CAT", "ITOH", "CORE_BLAST", "BUBBLE_SPAWNER", "MIMIGA_FARMER_STANDING", "MIMIGA_FARMER_WALKING", "JAIL_GRATING", "MOMORIN", "CHIE", "MEGANE", "KANPACHI_STANDING", "BUCKET", "DROLL_GUARD", "RED_FLOWERS_SPROUTS", "RED_FLOWERS_BLOOMING", "ROCKET", "ORANGEBELL", "ORANGEBELL_BABY", "FLOWERS_PENS1", "MIDORIN", "GUNFISH", "GUNFISH_SHOT", "PROXIMITY_PRESS_HOZ", "MIMIGA_CAGE", "MIMIGA_JAILED", "CRITTER_HOPPING_RED", "RED_BAT", "RED_BAT_SPAWNER", "LAVA_DRIP", "LAVA_DRIP_SPAWNER", "PROXIMITY_PRESS_VERT", "BOSS_MISERY", "MISERY_SHOT", "MISERY_PHASE", "MISERY_BALL", "BLACK_LIGHTNING", "MISERY_RING", "XP_CAPSULE", "HELICOPTER", "HELICOPTER_BLADE", "DOCTOR_CROWNED", "RED_CRYSTAL", "MIMIGA_SLEEPING", "CURLY_CARRIED", "MIMIGA_CAGED", "CHIE_CAGED", "CHACO_CAGED", "BOSS_DOCTOR", "DOCTOR_SHOT", "DOCTOR_SHOT_TRAIL", "DOCTOR_BLAST", "BOSS_DOCTOR_FRENZIED", "IGOR_BALCONY", "DOCTOR_BAT", "RED_ENERGY", "IRONH_BRICK", "BRICK_SPAWNER", "DROLL_SHOT", "DROLL", "PUPPY_ITEMS", "RED_DEMON", "RED_DEMON_SHOT", "LITTLE_FAMILY", "FALLING_BLOCK", "SUE_TELEPORT_IN", "DOCTOR_GHOST", "UDMINI_PLATFORM", "MISERY_FRENZIED", "SUE_FRENZIED", "UD_SPINNER", "UD_SPINNER_TRAIL", "UD_SMOKE", "UD_PELLET", "MISERY_CRITTER", "MISERY_BAT", "UD_MINICORE_IDLE", "QUAKE", "UD_BLAST", "FALLING_BLOCK_SPAWNER", "CLOUD", "CLOUD_SPAWNER", NULL, "INTRO_DOCTOR", "INTRO_KINGS", "INTRO_CROWN", "MISERY_MISSILE", "SCROLL_CONTROLLER", NULL, "GAUDI_PATIENT", "BABY_PUPPY", "BALROG_MEDIC", "SANTA_CAGED", "STUMPY", "BUTE_FLYING", "BUTE_SWORD", "BUTE_ARCHER", "BUTE_ARROW", "MA_PIGNON", "MA_PIGNON_ROCK", "MA_PIGNON_CLONE", "BUTE_DYING", "MESA", "MESA_DYING", "MESA_BLOCK", "CURLY_CARRIED_SHOOTING", "CCS_GUN", "DELEET", "BUTE_FALLING", "BUTE_SPAWNER", "HP_LIGHTNING", "TURNING_HUMAN", "AHCHOO", "TRANSMOGRIFIER", "BUILDING_FAN", "ROLLING", "BALLOS_BONE", "BALLOS_BONE_SPAWNER", "BALLOS_TARGET", "STRAINING", "IKACHAN", "IKACHAN_SPAWNER", "NUMAHACHI", "GREEN_DEVIL", "GREEN_DEVIL_SPAWNER", "BALLOS_PRIEST", "BALLOS_SMILE", "BALLOS_ROTATOR", "BALLOS_BODY_2", "BALLOS_EYE_2", "BALLOS_SKULL", "BALLOS_PLATFORM", "HOPPY", "BALLOS_SPIKES", "STATUE_BASE", "BUTE_ARCHER_RED", "STATUE", "THE_CAST", "BUTE_SWORD_RED", "WALL_COLLAPSER", "BALROG_PASSENGER", "BALROG_FLYING", "PUPPY_GHOST", "MISERY_WIND", "DROPLET_SPAWNER", "THANK_YOU", NULL, NULL, "BALFROG", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "PLAYER", "HEART3", "MISSILE3", "LAVA_DROPLET", "SKULLHEAD_CARRIED", "BBOX_PUPPET", "SMOKE_DROPPER", NULL, NULL, NULL, "CORE_CONTROLLER", "CORE_FRONT", "CORE_BACK", "CORE_MARKER", "MINICORE", NULL, NULL, NULL, NULL, NULL, "POLAR_SHOT", "MGUN_SPAWNER", "MGUN_LEADER", "MGUN_TRAIL", "MGUN_L1_SHOT", "MISSILE_SHOT", "SUPERMISSILE_SHOT", "MISSILE_BOOM_SPAWNER", "FIREBALL1", "FIREBALL23", "FIREBALL_TRAIL", "BLADE12_SHOT", "BLADE3_SHOT", "BLADE_SLASH", "SNAKE1_SHOT", "SNAKE23_SHOT", "SNAKE_TRAIL", "NEMESIS_SHOT", "NEMESIS_SHOT_CURLY", "BUBBLER12_SHOT", "BUBBLER3_SHOT", "BUBBLER_SHARP", "SPUR_SHOT", "SPUR_TRAIL", "WHIMSICAL_STAR", NULL, NULL, NULL, NULL, "SHOTS_END", "OMEGA_BODY", "OMEGA_LEG", "OMEGA_STRUT", "OMEGA_SHOT", NULL, "IRONH", NULL, NULL, NULL, NULL, "X_MAINOBJECT", "X_BODY", "X_TREAD", "X_INTERNALS", "X_DOOR", "X_TARGET", "X_FISHY_SPAWNER", NULL, NULL, NULL, "SISTERS_HEAD", "SISTERS_BODY", "SISTERS_MAIN", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "UDCORE_MAIN", "UDCORE_FRONT", "UDCORE_BACK", "UDCORE_FACE", "UDMINI_ROTATOR", "UDMINI_BBOX", NULL, NULL, NULL, NULL, "HEAVY_PRESS", "HEAVY_PRESS_SHIELD", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "BALLOS_MAIN", "BALLOS_BODY", "BALLOS_EYE", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; ================================================ FILE: autogen/objnames.fdh ================================================ //hash:00000000 //automatically generated by Makegen ================================================ FILE: autogen/sprites.h ================================================ //hash: e3321826 //auto-generated by sifedit Tue 06 2010 05:35:38PM #define SPR_NULL 0 #define SPR_FADE_DIAMOND 1 #define SPR_FADE_CIRCLE 2 #define SPR_MYCHAR 3 #define SPR_MYCHAR_MIMIGA 4 #define SPR_BONKHEADPLUS 5 #define SPR_QMARK 6 #define SPR_PDROWNED 7 #define SPR_WATER_SHIELD 8 #define SPR_SHOT_FIREBALL1 9 #define SPR_WEAPONS_START 10 #define SPR_WEPSTART_VERT 11 #define SPR_SNAKEGUN 12 #define SPR_SNAKEGUNVERT 13 #define SPR_PSTAR 14 #define SPR_PSTAR_VERT 15 #define SPR_FIREBALLGUN 16 #define SPR_FIREBALLGUNVERT 17 #define SPR_MGUN 18 #define SPR_MGUN_VERT 19 #define SPR_MLAUNCHER 20 #define SPR_MLAUNCHER_VERT 21 #define SPR_SUPER_MLAUNCHER 22 #define SPR_SUPER_MLAUNCHER_VERT 23 #define SPR_BUBBLE_BURST 24 #define SPR_SHOT_POLARSTAR 25 #define SPR_SHOT_POLARSTARV 26 #define SPR_SHOT_POLARSTAR_L3 27 #define SPR_SHOT_POLARSTAR_L3V 28 #define SPR_SHOT_MGUN_L1 29 #define SPR_SHOT_MGUN_L1V 30 #define SPR_SHOT_MGUN_L2 31 #define SPR_SHOT_MGUN_L2V 32 #define SPR_SHOT_MGUN_L3LEAD 33 #define SPR_SHOT_MGUN_L3LEADV 34 #define SPR_SHOT_MGUN_L3TAIL 35 #define SPR_SHOT_MGUN_L3TAILV 36 #define SPR_SHOT_MISSILE1 37 #define SPR_SHOT_MISSILE1V 38 #define SPR_SHOT_MISSILE2 39 #define SPR_SHOT_MISSILE2V 40 #define SPR_SHOT_MISSILE3 41 #define SPR_SHOT_MISSILE3V 42 #define SPR_SHOT_SUPERMISSILE13 43 #define SPR_SHOT_SUPERMISSILE13_V 44 #define SPR_SHOT_SUPERMISSILE2 45 #define SPR_SHOT_SUPERMISSILE2_V 46 #define SPR_SHOT_FIREBALL23 47 #define SPR_FIREBALL_TRAIL2 48 #define SPR_FIREBALL_TRAIL3 49 #define SPR_SHOT_BLADE_L1 50 #define SPR_SHOT_BLADE_L1_VERT 51 #define SPR_SHOT_BLADE_L2 52 #define SPR_SHOT_BLADE_L2_V 53 #define SPR_TABLECHAIRS 54 #define SPR_SIGNPOST 55 #define SPR_POT 56 #define SPR_BED 57 #define SPR_RED_PETALS 58 #define SPR_DOOR 59 #define SPR_DOOR_BUSTED 60 #define SPR_SAVE_SIGN 61 #define SPR_SAVE_POINT 62 #define SPR_RECHARGE 63 #define SPR_DESTROYABLE 64 #define SPR_SMOKE_CLOUD 65 #define SPR_MISSILEHITSMOKE 66 #define SPR_FIREPLACE 67 #define SPR_CHEST_CLOSED 68 #define SPR_CHEST_OPEN 69 #define SPR_LIFE_CAPSULE 70 #define SPR_XP_CAPSULE 71 #define SPR_LIGHTNING 72 #define SPR_TERMINAL 73 #define SPR_TELEPORTER 74 #define SPR_TELEPORTER_LIGHTS 75 #define SPR_WATER_DROPLET 76 #define SPR_LAVA_DROPLET 77 #define SPR_SPRINKLER 78 #define SPR_LARGEDOOR 79 #define SPR_LARGEDOOR_FRAME 80 #define SPR_PRESS 81 #define SPR_HIDDEN_SPARKLE 82 #define SPR_BIG_SPIKE 83 #define SPR_SPIKE_SMALL 84 #define SPR_COMPUTER 85 #define SPR_CHALKBOARD 86 #define SPR_GRATE 87 #define SPR_STAR_SOLID 88 #define SPR_STAR_POOF 89 #define SPR_FISHY 90 #define SPR_BLOODHIT 91 #define SPR_SMOKETRAIL 92 #define SPR_BOOMFLASH 93 #define SPR_ZZZZ 94 #define SPR_HEART 95 #define SPR_MISSILE 96 #define SPR_HEART3 97 #define SPR_MISSILE3 98 #define SPR_XP_SMALL 99 #define SPR_XP_MED 100 #define SPR_XP_LARGE 101 #define SPR_HIDDEN_POWERUP 102 #define SPR_TEXTBOX 103 #define SPR_TEXTBULLET 104 #define SPR_YESNO 105 #define SPR_YESNOHAND 106 #define SPR_FACES 107 #define SPR_ITEMIMAGE 108 #define SPR_STAGEIMAGE 109 #define SPR_AIR 110 #define SPR_TEXT_ARMS 111 #define SPR_TEXT_ITEMS 112 #define SPR_TEXT_WARP 113 #define SPR_SELECTOR_ITEMS 114 #define SPR_SELECTOR_ARMS 115 #define SPR_HEALTHBAR 116 #define SPR_HEALTHFILL 117 #define SPR_XPBAR 118 #define SPR_XPLEVELICON 119 #define SPR_ARMSICONS 120 #define SPR_NAAMMO 121 #define SPR_REDNUMBERS 122 #define SPR_WHITENUMBERS 123 #define SPR_NIKU_CLOCK 124 #define SPR_NIKU_PUNC 125 #define SPR_LEVELUP 126 #define SPR_LEVELDOWN 127 #define SPR_EMPTY 128 #define SPR_BOSSHPICON 129 #define SPR_CURLY 130 #define SPR_MISERY 131 #define SPR_BALROG 132 #define SPR_JENKA 133 #define SPR_JENKA_COLLAPSED 134 #define SPR_DOCTOR 135 #define SPR_SUE 136 #define SPR_TOROKO 137 #define SPR_KING 138 #define SPR_KINGS_SWORD 139 #define SPR_BLADE 140 #define SPR_BLUE_ROBOT 141 #define SPR_CHTHULU 142 #define SPR_KAZUMA 143 #define SPR_PROFESSOR_BOOSTER 144 #define SPR_OMG_CLOSED 145 #define SPR_OMG_OPENED 146 #define SPR_OMG_STRUT 147 #define SPR_OMG_LEG_INAIR 148 #define SPR_OMG_LEG_ONGROUND 149 #define SPR_OMG_BULLET_NORMAL 150 #define SPR_OMG_BULLET_HARD 151 #define SPR_BEETLE_BROWN 152 #define SPR_MIMIGAC 153 #define SPR_CURLY_BOSS 154 #define SPR_POLISH 155 #define SPR_POLISHBABY 156 #define SPR_SANDCROC 157 #define SPR_SUNSTONE 158 #define SPR_PUPPY 159 #define SPR_PUPPY_ASLEEP 160 #define SPR_SKULLHEAD 161 #define SPR_SKULLSTEP 162 #define SPR_SKULLSTEP_FOOT 163 #define SPR_SKELETON 164 #define SPR_SKELETON_SHOT 165 #define SPR_ARMADILLO 166 #define SPR_CROW 167 #define SPR_TOROKO_FRENZIED 168 #define SPR_TOROKO_FLOWER 169 #define SPR_TOROKO_BLOCK 170 #define SPR_POWER_CRITTER 171 #define SPR_JELLY 172 #define SPR_GIANT_JELLY 173 #define SPR_SANTA 174 #define SPR_SANTAS_KEY 175 #define SPR_CHACO 176 #define SPR_MANNAN 177 #define SPR_MANNAN_SHOT 178 #define SPR_FAN_LEFT 179 #define SPR_FAN_UP 180 #define SPR_FAN_RIGHT 181 #define SPR_FAN_DOWN 182 #define SPR_HEY 183 #define SPR_MOTORBIKE 184 #define SPR_MOTORBIKE_MOUNTED 185 #define SPR_MOTORBIKE_BROKEN 186 #define SPR_POWERCOMP 187 #define SPR_POWERSINE 188 #define SPR_MALCO 189 #define SPR_MALCO_BROKEN 190 #define SPR_BALROG_SHOT_BOUNCE 191 #define SPR_FRENZIED_MIMIGA 192 #define SPR_FROG 193 #define SPR_MINIFROG 194 #define SPR_BALROG_GREEN 195 #define SPR_BALFROG 196 #define SPR_BALFROG_JUMP 197 #define SPR_BALFROG_SHOT 198 #define SPR_CRITTER_SHOOTING_PURPLE 199 #define SPR_CRITTER_SHOT 200 #define SPR_MOVING_BLOCK 201 #define SPR_FIREWHIRR 202 #define SPR_FIREWHIRR_SHOT 203 #define SPR_GAUDI_EGG 204 #define SPR_GRATING 205 #define SPR_SHUTTER 206 #define SPR_SHUTTER_BIG 207 #define SPR_SHUTTER_STUCK 208 #define SPR_ALMOND_LIFT 209 #define SPR_ALMOND_ROBOT 210 #define SPR_CORE_FRONT 211 #define SPR_CORE_BACK 212 #define SPR_MINICORE 213 #define SPR_MINICORE_SHOT 214 #define SPR_CORE_GHOSTIE 215 #define SPR_CORE_BLAST 216 #define SPR_CORESHOOTMARKER 217 #define SPR_WATER_CURRENT 218 #define SPR_MOTION_WALL 219 #define SPR_IRONH 220 #define SPR_IRONH_HURT 221 #define SPR_IRONH_FISHY 222 #define SPR_IRONH_SHOT 223 #define SPR_IRONH_BRICK 224 #define SPR_IRONH_BIGBRICK 225 #define SPR_IKACHAN 226 #define SPR_CURLY_COLLAPSED 227 #define SPR_SANDCROC_OSIDE 228 #define SPR_HOPPY 229 #define SPR_CHINFISH 230 #define SPR_KANPACHI_FISHING 231 #define SPR_FLOWERS_PENS1 232 #define SPR_JACK 233 #define SPR_MAHIN 234 #define SPR_YAMASHITA_FLOWERS 235 #define SPR_YAMASHITA_PAVILION 236 #define SPR_TOROKO_SHACK 237 #define SPR_MISERYS_BUBBLE 238 #define SPR_MUSHROOM_ENEMY 239 #define SPR_GIANT_MUSHROOM_ENEMY 240 #define SPR_GRAVEKEEPER 241 #define SPR_CAGE 242 #define SPR_CRITTER_HOPPING_GREEN 243 #define SPR_CRITTER_HOPPING_BLUE 244 #define SPR_CRITTER_FLYING_CYAN 245 #define SPR_CRITTER_HOPPING_AQUA 246 #define SPR_BAT 247 #define SPR_BAT_BLUE 248 #define SPR_DOOR_ENEMY 249 #define SPR_HERMIT_GUNSMITH 250 #define SPR_KAZUMA_AT_COMPUTER 251 #define SPR_SUE_AT_COMPUTER 252 #define SPR_BASIL 253 #define SPR_BEHEMOTH 254 #define SPR_BEETLE_GREEN 255 #define SPR_BEETLE_FREEFLY 256 #define SPR_GIANT_BEETLE 257 #define SPR_GIANT_BEETLE_SHOT 258 #define SPR_FORCEFIELD 259 #define SPR_EGG_ELEVATOR 260 #define SPR_IGOR 261 #define SPR_IGOR_PUNCHING 262 #define SPR_IGOR_SHOT 263 #define SPR_IGOR_DEFEATED 264 #define SPR_BEETLE_FREEFLY_2 265 #define SPR_GIANT_BEETLE_2 266 #define SPR_UNIMPLEMENTED_OBJECT 267 #define SPR_BBOX_PUPPET_1 268 #define SPR_BBOX_PUPPET_2 269 #define SPR_BBOX_PUPPET_3 270 #define SPR_BBOX_PUPPET_4 271 #define SPR_SHOT_BLADE_L3 272 #define SPR_SHOT_BLADE_L3_V 273 #define SPR_BLADE_SLASH 274 #define SPR_SHOT_SNAKE_L1 275 #define SPR_BLUE_ROBOT_SITTING 276 #define SPR_BLUE_ROBOT_REMAINS 277 #define SPR_X_BODY 278 #define SPR_X_TREAD_LOWER 279 #define SPR_X_TREAD_UPPER 280 #define SPR_X_INTERNALS 281 #define SPR_X_DOOR 282 #define SPR_X_TARGETS 283 #define SPR_X_FISHY_MISSILE 284 #define SPR_X_DEFEATED 285 #define SPR_GAUDI_FLYING_SHOT 286 #define SPR_GAUDI 287 #define SPR_GAUDI_DYING 288 #define SPR_GAUDI_FLYING 289 #define SPR_GAUDI_ARMORED 290 #define SPR_GAUDI_ARMORED_SHOT 291 #define SPR_GAUDI_SHOPKEEP 292 #define SPR_DR_GERO 293 #define SPR_NURSE_HASUMI 294 #define SPR_POOH_BLACK 295 #define SPR_POOH_BLACK_BUBBLE 296 #define SPR_BOULDER 297 #define SPR_STRAINING 298 #define SPR_BALROG_MISSILE 299 #define SPR_FUZZ_CORE 300 #define SPR_FUZZ 301 #define SPR_BUYOBUYO_BASE 302 #define SPR_BUYOBUYO_BASE_CEILING 303 #define SPR_BUYOBUYO 304 #define SPR_DRAGON_ZOMBIE 305 #define SPR_DRAGON_ZOMBIE_DEAD 306 #define SPR_DRAGON_ZOMBIE_SHOT 307 #define SPR_FALLING_SPIKE_SMALL 308 #define SPR_FALLING_SPIKE_LARGE 309 #define SPR_COUNTER_BOMB 310 #define SPR_COUNTER_BOMB_NUMBER 311 #define SPR_SISTERS_BODY 312 #define SPR_SISTERS_HEAD_1 313 #define SPR_SISTERS_HEAD_2 314 #define SPR_SKY_DRAGON 315 #define SPR_NIGHT_SPIRIT 316 #define SPR_NIGHT_SPIRIT_SHOT 317 #define SPR_PIXEL_CAT 318 #define SPR_ITOH 319 #define SPR_MOMORIN 320 #define SPR_ORANGEBELL 321 #define SPR_ORANGEBELL_BABY 322 #define SPR_STUMPY 323 #define SPR_GUNFISH 324 #define SPR_GUNFISH_SHOT 325 #define SPR_GUNFISH_BUBBLE 326 #define SPR_MIDORIN 327 #define SPR_DROLL 328 #define SPR_DROLL_SHOT 329 #define SPR_MIMIGA_FARMER 330 #define SPR_RED_FLOWERS_SPROUTS 331 #define SPR_RED_FLOWERS_BLOOMING 332 #define SPR_CHIE 333 #define SPR_MEGANE 334 #define SPR_MIMIGA_SLEEPING 335 #define SPR_KANPACHI_STANDING 336 #define SPR_BUCKET 337 #define SPR_JAIL_GRATING 338 #define SPR_JAIL2_CAGE 339 #define SPR_MIMIGA_JAILED 340 #define SPR_ROCKET 341 #define SPR_PROXIMITY_PRESS_HOZ 342 #define SPR_MA_PIGNON 343 #define SPR_MA_PIGNON_ROCK 344 #define SPR_CRITTER_HOPPING_RED 345 #define SPR_LAVA_DRIP 346 #define SPR_LAVA_DRIP_SPLASH 347 #define SPR_RED_BAT 348 #define SPR_RED_DEMON 349 #define SPR_RED_DEMON_SHOT 350 #define SPR_PROXIMITY_PRESS_VERT 351 #define SPR_BOSS_MISERY 352 #define SPR_MISERY_RING 353 #define SPR_MISERY_SHOT 354 #define SPR_MISERY_BALL 355 #define SPR_BLACK_LIGHTNING 356 #define SPR_MISERY_PHASE 357 #define SPR_ORANGE_BAT_FINAL 358 #define SPR_HELICOPTER 359 #define SPR_HELICOPTER_BLADE_1 360 #define SPR_HELICOPTER_BLADE_2 361 #define SPR_BALCONY_BLOCK_LARGE 362 #define SPR_BALCONY_BLOCK_SMALL 363 #define SPR_MIMIGA_CAGE_FINAL 364 #define SPR_MIMIGA_CAGED 365 #define SPR_DOCTOR_CROWNED 366 #define SPR_RED_CRYSTAL 367 #define SPR_BOSS_DOCTOR 368 #define SPR_DOCTOR_SHOT 369 #define SPR_DOCTOR_BLAST 370 #define SPR_BOSS_DOCTOR_FRENZIED 371 #define SPR_RED_ENERGY 372 #define SPR_DOCTOR_BAT 373 #define SPR_SUE_FRENZIED 374 #define SPR_MISERY_FRENZIED 375 #define SPR_MISERY_CRITTER 376 #define SPR_MISERY_MISSILE 377 #define SPR_UD_MINICORE 378 #define SPR_UD_FRONT 379 #define SPR_UD_BACK 380 #define SPR_UD_FACES 381 #define SPR_UD_BLAST 382 #define SPR_UD_PELLET 383 #define SPR_UD_SMOKE 384 #define SPR_UD_BANG 385 #define SPR_MARKER 386 #define SPR_UD_ROTATOR 387 #define SPR_UD_SPINNER 388 #define SPR_UD_SPINNER_TRAIL 389 #define SPR_UDMINI_PLATFORM 390 #define SPR_ISLAND_SCENE 391 #define SPR_ISLAND_TREES 392 #define SPR_ISLAND 393 #define SPR_CLOUD_1 394 #define SPR_CLOUD_2 395 #define SPR_CLOUD_3 396 #define SPR_CLOUD_4 397 #define SPR_BALROG_FLYING 398 #define SPR_CASTS 399 #define SPR_BALROG_MEDIC 400 #define SPR_GAUDI_PATIENT 401 #define SPR_BABY_PUPPY 402 #define SPR_TRANSMOGRIFIER 403 #define SPR_TURNING_HUMAN 404 #define SPR_BUILDING_FAN 405 #define SPR_MISERY_WIND 406 #define SPR_AHCHOO 407 #define SPR_BALROG_CAST 408 #define SPR_THANK_YOU 409 #define SPR_NEMESIS 410 #define SPR_NEMESIS_VERT 411 #define SPR_SPUR 412 #define SPR_SPUR_VERT 413 #define SPR_BUBBLER 414 #define SPR_BUBBLER_VERT 415 #define SPR_SHOT_NEMESIS_L1 416 #define SPR_SHOT_NEMESIS_L1_V 417 #define SPR_SHOT_NEMESIS_L2 418 #define SPR_SHOT_NEMESIS_L2_V 419 #define SPR_SHOT_NEMESIS_L3 420 #define SPR_SHOT_NEMESIS_L3_V 421 #define SPR_LITTLE_FAMILY 422 #define SPR_SHOT_BUBBLER_L1 423 #define SPR_SHOT_BUBBLER_L2 424 #define SPR_SHOT_BUBBLER_L3 425 #define SPR_BUBBLER_SHARP 426 #define SPR_TRAIL_SPUR_L1 427 #define SPR_TRAIL_SPUR_L1_V 428 #define SPR_TRAIL_SPUR_L2 429 #define SPR_TRAIL_SPUR_L2_V 430 #define SPR_TRAIL_SPUR_L3 431 #define SPR_SPUR_HIT 432 #define SPR_MAP_PIXELS 433 #define SPR_HELL_BLOCK_LARGE 434 #define SPR_HELL_BLOCK_SMALL 435 #define SPR_BUTE_FLYING 436 #define SPR_BUTE_DYING 437 #define SPR_BUTE_FALLING 438 #define SPR_BUTE_SWORD 439 #define SPR_BUTE_ARCHER 440 #define SPR_BUTE_ARROW_RIGHT 441 #define SPR_BUTE_ARROW_LEFT 442 #define SPR_MESA 443 #define SPR_MESA_BLOCK 444 #define SPR_MESA_DYING 445 #define SPR_DELEET 446 #define SPR_ROLLING 447 #define SPR_HEAVY_PRESS 448 #define SPR_HP_CHARGE 449 #define SPR_HP_LIGHTNING 450 #define SPR_STATUE 451 #define SPR_NUMAHACHI 452 #define SPR_PUPPY_GHOST 453 #define SPR_GHOST_SPARKLE 454 #define SPR_CURLY_CARRIED_SHOOTING 455 #define SPR_BALLOS_PRIEST 456 #define SPR_BALLOS_SMILE 457 #define SPR_BALLOS_TARGET 458 #define SPR_BALLOS_BONE_SPAWNER 459 #define SPR_BALLOS_BONE 460 #define SPR_BALLOS_MAIN 461 #define SPR_BALLOS_BODY 462 #define SPR_BALLOS_EYE 463 #define SPR_BALLOS_ROTATOR 464 #define SPR_BALLOS_SKULL 465 #define SPR_BALLOS_SPIKES 466 #define SPR_BALLOS_PLATFORM 467 #define SPR_GREEN_DEVIL 468 #define SPR_BUTE_SWORD_RED_FALLING 469 #define SPR_BUTE_SWORD_RED 470 #define SPR_BUTE_ARCHER_RED 471 #define SPR_CCS_GUN 472 #define SPR_WHIMSICAL_STAR 473 #define SPR_INTRO_KINGS 474 #define SPR_INTRO_CROWN 475 #define SPR_INTRO_DOCTOR 476 #define SPR_CS_MYCHAR 477 #define SPR_CS_CURLY 478 #define SPR_CS_TOROKO 479 #define SPR_CS_KING 480 #define SPR_CS_SUE 481 #define SPR_TITLE 482 #define SPR_MENU 483 #define SPR_PIXEL_FOREVER 484 #define SPR_RESETPROMPT 485 #define SPR_OC_QUOTE 486 #define SPR_SAVESELECTOR_SIDES 487 #define SPR_SAVESELECTOR_MIDDLE 488 #define SPR_SS_HEALTH_ICON 489 ================================================ FILE: autogen/stagedata.fdh ================================================ //hash:00000000 //automatically generated by Makegen ================================================ FILE: caret.cpp ================================================ // handle carets; a simplified type of objects used for visual effects. // carets have no interaction with real objects, and are always drawn // on top of all other objects and in front even of map foreground tiles. #include "nx.h" #include #include "common/llist.h" #include "caret.fdh" Caret *firstcaret = NULL; Caret *lastcaret = NULL; static int _effecttype = EFFECT_NONE; bool Carets::init(void) { firstcaret = NULL; lastcaret = NULL; return 0; } void Carets::close(void) { Carets::DestroyAll(); } /* void c------------------------------() {} */ Caret *CreateCaret(int x, int y, int sprite, void (*ontick)(Caret *c), \ int xinertia, int yinertia) { Caret *c = new Caret; memset(c, 0, sizeof(Caret)); c->x = x; c->y = y; c->xinertia = xinertia; c->yinertia = yinertia; c->sprite = sprite; c->OnTick = ontick; c->effecttype = _effecttype; LL_ADD_END(c, prev, next, firstcaret, lastcaret); return c; } void Caret::Delete() { this->deleted = true; } void Caret::Destroy() { LL_REMOVE(this, prev, next, firstcaret, lastcaret); delete this; } void Caret::MoveAtDir(int dir, int speed) { this->xinertia = 0; this->yinertia = 0; switch(dir) { case LEFT: this->xinertia = -speed; break; case RIGHT: this->xinertia = speed; break; case UP: this->yinertia = -speed; break; case DOWN: this->yinertia = speed; break; } } /* void c------------------------------() {} */ void Carets::DrawAll(void) { Caret *c = firstcaret; Caret *next; int scr_x, scr_y; while(c) { next = c->next; if (c->deleted) { c->Destroy(); } else { // do caret ai (*c->OnTick)(c); // move caret c->x += c->xinertia; c->y += c->yinertia; // get caret's onscreen position // since caret's are all short-lived we just assume it's still onscreen // and let SDL's clipping handle it if not. if (!c->invisible && !c->deleted) // must check deleted again in case handler_function set it { scr_x = (c->x >> CSF) - (map.displayed_xscroll >> CSF); scr_y = (c->y >> CSF) - (map.displayed_yscroll >> CSF); scr_x -= sprites[c->sprite].frame[c->frame].dir[0].drawpoint.x; scr_y -= sprites[c->sprite].frame[c->frame].dir[0].drawpoint.y; draw_sprite(scr_x, scr_y, c->sprite, c->frame, RIGHT); } } c = next; } } int Carets::CountByEffectType(int type) { int count = 0; Caret *c = firstcaret; while(c) { if (c->effecttype == type) count++; c = c->next; } return count; } int Carets::DeleteByEffectType(int type) { int count = 0; Caret *c = firstcaret; while(c) { if (c->effecttype == type) c->Delete(); c = c->next; } return count; } void Carets::DestroyAll(void) { while(firstcaret) firstcaret->Destroy(); } /* void c------------------------------() {} */ // generates a caret-based effect at x, y. Most sprites used for carets have the // drawpoint at their center so the effect is generally centered at that position. // // an effect can be just a convenience function for creating a caret // with a particular sprite/ai combo, or it can produce a group of carets // which are always seen together (e.g. bonkplus or bloodspatter). Caret *effect(int x, int y, int effectno) { Caret *c; int i; // tell CreateCaret what kind of effect we're spawning _effecttype = effectno; switch(effectno) { case EFFECT_STARSOLID: c = CreateCaret(x, y, SPR_STAR_SOLID, caret_animate3); break; case EFFECT_STARPOOF: c = CreateCaret(x, y, SPR_STAR_POOF, caret_animate3); break; case EFFECT_FISHY: c = CreateCaret(x, y, SPR_FISHY, caret_fishy); break; case EFFECT_BOOMFLASH: c = CreateCaret(x, y, SPR_BOOMFLASH, caret_animate3); break; case EFFECT_BUBBLE_BURST: c = CreateCaret(x, y, SPR_BUBBLE_BURST, caret_animate3); break; case EFFECT_SPUR_HIT: c = CreateCaret(x, y, SPR_SPUR_HIT, caret_spur_hit); break; case EFFECT_ZZZZ: c = CreateCaret(x, y, SPR_ZZZZ, caret_zzzz); break; case EFFECT_LEVELUP: c = CreateCaret(x, y, SPR_LEVELUP, caret_playertext); break; case EFFECT_LEVELDOWN: c = CreateCaret(x, y, SPR_LEVELDOWN, caret_playertext); break; case EFFECT_BONUSFLASH: c = CreateCaret(x, y, SPR_SMOKE_CLOUD, caret_bonusflash); break; case EFFECT_HEY: c = CreateCaret(x, y, SPR_HEY, caret_hey); break; case EFFECT_EMPTY: c = CreateCaret(x, y, SPR_EMPTY, caret_playertext); break; case EFFECT_SMOKETRAIL: c = CreateCaret(x, y, SPR_SMOKETRAIL, caret_animate2); break; case EFFECT_SMOKETRAIL_SLOW: c = CreateCaret(x, y, SPR_SMOKETRAIL, caret_animate3); break; case EFFECT_GUNFISH_BUBBLE: { c = CreateCaret(x-(3<yinertia = random(-0x600, -0x200); } break; // "blood" spatters from shot hitting enemy case EFFECT_BLOODSPLATTER: { for(i=0;i<3;i++) { c = CreateCaret(x, y, SPR_BLOODHIT, caret_animate3); vector_from_angle(random(0, 255), (2<xinertia, &c->yinertia); } } break; // two little blinky stars when player bonks his head on the ceiling case EFFECT_BONKPLUS: { for(i=0;i<2;i++) { c = CreateCaret(x, y, SPR_BONKHEADPLUS, caret_bonkplus); c->xinertia = random(-0x600, 0x600); c->yinertia = random(-0x200, 0x200); //uint8_t angle = random(-14, 14); //if (random(0, 1)) angle += 128; //vector_from_angle(angle, random(0x200, 0x384), &c->xinertia, &c->yinertia); } } break; case EFFECT_QMARK: { // only 1 question mark is ever shown at a time DeleteEffectsOfType(EFFECT_QMARK); c = CreateCaret(x, y, SPR_QMARK, caret_qmark); } break; default: staterr("effect: invalid effect type %d", effectno); return NULL; } _effecttype = EFFECT_NONE; return c; } /* void c------------------------------() {} */ void caret_animate1(Caret *c) { c->animdie(0); } void caret_animate2(Caret *c) { c->animdie(1); } void caret_animate3(Caret *c) { c->animdie(2); } void Caret::anim(int speed) { Caret * const &c = this; if (++c->animtimer > speed) { c->animtimer = 0; if (++c->frame >= sprites[c->sprite].nframes) c->frame = 0; } } void Caret::animdie(int speed) { Caret * const &c = this; if (++c->animtimer > speed) { c->animtimer = 0; if (++c->frame >= sprites[c->sprite].nframes) c->Delete(); } } /* void c------------------------------() {} */ // flickers rapidly and decels at exponential speed. // used for the "bonkplus" effect when you bonk your head void caret_bonkplus(Caret *c) { c->xinertia *= 4; c->xinertia /= 5; c->yinertia *= 4; c->yinertia /= 5; c->invisible = (++c->timer & 2); if (c->timer > 20) c->Delete(); } void caret_fishy(Caret *c) { c->yinertia -= 16; c->animdie(4); } void caret_spur_hit(Caret *c) { c->timer++; c->frame = (c->timer / 2) % 3; if (c->timer > 24) c->Delete(); } // "Level Up", "Level Down", and "Empty" texts void caret_playertext(Caret *c) { int spd, stop; c->anim(1); // "EMPTY" text goes twice as fast as "Level" text if (c->sprite == SPR_EMPTY) { spd = 2; stop = 18; } else { spd = 1; stop = 20; } c->timer += spd; if (c->timer < 80) { if (c->timer < stop) { c->y -= (spd << CSF); } } else { c->Delete(); } } // ? effect when you press down with no object around to activate void caret_qmark(Caret *c) { if (++c->timer < 40) { if (c->timer < 7) { c->y -= (3 << CSF); } } else { c->Delete(); } } void caret_bonusflash(Caret *c) { if (++c->timer == 4) c->Delete(); } void caret_hey(Caret *c) { if (++c->timer > 30) c->Delete(); if (c->timer < 5) c->y -= (1<animdie(5); c->yinertia += 0x40; if (c->yinertia >= 0x5ff) c->yinertia = 0x5ff; } void caret_ghost_sparkle(Caret *c) { c->invisible = (++c->timer & 2); if (c->timer > 20) c->Delete(); } void caret_zzzz(Caret *c) { c->animdie(5); c->x += 0x80; c->y -= 0x80; } ================================================ FILE: caret.fdh ================================================ //hash:1ea42078 //automatically generated by Makegen /* located in caret.cpp */ //---------------------[referenced from caret.cpp]-------------------// Caret *CreateCaret(int x, int y, int sprite, void (*ontick)(Caret *c), int xinertia, int yinertia); Caret *effect(int x, int y, int effectno); void caret_animate1(Caret *c); void caret_animate2(Caret *c); void caret_animate3(Caret *c); void caret_bonkplus(Caret *c); void caret_fishy(Caret *c); void caret_spur_hit(Caret *c); void caret_playertext(Caret *c); void caret_qmark(Caret *c); void caret_bonusflash(Caret *c); void caret_hey(Caret *c); void caret_gunfish_bubble(Caret *c); void caret_ghost_sparkle(Caret *c); void caret_zzzz(Caret *c); /* located in trig.cpp */ //---------------------[referenced from caret.cpp]-------------------// void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys); /* located in common/stat.cpp */ //---------------------[referenced from caret.cpp]-------------------// void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //---------------------[referenced from caret.cpp]-------------------// int random(int min, int max); ================================================ FILE: caret.h ================================================ #ifndef _CARET_H #define _CARET_H enum EffectTypes { EFFECT_NONE = 0, EFFECT_STARSOLID, // "shot hit wall" dissipation effect EFFECT_STARPOOF, // "shot exceeded ttl" dissipation effect EFFECT_FISHY, // common enemy shot dissipation effect EFFECT_BLOODSPLATTER, // "blood" spatter from hitting enemies EFFECT_BONKPLUS, // two +'s from player hitting head EFFECT_BOOMFLASH, // big white circle flash from enemies exploding etc EFFECT_LEVELUP, EFFECT_LEVELDOWN, EFFECT_QMARK, // "?" from pressing down with nothing nearby EFFECT_BONUSFLASH, // small bright "tink" when hearts/missiles disappear EFFECT_ZZZZ, // rising sleeping zzzzz's EFFECT_EMPTY, // rising text that says "empty" EFFECT_SMOKETRAIL, // small smoke puff EFFECT_SMOKETRAIL_SLOW, // small smoke puff (slower animate) EFFECT_HEY, // balloon that says "Hey!" (from grasstown) EFFECT_GUNFISH_BUBBLE, // bubbles spawned during dissipation of Gunfish shots EFFECT_LAVA_SPLASH, // just red version of gunfish bubble, really EFFECT_BUBBLE_BURST, // Bubbler dissipation effect. is NOT CENTERED. EFFECT_SPUR_HIT, // Spur hit wall effect, used in addition to starsolid. EFFECT_GHOST_SPARKLE // rising sparkles from Ballos's dog }; namespace Carets { bool init(void); void close(void); void DrawAll(void); int CountByEffectType(int type); int DeleteByEffectType(int type); void DestroyAll(void); }; // synonyms #define CountEffectsOfType Carets::CountByEffectType #define DeleteEffectsOfType Carets::DeleteByEffectType struct Caret { void (*OnTick)(Caret *c); int x, y; int xinertia, yinertia; int sprite, frame; int state; int effecttype; int timer, timer2; int animtimer; bool invisible; bool deleted; Caret *next, *prev; // --------------------------------------- void Delete(); void Destroy(); void MoveAtDir(int dir, int speed); void anim(int speed); void animdie(int speed); }; Caret *CreateCaret(int x, int y, int sprite, void (*ontick)(Caret *c), \ int xinertia=0, int yinertia=0); #endif ================================================ FILE: common/BList.cpp ================================================ //------------------------------------------------------------------------------ // Copyright (c) 2001-2008, Haiku, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. // // File Name: List.cpp // Author(s): The Storage kit Team // Isaac Yonemoto // Rene Gollent // Description: BList class provides storage for pointers. // Not thread safe. //------------------------------------------------------------------------------ // Standard Includes ----------------------------------------------------------- #include "BList.h" // System Includes ------------------------------------------------------------- #include #include #include // helper function static inline void move_items(void** items, int32 offset, int32 count) { if (count > 0 && offset != 0) memmove(items + offset, items, count * sizeof(void*)); } // constructor BList::BList(int32 count) : fObjectList(NULL), fPhysicalSize(0), fItemCount(0), fBlockSize(count), fResizeThreshold(0) { if (fBlockSize <= 0) fBlockSize = 1; _ResizeArray(fItemCount); } // copy constructor BList::BList(const BList& anotherList) : fObjectList(NULL), fPhysicalSize(0), fItemCount(0), fBlockSize(anotherList.fBlockSize) { *this = anotherList; } // destructor BList::~BList() { free(fObjectList); } // = BList& BList::operator =(const BList &list) { fBlockSize = list.fBlockSize; if (_ResizeArray(list.fItemCount)) { fItemCount = list.fItemCount; memcpy(fObjectList, list.fObjectList, fItemCount * sizeof(void*)); } return *this; } // AddItem bool BList::AddItem(const void *item, int32 index) { if (index < 0 || index > fItemCount) return false; bool result = true; if (fItemCount + 1 > fPhysicalSize) result = _ResizeArray(fItemCount + 1); if (result) { ++fItemCount; move_items(fObjectList + index, 1, fItemCount - index - 1); fObjectList[index] = (void *)item; } return result; } // AddItem bool BList::AddItem(const void *item) { bool result = true; if (fPhysicalSize > fItemCount) { fObjectList[fItemCount] = (void *)item; ++fItemCount; } else { if ((result = _ResizeArray(fItemCount + 1))) { fObjectList[fItemCount] = (void *)item; ++fItemCount; } } return result; } // AddList bool BList::AddList(const BList *list, int32 index) { bool result = (list && index >= 0 && index <= fItemCount); if (result && list->fItemCount > 0) { int32 count = list->fItemCount; if (fItemCount + count > fPhysicalSize) result = _ResizeArray(fItemCount + count); if (result) { fItemCount += count; move_items(fObjectList + index, count, fItemCount - index - count); memcpy(fObjectList + index, list->fObjectList, list->fItemCount * sizeof(void *)); } } return result; } // AddList bool BList::AddList(const BList *list) { bool result = (list != NULL); if (result && list->fItemCount > 0) { int32 index = fItemCount; int32 count = list->fItemCount; if (fItemCount + count > fPhysicalSize) result = _ResizeArray(fItemCount + count); if (result) { fItemCount += count; memcpy(fObjectList + index, list->fObjectList, list->fItemCount * sizeof(void *)); } } return result; } // RemoveItem bool BList::RemoveItem(void *item) { int32 index = IndexOf(item); bool result = (index >= 0); if (result) RemoveItem(index); return result; } // RemoveItem void * BList::RemoveItem(int32 index) { void *item = NULL; if (index >= 0 && index < fItemCount) { item = fObjectList[index]; move_items(fObjectList + index + 1, -1, fItemCount - index - 1); --fItemCount; if (fItemCount <= fResizeThreshold) _ResizeArray(fItemCount); } return item; } // RemoveItems bool BList::RemoveItems(int32 index, int32 count) { bool result = (index >= 0 && index <= fItemCount); if (result) { if (index + count > fItemCount) count = fItemCount - index; if (count > 0) { move_items(fObjectList + index + count, -count, fItemCount - index - count); fItemCount -= count; if (fItemCount <= fResizeThreshold) _ResizeArray(fItemCount); } else result = false; } return result; } //ReplaceItem bool BList::ReplaceItem(int32 index, void *newItem) { bool result = false; if (index >= 0 && index < fItemCount) { fObjectList[index] = newItem; result = true; } return result; } // MakeEmpty void BList::MakeEmpty() { fItemCount = 0; _ResizeArray(0); } /* Reordering items. */ // SortItems void BList::SortItems(int (*compareFunc)(const void *, const void *)) { if (compareFunc) qsort(fObjectList, fItemCount, sizeof(void *), compareFunc); } //SwapItems bool BList::SwapItems(int32 indexA, int32 indexB) { bool result = false; if (indexA >= 0 && indexA < fItemCount && indexB >= 0 && indexB < fItemCount) { void *tmpItem = fObjectList[indexA]; fObjectList[indexA] = fObjectList[indexB]; fObjectList[indexB] = tmpItem; result = true; } return result; } // MoveItem // This moves a list item from posititon a to position b, moving the appropriate // block of list elements to make up for the move. For example, in the array: // A B C D E F G H I J // Moveing 1(B)->6(G) would result in this: // A C D E F G B H I J bool BList::MoveItem(int32 fromIndex, int32 toIndex) { if ((fromIndex >= fItemCount) || (toIndex >= fItemCount) || (fromIndex < 0) || (toIndex < 0)) return false; void * tmpMover = fObjectList[fromIndex]; if (fromIndex < toIndex) { memmove(fObjectList + fromIndex, fObjectList + fromIndex + 1, (toIndex - fromIndex) * sizeof(void *)); } else if (fromIndex > toIndex) { memmove(fObjectList + toIndex + 1, fObjectList + toIndex, (fromIndex - toIndex) * sizeof(void *)); }; fObjectList[toIndex] = tmpMover; return true; } /* Retrieving items. */ // ItemAt void * BList::ItemAt(int32 index) const { void *item = NULL; if (index >= 0 && index < fItemCount) item = fObjectList[index]; return item; } // FirstItem void * BList::FirstItem() const { void *item = NULL; if (fItemCount > 0) item = fObjectList[0]; return item; } // ItemAtFast void * BList::ItemAtFast(int32 index) const { return fObjectList[index]; } // Items void * BList::Items() const { return fObjectList; } // LastItem void * BList::LastItem() const { void *item = NULL; if (fItemCount > 0) item = fObjectList[fItemCount - 1]; return item; } /* Querying the list. */ // HasItem bool BList::HasItem(void *item) const { return (IndexOf(item) >= 0); } // IndexOf int32 BList::IndexOf(void *item) const { for (int32 i = 0; i < fItemCount; i++) { if (fObjectList[i] == item) return i; } return -1; } // CountItems int32 BList::CountItems() const { return fItemCount; } // IsEmpty bool BList::IsEmpty() const { return (fItemCount == 0); } /* Iterating over the list. */ //iterate a function over the whole list. If the function outputs a true //value, then the process is terminated. void BList::DoForEach(bool (*func)(void *)) { bool terminate = false; int32 index = 0; //set terminate condition variables to go. if (func != NULL) { while ((!terminate) && (index < fItemCount)) //check terminate condition. { terminate = func(fObjectList[index]); //reset immediate terminator index++; //advance along the list. }; } } //same as above, except this function takes an argument. void BList::DoForEach(bool (*func)(void *, void*), void * arg) { bool terminate = false; int32 index = 0; if (func != NULL) { while ((!terminate) && (index < fItemCount)) { terminate = func(fObjectList[index], arg); index++; }; } } #if (__GNUC__ == 2) // This is somewhat of a hack for backwards compatibility - // the reason these functions are defined this way rather than simply // being made private members is that if they are included, then whenever // gcc encounters someone calling AddList() with a non-const BList pointer, // it will try to use the private version and fail with a compiler error. // obsolete AddList(BList* list, int32 index) and AddList(BList* list) // AddList extern "C" bool AddList__5BListP5BListl(BList* self, BList* list, int32 index) { return self->AddList((const BList*)list, index); } // AddList extern "C" bool AddList__5BListP5BList(BList* self, BList* list) { return self->AddList((const BList *)list); } #endif // Resize // // Resizes fObjectList to be large enough to contain count items. bool BList::_ResizeArray(int32 count) { bool result = true; // calculate the new physical size // by doubling the existing size // until we can hold at least count items int32 newSize = fPhysicalSize > 0 ? fPhysicalSize : fBlockSize; int32 targetSize = count; if (targetSize <= 0) targetSize = fBlockSize; if (targetSize > fPhysicalSize) { while (newSize < targetSize) newSize <<= 1; } else if (targetSize <= fResizeThreshold) { newSize = fResizeThreshold; } // resize if necessary if (newSize != fPhysicalSize) { void** newObjectList = (void**)realloc(fObjectList, newSize * sizeof(void*)); if (newObjectList) { fObjectList = newObjectList; fPhysicalSize = newSize; // set our lower bound to either 1/4 //of the current physical size, or 0 fResizeThreshold = fPhysicalSize >> 2 >= fBlockSize ? fPhysicalSize >> 2 : 0; } else result = false; } return result; } ================================================ FILE: common/BList.fdh ================================================ //hash:57950a83 //automatically generated by Makegen /* located in common/BList.cpp */ //-----------------[referenced from common/BList.cpp]----------------// move_items(void** items, int32 offset, int32 count); || (toIndex < 0)); AddList__5BListP5BListl(BList* self, BList* list, int32 index); AddList__5BListP5BList(BList* self, BList* list); ================================================ FILE: common/BList.h ================================================ /* * Copyright 2001-2007, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. */ #ifndef _BE_LIST_H #define _BE_LIST_H #include "SupportDefs.h" class BList { public: BList(int32 count = 20); BList(const BList& anotherList); virtual ~BList(); virtual BList& operator =(const BList &); /* Adding and removing items. */ bool AddItem(const void* item, int32 index); bool AddItem(const void* item); bool AddList(const BList* list, int32 index); bool AddList(const BList* list); bool RemoveItem(void* item); void* RemoveItem(int32 index); bool RemoveItems(int32 index, int32 count); bool ReplaceItem(int32 index, void* newItem); virtual void MakeEmpty(); // Reorder items void SortItems(int (*compareFunc)(const void*, const void*)); bool SwapItems(int32 indexA, int32 indexB); bool MoveItem(int32 fromIndex, int32 toIndex); // Retrieve items void* ItemAt(int32 index) const; void* FirstItem() const; void* ItemAtFast(int32) const; // does not check the array bounds! void* LastItem() const; void* Items() const; // Query bool HasItem(void* item) const; int32 IndexOf(void* item) const; int32 CountItems() const; bool IsEmpty() const; // Iteration void DoForEach(bool (*func)(void* item)); void DoForEach(bool (*func)(void* item, void* arg2), void *arg2); private: bool _ResizeArray(int32 count); void** fObjectList; int32 fPhysicalSize; int32 fItemCount; int32 fBlockSize; int32 fResizeThreshold; uint32 _reserved[1]; }; #endif // _BE_LIST_H ================================================ FILE: common/DBuffer.cpp ================================================ #include #include #include #include "DBuffer.h" #include "DBuffer.fdh" DBuffer::DBuffer() { fData = &fBuiltInData[0]; fAllocSize = DBUFFER_BUILTIN_SIZE; fAllocdExternal = false; fLength = 0; } DBuffer::~DBuffer() { if (fAllocdExternal) free(fData); } /* void c------------------------------() {} */ // append data to the end of the buffer void DBuffer::AppendData(const uint8_t *data, int length) { if (length <= 0) return; EnsureAlloc(fLength + length); memcpy(&fData[fLength], data, length); fLength += length; } // append a string, along with it's null-terminator. void DBuffer::AppendString(const char *str) { AppendData((uint8_t *)str, strlen(str) + 1); } // append a string, without it's null-terminator. void DBuffer::AppendStringNoNull(const char *str) { AppendData((uint8_t *)str, strlen(str)); } void DBuffer::AppendBool(bool value) { uint8_t ch = (uint8_t)value; AppendData((uchar *)&ch, 1); } void DBuffer::Append16(uint16_t value) { AppendData((uchar *)&value, 2); } void DBuffer::Append32(uint32_t value) { AppendData((uchar *)&value, 4); } void DBuffer::Append24(uint32_t value) { Append16(value); Append8(value >> 16); } /* void c------------------------------() {} */ // real SetTo code is in DBuffer.h void DBuffer::SetTo(const char *string) { SetTo((const uint8_t *)string, strlen(string) + 1); } void DBuffer::SetTo(DBuffer *other) { SetTo(other->Data(), other->Length()); } void DBuffer::SetTo(DBuffer &other) { SetTo(other.Data(), other.Length()); } /* void c------------------------------() {} */ void DBuffer::ReplaceUnprintableChars() { char *data = (char *)fData; int length = fLength; int i; for(i=0;i 127) && data[i] != 0) { data[i] = '`'; } } } /* void c------------------------------() {} */ DBuffer& DBuffer::operator= (const DBuffer &other) { SetTo((DBuffer *)&other); return *this; } // return the data contained in the buffer uint8_t *DBuffer::Data() { return (uint8_t *)fData; } // return the data contained in the buffer, and "steal" the pointer from the DBuffer // so that the caller obtains ownership of it and the DBuffer contents are lost. // the contents of the DBuffer are undefined after this function returns. // It is intended for quickly returning C-style pointers to data from functions which use // DBuffer internally to build the data. uint8_t *DBuffer::TakeData() { if (!fAllocdExternal) { // we can't give them ownership of the data, because it's still small enough // that it's located within our own object. So give them a copy instead. uint8_t *copy = (uint8_t *)malloc(fLength); memcpy(copy, fData, fLength); return copy; } uint8_t *data = fData; // save our pointer fData = NULL; // now forget it, so it's not freed in the destructor fAllocdExternal = false; // revert to internal data buffer return data; } // return the data, along with a trailing null-terminator char *DBuffer::String() { // ensure the data returned is null-terminated if (fLength == 0 || fData[fLength - 1] != 0) { EnsureAlloc(fLength + 1); fData[fLength] = '\0'; } return (char *)fData; } // return the length of the buffer. note that this will include // any null-terminators. int DBuffer::Length() { return fLength; } ================================================ FILE: common/DBuffer.fdh ================================================ //hash:00000000 //automatically generated by Makegen ================================================ FILE: common/DBuffer.h ================================================ #ifndef _DBUFFER_H #define _DBUFFER_H #include "basics.h" #include #include #include /* DBuffer vs. DString The difference is that with a DBuffer, if you AppendString() multiple times, you will get null-terminators in between each string. With a DString, the strings will be concatenated. You can override this behavior in a DBuffer by calling AppendStringNoNull instead of AppendString, but there is no function for inserting NULLs into a DString, as that doesn't make sense. */ #define DBUFFER_BUILTIN_SIZE 16 class DBuffer { public: DBuffer(); ~DBuffer(); void SetTo(const uint8_t *data, int length); void SetTo(const char *string); void SetTo(DBuffer *other); void SetTo(DBuffer &other); void AppendData(const uchar *data, int length); void AppendString(const char *str); void AppendStringNoNull(const char *str); void AppendBool(bool value); void AppendChar(uchar ch); void Append8(uint8_t value); void Append16(uint16_t value); void Append24(uint32_t value); void Append32(uint32_t value); bool ReadTo(DBuffer *line, uchar ch, bool add_null=true); void EnsureAlloc(int min_required); void ReplaceUnprintableChars(); DBuffer &operator= (const DBuffer &other); // --------------------------------------- void Clear(); uint8_t *Data(); uint8_t *TakeData(); char *String(); int Length(); private: uint8_t *fData; int fLength; int fAllocSize; bool fAllocdExternal; uint8_t fBuiltInData[DBUFFER_BUILTIN_SIZE]; }; inline void DBuffer::EnsureAlloc(int min_required) { if (min_required > fAllocSize) { fAllocSize = (min_required + (min_required >> 1)); if (fAllocdExternal) { fData = (uint8_t *)realloc(fData, fAllocSize); } else { fData = (uint8_t *)malloc(fAllocSize); fAllocdExternal = true; // compatibility with String() - copy the potential extra null-terminator int copysize = (fLength + 1); if (copysize > fAllocSize) copysize = fAllocSize; memcpy(fData, fBuiltInData, copysize); } } } inline void DBuffer::Clear() { // free any external memory and switch back to builtin if (fAllocdExternal) { free(fData); fData = &fBuiltInData[0]; fAllocSize = DBUFFER_BUILTIN_SIZE; fAllocdExternal = false; } fLength = 0; } inline void DBuffer::SetTo(const uint8_t *data, int length) { // SetTo from a portion of ourselves if (data >= fData && data <= fData + (fLength - 1)) { uint8_t *tempBuffer = (uint8_t *)malloc(length); memcpy(tempBuffer, data, length); SetTo(tempBuffer, length); free(tempBuffer); return; } if (fAllocdExternal && length < DBUFFER_BUILTIN_SIZE) { free(fData); fData = &fBuiltInData[0]; fAllocSize = DBUFFER_BUILTIN_SIZE; fAllocdExternal = false; } else if (length > fAllocSize) { // we are growing, so allocate more memory if (fAllocdExternal) free(fData); fAllocdExternal = true; fAllocSize = (length + 16); // arbitrary, is just space for growing fData = (uint8_t *)malloc(fAllocSize); } if (length) memcpy(fData, data, length); fLength = length; } inline void DBuffer::AppendChar(uchar ch) { AppendData((uchar *)&ch, 1); } inline void DBuffer::Append8(uint8_t value) { AppendData((uchar *)&value, 1); } #endif ================================================ FILE: common/DString.cpp ================================================ #include #include #include #include "DString.h" #include "DString.fdh" DString::DString() { } DString::DString(const char *str) { SetTo(str); } DString::DString(const char *str, int length) { SetTo(str, length); } DString::DString(DString &other) { SetTo(other.String(), other.Length()); } /* void c------------------------------() {} */ void DString::SetTo(const char *str, int length) { fBuffer.SetTo((uint8_t *)str, length); } void DString::SetTo(const char *str) { fBuffer.SetTo((uint8_t *)str, strlen(str)); } void DString::SetTo(DString *other) { fBuffer.SetTo(other->fBuffer.Data(), other->fBuffer.Length()); } void DString::SetTo(DString &other) { fBuffer.SetTo(other.fBuffer.Data(), other.fBuffer.Length()); } /* void c------------------------------() {} */ void DString::AppendString(const char *str) { fBuffer.AppendData((uint8_t *)str, strlen(str)); } void DString::AppendString(const char *str, int length) { fBuffer.AppendData((uint8_t *)str, length); } void DString::AppendChar(uchar ch) { fBuffer.AppendData((uint8_t *)&ch, 1); } /* void c------------------------------() {} */ void DString::ReplaceString(const char *repstr_old, const char *repstr_new) { DString newString; char *str = String(); char *ptr = str; int oldLength, newLength; char *hit; for(;;) { hit = strstr(ptr, repstr_old); if (!hit) { // first time around the loop? if so then we don't need // to do any copying as we won't modify ourselves anyway. if (ptr == str) return; newString.AppendString(ptr); break; } // defer calling the strlens until we're sure we need them // (by now we know there is an occurance of repstr_old within the original string). if (ptr == str) { oldLength = strlen(repstr_old); if (oldLength == 0) return; newLength = strlen(repstr_new); } // add substring up to the hit newString.AppendString(ptr, (hit - ptr)); newString.AppendString(repstr_new, newLength); ptr = (hit + oldLength); } SetTo(newString); } /*{ char *str = String(); char *hit = strstr(str, oldstring); if (!hit) return; // avoid strlens in common case of no hits int oldlen = strlen(oldstring); int newlen = strlen(newstring); for(;;) { DString temp(str, (hit - str)); temp.AppendString(newstring); temp.AppendString(hit + oldlen); SetTo(temp.String()); int index = (hit - str) + newlen; str = String() + index; hit = strstr(str, oldstring); if (!hit) break; } }*/ /* void c------------------------------() {} */ void DString::EnsureAlloc(int min_required) { fBuffer.EnsureAlloc(min_required); } void DString::ReplaceUnprintableChars() { fBuffer.ReplaceUnprintableChars(); } /* void c------------------------------() {} */ void DString::Clear() { fBuffer.Clear(); } int DString::Length() { return fBuffer.Length(); } char *DString::String() { return fBuffer.String(); } ================================================ FILE: common/DString.fdh ================================================ //hash:aa5032f8 //automatically generated by Makegen /* located in tsc.cpp */ //----------------[referenced from common/DString.cpp]---------------// void Clear(); ================================================ FILE: common/DString.h ================================================ #ifndef _DSTRING_H #define _DSTRING_H #include "basics.h" #include "DBuffer.h" /* DString vs. DBuffer The difference is that with a DBuffer, if you AppendString() multiple times, you will get null-terminators in between each string. With a DString, the strings will be concatenated. You can override this behavior in a DBuffer by calling AppendStringNoNull instead of AppendString, but there is no function for inserting NULLs into a DString, as that doesn't make sense. */ class DString { public: DString(); DString(const char *string); DString(const char *string, int length); DString(DString &other); void SetTo(const char *string); void SetTo(const char *string, int length); void SetTo(DString *other); void SetTo(DString &other); void AppendString(const char *str); void AppendString(const char *str, int length); void AppendChar(uchar ch); void ReplaceString(const char *repstr_old, const char *repstr_new); void EnsureAlloc(int min_required); void Clear(); char *String(); int Length(); void ReplaceUnprintableChars(); private: DBuffer fBuffer; }; #endif ================================================ FILE: common/FileBuffer.cpp ================================================ #include #include "FileBuffer.h" FileBuffer::FileBuffer() { fMaxSize = 0; fFP = NULL; } void FileBuffer::SetBufferSize(int maxsize) { fMaxSize = maxsize; } void FileBuffer::SetFile(FILE *fp) { fFP = fp; } /* void c------------------------------() {} */ void FileBuffer::Write8(uint8_t data) { fBuffer.Append8(data); CheckFlush(fMaxSize); } void FileBuffer::Write16(uint16_t data) { fBuffer.Append16(data); CheckFlush(fMaxSize); } void FileBuffer::Write32(uint32_t data) { fBuffer.Append32(data); CheckFlush(fMaxSize); } /* void c------------------------------() {} */ void FileBuffer::CheckFlush(int maxsize) { if (fBuffer.Length() >= maxsize) { if (fFP) { //stat("CheckFlush wrote %d bytes", fBuffer.Length()); fwrite(fBuffer.Data(), fBuffer.Length(), 1, fFP); fBuffer.Clear(); } else { staterr("CheckFlush: no file"); } } } void FileBuffer::Flush() { CheckFlush(0); } void FileBuffer::Dump() { fBuffer.Clear(); } ================================================ FILE: common/FileBuffer.fdh ================================================ //hash:78d0206c //automatically generated by Makegen /* located in tsc.cpp */ //---------------[referenced from common/FileBuffer.cpp]-------------// void Clear(); /* located in common/stat.cpp */ //---------------[referenced from common/FileBuffer.cpp]-------------// void staterr(const char *fmt, ...); ================================================ FILE: common/FileBuffer.h ================================================ #ifndef _FILEBUFFER_H #define _FILEBUFFER_H #include "DBuffer.h" class FileBuffer { public: FileBuffer(); void SetBufferSize(int maxsize); void SetFile(FILE *fp); void Write8(uint8_t data); void Write16(uint16_t data); void Write32(uint32_t data); void Flush(); void Dump(); private: void CheckFlush(int maxsize); DBuffer fBuffer; int fMaxSize; FILE *fFP; }; #endif ================================================ FILE: common/InitList.cpp ================================================ // this is a combination of some C++ and preprocessor magic which allows a // group of initilization functions to be declared across many different // source files and then at the appropriate time all can be called at once. // The "trick" is that it automatically works for all modules linked to the // program so you don't have to keep a handmade list anywhere of the names // of the initilization functions. This is used by the AI functions to initilize // all the function pointers etc for the various creatures. #include "InitList.h" #include "InitList.fdh" void InitList::AddFunction(void (*func)(void)) { AddFunction((void *)func); } void InitList::AddFunction(bool (*func)(void)) { AddFunction((void *)func); } void InitList::AddFunction(void *func) { //stat("AddFunction (void)%08x [%d]", func, fCount); if (fCount >= MAX_INIT_RECORDS) return; fFunctions[fCount++] = (void *)func; } /* void c------------------------------() {} */ bool InitList::CallFunctions() { int i; if (fCount >= MAX_INIT_RECORDS) { stat("InitList::CallFunctions(%08x): too many initializers", this); return 1; } stat("InitList::CallFunctions(%08x): executing %d functions...", this, fCount); for(i=0;iAddFunction(func); } InitAdder(InitList *initlist, bool (*func)(void)) { initlist->AddFunction(func); } InitAdder(InitList &initlist, void (*func)(void)) { initlist.AddFunction(func); } InitAdder(InitList &initlist, bool (*func)(void)) { initlist.AddFunction(func); } }; #define INITFUNC(TARGET) \ static void __InitFunc(void); \ static InitAdder _ia(TARGET, __InitFunc); \ static void __InitFunc(void) \ #endif ================================================ FILE: common/StringList.cpp ================================================ #include #include #include "StringList.h" #include "StringList.fdh" StringList::~StringList() { MakeEmpty(); } /* void c------------------------------() {} */ void StringList::Shuffle() { int i, count = CountItems(); for(i=0;i: '%s'", i, str, str ? str : "(null)"); } } /* void c------------------------------() {} */ char *StringList::StringAt(int index) const { return (char *)BList::ItemAt(index); } void StringList::MakeEmpty() { int i, count = CountItems(); for(i=0;i /* this must be located before the include of sys/types.h */ #if !defined(_SYS_TYPES_H) && !defined(_SYS_TYPES_H_) typedef unsigned long ulong; typedef unsigned int uint; typedef unsigned short ushort; #endif //#include //#include //#include /* Shorthand type formats */ typedef int8_t int8; typedef uint8_t uint8; typedef volatile int8_t vint8; typedef volatile uint8_t vuint8; typedef int16_t int16; typedef uint16_t uint16; typedef volatile int16_t vint16; typedef volatile uint16_t vuint16; typedef int32_t int32; typedef uint32_t uint32; typedef volatile int32_t vint32; typedef volatile uint32_t vuint32; typedef int64_t int64; typedef uint64_t uint64; typedef volatile int64_t vint64; typedef volatile uint64_t vuint64; typedef volatile long vlong; typedef volatile int vint; typedef volatile short vshort; typedef volatile char vchar; typedef volatile unsigned long vulong; typedef volatile unsigned int vuint; typedef volatile unsigned short vushort; typedef volatile unsigned char vuchar; typedef unsigned char uchar; typedef unsigned short unichar; /* Descriptive formats */ typedef int32 status_t; typedef int64 bigtime_t; typedef uint32 type_code; typedef uint32 perform_code; /* Empty string ("") */ #ifdef __cplusplus extern const char *B_EMPTY_STRING; #endif #ifndef INT8_MAX #define INT8_MAX 0x7f #endif #ifndef INT16_MAX #define INT16_MAX 0x7fff #endif #ifndef INT32_MAX #define INT32_MAX 0x7fffffff #endif #ifndef INT64_MAX #define INT64_MAX 0x7fffffffffffffff #endif #ifndef UINT8_MAX #define UINT8_MAX 0xff #endif #ifndef UINT16_MAX #define UINT16_MAX 0xffff #endif #ifndef UINT32_MAX #define UINT32_MAX 0xffffffffffffffff #endif /* min and max comparisons */ #ifndef __cplusplus # ifndef min # define min(a,b) ((a)>(b)?(b):(a)) # endif # ifndef max # define max(a,b) ((a)>(b)?(a):(b)) # endif #endif /* min() and max() won't work in C++ */ #define min_c(a,b) ((a)>(b)?(b):(a)) #define max_c(a,b) ((a)>(b)?(a):(b)) /* Grandfathering */ //#ifndef __cplusplus //# include //#endif #ifndef NULL # define NULL (0) #endif #ifdef __cplusplus extern "C" { #endif /* Atomic functions; previous value is returned */ extern int32 atomic_set(vint32 *value, int32 newValue); extern int32 atomic_test_and_set(vint32 *value, int32 newValue, int32 testAgainst); extern int32 atomic_add(vint32 *value, int32 addValue); extern int32 atomic_and(vint32 *value, int32 andValue); extern int32 atomic_or(vint32 *value, int32 orValue); extern int32 atomic_get(vint32 *value); extern int64 atomic_set64(vint64 *value, int64 newValue); extern int64 atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst); extern int64 atomic_add64(vint64 *value, int64 addValue); extern int64 atomic_and64(vint64 *value, int64 andValue); extern int64 atomic_or64(vint64 *value, int64 orValue); extern int64 atomic_get64(vint64 *value); /* Other stuff */ extern void* get_stack_frame(void); #ifdef __cplusplus } #endif /* Obsolete or discouraged API */ /* use 'true' and 'false' */ #ifndef FALSE # define FALSE 0 #endif #ifndef TRUE # define TRUE 1 #endif #endif /* _SUPPORT_DEFS_H */ ================================================ FILE: common/basics.h ================================================ #ifndef _BASICS_H #define _BASICS_H #include #ifdef __clang__ #define MAXPATHLEN 256 #else #include // MAXPATHLEN #endif #ifndef PATH_MAX #define PATH_MAX 259 #endif typedef unsigned char uchar; void stat(const char *fmt, ...); void staterr(const char *fmt, ...); #define ASSERT(X) \ { \ if (!(X)) \ { \ staterr("** ASSERT FAILED: '%s' at %s(%d)", #X, __FILE__, __LINE__); \ exit(1); \ } \ } #define SWAP(A, B) { A ^= B; B ^= A; A ^= B; } #ifndef MIN #define MIN(A, B) ( ( (A) < (B) ) ? (A) : (B) ) #endif #ifndef MAX #define MAX(A, B) ( ( (A) > (B) ) ? (A) : (B) ) #endif #endif ================================================ FILE: common/bufio.cpp ================================================ #include #include #include "DBuffer.h" #include "bufio.fdh" uint8_t read_U8(const uint8_t **data, const uint8_t *data_end) { if (*data > data_end) { staterr("read_U8: read past end of buffer: *data > data_end"); return 0xfe; } return *(*data)++; } uint16_t read_U16(const uint8_t **data, const uint8_t *data_end) { const uint8_t *ptr = *data; if ((ptr + 1) > data_end) { staterr("read_U16: read past end of buffer: *data + 1 > data_end"); return 0xfefe; } *data = (ptr + 2); // we should not just cast to a uint16_t, as some processors // e.g. ARM would have alignment issues then, plus endian issues on others. return (ptr[1] << 8) | ptr[0]; } uint32_t read_U32(const uint8_t **data, const uint8_t *data_end) { const uint8_t *ptr = *data; if ((ptr + 3) > data_end) { staterr("read_U32: read past end of buffer: *data + 3 > data_end"); return 0xfefefefe; } *data = (ptr + 4); return (ptr[3] << 24) | (ptr[2] << 16) | (ptr[1] << 8) | ptr[0]; } /* void c------------------------------() {} */ void write_U8(DBuffer *buffer, uint8_t data) { buffer->AppendData((uint8_t *)&data, 1); } void write_U16(DBuffer *buffer, uint16_t data) { buffer->AppendData((uint8_t *)&data, 2); } void write_U32(DBuffer *buffer, uint32_t data) { buffer->AppendData((uint8_t *)&data, 4); } void write_U64(DBuffer *buffer, uint64_t data) { buffer->AppendData((uint8_t *)&data, 8); } void write_F32(DBuffer *buffer, float data) { buffer->AppendData((uint8_t *)&data, 4); } void write_F64(DBuffer *buffer, double data) { buffer->AppendData((uint8_t *)&data, 8); } /* void c------------------------------() {} */ uint32_t read_U24(const uint8_t **data, const uint8_t *data_end) { uint32_t a, b; a = read_U16(data, data_end); b = read_U8(data, data_end); return a | (b << 16); } void write_U24(DBuffer *buffer, uint32_t data) { write_U16(buffer, data); write_U8(buffer, data >> 16); } /* void c------------------------------() {} */ char read_char(const char **data, const char *data_end) { return (char)read_U8((const uint8_t **)data, (const uint8_t *)data_end); } char read_nonblank_char(const char **data, const char *data_end) { char ch; for(;;) { if (*data > data_end) { staterr("read_nonblank_char: read past end of buffer: *data > data_end"); return 254; } ch = read_char(data, data_end); if (ch != ' ' && ch != '\t' && ch != '\n' && ch != '\r') break; } return ch; } /* void c------------------------------() {} */ char *read_string(const uint8_t **data, const uint8_t *data_end) { DBuffer buffer; read_Variable(&buffer, data, data_end); return strdup(buffer.String()); } void read_Variable(DBuffer *out, const uint8_t **data, const uint8_t *data_end) { uint8_t len = read_U8(data, data_end); const uint8_t *ptr = *data; if ((ptr + (len - 1)) > data_end) { staterr("read_Variable: read past end of buffer: *ptr+len > data_end"); return; } out->SetTo(ptr, len); *data = (ptr + len); } void write_Variable(DBuffer *out, DBuffer *in) { write_Variable(out, in->Data(), in->Length()); } void write_Variable(DBuffer *out, const uint8_t *data, int len) { if (len > 255) { staterr("write_Variable: input length > 255"); len = 255; } out->AppendChar(len); out->AppendData(data, len); } void read_Variable16(DBuffer *out, const uint8_t **data, const uint8_t *data_end) { uint16_t len = read_U16(data, data_end); const uint8_t *ptr = *data; if ((ptr + (len - 1)) > data_end) { staterr("read_Variable16: read past end of buffer: *ptr+len > data_end"); return; } out->SetTo(ptr, len); *data = (ptr + len); } void write_Variable16(DBuffer *out, DBuffer *in) { int len = in->Length(); if (len > 65535) { staterr("write_Variable16: input length > 65535"); len = 65535; } out->Append16(len); out->AppendData(in->Data(), len); } ================================================ FILE: common/bufio.fdh ================================================ //hash:f4b316a6 //automatically generated by Makegen /* located in common/bufio.cpp */ //-----------------[referenced from common/bufio.cpp]----------------// uint8_t read_U8(const uint8_t **data, const uint8_t *data_end); uint16_t read_U16(const uint8_t **data, const uint8_t *data_end); uint32_t read_U32(const uint8_t **data, const uint8_t *data_end); void write_U8(DBuffer *buffer, uint8_t data); void write_U16(DBuffer *buffer, uint16_t data); void write_U32(DBuffer *buffer, uint32_t data); void write_U64(DBuffer *buffer, uint64_t data); void write_F32(DBuffer *buffer, float data); void write_F64(DBuffer *buffer, double data); uint32_t read_U24(const uint8_t **data, const uint8_t *data_end); void write_U24(DBuffer *buffer, uint32_t data); char read_char(const char **data, const char *data_end); char read_nonblank_char(const char **data, const char *data_end); char *read_string(const uint8_t **data, const uint8_t *data_end); void read_Variable(DBuffer *out, const uint8_t **data, const uint8_t *data_end); void write_Variable(DBuffer *out, DBuffer *in); void write_Variable(DBuffer *out, const uint8_t *data, int len); void read_Variable16(DBuffer *out, const uint8_t **data, const uint8_t *data_end); void write_Variable16(DBuffer *out, DBuffer *in); /* located in common/stat.cpp */ //-----------------[referenced from common/bufio.cpp]----------------// void staterr(const char *fmt, ...); ================================================ FILE: common/bufio.h ================================================ #ifndef _BUFIO_H #define _BUFIO_H #include "bufio.fdh" void write_Variable(DBuffer *out, const uint8_t *data, int len); void write_Variable(DBuffer *out, DBuffer *in); #endif ================================================ FILE: common/llist.h ================================================ #ifndef _LLIST_H #define _LLIST_H // this file provides macros which implement common operations on linked lists. // this saves a little bit of thinking and helps prevent bugs caused by // forgetting one of the steps. // call them giving them the node to work on and the names of the fields // for next, prev, first and last nodes. // add a node to the end of a linked list #define LL_ADD_END(O, PREV, NEXT, FIRST, LAST) \ { \ if (LAST) \ LAST->NEXT = O; \ else \ FIRST = O; \ \ O->PREV = LAST; \ O->NEXT = NULL; \ LAST = O; \ } // add a node at the start of a linked list #define LL_ADD_BEGIN(O, PREV, NEXT, FIRST, LAST) \ { \ O->NEXT = FIRST; \ O->PREV = NULL; \ \ if (FIRST) \ FIRST->PREV = O; \ else \ FIRST = LAST = O; \ } // insert a node just before another node #define LL_INSERT_BEFORE(O, BEHIND, PREV, NEXT, FIRST, LAST) \ { \ if (BEHIND == FIRST) \ FIRST = O; \ else \ BEHIND->PREV->NEXT = O; \ \ O->NEXT = BEHIND; \ O->PREV = BEHIND->PREV; \ BEHIND->PREV = O; \ } // insert a node just after another node #define LL_INSERT_AFTER(O, AFTER, PREV, NEXT, FIRST, LAST) \ { \ if (AFTER == LAST) \ LAST = O; \ else \ AFTER->NEXT->PREV = O; \ \ O->NEXT = AFTER->NEXT; \ O->PREV = AFTER; \ AFTER->NEXT = O; \ } // remove a node from a linked list #define LL_REMOVE(O, PREV, NEXT, FIRST, LAST) \ { \ if (O == FIRST) \ FIRST = FIRST->NEXT; \ else if (O->PREV) \ O->PREV->NEXT = O->NEXT; \ \ if (O == LAST) \ LAST = LAST->PREV; \ else if (O->NEXT) \ O->NEXT->PREV = O->PREV; \ } // debug function #define LL_DUMP_LIST(START, PREV, NEXT, NODETYPE) \ { \ stat("LL_DUMP_LIST from %s using %s", #START, #NEXT); \ \ NODETYPE *n = START; \ int iter = 0; \ while(n) \ { \ stat("%d: %08x P:%08x N:%08x", iter++, n, n->PREV, n->NEXT); \ n = n->NEXT; \ } \ } #endif ================================================ FILE: common/misc.fdh ================================================ //hash:dacee9eb //automatically generated by Makegen /* located in platform.cpp */ //------------------[referenced from common/misc.cpp]----------------// FILE *fileopen(const char *fname, const char *mode); /* located in common/stat.cpp */ //------------------[referenced from common/misc.cpp]----------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //------------------[referenced from common/misc.cpp]----------------// uint16_t fgeti(FILE *fp); uint16_t fgeti(FILE *fp, int *eof); uint32_t fgetl(FILE *fp); uint32_t fgetl(FILE *fp, int *eof); void fputi(uint16_t word, FILE *fp); void fputl(uint32_t word, FILE *fp); uint16_t fgeti(FILE *fp); uint32_t fgetl(FILE *fp); void fputi(uint16_t word, FILE *fp); void fputl(uint32_t word, FILE *fp); double fgetfloat(FILE *fp); void fputfloat(double q, FILE *fp); void freadstring(FILE *fp, char *buf, int max); void fputstring(const char *buf, FILE *fp); void fputstringnonull(const char *buf, FILE *fp); bool fverifystring(FILE *fp, const char *str); void fgetcsv(FILE *fp, char *str, int maxlen); int fgeticsv(FILE *fp); double fgetfcsv(FILE *fp); void fgetline(FILE *fp, char *str, int maxlen); int filesize(FILE *fp); bool file_exists(const char *fname); char *stprintf(const char *fmt, ...); int random(int min, int max); uint32_t getrand(); void seedrand(uint32_t newseed); bool strbegin(const char *bigstr, const char *smallstr); bool strcasebegin(const char *bigstr, const char *smallstr); int count_string_list(const char *list[]); char *GetStaticStr(void); void maxcpy(char *dst, const char *src, int maxlen); void fresetboolean(void); char fbooleanread(FILE *fp); void fbooleanwrite(char bit, FILE *fp); void fbooleanflush(FILE *fp); ================================================ FILE: common/misc_comm.cpp ================================================ #include #include #include #include #include #include #include #include #include "basics.h" #include "misc.fdh" void stat(const char *fmt, ...); #if __BYTE_ORDER == __LITTLE_ENDIAN uint16_t fgeti(FILE *fp) { uint16_t value; int eof; value = fgeti(fp, &eof); if (eof) { staterr("fgeti: eof reached while reading uint16_t from file"); fclose(fp); exit(1); } return value; } uint16_t fgeti(FILE *fp, int *eof) { uint16_t value; if (fread(&value, 2, 1, fp) != 1 && ferror(fp)) { staterr("fgeti: error reading uint16_t from file: %s", strerror(errno)); fclose(fp); exit(1); } *eof = feof(fp); return value; } uint32_t fgetl(FILE *fp) { uint32_t value; int eof; value = fgetl(fp, &eof); if (eof) { staterr("fgetl: eof reached while reading uint32_t from file"); fclose(fp); exit(1); } return value; } uint32_t fgetl(FILE *fp, int *eof) { uint32_t value; if (fread(&value, 4, 1, fp) != 1 && ferror(fp)) { staterr("fgetl: error reading uint32_t from file: %s", strerror(errno)); fclose(fp); exit(1); } *eof = feof(fp); return value; } void fputi(uint16_t word, FILE *fp) { fwrite(&word, 2, 1, fp); } void fputl(uint32_t word, FILE *fp) { fwrite(&word, 4, 1, fp); } #else uint16_t fgeti(FILE *fp) { uint16_t value; int eof; value = fgeti(fp, &eof); if (eof) { staterr("fgeti: eof reached while reading uint16_t from file"); fclose(fp); exit(1); } return value; } uint16_t fgeti(FILE *fp, int *eof) { uint16_t a, b; eof = 0; if ((a = fgetc(fp)) == EOF) goto error; if ((b = fgetc(fp)) == EOF) goto error; return (b << 8) | a; error: if (ferror(fp)) { staterr("fgeti: error reading uint16_t from file"); fclose(fp); exit(1); } *eof = feof(fp); return 0; } uint32_t fgetl(FILE *fp) { uint32_t value; int eof; value = fgetl(fp, &eof); if (eof) { staterr("fgetl: eof reached while reading uint32_t from file"); fclose(fp); exit(1); } return value; } uint32_t fgetl(FILE *fp, int *eof) { uint32_t a, b, c, d; eof = 0; if ((a = fgetc(fp)) == EOF) goto error; if ((b = fgetc(fp)) == EOF) goto error; if ((c = fgetc(fp)) == EOF) goto error; if ((d = fgetc(fp)) == EOF) goto error; return (d<<24)|(c<<16)|(b<<8)|(a); error: if (ferror(fp)) { staterr("fgetl: error reading uint32_t from file"); fclose(fp); exit(1); } *eof = feof(fp); return 0; } void fputi(uint16_t word, FILE *fp) { fputc(word, fp); fputc(word >> 8, fp); } void fputl(uint32_t word, FILE *fp) { fputc(word, fp); fputc(word >> 8, fp); fputc(word >> 16, fp); fputc(word >> 24, fp); } #endif // __BYTE_ORDER == __LITTLE_ENDIAN double fgetfloat(FILE *fp) { char buf[16]; double *float_ptr; int i; for(i=0;i<4;i++) fgetc(fp); for(i=0;i<8;i++) buf[i] = fgetc(fp); float_ptr = (double *)&buf[0]; return *float_ptr; } void fputfloat(double q, FILE *fp) { char *float_ptr; int i; float_ptr = (char *)&q; for(i=0;i<4;i++) fputc(0, fp); for(i=0;i<8;i++) fputc(float_ptr[i], fp); return; } // read a string from a file until a null is encountered void freadstring(FILE *fp, char *buf, int max) { int i; --max; for(i=0;i=0;k--) { if (str[k] != 13 && str[k] != 10) break; str[k] = 0; } } int filesize(FILE *fp) { int cp, sz; cp = ftell(fp); fseek(fp, 0, SEEK_END); sz = ftell(fp); fseek(fp, cp, SEEK_SET); return sz; } bool file_exists(const char *fname) { FILE *fp; fp = fileopen(fname, "rb"); if (!fp) return 0; fclose(fp); return 1; } char *stprintf(const char *fmt, ...) { va_list ar; char *str = GetStaticStr(); va_start(ar, fmt); vsnprintf(str, 255, fmt, ar); va_end(ar); return str; } /* void c------------------------------() {} */ static uint32_t seed = 0; // return a random number between min and max inclusive int random(int min, int max) { int range, val; if (max < min) { staterr("random(): warning: max < min [%d, %d]", min, max); min ^= max; max ^= min; min ^= max; } range = (max - min); if (range >= RAND_MAX) { staterr("random(): range > RAND_MAX", min, max); return 0; } val = getrand() % (range + 1); return val + min; } uint32_t getrand() { seed = (seed * 0x343FD) + 0x269EC3; return seed; } void seedrand(uint32_t newseed) { seed = newseed; } /* void c------------------------------() {} */ bool strbegin(const char *bigstr, const char *smallstr) { int i; for(i=0;smallstr[i];i++) if (bigstr[i] != smallstr[i]) return false; return true; } bool strcasebegin(const char *bigstr, const char *smallstr) { int i; for(i=0;smallstr[i];i++) if (toupper(bigstr[i]) != toupper(smallstr[i])) return false; return true; } // returns how many strings are in a null-terminated array of C strings int count_string_list(const char *list[]) { int i; for(i=0;list[i];i++) ; return i; } char *GetStaticStr(void) { static int counter = 0; static struct { char str[1024]; } bufs[24]; if (++counter >= 24) counter = 0; return bufs[counter].str; } // a strncpy that works as you might expect void maxcpy(char *dst, const char *src, int maxlen) { int len = strlen(src); if (len >= maxlen) { if (maxlen >= 2) memcpy(dst, src, maxlen - 2); if (maxlen >= 1) dst[maxlen - 1] = 0; } else { memcpy(dst, src, len + 1); } } /* void c------------------------------() {} */ static int boolbyte, boolmask_r, boolmask_w; // prepare for a boolean read operation void fresetboolean(void) { boolmask_r = 256; boolmask_w = 1; boolbyte = 0; } // read a boolean value (a single bit) from a file char fbooleanread(FILE *fp) { char value; if (boolmask_r == 256) { boolbyte = fgetc(fp); boolmask_r = 1; } value = (boolbyte & boolmask_r) ? 1:0; boolmask_r <<= 1; return value; } void fbooleanwrite(char bit, FILE *fp) { if (boolmask_w == 256) { fputc(boolbyte, fp); boolmask_w = 1; boolbyte = 0; } if (bit) { boolbyte |= boolmask_w; } boolmask_w <<= 1; } void fbooleanflush(FILE *fp) { fputc(boolbyte, fp); boolmask_w = 1; } ================================================ FILE: common/stat.cpp ================================================ #include #include #include #include #include #include "graphics/font.h" #include "basics.h" #include "misc.fdh" #define MAXBUFSIZE 1024 char logfilename[64] = { 0 }; void writelog(const char *buf, bool append_cr); void SetLogFilename(const char *fname) { maxcpy(logfilename, fname, sizeof(logfilename)); remove(logfilename); } void writelog(const char *buf, bool append_cr) { FILE *fp; fp = fileopen(logfilename, "a+"); if (fp) { fputs(buf, fp); if (append_cr) fputc('\n', fp); fclose(fp); } } /* void c------------------------------() {} */ void stat(const char *fmt, ...) { va_list ar; char buffer[MAXBUFSIZE]; va_start(ar, fmt); vsnprintf(buffer, sizeof(buffer), fmt, ar); va_end(ar); #ifdef _L10N_CP1251 char buffer_w_u[MAXBUFSIZE]; NXFont::win1251_to_utf8(buffer, buffer_w_u); puts(buffer_w_u); fflush(stdout); if (logfilename[0]) writelog(buffer_w_u, true); #else puts(buffer); fflush(stdout); if (logfilename[0]) writelog(buffer, true); #endif } void staterr(const char *fmt, ...) { va_list ar; char buffer[MAXBUFSIZE]; va_start(ar, fmt); vsnprintf(buffer, sizeof(buffer), fmt, ar); va_end(ar); printf(" error << %s >> \n", buffer); fflush(stdout); if (logfilename[0]) { writelog(" error << ", false); writelog(buffer, false); writelog(" >>\n", false); } } ================================================ FILE: common/stat.fdh ================================================ //hash:cca537b6 //automatically generated by Makegen /* located in platform.cpp */ //------------------[referenced from common/stat.cpp]----------------// FILE *fileopen(const char *fname, const char *mode); /* located in common/stat.cpp */ //------------------[referenced from common/stat.cpp]----------------// void SetLogFilename(const char *fname); void writelog(const char *buf, bool append_cr); void stat(const char *fmt, ...); void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //------------------[referenced from common/stat.cpp]----------------// void maxcpy(char *dst, const char *src, int maxlen); ================================================ FILE: config.h ================================================ #ifndef _CONFIG_H #define _CONFIG_H // if set graphics scaling factor is changable at runtime (otherwise it's a #define) #define CONFIG_MUTABLE_SCALE // SDL_ttf support. if turned off SDL_ttf will not be required but only // bitmap fonts will be supported. #define CONFIG_ENABLE_TTF // include the Doukutsu data-file extractor in the build // (it's needed only the first time the program is run). #define CONFIG_DATA_EXTRACTOR // do image scaling in hardware via OpenGL //#define CONFIG_OPENGL #endif ================================================ FILE: console.cpp ================================================ #include "nx.h" #include #include "console.fdh" static CommandEntry commands[] = { "god", __god, 0, 1, "script", __script, 1, 1, "warp", __warp, 1, 999, "sound", __sound, 1, 1, "music", __music, 1, 1, "giveweapon", __giveweapon, 1, 1, "dropweapon", __dropweapon, 0, 1, "level", __level, 1, 1, "ammo", __ammo, 1, 1, "maxammo", __maxammo, 1, 1, "hp", __hp, 1, 1, "maxhp", __maxhp, 1, 1, "xp", __xp, 1, 1, "spawn", __spawn, 1, 999, "animate", __animate, 1, 2, "infinitedamage", __infinitedamage, 0, 1, "killall", __killall, 0, 0, "movemode", __movemode, 1, 1, "flag", __flag, 1, 1, "clearflags", __clearflags, 0, 0, "equip", __equip, 1, 2, "giveitem", __giveitem, 1, 1, "takeitem", __takeitem, 1, 1, "qua", __qua, 0, 1, "boa", __boa, 1, 1, "cre", __cre, 0, 0, "reset", __reset, 0, 0, "fps", __fps, 0, 1, "instant-quit", __set_iquit, 1, 1, "no-quake-in-hell", __set_noquake, 1, 1, "inhibit-fullscreen", __inhibit_fullscreen, 1, 1, "emulate-bugs", __emulate_bugs, 1, 1, "displayformat", __displayformat, 1, 1, "skip-intro", __skip_intro, 1, 1, "player->hide", __player_hide, 1, 1, "player->inputs_locked", __player_inputs_locked, 1, 1, "game.frozen", __game_frozen, 1, 1, "textbox.SetVisible", __textbox_setvisible, 1, 1, "hello", __hello, 0, 0, "hi", __hello, 0, 0, NULL, NULL }; DebugConsole::DebugConsole() { fVisible = false; fLineLen = 0; fCursorTimer = 0; fResponseTimer = 0; fLine[0] = 0; fResponse[0] = 0; fKeyDown = 0; fRepeatTimer = 0; } /* void c------------------------------() {} */ void DebugConsole::SetVisible(bool newstate) { //stat("DebugConsole::SetVisible(%s)", newstate?"true":"false"); if (fVisible != newstate) { fVisible = newstate; fKeyDown = 0; fRepeatTimer = 0; if (newstate) { fLine[0] = 0; fLineLen = 0; fBrowsingExpansion = false; fBackIndex = fBackBuffer.CountItems(); fResponse[0] = 0; fCursorTimer = 0; } } } bool DebugConsole::IsVisible() { return fVisible; } bool DebugConsole::HandleKey(int key) { if (!fVisible) return 0; if (key != 9) fBrowsingExpansion = false; if (key != fKeyDown) { fKeyDown = key; fRepeatTimer = 25; } else { fRepeatTimer = 1; } fCursorTimer = 0; switch(key) { case 27: case '`': { SetVisible(false); } break; case 13: case 271: // numeric enter { SetVisible(false); fLine[fLineLen] = 0; Execute(fLine); fLineLen = 0; } break; case 10: break; case 8: { if (fLineLen > 0) fLineLen--; } break; case 9: // command completion { fLine[fLineLen] = 0; ExpandCommand(); fBrowsingExpansion = true; fExpandIndex++; } break; // command backbuffer case SDLK_UP: case SDLK_DOWN: { if (fBackBuffer.CountItems() > 0) { fBackIndex += (key == SDLK_UP) ? -1 : 1; if (fBackIndex < 0) fBackIndex = (fBackBuffer.CountItems() - 1); else fBackIndex %= fBackBuffer.CountItems(); const char *str = fBackBuffer.StringAt(fBackIndex); maxcpy(fLine, str, sizeof(fLine) - 1); fLineLen = strlen(str); } } break; default: { if (fLineLen < (sizeof(fLine) - 1)) fLine[fLineLen++] = key; } break; } return 1; } void DebugConsole::HandleKeyRelease(int key) { if (key == fKeyDown) { fKeyDown = 0; fRepeatTimer = 0; } } /* void c------------------------------() {} */ void DebugConsole::Draw() { if (fResponse[0]) { this->DrawText(fResponse); if (--fResponseTimer <= 0) fResponse[0] = 0; } else if (fVisible) { // key-repeat if (fKeyDown) { if (--fRepeatTimer < 0) HandleKey(fKeyDown); } char buffer[CONSOLE_MAXCMDLEN + 10]; fLine[fLineLen] = 0; sprintf(buffer, "-> %s%c", fLine, (fCursorTimer < 20) ? '_' : ' '); this->DrawText(buffer); if (++fCursorTimer > 30) fCursorTimer = 0; } } void DebugConsole::DrawText(const char *text) { font_draw_shaded(4, (SCREEN_HEIGHT - 16), text); } /* void c------------------------------() {} */ void DebugConsole::Print(const char *fmt, ...) { va_list ar; va_start(ar, fmt); vsnprintf(fResponse, sizeof(fResponse), fmt, ar); va_end(ar); stat("%s", fResponse); fResponseTimer = 60; } /* void c------------------------------() {} */ bool DebugConsole::Execute(const char *line) { stat("DebugConsole::Execute('%s')", line); // record command in backbuffer if (fBackBuffer.CountItems() >= CONSOLE_MAX_BACK) fBackBuffer.RemoveString(0); fBackBuffer.AddString(line); // split command into arguments StringList args; char *cmd = SplitCommand(line, &args); if (cmd) { BList matches; MatchCommand(cmd, &matches); free(cmd); if (matches.CountItems() == 1) { CommandEntry *command = (CommandEntry *)matches.ItemAt(0); if (args.CountItems() < command->minArgs || \ args.CountItems() > command->maxArgs) { if (command->minArgs == command->maxArgs) { Print("'%s' requires %d argument%s", \ command->name, command->minArgs, \ (command->minArgs == 1) ? "":"s"); } else if (args.CountItems() < command->minArgs) { Print("'%s' requires at least %d argument%s", command->name, command->minArgs, (command->minArgs == 1) ? "":"s"); } else { Print("'%s' requires no more than %d arguments", command->name, command->maxArgs); } } else { void (*handler)(StringList *, int) = command->handler; int num = (args.CountItems() > 0) ? atoi(args.StringAt(0)) : 0; (*handler)(&args, num); return 1; } } else if (matches.CountItems() == 0) { Print("I don't understand"); } else { Print("Ambiguous command"); } } return 0; } void DebugConsole::MatchCommand(const char *cmd, BList *matches) { for(int i=0; commands[i].name; i++) { if (strcasebegin(commands[i].name, cmd)) matches->AddItem(&commands[i]); } } // split an input line into command and arguments // returns the command portion of the line. you must free this buffer. char *DebugConsole::SplitCommand(const char *line_in, StringList *args) { while(*line_in == ' ' || *line_in == '\t') line_in++; char *line = strdup(line_in); char *cmd = strtok(line, " \t"); if (cmd && cmd[0]) { while(const char *arg = strtok(NULL, " \t")) { args->AddString(arg); } return line; } free(line); return NULL; } // tab-expand the current command void DebugConsole::ExpandCommand() { StringList args; BList matches; char *cmd; fLine[fLineLen] = 0; if (!fBrowsingExpansion) { maxcpy(fLineToExpand, fLine, sizeof(fLineToExpand)); fExpandIndex = 0; } cmd = SplitCommand(fLineToExpand, &args); if (cmd) { MatchCommand(cmd, &matches); free(cmd); if (matches.CountItems() > 0) { if (fExpandIndex >= matches.CountItems()) fExpandIndex = 0; CommandEntry *command = (CommandEntry *)matches.ItemAt(fExpandIndex); DString newCommand(command->name); for(int i=0;;i++) { const char *arg = args.StringAt(i); if (!arg) break; newCommand.AppendChar(' '); newCommand.AppendString(arg); } if (args.CountItems() < command->minArgs) newCommand.AppendChar(' '); maxcpy(fLine, newCommand.String(), sizeof(fLine)); fLineLen = strlen(fLine); } } if (matches.CountItems() != 1) sound(SND_TINK); } /* void c------------------------------() {} */ #define Respond console.Print static void __god(StringList *args, int num) { bool enable; if (args->CountItems() == 0) enable = true; else enable = num; game.debug.god = enable; } static void __script(StringList *args, int num) { // release any focus a current script may have on us if (player->movementmode == MOVEMODE_NORMAL) map_focus(NULL); if (StartScript(num)) { Respond("Script %04d started.", num); } else { Respond("No such script %04d", num); } } static void __warp(StringList *args, int num) { if (num == 0) { DString stagename; for(int i=0;iCountItems();i++) { if (i != 0) stagename.AppendChar(' '); stagename.AppendString(args->StringAt(i)); } stat("Looking for '%s'", stagename.String()); for(num=0;;num++) { if (num >= num_stages) { if (!strcasecmp(stagename.String(), "village")) { num = 11; } else { Respond("Could determine stage number from your description."); return; } break; } if (strcasebegin(stages[num].stagename, stagename.String())) break; } } game.switchstage.mapno = num; game.switchstage.playerx = 16; game.switchstage.playery = 16; } static void __sound(StringList *args, int num) { sound(num); console.SetVisible(true); // keep console up } static void __music(StringList *args, int num) { extern const char *org_names[]; bool ok = true; int i; const char *name = args->StringAt(0); if (num == 0 && strcmp(name, "0") != 0) { for(i=1;;i++) { if (!org_names[i]) break; if (strcasebegin(org_names[i], name)) { num = i; break; } } if (num == 0) { Respond("Don't know that song."); return; } } if (num < 0) ok = false; else { for(i=1;i<=num;i++) { if (!org_names[i]) { ok = false; break; } } } if (!ok) { Respond("track out of range"); music(0); } else { music(0); music(num); if (org_names[num]) Respond("%s started", org_names[num]); } } static void __giveweapon(StringList *args, int num) { if (num >= 0 && num < WPN_COUNT) { player->weapons[num].hasWeapon = 1; player->weapons[num].maxammo = 0; // gives it unlimited ammo player->weapons[num].ammo = 0; player->curWeapon = num; } } static void __dropweapon(StringList *args, int num) { if (args->CountItems() == 0) num = player->curWeapon; player->weapons[num].hasWeapon = 0; player->weapons[num].maxammo = 0; player->weapons[num].ammo = 0; if (num == player->curWeapon) stat_NextWeapon(); } // set weapon level static void __level(StringList *args, int num) { num--; if (num < 0) num = 0; if (num > 2) num = 2; if (player->weapons[player->curWeapon].xp < 5) player->weapons[player->curWeapon].xp = 5; for(int timeout=0;timeout<500;timeout++) { if (player->weapons[player->curWeapon].level == num) { return; } else if (player->weapons[player->curWeapon].level < num) { AddXP(1); } else { SubXP(1); } } Respond("Timeout"); } static void __ammo(StringList *args, int num) { player->weapons[player->curWeapon].ammo = num; if (player->weapons[player->curWeapon].ammo > player->weapons[player->curWeapon].maxammo) player->weapons[player->curWeapon].maxammo = player->weapons[player->curWeapon].ammo; } static void __maxammo(StringList *args, int num) { player->weapons[player->curWeapon].maxammo = num; if (player->weapons[player->curWeapon].ammo > player->weapons[player->curWeapon].maxammo) player->weapons[player->curWeapon].ammo = player->weapons[player->curWeapon].maxammo; } static void __hp(StringList *args, int num) { player->hp = num; if (player->hp > player->maxHealth) player->maxHealth = player->hp; } static void __maxhp(StringList *args, int num) { player->maxHealth = num; if (player->hp > player->maxHealth) { player->hp = player->maxHealth; //PHealthBar.displayed_value = player->hp; } } static void __xp(StringList *args, int num) { player->weapons[player->curWeapon].xp = num; } static void __spawn(StringList *args, int num) { int i = 0; // if first argument is a number interpret it as a count of // objects to spawn. int count; if (isdigit(args->StringAt(0)[0])) { count = num; i++; } else { count = 1; } // reconstitute the arguments into the name of the object // to be spawned. DString objName; int starti = i; for(;;i++) { if (!args->StringAt(i)) break; if (i > starti) objName.AppendChar(' '); objName.AppendString(args->StringAt(i)); } // try and get object type from the provided name int type = ObjectNameToType(objName.String()); if (type == -1) { Respond("Unknown object. See object.h for definitions."); return; } // reset console animate flags on any previously spawned objects Object *o; FOREACH_OBJECT(o) { o->nxflags &= ~NXFLAG_CONSOLE_ANIMATE; } // get starting spawn position and spacing int x = player->x + ((player->dir==RIGHT) ? (24 << CSF) : -(24 << CSF)); int y = player->y - (16 << CSF); int w = (sprites[objprop[type].sprite].w + 4) << CSF; // create 'em for(i=0;idir = player->dir; o->nxflags |= NXFLAG_CONSOLE_ANIMATE; x += w; } if (count != 1) Respond("%s x%d", DescribeObjectType(type), count); else Respond("%s", DescribeObjectType(type)); } static void __animate(StringList *args, int num) { Object *o; if (args->CountItems() == 2) { // specifying explicitly by id2 o = FindObjectByID2(atoi(args->StringAt(0))); if (o) o->state = atoi(args->StringAt(1)); else Respond("Object not found."); return; } // animating implicitly from last spawn command bool found = false; FOREACH_OBJECT(o) { if (o->nxflags & NXFLAG_CONSOLE_ANIMATE) { o->state = num; found = true; } } if (!found) Respond("No objects found."); } static void __infinitedamage(StringList *args, int num) { if (args->CountItems() > 0) game.debug.infinite_damage = num; else game.debug.infinite_damage ^= 1; Respond(game.debug.infinite_damage ? "My, oh my..." : "Back to normal."); } static void __killall(StringList *args, int num) { for(int i=0;iflags & FLAG_SHOOTABLE) { o->flags &= ~FLAG_INVULNERABLE; o->DealDamage(999); } } } static void __movemode(StringList *args, int num) { player->movementmode = num; } static void __flag(StringList *args, int num) { game.flags[num] ^= 1; Respond("Flag %04d: %s", num, game.flags[num] ? "SET":"CLEARED"); } static void __clearflags(StringList *args, int num) { memset(game.flags, 0, sizeof(game.flags)); Respond("Warning- all game flags cleared"); } static void __equip(StringList *args, int num) { static const char *equiplist[] = { "booster08", "map", "armsbarrier", "turbocharge", "airtank", "booster20", "mimigamask", "whimstar", "nikumaru", NULL }; int i, mask; const char *item = args->StringAt(0); bool enable = args->StringAt(1) ? atoi(args->StringAt(1)) : true; mask = 0x01; for(i=0;equiplist[i];i++) { if (!strcasecmp(equiplist[i], item)) { // allow only booster 08 or booster 20 at a time if (mask & (EQUIP_BOOSTER08 | EQUIP_BOOSTER20)) player->equipmask &= ~(EQUIP_BOOSTER08 | EQUIP_BOOSTER20); if (enable) player->equipmask |= mask; else player->equipmask &= ~mask; Respond("Item %s (0x%04x) %sequipped.", equiplist[i], mask, enable ? "" : "un-"); return; } mask <<= 1; } Respond("Unknown item"); } static void __giveitem(StringList *args, int num) { if (FindInventory(num) == -1) { AddInventory(num); Respond("Added item %d to your inventory.", num); } else { Respond("You already have item %d in your inventory.", num); } } static void __takeitem(StringList *args, int num) { if (FindInventory(num) != -1) { DelInventory(num); Respond("Removed item %d from your inventory.", num); } else { Respond("You don't have item %d in your inventory.", num); } } static void __qua(StringList *args, int num) { if (args->CountItems() > 0) megaquake(50); else quake(50); } static void __boa(StringList *args, int num) { game.stageboss.SetState(num); } // skip to good ending sequence static void __cre(StringList *args, int num) { game.reset(); game.pause(0); game.setmode(GM_NORMAL); game.flags[1341] = true; game.switchstage.mapno = 70; game.switchstage.playerx = 16; game.switchstage.playery = 16; game.switchstage.eventonentry = 400; } static void __reset(StringList *args, int num) { game.reset(); } static void __fps(StringList *args, int num) { extern int fps; settings->show_fps ^= 1; settings_save(); fps = 0; } /* void c------------------------------() {} */ static void __set_iquit(StringList *args, int num) { settings->instant_quit = num; settings_save(); Respond("instant quit: %s", settings->instant_quit ? "enabled":"disabled"); } static void __set_noquake(StringList *args, int num) { settings->no_quake_in_hell = num; settings_save(); Respond("no quake in hell: %s", settings->no_quake_in_hell ? "enabled":"disabled"); } static void __inhibit_fullscreen(StringList *args, int num) { settings->inhibit_fullscreen = num; settings_save(); Respond("inhibit fullscreen: %s", settings->inhibit_fullscreen ? "enabled":"disabled"); } static void __emulate_bugs(StringList *args, int num) { settings->emulate_bugs = num; settings_save(); Respond("emulate bugs: %s", settings->emulate_bugs ? "enabled":"disabled"); } static void __displayformat(StringList *args, int num) { settings->displayformat = num; settings_save(); Graphics::FlushAll(); Respond("SDL_DisplayFormat: %s", settings->displayformat ? "on":"off"); } static void __skip_intro(StringList *args, int num) { settings->skip_intro = num; settings_save(); Respond("skip_intro: %s", settings->skip_intro ? "enabled":"disabled"); } /* void c------------------------------() {} */ static void __hello(StringList *args, int num) { Respond("I'm a computer, you ninny. Go get a real friend."); } /* void c------------------------------() {} */ static void __player_hide(StringList *args, int num) { player->hide = num; } static void __player_inputs_locked(StringList *args, int num) { player->inputs_locked = num; } static void __game_frozen(StringList *args, int num) { game.frozen = num; } static void __textbox_setvisible(StringList *args, int num) { textbox.SetVisible(num); } ================================================ FILE: console.fdh ================================================ //hash:5d27c89d //automatically generated by Makegen /* located in game.cpp */ //--------------------[referenced from console.cpp]------------------// void megaquake(int quaketime, int snd); void quake(int quaketime, int snd); /* located in ObjManager.cpp */ //--------------------[referenced from console.cpp]------------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //--------------------[referenced from console.cpp]------------------// void map_focus(Object *o, int spd); Object *FindObjectByID2(int id2); /* located in settings.cpp */ //--------------------[referenced from console.cpp]------------------// bool settings_save(Settings *setfile); /* located in playerstats.cpp */ //--------------------[referenced from console.cpp]------------------// void AddXP(int xp, bool quiet); void SubXP(int xp, bool quiet); int FindInventory(int item); void AddInventory(int item); void DelInventory(int item); /* located in statusbar.cpp */ //--------------------[referenced from console.cpp]------------------// void stat_NextWeapon(bool quiet); /* located in tsc.cpp */ //--------------------[referenced from console.cpp]------------------// ScriptInstance *StartScript(int scriptno, int pageno); /* located in debug.cpp */ //--------------------[referenced from console.cpp]------------------// int ObjectNameToType(const char *name_in); const char *DescribeObjectType(int type); /* located in console.cpp */ //--------------------[referenced from console.cpp]------------------// static void __god(StringList *args, int num); static void __script(StringList *args, int num); static void __warp(StringList *args, int num); static void __sound(StringList *args, int num); static void __music(StringList *args, int num); static void __giveweapon(StringList *args, int num); static void __dropweapon(StringList *args, int num); static void __level(StringList *args, int num); static void __ammo(StringList *args, int num); static void __maxammo(StringList *args, int num); static void __hp(StringList *args, int num); static void __maxhp(StringList *args, int num); static void __xp(StringList *args, int num); static void __spawn(StringList *args, int num); static void __animate(StringList *args, int num); static void __infinitedamage(StringList *args, int num); static void __killall(StringList *args, int num); static void __movemode(StringList *args, int num); static void __flag(StringList *args, int num); static void __clearflags(StringList *args, int num); static void __equip(StringList *args, int num); static void __giveitem(StringList *args, int num); static void __takeitem(StringList *args, int num); static void __qua(StringList *args, int num); static void __boa(StringList *args, int num); static void __cre(StringList *args, int num); static void __reset(StringList *args, int num); static void __fps(StringList *args, int num); static void __set_iquit(StringList *args, int num); static void __set_noquake(StringList *args, int num); static void __inhibit_fullscreen(StringList *args, int num); static void __emulate_bugs(StringList *args, int num); static void __displayformat(StringList *args, int num); static void __skip_intro(StringList *args, int num); static void __hello(StringList *args, int num); static void __player_hide(StringList *args, int num); static void __player_inputs_locked(StringList *args, int num); static void __game_frozen(StringList *args, int num); static void __textbox_setvisible(StringList *args, int num); /* located in graphics/font.cpp */ //--------------------[referenced from console.cpp]------------------// int font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font); /* located in sound/sound.cpp */ //--------------------[referenced from console.cpp]------------------// void sound(int snd); void music(int songno); /* located in common/stat.cpp */ //--------------------[referenced from console.cpp]------------------// void stat(const char *fmt, ...); /* located in common/misc.cpp */ //--------------------[referenced from console.cpp]------------------// void maxcpy(char *dst, const char *src, int maxlen); bool strcasebegin(const char *bigstr, const char *smallstr); ================================================ FILE: console.h ================================================ #ifndef _CONSOLE_H #define _CONSOLE_H #define CONSOLE_MAXCMDLEN 48 #define CONSOLE_MAXRESPONSELEN 48 // how many commands to remember in the backbuffer #define CONSOLE_MAX_BACK 8 struct CommandEntry { const char *name; void (*handler)(StringList *args, int num); int minArgs, maxArgs; }; class DebugConsole { public: DebugConsole(); void SetVisible(bool newstate); bool IsVisible(); bool HandleKey(int key); void HandleKeyRelease(int key); void Draw(); bool Execute(const char *line); void Print(const char *fmt, ...); private: void DrawText(const char *text); void MatchCommand(const char *cmd, BList *matches); char *SplitCommand(const char *line_in, StringList *args); void ExpandCommand(); char fLine[CONSOLE_MAXCMDLEN]; int fLineLen; int fKeyDown; int fRepeatTimer; char fLineToExpand[CONSOLE_MAXCMDLEN]; bool fBrowsingExpansion; int fExpandIndex; char fResponse[CONSOLE_MAXRESPONSELEN]; int fResponseTimer; int fCursorTimer; bool fVisible; // up-down last-command buffer int fBackIndex; StringList fBackBuffer; }; extern DebugConsole console; #endif ================================================ FILE: debug.cpp ================================================ #include "nx.h" #include #include #include "debug.fdh" #define MAX_DEBUG_MARKS 80 static struct { int x, y, x2, y2; char type; uchar r, g, b; } debugmarks[MAX_DEBUG_MARKS]; static int ndebugmarks = 0; static StringList DebugList; void DrawDebug(void) { if (settings->enable_debug_keys) { // handle debug keys if (justpushed(DEBUG_GOD_KEY)) { game.debug.god ^= 1; sound(SND_MENU_SELECT); } if (justpushed(DEBUG_SAVE_KEY)) { game_save(settings->last_save_slot); sound(SND_SWITCH_WEAPON); console.Print("Game saved."); } if (justpushed(F6KEY)) { game.debug.DrawBoundingBoxes ^= 1; sound(SND_COMPUTER_BEEP); } if (justpushed(F7KEY)) { SDL_SaveBMP(screen->GetSDLSurface(), "screen.bmp"); } if (justpushed(F9KEY)) { AddXP(1); } if (inputs[DEBUG_FLY_KEY]) { player->yinertia = -0x880; if (!player->hurt_time) player->hurt_time = 20; // make invincible } } /*if (game.debug.debugmode) { //debug("%d fps", game.debug.fps); if (game.debug.god) { //debug(""); player->weapons[player->curWeapon].level = 2; player->weapons[player->curWeapon].xp = player->weapons[player->curWeapon].max_xp[2]; player->weapons[player->curWeapon].ammo = player->weapons[player->curWeapon].maxammo; player->hp = player->maxHealth; } debug("%d,%d", (player->x>>CSF)/TILE_W, (player->y>>CSF)/TILE_H); debug("[%c%c%c%c]", player->blockl?'l':' ', player->blockr?'r':' ', player->blocku?'u':' ', player->blockd?'d':' '); //debug("%d", player->xinertia); //debug("%d", player->yinertia);*/ /* debug("Have Puppy: %d", game.flags[274]); debug("Kakeru: %d", game.flags[275]); debug("Runner Gone: %d", game.flags[276]); debug("No Shinobu: %d", game.flags[277]); debug("Door Open: %d", game.flags[278]); debug("Mick: %d", game.flags[279]); debug("Gave 1st: %d", game.flags[590]); debug("Gave 2nd: %d", game.flags[591]); debug("Gave 3rd: %d", game.flags[592]); debug("Gave 4th: %d", game.flags[593]); debug("Gave 5th: %d", game.flags[594]); debug("-"); { int i; for(i=0;ininventory;i++) debug("%d", player->inventory[i]); } */ //} debug_draw(); DrawDebugMarks(); } void DrawBoundingBoxes() { Object *o; FOREACH_OBJECT(o) { if (o->onscreen || o == player) { uint32_t color; if (o == player) { color = 0xffff00; } else if (o->flags & FLAG_INVULNERABLE) { color = 0xffffff; } else if (o->flags & FLAG_SHOOTABLE) { color = 0x00ff00; } else if (o->flags & FLAG_SOLID_MUSHY) { color = 0xff0080; } else { color = 0xff0000; } AddDebugMark(o->Left(), o->Top(), o->Right(), o->Bottom(), DM_BOX, color>>16, (color>>8)&0xff, color&0xff); } } } void DrawAttrPoints() { Object *o; FOREACH_OBJECT(o) { draw_pointlist(o, &sprites[o->sprite].block_l); draw_pointlist(o, &sprites[o->sprite].block_r); draw_pointlist(o, &sprites[o->sprite].block_u); draw_pointlist(o, &sprites[o->sprite].block_d); } } static void draw_pointlist(Object *o, SIFPointList *points) { int xoff = (o->x >> CSF); int yoff = (o->y >> CSF); for(int i=0;icount;i++) { DebugPixel((xoff + points->point[i].x) << CSF, \ (yoff + points->point[i].y) << CSF, 255, 0, 255); } } /* void c------------------------------() {} */ // debug text display debug() useful for reporting game vars etc void debug(const char *fmt, ...) { char buffer[128]; va_list ar; va_start(ar, fmt); vsnprintf(buffer, sizeof(buffer), fmt, ar); va_end(ar); DebugList.AddString(buffer); } void debug_draw(void) { for(int i=0;;i++) { const char *text = DebugList.StringAt(i); if (!text) break; int x = (SCREEN_WIDTH - 8) - GetFontWidth(text, 0, true); int y = 4 + (i * (GetFontHeight() + 1)); font_draw_shaded(x, y, text, 0, &greenfont); } } void debug_clear() { DebugList.MakeEmpty(); } /* void c------------------------------() {} */ extern char *object_names[]; // from autogen'd objnames.cpp // given an object type returns the name of the object e.g. "OBJ_TOROKO" const char *DescribeObjectType(int type) { if (type >= 0 && type < OBJ_LAST && object_names[type]) return stprintf("OBJ_%s(%d)", object_names[type], type); return stprintf("[Type %d]", type); } // tries to convert a string, such as OBJ_TOROKO, into it's numeric type, // with a small bit of english-language intelligence. int ObjectNameToType(const char *name_in) { // if all characters are numeric they're specifying by number // so simply return the atoi for(int i=0;;i++) { if (name_in[i] == 0) { return atoi(name_in); } if (!isdigit(name_in[i])) break; } char *name = strdup(name_in); // make string writeable // some string preprocessing for(int i=0;name[i];i++) { if (name[i] == ' ') { name[i] = '_'; } else { name[i] = toupper(name[i]); } } // remove the "OBJ_" suffix if it's present const char *searchstring = name; if (strbegin(name, "OBJ_")) searchstring += 4; // search for it in the object_names table for(int i=0;i> CSF) - (map.displayed_xscroll >> CSF); y = (debugmarks[i].y >> CSF) - (map.displayed_yscroll >> CSF); x2 = (debugmarks[i].x2 >> CSF) - (map.displayed_xscroll >> CSF); y2 = (debugmarks[i].y2 >> CSF) - (map.displayed_yscroll >> CSF); r = debugmarks[i].r; g = debugmarks[i].g; b = debugmarks[i].b; switch(debugmarks[i].type) { case DM_PIXEL: DrawPixel(x, y, r, g, b); break; case DM_CROSSHAIR: DrawPixel(x, y, r, g, b); DrawPixel(x+1, y, r, g, b); DrawPixel(x-1, y, r, g, b); DrawPixel(x, y+1, r, g, b); DrawPixel(x, y-1, r, g, b); break; case DM_XLINE: FillRect(x, 0, x, SCREEN_HEIGHT, r, g, b); break; case DM_YLINE: FillRect(0, y, SCREEN_WIDTH, y, r, g, b); break; case DM_BOX: DrawRect(x, y, x2, y2, r, g, b); break; } } ndebugmarks = 0; } void AddDebugMark(int x, int y, int x2, int y2, char type, uchar r, uchar g, uchar b) { if (ndebugmarks >= MAX_DEBUG_MARKS) return; debugmarks[ndebugmarks].x = x; debugmarks[ndebugmarks].y = y; debugmarks[ndebugmarks].x2 = x2; debugmarks[ndebugmarks].y2 = y2; debugmarks[ndebugmarks].r = r; debugmarks[ndebugmarks].g = g; debugmarks[ndebugmarks].b = b; debugmarks[ndebugmarks].type = type; ndebugmarks++; } // draw a pixel of the specified color at [x,y] in object coordinates void DebugPixel(int x, int y, uchar r, uchar g, uchar b) { AddDebugMark(x, y, 0, 0, DM_PIXEL, r, g, b); } void DebugCrosshair(int x, int y, uchar r, uchar g, uchar b) { AddDebugMark(x, y, 0, 0, DM_CROSSHAIR, r, g, b); } void crosshair(int x, int y) { debugVline(x, 255, 0, 0); debugHline(y, 0, 255, 0); } void DebugPixelNonCSF(int x, int y, uchar r, uchar g, uchar b) { DebugPixel(x<type = -1; if (!data) { staterr("CredReader: ReadNextCommand called but file is not loaded!"); return 1; } for(;;) { ch = get(); if (ch == '\r' || ch == '\n') continue; else break; } cmd->type = ch; switch(ch) { case CC_TEXT: { for(i=0;itext)-1;i++) { cmd->text[i] = get(); if (cmd->text[i] == ']' || !cmd->text[i]) break; } cmd->text[i] = 0; } break; case CC_SET_XOFF: case CC_BLANK_SPACE: case CC_JUMP: case CC_LABEL: case CC_MUSIC: case CC_FLAGJUMP: case CC_FADE_MUSIC: case CC_END: break; default: { staterr("CredReader: unknown command type '%c'", ch); cmd->type = -1; return 1; } break; } if (isdigit(peek())) cmd->parm = ReadNumber(); if (get() == ':') cmd->parm2 = ReadNumber(); else unget(); return 0; } int CredReader::ReadNumber() { int num = atoi(&data[dataindex]); while(isdigit(get())) ; unget(); return num; } /* struct CredCommand { int type; int parm1, parm2; char text[80]; void DumpContents(); }; */ void CredCommand::DumpContents() { stat("CC '%c': [%s]:%04d:%04d", type, text, parm, parm2); } void CredReader::Rewind() { dataindex = 0; } /* void c------------------------------() {} */ CredReader::CredReader() { data = NULL; dataindex = 0; } bool CredReader::OpenFile(void) { char fname[MAXPATHLEN]; if (data) CloseFile(); sprintf(fname, "%s/Credit.tsc", data_dir); data = tsc_decrypt(fname, &datalen); if (!data) { staterr("CredReader: couldn't open '%s'!", fname); return 1; } stat("CredReader: '%s' loaded ok!", fname); dataindex = 0; return 0; } void CredReader::CloseFile() { stat("CredReader: closing file"); if (data) { free(data); data = NULL; datalen = 0; } } char CredReader::get() { if (dataindex >= datalen) return 0; return data[dataindex++]; } void CredReader::unget() { if (dataindex > 0) dataindex--; } char CredReader::peek() { if (dataindex >= datalen) return 0; return data[dataindex]; } /* void c------------------------------() {} */ /* bool OpenFile(); void CloseFile(); bool ReadNextLine(CredCommand *cmd); private: FILE *fFP; enum CC { CC_TEXT, CC_SET_XOFF, CC_BLANK_SPACE, CC_JUMP, CC_FLAGJUMP, CC_LABEL, CC_MUSIC, CC_FADE_MUSIC, CC_END }; */ ================================================ FILE: endgame/CredReader.fdh ================================================ //hash:d0daead0 //automatically generated by Makegen /* located in tsc.cpp */ //--------------[referenced from endgame/CredReader.cpp]-------------// static int ReadNumber(const char **buf, const char *buf_end); char *tsc_decrypt(const char *fname, int *fsize_out); /* located in common/stat.cpp */ //--------------[referenced from endgame/CredReader.cpp]-------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); ================================================ FILE: endgame/CredReader.h ================================================ #ifndef _CREDITS_READER_H #define _CREDITS_READER_H enum CC { CC_TEXT = '[', CC_SET_XOFF = '+', CC_BLANK_SPACE = '-', CC_JUMP = 'j', CC_FLAGJUMP = 'f', CC_LABEL = 'l', CC_MUSIC = '!', CC_FADE_MUSIC = '~', CC_END = '/' }; // represents a command from the .tsc struct CredCommand { int type; int parm, parm2; char text[80]; void DumpContents(); }; class CredReader { public: CredReader(); bool OpenFile(); void CloseFile(); bool ReadCommand(CredCommand *cmd); void Rewind(); private: int ReadNumber(); char get(); void unget(); char peek(); char *data; int dataindex, datalen; }; #endif ================================================ FILE: endgame/credits.cpp ================================================ #include "../nx.h" #include "credits.h" #include "credits.fdh" #define MARGIN 48 #define SCREEN_Y(Y) ( (Y) - (scroll_y >> CSF) ) #define TEXT_SPACING 5 // X-spacing between letters Credits *credits = NULL; /* void c------------------------------() {} */ bool Credits::Init() { if (script.OpenFile()) return 1; if (bigimage.Init()) return 1; Replay::end_record(); spawn_y = (SCREEN_HEIGHT + 8); scroll_y = 0 << CSF; xoffset = 0; roll_running = true; lines_out = lines_vis = 0; firstline = NULL; lastline = NULL; return 0; } Credits::~Credits() { script.CloseFile(); } /* void c------------------------------() {} */ void Credits::Tick() { /*debug("scroll_y: %d", scroll_y>>CSF); debug("spawn_y: %d", spawn_y); debug("scr_spawn_y: %d", SCREEN_Y(spawn_y)); debug("trigger: %d", SCREEN_HEIGHT+MARGIN); debug("");*/ /*debug("imgno: %d", bigimage.imgno); debug("state: %d", bigimage.state); debug("imagex: %d", bigimage.imagex);*/ if (roll_running || SCREEN_Y(spawn_y) >= (SCREEN_HEIGHT + 8)) { scroll_y += 0x100; } while(roll_running && SCREEN_Y(spawn_y) < (SCREEN_HEIGHT + MARGIN)) { RunNextCommand(); } if (player) { player->hide = true; player->dead = true; // should pretty much completely disable HandlePlayer() } game_tick_normal(); bigimage.Draw(); Draw(); } void Credits::RunNextCommand() { CredCommand cmd; if (script.ReadCommand(&cmd)) { console.Print("script.ReadCommand failed: credits terminated"); roll_running = false; return; } cmd.DumpContents(); switch(cmd.type) { case CC_TEXT: { CredLine *line = NewLine(); maxcpy(line->text, cmd.text, sizeof(line->text)); line->image = cmd.parm; line->x = xoffset; line->y = spawn_y; // the last line is supposed to be centered--slightly // varying font sizes can lead to it being a little bit off if (strstr(line->text, "The End")) { line->x = (SCREEN_WIDTH / 2) - (GetFontWidth(line->text, TEXT_SPACING) / 2); } spawn_y += 1; lines_out++; } break; case CC_BLANK_SPACE: spawn_y += cmd.parm / 2; break; case CC_SET_XOFF: xoffset = cmd.parm; break; case CC_FLAGJUMP: if (game.flags[cmd.parm]) Jump(cmd.parm2); break; case CC_JUMP: Jump(cmd.parm); break; case CC_LABEL: break; case CC_MUSIC: music(cmd.parm); break; case CC_FADE_MUSIC: org_fade(); break; case CC_END: roll_running = false; break; default: console.Print("Unhandled command '%c'; credits terminated", cmd.type); roll_running = false; break; } } bool Credits::Jump(int label) { CredCommand cmd; bool tried_rewind = false; stat("- Jump to label %04d", label); for(;;) { if (script.ReadCommand(&cmd) || cmd.type == CC_END) { // I think all the jumps in the original credits are forwards, // so only try looking back if there's a problem finding the label. if (!tried_rewind) { script.Rewind(); tried_rewind = true; } else { console.Print("Missing label %04d; credits terminated", label); roll_running = false; return 1; } } if (cmd.type == CC_LABEL && cmd.parm == label) { return 0; } } } /* void c------------------------------() {} */ bool Credits::DrawLine(CredLine *line) { int x = line->x; int y = SCREEN_Y(line->y); if (y < -MARGIN) return true; // line can be deleted now if (line->image) { draw_sprite(x - 24, y - 8, SPR_CASTS, line->image); //DrawBox(x, y, x+GetFontWidth(line->text, TEXT_SPACING), y+8, 56, 0, 0); } //int font_draw(int x, int y, const char *string, int font_spacing) //DrawRect(x, y, x+63, y+8, 128, 0, 0); font_draw(x, y, line->text, TEXT_SPACING); return false; } void Credits::Draw() { CredLine *line, *next; line = firstline; while(line) { next = line->next; if (DrawLine(line)) { RemoveLine(line); delete line; } line = next; } } /* void c------------------------------() {} */ CredLine *Credits::NewLine() { return AddLine(new CredLine); } CredLine *Credits::AddLine(CredLine *line) { line->prev = NULL; line->next = firstline; if (firstline) { firstline->prev = line; firstline = line; } else { firstline = lastline = line; } lines_vis++; return line; } void Credits::RemoveLine(CredLine *line) { if (line->next) line->next->prev = line->prev; if (line->prev) line->prev->next = line->next; if (line == firstline) firstline = firstline->next; if (line == lastline) lastline = lastline->next; lines_vis--; } /* void c------------------------------() {} */ enum BIStates { BI_CLEAR, BI_SLIDE_IN, BI_SLIDE_OUT, BI_HOLD }; bool BigImage::Init() { char fname[MAXPATHLEN]; imagex = 0; imgno = 0; state = BI_CLEAR; memset(images, 0, sizeof(images)); // load any images present for(int i=0;iWidth(); state = BI_SLIDE_IN; } else { staterr("BigImage::Set: invalid image number %d", num); state = BI_CLEAR; } } void BigImage::Clear() { state = BI_SLIDE_OUT; } void BigImage::Draw() { #define IMAGE_SPEED 32 switch(state) { case BI_SLIDE_IN: { imagex += IMAGE_SPEED; if (imagex > 0) { imagex = 0; state = BI_HOLD; } } break; case BI_SLIDE_OUT: { imagex -= IMAGE_SPEED; if (imagex < -images[imgno]->Width()) state = BI_CLEAR; } } // take up any unused space with blue if (state != BI_HOLD) FillRect(0, 0, SCREEN_WIDTH/2, SCREEN_HEIGHT, DK_BLUE); if (state != BI_CLEAR) DrawSurface(images[imgno], imagex, 0); } /* void c------------------------------() {} */ bool credit_init(int parameter) { credits = new Credits; if (credits->Init()) { staterr("Credits initilization failed"); return 1; } return 0; } void credit_close() { delete credits; credits = NULL; } void credit_tick() { if (credits) credits->Tick(); } void credit_set_image(int imgno) { if (credits) credits->bigimage.Set(imgno); } void credit_clear_image() { if (credits) credits->bigimage.Clear(); } /* void c------------------------------() {} */ ================================================ FILE: endgame/credits.fdh ================================================ //hash:2dcff26e //automatically generated by Makegen /* located in game.cpp */ //----------------[referenced from endgame/credits.cpp]--------------// void game_tick_normal(void); /* located in tsc.cpp */ //----------------[referenced from endgame/credits.cpp]--------------// void Clear(); /* located in endgame/credits.cpp */ //----------------[referenced from endgame/credits.cpp]--------------// bool credit_init(int parameter); void credit_close(); void credit_tick(); void credit_set_image(int imgno); void credit_clear_image(); /* located in graphics/font.cpp */ //----------------[referenced from endgame/credits.cpp]--------------// int GetFontWidth(const char *text, int spacing, bool is_shaded); int font_draw(int x, int y, const char *text, int spacing, NXFont *font); /* located in sound/sound.cpp */ //----------------[referenced from endgame/credits.cpp]--------------// void music(int songno); /* located in sound/org.cpp */ //----------------[referenced from endgame/credits.cpp]--------------// void org_fade(void); /* located in common/stat.cpp */ //----------------[referenced from endgame/credits.cpp]--------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //----------------[referenced from endgame/credits.cpp]--------------// void maxcpy(char *dst, const char *src, int maxlen); bool file_exists(const char *fname); ================================================ FILE: endgame/credits.h ================================================ #ifndef _CREDITS_H #define _CREDITS_H #define MAX_BIGIMAGES 20 #define CRED_MAX_TEXT 80 #include "CredReader.h" // a currently displayed line of text struct CredLine { char text[CRED_MAX_TEXT]; int image; int x, y; CredLine *next, *prev; }; class BigImage { public: bool Init(); ~BigImage(); void Set(int num); void Clear(); void Draw(); private: int imagex, state; int imgno; NXSurface *images[MAX_BIGIMAGES]; }; class Credits { public: bool Init(); void Tick(); ~Credits(); BigImage bigimage; // current "SIL" big left-hand image private: void RunNextCommand(); bool Jump(int label); CredLine *NewLine(); CredLine *AddLine(CredLine *line); void RemoveLine(CredLine *line); void Draw(); bool DrawLine(CredLine *line); int spawn_y; // position of next line relative to top of roll int scroll_y; // CSFd roll position int xoffset; // x position of next line // turns off scrolling and further script execution when "/" command hit at end bool roll_running; int lines_out; // debug... int lines_vis; // ...counters CredReader script; CredLine *firstline, *lastline; }; bool credit_init(int parameter); void credit_tick(); void credit_set_image(int imgno); void credit_clear_image(); void credit_close(); #endif ================================================ FILE: endgame/island.cpp ================================================ // "XX1" island-crashes cutscene from "good ending" // and island-looks-like-it-gonna-crash but it's ok from secret ending #include "../nx.h" #include "island.fdh" static struct { int x, y; int timer, scene_length; int speed; bool survives; int scene_x, scene_y; int trees_x, trees_y; } island; bool island_init(int parameter) { memset(&island, 0, sizeof(island)); island.timer = 0; island.speed = 0x33; island.survives = parameter; island.scene_length = (!island.survives) ? 900 : 750; island.scene_x = (SCREEN_WIDTH / 2) - (sprites[SPR_ISLAND_SCENE].w / 2); island.scene_y = (SCREEN_HEIGHT / 2) - (sprites[SPR_ISLAND_SCENE].h / 2); island.trees_x = island.scene_x; island.trees_y = (island.scene_y + sprites[SPR_ISLAND_SCENE].h) - sprites[SPR_ISLAND_TREES].h; island.x = (SCREEN_WIDTH / 2) - (sprites[SPR_ISLAND].w / 2); island.y = (island.scene_y - sprites[SPR_ISLAND].h) << CSF; return 0; } /* void c------------------------------() {} */ void island_tick() { if (island.timer >= island.scene_length) { game.setmode(GM_NORMAL); return; } if (island.survives) { switch(island.timer) { case 350: island.speed = 0x19; break; case 500: island.speed = 0x0C; break; case 600: island.speed = 0; break; } } island.y += island.speed; island.timer++; // draw the scene ClearScreen(BLACK); set_clip_rect(island.scene_x, island.scene_y, \ sprites[SPR_ISLAND_SCENE].w, sprites[SPR_ISLAND_SCENE].h); draw_sprite(island.scene_x, island.scene_y, SPR_ISLAND_SCENE); draw_sprite(island.x, (island.y>>CSF), SPR_ISLAND); draw_sprite(island.trees_x, island.trees_y, SPR_ISLAND_TREES); clear_clip_rect(); if (player->equipmask & EQUIP_NIKUMARU) niku_draw(game.counter); } /* void c------------------------------() {} */ ================================================ FILE: endgame/island.fdh ================================================ //hash:a7d258f5 //automatically generated by Makegen /* located in statusbar.cpp */ //----------------[referenced from endgame/island.cpp]---------------// void niku_draw(int value, bool force_white); /* located in endgame/island.cpp */ //----------------[referenced from endgame/island.cpp]---------------// bool island_init(int parameter); void island_tick(); ================================================ FILE: endgame/island.h ================================================ #ifndef _ISLAND_H #define _ISLAND_H bool island_init(int survives); void island_tick(); #endif ================================================ FILE: endgame/misc.fdh ================================================ //hash:e401a413 //automatically generated by Makegen /* located in ObjManager.cpp */ //-----------------[referenced from endgame/misc.cpp]----------------// Object *CreateObject(int x, int y, int type); /* located in ai/ai.cpp */ //-----------------[referenced from endgame/misc.cpp]----------------// void randblink(Object *o, int blinkframe, int blinktime, int prob); /* located in endgame/misc.cpp */ //-----------------[referenced from endgame/misc.cpp]----------------// void ai_cloud_spawner(Object *o); void ai_cloud(Object *o); void ai_balrog_flying(Object *o); void aftermove_balrog_passenger(Object *o); void ai_balrog_medic(Object *o); void ai_gaudi_patient(Object *o); void ai_baby_puppy(Object *o); void ai_turning_human(Object *o); void ai_ahchoo(Object *o); void ai_misery_wind(Object *o); void ai_the_cast(Object *o); /* located in common/misc.cpp */ //-----------------[referenced from endgame/misc.cpp]----------------// int random(int min, int max); ================================================ FILE: endgame/misc_end.cpp ================================================ #include "../ai/stdai.h" #include "misc.fdh" INITFUNC(AIRoutines) { ONTICK(OBJ_CLOUD_SPAWNER, ai_cloud_spawner); ONTICK(OBJ_CLOUD, ai_cloud); ONTICK(OBJ_BALROG_FLYING, ai_balrog_flying); AFTERMOVE(OBJ_BALROG_PASSENGER, aftermove_balrog_passenger); ONTICK(OBJ_BALROG_MEDIC, ai_balrog_medic); ONTICK(OBJ_GAUDI_PATIENT, ai_gaudi_patient); ONTICK(OBJ_BABY_PUPPY, ai_baby_puppy); ONTICK(OBJ_TURNING_HUMAN, ai_turning_human); ONTICK(OBJ_BUILDING_FAN, ai_animate2); ONTICK(OBJ_AHCHOO, ai_ahchoo); ONTICK(OBJ_MISERY_WIND, ai_misery_wind); ONTICK(OBJ_THE_CAST, ai_the_cast); } /* void c------------------------------() {} */ // clouds should be layered parallax, according to their size & speed. // the clouds are behind all the other objects (player, etc). static int cloud_sprites[] = { SPR_CLOUD_1, SPR_CLOUD_2, SPR_CLOUD_3, SPR_CLOUD_4 }; // makes the clouds from the falling scene (good ending) void ai_cloud_spawner(Object *o) { Object *cloud; int type; if (o->state == 0) { for(int i=0;i<4;i++) { o->cloud.layers[i] = CreateObject(0, 0, OBJ_NULL); o->cloud.layers[i]->PushBehind(lowestobject); } o->state = 1; } if (--o->timer < 0) { o->timer = random(0, 16); type = random(0, 3); cloud = CreateObject(0, 0, OBJ_CLOUD); cloud->sprite = cloud_sprites[type]; if (o->dir == LEFT) // vertical clouds (falling) { cloud->x = o->x + MAPY(random(-10, 10)); cloud->y = o->y; cloud->yinertia = -(0x1000 >> type); // each type half as fast as the last } else // horizontal clouds (flying with Kazuma) { cloud->x = o->x; cloud->y = o->y + MAPY(random(-7, 7)); cloud->xinertia = -(0x400 >> type); } // cut down on the amount of time Kazuma is flying // against plain blue when he appears in the credits if (game.mode == GM_CREDITS && o->state < 10) { cloud->x -= (128 << CSF); o->state++; } cloud->PushBehind(o->cloud.layers[type]); } } void ai_cloud(Object *o) { if (o->x < -o->Width() || o->y < -o->Height()) o->Delete(); } /* void c------------------------------() {} */ // Balrog flying in clouds with player and Curly in best-ending. void ai_balrog_flying(Object *o) { switch(o->state) { case 0: { o->state = 1; o->animtimer = 0; o->ymark = o->y - 0x2000; o->xmark = o->x - 0xC00; o->yinertia = 0; CreateObject(0, 0, OBJ_BALROG_PASSENGER, 0, 0, LEFT, o)->state = 1; CreateObject(0, 0, OBJ_BALROG_PASSENGER, 0, 0, RIGHT, o)->state = 1; } case 1: { ANIMATE(4, 0, 1); o->xinertia += (o->x < o->xmark) ? 0x08 : -0x08; o->yinertia += (o->y < o->ymark) ? 0x08 : -0x08; } break; case 20: // fly away { o->state = 21; o->xinertia = -0x400; o->yinertia = 0x200; } case 21: { ANIMATE(2, 0, 1); o->xinertia += 0x10; o->yinertia -= 0x08; if (o->x > 0x78000) { o->xinertia = 0; o->yinertia = 0; o->state = 22; } } break; } } // player/curly when rescued by Balrog during best-ending void aftermove_balrog_passenger(Object *o) { if (!o->linkedobject) { o->Delete(); return; } switch(o->state) { case 0: // being rescued from Seal Chamber { if (o->dir == RIGHT) { o->sprite = player->sprite; o->frame = 4; o->x = o->linkedobject->x - (2<sprite = SPR_CURLY; o->frame = 7; o->x = o->linkedobject->x + (26<y = o->linkedobject->y + (14<dir == RIGHT) { o->sprite = SPR_MYCHAR; o->frame = 12; o->x = o->linkedobject->x - (15<sprite = SPR_CURLY; o->frame = 18; o->x = o->linkedobject->x - (4<y = o->linkedobject->y - (23<frame = 0; randblink(o, 1, 12); } void ai_gaudi_patient(Object *o) { switch(o->state) { case 0: // sitting { o->frame = 0; } break; case 10: // lying { o->frame = 1; } break; case 20: // hurting { o->state = 21; o->frame = 2; } case 21: { ANIMATE(10, 2, 3); } break; } } /* void c------------------------------() {} */ void ai_baby_puppy(Object *o) { switch(o->state) { case 0: { o->animtimer = random(0, 6); // desync with other puppies o->state = 1; } case 1: { ANIMATE(6, 0, 1); } break; } } /* void c------------------------------() {} */ void ai_turning_human(Object *o) { Object *ahchoo; // LEFT = Itoh // RIGHT = Sue switch(o->state) { case 0: { o->x += (16<y -= (16<state = 1; } case 1: { if (++o->timer > 80) { o->state = 10; o->timer = 0; } // before machine turns on they both blink, // at slightly different times if (o->dir == LEFT) { if (o->timer == 30) o->frame = 1; if (o->timer == 40) o->frame = 0; } else { if (o->timer == 50) o->frame = 1; if (o->timer == 60) o->frame = 0; } } break; case 10: // being transformed { o->timer++; o->frame = (o->timer & 2) ? 2 : 3; if (o->timer > 50) { o->state = 20; o->frame = 4; // wait for slightly different times before falling o->timer = (o->dir == LEFT) ? 40 : 60; } } break; case 20: // waiting after transformation { if (--o->timer < 0) { o->timer = 0; o->state = 30; } } break; case 30: // falling { o->yinertia += 0x40; LIMITY(0x5ff); if (++o->timer > 50) // sneeze { o->state = 40; o->timer = 0; o->frame = 6; // head-back to sneeze // create sneeze. Itoh is taller. int yoffs = (o->dir == LEFT) ? (16<x, o->y - yoffs, OBJ_AHCHOO); ahchoo->linkedobject = o; } } break; case 40: // sneezing { o->timer++; if (o->timer == 30) o->frame = 7; if (o->timer > 40) o->state = 50; } break; case 50: // turn back to mimiga... { o->state = 41; o->timer = 0; o->frame = 0; } case 51: // ..and blink { o->timer++; if (o->timer == 30) o->frame = 1; if (o->timer == 40) o->frame = 0; } break; } } void ai_ahchoo(Object *o) { if (!o->linkedobject) { o->Delete(); return; } o->timer++; switch(o->state) { case 0: // rise up "ah..." { if (o->timer < 4) o->y -= (2 << CSF); if (o->linkedobject->frame == 7) // sneezing frame { o->frame = 1; // "choo!" o->state = 1; o->xmark = o->x; o->ymark = o->y; } } break; case 1: // shaking "choo!" { if (o->timer < 48) { // shake o->x = o->xmark + (random(-1, 1) << CSF); o->y = o->ymark + (random(-1, 1) << CSF); } else { // return to original pos o->xmark = o->x; o->ymark = o->y; } if (o->timer > 70) o->Delete(); } break; } } /* void c------------------------------() {} */ void ai_misery_wind(Object *o) { switch(o->state) { case 0: { ANIMATE(6, 0, 1); } break; case 10: // look at screen { ANIMATE(6, 3, 4); } break; } } /* void c------------------------------() {} */ // 000 - King // 100 - Toroko // 200 - Kazuma // 300 - Sue // 400 - Momorin // 500 - Booster // 600 - Jenka // // 700 - Nurse Hasumi // 800 - Dr Gero // 900 - Balrog // 1000 - Curly // 1100 - Misery // 1200 - Malco // 1300 - Hermit Gunsmith void ai_the_cast(Object *o) { const static struct { int sprite; int fallframe, standframe; int dir; bool tall; } cast_data[] = { SPR_KING, 6, 0, RIGHT, false, SPR_TOROKO, 2, 0, RIGHT, false, SPR_KAZUMA, 4, 0, RIGHT, true, SPR_SUE, 4, 0, RIGHT, false, SPR_MOMORIN, 2, 0, LEFT, true, SPR_PROFESSOR_BOOSTER, 8, 0, LEFT, false, SPR_JENKA, 0, 0, LEFT, false, SPR_NURSE_HASUMI, 1, 0, RIGHT, false, SPR_DR_GERO, 1, 0, RIGHT, false, SPR_BALROG_CAST, 1, 0, RIGHT, true, SPR_CURLY, 1, 0, RIGHT, false, SPR_MISERY, 0, 2, LEFT, false, SPR_MALCO_BROKEN, 1, 0, LEFT, true, SPR_HERMIT_GUNSMITH, 1, 0, LEFT, true }; switch(o->state) { case 0: { o->dirparam /= 100; if (o->dirparam >= 14) o->dirparam = 0; o->sprite = cast_data[o->dirparam].sprite; o->frame = cast_data[o->dirparam].fallframe; o->dir = cast_data[o->dirparam].dir; if (cast_data[o->dirparam].tall) o->y -= (4<sprite == SPR_KING) { Object *sword; sword = CreateObject(o->x, o->y, OBJ_KINGS_SWORD); sword->linkedobject = o; sword->carry.flip = true; } // Balrog goes behind Curly if (o->sprite == SPR_BALROG_CAST) { o->PushBehind(lowestobject); } o->state = 1; } case 1: { o->yinertia += 0x40; LIMITY(0x5ff); if (o->blockd) { o->frame = cast_data[o->dirparam].standframe; o->state = 2; } } break; } } ================================================ FILE: extract/crc.cpp ================================================ #include #include #include #include "crc.fdh" static uint32_t CRC_Table[256]; static const uint32_t poly = 0x04c11db7; void crc_init(void) { int i, j; for(i=0;i<256;i++) { CRC_Table[i] = reflect(i, 8) << 24; for(j=0;j<8;j++) CRC_Table[i] = (CRC_Table[i] << 1) ^ ((CRC_Table[i] & (1 << 31)) ? poly : 0); CRC_Table[i] = reflect(CRC_Table[i], 32); } } uint32_t crc_calc(uint8_t *buf, uint32_t size) { uint32_t crc = 0xFFFFFFFF; while(size) { crc = (crc >> 8) ^ CRC_Table[(crc & 0xFF) ^ *buf++]; size--; } return (crc ^ 0xFFFFFFFF); } static uint32_t reflect(uint32_t value, int size) { uint32_t newbits = 0; int i; for(i=1;i<=size;i++) { if (value & 1) newbits |= (1 << (size - i)); value >>= 1; } return newbits; } ================================================ FILE: extract/crc.fdh ================================================ //hash:6c29cc36 //automatically generated by Makegen /* located in extract/crc.cpp */ //------------------[referenced from extract/crc.cpp]----------------// void crc_init(void); uint32_t crc_calc(uint8_t *buf, uint32_t size); static uint32_t reflect(uint32_t value, int size); ================================================ FILE: extract/extract.cpp ================================================ #include #include #include #include #include #include "../graphics/safemode.h" #include "extract.fdh" using safemode::print; using safemode::status; using safemode::clearstatus; using safemode::clear; using safemode::moveto; using safemode::run_until_key; static const char *filename = "Doukutsu.exe"; static int extract_do(void) { FILE *fp; clear(); moveto(SM_UPPER_THIRD); print("= Extracting Files ="); fp = fileopen(filename, "rb"); if (!fp) { moveto(SM_CENTER); print("cannot find executable %s", filename); print(""); print(""); print("Please put it and it's \"data\" directory"); print("into the same folder as this program."); run_until_key(); return 1; } if (extract_pxt(fp)) return 1; if (extract_files(fp)) return 1; if (extract_stages(fp)) return 1; //findfiles(fp); //exit(1); clearstatus(); fclose(fp); return 0; } int extract_main() { int result; if (safemode::init()) { staterr("failed to initialize safemode graphics"); return 1; } result = introduction(); #ifdef __SDLSHIM__ if (result == SDLK_BTN1) #else if (result == SDLK_ESCAPE) #endif { stat("Breaking out"); return 1; } result = extract_do(); if (!result) conclusion(); safemode::close(); return result; } int introduction() { clear(); moveto(SM_UPPER_THIRD); print("I need to extract some game data"); print("before I can start up for the first time."); print(""); print("Before beginning, you should have the Aeon Genesis"); print("English translation of version 1.0.0.6, and drop"); print("Doukutsu.exe and it's \"data\" directory into the same"); print("folder as the \"nx\" program you just ran."); print(""); #ifdef __SDLSHIM__ print("If you haven't done that yet, please press BTN1 now"); #else print("If you haven't done that yet, please press ESCAPE now"); #endif print("and come back in a moment. Otherwise, you can"); print("press any other key to start the extraction."); return run_until_key(); } int conclusion() { moveto(SM_MIDUPPER_Y); print("Success!"); print(""); print("You can now remove the Doukutsu.exe file"); print("if you like, as it isn't needed anymore."); print("Please leave the \"data\" directory though."); print(""); print("Once you get to the title screen, you may want"); print("to adjust your resolution by pressing F3."); print(""); print("Press any key to begin"); return run_until_key(); } /* void c------------------------------() {} */ //#define FINDFILES #ifdef FINDFILES static struct { const char *filename; int headersize; } fileinfo[] = { "endpic/credit01.bmp", 25, "endpic/credit02.bmp", 25, "endpic/credit03.bmp", 25, "endpic/credit04.bmp", 25, "endpic/credit05.bmp", 25, "endpic/credit06.bmp", 25, "endpic/credit07.bmp", 25, "endpic/credit08.bmp", 25, "endpic/credit09.bmp", 25, "endpic/credit10.bmp", 25, "endpic/credit11.bmp", 25, "endpic/credit12.bmp", 25, "endpic/credit14.bmp", 25, "endpic/credit15.bmp", 25, "endpic/credit16.bmp", 25, "endpic/credit17.bmp", 25, "endpic/credit18.bmp", 25, "endpic/pixel.bmp", 25, "wavetable.dat", 0, "org/access.org", 0, "org/balcony.org", 0, "org/balrog.org", 0, "org/breakdown.org", 0, "org/cemetary.org", 0, "org/charge.org", 0, "org/credits.org", 0, "org/egg.org", 0, "org/eyesofflame.org", 0, "org/fanfale1.org", 0, "org/fanfale2.org", 0, "org/fanfale3.org", 0, "org/gameover.org", 0, "org/geothermal.org", 0, "org/gestation.org", 0, "org/gravity.org", 0, "org/grasstown.org", 0, "org/hell.org", 0, "org/heroend.org", 0, "org/jenka1.org", 0, "org/jenka2.org", 0, "org/labyrinth.org", 0, "org/lastbattle.org", 0, "org/lastcave.org", 0, "org/meltdown2.org", 0, "org/oppression.org", 0, "org/oside.org", 0, "org/plant.org", 0, "org/pulse.org", 0, "org/quiet.org", 0, "org/run.org", 0, "org/safety.org", 0, "org/scorching.org", 0, "org/seal.org", 0, "org/theme.org", 0, "org/toroko.org", 0, "org/town.org", 0, "org/tyrant.org", 0, "org/waterway.org", 0, "org/white.org", 0, "org/zombie.org", 0, NULL }; bool findfiles(FILE *exefp) { int i; FILE *fpo; int len; uint32_t crc; fpo = fileopen("/tmp/files.dat", "wb"); crc_init(); for(i=0;fileinfo[i].filename;i++) { uint32_t offset = findfile(fileinfo[i].filename, exefp, fileinfo[i].headersize, \ &len, &crc); if (offset == 0) { staterr("couldn't find file %s", fileinfo[i].filename); return 1; } const char *headertable = "NULL"; if (fileinfo[i].headersize) { headertable = strstr(fileinfo[i].filename, "pixel") ? \ "pixel_header" : "credit_header"; } fprintf(fpo, "\t\"%s\", 0x%06x, %d, 0x%08x, %s,\n", fileinfo[i].filename, offset, len, crc, headertable); } fclose(fpo); return 0; } uint32_t findfile(const char *fname, FILE *exefp, int headersize, \ int *len_out, uint32_t *crc_out) { FILE *fp; uint8_t *buffer; uint32_t hit = 0; int len; fp = fileopen(fname, "rb"); if (!fp) { staterr("can't open %s", fname); return 0; } len = filesize(fp); buffer = (uint8_t *)malloc(len); len -= headersize; fseek(fp, headersize, SEEK_SET); fread(buffer, len, 1, fp); *crc_out = crc_calc(buffer, len); *len_out = len; stat("searching for '%s'; %d bytes", fname, len); int match = 0; fseek(exefp, 0, SEEK_SET); while(!feof(exefp)) { uint8_t ch = fgetc(exefp); recheck: ; if (ch == buffer[match]) { match++; if (match >= len) { hit = (ftell(exefp) - len); stat("hit at 0x%06x", hit); match = 0; } } else if (match) { match = 0; goto recheck; } } free(buffer); fclose(fp); return hit; } #endif ================================================ FILE: extract/extract.fdh ================================================ //hash:ae36d920 //automatically generated by Makegen /* located in platform.cpp */ //----------------[referenced from extract/extract.cpp]--------------// FILE *fileopen(const char *fname, const char *mode); /* located in extract/extract.cpp */ //----------------[referenced from extract/extract.cpp]--------------// static int extract_do(void); int extract_main(); int introduction(); int conclusion(); bool findfiles(FILE *exefp); uint32_t findfile(const char *fname, FILE *exefp, int headersize, int *len_out, uint32_t *crc_out); /* located in extract/extractpxt.cpp */ //----------------[referenced from extract/extract.cpp]--------------// bool extract_pxt(FILE *fp); /* located in extract/extractfiles.cpp */ //----------------[referenced from extract/extract.cpp]--------------// bool extract_files(FILE *exefp); /* located in extract/extractstages.cpp */ //----------------[referenced from extract/extract.cpp]--------------// bool extract_stages(FILE *exefp); /* located in extract/crc.cpp */ //----------------[referenced from extract/extract.cpp]--------------// void crc_init(void); uint32_t crc_calc(uint8_t *buf, uint32_t size); /* located in common/stat.cpp */ //----------------[referenced from extract/extract.cpp]--------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); /* located in common/misc.cpp */ //----------------[referenced from extract/extract.cpp]--------------// int filesize(FILE *fp); ================================================ FILE: extract/extractfiles.cpp ================================================ #include #include #include #include #include #include #include "../common/basics.h" #include "../graphics/safemode.h" #include "extractfiles.fdh" #ifdef __MINGW32__ #include #endif using safemode::moveto; using safemode::status; using safemode::print; using safemode::run_until_key; #define HEADER_LEN 25 #define MAX_FILE_SIZE 32768 // Windows .bmp resources don't include the BMP-file headers const uint8_t credit_header[] = \ { 0x42, 0x4D, 0x76, 0x4B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00 }; const uint8_t pixel_header[] = \ { 0x42, 0x4D, 0x76, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00 }; static struct { const char *filename; uint32_t offset; uint32_t length; uint32_t crc; const uint8_t *header; } files[] = { "endpic/credit01.bmp", 0x117047, 19293, 0xeb87b19b, credit_header, "endpic/credit02.bmp", 0x11bbaf, 19293, 0x239c1a37, credit_header, "endpic/credit03.bmp", 0x120717, 19293, 0x4398bbda, credit_header, "endpic/credit04.bmp", 0x12527f, 19293, 0x44bae3ac, credit_header, "endpic/credit05.bmp", 0x129de7, 19293, 0xd1b876ad, credit_header, "endpic/credit06.bmp", 0x12e94f, 19293, 0x5a60082e, credit_header, "endpic/credit07.bmp", 0x1334b7, 19293, 0xc1e9db91, credit_header, "endpic/credit08.bmp", 0x13801f, 19293, 0xcbbcc7fa, credit_header, "endpic/credit09.bmp", 0x13cb87, 19293, 0xfa7177b1, credit_header, "endpic/credit10.bmp", 0x1416ef, 19293, 0x56390a07, credit_header, "endpic/credit11.bmp", 0x146257, 19293, 0xff3d6d83, credit_header, "endpic/credit12.bmp", 0x14adbf, 19293, 0x9e948dc2, credit_header, "endpic/credit14.bmp", 0x14f927, 19293, 0x32b6ce2d, credit_header, "endpic/credit15.bmp", 0x15448f, 19293, 0x88539803, credit_header, "endpic/credit16.bmp", 0x158ff7, 19293, 0xc0ef9adf, credit_header, "endpic/credit17.bmp", 0x15db5f, 19293, 0x8c5a003d, credit_header, "endpic/credit18.bmp", 0x1626c7, 19293, 0x66bcbf22, credit_header, "endpic/pixel.bmp", 0x16722f, 1373, 0x6181d0a1, pixel_header, "wavetable.dat", 0x110664, 25599, 0xcaa7b1dd, NULL, "org/access.org", 0x09b35c, 1138, 0xd965dddb, NULL, "org/balcony.org", 0x09dbbc, 3082, 0x892345ca, NULL, "org/balrog.org", 0x0b45a0, 5970, 0xb02093b8, NULL, "org/breakdown.org", 0x09f5bc, 2570, 0xf80dd62a, NULL, "org/cemetary.org", 0x09ffc8, 4578, 0x2ce377cc, NULL, "org/charge.org", 0x0d28d4, 2770, 0x10dec9d5, NULL, "org/credits.org", 0x0a7eac, 17898, 0xa9ed4834, NULL, "org/egg.org", 0x0feb20, 19626, 0xb651047e, NULL, "org/eyesofflame.org", 0x0aedc0, 21354, 0x6b5ff989, NULL, "org/fanfale1.org", 0x0ae25c, 914, 0xaefd547b, NULL, "org/fanfale2.org", 0x0ae98c, 1074, 0x3a5170a6, NULL, "org/fanfale3.org", 0x0ae5f0, 922, 0x85813929, NULL, "org/gameover.org", 0x0b412c, 1137, 0x525d58f3, NULL, "org/geothermal.org", 0x0b5cf4, 13466, 0xdb4795ac, NULL, "org/gestation.org", 0x0f83c8, 10458, 0xce2e68c1, NULL, "org/gravity.org", 0x0b9190, 20578, 0x64a9318d, NULL, "org/grasstown.org", 0x1037cc, 23706, 0xa27883b6, NULL, "org/hell.org", 0x0be1f4, 18386, 0x93bbf277, NULL, "org/heroend.org", 0x0f1598, 9722, 0xfc64d0d0, NULL, "org/jenka1.org", 0x0c5e54, 8306, 0xb42d7eaa, NULL, "org/jenka2.org", 0x0c7ec8, 11986, 0xc095cbe1, NULL, "org/labyrinth.org", 0x0dbcb8, 14786, 0x0292cf2c, NULL, "org/lastbattle.org", 0x0cd650, 21122, 0x8888dac9, NULL, "org/lastcave.org", 0x0d33a8, 18122, 0x469b38b9, NULL, "org/meltdown2.org", 0x0df67c, 21074, 0x83d08aed, NULL, "org/oppression.org", 0x0c29c8, 13450, 0x3ce4cdbe, NULL, "org/oside.org", 0x0e725c, 25634, 0x1e33b095, NULL, "org/plant.org", 0x0ed680, 11378, 0x3911e040, NULL, "org/pulse.org", 0x0cad9c, 10418, 0x92ef0330, NULL, "org/quiet.org", 0x0f02f4, 4770, 0x0e95a468, NULL, "org/run.org", 0x0ac498, 7618, 0x65a4bb85, NULL, "org/safety.org", 0x09b7d0, 9194, 0x779e83c2, NULL, "org/scorching.org", 0x0faca4, 15994, 0xd09341e2, NULL, "org/seal.org", 0x09e7c8, 3570, 0x373988ad, NULL, "org/theme.org", 0x0a11ac, 25738, 0xf5ace8b0, NULL, "org/toroko.org", 0x0f3b94, 18482, 0xc202de07, NULL, "org/town.org", 0x0e48d0, 10634, 0x6a6aa627, NULL, "org/tyrant.org", 0x0a7638, 2162, 0xc64dc450, NULL, "org/waterway.org", 0x0d7a74, 16962, 0xb533d72a, NULL, "org/white.org", 0x109468, 23714, 0xcff0fb34, NULL, "org/zombie.org", 0x10f180, 5346, 0xd217cc29, NULL, NULL }; bool extract_files(FILE *exefp) { uint8_t *buffer; uint8_t *file; uint32_t length; uint32_t crc; bool check_crc = true; bool first_crc_failure = true; buffer = (uint8_t *)malloc(MAX_FILE_SIZE); crc_init(); for(int i=0;;i++) { const char *outfilename = files[i].filename; if (!outfilename) break; status("[ %s ]", outfilename); // initialize header if any file = buffer; length = files[i].length; if (files[i].header) { memcpy(buffer, files[i].header, HEADER_LEN); file += HEADER_LEN; length += HEADER_LEN; } // read data from exe fseek(exefp, files[i].offset, SEEK_SET); fread(file, files[i].length, 1, exefp); #ifndef _L10N_CP1251 if (check_crc) { crc = crc_calc(file, files[i].length); if (crc != files[i].crc) { status("File '%s' failed CRC check.", outfilename); print(""); #ifndef __SDLSHIM__ print("[I]gnore"); print("Ignore [A]ll"); print("[S]top"); #define IGNORE_BTN SDLK_i #if defined(_MOTOMAGX) || defined(_MOTOEZX) #define IGNORE_ALL_BTN SDLK_PLUS #else #define IGNORE_ALL_BTN SDLK_a #endif #define STOP_BTN SDLK_s #else print("B1 - Ignore"); print("B2 - Ignore All"); print("B3 - Stop"); #define IGNORE_BTN SDLK_BTN1 #define IGNORE_ALL_BTN SDLK_BTN2 #define STOP_BTN SDLK_BTN3 #endif for(;;) { switch(run_until_key(first_crc_failure)) { case IGNORE_BTN: break; case IGNORE_ALL_BTN: check_crc = false; break; #ifndef __SDLSHIM__ case SDLK_ESCAPE: #endif case STOP_BTN: { free(buffer); return 1; } default: continue; } break; } first_crc_failure = false; } } #endif // write out the file createdir(outfilename); FILE *fp = fileopen(outfilename, "wb"); if (!fp) { status("Failed to open '%s' for writing.", outfilename); free(buffer); return 1; } fwrite(buffer, length, 1, fp); fclose(fp); } free(buffer); return 0; } static void createdir(const char *fname) { char *dir = strdup(fname); char *ptr = strchr(dir, '/'); if (ptr) { *ptr = 0; #ifdef __MINGW32__ mkdir(dir); #else mkdir(dir, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); #endif } free(dir); } ================================================ FILE: extract/extractfiles.fdh ================================================ //hash:ac97400d //automatically generated by Makegen /* located in platform.cpp */ //-------------[referenced from extract/extractfiles.cpp]------------// FILE *fileopen(const char *fname, const char *mode); /* located in extract/extractfiles.cpp */ //-------------[referenced from extract/extractfiles.cpp]------------// bool extract_files(FILE *exefp); static void createdir(const char *fname); /* located in extract/crc.cpp */ //-------------[referenced from extract/extractfiles.cpp]------------// void crc_init(void); uint32_t crc_calc(uint8_t *buf, uint32_t size); ================================================ FILE: extract/extractpxt.cpp ================================================ #include #include #include #include #include #ifdef __MINGW32__ #include #endif #include "../graphics/safemode.h" #include "../common/basics.h" #include "extractpxt.fdh" using safemode::moveto; using safemode::status; static struct { const char *name; bool is_integer; } fields[] = { "use ", 1, "size ", 1, "main_model ", 1, "main_freq ", 0, "main_top ", 1, "main_offset ", 1, "pitch_model ", 1, "pitch_freq ", 0, "pitch_top ", 1, "pitch_offset ", 1, "volume_model ", 1, "volume_freq ", 0, "volume_top ", 1, "volume_offset", 1, "initialY", 1, "ax ", 1, "ay ", 1, "bx ", 1, "by ", 1, "cx ", 1, "cy ", 1, NULL }; static struct { int id; int nchanl; uint32_t offset; } snd[] = { 0x01, 1, 0x0907b0, 0x02, 1, 0x0909e0, 0x03, 1, 0x0934c0, 0x04, 1, 0x090890, 0x05, 1, 0x090660, 0x06, 1, 0x093530, 0x07, 1, 0x0935a0, 0x0b, 1, 0x090740, 0x0c, 2, 0x090c80, 0x0e, 1, 0x090a50, 0x0f, 1, 0x08fbe0, 0x10, 2, 0x090350, 0x11, 3, 0x090430, 0x12, 1, 0x090820, 0x14, 2, 0x090900, 0x15, 1, 0x090c10, 0x16, 1, 0x0906d0, 0x17, 1, 0x08fcc0, 0x18, 1, 0x08fc50, 0x19, 2, 0x090d60, 0x1a, 2, 0x090b30, 0x1b, 1, 0x090e40, 0x1c, 2, 0x0910e0, 0x1d, 1, 0x0911c0, 0x1e, 1, 0x091ee0, 0x1f, 1, 0x091310, 0x20, 2, 0x08f940, 0x21, 2, 0x08fa20, 0x22, 2, 0x08fb00, 0x23, 3, 0x090eb0, 0x25, 2, 0x092810, 0x26, 2, 0x091230, 0x27, 3, 0x091000, 0x28, 2, 0x092730, 0x29, 2, 0x092730, 0x2a, 1, 0x091380, 0x2b, 1, 0x0913f0, 0x2c, 3, 0x091460, 0x2d, 1, 0x0915b0, 0x2e, 1, 0x091620, 0x2f, 1, 0x091700, 0x30, 1, 0x091770, 0x31, 2, 0x0917e0, 0x32, 2, 0x08fd30, 0x33, 2, 0x08fe10, 0x34, 2, 0x08fef0, 0x35, 2, 0x090580, 0x36, 2, 0x091a80, 0x37, 2, 0x092ea0, 0x38, 2, 0x092650, 0x39, 2, 0x0928f0, 0x3a, 2, 0x092dc0, 0x3b, 1, 0x093060, 0x3c, 1, 0x0930d0, 0x3d, 1, 0x093140, 0x3e, 2, 0x0931b0, 0x3f, 2, 0x093290, 0x40, 2, 0x093370, 0x41, 1, 0x093450, 0x46, 2, 0x08ffd0, 0x47, 2, 0x0900b0, 0x48, 2, 0x090190, 0x64, 1, 0x0918c0, 0x65, 3, 0x091930, 0x66, 2, 0x091b60, 0x67, 2, 0x091c40, 0x68, 1, 0x091cb0, 0x68, 1, 0x092c00, 0x69, 1, 0x091d20, 0x6a, 2, 0x091d90, 0x6b, 1, 0x091e70, 0x6c, 1, 0x091f50, 0x6d, 1, 0x091fc0, 0x6e, 1, 0x092030, 0x6f, 1, 0x0920a0, 0x70, 1, 0x092110, 0x71, 1, 0x092180, 0x72, 2, 0x0921f0, 0x73, 3, 0x092ab0, 0x74, 3, 0x092c70, 0x75, 2, 0x092f80, 0x96, 2, 0x0922d0, 0x97, 2, 0x0923b0, 0x98, 1, 0x092490, 0x99, 1, 0x092500, 0x9a, 2, 0x092570, 0x9b, 2, 0x0929d0, 0, 0, 0 }; bool extract_pxt(FILE *fp) { struct { union { int intvalue; double fpvalue; } values[50]; } chan[4]; int s, c, i; for(s=0;;s++) { if (!snd[s].id) break; char outfilename[MAXPATHLEN]; sprintf(outfilename, "pxt/fx%02x.pxt", snd[s].id); status("[ %s ]", outfilename); #ifndef __MINGW32__ mkdir("pxt", 0755); #else mkdir("pxt"); #endif FILE *fpo = fileopen(outfilename, "wb"); if (!fpo) { status("failed to open %s", outfilename); return 1; } fseek(fp, snd[s].offset, SEEK_SET); memset(chan, 0, sizeof(chan)); // load data for(c=0;c #include #include #include #include #include #include "../graphics/safemode.h" #include "../common/StringList.h" #include "../common/basics.h" #include "../stagedata.h" #include "../maprecord.h" #include "extractstages.fdh" using safemode::moveto; using safemode::status; using safemode::print; using safemode::run_until_key; #define NMAPS 95 #define DATA_OFFSET 0x937B0 struct EXEMapRecord { char tileset[32]; char filename[32]; int scroll_type; char background[32]; char NPCset1[32]; char NPCset2[32]; uint8_t bossNo; char caption[35]; }; EXEMapRecord exemapdata[NMAPS]; MapRecord mapdata[NMAPS]; // the NPC set system isn't used by NXEngine, but the information // is used in a few places to figure out which sprite to be drawn. // for example Balrog when he appears in the Gum Room is supposed to be green. const char *npcsetnames[] = { "guest", "0", "eggs1", "ravil", "weed", "maze", "sand", "omg", "cemet", "bllg", "plant", "frog", "curly", "stream", "ironh", "toro", "x", "dark", "almo1", "eggs2", "twind", "moon", "cent", "heri", "red", "miza", "dr", "almo2", "kings", "hell", "press", "priest", "ballos", "island", NULL }; bool extract_stages(FILE *exefp) { int i; status("[ stage.dat ]"); // load raw data into struct fseek(exefp, DATA_OFFSET, SEEK_SET); fread(exemapdata, sizeof(EXEMapRecord), NMAPS, exefp); // convert the data memset(mapdata, 0, sizeof(mapdata)); const char *error = NULL; for(i=0;iprev = this; else last = this; first = this; this->sprite = sprite; Reset(); ObjectDestroyed = false; } FloatText::~FloatText() { if (this->next) this->next->prev = this->prev; if (this->prev) this->prev->next = this->next; if (this == first) first = first->next; if (this == last) last = last->prev; } void FloatText::Reset() { this->state = FT_IDLE; this->shownAmount = 0; } /* void c------------------------------() {} */ // adds the spec'd amount of damage/energy to the object's point display void FloatText::AddQty(int amt) { //stat("FloatText::AddQty(%d)", amt); if (amt == 0) return; // first add the damage to the total if (this->state == FT_IDLE) { this->state = FT_RISE; this->shownAmount = amt; this->yoff = FT_Y_START; this->timer = 0; } else { this->shownAmount += amt; // if we're scrolling away jerk back down if (this->state == FT_SCROLL_AWAY) { this->state = FT_HOLD; this->yoff = FT_Y_HOLD; } // reset the timer which counts how long we stay in hold state if (this->state != FT_RISE) this->timer = 0; } if (this->shownAmount > 9999) this->shownAmount = 9999; // overrun protection for buffer } // updates the position of a floattext in respect to it's object void FloatText::UpdatePos(Object *assoc_object) { // get the center pixel of the object we're associated with this->objX = (assoc_object->x >> CSF) + (sprites[assoc_object->sprite].w / 2); this->objY = (assoc_object->y >> CSF) + (sprites[assoc_object->sprite].h / 2); // adjust for possible draw point SIFDir *dir = &sprites[assoc_object->sprite].frame[assoc_object->frame].dir[assoc_object->dir]; this->objX -= dir->drawpoint.x; this->objY -= dir->drawpoint.y; } // moves and draws the given float text if need be void FloatText::Draw() { FloatText *ft = this; int x, y, i; switch(ft->state) { // rise to top point, moving once every other frame case FT_RISE: { ft->timer ^= 1; if (ft->timer) { if (--ft->yoff <= FT_Y_HOLD) { ft->state = FT_HOLD; ft->timer = 0; } } } break; // hold at top for a moment case FT_HOLD: { if (++ft->timer >= 42) ft->state = FT_SCROLL_AWAY; } break; // scroll away quickly and disappear case FT_SCROLL_AWAY: { if (--ft->yoff <= FT_Y_RISEAWAY) { ft->state = FT_IDLE; ft->shownAmount = 0; ft->timer = 0; return; } } break; } // set the SDL clipping region to just above the hold point // so it looks like it "rolls" away. if (ft->state == FT_SCROLL_AWAY) { // this formula is confusing until you realize that FT_Y_HOLD is a negative number int y = ((ft->objY - (map.displayed_yscroll >> CSF)) + FT_Y_HOLD); int h = (SCREEN_HEIGHT - y); set_clip_rect(0, y, SCREEN_WIDTH, h); } // render the damage amount into a string char text[6] = { 10 }; sprintf(&text[1], "%d", ft->shownAmount); for(i=1;text[i];i++) text[i] -= '0'; int textlen = i; x = ft->objX - (textlen * (8 / 2)); // center the string on the object y = ft->objY + ft->yoff; // adjust to object's onscreen position x -= (map.displayed_xscroll >> CSF); y -= (map.displayed_yscroll >> CSF); // draw the text char by char for(i=0;isprite, text[i], 0); x += 8; } if (ft->state == FT_SCROLL_AWAY) clear_clip_rect(); } bool FloatText::IsScrollingAway() { return (this->state == FT_SCROLL_AWAY); } /* void c------------------------------() {} */ void FloatText::DrawAll(void) { FloatText *ft = first; FloatText *nextft; int count = 0; while(ft) { nextft = ft->next; if (ft->state != FT_IDLE) { ft->Draw(); } else { if (ft->ObjectDestroyed) delete ft; } ft = nextft; count++; } } // do NOT call this to remove all enemy's floattext from the map. // for one thing, it could leave dangling invalid pointers. // for another, it deletes the player->XPText, etc. // instead, call ResetAll and let them clean themselves up. void FloatText::DeleteAll(void) { while(first) delete first; } void FloatText::ResetAll(void) { FloatText *ft = first; while(ft) { ft->Reset(); ft = ft->next; } } ================================================ FILE: floattext.fdh ================================================ //hash:00000000 //automatically generated by Makegen ================================================ FILE: floattext.h ================================================ #ifndef _FLOATTEXT_H #define _FLOATTEXT_H #define FT_Y_START -4 // this starts it exactly centered, since the font is 8px tall #define FT_Y_HOLD -19 #define FT_Y_RISEAWAY (FT_Y_HOLD - 8) enum FloatTextStates { FT_IDLE, FT_RISE, FT_HOLD, FT_SCROLL_AWAY, }; class FloatText { public: FloatText(int sprite); ~FloatText(); void Reset(); void AddQty(int amt); bool IsScrollingAway(); void UpdatePos(Object *assoc_object); static void DrawAll(); static void DeleteAll(); static void ResetAll(void); bool ObjectDestroyed; private: void Draw(); uint8_t state; int yoff; // how much we've risen int shownAmount; int sprite; // allows selecting font int timer; SDL_Rect cliprect; int objX, objY; // the center pixel of the associated object (de-CSFd) FloatText *next, *prev; static FloatText *first, *last; }; #endif ================================================ FILE: game.cpp ================================================ #include "nx.h" #include "endgame/island.h" #include "endgame/credits.h" #include "intro/intro.h" #include "intro/title.h" #include "pause/pause.h" #include "pause/options.h" #include "inventory.h" #include "map_system.h" #include "game.h" #include "profile.h" #include "game.fdh" static struct TickFunctions { void (*OnTick)(void); bool (*OnEnter)(int param); void (*OnExit)(void); } tickfunctions[] = { NULL, NULL, NULL, // GM_NONE game_tick_normal, NULL, NULL, // GM_NORMAL inventory_tick, inventory_init, NULL, // GM_INVENTORY ms_tick, ms_init, ms_close, // GM_MAP_SYSTEM island_tick, island_init, NULL, // GM_ISLAND credit_tick, credit_init, credit_close, // GM_CREDITS intro_tick, intro_init, NULL, // GM_INTRO title_tick, title_init, NULL, // GM_TITLE pause_tick, pause_init, NULL, // GP_PAUSED options_tick, options_init, options_close // GP_OPTIONS //old_options_tick, old_options_init, old_options_close // GP_OPTIONS }; Object *onscreen_objects[MAX_OBJECTS]; int nOnscreenObjects; Game game; TextBox textbox; DebugConsole console; ObjProp objprop[OBJ_LAST]; // init Game object: only called once during startup bool Game::init() { int i; memset(&game, 0, sizeof(game)); // set default properties memset(objprop, 0, sizeof(objprop)); for(i=0;iCenterX(), player->CenterY()); if (game.switchstage.eventonentry) { // this prevents a glitch otherwise caused by entry script to Last Cave. // i.e. the script immediately riding = NULL; player->bopped_object = NULL; Objects::UpdateBlockStates(); if (!game.frozen) { // run AI for player and stageboss first HandlePlayer(); game.stageboss.Run(); // now objects AI and move all objects to their new positions Objects::RunAI(); Objects::PhysicsSim(); // run the "aftermove" AI routines HandlePlayer_am(); game.stageboss.RunAftermove(); FOREACH_OBJECT(o) { if (!o->deleted) o->OnAftermove(); } } // important to put this before and not after DrawScene(), or non-existant objects // can wind up in the onscreen_objects[] array, and blow up the program on the next tick. Objects::CullDeleted(); map_scroll_do(); DrawScene(); DrawStatusBar(); fade.Draw(); niku_run(); if (player->equipmask & EQUIP_NIKUMARU) niku_draw(game.counter); textbox.Draw(); ScreenEffects::Draw(); map_draw_map_name(); // stage name overlay as on entry } // shake screen. void quake(int quaketime, int snd) { if (game.quaketime < quaketime) game.quaketime = quaketime; if (snd) sound((snd != -1) ? snd : SND_QUAKE); } // during Ballos fight, since there's already a perpetual quake, // we need to be able to make an even BIGGER quake effect. void megaquake(int quaketime, int snd) { if (game.megaquaketime < quaketime) { game.megaquaketime = quaketime; if (game.quaketime < game.megaquaketime) game.quaketime = game.megaquaketime; } if (snd) sound((snd != -1) ? snd : SND_QUAKE); } void DrawScene(void) { int scr_x, scr_y; extern int flipacceltime; // sporidically-used animated tile feature, // e.g. water currents in Waterway if (map.nmotiontiles) AnimateMotionTiles(); // draw background map tiles if (!flipacceltime) { map_draw_backdrop(); map_draw(false); } // draw all objects following their z-order nOnscreenObjects = 0; for(Object *o = lowestobject; o != NULL; o = o->higher) { if (o == player) continue; // player drawn specially in DrawPlayer // keep it's floattext linked with it's position o->DamageText->UpdatePos(o); // shake enemies that were just hit. when they stop shaking, // start rising up how many damage they took. if (o->shaketime) { o->display_xoff = (o->shaketime & 2) ? 1 : -1; if (!--o->shaketime) o->display_xoff = 0; } else if (o->DamageWaiting > 0) { o->DamageText->AddQty(o->DamageWaiting); o->DamageWaiting = 0; } // get object's onscreen position scr_x = (o->x >> CSF) - (map.displayed_xscroll >> CSF); scr_y = (o->y >> CSF) - (map.displayed_yscroll >> CSF); scr_x -= sprites[o->sprite].frame[o->frame].dir[o->dir].drawpoint.x; scr_y -= sprites[o->sprite].frame[o->frame].dir[o->dir].drawpoint.y; // don't draw objects that are completely offscreen // (+26 so floattext won't suddenly disappear on object near bottom of screen) if (scr_x <= SCREEN_WIDTH && scr_y <= SCREEN_HEIGHT+26 && \ scr_x >= -sprites[o->sprite].w && scr_y >= -sprites[o->sprite].h) { if (nOnscreenObjects < MAX_OBJECTS-1) { onscreen_objects[nOnscreenObjects++] = o; o->onscreen = true; } else { staterr("%s:%d: Max Objects Overflow", __FILE__, __LINE__); return; } if (!o->invisible && o->sprite != SPR_NULL) { scr_x += o->display_xoff; if (o->clip_enable) { draw_sprite_clipped(scr_x, scr_y, o->sprite, o->frame, o->dir, o->clipx1, o->clipx2, o->clipy1, o->clipy2); } else { draw_sprite(scr_x, scr_y, o->sprite, o->frame, o->dir); } } } else { o->onscreen = false; } } // draw the player DrawPlayer(); // draw foreground map tiles if (!flipacceltime) map_draw(TA_FOREGROUND); // draw carets (always-on-top effects such as boomflash) Carets::DrawAll(); // draw rising/falling water in maps like Almond map_drawwaterlevel(); // draw all floattext (rising damage and XP amounts) FloatText::DrawAll(); if (game.debug.DrawBoundingBoxes) DrawBoundingBoxes(); //if (game.debug.debugmode) DrawAttrPoints(); } /* void c------------------------------() {} */ bool game_load(int num) { Profile p; stat("game_load: loading savefile %d", num); if (profile_load(GetProfileName(num), &p)) return 1; return game_load(&p); } bool game_load(Profile *p) { int i; player->hp = p->hp; player->maxHealth = p->maxhp; player->whimstar.nstars = p->num_whimstars; player->equipmask = p->equipmask; // load weapons for(i=0;iweapons[i].hasWeapon = p->weapons[i].hasWeapon; player->weapons[i].level = p->weapons[i].level; player->weapons[i].xp = p->weapons[i].xp; player->weapons[i].ammo = p->weapons[i].ammo; player->weapons[i].maxammo = p->weapons[i].maxammo; } player->curWeapon = p->curWeapon; // load inventory memcpy(player->inventory, p->inventory, sizeof(player->inventory)); player->ninventory = p->ninventory; // load flags memcpy(game.flags, p->flags, sizeof(game.flags)); // load teleporter slots textbox.StageSelect.ClearSlots(); for(i=0;inum_teleslots;i++) { int slotno = p->teleslots[i].slotno; int scriptno = p->teleslots[i].scriptno; textbox.StageSelect.SetSlot(slotno, scriptno); stat(" - Read Teleporter Slot %d: slotno=%d scriptno=%d", i, slotno, scriptno); } // have to load the stage last AFTER the flags are loaded because // of the options to appear and disappear objects based on flags. if (load_stage(p->stage)) return 1; music(p->songno); player->x = p->px; player->y = p->py; player->dir = p->pdir; player->hide = false; game.showmapnametime = 0; return 0; } bool game_save(int num) { Profile p; stat("game_save: writing savefile %d", num); if (game_save(&p)) return 1; if (profile_save(GetProfileName(num), &p)) return 1; return 0; } bool game_save(Profile *p) { int i; memset(p, 0, sizeof(Profile)); p->stage = game.curmap; p->songno = music_cursong(); p->px = player->x; p->py = player->y; p->pdir = player->dir; p->hp = player->hp; p->maxhp = player->maxHealth; p->num_whimstars = player->whimstar.nstars; p->equipmask = player->equipmask; // save weapons p->curWeapon = player->curWeapon; for(i=0;iweapons[i].hasWeapon = player->weapons[i].hasWeapon; p->weapons[i].level = player->weapons[i].level; p->weapons[i].xp = player->weapons[i].xp; p->weapons[i].ammo = player->weapons[i].ammo; p->weapons[i].maxammo = player->weapons[i].maxammo; } // save inventory p->ninventory = player->ninventory; memcpy(p->inventory, player->inventory, sizeof(p->inventory)); // save flags memcpy(p->flags, game.flags, sizeof(p->flags)); // save teleporter slots for(i=0;iteleslots[p->num_teleslots].slotno = slotno; p->teleslots[p->num_teleslots].scriptno = scriptno; p->num_teleslots++; } } return 0; } /* void c------------------------------() {} */ // assign sprites for the objects that didn't get covered by the // auto-generated spritesetup->cpp, and set some properties on the objects. // This is mostly for objects where the sprite is not named the same as // the object it is assigned to. void AssignExtraSprites(void) { objprop[OBJ_PLAYER].sprite = SPR_MYCHAR; objprop[OBJ_NPC_PLAYER].sprite = SPR_MYCHAR; objprop[OBJ_PTELIN].sprite = SPR_MYCHAR; objprop[OBJ_PTELOUT].sprite = SPR_MYCHAR; objprop[OBJ_NULL].sprite = SPR_NULL; objprop[OBJ_HVTRIGGER].sprite = SPR_NULL; objprop[OBJ_BUBBLE_SPAWNER].sprite = SPR_NULL; objprop[OBJ_DROPLET_SPAWNER].sprite = SPR_NULL; objprop[OBJ_HEY_SPAWNER].sprite = SPR_NULL; objprop[OBJ_WATERLEVEL].sprite = SPR_NULL; objprop[OBJ_LAVA_DRIP_SPAWNER].sprite = SPR_NULL; objprop[OBJ_RED_BAT_SPAWNER].sprite = SPR_NULL; objprop[OBJ_SCROLL_CONTROLLER].sprite = SPR_NULL; objprop[OBJ_DOCTOR_GHOST].sprite = SPR_NULL; objprop[OBJ_FALLING_BLOCK].sprite = SPR_NULL; // set at runtime based on current map objprop[OBJ_FALLING_BLOCK_SPAWNER].sprite = SPR_NULL; objprop[OBJ_QUAKE].sprite = SPR_NULL; objprop[OBJ_BUTE_SPAWNER].sprite = SPR_NULL; objprop[OBJ_SMOKE_DROPPER].sprite = SPR_NULL; objprop[OBJ_BUTE_ARROW].sprite = SPR_BUTE_ARROW_LEFT; // so spawn point is applied objprop[OBJ_POLISHBABY].defaultnxflags |= NXFLAG_SLOW_WHEN_HURT; objprop[OBJ_MIMIGAC1].sprite = SPR_MIMIGAC; objprop[OBJ_MIMIGAC2].sprite = SPR_MIMIGAC; objprop[OBJ_MIMIGAC_ENEMY].sprite = SPR_MIMIGAC; objprop[OBJ_MIMIGAC_ENEMY].shaketime = 0; objprop[OBJ_MISERY_FLOAT].sprite = SPR_MISERY; objprop[OBJ_MISERY_FLOAT].damage = 1; objprop[OBJ_MISERY_STAND].sprite = SPR_MISERY; objprop[OBJ_PUPPY_WAG].sprite = SPR_PUPPY; objprop[OBJ_PUPPY_BARK].sprite = SPR_PUPPY; objprop[OBJ_PUPPY_CARRY].sprite = SPR_PUPPY; objprop[OBJ_PUPPY_SLEEP].sprite = SPR_PUPPY_ASLEEP; objprop[OBJ_PUPPY_RUN].sprite = SPR_PUPPY; objprop[OBJ_PUPPY_ITEMS].sprite = SPR_PUPPY; objprop[OBJ_BALROG_DROP_IN].sprite = SPR_BALROG; objprop[OBJ_BALROG_BUST_IN].sprite = SPR_BALROG; objprop[OBJ_CROWWITHSKULL].sprite = SPR_CROW; objprop[OBJ_ARMADILLO].defaultnxflags |= (NXFLAG_FOLLOW_SLOPE | NXFLAG_SLOW_WHEN_HURT); objprop[OBJ_SKULLHEAD_CARRIED].sprite = SPR_SKULLHEAD; objprop[OBJ_TOROKO].defaultnxflags |= NXFLAG_FOLLOW_SLOPE; objprop[OBJ_TOROKO_TELEPORT_IN].sprite = SPR_TOROKO; objprop[OBJ_KING].defaultnxflags |= NXFLAG_FOLLOW_SLOPE; objprop[OBJ_FAN_DROPLET].sprite = SPR_WATER_DROPLET; objprop[OBJ_MGUN_TRAIL].defaultflags |= FLAG_IGNORE_SOLID; objprop[OBJ_BLOCK_MOVEH].sprite = SPR_MOVING_BLOCK; objprop[OBJ_BLOCK_MOVEV].sprite = SPR_MOVING_BLOCK; objprop[OBJ_IRONH].shaketime = 8; objprop[OBJ_OMEGA_BODY].shaketime = 0; // omega handles his own shaketime objprop[OBJ_OMEGA_BODY].hurt_sound = SND_ENEMY_HURT_BIG; objprop[OBJ_OMEGA_LEG].sprite = SPR_OMG_LEG_INAIR; objprop[OBJ_OMEGA_STRUT].sprite = SPR_OMG_STRUT; objprop[OBJ_OMEGA_SHOT].death_smoke_amt = 4; objprop[OBJ_OMEGA_SHOT].death_sound = SND_EXPL_SMALL; objprop[OBJ_OMEGA_SHOT].initial_hp = 1; objprop[OBJ_OMEGA_SHOT].xponkill = 1; objprop[OBJ_BAT_HANG].sprite = SPR_BAT; objprop[OBJ_BAT_CIRCLE].sprite = SPR_BAT; objprop[OBJ_FIREBALL1].defaultnxflags |= NXFLAG_FOLLOW_SLOPE; objprop[OBJ_FIREBALL23].defaultnxflags |= NXFLAG_FOLLOW_SLOPE; objprop[OBJ_CURLY_AI].sprite = SPR_CURLY; objprop[OBJ_CURLY_AI].defaultnxflags |= NXFLAG_FOLLOW_SLOPE; objprop[OBJ_CURLY].defaultnxflags |= NXFLAG_FOLLOW_SLOPE; objprop[OBJ_MINICORE].hurt_sound = SND_ENEMY_HURT_COOL; objprop[OBJ_CORE_CONTROLLER].hurt_sound = SND_CORE_HURT; objprop[OBJ_CURLY_CARRIED].sprite = SPR_CURLY; objprop[OBJ_BALROG_BOSS_RUNNING].sprite = SPR_BALROG; objprop[OBJ_BALROG_BOSS_FLYING].sprite = SPR_BALROG; objprop[OBJ_BALROG_BOSS_MISSILES].sprite = SPR_BALROG; objprop[OBJ_XP].sprite = SPR_XP_SMALL; objprop[OBJ_NPC_IGOR].sprite = SPR_IGOR; objprop[OBJ_BOSS_IGOR].sprite = SPR_IGOR; objprop[OBJ_BOSS_IGOR_DEFEATED].sprite = SPR_IGOR; objprop[OBJ_IGOR_BALCONY].sprite = SPR_IGOR; objprop[OBJ_X_TARGET].hurt_sound = SND_ENEMY_HURT_COOL; objprop[OBJ_X_INTERNALS].shaketime = 9; objprop[OBJ_X_MAINOBJECT].xponkill = 1; objprop[OBJ_POOH_BLACK_BUBBLE].xponkill = 0; objprop[OBJ_POOH_BLACK_DYING].sprite = SPR_POOH_BLACK; objprop[OBJ_BOOSTER_FALLING].sprite = SPR_PROFESSOR_BOOSTER; objprop[OBJ_MIMIGA_FARMER_STANDING].sprite = SPR_MIMIGA_FARMER; objprop[OBJ_MIMIGA_FARMER_WALKING].sprite = SPR_MIMIGA_FARMER; objprop[OBJ_DROLL_GUARD].sprite = SPR_DROLL; objprop[OBJ_MA_PIGNON_CLONE].sprite = SPR_MA_PIGNON; objprop[OBJ_DOCTOR_SHOT_TRAIL].sprite = SPR_DOCTOR_SHOT; // they're still able to detect when they touch floor; etc, // but we don't want say a falling one to get blocked by the ceiling. objprop[OBJ_RED_ENERGY].defaultflags |= FLAG_IGNORE_SOLID; objprop[OBJ_SUE_TELEPORT_IN].sprite = SPR_SUE; objprop[OBJ_MISERY_BAT].sprite = SPR_ORANGE_BAT_FINAL; objprop[OBJ_UD_MINICORE_IDLE].sprite = SPR_UD_MINICORE; objprop[OBJ_WHIMSICAL_STAR].sprite = SPR_WHIMSICAL_STAR; // for bbox only, object is invisible // these are set by AI; this is just to silence unimplemented object warnings #ifdef DEBUG objprop[OBJ_CRITTER_FLYING].sprite = SPR_CRITTER_FLYING_CYAN; for(int i=OBJ_SHOTS_START;i<=OBJ_SHOTS_END;i++) if (objprop[i].sprite==SPR_UNIMPLEMENTED_OBJECT) objprop[i].sprite = SPR_NULL; #endif } ================================================ FILE: game.fdh ================================================ //hash:1a5f54ff //automatically generated by Makegen /* located in game.cpp */ //---------------------[referenced from game.cpp]--------------------// void game_tick_normal(void); void quake(int quaketime, int snd); void megaquake(int quaketime, int snd); void DrawScene(void); bool game_load(int num); bool game_load(Profile *p); bool game_save(int num); bool game_save(Profile *p); void AssignExtraSprites(void); /* located in ObjManager.cpp */ //---------------------[referenced from game.cpp]--------------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //---------------------[referenced from game.cpp]--------------------// bool initmapfirsttime(void); void initmap(void); void map_scroll_jump(int x, int y); void map_scroll_do(void); void map_draw_map_name(void); void AnimateMotionTiles(void); void map_draw_backdrop(void); void map_draw(uint8_t foreground); void map_drawwaterlevel(void); bool load_stage(int stage_no); /* located in profile.cpp */ //---------------------[referenced from game.cpp]--------------------// bool profile_load(const char *pfname, Profile *file); const char *GetProfileName(int num); bool profile_save(const char *pfname, Profile *file); /* located in slope.cpp */ //---------------------[referenced from game.cpp]--------------------// bool initslopetable(void); /* located in player.cpp */ //---------------------[referenced from game.cpp]--------------------// void InitPlayer(void); void PHandleAttributes(void); void PSelectFrame(void); void PInitFirstTime(); void HandlePlayer(void); void HandlePlayer_am(void); void DrawPlayer(void); /* located in statusbar.cpp */ //---------------------[referenced from game.cpp]--------------------// bool statusbar_init(void); void DrawStatusBar(void); void niku_run(); void niku_draw(int value, bool force_white); /* located in tsc.cpp */ //---------------------[referenced from game.cpp]--------------------// ScriptInstance *StartScript(int scriptno, int pageno); void RunScripts(void); void StopScripts(void); /* located in debug.cpp */ //---------------------[referenced from game.cpp]--------------------// void debug_clear(); void DrawDebug(void); void DrawBoundingBoxes(); /* located in ai/ai.cpp */ //---------------------[referenced from game.cpp]--------------------// bool ai_init(void); /* located in sound/sound.cpp */ //---------------------[referenced from game.cpp]--------------------// void StopLoopSounds(void); void sound(int snd); void music(int songno); int music_cursong(); /* located in autogen/AssignSprites.cpp */ //---------------------[referenced from game.cpp]--------------------// void AssignSprites(void); /* located in common/stat.cpp */ //---------------------[referenced from game.cpp]--------------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); ================================================ FILE: game.h ================================================ #ifndef _GAME_H #define _GAME_H enum Directions { RIGHT = 0, LEFT = 1, UP = 2, DOWN = 3, CENTER = 5 }; #define GAME_FPS 50 // for UpdateBlockedStates #define RIGHTMASK 0x01 #define LEFTMASK 0x02 #define UPMASK 0x04 #define DOWNMASK 0x08 #define ALLDIRMASK (LEFTMASK | RIGHTMASK | UPMASK | DOWNMASK) // highest addressable flag by tsc scripts etc #define NUM_GAMEFLAGS 8000 // switchstage.mapno is set to this to load a game #define MAPNO_SPECIALS 1000 #define LOAD_GAME 1000 #define NEW_GAME 1001 #define NEW_GAME_FROM_MENU 1002 // new game (include Kazuma cutscene) #define LOAD_GAME_FROM_MENU 1003 // load game (from title screen, include weapon slide) #define START_REPLAY 1004 // game modes (changes *tickfunction) enum GameModes { GM_NONE, // default mode at startup & shutdown GM_NORMAL, // playing the game GM_INVENTORY, // in inventory screen GM_MAP_SYSTEM, // viewing Map System GM_ISLAND, // XX1 good-ending island-crash cutscene GM_CREDITS, // = 0 the stage ends and we switch to the new stage struct { int mapno; int playerx, playery; int eventonentry; int param; } switchstage; // game flags and skipflags as set by scripts bool flags[NUM_GAMEFLAGS]; bool skipflags[NUM_GAMEFLAGS]; // earthquake effect; #include #include #include #include #include #include #include #include #include #include "../config.h" #include "fbdev.fdh" static int fd = -1; static struct fb_var_screeninfo vinfo; static struct fb_fix_screeninfo finfo; static uint8_t *framebuffer = NULL; static uint8_t *start_addr = NULL; static int depth, screen_pitch; static int vram_length; bool fbdev_init(void) { stat("Initilizing framebuffer..."); fd = open("/dev/fb0", O_RDWR); if (fd == -1) { staterr("Could not open framebuffer."); return 1; } // Get fixed screen information if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo)) { staterr("Could not read fixed screen info."); return 1; } // Get variable screen information if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo)) { staterr("Could not read variable screen info."); return 1; } stat("Framebuffer %dx%d, %dbpp", vinfo.xres_virtual, vinfo.yres_virtual, vinfo.bits_per_pixel); depth = (vinfo.bits_per_pixel / 8); screen_pitch = (vinfo.xres_virtual * depth); vram_length = (vinfo.yres_virtual * screen_pitch); // Map the device to memory framebuffer = (uint8_t *)mmap(0, vram_length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (framebuffer == MAP_FAILED) { staterr("Framebuffer mmap failed!"); return 1; } stat("Framebuffer init success!"); start_addr = framebuffer; return 0; } void fbdev_close(void) { if (framebuffer) munmap(framebuffer, vram_length); if (fd != -1) close(fd); } /* void c------------------------------() {} */ void fbdev_blit(uint8_t *source, int width, int height) { uint8_t *ptr = start_addr; int line_len = (width * depth); for(int y=0;y #ifdef CONFIG_ENABLE_TTF #include #endif #include "../nx.h" #include "font.h" #include "font.fdh" static int text_draw(int x, int y, const char *text, int spacing=0, NXFont *font=&whitefont); #define SHADOW_OFFSET 2 // distance of drop shadows #define BITMAP_CHAR_WIDTH 5 // width of each char #define BITMAP_CHAR_HEIGHT 9 // height of each char #define BITMAP_SPAC_WIDTH 8 // how far apart chars are from each other on the sheet #define BITMAP_SPAC_HEIGHT 12 // ditto for Y-spacing // For convert cp1251 to utf-8 int wtable[64] = { 0x0402, 0x0403, 0x201A, 0x0453, 0x201E, 0x2026, 0x2020, 0x2021, 0x20AC, 0x2030, 0x0409, 0x2039, 0x040A, 0x040C, 0x040B, 0x040F, 0x0452, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, 0x007F, 0x2122, 0x0459, 0x203A, 0x045A, 0x045C, 0x045B, 0x045F, 0x00A0, 0x040E, 0x045E, 0x0408, 0x00A4, 0x0490, 0x00A6, 0x00A7, 0x0401, 0x00A9, 0x0404, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x0407, 0x00B0, 0x00B1, 0x0406, 0x0456, 0x0491, 0x00B5, 0x00B6, 0x00B7, 0x0451, 0x2116, 0x0454, 0x00BB, 0x0458, 0x0405, 0x0455, 0x0457 }; static const char bitmap_map[] = { // letter order of bitmap font sheet " !\"#$%&`()*+,-./0123456789:;<=>?" "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]%_" "'abcdefghijklmnopqrstuvwxyz{|}~" }; const char *bmpfontfile = "smalfont.bmp"; #if defined(_320X240) || defined(_480X272) const char *ttffontfile = "DroidSansMono.ttf"; #else const char *ttffontfile = "font.ttf"; #endif static SDL_Surface *sdl_screen = NULL; static SDL_Surface *shadesfc = NULL; static bool initilized = false; static bool rendering = true; static bool shrink_spaces = true; static int fontheight = 0; NXFont whitefont; NXFont greenfont; NXFont bluefont; // used for "F3:Options" text on pause screen NXFont shadowfont; // white letters w/ drop shadow // point sizes for each valid scaling factor int pointsize[] = { -1, 10, 17, 26 }; /* void c------------------------------() {} */ bool font_init(void) { bool error = false; // we'll be bypassing the NXSurface automatic scaling features // and drawing at the real resolution so we can get better-looking fonts. sdl_screen = screen->GetSDLSurface(); // at 320x240 switch to bitmap fonts for better appearance #if (defined(_320X240) || defined(_480X272)) && defined(_L10N_CP1251) if (false) #elif defined(CONFIG_ENABLE_TTF) if (SCALE == 1) #endif { stat("fonts: using bitmapped from %s", bmpfontfile); SDL_Surface *sheet = SDL_LoadBMP(bmpfontfile); if (!sheet) { staterr("Couldn't open bitmap font file: '%s'", bmpfontfile); return 1; } uint32_t fgindex = SDL_MapRGB(sheet->format, 255, 255, 255); error |= whitefont.InitBitmapChars(sheet, fgindex, 0xffffff); error |= greenfont.InitBitmapChars(sheet, fgindex, 0x00ff80); error |= bluefont.InitBitmapChars(sheet, fgindex, 0xa0b5de); error |= shadowfont.InitBitmapCharsShadowed(sheet, fgindex, 0xffffff, 0x000000); } #ifdef CONFIG_ENABLE_TTF else { stat("fonts: using truetype at %dpt", pointsize[SCALE]); // initilize normal TTF fonts if (TTF_Init() < 0) { staterr("Couldn't initialize SDL_ttf: %s", TTF_GetError()); return 1; } TTF_Font *font = TTF_OpenFont(ttffontfile, pointsize[SCALE]); if (!font) { staterr("Couldn't open font: '%s'", ttffontfile); return 1; } error |= whitefont.InitChars(font, 0xffffff); error |= greenfont.InitChars(font, 0x00ff80); error |= bluefont.InitChars(font, 0xa0b5de); error |= shadowfont.InitCharsShadowed(font, 0xffffff, 0x000000); TTF_CloseFont(font); } #endif error |= create_shade_sfc(); if (error) return 1; fontheight = (whitefont.letters['M']->h / SCALE); initilized = true; return 0; } void font_close(void) { } bool font_reload() { if (!initilized) return 0; whitefont.free(); greenfont.free(); bluefont.free(); shadowfont.free(); return font_init(); } /* void c------------------------------() {} */ NXFont::NXFont() { memset(letters, 0, sizeof(letters)); } NXFont::~NXFont() { free(); } void NXFont::free() { for(int i=0;i> 16); fgcolor.g = (uint8_t)(color >> 8); fgcolor.b = (uint8_t)(color); #ifdef _L10N_CP1251 char utf8_str[2]; #endif char str[2]; str[1] = 0; for(int i=1;i> 16); fgcolor.g = (uint8_t)(color >> 8); fgcolor.b = (uint8_t)(color); shcolor.r = (uint8_t)(shadowcolor >> 16); shcolor.g = (uint8_t)(shadowcolor >> 8); shcolor.b = (uint8_t)(shadowcolor); #ifdef _L10N_CP1251 char utf8_str[2]; #endif char str[2]; str[1] = 0; SDL_PixelFormat *format = sdl_screen->format; uint32_t transp = SDL_MapRGB(format, 255, 0, 255); for(int i=1;iw, top->h+SHADOW_OFFSET, format->BitsPerPixel, format->Rmask, format->Gmask, format->Bmask, format->Amask); if (!letters[i]) { staterr("InitCharsShadowed: failed to create surface for character %d: %s", i, SDL_GetError()); return 1; } SDL_FillRect(letters[i], NULL, transp); SDL_SetColorKey(letters[i], SDL_SRCCOLORKEY, transp); dstrect.x = 0; dstrect.y = SHADOW_OFFSET; SDL_BlitSurface(bottom, NULL, letters[i], &dstrect); dstrect.x = 0; dstrect.y = 0; SDL_BlitSurface(top, NULL, letters[i], &dstrect); } return 0; } /* Universal way to convert Windows-1251 to UTF-8 by Den Zurin * (c) http://www.gamedev.ru/code/forum/?id=119312&page=2#m17 */ int NXFont::win1251_to_utf8(const char *text, char *utext) { int wc; int i, j; if (!utext) { return 0; } i=0; j=0; while (i=0x80) { if (wc<=0xBF) { wc = wtable[wc-0x80]; } else if (wc>=0xC0 && wc<=0xDF) { wc = wc - 0xC0 + 0x0410; } else if (wc>=0xE0) { wc = wc - 0xE0 + 0x0430; } } // Unicode to UTF-8 // 0x00000000 — 0x0000007F -> 0xxxxxxx // 0x00000080 — 0x000007FF -> 110xxxxx 10xxxxxx // 0x00000800 — 0x0000FFFF -> 1110xxxx 10xxxxxx 10xxxxxx // 0x00010000 — 0x001FFFFF -> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx if (wc<0x80) { utext[j++] = (char)wc; } else if (wc<0x800) { utext[j++] = (char)((wc>>6) | 0xC0); utext[j++] = (char)((wc&0x3F) | 0x80); } else if (wc<0x10000) { utext[j++] = (char)((wc>>12) | 0xE0); utext[j++] = (char)((wc>>6) | 0x80); utext[j++] = (char)((wc&0x3F) | 0x80); } else { utext[j++] = (char)((wc>>18) | 0xF0); utext[j++] = (char)((wc>>12) | 0x80); utext[j++] = (char)((wc>>6) | 0x80); utext[j++] = (char)((wc&0x3F) | 0x80); } } utext[j] = 0x00; return 1; } #endif //CONFIG_ENABLE_TTF /* void c------------------------------() {} */ // Create a font from a bitmapped font sheet. // sheet: a 8bpp (paletted) sheet to create the font from. // fgindex: color index of foreground color of letters. // color: the color you want the letters to be. bool NXFont::InitBitmapChars(SDL_Surface *sheet, uint32_t fgcolor, uint32_t color) { SDL_PixelFormat *format = sdl_screen->format; SDL_Rect srcrect, dstrect; SDL_Surface *letter; int x, y, i; // NULL out letters we don't have a character for memset(this->letters, 0, sizeof(this->letters)); // change the color of the letters by messing with the palette on the sheet ReplaceColor(sheet, fgcolor, color); // start at the top of the letter sheet. x = 0; y = 0; for(i=0;bitmap_map[i];i++) { uint8_t ch = bitmap_map[i]; //stat("copying letter %d: '%c' from [%d,%d]", i, ch, x, y); // make character surface one pixel larger than the actual char so that there // is some space between letters in autospaced text such as on the menus. letter = SDL_CreateRGBSurface(SDL_SRCCOLORKEY, \ BITMAP_CHAR_WIDTH+1, BITMAP_CHAR_HEIGHT+1, format->BitsPerPixel, \ format->Rmask, format->Gmask, format->Bmask, format->Amask); if (!letter) { staterr("InitBitmapChars: failed to create surface for character %d/%d", i, ch); return 1; } SDL_FillRect(letter, NULL, SDL_MapRGB(format, 0, 0, 0)); // copy letter off of sheet srcrect.x = x; srcrect.y = y; srcrect.w = BITMAP_CHAR_WIDTH; srcrect.h = BITMAP_CHAR_HEIGHT; dstrect.x = 0; dstrect.y = 0; SDL_BlitSurface(sheet, &srcrect, letter, &dstrect); // make background transparent and copy into final position SDL_SetColorKey(letter, SDL_SRCCOLORKEY, SDL_MapRGB(format, 0, 0, 0)); letters[ch] = SDL_DisplayFormat(letter); SDL_FreeSurface(letter); // advance to next position on sheet x += BITMAP_SPAC_WIDTH; if (x >= sheet->w) { x = 0; y += BITMAP_SPAC_HEIGHT; } } return 0; } // create a bitmapped font with a drop-shadow. bool NXFont::InitBitmapCharsShadowed(SDL_Surface *sheet, uint32_t fgcolor, \ uint32_t color, uint32_t shadowcolor) { SDL_PixelFormat *format = sdl_screen->format; NXFont fgfont, shadowfont; SDL_Rect dstrect; // create temporary fonts in the fg and shadow color if (fgfont.InitBitmapChars(sheet, fgcolor, color)) return 1; if (shadowfont.InitBitmapChars(sheet, fgcolor, shadowcolor)) return 1; // now combine the two fonts uint32_t transp = SDL_MapRGB(format, 0, 0, 0); for(int i=0;iBitsPerPixel, \ format->Rmask, format->Gmask, format->Bmask, format->Amask); SDL_FillRect(letters[i], NULL, transp); SDL_SetColorKey(letters[i], SDL_SRCCOLORKEY, transp); dstrect.x = 0; dstrect.y = SHADOW_OFFSET; SDL_BlitSurface(shadowfont.letters[i], NULL, letters[i], &dstrect); dstrect.x = 0; dstrect.y = 0; SDL_BlitSurface(fgfont.letters[i], NULL, letters[i], &dstrect); } } return 0; } // if sfc is an 8bpp paletted surface, change color index 'oldcolor' to be newcolor. // if sfc is a 16bpp surface, replace all instances of color 'oldcolor' with 'newcolor' void NXFont::ReplaceColor(SDL_Surface *sfc, uint32_t oldcolor, uint32_t newcolor) { #ifndef __SDLSHIM__ if (sfc->format->BitsPerPixel == 8) { SDL_Color desired; desired.r = (newcolor >> 16) & 0xff; desired.g = (newcolor >> 8) & 0xff; desired.b = (newcolor & 0xff); SDL_SetColors(sfc, &desired, oldcolor, 1); } else #endif { uint16_t *pixels = (uint16_t *)sfc->pixels; int npixels = (sfc->w * sfc->h); for(int i=0;iletters[ch]; if (ch == '=' && game.mode != GM_CREDITS) { if (rendering) { int yadj = (SCALE==1) ? 1:2; draw_sprite((x/SCALE), (y/SCALE)+yadj, SPR_TEXTBULLET); } } else if (rendering && ch != ' ' && letter) { // must set this every time, because SDL_BlitSurface overwrites // dstrect with final clipping rectangle. dstrect.x = x; dstrect.y = y; SDL_BlitSurface(letter, NULL, sdl_screen, &dstrect); } if (spacing != 0) { // fixed spacing x += spacing; } else { // variable spacing if (ch == ' ' && shrink_spaces) { // 10.5 px for spaces - make smaller than they really are - the default x += (SCALE == 1) ? 5 : 10; if (i & 1) x++; } else { if (letter) x += letter->w; } } } // return the final width of the text drawn return (x - orgx); } int GetFontWidth(const char *text, int spacing, bool is_shaded) { int wd; if (spacing) return (strlen(text) * spacing); rendering = false; shrink_spaces = !is_shaded; wd = text_draw(0, 0, text, spacing * SCALE); rendering = true; shrink_spaces = true; return (wd / SCALE); } int GetFontHeight() { return fontheight; } /* void c------------------------------() {} */ // create the shadesfc, used by font_draw_shaded. It's just a big long black surface // with 50% per-surface alpha applied, that we can use to darken the background. static bool create_shade_sfc(void) { if (shadesfc) SDL_FreeSurface(shadesfc); int wd = (SCREEN_WIDTH * SCALE); int ht = whitefont.letters['M']->h; SDL_PixelFormat *format = sdl_screen->format; shadesfc = SDL_CreateRGBSurface(SDL_SRCALPHA | SDL_HWSURFACE, wd, ht, format->BitsPerPixel, format->Rmask, format->Gmask, format->Bmask, format->Amask); if (!shadesfc) { staterr("create_shade_sfc: failed to create surface"); return 1; } SDL_FillRect(shadesfc, NULL, SDL_MapRGB(format, 0, 0, 0)); SDL_SetAlpha(shadesfc, SDL_SRCALPHA, 128); return 0; } int font_draw(int x, int y, const char *text, int spacing, NXFont *font) { x *= SCALE; y *= SCALE; spacing *= SCALE; return (text_draw(x, y, text, spacing, font) / SCALE); } // draw a text string with a 50% dark border around it int font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font) { SDL_Rect srcrect, dstrect; int wd; x *= SCALE; y *= SCALE; spacing *= SCALE; // get full-res width of final text rendering = false; shrink_spaces = false; srcrect.x = 0; srcrect.y = 0; srcrect.h = shadesfc->h; srcrect.w = text_draw(0, 0, text, spacing, font); rendering = true; // shade dstrect.x = x; dstrect.y = y; SDL_BlitSurface(shadesfc, &srcrect, sdl_screen, &dstrect); // draw the text on top as normal wd = text_draw(x, y, text, spacing, font); shrink_spaces = true; return (wd / SCALE); } ================================================ FILE: graphics/font.fdh ================================================ //hash:d7ca2a1d //automatically generated by Makegen /* located in graphics/font.cpp */ //-----------------[referenced from graphics/font.cpp]---------------// bool font_init(void); void font_close(void); bool font_reload(); void direct_text_draw(int x, int y, const char *text); static int text_draw(int x, int y, const char *text, int spacing, NXFont *font); int GetFontWidth(const char *text, int spacing, bool is_shaded); int GetFontHeight(); static bool create_shade_sfc(void); int win1251_to_utf8(const char* text, char* utext); int font_draw(int x, int y, const char *text, int spacing, NXFont *font); int font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font); /* located in common/stat.cpp */ //-----------------[referenced from graphics/font.cpp]---------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); ================================================ FILE: graphics/font.h ================================================ #ifndef _FONT_H #define _FONT_H // I don't want to needlessly include in every file that // includes this one so this forward declaration makes those modules // that don't what a TTF_Font is shut up about InitChars(); however // technically TTF_Font is a typedef, so if the including file knows // the real declaration, it would bawk at this. #ifndef SDL_TTF_VERSION struct TTF_Font; #endif #define NUM_FONT_LETTERS 256 #ifndef _L10N_CP1251 #define NUM_LETTERS_RENDERED 128 #else #define NUM_LETTERS_RENDERED 256 #endif #define FONT_DEFAULT_SPACING 5 class NXFont { public: NXFont(); ~NXFont(); bool InitChars(TTF_Font *font, uint32_t color); bool InitCharsShadowed(TTF_Font *top, uint32_t color, uint32_t shadowcolor); static int win1251_to_utf8(const char* text, char* utext); bool InitBitmapChars(SDL_Surface *sheet, uint32_t fgcolor, uint32_t color); bool InitBitmapCharsShadowed(SDL_Surface *sheet, uint32_t fgcolor, uint32_t color, uint32_t shadowcolor); void free(); SDL_Surface *letters[NUM_FONT_LETTERS]; private: void ReplaceColor(SDL_Surface *sfc, uint32_t oldcolor, uint32_t newcolor); }; extern NXFont whitefont; extern NXFont greenfont; extern NXFont bluefont; // used for "F3:Options" text on pause screen extern NXFont shadowfont; // white letters w/ drop shadow int font_draw(int x, int y, const char *text, int spacing=0, NXFont *font=&whitefont); int font_draw_shaded(int x, int y, const char *text, int spacing=0, NXFont *font=&whitefont); int GetFontWidth(const char *text, int spacing=0, bool is_shaded=false); int GetFontHeight(); #endif ================================================ FILE: graphics/graphics.cpp ================================================ // graphics routines #include #ifndef __SDLSHIM__ #include #endif #include #include "../config.h" #include "graphics.h" #include "tileset.h" #include "sprites.h" #include "../dirnames.h" #include "graphics.fdh" #include "../l10n_strings.h" #if !defined(_DINGUX) || !defined(_MOTOMAGX) || !defined(_MOTOEZX) #include "../nx_icon.h" #endif NXSurface *screen = NULL; // created from SDL's screen static NXSurface *drawtarget = NULL; // target of DrawRect etc; almost always screen bool use_palette = false; // true if we are in an indexed-color video mode int screen_bpp; const NXColor DK_BLUE(0, 0, 0x21); // the popular dk blue backdrop color const NXColor BLACK(0, 0, 0); // pure black, only works if no colorkey const NXColor CLEAR(0, 0, 0); // the transparent/colorkey color static bool is_fullscreen = false; static int current_res = -1; bool Graphics::init(int resolution) { #if defined(_480X272) || defined(_320X240) resolution = 0; #endif if (use_palette) { screen_bpp = 8; } else { screen_bpp = 16; // the default #ifndef __SDLSHIM__ const SDL_VideoInfo *info; // it's faster if we create the SDL screen at the bpp of the real screen. // max fps went from 120 to 160 on my X11 system this way. if ((info = SDL_GetVideoInfo())) { stat("videoinfo: desktop bpp %d", info->vfmt->BitsPerPixel); if (info->vfmt->BitsPerPixel > 8) screen_bpp = info->vfmt->BitsPerPixel; } #endif } palette_reset(); if (SetResolution(resolution, false)) return 1; if (Tileset::Init()) return 1; if (Sprites::Init()) return 1; return 0; } void Graphics::close() { stat("Graphics::Close()"); #if defined(_480X272) || defined(_320X240) SDL_ShowCursor(false); #else SDL_ShowCursor(true); #endif } /* void c------------------------------() {} */ bool Graphics::InitVideo() { SDL_Surface *sdl_screen; #if !defined(_DINGUX) || !defined(_MOTOMAGX) || !defined(_MOTOEZX) SDL_Surface *icon; icon = SDL_CreateRGBSurfaceFrom((void *)WINDOW_TITLE_ICON.pixel_data, WINDOW_TITLE_ICON.width, WINDOW_TITLE_ICON.height, WINDOW_TITLE_ICON.bytes_per_pixel * 8, WINDOW_TITLE_ICON.bytes_per_pixel * WINDOW_TITLE_ICON.width, #if (SDL_BYTEORDER == SDL_BIG_ENDIAN) 0xff000000, /* Red bit mask. */ 0x00ff0000, /* Green bit mask. */ 0x0000ff00, /* Blue bit mask. */ 0x000000ff /* Alpha bit mask. */ #else 0x000000ff, /* Red bit mask. */ 0x0000ff00, /* Green bit mask. */ 0x00ff0000, /* Blue bit mask. */ 0xff000000 /* Alpha bit mask. */ #endif ); SDL_WM_SetIcon(icon, NULL); SDL_FreeSurface(icon); #endif if (drawtarget == screen) drawtarget = NULL; if (screen) delete screen; uint32_t flags = SDL_SWSURFACE | SDL_HWPALETTE; if (is_fullscreen) flags |= SDL_FULLSCREEN; #ifndef __SDLSHIM__ putenv((char *)"SDL_VIDEO_CENTERED=1"); #endif stat("SDL_SetVideoMode: %dx%d @ %dbpp", SCREEN_WIDTH*SCALE, SCREEN_HEIGHT*SCALE, screen_bpp); sdl_screen = SDL_SetVideoMode(SCREEN_WIDTH*SCALE, SCREEN_HEIGHT*SCALE, screen_bpp, flags); if (!sdl_screen) { staterr("Graphics::InitVideo: error setting video mode"); return 1; } if (use_palette && !(sdl_screen->flags & SDL_HWPALETTE)) { staterr("Graphics::InitVideo: failed to obtain exclusive access to hardware palette"); exit(1); } SDL_WM_SetCaption("NXEngine", NULL); #if defined (_480X272) || defined (_320X240) SDL_ShowCursor(false); #else SDL_ShowCursor(is_fullscreen == false); #endif screen = new NXSurface(sdl_screen, false); if (!drawtarget) drawtarget = screen; return 0; } bool Graphics::FlushAll() { stat("Graphics::FlushAll()"); palette_reset(); Sprites::FlushSheets(); Tileset::Reload(); map_flush_graphics(); return font_reload(); } void Graphics::SetFullscreen(bool enable) { if (is_fullscreen != enable) { is_fullscreen = enable; InitVideo(); Graphics::FlushAll(); } } // change the video mode to one of the available resolution codes, currently: // 0 - 640x480, Fullscreen // 1 - Windowed scale x1 (320x240) // 2 - Windowed scale x2 (640x480) // 3 - Windowed scale x3 (960x720) bool Graphics::SetResolution(int r, bool restoreOnFailure) { stat("Graphics::SetResolution(%d)", r); if (r == current_res) return 0; int old_res = current_res; int factor; if (r == 0) { #if defined (_480X272) || defined (_320X240) is_fullscreen = false; factor = 1; #else is_fullscreen = true; factor = 2; #endif } else { is_fullscreen = false; factor = r; } stat("Setting scaling %d and fullscreen=%s", factor, is_fullscreen ? "yes":"no"); NXSurface::SetScale(factor); if (Graphics::InitVideo()) { staterr("Switch to resolution %d failed!", r); if (restoreOnFailure) { staterr("Trying to recover old mode %d.", r, old_res); if (Graphics::SetResolution(old_res, false)) { staterr("Fatal error: vidmode recovery failed!!!"); } } return 1; } if (Graphics::FlushAll()) return 1; return 0; } // return a pointer to a null-terminated list of available resolutions. const char **Graphics::GetResolutions() { #ifdef _480X272 // 480x272 widescreen fix static const char *res_str[] = { "480x272", NULL }; #elif _320X240 static const char *res_str[] = { "320x240", NULL }; #else static const char *res_str[] = { LC_FULLSCREEN, "320x240", "640x480", "960x720", NULL }; #endif return res_str; } /* void c------------------------------() {} */ // copy a sprite into the current tileset. // used to obtain the images for the star tiles (breakable blocks), // and for animated motion tiles in Waterway. void Graphics::CopySpriteToTile(int spr, int tileno, int offset_x, int offset_y) { NXRect srcrect, dstrect; srcrect.x = (sprites[spr].frame[0].dir[0].sheet_offset.x + offset_x); srcrect.y = (sprites[spr].frame[0].dir[0].sheet_offset.y + offset_y); srcrect.w = TILE_W; srcrect.h = TILE_H; dstrect.x = (tileno % 16) * TILE_W; dstrect.y = (tileno / 16) * TILE_H; dstrect.w = TILE_W; dstrect.h = TILE_H; NXSurface *tileset = Tileset::GetSurface(); NXSurface *spritesheet = Sprites::get_spritesheet(sprites[spr].spritesheet); if (tileset && spritesheet) { // blank out the old tile data with clear tileset->FillRect(&dstrect, CLEAR); // copy the sprite over BlitSurface(spritesheet, &srcrect, tileset, &dstrect); } } void Graphics::ShowLoadingScreen() { NXSurface loading; char fname[MAXPATHLEN]; sprintf(fname, "%s/Loading.pbm", data_dir); if (loading.LoadImage(fname)) return; int x = (SCREEN_WIDTH / 2) - (loading.Width() / 2); int y = (SCREEN_HEIGHT / 2) - loading.Height(); ClearScreen(BLACK); DrawSurface(&loading, x, y); drawtarget->Flip(); } /* void c------------------------------() {} */ // blit from one surface to another, just like SDL_BlitSurface. void Graphics::BlitSurface(NXSurface *src, NXRect *srcrect, NXSurface *dst, NXRect *dstrect) { dst->DrawSurface(src, dstrect->x, dstrect->y, \ srcrect->x, srcrect->y, srcrect->w, srcrect->h); } /* void c------------------------------() {} */ // draw the entire surface to the screen at the given coordinates. void Graphics::DrawSurface(NXSurface *src, int x, int y) { drawtarget->DrawSurface(src, x, y); } // blit the specified portion of the surface to the screen void Graphics::DrawSurface(NXSurface *src, \ int dstx, int dsty, int srcx, int srcy, int wd, int ht) { drawtarget->DrawSurface(src, dstx, dsty, srcx, srcy, wd, ht); } // blit the specified surface across the screen in a repeating pattern void Graphics::BlitPatternAcross(NXSurface *sfc, int x_dst, int y_dst, int y_src, int height) { drawtarget->BlitPatternAcross(sfc, x_dst, y_dst, y_src, height); } /* void c------------------------------() {} */ void Graphics::DrawRect(int x1, int y1, int x2, int y2, NXColor color) { drawtarget->DrawRect(x1, y1, x2, y2, color); } void Graphics::FillRect(int x1, int y1, int x2, int y2, NXColor color) { drawtarget->FillRect(x1, y1, x2, y2, color); } void Graphics::DrawPixel(int x, int y, NXColor color) { drawtarget->DrawPixel(x, y, color); } void Graphics::ClearScreen(NXColor color) { drawtarget->Clear(color.r, color.g, color.b); } /* void c------------------------------() {} */ void Graphics::DrawRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b) { drawtarget->DrawRect(x1, y1, x2, y2, r, g, b); } void Graphics::FillRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b) { drawtarget->FillRect(x1, y1, x2, y2, r, g, b); } void Graphics::DrawPixel(int x, int y, uint8_t r, uint8_t g, uint8_t b) { drawtarget->DrawPixel(x, y, r, g, b); } void Graphics::ClearScreen(uint8_t r, uint8_t g, uint8_t b) { drawtarget->Clear(r, g, b); } /* void c------------------------------() {} */ void Graphics::set_clip_rect(int x, int y, int w, int h) { drawtarget->set_clip_rect(x, y, w, h); } void Graphics::set_clip_rect(NXRect *rect) { drawtarget->set_clip_rect(rect); } void Graphics::clear_clip_rect() { drawtarget->clear_clip_rect(); } /* void c------------------------------() {} */ // change the target surface of operation like DrawRect to something // other than the screen. void Graphics::SetDrawTarget(NXSurface *surface) { drawtarget = surface; } ================================================ FILE: graphics/graphics.fdh ================================================ //hash:3ab8d1dd //automatically generated by Makegen /* located in map.cpp */ //---------------[referenced from graphics/graphics.cpp]-------------// void map_flush_graphics(); /* located in tsc.cpp */ //---------------[referenced from graphics/graphics.cpp]-------------// void Clear(); /* located in graphics/font.cpp */ //---------------[referenced from graphics/graphics.cpp]-------------// bool font_reload(); /* located in graphics/palette.cpp */ //---------------[referenced from graphics/graphics.cpp]-------------// void palette_reset(void); /* located in common/stat.cpp */ //---------------[referenced from graphics/graphics.cpp]-------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); ================================================ FILE: graphics/graphics.h ================================================ #ifndef _GRAPHICS_H #define _GRAPHICS_H #include "nxsurface.h" // (unscaled) screen size/video mode #ifndef _480X272 // 480x272 widescreen fix #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 #else #define SCREEN_WIDTH 480 #define SCREEN_HEIGHT 272 #endif extern NXSurface *screen; extern const NXColor DK_BLUE; extern const NXColor BLACK; extern const NXColor CLEAR; extern bool use_palette; namespace Graphics { bool init(int resolution); void close(); bool InitVideo(); void SetFullscreen(bool enable); bool SetResolution(int factor, bool restoreOnFailure=true); const char **GetResolutions(); bool FlushAll(); // --------------------------------------- void CopySpriteToTile(int spr, int tileno, int offset_x, int offset_y); void ShowLoadingScreen(); void BlitSurface(NXSurface *src, NXRect *srcrect, NXSurface *dst, NXRect *dstrect); // these are all just convenience wrappers around the equivalent // NXSurface member functions, most of which are set to target the screen. void DrawSurface(NXSurface *src, int x, int y); void DrawSurface(NXSurface *src, int dstx, int dsty, int srcx, int srcy, int wd, int ht); void BlitPatternAcross(NXSurface *sfc, int x_dst, int y_dst, int y_src, int height); void ClearScreen(NXColor color); void ClearScreen(uint8_t r, uint8_t g, uint8_t b); void DrawRect(int x1, int y1, int x2, int y2, NXColor color); void FillRect(int x1, int y1, int x2, int y2, NXColor color); void DrawPixel(int x, int y, NXColor color); void DrawRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b); void FillRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b); void DrawPixel(int x, int y, uint8_t r, uint8_t g, uint8_t b); void set_clip_rect(int x, int y, int w, int h); void set_clip_rect(NXRect *rect); void clear_clip_rect(); void SetDrawTarget(NXSurface *surface); }; #endif ================================================ FILE: graphics/nxsurface.cpp ================================================ #include #include #include "../settings.h" #include "../config.h" #include "graphics.h" #include "nxsurface.h" #include "nxsurface.fdh" #ifdef CONFIG_MUTABLE_SCALE int SCALE = 3; #endif NXSurface::NXSurface() { fSurface = NULL; fFreeSurface = true; } NXSurface::NXSurface(int wd, int ht, NXFormat *format) { fSurface = NULL; AllocNew(wd, ht, format); fFreeSurface = true; } NXSurface::NXSurface(SDL_Surface *from_sfc, bool free_surface) { fSurface = from_sfc; fFreeSurface = free_surface; } NXSurface::~NXSurface() { Free(); } // static function, and requires a reload of all surfaces void NXSurface::SetScale(int factor) { #ifdef CONFIG_MUTABLE_SCALE SCALE = factor; #else staterr("NXSurface::SetScale: CONFIG_MUTABLE_SCALE not set"); #endif } /* void c------------------------------() {} */ // allocate for an empty surface of the given size bool NXSurface::AllocNew(int wd, int ht, NXFormat *format) { Free(); fSurface = SDL_CreateRGBSurface(SDL_SRCCOLORKEY, wd*SCALE, ht*SCALE, \ format->BitsPerPixel, format->Rmask, format->Gmask, format->Bmask, format->Amask); if (!fSurface) { staterr("NXSurface::AllocNew: failed to allocate RGB surface"); return 1; } return fSurface; } // load the surface from a .pbm or bitmap file bool NXSurface::LoadImage(const char *pbm_name, bool use_colorkey, int use_display_format) { SDL_Surface *image; Free(); if (use_display_format == -1) { // use value specified in settings use_display_format = settings->displayformat; } image = SDL_LoadBMP(pbm_name); if (!image) { staterr("NXSurface::LoadImage: load failed of '%s'!", pbm_name); return 1; } fSurface = Scale(image, SCALE, use_colorkey, true, use_display_format); return (fSurface == NULL); } NXSurface *NXSurface::FromFile(const char *pbm_name, bool use_colorkey, int use_display_format) { NXSurface *sfc = new NXSurface; if (sfc->LoadImage(pbm_name, use_colorkey, use_display_format)) { delete sfc; return NULL; } return sfc; } /* void c------------------------------() {} */ // draw some or all of another surface onto this surface. void NXSurface::DrawSurface(NXSurface *src, \ int dstx, int dsty, int srcx, int srcy, int wd, int ht) { SDL_Rect srcrect, dstrect; srcrect.x = srcx * SCALE; srcrect.y = srcy * SCALE; srcrect.w = wd * SCALE; srcrect.h = ht * SCALE; dstrect.x = dstx * SCALE; dstrect.y = dsty * SCALE; SDL_BlitSurface(src->fSurface, &srcrect, fSurface, &dstrect); } void NXSurface::DrawSurface(NXSurface *src, int dstx, int dsty) { DrawSurface(src, dstx, dsty, 0, 0, src->Width(), src->Height()); } // draw the given source surface in a repeating pattern across the entire width of the surface. // x_dst: an starting X with which to offset the pattern horizontally (usually negative). // y_dst: the Y coordinate to copy to on the destination. // y_src: the Y coordinate to copy from. // height: the number of pixels tall to copy. void NXSurface::BlitPatternAcross(NXSurface *src, int x_dst, int y_dst, int y_src, int height) { SDL_Rect srcrect, dstrect; srcrect.x = 0; srcrect.w = src->fSurface->w; srcrect.y = (y_src * SCALE); srcrect.h = (height * SCALE); int x = (x_dst * SCALE); int y = (y_dst * SCALE); int destwd = fSurface->w; do { dstrect.x = x; dstrect.y = y; SDL_BlitSurface(src->fSurface, &srcrect, fSurface, &dstrect); x += src->fSurface->w; } while(x < destwd); } /* void c------------------------------() {} */ void NXSurface::DrawRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b) { SDL_Rect rect; uint32_t color = MapColor(r, g, b); // top and bottom rect.x = x1 * SCALE; rect.y = y1 * SCALE; rect.w = ((x2 - x1) + 1) * SCALE; rect.h = SCALE; SDL_FillRect(fSurface, &rect, color); rect.y = y2 * SCALE; SDL_FillRect(fSurface, &rect, color); // left and right rect.y = y1 * SCALE; rect.w = SCALE; rect.h = ((y2 - y1) + 1) * SCALE; SDL_FillRect(fSurface, &rect, color); rect.x = x2 * SCALE; SDL_FillRect(fSurface, &rect, color); } void NXSurface::FillRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b) { SDL_Rect rect; rect.x = x1 * SCALE; rect.y = y1 * SCALE; rect.w = ((x2 - x1) + 1) * SCALE; rect.h = ((y2 - y1) + 1) * SCALE; SDL_FillRect(fSurface, &rect, MapColor(r, g, b)); } void NXSurface::Clear(uint8_t r, uint8_t g, uint8_t b) { SDL_FillRect(fSurface, NULL, MapColor(r, g, b)); } void NXSurface::DrawPixel(int x, int y, uint8_t r, uint8_t g, uint8_t b) { DrawRect(x, y, x, y, r, g, b); } /* void c------------------------------() {} */ int NXSurface::Width() { return fSurface->w / SCALE; } int NXSurface::Height() { return fSurface->h / SCALE; } NXFormat *NXSurface::Format() { return fSurface->format; } void NXSurface::Flip() { SDL_Flip(fSurface); } /* void c------------------------------() {} */ void NXSurface::set_clip_rect(int x, int y, int w, int h) { NXRect rect(x * SCALE, y * SCALE, w * SCALE, h * SCALE); SDL_SetClipRect(fSurface, &rect); } void NXSurface::set_clip_rect(NXRect *rect) { SDL_SetClipRect(fSurface, rect); } void NXSurface::clear_clip_rect() { SDL_SetClipRect(fSurface, NULL); } /* void c------------------------------() {} */ // internal function which scales the given SDL surface by the given factor. SDL_Surface *NXSurface::Scale(SDL_Surface *original, int factor, \ bool use_colorkey, bool free_original, bool use_display_format) { SDL_Surface *scaled; if (factor == 1 && free_original) { scaled = original; } else { scaled = SDL_CreateRGBSurface(SDL_SRCCOLORKEY, \ original->w * SCALE, \ original->h * SCALE, \ original->format->BitsPerPixel, \ original->format->Rmask, original->format->Gmask, original->format->Bmask, original->format->Amask); if (original->format->BitsPerPixel == 8) { // copy the palette from the old surface to the new surface SDL_Color palette[256]; for(int i=0;i<256;i++) { SDL_GetRGB(i, original->format, &palette[i].r, &palette[i].g, &palette[i].b); } SDL_SetColors(scaled, palette, 0, 256); } // all the .pbm files are 8bpp, so I haven't had a reason // to write any other scalers. switch(original->format->BitsPerPixel) { case 8: Scale8(original, scaled, factor); break; default: staterr("NXSurface::Scale: unsupported bpp %d", original->format->BitsPerPixel); SDL_FreeSurface(scaled); return NULL; } // can get rid of original now if they wanted us to if (free_original) SDL_FreeSurface(original); } // set colorkey to black if requested if (use_colorkey) { // don't use SDL_RLEACCEL--it seems to actually make things a lot slower, // especially on maps with motion tiles. SDL_SetColorKey(scaled, SDL_SRCCOLORKEY, SDL_MapRGB(scaled->format, 0, 0, 0)); } if (use_palette) { scaled = palette_add(scaled); if (!scaled) return NULL; } if (use_display_format) { SDL_Surface *ret_sfc = SDL_DisplayFormat(scaled); SDL_FreeSurface(scaled); return ret_sfc; } else { return scaled; } } void NXSurface::Scale8(SDL_Surface *src, SDL_Surface *dst, int factor) { int x, y, i; for(y=0;yh;y++) { uint8_t *srcline = (uint8_t *)src->pixels + (y * src->pitch); uint8_t *dstline = (uint8_t *)dst->pixels + (y * factor * dst->pitch); uint8_t *dstptr = dstline; for(x=0;xw;x++) { for(i=0;ipitch; memcpy(dstptr, dstline, dst->pitch); } } } /* void c------------------------------() {} */ void NXSurface::EnableColorKey() { SDL_SetColorKey(fSurface, SDL_SRCCOLORKEY, SDL_MapRGB(fSurface->format, 0, 0, 0)); } uint32_t NXSurface::MapColor(uint8_t r, uint8_t g, uint8_t b) { return SDL_MapRGB(fSurface->format, r, g, b); } void NXSurface::Free() { if (fSurface) { if (fFreeSurface) SDL_FreeSurface(fSurface); fSurface = NULL; } } ================================================ FILE: graphics/nxsurface.fdh ================================================ //hash:dd5708e0 //automatically generated by Makegen /* located in tsc.cpp */ //--------------[referenced from graphics/nxsurface.cpp]-------------// void Clear(); /* located in graphics/palette.cpp */ //--------------[referenced from graphics/nxsurface.cpp]-------------// SDL_Surface *palette_add(SDL_Surface *sfc); /* located in common/stat.cpp */ //--------------[referenced from graphics/nxsurface.cpp]-------------// void staterr(const char *fmt, ...); ================================================ FILE: graphics/nxsurface.h ================================================ #ifndef _NXSURFACE_H #define _NXSURFACE_H #include #include "../common/basics.h" // scaling factor for the graphics #ifdef CONFIG_MUTABLE_SCALE extern int SCALE; #else #define SCALE 1 #endif struct NXSurface; extern NXSurface *screen; struct NXColor { uint8_t r, g, b; NXColor(uint8_t rr, uint8_t gg, uint8_t bb) : r(rr), g(gg), b(bb) { } NXColor(uint32_t hexcolor) { r = hexcolor >> 16; g = hexcolor >> 8; b = hexcolor; } }; struct NXRect : public SDL_Rect { inline NXRect() { } inline NXRect(int x, int y, int w, int h) { this->x = x; this->y = y; this->w = w; this->h = h; } inline void Set(int x, int y, int w, int h) { this->x = x; this->y = y; this->w = w; this->h = h; } }; typedef SDL_PixelFormat NXFormat; class NXSurface { public: NXSurface(); NXSurface(int wd, int ht, NXFormat *format = screen->Format()); NXSurface(SDL_Surface *from_sfc, bool freesurface=true); ~NXSurface(); bool AllocNew(int wd, int ht, NXFormat *format = screen->Format()); bool LoadImage(const char *pbm_name, bool use_colorkey=false, int use_display_format=-1); static NXSurface *FromFile(const char *pbm_name, bool use_colorkey=false, int use_display_format=-1); // blitting void DrawSurface(NXSurface *src, int dstx, int dsty); void DrawSurface(NXSurface *src, int dstx, int dsty, int srcx, int srcy, int wd, int ht); void BlitPatternAcross(NXSurface *src, int x_dst, int y_dst, int y_src, int height); // graphics primitives void DrawRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b); void DrawRect(int x1, int y1, int x2, int y2, NXColor color); void DrawRect(NXRect *rect, uint8_t r, uint8_t g, uint8_t b); void DrawRect(NXRect *rect, NXColor color); void FillRect(int x1, int y1, int x2, int y2, uint8_t r, uint8_t g, uint8_t b); void FillRect(int x1, int y1, int x2, int y2, NXColor color); void FillRect(NXRect *rect, uint8_t r, uint8_t g, uint8_t b); void FillRect(NXRect *rect, NXColor color); void Clear(uint8_t r, uint8_t g, uint8_t b); void DrawPixel(int x, int y, uint8_t r, uint8_t g, uint8_t b); void DrawPixel(int x, int y, NXColor color); // misc void set_clip_rect(int x, int y, int w, int h); void set_clip_rect(NXRect *rect); void clear_clip_rect(); int Width(); int Height(); void EnableColorKey(); NXFormat *Format(); void Flip(); SDL_Surface *GetSDLSurface() { return fSurface; } static void SetScale(int factor); private: static SDL_Surface *Scale(SDL_Surface *original, int factor, bool use_colorkey, bool free_original, bool use_display_format); static void Scale8(SDL_Surface *src, SDL_Surface *dst, int factor); inline uint32_t MapColor(uint8_t r, uint8_t g, uint8_t b); void Free(); SDL_Surface *fSurface; bool fFreeSurface; }; void inline NXSurface::DrawRect(int x1, int y1, int x2, int y2, NXColor color) { DrawRect(x1, y1, x2, y2, color.r, color.g, color.b); } void inline NXSurface::DrawRect(NXRect *rect, uint8_t r, uint8_t g, uint8_t b) { DrawRect(rect->x, rect->y, rect->x + (rect->w - 1), rect->y + (rect->h - 1), r, g, b); } void inline NXSurface::DrawRect(NXRect *rect, NXColor color) { DrawRect(rect->x, rect->y, rect->x + (rect->w - 1), rect->y + (rect->h - 1), color.r, color.g, color.b); } void inline NXSurface::FillRect(int x1, int y1, int x2, int y2, NXColor color) { FillRect(x1, y1, x2, y2, color.r, color.g, color.b); } void inline NXSurface::FillRect(NXRect *rect, uint8_t r, uint8_t g, uint8_t b) { FillRect(rect->x, rect->y, rect->x + (rect->w - 1), rect->y + (rect->h - 1), r, g, b); } void inline NXSurface::FillRect(NXRect *rect, NXColor color) { FillRect(rect->x, rect->y, rect->x + (rect->w - 1), rect->y + (rect->h - 1), color.r, color.g, color.b); } void inline NXSurface::DrawPixel(int x, int y, NXColor color) { DrawPixel(x, y, color.r, color.g, color.b); } #endif ================================================ FILE: graphics/palette.cpp ================================================ #include "../nx.h" #include "palette.h" #include "palette.fdh" #define MAX_COLORS 256 static SDL_Color screenpal[MAX_COLORS]; int ncolors = -1; // clear out all palette entries void palette_reset(void) { ncolors = 0; } // given a paletted surface add it's colors in to the screen colormap // then return a surface with the color indexes remapped ready to // be displayed on the screen. insfc is either freed, or reused to // create the returned surface. SDL_Surface *palette_add(SDL_Surface *sfc) { SDL_Palette *pal = sfc->format->palette; int remap[MAX_COLORS]; int x, y, i; if (sfc->format->BitsPerPixel > 8) { staterr("palette_add: input surface is > 8bpp"); return NULL; } stat("palette_add: adding %d colors to screen palette...", pal->ncolors); for(i=0;incolors;i++) { remap[i] = palette_alloc(pal->colors[i].r, pal->colors[i].g, pal->colors[i].b); if (remap[i] == -1) return sfc; } SDL_SetColors(screen->GetSDLSurface(), screenpal, 0, ncolors); return sfc; /* // remap indexes in surface for(y=0;yh;y++) { uint8_t *pixels = (uint8_t *)sfc->pixels + (y * sfc->pitch); for(x=0;xw;x++) { *pixels = remap[*pixels]; pixels++; } } return sfc;*/ } // add the given color to the screen palette and return it's index. int palette_alloc(uint8_t r, uint8_t g, uint8_t b) { int i; for(i=0;i= MAX_COLORS) { staterr("palette_alloc: out of color space!"); return -1; } screenpal[ncolors].r = r; screenpal[ncolors].g = g; screenpal[ncolors].b = b; return ncolors++; } ================================================ FILE: graphics/palette.fdh ================================================ //hash:38ce643b //automatically generated by Makegen /* located in graphics/palette.cpp */ //---------------[referenced from graphics/palette.cpp]--------------// void palette_reset(void); SDL_Surface *palette_add(SDL_Surface *sfc); int palette_alloc(uint8_t r, uint8_t g, uint8_t b); /* located in common/stat.cpp */ //---------------[referenced from graphics/palette.cpp]--------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); ================================================ FILE: graphics/palette.h ================================================ #ifndef _PALETTE_H #define _PALETTE_H #endif ================================================ FILE: graphics/safemode.cpp ================================================ // a limited and redundant graphics system which allows placing text on the screen // in the case of startup errors or before the real data files are extracted. #include #include "../nx.h" #include "safemode.h" #include "safemode.fdh" using namespace safemode; using namespace Graphics; static int nexty = 0; static bool initilized = false; static SDL_Rect printrect; static NXColor backcolor(0x20, 0x20, 0x20); static bool have_status = false; static SDL_Rect statusrect; bool safemode::init() { moveto(SM_UPPER_THIRD); initilized = true; return 0; } void safemode::close() { if (initilized) { ClearScreen(BLACK); screen->Flip(); clear(); } } /* void c------------------------------() {} */ void safemode::moveto(int y) { switch(y) { case SM_CENTER: nexty = (SCREEN_HEIGHT / 2) - (GetFontHeight() / 2); break; case SM_UPPER_THIRD: nexty = (SCREEN_HEIGHT / 4) - (GetFontHeight() / 2); break; case SM_LOWER_THIRD: nexty = (SCREEN_HEIGHT / 4) - (GetFontHeight() / 2); nexty = (SCREEN_HEIGHT - nexty); break; case SM_MIDUPPER_Y: nexty = (SCREEN_HEIGHT / 2) - (GetFontHeight() / 2); nexty -= 32; break; default: nexty = y; break; } } bool safemode::print(const char *fmt, ...) { va_list ar; char buffer[128]; va_start(ar, fmt); vsnprintf(buffer, sizeof(buffer), fmt, ar); va_end(ar); stat("safemode print: '%s'", buffer); int fontwidth = GetFontWidth(buffer, 0, false); int fontheight = GetFontHeight(); if (buffer[0]) { int x = ((SCREEN_WIDTH / 2) - (fontwidth / 2)); printrect.x = x; printrect.y = nexty; printrect.w = fontwidth; printrect.h = fontheight; font_draw(x, nexty, buffer, 0, &greenfont); screen->Flip(); } SDL_Delay(50); nexty += (fontheight + 1); return 0; } void safemode::clear() { ClearScreen(backcolor); moveto(SM_UPPER_THIRD); } int safemode::run_until_key(bool delay) { stat("run_until_key()"); uint32_t start = SDL_GetTicks(); last_sdl_key = -1; do { input_poll(); SDL_Delay(50); if (delay && (SDL_GetTicks() - start) < 500) last_sdl_key = -1; } while(last_sdl_key == -1); stat("returning key %d", last_sdl_key); return last_sdl_key; } void safemode::status(const char *fmt, ...) { va_list ar; char buffer[128]; va_start(ar, fmt); vsnprintf(buffer, sizeof(buffer), fmt, ar); va_end(ar); clearstatus(); moveto(SM_CENTER); print("%s", buffer); statusrect = printrect; have_status = true; } void safemode::clearstatus() { if (have_status) { FillRect(statusrect.x, statusrect.y, \ statusrect.x + (statusrect.w - 1), \ statusrect.y + (statusrect.h - 1), backcolor); moveto(SM_CENTER); have_status = false; } } ================================================ FILE: graphics/safemode.fdh ================================================ //hash:98779cf6 //automatically generated by Makegen /* located in main.cpp */ //---------------[referenced from graphics/safemode.cpp]-------------// void SDL_Delay(int ms); /* located in input.cpp */ //---------------[referenced from graphics/safemode.cpp]-------------// void input_poll(void); /* located in graphics/font.cpp */ //---------------[referenced from graphics/safemode.cpp]-------------// int GetFontHeight(); int GetFontWidth(const char *text, int spacing, bool is_shaded); int font_draw(int x, int y, const char *text, int spacing, NXFont *font); /* located in common/stat.cpp */ //---------------[referenced from graphics/safemode.cpp]-------------// void stat(const char *fmt, ...); ================================================ FILE: graphics/safemode.h ================================================ #ifndef _SAFEMODE_H #define _SAFEMODE_H enum // special Y positioning arguments for moveto { SM_UPPER_THIRD = -1, SM_CENTER = -2, SM_LOWER_THIRD = -3, SM_NONE = -4, SM_MIDUPPER_Y = -5 }; namespace safemode { bool init(); void close(); void moveto(int y); bool print(const char *fmt, ...); void clear(); void status(const char *fmt, ...); void clearstatus(); int run_until_key(bool delay=true); }; #endif ================================================ FILE: graphics/sprites.cpp ================================================ // sprites routines #include "graphics.h" #include #include "../siflib/sif.h" #include "../siflib/sifloader.h" #include "../siflib/sectSprites.h" #include "../siflib/sectStringArray.h" #include "../autogen/sprites.h" #include "../common/StringList.h" #include "../dirnames.h" #include "../settings.h" using namespace Graphics; #include "sprites.h" #include "sprites.fdh" static NXSurface *spritesheet[MAX_SPRITESHEETS]; static int num_spritesheets; static StringList sheetfiles; SIFSprite sprites[MAX_SPRITES]; int num_sprites; bool Sprites::Init() { memset(spritesheet, 0, sizeof(spritesheet)); // load sprites info--sheet positions, bounding boxes etc if (load_sif("sprites.sif")) return 1; num_spritesheets = sheetfiles.CountItems(); return 0; } void Sprites::Close() { FlushSheets(); sheetfiles.MakeEmpty(); } void Sprites::FlushSheets() { for(int i=0;iLoadImage(pbm_name, true); // fix the blue dash in the middle of the starpoof effect on that one frame, // I'm pretty sure this is a glitch. if (!settings->emulate_bugs) { if (sheetno == 3) // Caret.pbm spritesheet[sheetno]->FillRect(40, 58, 41, 58, 0, 0, 0); } } } // master sprite drawing function static void Sprites::BlitSprite(int x, int y, int s, int frame, uint8_t dir, \ int xoff, int yoff, int wd, int ht) { LoadSheetIfNeeded(sprites[s].spritesheet); dir %= sprites[s].ndirs; SIFDir *sprdir = &sprites[s].frame[frame].dir[dir]; DrawSurface(spritesheet[sprites[s].spritesheet], \ x, y, \ (sprdir->sheet_offset.x + xoff), \ (sprdir->sheet_offset.y + yoff), \ wd, ht); } /* void c------------------------------() {} */ // draw sprite "s" at [x,y]. drawing frame "frame" and dir "dir". void Sprites::draw_sprite(int x, int y, int s, int frame, uint8_t dir) { BlitSprite(x, y, s, frame, dir, 0, 0, sprites[s].w, sprites[s].h); } // draw sprite "s", place it's draw point at [x,y] instead of it's upper-left corner. void Sprites::draw_sprite_at_dp(int x, int y, int s, int frame, uint8_t dir) { x -= sprites[s].frame[frame].dir[dir].drawpoint.x; y -= sprites[s].frame[frame].dir[dir].drawpoint.y; BlitSprite(x, y, s, frame, dir, 0, 0, sprites[s].w, sprites[s].h); } // draw a portion of a sprite, such as a sprite in the middle of "teleporting". // only the area between clipy1 (inclusive) and clipy2 (exclusive) are visible. void Sprites::draw_sprite_clipped(int x, int y, int s, int frame, uint8_t dir, \ int clipx1, int clipx2, int clipy1, int clipy2) { BlitSprite(x + clipx1, y + clipy1, s, frame, dir, clipx1, clipy1, \ (clipx2 - clipx1), (clipy2 - clipy1)); } // draw a clipped sprite while clipping only the width. // used for drawing percentage bars, etc. void Sprites::draw_sprite_clip_width(int x, int y, int s, int frame, int wd) { BlitSprite(x, y, s, frame, 0, 0, 0, wd, sprites[s].h); } // draws a sprite at less than it's actual width by chopping it into two chunks. // on the left, the first "repeat_at" pixels are drawn. // then, the remaining "wd" is drawn from the right half of the sprite. // used for things like drawing the textboxes. void Sprites::draw_sprite_chopped(int x, int y, int s, int frame, int wd, int repeat_at) { int xoff; if (wd >= sprites[s].w) { draw_sprite(x, y, s, frame); return; } // draw the left part BlitSprite(x, y, s, frame, 0, 0, 0, repeat_at, sprites[s].h); x += repeat_at; wd -= repeat_at; // draw the rest of it xoff = (sprites[s].w - wd); BlitSprite(x, y, s, frame, 0, xoff, 0, wd, sprites[s].h); } // draws a sprite to any arbitrary width by repeating it over the given distance. // if needed, the rightmost instance of the sprite is clipped. void Sprites::draw_sprite_repeating_x(int x, int y, int s, int frame, int wd) { int wdleft = wd; while(wdleft > 0) { int blitwd = wdleft; if (blitwd > sprites[s].w) blitwd = sprites[s].w; BlitSprite(x, y, s, frame, 0, 0, 0, blitwd, sprites[s].h); x += blitwd; wdleft -= blitwd; } } /* void c------------------------------() {} */ // return the NXSurface for a given spritesheet # NXSurface *Sprites::get_spritesheet(int sheetno) { LoadSheetIfNeeded(sheetno); return spritesheet[sheetno]; } // create an empty spritesheet of the given size and return it's index. int Sprites::create_spritesheet(int wd, int ht) { if (num_spritesheets >= MAX_SPRITESHEETS) return -1; spritesheet[num_spritesheets] = new NXSurface(wd, ht); return num_spritesheets++; } // draw a sprite onto some surface other than the screen void Sprites::draw_sprite_to_surface(NXSurface *dst, int x, int y, int s, int frame, uint8_t dir) { Graphics::SetDrawTarget(dst); draw_sprite(x, y, s, frame, dir); Graphics::SetDrawTarget(screen); } /* void c------------------------------() {} */ static bool load_sif(const char *fname) { SIFLoader sif; uint8_t *sheetdata, *spritesdata; int sheetdatalength, spritesdatalength; if (sif.LoadHeader(fname)) return 1; if (!(sheetdata = sif.FindSection(SIF_SECTION_SHEETS, &sheetdatalength))) { staterr("load_sif: file '%s' missing SIF_SECTION_SHEETS", fname); return 1; } if (!(spritesdata = sif.FindSection(SIF_SECTION_SPRITES, &spritesdatalength))) { staterr("load_sif: file '%s' missing SIF_SECTION_SPRITES", fname); return 1; } // decode sheets sheetfiles.MakeEmpty(); if (SIFStringArraySect::Decode(sheetdata, sheetdatalength, &sheetfiles)) return 1; // decode sprites if (SIFSpritesSect::Decode(spritesdata, spritesdatalength, \ &sprites[0], &num_sprites, MAX_SPRITES)) { staterr("load_sif: SIFSpritesSect decoder failed"); return 1; } sif.CloseFile(); create_slope_boxes(); offset_by_draw_points(); expand_single_dir_sprites(); return 0; } // create slope boxes for all sprites, used by the slope-handling routines // these are basically just a form of bounding box describing the bounds of the // blockd points. static void create_slope_boxes() { for(int s=0;s rightmost) rightmost = sprites[s].block_d[i].x; } sprites[s].slopebox.x1 = leftmost; sprites[s].slopebox.x2 = rightmost; if (sprites[s].block_u.count) sprites[s].slopebox.y1 = (sprites[s].block_u[0].y + 1); else sprites[s].slopebox.y1 = 0; sprites[s].slopebox.y2 = (sprites[s].block_d[0].y - 1); } } sprites[SPR_MYCHAR].slopebox.y1 += 3; } // offset things like blockl/r/u/d, bounding box etc by the draw point of all // sprites so that these things are consistent with where the sprite appears to be static void offset_by_draw_points() { for(int s=0;s %d)", keyindex, sdl_key); int old_mapping = input_get_mapping(keyindex); if (old_mapping != -1) mappings[old_mapping] = 0xff; mappings[sdl_key] = keyindex; } // get which SDL key triggers a given input int input_get_mapping(int keyindex) { int i; for(i=0;i<=SDLK_LAST;i++) { if (mappings[i] == keyindex) return i; } return -1; } const char *input_get_name(int index) { static const char *input_names[] = { "left", "right", "up", "down", "jump", "fire", "pervious wpn", "next wpn", "inventory", "map", "escape", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11", "f12", "options key", "freeze frame", "frame advance", "debug fly" }; if (index < 0 || index >= INPUT_COUNT) return "invalid"; return input_names[index]; } void input_set_mappings(int *array) { memset(mappings, 0xff, sizeof(mappings)); for(int i=0;ihide = true; return 0; } void intro_tick() { if (blanktimer > 0) { ClearScreen(BLACK); if (--blanktimer == 0) game.setmode(GM_TITLE); return; } game_tick_normal(); player->y = 0; // when script ends with WAI9999, detect it and move on to title screen ScriptInstance *script = GetCurrentScriptInstance(); if ((script && script->delaytimer == 9999) || buttonjustpushed()) { StopScripts(); blanktimer = EXIT_DELAY; } // lower time for startup if (script && script->delaytimer && script->ip == 5) { game.showmapnametime = 0; if (script->delaytimer > 20) script->delaytimer = 20; } } /* void c------------------------------() {} */ INITFUNC(AIRoutines) { ONTICK(OBJ_INTRO_KINGS, ai_intro_kings); ONTICK(OBJ_INTRO_CROWN, ai_intro_crown); ONTICK(OBJ_INTRO_DOCTOR, ai_intro_doctor); } /* void c------------------------------() {} */ // misery/balrog in bubble void ai_intro_kings(Object *o) { switch(o->state) { case 0: { o->state = 1; if (o->dir == LEFT) { o->timer = 25; o->y -= 0x640; } } case 1: { if (++o->timer >= 50) { o->timer = 0; o->timer2 ^= 1; } if (o->timer2) { o->y += 0x40; } else { o->y -= 0x40; } } break; } } // demon crown on throne void ai_intro_crown(Object *o) { switch(o->state) { case 0: { o->x += (8 << CSF); o->y += (14 << CSF); o->state = 1; } case 1: { if ((++o->timer % 8) == 1) { effect(o->x + random(-8<y + (8<state) { case 0: { o->y -= (8 << CSF); o->state = 1; } case 1: { o->frame = 0; } break; case 10: // chuckle; facing screen { o->state = 11; o->frame = 0; o->animtimer = 0; o->timer2 = 0; } case 11: { ANIMATE_FWD(6); if (o->frame > 1) { o->frame = 0; if (++o->timer2 > 7) o->state = 1; } } break; case 20: // walk { o->state = 21; o->frame = 2; o->animtimer = 0; } case 21: { ANIMATE(10, 2, 5); o->x += 0x100; } break; case 30: // face away { o->frame = 6; o->state = 31; } break; case 40: // chuckle; facing away { o->state = 41; o->frame = 6; o->animtimer = 0; o->timer2 = 0; } case 41: { ANIMATE_FWD(6); if (o->frame > 7) { o->frame = 6; if (++o->timer2 > 7) o->state = 30; } } break; } } ================================================ FILE: intro/intro.fdh ================================================ //hash:9527a9cb //automatically generated by Makegen /* located in game.cpp */ //------------------[referenced from intro/intro.cpp]----------------// void game_tick_normal(void); /* located in caret.cpp */ //------------------[referenced from intro/intro.cpp]----------------// Caret *effect(int x, int y, int effectno); /* located in tsc.cpp */ //------------------[referenced from intro/intro.cpp]----------------// ScriptInstance *GetCurrentScriptInstance(); void StopScripts(void); /* located in input.cpp */ //------------------[referenced from intro/intro.cpp]----------------// bool buttonjustpushed(void); /* located in intro/intro.cpp */ //------------------[referenced from intro/intro.cpp]----------------// bool intro_init(int param); void intro_tick(); void ai_intro_kings(Object *o); void ai_intro_crown(Object *o); void ai_intro_doctor(Object *o); /* located in sound/sound.cpp */ //------------------[referenced from intro/intro.cpp]----------------// void music(int songno); /* located in common/misc.cpp */ //------------------[referenced from intro/intro.cpp]----------------// int random(int min, int max); ================================================ FILE: intro/intro.h ================================================ #ifndef _INTRO_H #define _INTRO_H bool intro_init(int param); void intro_tick(); #endif ================================================ FILE: intro/title.cpp ================================================ #include "../nx.h" #include "title.fdh" // music and character selections for the different Counter times static struct { uint32_t timetobeat; int sprite; int songtrack; } titlescreens[] = { (3*3000), SPR_CS_SUE, 2, // 3 mins - Sue & Safety (4*3000), SPR_CS_KING, 41, // 4 mins - King & White (5*3000), SPR_CS_TOROKO, 40, // 5 mins - Toroko & Toroko's Theme (6*3000), SPR_CS_CURLY, 36, // 6 mins - Curly & Running Hell 0xFFFFFFFF, SPR_CS_MYCHAR, 24 // default }; // artifical fake "loading" delay between selecting an option and it being executed, // because it actually doesn't look good if we respond instantly. #define SELECT_DELAY 30 #define SELECT_LOAD_DELAY 20 // delay when leaving the multisave Load dialog #define SELECT_MENU_DELAY 8 // delay from Load to load menu static struct { int sprite; int cursel; int selframe, seltimer; int selchoice, seldelay; int kc_pos; bool in_multiload; uint32_t besttime; // Nikumaru display } title; bool title_init(int param) { memset(&title, 0, sizeof(title)); game.switchstage.mapno = 0; game.switchstage.eventonentry = 0; game.showmapnametime = 0; textbox.SetVisible(false); if (niku_load(&title.besttime)) title.besttime = 0xffffffff; // select a title screen based on Nikumaru time int t; for(t=0;;t++) { if (title.besttime < titlescreens[t].timetobeat || \ titlescreens[t].timetobeat == 0xffffffff) { break; } } title.sprite = titlescreens[t].sprite; music(titlescreens[t].songtrack); if (AnyProfileExists()) title.cursel = 1; // Load Game else title.cursel = 0; // New Game return 0; } void title_tick() { if (!title.in_multiload) { if (title.seldelay > 0) { ClearScreen(BLACK); title.seldelay--; if (!title.seldelay) selectoption(title.selchoice); return; } handle_input(); draw_title(); } else { ClearScreen(BLACK); if (!textbox.SaveSelect.IsVisible()) { // selection was made, and settings.last_save_slot is now set appropriately sound(SND_MENU_SELECT); textbox.SetVisible(false); title.selchoice = 1; title.seldelay = SELECT_LOAD_DELAY; title.in_multiload = false; } else { textbox.Draw(); } } } /* void c------------------------------() {} */ static void selectoption(int index) { switch(index) { case 0: // New { music(0); game.switchstage.mapno = NEW_GAME_FROM_MENU; game.setmode(GM_NORMAL); } break; case 1: // Load { music(0); game.switchstage.mapno = LOAD_GAME_FROM_MENU; game.setmode(GM_NORMAL); } break; case 2: // Load Menu (multisave) { textbox.SetVisible(true); textbox.SaveSelect.SetVisible(true, SS_LOADING); title.in_multiload = true; } break; } } static void handle_input() { if (justpushed(DOWNKEY)) { sound(SND_MENU_MOVE); if (++title.cursel >= sprites[SPR_MENU].nframes) title.cursel = 0; } else if (justpushed(UPKEY)) { sound(SND_MENU_MOVE); if (--title.cursel < 0) title.cursel = sprites[SPR_MENU].nframes - 1; } if (buttonjustpushed()) { sound(SND_MENU_SELECT); int choice = title.cursel; // handle case where user selects Load but there is no savefile, // or the last_save_file is deleted. if (title.cursel == 1) { if (!ProfileExists(settings->last_save_slot)) { bool foundslot = false; for(int i=0;ilast_save_slot, i); settings->last_save_slot = i; foundslot = true; } } // there are no save files. Start a new game instead. if (!foundslot) { stat("No save files found. Starting new game instead."); choice = 0; } } } if (choice == 1 && settings->multisave) { title.selchoice = 2; title.seldelay = SELECT_MENU_DELAY; } else { title.selchoice = choice; title.seldelay = SELECT_DELAY; music(0); } } run_konami_code(); } static void draw_title() { // background is dk grey, not pure black ClearScreen(0x20, 0x20, 0x20); // top logo int tx = (SCREEN_WIDTH / 2) - (sprites[SPR_TITLE].w / 2) - 2; draw_sprite(tx, 40, SPR_TITLE); #ifdef _L10N_CP1251 const char t_new[2][11] = { "\xCD\xEE\xE2\xE0\xFF\xA0\xE8\xE3\xF0\xE0", // New Game in CP1251, Russian "\xC7\xE0\xE3\xF0\xF3\xE7\xE8\xF2\xFC" // Load Game in CP1251, Russian }; #endif // draw menu int cx = (SCREEN_WIDTH / 2) - (sprites[SPR_MENU].w / 2) - 8; int cy = (SCREEN_HEIGHT / 2) + 8; for(int i=0;i 0], 6); #else draw_sprite(cx, cy, SPR_MENU, i); #endif if (i == title.cursel) { draw_sprite(cx - 16, cy - 1, title.sprite, title.selframe); } cy += (sprites[SPR_MENU].h + 4); } // animate character if (++title.seltimer > 8) { title.seltimer = 0; if (++title.selframe >= sprites[title.sprite].nframes) title.selframe = 0; } // accreditation cx = (SCREEN_WIDTH / 2) - (sprites[SPR_PIXEL_FOREVER].w / 2); int acc_y = SCREEN_HEIGHT - 48; draw_sprite(cx, acc_y, SPR_PIXEL_FOREVER); // version static const char *VERSION = "NXEngine v. 1.0.0.4 | Rev 4"; static const int SPACING = 5; int wd = GetFontWidth(VERSION, SPACING); cx = (SCREEN_WIDTH / 2) - (wd / 2); font_draw(cx, acc_y + sprites[SPR_PIXEL_FOREVER].h + 4, VERSION, SPACING); // draw Nikumaru display if (title.besttime != 0xffffffff) niku_draw(title.besttime, true); } static int kc_table[] = { UPKEY, UPKEY, DOWNKEY, DOWNKEY, LEFTKEY, RIGHTKEY, LEFTKEY, RIGHTKEY, -1 }; void run_konami_code() { if (justpushed(UPKEY) || justpushed(DOWNKEY) || \ justpushed(LEFTKEY) || justpushed(RIGHTKEY)) { if (justpushed(kc_table[title.kc_pos])) { title.kc_pos++; if (kc_table[title.kc_pos] == -1) { sound(SND_MENU_SELECT); title.kc_pos = 0; } } else { title.kc_pos = 0; } } } ================================================ FILE: intro/title.fdh ================================================ //hash:0cc16f11 //automatically generated by Makegen /* located in profile.cpp */ //------------------[referenced from intro/title.cpp]----------------// bool AnyProfileExists(); bool ProfileExists(int num); /* located in statusbar.cpp */ //------------------[referenced from intro/title.cpp]----------------// void niku_draw(int value, bool force_white); /* located in input.cpp */ //------------------[referenced from intro/title.cpp]----------------// bool justpushed(int k); bool buttonjustpushed(void); /* located in niku.cpp */ //------------------[referenced from intro/title.cpp]----------------// bool niku_load(uint32_t *value_out); /* located in intro/title.cpp */ //------------------[referenced from intro/title.cpp]----------------// bool title_init(int param); void title_tick(); static void selectoption(int index); static void handle_input(); static void draw_title(); void run_konami_code(); /* located in graphics/font.cpp */ //------------------[referenced from intro/title.cpp]----------------// int GetFontWidth(const char *text, int spacing, bool is_shaded); int font_draw(int x, int y, const char *text, int spacing, NXFont *font); /* located in sound/sound.cpp */ //------------------[referenced from intro/title.cpp]----------------// void music(int songno); void sound(int snd); /* located in common/stat.cpp */ //------------------[referenced from intro/title.cpp]----------------// void stat(const char *fmt, ...); ================================================ FILE: intro/title.h ================================================ #ifndef _TITLE_H #define _TITLE_H bool title_init(int param); void title_tick(); #endif ================================================ FILE: inventory.cpp ================================================ // the in-game inventory screen #include "nx.h" #include "inventory.h" #include "inventory.fdh" #define ARMS_X 10 #define ARMS_Y 8 #define ITEMS_X 10 #define ITEMS_Y 60 static stInventory inv; // can't enter Inven if // * script is running // * fade is in progress // * player is dead // param is passed as 1 when returning from Map System. bool inventory_init(int param) { memset(&inv, 0, sizeof(inv)); inv.curselector = &inv.armssel; inv.armssel.cursel = RefreshInventoryScreen(); inv.curselector->lastsel = -9999; // run the script first time // returning from map system? if (param == 1) { inv.curselector = &inv.itemsel; // highlight Map System for(int i=0;icursel = i; // textbox NOT up until they move the selector inv.curselector->lastsel = i; break; } } } return 0; } void inventory_tick(void) { // run the selectors RunSelector(inv.curselector); // draw DrawScene(); DrawInventory(); textbox.Draw(); } /* void c------------------------------() {} */ // reload which items & guns are available. // reset the cursor for the current selector. // return the slot corresponding to the current weapon. int RefreshInventoryScreen(void) { int i; int curwpn = 0; if (game.mode != GM_INVENTORY) return 0; inv.w = 244; inv.h = 152; inv.x = (SCREEN_WIDTH / 2) - (inv.w / 2); #ifndef _480X272 // 480x272 widescreen fix inv.y = 8; #else inv.y = 30; #endif // find current weapon and count # items for armssel selector inv.armssel.items[0] = 0; // show "no weapon" in case of no weapon inv.armssel.nitems = 0; for(i=1;iweapons[i].hasWeapon) continue; if (player->curWeapon == i) curwpn = inv.armssel.nitems; inv.armssel.items[inv.armssel.nitems++] = i; } inv.armssel.spacing_x = 40; inv.armssel.spacing_y = 0; inv.armssel.sprite = SPR_SELECTOR_ARMS; inv.armssel.sound = SND_SWITCH_WEAPON; inv.armssel.scriptbase = 1000; inv.armssel.rowlen = inv.armssel.nitems; // setup itemsel... inv.itemsel.nitems = player->ninventory; inv.itemsel.items[0] = 0; // show "no item" in case of no items for(i=0;ininventory;i++) inv.itemsel.items[i] = player->inventory[i]; inv.itemsel.spacing_x = sprites[SPR_ITEMIMAGE].w; inv.itemsel.spacing_y = sprites[SPR_ITEMIMAGE].h + 2; inv.itemsel.sprite = SPR_SELECTOR_ITEMS; inv.itemsel.sound = SND_MENU_MOVE; inv.itemsel.rowlen = 6; inv.itemsel.scriptbase = 5000; inv.curselector->cursel = 0; // after an item has been used don't bring up the script of whatever item // the selector is moved to inv.curselector->lastsel = inv.curselector->cursel; return curwpn; } void UnlockInventoryInput(void) { if (inv.lockinput) inv.lockinput = false; } /* void c------------------------------() {} */ static void DrawInventory(void) { int x, y, w, i, c; // draw the box TextBox::DrawFrame(inv.x, inv.y, inv.w, inv.h); // - draw the weapons ---- x = inv.x + ARMS_X; y = inv.y + ARMS_Y; draw_sprite(x, y, SPR_TEXT_ARMS, 0, 0); y += sprites[SPR_TEXT_ARMS].h; DrawSelector(&inv.armssel, x, y); // draw the arms for(w=1;wweapons[w].hasWeapon) continue; draw_sprite(x+1, y+1, SPR_ARMSICONS, w, 0); DrawWeaponLevel(x+1, y+16, w); DrawWeaponAmmo(x+1, y+16+8, w); x += inv.armssel.spacing_x; } // - draw the items ---- x = inv.x + ITEMS_X; y = inv.y + ITEMS_Y; draw_sprite(x, y, SPR_TEXT_ITEMS, 0, 0); y += sprites[SPR_TEXT_ITEMS].h; DrawSelector(&inv.itemsel, x, y); c = 0; for(i=0;i= inv.itemsel.rowlen) { x = inv.x + ITEMS_X; y += inv.itemsel.spacing_y; c = 0; } } } static void RunSelector(stSelector *selector) { int nrows; int currow, curcol; char toggle = 0; if (inv.lockinput) { if (GetCurrentScript()==-1) inv.lockinput = 0; else return; } if (selector->nitems) { nrows = (selector->nitems - 1) / selector->rowlen; currow = (selector->cursel / selector->rowlen); curcol = (selector->cursel % selector->rowlen); } else { nrows = currow = curcol = 0; } if (justpushed(LEFTKEY)) { sound(selector->sound); // at beginning of row? if (curcol == 0) { // wrap to end of row if (currow < nrows) selector->cursel += (selector->rowlen - 1); else if (selector->nitems > 0) selector->cursel = selector->nitems - 1; } else selector->cursel--; } if (justpushed(RIGHTKEY)) { sound(selector->sound); // at end of row? if (curcol==selector->rowlen-1 || selector->cursel+1 >= selector->nitems) { // wrap to beginning of row selector->cursel = (currow * selector->rowlen); } else selector->cursel++; } if (justpushed(DOWNKEY)) { // on last row? if (currow >= nrows) toggle = 1; else { selector->cursel += selector->rowlen; // don't go past last item if (selector->cursel >= selector->nitems) selector->cursel = (selector->nitems - 1); sound(selector->sound); } } if (justpushed(UPKEY)) { // on top row? if (currow == 0) toggle = 1; else { selector->cursel -= selector->rowlen; sound(selector->sound); } } // switch to other selector if (toggle) { if (selector == &inv.itemsel) { selector = &inv.armssel; } else { selector = &inv.itemsel; } inv.curselector = selector; sound(selector->sound); selector->lastsel = -9999; } // bring up scripts if (selector->cursel != selector->lastsel) { selector->lastsel = selector->cursel; StartScript(selector->items[selector->cursel] + selector->scriptbase, SP_ARMSITEM); } if (selector == &inv.armssel) // selecting a weapon { if (buttonjustpushed()) { // select the new weapon weapon_slide(LEFT, selector->items[selector->cursel]); ExitInventory(); } } else // selecting an item { if (justpushed(JUMPKEY)) { // bring up "more info" or "equip" script for this item StartScript(selector->items[selector->cursel] + selector->scriptbase + 1000, SP_ARMSITEM); inv.lockinput = 1; } if (justpushed(INVENTORYKEY) || justpushed(FIREKEY)) ExitInventory(); } } static void ExitInventory(void) { StopScripts(); game.setmode(GM_NORMAL); memset(inputs, 0, sizeof(inputs)); } static void DrawSelector(stSelector *selector, int x, int y) { int selx, sely; int xsel, ysel; if (selector == inv.curselector) { // flash the box if (++selector->animtimer > 1) { selector->animtimer = 0; selector->flashstate ^= 1; } } else { // permanently dim selector->flashstate = 1; selector->animtimer = 99; // light up immediately upon becoming active } if (selector->rowlen) { xsel = (selector->cursel % selector->rowlen); ysel = (selector->cursel / selector->rowlen); } else xsel = ysel = 0; selx = x + (xsel * selector->spacing_x); sely = y + (ysel * selector->spacing_y); draw_sprite(selx, sely, selector->sprite, selector->flashstate, 0); } ================================================ FILE: inventory.fdh ================================================ //hash:4e75e7a3 //automatically generated by Makegen /* located in game.cpp */ //-------------------[referenced from inventory.cpp]-----------------// void DrawScene(void); /* located in statusbar.cpp */ //-------------------[referenced from inventory.cpp]-----------------// void DrawWeaponLevel(int x, int y, int wpn); void DrawWeaponAmmo(int x, int y, int wpn); void weapon_slide(int dir, int newwpn); /* located in tsc.cpp */ //-------------------[referenced from inventory.cpp]-----------------// int GetCurrentScript(void); ScriptInstance *StartScript(int scriptno, int pageno); void StopScripts(void); /* located in input.cpp */ //-------------------[referenced from inventory.cpp]-----------------// bool justpushed(int k); bool buttonjustpushed(void); /* located in inventory.cpp */ //-------------------[referenced from inventory.cpp]-----------------// bool inventory_init(int param); void inventory_tick(void); int RefreshInventoryScreen(void); void UnlockInventoryInput(void); static void DrawInventory(void); static void RunSelector(stSelector *selector); static void ExitInventory(void); static void DrawSelector(stSelector *selector, int x, int y); /* located in sound/sound.cpp */ //-------------------[referenced from inventory.cpp]-----------------// void sound(int snd); ================================================ FILE: inventory.h ================================================ #ifndef _INVENTORY_H #define _INVENTORY_H #define MAXLISTLEN 100 struct stSelector { uchar flashstate, animtimer; int spacing_x, spacing_y; int cursel, lastsel; int sprite; int nitems; int sound; int rowlen; int scriptbase; int items[MAXLISTLEN]; }; struct stInventory { int x, y, w, h; stSelector armssel; stSelector itemsel; stSelector *curselector; char lockinput; }; bool inventory_init(int param); void inventory_tick(void); enum INVENTORY { ITEM_ARTHURS_KEY = 1, ITEM_MAP_SYSTEM, ITEM_STANTAS_KEY, ITEM_SILVER_LOCKET, ITEM_BEAST_FANG, ITEM_LIFE_CAPSULE, ITEM_ID_CARD, ITEM_JELLYFISH_JUICE, ITEM_RUSTY_KEY, ITEM_GUM_KEY, ITEM_GUM_BASE, ITEM_CHARCOAL, ITEM_EXPLOSIVE, ITEM_PUPPY, ITEM_LIFE_POT, ITEM_CUREALL, ITEM_CLINIC_KEY, ITEM_BOOSTER08, ITEM_ARMS_BARRIER, ITEM_TURBOCHARGE, ITEM_AIRTANK, ITEM_COUNTER, ITEM_BOOSTER20, ITEM_MIMIGA_MASK, ITEM_TELEPORTER_KEY, ITEM_SUES_LETTER, ITEM_CONTROLLER, ITEM_BROKEN_SPRINKLER, ITEM_SPRINKLER, ITEM_TOW_ROPE, ITEM_CLAY_FIGURE_MEDAL, ITEM_LITTLE_MAN, ITEM_MUSHROOM_BADGE, ITEM_MA_PIGNON, ITEM_CURLYS_UNDERWEAR, ITEM_ALIEN_MEDAL, ITEM_CHACOS_LIPSTICK, ITEM_WHIMSICAL_STAR, ITEM_IRON_BOND }; #endif ================================================ FILE: l10n_strings.h ================================================ #ifndef L10N_STRINGS_H #define L10N_STRINGS_H #ifdef _L10N_CP1251 // Russian Win1251 Strings const char LC_RES[] = "\xD0\xE0\xE7\xF0\xE5\xF8\xE5\xED\xE8\xE5" ": "; const char LC_KEYS[] = "\xD3\xEF\xF0\xE0\xE2\xEB\xE5\xED\xE8\xE5"; const char LC_REPLAY[] = "\xCF\xEE\xE2\xF2\xEE\xF0\xFB"; const char LC_DEBUG[] = "\xCC\xE5\xED\xFE" " " "\xEE\xF2\xEB\xE0\xE4\xEA\xE8"; const char LC_DEBUG_KEYS[] = "\xC2\xEA\xEB\xFE\xF7\xE8\xF2\xFC" " Debug-" "\xEA\xEB\xE0\xE2\xE8\xF8\xE8"; const char LC_SAVE_SLOTS[] = "\xD1\xEB\xEE\xF2\xFB" " " "\xF1\xEE\xF5\xF0\xE0\xED\xE5\xED\xE5\xE9" ": "; const char LC_MUSIC[] = "\xCC\xF3\xE7\xFB\xEA\xE0" ": "; const char LC_SOUND[] = "\xC7\xE2\xF3\xEA" ": "; const char LC_FULLSCREEN_DIS[] = "\xCF\xEE\xEB\xED\xEE\xFD\xEA\xF0\xE0\xED\xED\xFB\xE9" " " "\xF0\xE5\xE6\xE8\xEC" " " "\xEE\xF2\xEA\xEB\xFE\xF7\xE5\xED"; const char LC_FULLSCREEN_CON[] = "\xF7\xE5\xF0\xE5\xE7" " " "\xEA\xEE\xED\xF1\xEE\xEB\xFC"; const char LC_RES_FAILED_320[] = "\xCE\xF8\xE8\xE1\xEA\xE0" " " "\xE8\xE7\xEC\xE5\xED\xE5\xED\xE8\xFF" " " "\xF0\xE0\xE7\xF0\xE5\xF8\xE5\xED\xE8\xFF" " " "\xED\xE0" " " "320x240"; const char LC_RES_FAILED[] = "\xCE\xF8\xE8\xE1\xEA\xE0" " " "\xE8\xE7\xEC\xE5\xED\xE5\xED\xE8\xFF" " " "\xF0\xE0\xE7\xF0\xE5\xF8\xE5\xED\xE8\xFF" " "; const char LC_FPS[] = "\xCF\xEE\xEA\xE0\xE7\xE0\xF2\xFC" " " "FPS"; const char LC_GODMODE[] = "\xC2\xEA\xEB\xFE\xF7\xE8\xF2\xFC" " " "\xED\xE5\xF3\xFF\xE7\xE2\xE8\xEC\xEE\xF1\xF2\xFC"; const char LC_BOXES[] = "\xD0\xE8\xF1\xEE\xE2\xE0\xF2\xFC" " " "\xE1\xEE\xEA\xF1\xFB"; const char LC_ADDEXP[] = "\xC4\xEE\xE1\xE0\xE2\xE8\xF2\xFC" " +1 XP"; const char LC_SAVE_NOW[] = "\xD1\xEE\xF5\xF0\xE0\xED\xE8\xF2\xFC" " " "\xE8\xE3\xF0\xF3" " " "\xF1\xE5\xE9\xF7\xE0\xF1"; const char LC_ON[] = "\xC2\xEA\xEB"; const char LC_OFF[] = "\xC2\xFB\xEA\xEB"; const char LC_BOSS_ONLY[] = "\xD2\xEE\xEB\xFC\xEA\xEE" " " "\xED\xE0" " " "\xE1\xEE\xF1\xF1\xE0\xF5"; const char LC_NO_RPL[] = "[" "\xED\xE5\xF2" " " "\xEF\xEE\xE2\xF2\xEE\xF0\xEE\xE2" "]"; const char LC_PLAY[] = "\xC8\xE3\xF0\xE0\xF2\xFC"; const char LC_KEEP[] = "\xD1\xEE\xF5\xF0\xE0\xED\xE8\xF2\xFC"; const char LC_FAIL_LOAD_HEADER[] = "\xCE\xF8\xE8\xE1\xEA\xE0" " " "\xE7\xE0\xE3\xF0\xF3\xE7\xEA\xE8" " " "\xE7\xE0\xE3\xEE\xEB\xEE\xE2\xEA\xE0" " "; const char LC_FAIL_WRITE_HEADER[] = "\xCE\xF8\xE8\xE1\xEA\xE0" " " "\xE7\xE0\xEF\xE8\xF1\xE8" " " "\xE7\xE0\xE3\xEE\xEB\xEE\xE2\xEA\xE0" "."; const char LC_KB_LEFT[] = "\xC2\xEB\xE5\xE2\xEE"; const char LC_KB_RIGHT[] = "\xC2\xEF\xF0\xE0\xE2\xEE"; const char LC_KB_UP[] = "\xC2\xE2\xE5\xF0\xF5"; const char LC_KB_DOWN[] = "\xC2\xED\xE8\xE7"; const char LC_KB_JUMP[] = "\xCF\xF0\xFB\xE6\xEE\xEA"; const char LC_KB_FIRE[] = "\xCE\xE3\xEE\xED\xFC"; const char LC_KB_WPN_PREV[] = "\xCF\xF0\xE5\xE4" ". " "\xEE\xF0\xF3\xE6\xE8\xE5"; const char LC_KB_WPN_NEXT[] = "\xD1\xEB\xE5\xE4" ". " "\xEE\xF0\xF3\xE6\xE8\xE5"; const char LC_KB_INV[] = "\xC8\xED\xE2\xE5\xED\xF2\xE0\xF0\xFC"; const char LC_KB_MAP[] = "\xCA\xE0\xF0\xF2\xE0"; const char LC_KB_NEW_KEY[] = "\xCD\xE0\xE6\xEC\xE8\xF2\xE5" " " "\xED\xEE\xE2\xF3\xFE" " " "\xEA\xEB\xE0\xE2\xE8\xF8\xF3" " " "\xE4\xEB\xFF" ":"; const char LC_KB_BUSY[] = "\xCA\xEB\xE0\xE2\xE8\xF8\xE0" " " "\xF3\xE6\xE5" " " "\xE8\xF1\xEF\xEE\xEB\xFC\xE7\xF3\xE5\xF2\xF1\xFF" " " "\xED\xE0" ":"; const char LC_RETURN[] = "\xC2\xEE\xE7\xE2\xF0\xE0\xF2"; const char LC_FULLSCREEN[] = "\xCF\xEE\xEB\xED\xFB\xE9" " " "\xFD\xEA\xF0\xE0\xED"; const char LC_PS_QUIT[] = ":" "\xC2\xFB\xF5\xEE\xE4"; const char LC_PS_RESUME[] = ":" "\xC2\xEE\xE7\xE2\xF0\xE0\xF2"; const char LC_PS_RESET[] = ":" "\xD1\xE1\xF0\xEE\xF1"; const char LC_PS_OPTIONS[] = ":" "\xCE\xEF\xF6\xE8\xE8"; #else const char LC_RES[] = "Resolution: "; const char LC_KEYS[] = "Controls"; const char LC_REPLAY[] = "Replay"; const char LC_DEBUG[] = "Debug Menu"; const char LC_DEBUG_KEYS[] = "Enable Debug Keys"; const char LC_SAVE_SLOTS[] = "Save Slots: "; const char LC_MUSIC[] = "Music: "; const char LC_SOUND[] = "Sound: "; const char LC_FULLSCREEN_DIS[] = "Fullscreen disabled via"; const char LC_FULLSCREEN_CON[] = "inhibit-fullscreen console setting"; const char LC_RES_FAILED_320[] = "Failed change resolution to 320x240"; const char LC_RES_FAILED[] = "Resolution change failed"; const char LC_FPS[] = "Show FPS"; const char LC_GODMODE[] = "Enable GodMode"; const char LC_BOXES[] = "Draw Boxes"; const char LC_ADDEXP[] = "Add +1 XP"; const char LC_SAVE_NOW[] = "Save now"; const char LC_ON[] = "On"; const char LC_OFF[] = "Off"; const char LC_BOSS_ONLY[] = "Boss Only"; const char LC_NO_RPL[] = "[no replays yet]"; const char LC_PLAY[] = "Play"; const char LC_KEEP[] = "Keep"; const char LC_FAIL_LOAD_HEADER[] = "Failed to load header."; const char LC_FAIL_WRITE_HEADER[] = "Failed to write header."; const char LC_KB_LEFT[] = "Left"; const char LC_KB_RIGHT[] = "Right"; const char LC_KB_UP[] = "Up"; const char LC_KB_DOWN[] = "Down"; const char LC_KB_JUMP[] = "Jump"; const char LC_KB_FIRE[] = "Fire"; const char LC_KB_WPN_PREV[] = "Wpn Prev"; const char LC_KB_WPN_NEXT[] = "Wpn Next"; const char LC_KB_INV[] = "Inventory"; const char LC_KB_MAP[] = "Map"; const char LC_KB_NEW_KEY[] = "Press new key for:"; const char LC_KB_BUSY[] = "Key already in use by:"; const char LC_RETURN[] = "Return"; const char LC_FULLSCREEN[] = "Fullscreen"; const char LC_PS_QUIT[] = ":Quit"; const char LC_PS_RESUME[] = ":Resume"; const char LC_PS_RESET[] = ":Reset"; const char LC_PS_OPTIONS[] = ":Options"; #endif #endif // L10N_STRINGS_H ================================================ FILE: main.cpp ================================================ #ifdef __HAIKU__ #include #include #include #endif #include "nx.h" #ifdef _SDL_MIXER #include #endif #include #include #include "graphics/safemode.h" #include "main.fdh" const char *data_dir = "data"; const char *stage_dir = "data/Stage"; const char *pic_dir = "endpic"; const char *nxdata_dir = "."; int fps = 0; static int fps_so_far = 0; static uint32_t fpstimer = 0; #define GAME_WAIT (1000/GAME_FPS) // sets framerate #define VISFLAGS (SDL_APPACTIVE | SDL_APPINPUTFOCUS) int framecount = 0; bool freezeframe = false; int flipacceltime = 0; int main(int argc, char *argv[]) { #ifdef __HAIKU__ char *haikuPath = getHaikuSettingsPath(); // To make it able to start from Tracker chdir(dirname(argv[0])); char path[PATH_MAX]; strcpy(path, haikuPath); strcat(path, "replay"); mkdir(haikuPath, 0755); mkdir(path, 0755); #endif bool inhibit_loadfade = false; bool error = false; bool freshstart; #ifndef __HAIKU__ SetLogFilename("debug.txt"); #else char logfile[PATH_MAX]; strcpy(logfile, haikuPath); strcat(logfile, "debug.txt"); SetLogFilename(logfile); free(haikuPath); #endif if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) { staterr("ack, sdl_init failed: %s.", SDL_GetError()); return 1; } atexit(SDL_Quit); // start up inputs first thing because settings_load may remap them input_init(); // load settings, or at least get the defaults, // so we know the initial screen resolution. settings_load(); if (Graphics::init(settings->resolution)) { staterr("Failed to initialize graphics."); return 1; } if (font_init()) { staterr("Failed to load font."); return 1; } //speed_test(); //return 1; #ifdef CONFIG_DATA_EXTRACTOR if (!settings->files_extracted) { if (extract_main()) { Graphics::close(); font_close(); return 0; } else { settings->files_extracted = true; settings_save(); } } #endif if (check_data_exists()) { return 1; } //Graphics::ShowLoadingScreen(); if (sound_init()) { fatal("Failed to initialize sound."); return 1; } if (trig_init()) { fatal("Failed trig module init."); return 1; } if (tsc_init()) { fatal("Failed to initialize script engine."); return 1; } if (textbox.Init()) { fatal("Failed to initialize textboxes."); return 1; } if (Carets::init()) { fatal("Failed to initialize carets."); return 1; } if (game.init()) return 1; game.setmode(GM_NORMAL); // set null stage just to have something to do while we go to intro game.switchstage.mapno = 0; //#define REPLAY #ifdef REPLAY game.switchstage.mapno = START_REPLAY; //Replay::set_ffwd(6000); //Replay::set_stopat(3500); game.switchstage.param = 1; #else //game.switchstage.mapno = LOAD_GAME; //game.pause(GP_OPTIONS); if (settings->skip_intro && file_exists(GetProfileName(settings->last_save_slot))) game.switchstage.mapno = LOAD_GAME; else game.setmode(GM_INTRO); #endif // for debug if (game.paused) { game.switchstage.mapno = 0; game.switchstage.eventonentry = 0; } if (game.switchstage.mapno == LOAD_GAME) inhibit_loadfade = true; game.running = true; freshstart = true; stat("Entering main loop..."); #ifdef __SDLSHIM__ set_console_visible(false); #endif //speed_test(); //return 1; while(game.running) { // SSS/SPS persists across stage transitions until explicitly // stopped, or you die & reload. It seems a bit risky to me, // but that's the spec. if (game.switchstage.mapno >= MAPNO_SPECIALS) { StopLoopSounds(); } // enter next stage, whatever it may be if (game.switchstage.mapno == LOAD_GAME || \ game.switchstage.mapno == LOAD_GAME_FROM_MENU) { if (game.switchstage.mapno == LOAD_GAME_FROM_MENU) freshstart = true; stat("= Loading game ="); if (game_load(settings->last_save_slot)) { fatal("savefile error"); goto ingame_error; } Replay::OnGameStarting(); if (!inhibit_loadfade) fade.Start(FADE_IN, FADE_CENTER); else inhibit_loadfade = false; } else if (game.switchstage.mapno == START_REPLAY) { stat(">> beginning replay '%s'", GetReplayName(game.switchstage.param)); StopScripts(); if (Replay::begin_playback(GetReplayName(game.switchstage.param))) { fatal("error starting playback"); goto ingame_error; } } else { if (game.switchstage.mapno == NEW_GAME || \ game.switchstage.mapno == NEW_GAME_FROM_MENU) { bool show_intro = (game.switchstage.mapno == NEW_GAME_FROM_MENU); InitNewGame(show_intro); } // slide weapon bar on first intro to Start Point if (game.switchstage.mapno == STAGE_START_POINT && \ game.switchstage.eventonentry == 91) { freshstart = true; } // switch maps if (load_stage(game.switchstage.mapno)) goto ingame_error; player->x = (game.switchstage.playerx * TILE_W) << CSF; player->y = (game.switchstage.playery * TILE_H) << CSF; } // start the level if (game.initlevel()) return 1; if (freshstart) weapon_introslide(); gameloop(); game.stageboss.OnMapExit(); freshstart = false; } shutdown: ; Replay::close(); game.close(); Carets::close(); Graphics::close(); input_close(); font_close(); sound_close(); tsc_close(); textbox.Deinit(); return error; ingame_error: ; stat(""); stat(" ************************************************"); stat(" * An in-game error occurred. Game shutting down."); stat(" ************************************************"); error = true; goto shutdown; } void gameloop(void) { int32_t nexttick = 0; game.switchstage.mapno = -1; while(game.running && game.switchstage.mapno < 0) { // get time until next tick int32_t curtime = SDL_GetTicks(); int32_t timeRemaining = nexttick - curtime; if (timeRemaining <= 0 || game.ffwdtime) { run_tick(); // try to "catch up" if something else on the system bogs us down for a moment. // but if we get really far behind, it's ok to start dropping frames if (game.ffwdtime) game.ffwdtime--; nexttick = curtime + GAME_WAIT; // pause game if window minimized if ((SDL_GetAppState() & VISFLAGS) != VISFLAGS) { AppMinimized(); nexttick = 0; } } else { // don't needlessly hog CPU, but don't sleep for entire // time left, some CPU's/kernels will fall asleep for // too long and cause us to run slower than we should timeRemaining /= 2; if (timeRemaining) SDL_Delay(timeRemaining); } } } static inline void run_tick() { static bool can_tick = true; static bool last_freezekey = false; static bool last_framekey = false; static int frameskip = 0; input_poll(); // input handling for a few global things if (justpushed(ESCKEY)) { if (settings->instant_quit) { game.running = false; } else if (!game.paused) // no pause from Options { game.pause(GP_PAUSED); } } #if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX) else if (justpushed(OPTIONS_KEY)) #else else if (justpushed(F3KEY)) #endif { game.pause(GP_OPTIONS); } // freeze frame if (settings->enable_debug_keys) { if (inputs[FREEZE_FRAME_KEY] && !last_freezekey) { can_tick = true; freezeframe ^= 1; framecount = 0; } if (inputs[FRAME_ADVANCE_KEY] && !last_framekey) { can_tick = true; if (!freezeframe) { freezeframe = 1; framecount = 0; } } last_freezekey = inputs[FREEZE_FRAME_KEY]; last_framekey = inputs[FRAME_ADVANCE_KEY]; } // fast-forward key (F5) if (inputs[FFWDKEY] && (settings->enable_debug_keys || Replay::IsPlaying())) { game.ffwdtime = 2; } if (can_tick) { game.tick(); if (freezeframe) { char buf[1024]; sprintf(buf, "[] Tick %d", framecount++); font_draw_shaded(4, (SCREEN_HEIGHT-GetFontHeight()-4), buf, 0, &greenfont); can_tick = false; } else { Replay::DrawStatus(); } if (settings->show_fps) { update_fps(); } if (!flipacceltime) { //platform_sync_to_vblank(); screen->Flip(); } else { flipacceltime--; if (--frameskip < 0) { screen->Flip(); frameskip = 256; } } memcpy(lastinputs, inputs, sizeof(lastinputs)); } else { // frame is frozen; don't hog CPU SDL_Delay(20); } // immediately after a game tick is when we have the most amount of time before // the game needs to run again. so now's as good a time as any for some // BGM audio processing, wouldn't you say? org_run(); } void update_fps() { fps_so_far++; if ((SDL_GetTicks() - fpstimer) >= 500) { fpstimer = SDL_GetTicks(); fps = (fps_so_far << 1); fps_so_far = 0; } char fpstext[64]; sprintf(fpstext, "%d fps", fps); int x = (SCREEN_WIDTH - 4) - GetFontWidth(fpstext, 0, true); font_draw_shaded(x, 4, fpstext, 0, &greenfont); } void InitNewGame(bool with_intro) { stat("= Beginning new game ="); memset(game.flags, 0, sizeof(game.flags)); memset(game.skipflags, 0, sizeof(game.skipflags)); textbox.StageSelect.ClearSlots(); game.quaketime = game.megaquaketime = 0; game.showmapnametime = 0; game.debug.god = 0; game.running = true; game.frozen = false; // fully re-init the player object Objects::DestroyAll(true); game.createplayer(); player->maxHealth = 3; player->hp = player->maxHealth; game.switchstage.mapno = STAGE_START_POINT; game.switchstage.playerx = 10; game.switchstage.playery = 8; game.switchstage.eventonentry = (with_intro) ? 200 : 91; fade.set_full(FADE_OUT); } void AppMinimized(void) { stat("Game minimized or lost focus--pausing..."); #ifdef _SDL_MIXER Mix_Pause(-1); Mix_PauseMusic(); #else SDL_PauseAudio(1); #endif for(;;) { if ((SDL_GetAppState() & VISFLAGS) == VISFLAGS) { break; } input_poll(); SDL_Delay(20); } #ifdef _SDL_MIXER Mix_Resume(-1); Mix_ResumeMusic(); #else SDL_PauseAudio(0); #endif stat("Focus regained, resuming play..."); } /* void c------------------------------() {} */ static void fatal(const char *str) { staterr("fatal: '%s'", str); if (!safemode::init()) { safemode::moveto(SM_UPPER_THIRD); safemode::print("Fatal Error"); safemode::moveto(SM_CENTER); safemode::print("%s", str); safemode::run_until_key(); safemode::close(); } } static bool check_data_exists() { char fname[MAXPATHLEN]; sprintf(fname, "%s/npc.tbl", data_dir); if (file_exists(fname)) return 0; if (!safemode::init()) { safemode::moveto(SM_UPPER_THIRD); safemode::print("Fatal Error"); safemode::moveto(SM_CENTER); safemode::print("Missing \"%s\" directory.", data_dir); safemode::print("Please copy it over from a Doukutsu installation."); safemode::run_until_key(); safemode::close(); } return 1; } void visible_warning(const char *fmt, ...) { va_list ar; char buffer[80]; va_start(ar, fmt); vsnprintf(buffer, sizeof(buffer), fmt, ar); va_end(ar); console.Print(buffer); } /* void c------------------------------() {} */ #ifdef __SDLSHIM__ void speed_test(void) { SDL_Rect textrect; uint32_t end = 0; fps = 0; ClearScreen(255, 0, 0); game.running = true; while(game.running) { if (SDL_GetTicks() >= end) { SDLS_VRAMSurface->h = 320; SDLS_VRAMSurface->cliprect.h = 320; textrect.x = 5; textrect.y = 250; textrect.w = 100; textrect.h = 10; SDL_FillRect(SDLS_VRAMSurface, &textrect, 0); char buffer[80]; sprintf(buffer, "%d fps ", fps); direct_text_draw(5, 250, buffer); SDLS_VRAMSurface->h = 240; SDLS_VRAMSurface->cliprect.h = 240; input_poll(); fps = 0; end = SDL_GetTicks() + 1000; } screen->Flip(); fps++; } } #else void speed_test(void) { SDL_Rect textrect; SDL_Surface *vram = screen->GetSDLSurface(); int click = 0; uint32_t end = 0; fps = 0; SDL_FillRect(vram, NULL, SDL_MapRGB(vram->format, 255, 0, 0)); int c = 0; game.running = true; while(game.running) { //SDL_FillRect(vram, NULL, c ^= 255); if (SDL_GetTicks() >= end) { stat("%d fps", fps); fps = 0; end = SDL_GetTicks() + 1000; if (++click > 3) break; } screen->Flip(); fps++; } } #endif void org_test_miniloop(void) { uint32_t start = 0, curtime; uint32_t counter; stat("Starting org test"); font_draw(5, 5, "ORG test in progress...", 0, &greenfont); font_draw(5, 15, "Logging statistics to nx.log", 0, &greenfont); font_draw(5, 25, "Press any button to quit", 0, &greenfont); screen->Flip(); music_set_enabled(1); music(32); last_sdl_key = -1; for(;;) { org_run(); if (++counter > 1024) { counter = 0; curtime = SDL_GetTicks(); if ((curtime - start) >= 100) { start = curtime; input_poll(); if (last_sdl_key != -1) return; } } } } void SDL_Delay(int ms) { usleep(ms * 1000); } #ifdef __HAIKU__ char *getHaikuSettingsPath() { char path[PATH_MAX]; find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, path, sizeof(path)); strcat(path, "/NXEngine/"); return strdup(path); } #endif ================================================ FILE: main.fdh ================================================ //hash:5e5b9413 //automatically generated by Makegen /* located in main.cpp */ //---------------------[referenced from main.cpp]--------------------// void gameloop(void); static inline void run_tick(); void update_fps(); void InitNewGame(bool with_intro); void AppMinimized(void); static void fatal(const char *str); static bool check_data_exists(); void visible_warning(const char *fmt, ...); void speed_test(void); void speed_test(void); void org_test_miniloop(void); void SDL_Delay(int ms); /* located in game.cpp */ //---------------------[referenced from main.cpp]--------------------// bool game_load(Profile *p); /* located in map.cpp */ //---------------------[referenced from main.cpp]--------------------// bool load_stage(int stage_no); /* located in profile.cpp */ //---------------------[referenced from main.cpp]--------------------// const char *GetProfileName(int num); /* located in settings.cpp */ //---------------------[referenced from main.cpp]--------------------// bool settings_load(Settings *setfile); bool settings_save(Settings *setfile); /* located in statusbar.cpp */ //---------------------[referenced from main.cpp]--------------------// void weapon_introslide(); /* located in tsc.cpp */ //---------------------[referenced from main.cpp]--------------------// bool tsc_init(void); void StopScripts(void); void tsc_close(void); /* located in input.cpp */ //---------------------[referenced from main.cpp]--------------------// bool input_init(void); void input_close(void); void input_poll(void); bool justpushed(int k); /* located in replay.cpp */ //---------------------[referenced from main.cpp]--------------------// const char *GetReplayName(int slotno, char *buffer); /* located in trig.cpp */ //---------------------[referenced from main.cpp]--------------------// char trig_init(void); /* located in graphics/font.cpp */ //---------------------[referenced from main.cpp]--------------------// bool font_init(void); void font_close(void); int font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font); int GetFontHeight(); int GetFontWidth(const char *text, int spacing, bool is_shaded); void direct_text_draw(int x, int y, const char *text); int font_draw(int x, int y, const char *text, int spacing, NXFont *font); /* located in sound/sound.cpp */ //---------------------[referenced from main.cpp]--------------------// bool sound_init(void); void StopLoopSounds(void); void sound_close(void); void music_set_enabled(int newstate); void music(int songno); /* located in sound/org.cpp */ //---------------------[referenced from main.cpp]--------------------// void org_run(void); /* located in extract/extract.cpp */ //---------------------[referenced from main.cpp]--------------------// int extract_main(); /* located in common/stat.cpp */ //---------------------[referenced from main.cpp]--------------------// void SetLogFilename(const char *fname); void staterr(const char *fmt, ...); void stat(const char *fmt, ...); /* located in common/misc.cpp */ //---------------------[referenced from main.cpp]--------------------// bool file_exists(const char *fname); ================================================ FILE: map.cpp ================================================ #include "nx.h" #include "map.h" #include "map.fdh" stMap map; MapRecord stages[MAX_STAGES]; int num_stages; #define MAX_BACKDROPS 32 NXSurface *backdrop[MAX_BACKDROPS]; // for FindObject--finding NPC's by ID2 Object *ID2Lookup[65536]; unsigned char tilecode[MAX_TILES]; // tile codes for every tile in current tileset unsigned int tileattr[MAX_TILES]; // tile attribute bits for every tile in current tileset unsigned int tilekey[MAX_TILES]; // mapping from tile codes -> tile attributes // load stage "stage_no", this entails loading the map (pxm), enemies (pxe), tileset (pbm), // tile attributes (pxa), and script (tsc). bool load_stage(int stage_no) { char stage[MAXPATHLEN]; char fname[MAXPATHLEN]; stat(" >> Entering stage %d: '%s'.", stage_no, stages[stage_no].stagename); game.curmap = stage_no; // do it now so onspawn events will have it if (use_palette) { palette_reset(); Sprites::FlushSheets(); map_flush_graphics(); } if (Tileset::Load(stages[stage_no].tileset)) return 1; // get the base name of the stage without extension const char *mapname = stages[stage_no].filename; if (!strcmp(mapname, "lounge")) mapname = "Lounge"; sprintf(stage, "%s/%s", stage_dir, mapname); sprintf(fname, "%s.pxm", stage); if (load_map(fname)) return 1; sprintf(fname, "%s/%s.pxa", stage_dir, tileset_names[stages[stage_no].tileset]); if (load_tileattr(fname)) return 1; sprintf(fname, "%s.pxe", stage); if (load_entities(fname)) return 1; sprintf(fname, "%s.tsc", stage); if (tsc_load(fname, SP_MAP) == -1) return 1; map_set_backdrop(stages[stage_no].bg_no); map.scrolltype = stages[stage_no].scroll_type; map.motionpos = 0; return 0; } /* void c------------------------------() {} */ // load a PXM map bool load_map(const char *fname) { FILE *fp; int x, y; fp = fileopen(fname, "rb"); if (!fp) { staterr("load_map: no such file: '%s'", fname); return 1; } if (!fverifystring(fp, "PXM")) { staterr("load_map: invalid map format: '%s'", fname); return 1; } memset(&map, 0, sizeof(map)); fgetc(fp); map.xsize = fgeti(fp); map.ysize = fgeti(fp); if (map.xsize > MAP_MAXSIZEX || map.ysize > MAP_MAXSIZEY) { staterr("load_map: map is too large -- size %dx%d but max is %dx%d", map.xsize, map.ysize, MAP_MAXSIZEX, MAP_MAXSIZEY); fclose(fp); return 1; } else { stat("load_map: level size %dx%d", map.xsize, map.ysize); } for(y=0;yid1 = id1; o->id2 = id2; o->flags |= flags; ID2Lookup[o->id2] = o; // now that it's all set up, execute OnSpawn, // since we didn't do it in CreateObject. o->OnSpawn(); } } } //stat("load_entities: loaded %d objects", nEntities); fclose(fp); return 0; } /*const int ta[] = { 0, TA_SOLID, TA_SOLID, TA_SOLID, TA_SOLID, TA_SLOPE_BACK1|TA_FOREGROUND, TA_SLOPE_BACK2|TA_FOREGROUND, TA_SLOPE_FWD1|TA_FOREGROUND, TA_SLOPE_FWD2|TA_FOREGROUND, TA_FOREGROUND, 0,0,0, TA_FOREGROUND,TA_FOREGROUND,TA_FOREGROUND, 0, TA_SOLID, TA_SOLID, TA_FOREGROUND, TA_FOREGROUND, TA_SOLID,TA_SOLID,TA_SOLID,TA_SOLID,TA_FOREGROUND,0,0,0,TA_FOREGROUND,TA_FOREGROUND,TA_FOREGROUND, 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, 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, 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, 0,TA_SOLID,0,TA_SOLID,TA_SOLID,0,0,0,0,0,0,TA_SOLID,TA_SOLID,TA_SOLID,TA_SOLID,TA_SOLID, TA_SOLID,TA_FOREGROUND,TA_FOREGROUND,0,0,0,0,0,0,0,0,0,TA_SOLID,TA_SOLID,TA_SOLID,TA_SOLID }; memset(tileattr, 0, sizeof(tileattr)); memcpy(&tileattr, &ta, sizeof(ta)); */ // loads a pxa (tileattr) file bool load_tileattr(const char *fname) { FILE *fp; int i; unsigned char tc; map.nmotiontiles = 0; stat("load_pxa: reading in %s", fname); fp = fileopen(fname, "rb"); if (!fp) { staterr("load_pxa: no such file: '%s'", fname); return 1; } for(i=0;i<256;i++) { tc = fgetc(fp); tilecode[i] = tc; tileattr[i] = tilekey[tc]; //stat("Tile %02x TC %02x Attr %08x tilekey[%02x] = %08x", i, tc, tileattr[i], tc, tilekey[tc]); if (tc == 0x43) // destroyable block - have to replace graphics { CopySpriteToTile(SPR_DESTROYABLE, i, 0, 0); } // add water currents to animation list if (tileattr[i] & TA_CURRENT) { map.motiontiles[map.nmotiontiles].tileno = i; map.motiontiles[map.nmotiontiles].dir = CVTDir(tc & 3); map.motiontiles[map.nmotiontiles].sprite = SPR_WATER_CURRENT; map.nmotiontiles++; stat("Added tile %02x to animation list, tc=%02x", i, tc); } } fclose(fp); return 0; } bool load_stages(void) { FILE *fp; fp = fileopen("stage.dat", "rb"); if (!fp) { staterr("%s(%d): failed to open stage.dat", __FILE__, __LINE__); num_stages = 0; return 1; } num_stages = fgetc(fp); // Dirty hack for packed structs int size_of_MapRecord = sizeof(MapRecord().filename) + sizeof(MapRecord().stagename) + 6; for(int i=0;i> CSF); map.parscroll_y = (map.displayed_yscroll >> CSF); break; case BK_PARALLAX: map.parscroll_y = (map.displayed_yscroll >> CSF) / 2; map.parscroll_x = (map.displayed_xscroll >> CSF) / 2; break; case BK_FASTLEFT: // Ironhead map.parscroll_x += 6; map.parscroll_y = 0; break; case BK_FASTLEFT_LAYERS: case BK_FASTLEFT_LAYERS_NOFALLLEFT: { DrawFastLeftLayered(); return; } break; case BK_HIDE: case BK_HIDE2: case BK_HIDE3: { if (game.curmap == STAGE_KINGS) // intro cutscene ClearScreen(BLACK); else ClearScreen(DK_BLUE); } return; default: map.parscroll_x = map.parscroll_y = 0; staterr("map_draw_backdrop: unhandled map scrolling type %d", map.scrolltype); break; } map.parscroll_x %= backdrop[map.backdrop]->Width(); map.parscroll_y %= backdrop[map.backdrop]->Height(); int w = backdrop[map.backdrop]->Width(); int h = backdrop[map.backdrop]->Height(); for(y=0;y> 1; x %= SCREEN_WIDTH; } BlitPatternAcross(backdrop[map.backdrop], x, y1, y1, (y2-y1)+1); y1 = (y2 + 1); } } // loads a backdrop into memory, if it hasn't already been loaded static bool LoadBackdropIfNeeded(int backdrop_no) { char fname[MAXPATHLEN]; // load backdrop now if it hasn't already been loaded if (!backdrop[backdrop_no]) { // use chromakey (transparency) on bkwater, all others don't bool use_chromakey = (backdrop_no == 8); #ifdef _480X272 // 480x272 widescreen fix if (backdrop_no == 9) { if (sprintf(fname, "%s/%s.pbm", data_dir, "bkMoon480fix") < 0) { staterr("Error opening bkMoon480fix file"); } } else if (backdrop_no == 10) { if (sprintf(fname, "%s/%s.pbm", data_dir, "bkFog480fix")) { staterr("Error opening bkFog480fix file"); } } else { sprintf(fname, "%s/%s.pbm", data_dir, backdrop_names[backdrop_no]); } #else sprintf(fname, "%s/%s.pbm", data_dir, backdrop_names[backdrop_no]); #endif backdrop[backdrop_no] = NXSurface::FromFile(fname, use_chromakey); if (!backdrop[backdrop_no]) { staterr("Failed to load backdrop '%s'", fname); return 1; } } return 0; } void map_flush_graphics() { int i; for(i=0;i> CSF); water_x %= SCREEN_WIDTH; water_y = (map.waterlevelobject->y >> CSF) - (map.displayed_yscroll >> CSF); // draw the surface and just under the surface BlitPatternAcross(backdrop[map.backdrop], water_x, water_y, 0, 16); water_y += 16; BlitPatternAcross(backdrop[map.backdrop], water_x, water_y, 32, 16); water_y += 16; // draw the rest of the pattern all the way down while(water_y < (SCREEN_HEIGHT-1)) { BlitPatternAcross(backdrop[map.backdrop], water_x, water_y, 16, 32); water_y += 32; } } // draw the map. // if foreground = TA_FOREGROUND, draws the foreground tile layer. // if foreground = 0, draws backdrop and background tiles. void map_draw(uint8_t foreground) { int x, y; int mapx, mapy; int blit_x, blit_y, blit_x_start; int scroll_x, scroll_y; scroll_x = (map.displayed_xscroll >> CSF); scroll_y = (map.displayed_yscroll >> CSF); /* printf("(%d)x(%d):\t:", map.displayed_xscroll, map.displayed_yscroll); printf("(%d)x(%d):\t:", map.maxxscroll, map.maxyscroll); printf("(%d)x(%d)\n", map.xsize, map.ysize); printf("%dx%d\n", map.displayed_xscroll >> CSG, map.displayed_yscroll >> CSG); */ mapx = (scroll_x / TILE_W); mapy = (scroll_y / TILE_H); blit_y = -(scroll_y % TILE_H); blit_x_start = -(scroll_x % TILE_W); // MAP_DRAW_EXTRA_Y etc is 1 if resolution is changed to // something not a multiple of TILE_H. for(y=0; y <= (SCREEN_HEIGHT / TILE_H)+MAP_DRAW_EXTRA_Y; y++) { blit_x = blit_x_start; for(x=0; x <= (SCREEN_WIDTH / TILE_W)+MAP_DRAW_EXTRA_X; x++) { int t = map.tiles[mapx+x][mapy+y]; if ((tileattr[t] & TA_FOREGROUND) == foreground) draw_tile(blit_x, blit_y, t); blit_x += TILE_W; } blit_y += TILE_H; } } /* void c------------------------------() {} */ // map scrolling code void scroll_normal(void) { const int scroll_adj_rate = (0x2000 / map.scrollspeed); // how many pixels to let player stray from the center of the screen // before we start scrolling. high numbers let him reach closer to the edges, // low numbers keep him real close to the center. #define P_VARY_FROM_CENTER (64 << CSF) if (player->dir == LEFT) { map.scrollcenter_x -= scroll_adj_rate; if (map.scrollcenter_x < -P_VARY_FROM_CENTER) map.scrollcenter_x = -P_VARY_FROM_CENTER; } else { map.scrollcenter_x += scroll_adj_rate; if (map.scrollcenter_x > P_VARY_FROM_CENTER) map.scrollcenter_x = P_VARY_FROM_CENTER; } // compute where the map "wants" to be map.target_x = (player->CenterX() + map.scrollcenter_x) - ((SCREEN_WIDTH / 2) << CSF); // Y scrolling if (player->lookscroll == UP) { map.scrollcenter_y -= scroll_adj_rate; if (map.scrollcenter_y < -P_VARY_FROM_CENTER) map.scrollcenter_y = -P_VARY_FROM_CENTER; } else if (player->lookscroll == DOWN) { map.scrollcenter_y += scroll_adj_rate; if (map.scrollcenter_y > P_VARY_FROM_CENTER) map.scrollcenter_y = P_VARY_FROM_CENTER; } else { if (map.scrollcenter_y <= -scroll_adj_rate) { map.scrollcenter_y += scroll_adj_rate; } else if (map.scrollcenter_y >= scroll_adj_rate) { map.scrollcenter_y -= scroll_adj_rate; } } map.target_y = (player->CenterY() + map.scrollcenter_y) - ((SCREEN_HEIGHT / 2) << CSF); } void map_scroll_do(void) { bool doing_normal_scroll = false; if (!map.scroll_locked) { if (map.focus.has_target) { // FON command // this check makes it so if we sprite].frame[t->frame].dir[t->dir].drawpoint.equ(0, 0)) { map.target_x = map.focus.target->CenterX() - ((SCREEN_WIDTH / 2) << CSF); map.target_y = map.focus.target->CenterY() - ((SCREEN_HEIGHT / 2) << CSF); } else { map.target_x = map.focus.target->x - ((SCREEN_WIDTH / 2) << CSF); map.target_y = map.focus.target->y - ((SCREEN_HEIGHT / 2) << CSF); } } } else { if (!player->hide) { scroll_normal(); if (!inputs[DEBUG_MOVE_KEY] || !settings->enable_debug_keys) doing_normal_scroll = true; } } } map.real_xscroll += (map.target_x - map.real_xscroll) / map.scrollspeed; map.real_yscroll += (map.target_y - map.real_yscroll) / map.scrollspeed; map.displayed_xscroll = (map.real_xscroll + map.phase_adj); map.displayed_yscroll = map.real_yscroll; // we don't compensate on Y, because player falls > 2 pixels per frame if (doing_normal_scroll) { run_phase_compensator(); //dump_phase_data(); } else { map.phase_adj -= MAP_PHASE_ADJ_SPEED; if (map.phase_adj < 0) map.phase_adj = 0; } map_sanitycheck(); // do quaketime after sanity check so quake works in // small levels like Shack. if (game.quaketime) { if (!map.scroll_locked) { int pushx, pushy; if (game.megaquaketime) // Ballos fight { game.megaquaketime--; pushx = random(-5, 5) << CSF; pushy = random(-3, 3) << CSF; } else { pushx = random(-1, 1) << CSF; pushy = random(-1, 1) << CSF; } map.real_xscroll += pushx; map.real_yscroll += pushy; map.displayed_xscroll += pushx; map.displayed_yscroll += pushy; } else { // quake after IronH battle...special case cause we don't // want to show the walls of the arena. int pushy = random(-0x500, 0x500); map.real_yscroll += pushy; if (map.real_yscroll < 0) map.real_yscroll = 0; if (map.real_yscroll > (15 << CSF)) map.real_yscroll = (15 << CSF); map.displayed_yscroll += pushy; if (map.displayed_yscroll < 0) map.displayed_yscroll = 0; if (map.displayed_yscroll > (15 << CSF)) map.displayed_yscroll = (15 << CSF); } game.quaketime--; } } // this attempts to prevent jitter most visible when the player is walking on a // long straight stretch. the jitter occurs because map.xscroll and player->x // tend to be out-of-phase, and thus cross over pixel boundaries at different times. // what we do here is try to tweak/fudge the displayed xscroll value by up to 512 subpixels // (1 real pixel), so that it crosses pixel boundaries on exactly the same frame as // the player does. void run_phase_compensator(void) { int displayed_phase_offs = (map.displayed_xscroll - player->x) % 512; if (displayed_phase_offs != 0) { int phase_offs = abs(map.real_xscroll - player->x) % 512; //debug("%d", phase_offs); // move phase_adj towards phase_offs; phase_offs is how far // out of sync we are with the player and so once we reach it // we will compensating exactly. if (map.phase_adj < phase_offs) { map.phase_adj += MAP_PHASE_ADJ_SPEED; if (map.phase_adj > phase_offs) map.phase_adj = phase_offs; } else { map.phase_adj -= MAP_PHASE_ADJ_SPEED; if (map.phase_adj < phase_offs) map.phase_adj = phase_offs; } } } // debug function void dump_phase_data() { int phase_offs = abs(map.real_xscroll - player->x) % 512; int final_phase = abs(map.displayed_xscroll - player->x) % 512; debug("phase_offs: %d", phase_offs); debug(""); debug("real xscroll: %d", map.real_xscroll); debug("displayed xscroll: %d", map.displayed_xscroll); debug("difference: %d", map.real_xscroll - map.displayed_xscroll); debug(""); debug("phase_adj: %d", map.phase_adj); debug("final_phase: %d", final_phase); } /* void c------------------------------() {} */ // scroll position sanity checking void map_sanitycheck(void) { #define MAP_BORDER_AMT (8< map.maxxscroll) map.real_xscroll = map.maxxscroll; if (map.real_yscroll > map.maxyscroll) map.real_yscroll = map.maxyscroll; if (map.displayed_xscroll < MAP_BORDER_AMT) map.displayed_xscroll = MAP_BORDER_AMT; if (map.displayed_yscroll < MAP_BORDER_AMT) map.displayed_yscroll = MAP_BORDER_AMT; if (map.displayed_xscroll > map.maxxscroll) map.displayed_xscroll = map.maxxscroll; if (map.displayed_yscroll > map.maxyscroll) map.displayed_yscroll = map.maxyscroll; } void map_scroll_jump(int x, int y) { map.target_x = x - ((SCREEN_WIDTH / 2) << CSF); map.target_y = y - ((SCREEN_HEIGHT / 2) << CSF); map.real_xscroll = map.target_x; map.real_yscroll = map.target_y; map.displayed_xscroll = map.real_xscroll; map.displayed_yscroll = map.real_yscroll; map.phase_adj = 0; map.scrollcenter_x = map.scrollcenter_y = 0; map_sanitycheck(); } // lock the scroll in it's current position. the target position will not change, // however if the scroll is moved off the target (really only a quake could do this) // the map will still seek it's old position. void map_scroll_lock(bool lockstate) { map.scroll_locked = lockstate; if (lockstate) { // why do we do this? map.real_xscroll = map.target_x; map.real_yscroll = map.target_y; } } // set the map focus and scroll speed. // if o is specified, focuses on that object. // if o is NULL, focuses on the player. void map_focus(Object *o, int spd) { map.focus.target = o; map.focus.has_target = (o != NULL); map.scrollspeed = spd; map.scroll_locked = false; } /* void c------------------------------() {} */ // change tile at x,y into newtile while optionally spawning smoke clouds and boomflash void map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind) { if (x < 0 || y < 0 || x >= map.xsize || y >= map.ysize) return; map.tiles[x][y] = newtile; int xa = ((x * TILE_W) + (TILE_W / 2)) << CSF; int ya = ((y * TILE_H) + (TILE_H / 2)) << CSF; SmokeXY(xa, ya, nclouds, TILE_W/2, TILE_H/2, push_behind); if (boomflash) effect(xa, ya, EFFECT_BOOMFLASH); } const char *map_get_stage_name(int mapno) { if (mapno == STAGE_KINGS) return "";//Studio Pixel Presents"; return stages[mapno].stagename; } // show map name for "ticks" ticks void map_show_map_name() { game.mapname_x = (SCREEN_WIDTH / 2) - (GetFontWidth(map_get_stage_name(game.curmap), 0) / 2); game.showmapnametime = 120; } void map_draw_map_name(void) { if (game.showmapnametime) { font_draw(game.mapname_x, 84, map_get_stage_name(game.curmap), 0, &shadowfont); game.showmapnametime--; } } // animate all motion tiles void AnimateMotionTiles(void) { int i; int x_off, y_off; for(i=0;i= TILE_W) map.motionpos = 0; } // attempts to find an object with id2 matching the given value else returns NULL Object *FindObjectByID2(int id2) { Object *result = ID2Lookup[id2]; if (result) staterr("FindObjectByID2: ID2 %04d found: type %s; coords: (%d, %d)", id2, DescribeObjectType(ID2Lookup[id2]->type), ID2Lookup[id2]->x>>CSF,ID2Lookup[id2]->y>>CSF); else staterr("FindObjectByID2: no such object %04d", id2); return result; } ================================================ FILE: map.fdh ================================================ //hash:5a715c2e //automatically generated by Makegen /* located in ObjManager.cpp */ //----------------------[referenced from map.cpp]--------------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //----------------------[referenced from map.cpp]--------------------// bool load_stage(int stage_no); bool load_map(const char *fname); bool load_entities(const char *fname); bool load_tileattr(const char *fname); bool load_stages(void); bool initmapfirsttime(void); void initmap(void); void map_set_backdrop(int backdrop_no); void map_draw_backdrop(void); static void DrawFastLeftLayered(void); static bool LoadBackdropIfNeeded(int backdrop_no); void map_flush_graphics(); void map_drawwaterlevel(void); void map_draw(uint8_t foreground); void scroll_normal(void); void map_scroll_do(void); void run_phase_compensator(void); void dump_phase_data(); void map_sanitycheck(void); void map_scroll_jump(int x, int y); void map_scroll_lock(bool lockstate); void map_focus(Object *o, int spd); void map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds, bool boomflash, Object *push_behind); const char *map_get_stage_name(int mapno); void map_show_map_name(); void map_draw_map_name(void); void AnimateMotionTiles(void); Object *FindObjectByID2(int id2); /* located in platform.cpp */ //----------------------[referenced from map.cpp]--------------------// FILE *fileopen(const char *fname, const char *mode); /* located in caret.cpp */ //----------------------[referenced from map.cpp]--------------------// Caret *effect(int x, int y, int effectno); /* located in tsc.cpp */ //----------------------[referenced from map.cpp]--------------------// bool tsc_load(const char *fname, int pageno); int CVTDir(int csdir); /* located in debug.cpp */ //----------------------[referenced from map.cpp]--------------------// const char *DescribeObjectType(int type); void debug(const char *fmt, ...); /* located in ai/sym/smoke.cpp */ //----------------------[referenced from map.cpp]--------------------// void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in graphics/font.cpp */ //----------------------[referenced from map.cpp]--------------------// int GetFontWidth(const char *text, int spacing, bool is_shaded); int font_draw(int x, int y, const char *text, int spacing, NXFont *font); /* located in graphics/palette.cpp */ //----------------------[referenced from map.cpp]--------------------// void palette_reset(void); /* located in common/stat.cpp */ //----------------------[referenced from map.cpp]--------------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //----------------------[referenced from map.cpp]--------------------// bool fverifystring(FILE *fp, const char *str); uint16_t fgeti(FILE *fp); uint32_t fgetl(FILE *fp); int random(int min, int max); ================================================ FILE: map.h ================================================ #ifndef _MAP_H #define _MAP_H #define MAX_MOTION_TILES 20 #define MAP_MAXSIZEX 300 #define MAP_MAXSIZEY 256 #define MAP_PHASE_ADJ_SPEED 64 // this macro returns true if the current stage is spec'd to use the specified NPC spriteset. #define DoesCurrentStageUseSpriteset(SET) \ ( stages[game.curmap].NPCset1==SET || stages[game.curmap].NPCset2==SET ) #define MAPX(X) ( ( (X) * TILE_W ) << CSF ) #define MAPY(Y) ( ( (Y) * TILE_H ) << CSF ) struct stMap { int xsize, ysize; int displayed_xscroll, displayed_yscroll; int maxxscroll, maxyscroll; int parscroll_x, parscroll_y; int real_xscroll, real_yscroll; int phase_adj; int target_x, target_y; int scrollcenter_x, scrollcenter_y; int scrollspeed; bool scroll_locked; uint8_t backdrop; // backdrop # in use int scrolltype; // backdrop scroll type Object *waterlevelobject; // object controlling water level (for maps with rising water) int wlforcestate; // set by Core--modifies the state of the water level object int wlstate; // set by WaterLevel object--reports it's current state // for FON, FOM script commands struct { Object *target; bool has_target; } focus; // motion tiles used in Waterway and Main Artery--these tiles use // a sprite as their image data and pan the sprite across them in a specified direction struct { int tileno; // tile # to animate uchar dir; // direction of scrolling int sprite; // sprite # containing image data } motiontiles[MAX_MOTION_TILES]; int nmotiontiles; int motionpos; unsigned char tiles[MAP_MAXSIZEX][MAP_MAXSIZEY]; }; extern stMap map; void map_focus(Object *o, int spd = 16); // background scrolling types #define BK_FIXED 0 // backdrop does not scroll #define BK_PARALLAX 1 // bk is parallax scroll #define BK_FOLLOWFG 2 // scrolls, but is 1:1 with foreground #define BK_HIDE 3 // draw #000021 blue instead of a graphic #define BK_HIDE2 4 // identical to BK_HIDE #define BK_FASTLEFT 5 // fast scroll left, items falling left (ironhead battle) #define BK_FASTLEFT_LAYERS 6 // fast scroll left w/ layers, items falling left (Outer Wall) #define BK_FASTLEFT_LAYERS_NOFALLLEFT 7 // fast left w/ layers, but items don't fall left (Balcony) #define BK_HIDE3 8 // identical to BK_HIDE #define MAX_TILES 256 // max # of different kinds of tiles per tileset // these flag constants come from the stage data somewhere I believe // (don't remember for sure) so they should stay constant. #define TA_SOLID_PLAYER 0x00001 // solid to player #define TA_SOLID_NPC 0x00002 // solid to npc's, enemies and enemy shots #define TA_SOLID_SHOT 0x00004 // solid to player's shots #define TA_SOLID (TA_SOLID_PLAYER | TA_SOLID_SHOT | TA_SOLID_NPC) #define TA_HURTS_PLAYER 0x00010 // this tile hurts the player -10hp #define TA_FOREGROUND 0x00020 // tile is drawn in front of sprites #define TA_DESTROYABLE 0x00040 // tile is destroyable if player shoots it #define TA_WATER 0x00080 // tile is water/underwater #define TA_CURRENT 0x00100 // blows player (tilecode checked to see which direction) #define TA_SLOPE 0x00200 // is a slope (the tilecode is checked to see what kind) extern uint8_t tilecode[MAX_TILES]; extern uint32_t tileattr[MAX_TILES]; extern uint32_t tilekey[256]; extern Object *ID2Lookup[65536]; void AnimateMotionTiles(void); void map_ChangeTileWithSmoke(int x, int y, int newtile, int nclouds=4, bool boomflash=false, Object *push_behind=NULL); // map names and info from stage.dat #include "maprecord.h" // backdrop and tileset names #include "stagedata.h" // needed if resolution is changed to a non-multiple of the tile size #if (((SCREEN_WIDTH / TILE_W) * TILE_W) != SCREEN_WIDTH) #define MAP_DRAW_EXTRA_X 1 #else #define MAP_DRAW_EXTRA_X 0 #endif #if (((SCREEN_HEIGHT / TILE_H) * TILE_H) != SCREEN_HEIGHT) #define MAP_DRAW_EXTRA_Y 1 #else #define MAP_DRAW_EXTRA_Y 0 #endif #endif ================================================ FILE: map_system.cpp ================================================ // the Map System #include "nx.h" #include "map_system.h" #include "map_system.fdh" #define MS_EXPANDING 0 #define MS_DISPLAYED 1 #define MS_CONTRACTING 2 // # of frames in the expand/contract animation #define EXPAND_LENGTH 8 #define BANNER_TOP 7 #define BANNER_BTM 23 static struct { NXSurface *sfc; // surface for the map image int x, y; // the position of the upper-left corner of the image int w, h; // size of image int expandframe; // for expand/contract effect int current_row; // scan down effect int px, py; // the position of the you-are-here dot int timer; // for the flashing int state; // expanding, displayed, contracting int return_gm; // game mode to return to const char *bannertext; int textx, texty; bool lastbuttondown; } ms; bool ms_init(int return_to_mode) { memset(&ms, 0, sizeof(ms)); ms.return_gm = return_to_mode; ms.lastbuttondown = true; ms.w = map.xsize; ms.h = map.ysize; // create the surface ms.sfc = new NXSurface(ms.w, ms.h); ms.sfc->FillRect(0, 0, ms.w, ms.h, DK_BLUE); ms.x = (SCREEN_WIDTH / 2) - (ms.w / 2); ms.y = (SCREEN_HEIGHT / 2) - (ms.h / 2); // where will we put the dot? ms.px = ms.x + ((player->x >> CSF) / TILE_W); ms.py = ms.y + ((player->y >> CSF) / TILE_H); ms.bannertext = stages[game.curmap].stagename; ms.textx = (SCREEN_WIDTH / 2) - (GetFontWidth(ms.bannertext, 0) / 2); ms.texty = BANNER_TOP+3; return 0; } void ms_close(void) { memset(inputs, 0, sizeof(inputs)); delete ms.sfc; } /* void c------------------------------() {} */ void ms_tick(void) { DrawScene(); draw_banner(); if (ms.state == MS_EXPANDING) { ms.expandframe++; if (ms.expandframe > EXPAND_LENGTH) ms.state = MS_DISPLAYED; else draw_expand(); } if (ms.state == MS_DISPLAYED) { // scan down effect if (ms.current_row < map.ysize) { draw_row(ms.current_row++); if (ms.current_row < map.ysize) draw_row(ms.current_row++); } // draw map DrawRect(ms.x - 1, ms.y - 1, ms.x + ms.w, ms.y + ms.h, DK_BLUE); DrawSurface(ms.sfc, ms.x, ms.y); // you-are-here dot if (++ms.timer & 8) draw_sprite(ms.px, ms.py, SPR_MAP_PIXELS, 4); // dismissal if (ms.lastbuttondown) { if (!buttondown()) ms.lastbuttondown = false; } else if (buttondown()) { ms.state = MS_CONTRACTING; } } else if (ms.state == MS_CONTRACTING) { ms.expandframe--; if (ms.expandframe <= 0) { int param = (ms.return_gm == GM_INVENTORY) ? 1 : 0; game.setmode(ms.return_gm, param); } else { draw_expand(); } } } // expand/contract effect static void draw_expand(void) { int x1, y1, x2, y2; int wd = (map.xsize * ms.expandframe) / EXPAND_LENGTH; int ht = (map.ysize * ms.expandframe) / EXPAND_LENGTH; x1 = (SCREEN_WIDTH / 2) - (wd / 2); y1 = (SCREEN_HEIGHT / 2) - (ht / 2); x2 = (SCREEN_WIDTH / 2) + (wd / 2); y2 = (SCREEN_HEIGHT / 2) + (ht / 2); FillRect(x1, y1, x2, y2, DK_BLUE); } static void draw_banner(void) { FillRect(0, BANNER_TOP, SCREEN_WIDTH, BANNER_BTM, NXColor(0, 0, 0)); font_draw(ms.textx, ms.texty, ms.bannertext, 0); } /* void c------------------------------() {} */ // draw the specified row of map onto the spritesheet // the colors for the map system are not actually plotted as pixels, // but exist as 1x1 sprites on the TextBox spritesheet. static void draw_row(int y) { int x; Graphics::SetDrawTarget(ms.sfc); for(x=0;x #include #include "niku.fdh" /* 290.rec contains the tick value 4 times, followed by the 4 byte key to decrypt each instance, for a total of 20 bytes. */ // load the contents of 290.rec and store in value_out. Returns 0 on success. // If there is no such file or an error occurs, writes 0 to value_out. bool niku_load(uint32_t *value_out) { FILE *fp; uint8_t buffer[20]; uint32_t *result = (uint32_t *)buffer; int i, j; const char *fname = getfname(); fp = fileopen(fname, "rb"); if (!fp) { stat("niku_load: couldn't open file '%s'", fname); if (value_out) *value_out = 0; return 1; } fread(buffer, 20, 1, fp); fclose(fp); for(i=0;i<4;i++) { uint8_t key = buffer[i+16]; j = i * 4; buffer[j] -= key; buffer[j+1] -= key; buffer[j+2] -= key; buffer[j+3] -= (key / 2); } if ((result[0] != result[1]) || \ (result[0] != result[2]) || \ (result[0] != result[3])) { stat("niku_load: value mismatch; '%s' corrupt", fname); if (value_out) *value_out = 0; } else { stat("niku_load: loaded value 0x%x from %s", *result, fname); if (value_out) *value_out = *result; } return 0; } // save the timestamp in value to 290.rec. bool niku_save(uint32_t value) { uint8_t buf_byte[20]; uint32_t *buf_dword = (uint32_t *)buf_byte; // place values buf_dword[0] = value; buf_dword[1] = value; buf_dword[2] = value; buf_dword[3] = value; // generate keys buf_byte[16] = random(0, 255); buf_byte[17] = random(0, 255); buf_byte[18] = random(0, 255); buf_byte[19] = random(0, 255); // encode each copy for(int i=0;i<4;i++) { uint8_t *ptr = (uint8_t *)&buf_dword[i]; uint8_t key = buf_byte[i+16]; ptr[0] += key; ptr[1] += key; ptr[2] += key; ptr[3] += key / 2; } const char *fname = getfname(); FILE *fp = fileopen(fname, "wb"); if (!fp) { staterr("niku_save: failed to open '%s'", fname); return 1; } fwrite(buf_byte, 20, 1, fp); fclose(fp); stat("niku_save: wrote value 0x%08x", value); return 0; } /* void c------------------------------() {} */ static const char *getfname() { // might do stuff with sprintf here to place it in other subdirectories, etc. // is just here for expansion. return "290.rec"; } ================================================ FILE: niku.fdh ================================================ //hash:1da713cd //automatically generated by Makegen /* located in platform.cpp */ //---------------------[referenced from niku.cpp]--------------------// FILE *fileopen(const char *fname, const char *mode); /* located in niku.cpp */ //---------------------[referenced from niku.cpp]--------------------// bool niku_load(uint32_t *value_out); bool niku_save(uint32_t value); static const char *getfname(); /* located in common/stat.cpp */ //---------------------[referenced from niku.cpp]--------------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //---------------------[referenced from niku.cpp]--------------------// int random(int min, int max); ================================================ FILE: nx.h ================================================ #ifndef _NX_H #define _NX_H #include #include #include //#include //#include #include "config.h" #include "common/basics.h" #include "common/BList.h" #include "common/StringList.h" #include "common/DBuffer.h" #include "common/DString.h" #include "common/InitList.h" #include "graphics/graphics.h" #include "graphics/tileset.h" #include "graphics/sprites.h" typedef SIFPoint Point; using namespace Graphics; using Sprites::draw_sprite; using Sprites::draw_sprite_at_dp; using Sprites::draw_sprite_clipped; using Sprites::draw_sprite_clip_width; using Sprites::draw_sprite_chopped; using Sprites::draw_sprite_repeating_x; using Sprites::create_spritesheet; using Sprites::get_spritesheet; using Tileset::draw_tile; #define CSF 9 class Object; // don't use this, use fileopen() instead. // some platforms are retarded and need special workarounds (read: WinCE) #pragma GCC poison fopen FILE *fileopen(const char *fname, const char *mode); #include "trig.h" #include "autogen/sprites.h" #include "dirnames.h" #include "TextBox/TextBox.h" #include "graphics/font.h" #include "input.h" #include "tsc.h" #include "stageboss.h" #include "ai/ai.h" #include "map.h" #include "statusbar.h" #include "floattext.h" #include "object.h" #include "ObjManager.h" #include "console.h" #include "debug.h" #include "game.h" #include "caret.h" #include "screeneffect.h" #include "settings.h" #include "slope.h" #include "player.h" #include "p_arms.h" #include "replay.h" #include "platform.h" #include "sound/sound.h" const char *strhex(int value); #ifdef __HAIKU__ char *getHaikuSettingsPath(); #endif #endif ================================================ FILE: nx.rc ================================================ IDI_ICON1 ICON DISCARDABLE "nx.ico" ================================================ FILE: nx_icon.h ================================================ /* GIMP RGBA C-Source image dump (nx_icon.h) */ static const struct { unsigned int width; unsigned int height; unsigned int bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */ unsigned char pixel_data[32 * 32 * 4 + 1]; } WINDOW_TITLE_ICON = { 32, 32, 4, "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\337\377\377\377\337\377\377\377" "\337\377\377\377\337\377\377\377\337\377\377\377\337\377\377\377\337\377" "\377\377\337\377\377\377\337\377\377\377\337\377\377\377\337\377\377\377" "\337\377\377\377\337\377\377\377\337\377\377\377\337\377\377\377\337\377" "\377\377\337\377\377\377\337\377\377\377\337\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\373\360\351\300\240\200\377\340\240@\377\340\300@\377\340\300" "@\377\340\300@\377\340\300@\377\340\300@\377\340\300@\377\340\300@\377\340" "\300@\377\340\300@\377\340\300@\377\340\300@\377\340\300@\377\340\340@\377" "\377\377\377\377\377\377\377\377\377\377\377\337\377\377\377\337\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\337" "\377\373\360\351\300\334\300\373\300\200@\377\300\200@\377\340\300\0\377" "\340\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340" "\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300" "\0\377\340\300@\377\377\373\360\377\377\373\360\377\377\377\377\377\377\377" "\377\337\377\377\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\373\360\351\300\240\200\377\300\200@\377\300\200@\377\300\200@\377" "\300\200@\377\300\200@\377\300\200@\377\340\240\0\377\340\300\0\377\340\300" "\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300\0" "\377\340\300\0\377\340\300\0\377\340\300\0\377\340\340\200\377\377\377\377" "\377\377\377\377\377\377\377\377\337\377\377\377\337\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\337\377\373\360\351\377\373" "\360\351\377\377\377\337\377\373\360\351\300\200@\377\300\200@\377\300\200" "@\377\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300\240@\377\340" "\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300" "\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300@\377" "\377\373\360\377\377\377\377\377\377\377\377\377\377\377\377\337\377\377" "\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\337\300\340" "@\377\240\340\0\377\377\373\360\377\377\373\360\377\300\200@\377\300\200" "@\377\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300" "\200@\377\300\200@\377\340\240\0\377\340\300\0\377\340\300\0\377\340\300" "\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\300\0" "\377\340\300\0\377\340\300\0\377\340\340\200\377\377\377\377\377\377\377" "\377\377\377\377\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\337\240\340@\377\240\340\0\377\377\373\360\377\377\373\360\377\300\200" "@\377\300\200@\377\300\240\200\377\240\200@\377\240`@\377\240`@\377\240`" "@\377\300\200@\377\300\240\200\377\340\300@\377\340\340@\377\340\300@\377" "\340\300@\377\300\300@\377\300\300@\377\340\300\0\377\340\300\0\377\340\300" "\0\377\340\300\0\377\340\300\0\377\340\340\200\377\377\377\377\377\377\377" "\377\377\377\377\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\337\200\240@\377`\240@\377\377\373\360\377\377\373\360\377\300\200@" "\377\240\200@\377\200\300\300\377`\200\200\377@\40@\377@\40@\377\40\0@\377" "\240\240\244\377\377\377\377\377\377\373\360\377\377\373\360\377\377\377" "\377\377\377\373\360\377\200\300\300\377\200\300\300\377\340\300\0\377\340" "\300\0\377\340\300\0\377\340\300\0\377\340\300\0\377\340\340\200\377\377" "\377\377\377\377\377\377\377\377\377\377\337\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\337\240\300\200\377\240\300\200\377\300\334\300" "\377\300\300\300\377\300\200@\377\300\240\200\377\300\334\300\377\200\240" "\300\377\40\0\200\377`@\200\377\200`\200\377\300\300\300\377\377\373\360" "\377\377\373\360\377\377\373\360\377\377\373\360\377\377\373\360\377\246" "\312\360\377\240\300\300\377\240\200\200\377\240\200@\377\300\300@\377\300" "\300@\377\340\300\0\377\340\300@\377\300\334\300\377\377\373\360\377\377" "\377\377\337\377\377\377\337\377\377\377\337\377\377\377\0\377\377\377\0" "\377\377\377\0\377\373\360\351`\240@\377`\240@\377\300\200@\377\340\240\200" "\377\377\373\360\377\246\312\360\377\0\0\377\377\200\200\300\377\377\377" "\377\377\377\373\360\377\377\373\360\377\377\373\360\377\377\373\360\377" "\377\373\360\377\377\373\360\377\377\373\360\377\377\373\360\377\0\0\377" "\377\0\0\377\377`\300\300\377\240\300\200\377\340\300\0\377\300\300\0\377" "\240\240\0\377\300\300\200\377\377\377\377\377\377\377\377\377\377\377\377" "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\373\360\351\200\300\200" "\377`\240@\377\300\200@\377\340\240\200\377\377\373\360\377\246\312\360\377" "\0\0\377\377\200\200\300\377\377\373\360\377\377\373\360\377\377\373\360" "\377\377\373\360\377\377\373\360\377\377\373\360\377\377\373\360\377\377" "\373\360\377\377\373\360\377\0\0\377\377\0\0\377\377\246\312\360\377\300" "\334\300\377\240\300@\377\300\300@\377\300\300\200\377\300\300\200\377\340" "\340\200\377\377\373\360\377\377\377\377\377\377\377\377\0\377\377\377\0" "\377\377\377\0\377\373\360\351`\300\200\377`\300\200\377\300\200@\377\340" "\240\200\377\377\373\360\377\246\312\360\377\0\0\377\377``\300\377\377\373" "\360\377\377\373\360\377\377\373\360\377\377\373\360\377\377\373\360\377" "\377\373\360\377\377\373\360\377\377\373\360\377\377\373\360\377\0\0\377" "\377\0\0\377\377\377\377\377\377\300\334\300\377@\300\200\377\240\300\300" "\377\377\377\377\377\300\300\200\377\200\200\0\377\340\340\200\377\377\377" "\377\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\337\300\334" "\300\373\300\334\300\373\300\200@\377\300\240\200\377\377\373\360\377\377" "\373\360\377\200\200\300\377\246\312\360\377\377\373\360\377\377\373\360" "\377\377\373\360\377\377\373\360\377\377\373\360\377\377\373\360\377\377" "\373\360\377\377\373\360\377\377\373\360\377\246\312\360\377\240\240\300" "\377\340\300\200\377\340\300\200\377\300\334\300\377\300\334\300\377\377" "\377\377\377\300\334\300\377\340\340\200\377\377\373\360\377\377\377\377" "\377\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\373\360\351\300\200@\377\300\240\200\377\377\377\377\377\377\377\377" "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" "\377\377\377\377\373\360\377\377\373\360\377\377\373\360\377\377\377\377" "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\373\360\377\300" "\200@\377\340\240\200\377\377\377\377\377\377\377\377\377\377\377\377\377" "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\373\360" "\351\300\200@\377\300\200@\377\340\240\200\377\340\240\200\377\340\240\200" "\377\340\240\200\377\340\240\200\377\340\240\200\377\340\240\200\377\300" "\300\300\377\240\300\300\377\300\300\200\377\340\240\200\377\340\240\200" "\377\340\240\200\377\340\240\200\377\340\240\200\377\300\200@\377\340\240" "\200\377\377\377\377\377\377\377\377\377\377\377\377\337\377\377\377\337" "\377\377\377\337\377\377\377\337\377\377\377\337\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\373\360\351\300\200@\377" "\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300\200" "@\377\300\200@\377\300\200@\377\200\240\200\377\200\300\300\377\240\200@" "\377\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300" "\200@\377\340\240\200\377\377\377\377\377\377\377\377\377\377\377\377\337" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\373\360\351\300" "\200@\377\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300\200@\377" "\300\200@\377\340\300\200\377\377\373\360\377\340\200\200\377\300`@\377\240" "\240\244\377\240\240\244\377\300\200@\377\300\200@\377\300\200@\377\300\200" "@\377\300\200@\377\340\240\200\377\377\377\377\377\377\377\377\377\377\377" "\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\373\360" "\351\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300\200@\377\300" "\200@\377\300\200@\377\300\300\300\377\377\377\377\377\340\200\200\377\340" "@@\377\240\240\244\377\200\300\300\377\300\200@\377\300\200@\377\300\200" "@\377\300\200@\377\300\200@\377\340\240\200\377\377\377\377\377\377\377\377" "\377\377\377\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\373\360\351\300\200@\377\300\240@\377\377\373\360\377\300\300\300\377" "\300\200@\377\340\240\200\377\377\373\360\377\340\240\200\377\340`@\377\340" "@@\377\340@@\377\340@@\377\300`@\377\300\200@\377\300\200@\377\300\200@\377" "\300\200@\377\300\200@\377\340\240\200\377\377\377\377\377\377\377\377\377" "\377\377\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\373\360\351\300\240@\377\340\240\200\377\377\377\377\377\300\334\300\377" "\300\200@\377\340\300\200\377\377\377\377\377\340\240\200\377\340@@\377\340" "`@\377\340`@\377\340`@\377\340`@\377\300\200@\377\300\240@\377\300\240@\377" "\300\240@\377\300\200@\377\340\240\200\377\377\377\377\377\377\377\377\377" "\377\377\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\337\377\373\360\351\377\373\360\351\377\377\377\337\377\377\377" "\337\377\373\360\351\377\373\360\351\377\373\360\377\300\334\300\377\200" "\240\300\377\300\334\300\377\377\373\360\377\377\373\360\377\377\373\360" "\377\377\373\360\377\377\373\360\377\377\373\360\351\377\373\360\351\377" "\373\360\351\377\373\360\351\377\377\377\337\377\377\377\337\377\377\377" "\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\337\377\373\360\377\300\334\300\377\240\300\300\377\300\334\300" "\377\300\334\300\377\300\334\300\377\300\334\300\377\377\377\377\377\377" "\377\377\377\377\377\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\337\377\373\360\377\377\373\360" "\377\377\377\377\377\300`\200\377\240\40@\377\240\40@\377\240@@\377\377\373" "\360\377\377\373\360\377\377\377\377\337\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\337\377\373\360\377" "\377\373\360\377\300\300\300\377\300@\200\377\240\40@\377\240\40@\377\240" "\40@\377\377\373\360\377\377\377\377\377\377\377\377\337\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\337\377\377\377\337" "\377\377\377\377\300\200\200\377\240\0@\377\240\40@\377\240\40@\377\240\40" "@\377\240\40@\377\377\373\360\377\377\377\377\377\377\377\377\337\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\337\377" "\373\360\377\340\240\300\377\300`\200\377\240\40@\377\240\40@\377\240\40" "@\377\300`\200\377\300\200\200\377\377\373\360\377\377\377\377\377\377\377" "\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\337\340\240\300\377\240\0@\377\240\40@\377\240\40@\377\240\40@\377" "\240\40@\377\377\373\360\377\377\377\377\377\377\377\377\377\377\377\377" "\377\377\377\377\337\377\377\377\337\377\377\377\337\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\337\240\240\244\377`\40@\377`\40@\377`\40@\377`\40" "@\377`\40@\377\240\200\200\377\240\240\244\377\240\240\244\377\240\240\244" "\377\377\373\360\377\377\377\377\377\377\377\377\337\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\337\240\240\244\377\40\0@\377@\40@\377@\40@\377@\40" "@\377@\40@\377\40\0@\377\40\0@\377\40\0@\377@\40@\377\377\373\360\377\377" "\377\377\377\377\377\377\337\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\337" "\300\334\300\377\300\240\300\377\300\240\300\377\300\240\300\377\300\240" "\300\377\300\240\300\377\300\240\300\377\300\240\300\377\300\240\300\377" "\300\300\300\377\377\377\377\377\377\377\377\377\377\377\377\337\377\377" "\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0" "\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377" "\377\377\0\377\377\377\0\377\377\377\337\377\377\377\377\377\377\377\377" "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" "\377\377\377\377\377\377\377\337\377\377\377\0\377\377\377\0\377\377\377" "\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0\377\377\377\0", }; ================================================ FILE: object.cpp ================================================ #include "nx.h" #include "common/llist.h" #include "object.fdh" // deletes the specified object, or well, marks it to be deleted. // it's not actually freed till the end of the tick. void Object::Delete() { Object * const &o = this; if (o->deleted) return; // make sure no pointers are pointing at us DisconnectGamePointers(); // show any damage waiting to be added NOW instead of later if (o->DamageWaiting > 0) { DamageText->AddQty(o->DamageWaiting); o->DamageWaiting = 0; } // set it's id1 flag, required for some scripts game.flags[o->id1] = true; // mark it for deletion at end of loop // (can't delete now as it may invalidate pointers--we don't know where we were called from) o->deleted = true; } void Object::Destroy() { Object * const &o = this; // make sure no pointers are pointing at us DisconnectGamePointers(); // delete associated floaty text as soon as it's animation is done DamageText->ObjectDestroyed = true; // if any objects are linked to this obj then unlink them Object *link; for(link = firstobject; link; link = link->next) { if (link->linkedobject == o) link->linkedobject = NULL; } // remove from list and free LL_REMOVE(o, prev, next, firstobject, lastobject); LL_REMOVE(o, lower, higher, lowestobject, highestobject); if (o == player) player = NULL; delete o; } // checks all the games pointers that point to an object // record and disconnects them if they are pointing at object o. // used in preparation to delete the object. // protects against dangling pointers. void Object::DisconnectGamePointers() { Object * const &o = this; if (o == player->riding) player->riding = NULL; if (o == player->lastriding) player->lastriding = NULL; if (o == player->cannotride) player->cannotride = NULL; if (o == game.bossbar.object) game.bossbar.object = NULL; // any enemy with a boss bar if (o == game.stageboss.object) game.stageboss.object = NULL; // the stage boss if (o == map.focus.target) map.focus.target = NULL; if (o == ID2Lookup[this->id2]) ID2Lookup[this->id2] = NULL; if (o == map.waterlevelobject) map.waterlevelobject = NULL; } /* void c------------------------------() {} */ void Object::SetType(int type) { Object * const &o = this; o->type = type; o->sprite = objprop[type].sprite; o->hp = objprop[type].initial_hp; o->damage = objprop[o->type].damage; o->frame = 0; // apply nxflags to new object type! // (did this so toroko would handle slopes properly in Gard cutscene) o->nxflags = objprop[type].defaultnxflags; // apply defaultflags to new object type, but NOT ALL defaultflags. // otherwise flags & flags_to_keep); o->flags = (objprop[type].defaultflags & ~flags_to_keep) | keep; //stat("new flags: %04x", o->flags); // setup default clipping extents, in case object turns on clip_enable if (!o->clip_enable) o->ResetClip(); } void Object::ChangeType(int type) { Object * const &o = this; int oldsprite = o->sprite; o->state = 0; o->substate = 0; o->frame = 0; o->timer = 0; o->timer2 = 0; o->animtimer = 0; SetType(type); // adjust position so spawn points of old object and new object line up o->x >>= CSF; o->x <<= CSF; o->y >>= CSF; o->y <<= CSF; o->x += (sprites[oldsprite].spawn_point.x << CSF); o->y += (sprites[oldsprite].spawn_point.y << CSF); o->x -= (sprites[this->sprite].spawn_point.x << CSF); o->y -= (sprites[this->sprite].spawn_point.y << CSF); // added this for when you pick up the puppy in the Deserted House in SZ-- // makes objects x >> CSF); int yoff = (this->y >> CSF); for(int i=0;i= 0 && y >= 0 && x < map.xsize && y < map.ysize) { tileno = map.tiles[x][y]; attr |= tileattr[tileno]; } } // also go underwater if we go under the variable waterlevel in Almond if (map.waterlevelobject && (this->y + (2< map.waterlevelobject->y) { attr |= TA_WATER; } if (tile) *tile = tileno; return attr; } // for each point in pointlist, treats the point as a CSF'ed offset // within the object's sprite. The tile under each position is checked // to see if it's attributes contain one or more of the attributes // specified in attrmask. // // If any of the points match, returns 1, and optionally returns // the map coordinates of the first matched tile in tile_x/y. bool Object::CheckAttribute(const Point *pointlist, int npoints, uint32_t attrmask, int *tile_x, int *tile_y) { int x, y, xoff, yoff; xoff = (this->x >> CSF); yoff = (this->y >> CSF); for(int i=0;i= 0 && y >= 0 && x < map.xsize && y < map.ysize) { if ((tileattr[map.tiles[x][y]] & attrmask) != 0) { if (tile_x) *tile_x = x; if (tile_y) *tile_y = y; return true; } } } return false; } // treats each point in pointlist as an offset within the object, and returns // true if any of the points intersect with object o2's solidbox. bool Object::CheckSolidIntersect(Object *other, const Point *pointlist, int npoints) { int x, y; int ox, oy, o2x, o2y; SIFSprite *s2 = other->Sprite(); ox = (this->x >> CSF); oy = (this->y >> CSF); o2x = (other->x >> CSF); o2y = (other->y >> CSF); for(int i=0;i= (o2x + s2->solidbox.x1) && x <= (o2x + s2->solidbox.x2)) { if (y >= (o2y + s2->solidbox.y1) && y <= (o2y + s2->solidbox.y2)) { return true; } } } return false; } // update the blocked states of object o. // updatemask specifies which states are in need of updating. void Object::UpdateBlockStates(uint8_t updatemask) { Object * const &o = this; SIFSprite *sprite = Sprite(); int mask = GetBlockingType(); if (updatemask & LEFTMASK) { o->blockl = CheckAttribute(&sprite->block_l, mask); // for objects which don't follow slope, have them see the slope as a wall so they // won't just go right through it (looks really weird) if (!(o->nxflags & NXFLAG_FOLLOW_SLOPE)) { if (!o->blockl) o->blockl = IsSlopeAtPointList(o, &sprite->block_l); } } if (updatemask & RIGHTMASK) { o->blockr = CheckAttribute(&sprite->block_r, mask); // for objects which don't follow slope, have them see the slope as a wall so they // won't just go right through it (looks really weird). if (!(o->nxflags & NXFLAG_FOLLOW_SLOPE)) { if (!o->blockr) o->blockr = IsSlopeAtPointList(o, &sprite->block_r); } } if (updatemask & UPMASK) { o->blocku = CheckAttribute(&sprite->block_u, mask); if (!o->blocku) o->blocku = CheckBoppedHeadOnSlope(o) ? 1 : 0; } if (updatemask & DOWNMASK) { o->blockd = CheckAttribute(&sprite->block_d, mask); if (!o->blockd) o->blockd = CheckStandOnSlope(o) ? 1 : 0; } // have player be blocked by objects with FLAG_SOLID_BRICK set if (o == player) o->SetBlockForSolidBrick(updatemask); } // called from UpdateBlockedStates used w/ player. // sets the object's block/l/r/u/d flags if it is in contact with a SOLID_BRICK object. void Object::SetBlockForSolidBrick(uint8_t updatemask) { SIFSprite *thissprite = this->Sprite(); Object *o; // no need to check blockpoints that are already set if (this->blockl) updatemask &= ~LEFTMASK; if (this->blockr) updatemask &= ~RIGHTMASK; if (this->blocku) updatemask &= ~UPMASK; if (this->blockd) updatemask &= ~DOWNMASK; FOREACH_OBJECT(o) { if (!(o->flags & FLAG_SOLID_BRICK)) continue; if (updatemask & LEFTMASK) { if (this->CheckSolidIntersect(o, &thissprite->block_l)) { this->blockl = BLOCKED_OBJECT; // value of 2 instead of 1 updatemask &= ~LEFTMASK; // no need to keep checking } } if (updatemask & RIGHTMASK) { if (this->CheckSolidIntersect(o, &thissprite->block_r)) { this->blockr = BLOCKED_OBJECT; updatemask &= ~RIGHTMASK; } } if (updatemask & UPMASK) { if (this->CheckSolidIntersect(o, &thissprite->block_u)) { this->blocku = BLOCKED_OBJECT; updatemask &= ~UPMASK; if (this == player) player->bopped_object = o; } } if (updatemask & DOWNMASK) { if (this->CheckSolidIntersect(o, &thissprite->block_d)) { this->blockd = BLOCKED_OBJECT; updatemask &= ~DOWNMASK; if (this == player) player->riding = o; } } } } /* void c------------------------------() {} */ // given an object, returns which tile attribute affects it's blocked state. int Object::GetBlockingType() { Object * const &o = this; if (o == player) return TA_SOLID_PLAYER; if (o->type >= OBJ_SHOTS_START && \ o->type <= OBJ_SHOTS_END) { // Bubbler L1 can't pass tile 44. if (o->type == OBJ_BUBBLER12_SHOT && o->shot.level == 0) return (TA_SOLID_SHOT | TA_SOLID_NPC); return TA_SOLID_SHOT; } if (o->flags & FLAG_IGNORETILE44) return TA_SOLID_PLAYER; return TA_SOLID_NPC; } /* void c------------------------------() {} */ // tries to move the object in the X direction by the given amount. // returns nonzero if the object was blocked. bool Object::apply_xinertia(int inertia) { Object * const &o = this; if (inertia == 0) return 0; if (o->flags & FLAG_IGNORE_SOLID) { o->x += inertia; return 0; } // only apply inertia one pixel at a time so we have // proper hit detection--prevents objects traveling at // high speed from becoming embedded in walls if (inertia > 0) { while(inertia > (1<UpdateBlockStates(RIGHTMASK); } } else if (inertia < 0) { while(inertia < -(1<UpdateBlockStates(LEFTMASK); } } // apply any remaining inertia if (inertia) movehandleslope(o, inertia); return 0; } // tries to move the object in the Y direction by the given amount. // returns nonzero if the object was blocked. bool Object::apply_yinertia(int inertia) { Object * const &o = this; if (inertia == 0) return 0; if (o->flags & FLAG_IGNORE_SOLID) { o->y += inertia; return 0; } // only apply inertia one pixel at a time so we have // proper hit detection--prevents objects traveling at // high speed from becoming embedded in walls if (inertia > 0) { if (o->blockd) return 1; while(inertia > (1<y += (1<UpdateBlockStates(DOWNMASK); if (o->blockd) return 1; } } else if (inertia < 0) { if (o->blocku) return 1; while(inertia < -(1<y -= (1<UpdateBlockStates(UPMASK); if (o->blocku) return 1; } } // apply any remaining inertia if (inertia) o->y += inertia; return 0; } // handles a moving object with "FLAG_SOLID_BRICK" set // pushing the player as it moves. void Object::PushPlayerOutOfWay(int xinertia, int yinertia) { Object * const &o = this; if (xinertia) { // give a bit of a gap where they must be--i.e. don't push them if they're right // at the top or the bottom of the brick: needed when he rides it and falls off, then it // turns around and touches him again. in that case what we actually want to do is push him // to the top, not push him side-to-side. if ((player->SolidBottom() - (2< o->SolidTop() &&\ (player->SolidTop() + (2<SolidBottom()) { if (xinertia > 0 && player->SolidRight() > o->SolidRight() && solidhitdetect(o, player)) { // pushing player right if (player->blockr) { // squish! hurtplayer(o->smushdamage); } else { // align player's blockl grid with our right side player->x = o->SolidRight() - (sprites[player->sprite].block_l[0].x << CSF); // get player a xinertia equal to our own. You can see this // with the moving blocks in Labyrinth H. player->xinertia = xinertia; player->x += -player->xinertia; } } else if (xinertia < 0 && player->SolidLeft() < o->SolidLeft() && solidhitdetect(o, player)) { // pushing player left if (player->blockl) { // squish! hurtplayer(o->smushdamage); } else { // align player's blockr grid with our left side player->x = o->SolidLeft() - (sprites[player->sprite].block_r[0].x << CSF); // get player a xinertia equal to our own. You can see this // with the moving blocks in Labyrinth H. player->xinertia = xinertia; player->x += -player->xinertia; } } } } if (yinertia < 0) { if (player->blocku && player->riding == o) // smushed into ceiling! hurtplayer(o->smushdamage); } else if (yinertia > 0) // object heading downwards? { // player riding object down if (player->riding == o) { if (player->yinertia >= 0) // don't do this if he's trying to jump away { // align player's blockd grid with our top side so player // doesn't perpetually fall. player->y = o->SolidTop() - (sprites[player->sprite].block_d[0].y << CSF); } } else if (player->Top() >= o->CenterY() && solidhitdetect(o, player)) // underneath object { // push him down if he's underneath us and we're going faster than he is. if (yinertia >= player->yinertia) { if (player->blockd) // squished into floor! hurtplayer(o->smushdamage); // align his blocku grid with our bottom side player->y = o->SolidBottom() - (sprites[player->sprite].block_u[0].y << CSF); } } } } // snap the object down to the nearest solid tile. // the object must have at least one blockd point for this to work. void Object::SnapToGround() { Object * const &o = this; uint32_t flags = o->flags; o->flags &= ~FLAG_IGNORE_SOLID; UpdateBlockStates(DOWNMASK); apply_yinertia(SCREEN_HEIGHT << CSF); o->flags = flags; o->blockd = true; } /* void c------------------------------() {} */ // deals the specified amount of damage to the object, // and kills it if it's hitpoints reach 0. // // It is valid to deal 0 damage. The trails of the Spur do this // to keep the enemy shaking and making noise for as long as // it's in the beam. // // shot is an optional parameter specifying a pointer to // the shot that hit the object, and is used to spawn // blood spatter at the correct location. void Object::DealDamage(int dmg, Object *shot) { Object * const &o = this; if (o->flags & FLAG_INVULNERABLE) return; o->hp -= dmg; if (o->flags & FLAG_SHOW_FLOATTEXT) o->DamageWaiting += dmg; if (o->hp > 0) { if (o->shaketime < objprop[o->type].shaketime - 2) { o->shaketime = objprop[o->type].shaketime; if (objprop[o->type].hurt_sound) sound(objprop[o->type].hurt_sound); if (shot) effect(shot->CenterX(), shot->CenterY(), EFFECT_BLOODSPLATTER); } } else { o->Kill(); } } // kills the specified object, performing whatever action is // applicable to that, such as spawning powerups or running scripts. void Object::Kill() { Object * const &o = this; o->hp = 0; o->flags &= ~FLAG_SHOOTABLE; // auto disappear the bossbar if we have just killed a boss if (o == game.bossbar.object) game.bossbar.defeated = true; // if a script is set to run on death, run it instead of the usual explosion if (o->flags & FLAG_SCRIPTONDEATH) { o->OnDeath(); StartScript(o->id2); } else { // should spawn the smokeclouds first, for z-order reasons SmokeClouds(o, objprop[o->type].death_smoke_amt, 8, 8); effect(o->CenterX(), o->CenterY(), EFFECT_BOOMFLASH); if (objprop[o->type].death_sound) sound(objprop[o->type].death_sound); if (objprop[o->type].ai_routines.ondeath) { o->OnDeath(); } else { SpawnPowerups(); o->Delete(); } } } // spawn the powerups you get when you kill an enemy void Object::SpawnPowerups() { Object * const &o = this; int objectType, bonusType; if (!objprop[o->type].xponkill) return; bonusType = random(1, 5); if (bonusType >= 3) { SpawnXP(objprop[o->type].xponkill); return; } if (bonusType == 2 && \ (player->weapons[WPN_MISSILE].hasWeapon || \ player->weapons[WPN_SUPER_MISSILE].hasWeapon)) { objectType = OBJ_MISSILE; } else { objectType = OBJ_HEART; } // upgrade to big 3-cluster versions of powerups // for big enemies. if (objprop[o->type].xponkill > 6) { if (objectType == OBJ_HEART) { objectType = OBJ_HEART3; } else { objectType = OBJ_MISSILE3; } } // create the powerup Object *powerup = CreateObject(o->CenterX(), o->CenterY(), objectType); powerup->x -= (powerup->Width() / 2); powerup->y -= (powerup->Height() / 2); powerup->state = 1; // make it animate } // spawn the given quantity of XP at the center of the object. // amt indicates the total number of XP points to spawn. // these will be collated into the appropriate sizes of XP triangles. void Object::SpawnXP(int amt) { Object * const &o = this; int x = o->CenterX(); int y = o->CenterY(); while(amt > 0) { Object *xp = CreateObject(x, y, OBJ_XP); xp->xinertia = random(-0x200, 0x200); if (amt >= XP_LARGE_AMT) { xp->sprite = SPR_XP_LARGE; amt -= XP_LARGE_AMT; } else if (amt >= XP_MED_AMT) { xp->sprite = SPR_XP_MED; amt -= XP_MED_AMT; } else { xp->sprite = SPR_XP_SMALL; amt -= XP_SMALL_AMT; } // center the sprite at the center of the object xp->x -= (xp->Width() / 2); xp->y -= (xp->Height() / 2); xp->UpdateBlockStates(ALLDIRMASK); } } /* void c------------------------------() {} */ void Object::RunAI() { Object * const &o = this; o->OnTick(); // trigger touch-activated scripts. // it actually only triggers once his centerline touches the object. // see the passageway between the Throne Room and Kings Table for a // clear example of the correct coordinates. if (o->flags & FLAG_SCRIPTONTOUCH) { if (pdistlx(8<y + (6 << CSF); // player->riding check is for fans in Final Cave if ((y > o->Top() && y < o->Bottom()) || player->riding == o) { if (GetCurrentScript() == -1 && // no override other scripts game.switchstage.mapno == -1) // no repeat exec after id2); StartScript(o->id2); } } } } } // deals contact damage to player of o->damage, if applicable. void Object::DealContactDamage() { Object * const &o = this; // no contact damage to player while scripts running if (GetCurrentScript() != -1 || player->inputs_locked) return; if (!(o->flags & FLAG_NOREARTOPATTACK)) { hurtplayer(o->damage); return; } // else, the no rear/top attack flag is set, so only // frontal or bottom contact are harmful to the player switch(o->GetAttackDirection()) { case -1: // head-on hurtplayer(o->damage); break; case LEFT: // rear attack, p to left if (player->xinertia > -0x100) player->xinertia = -0x100; break; case RIGHT: // rear attack, p to right if (player->xinertia < 0x100) player->xinertia = 0x100; break; } } // subfunction of HandleContactDamage. On entry, we assume that the player // is in contact with this object, and that the object is trying to deal // damage to him. // returns the type of attack: // - UP a top attack (player hit top of object) // - LEFT rear attack, player to left // - RIGHT rear attack, player to right // - -1 head-on or bottom attack int Object::GetAttackDirection() { Object * const &o = this; const int VARIANCE = (5 << CSF); if (player->riding == o) return UP; if (player->Bottom() <= (o->Top() + VARIANCE)) return UP; // (added for X treads) if the object is moving, then the "front" // for purposes of this flag is the direction it's moving in. // if it's still, the "front" is the actual direction it's facing. int rtdir = o->dir; if (o->xinertia > 0) rtdir = RIGHT; if (o->xinertia < 0) rtdir = LEFT; if (rtdir == RIGHT) { if (player->Right() <= (o->Left() + VARIANCE)) return RIGHT; } else if (rtdir == LEFT) // the double check makes sense, what if o->dir was UP or DOWN { if (player->Left() >= (o->Right() - VARIANCE)) return LEFT; } return -1; } void Object::MoveAtDir(int dir, int speed) { this->xinertia = 0; this->yinertia = 0; switch(dir) { case LEFT: this->xinertia = -speed; break; case RIGHT: this->xinertia = speed; break; case UP: this->yinertia = -speed; break; case DOWN: this->yinertia = speed; break; } } /* void c------------------------------() {} */ // animate over a list of frames, where the frames need not be consecutive. // every speed ticks we will display a new frame from framelist. // this function requires initilization of animframe and animtimer. void Object::animate_seq(int speed, const int *framelist, int nframes) { Object * const &o = this; if (++o->animtimer > speed) { o->animtimer = 0; o->animframe++; } if (o->animframe >= nframes) o->animframe = 0; o->frame = framelist[o->animframe]; } // used by objects in Maze M, this hints to curly's AI that the object is attacking. void Object::CurlyTargetHere(int mintime, int maxtime) { Object * const &o = this; game.curlytarget.x = o->CenterX(); game.curlytarget.y = o->CenterY(); game.curlytarget.timeleft = random(mintime, maxtime); } // reset the objects clip-extent fields (tp effects etc) to their defaults. // i.e. such that if clip_enable were to be turned on it would have no immediate effect. void Object::ResetClip() { Object * const &o = this; o->clipx1 = o->clipy1 = 0; o->clipx2 = sprites[o->sprite].w; o->clipy2 = sprites[o->sprite].h; } /* void c------------------------------() {} */ void Object::OnTick() { if (objprop[this->type].ai_routines.ontick) (*objprop[this->type].ai_routines.ontick)(this); } void Object::OnAftermove() { if (objprop[this->type].ai_routines.aftermove) (*objprop[this->type].ai_routines.aftermove)(this); } void Object::OnSpawn() { if (objprop[this->type].ai_routines.onspawn) (*objprop[this->type].ai_routines.onspawn)(this); } void Object::OnDeath() { if (objprop[this->type].ai_routines.ondeath) (*objprop[this->type].ai_routines.ondeath)(this); } ================================================ FILE: object.fdh ================================================ //hash:65781cc6 //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------------[referenced from object.cpp]-------------------// bool solidhitdetect(Object *o1, Object *o2); Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //--------------------[referenced from object.cpp]-------------------// Caret *effect(int x, int y, int effectno); /* located in slope.cpp */ //--------------------[referenced from object.cpp]-------------------// bool IsSlopeAtPointList(Object *o, SIFPointList *points); int CheckBoppedHeadOnSlope(Object *o); int CheckStandOnSlope(Object *o); bool movehandleslope(Object *o, int xinertia); /* located in player.cpp */ //--------------------[referenced from object.cpp]-------------------// void hurtplayer(int damage); /* located in tsc.cpp */ //--------------------[referenced from object.cpp]-------------------// ScriptInstance *StartScript(int scriptno, int pageno); int GetCurrentScript(void); /* located in debug.cpp */ //--------------------[referenced from object.cpp]-------------------// const char *DescribeObjectType(int type); /* located in ai/sym/smoke.cpp */ //--------------------[referenced from object.cpp]-------------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //--------------------[referenced from object.cpp]-------------------// void sound(int snd); /* located in common/stat.cpp */ //--------------------[referenced from object.cpp]-------------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); /* located in common/misc.cpp */ //--------------------[referenced from object.cpp]-------------------// int random(int min, int max); ================================================ FILE: object.h ================================================ #ifndef _OBJECT_H #define _OBJECT_H // used in SpawnXP #define XP_SMALL_AMT 1 #define XP_MED_AMT 5 #define XP_LARGE_AMT 20 class Object { public: virtual ~Object() { } // REQUIRED for subclasses (e.g. Player) void SetType(int type); void ChangeType(int type); void BringToFront(); void PushBehind(Object *behind); void PushBehind(int objtype); // --------------------------------------- hit detection w/ map uint32_t GetAttributes(const Point *pointlist, int npoints, int *tile = NULL); bool CheckAttribute(const Point *pointlist, int npoints, uint32_t attrmask, \ int *tile_x = NULL, int *tile_y = NULL); bool CheckSolidIntersect(Object *other, const Point *pointlist, int npoints); // --------------------------------------- overridden convenience versions of above bool CheckAttribute(SIFPointList *points, uint32_t attrmask, int *tile_x = NULL, int *tile_y = NULL) { return CheckAttribute(&points->point[0], points->count, attrmask, tile_x, tile_y); } uint32_t GetAttributes(SIFPointList *points, int *tile = NULL) { return GetAttributes(&points->point[0], points->count, tile); } bool CheckSolidIntersect(Object *other, SIFPointList *points) { return CheckSolidIntersect(other, &points->point[0], points->count); } // --------------------------------------- void UpdateBlockStates(uint8_t updatemask); void SetBlockForSolidBrick(uint8_t updatemask); int GetBlockingType(); // --------------------------------------- bool apply_xinertia(int inertia); bool apply_yinertia(int inertia); void PushPlayerOutOfWay(int xinertia, int yinertia); void SnapToGround(); // --------------------------------------- void DealDamage(int dmg, Object *shot = NULL); void Kill(); void SpawnPowerups(); void SpawnXP(int amt); // --------------------------------------- void RunAI(); void DealContactDamage(); int GetAttackDirection(); void OnTick(); void OnAftermove(); void OnSpawn(); void OnDeath(); // --------------------------------------- void animate_seq(int speed, const int *framelist, int nframes); void CurlyTargetHere(int mintime = 80, int maxtime = 100); void ResetClip(); void MoveAtDir(int dir, int speed); // --------------------------------------- void Delete(); // mark for deletion at end of frame void Destroy(); // delete immediately void DisconnectGamePointers(); // --------------------------------------- int Width(); int Height(); int BBoxWidth(); int BBoxHeight(); int CenterX(); int CenterY(); int Left(); int Right(); int Top(); int Bottom(); int SolidLeft(); int SolidRight(); int SolidTop(); int SolidBottom(); int ActionPointX(); int ActionPointY(); int ActionPoint2X(); int ActionPoint2Y(); int DrawPointX(); int DrawPointY(); SIFSprite *Sprite(); // --------------------------------------- int type; // object's type int sprite; // sprite # to use with object int frame; // frame of sprite to display int x, y; int xinertia, yinertia; uint8_t dir; int hp; // remaining health int damage; // if != 0 does this much damage to player on touch int state; // AI state int substate; // state of current "common/shared" AI routine int dirparam; // for ANP's that use the dir as an extra parameter: see tsc.cpp: SetCSDir // if the object has FLAG_SOLID_BRICK set, this is how much damage it does to the // player if it runs him into a wall or the ceiling/floor. int smushdamage; // for enemies' "shaking" effect when hurt int shaketime; int display_xoff; // rising damage points FloatText *DamageText; // tracks amount of damage dealt quickly, while the objects is still shaking from // previous shots. displaying this damage is postponed until the enemy stops shaking. int DamageWaiting; // for teleportation and other effects bool clip_enable; int clipx1, clipx2; int clipy1, clipy2; // for use by AI int timer, timer2, timer3; int animtimer; int animframe; int blinktimer; int xmark, ymark; int xmark2, ymark2; uint8_t angle, angleoffset; // used for a few such as skullstep int speed; int savedhp; uint32_t flags; // NPC flags (from .pxe) uint32_t nxflags; // NXEngine-specific flags uint16_t id1, id2; // object identifiers (from .pxe) bool onscreen; // true if currently onscreen (lags 1 frame behind) bool invisible; // if true the object will NOT be rendered (but still does collision checking) // flags which are set if an object is touching a wall, ceiling, or floor // they're addressable either by the array or individually. #define BLOCKED_MAP 1 #define BLOCKED_OBJECT 2 union { struct { uint8_t blockr, blockl, blocku, blockd; }; uint8_t block[4]; }; union { struct { uint8_t lastblockr, lastblockl, lastblocku, lastblockd; }; uint8_t lastblock[4]; }; // if true, object has been deleted and should be freed before next tick bool deleted; // the dual-layered linked-list. one list is order of creation is the // order AI routines are run in, the other is the z-order and is the // order the objects are drawn in. Object *prev, *next; Object *lower, *higher; Object *linkedobject; // AI variables used for specific AI functions union { // for player shots (not enemy shots) struct { int ttl; // frames left till shot times out; sets range int dir; // direction shot was fired in, LEFT RIGHT UP DOWN. int damage; // damage dealt per hit int btype; // bullet type int level; // weapon level (0, 1, or 2) // missile boom spawner used w/ player missiles struct { int range; int booms_left; } boomspawner; } shot; struct { int bultype; int nlayers; int wave_amt; } mgun; struct { // if 1 on an OBJ_CARRIED_OBJECT then object faces in OPPOSITE direction of carrier bool flip; } carry; struct { int jumpheight, jumpgrav; int falldmg; bool canfly; } critter; struct { int blockedtime; int reachptimer; int tryjumptime; int impjumptime; uchar impjump; uchar look; int gunsprite; int changedirtimer; bool spawned_watershield; } curly; struct { bool left_ground; } toro; struct { Object *carried_by; } sue; struct { bool smoking; int smoketimer; } balrog; struct { bool fireattack; } igor; struct { bool is_horizontal; int x1, y1, x2, y2; } hvt; // hvtrigger struct { Object *layers[4]; } cloud; }; }; inline int Object::Width() { return (sprites[this->sprite].w << CSF); } inline int Object::Height() { return (sprites[this->sprite].h << CSF); } inline int Object::BBoxWidth() { return (((sprites[this->sprite].bbox.x2 - sprites[this->sprite].bbox.x1) + 1) << CSF); } inline int Object::BBoxHeight() { return (((sprites[this->sprite].bbox.y2 - sprites[this->sprite].bbox.y1) + 1) << CSF); } inline int Object::CenterX() { return (this->x + (Width() / 2)) - DrawPointX(); } inline int Object::CenterY() { return (this->y + (Height() / 2)) - DrawPointY(); } inline int Object::Left() { return (this->x + (sprites[this->sprite].bbox.x1 << CSF)); } inline int Object::Right() { return (this->x + (sprites[this->sprite].bbox.x2 << CSF)); } inline int Object::Top() { return (this->y + (sprites[this->sprite].bbox.y1 << CSF)); } inline int Object::Bottom() { return (this->y + (sprites[this->sprite].bbox.y2 << CSF)); } inline int Object::SolidLeft() { return (this->x + (sprites[this->sprite].solidbox.x1 << CSF)); } inline int Object::SolidRight() { return (this->x + (sprites[this->sprite].solidbox.x2 << CSF)); } inline int Object::SolidTop() { return (this->y + (sprites[this->sprite].solidbox.y1 << CSF)); } inline int Object::SolidBottom() { return (this->y + (sprites[this->sprite].solidbox.y2 << CSF)); } inline int Object::ActionPointX() { return (this->x + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint.x << CSF)); } inline int Object::ActionPointY() { return (this->y + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint.y << CSF)); } inline int Object::ActionPoint2X() { return (this->x + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint2.x << CSF)); } inline int Object::ActionPoint2Y() { return (this->y + (sprites[this->sprite].frame[this->frame].dir[this->dir].actionpoint2.y << CSF)); } inline int Object::DrawPointX() { return (sprites[this->sprite].frame[this->frame].dir[this->dir].drawpoint.x << CSF); } inline int Object::DrawPointY() { return (sprites[this->sprite].frame[this->frame].dir[this->dir].drawpoint.y << CSF); } inline SIFSprite *Object::Sprite() { return &sprites[this->sprite]; } // game objects #define OBJ_NULL 0 #define OBJ_XP 1 #define OBJ_BEHEMOTH 2 #define OBJ_SMOKE_CLOUD 4 #define OBJ_CRITTER_HOPPING_GREEN 5 #define OBJ_BEETLE_GREEN 6 #define OBJ_BASIL 7 #define OBJ_BEETLE_FREEFLY 8 #define OBJ_BALROG_DROP_IN 9 #define OBJ_IGOR_SHOT 11 #define OBJ_BALROG 12 #define OBJ_FORCEFIELD 13 #define OBJ_SANTAS_KEY 14 #define OBJ_CHEST_CLOSED 15 #define OBJ_SAVE_POINT 16 #define OBJ_RECHARGE 17 #define OBJ_DOOR 18 #define OBJ_BALROG_BUST_IN 19 #define OBJ_COMPUTER 20 #define OBJ_CHEST_OPEN 21 #define OBJ_TELEPORTER 22 #define OBJ_TELEPORTER_LIGHTS 23 #define OBJ_POWER_CRITTER 24 #define OBJ_EGG_ELEVATOR 25 // lift platform in Egg Observation Room #define OBJ_BAT_CIRCLE 26 #define OBJ_BIG_SPIKE 27 #define OBJ_CRITTER_FLYING 28 // cyan critters from grasstown #define OBJ_CHTHULU 29 #define OBJ_HERMIT_GUNSMITH 30 #define OBJ_BAT_HANG 31 #define OBJ_LIFE_CAPSULE 32 #define OBJ_BALROG_SHOT_BOUNCE 33 #define OBJ_BED 34 #define OBJ_MANNAN 35 #define OBJ_BALROG_BOSS_FLYING 36 #define OBJ_SIGNPOST 37 #define OBJ_FIREPLACE 38 #define OBJ_SAVE_SIGN 39 #define OBJ_SANTA 40 // NPC Santa #define OBJ_DOOR_BUSTED 41 // door of shack after balrog breaks it #define OBJ_SUE 42 #define OBJ_CHALKBOARD 43 #define OBJ_POLISH 44 #define OBJ_POLISHBABY 45 #define OBJ_HVTRIGGER 46 #define OBJ_SANDCROC 47 #define OBJ_SKULLHEAD 49 #define OBJ_SKELETON_SHOT 50 // bones fired by skullhead_carried & skeleton #define OBJ_CROWWITHSKULL 51 #define OBJ_BLUE_ROBOT_SITTING 52 #define OBJ_SKULLSTEP_FOOT 53 #define OBJ_SKULLSTEP 54 #define OBJ_KAZUMA 55 #define OBJ_BEETLE_BROWN 56 #define OBJ_CROW 57 #define OBJ_GIANT_BEETLE 58 // Basu #define OBJ_DOOR_ENEMY 59 // attacking exit door from First Cave #define OBJ_TOROKO 60 #define OBJ_KING 61 #define OBJ_KAZUMA_AT_COMPUTER 62 #define OBJ_TOROKO_SHACK 63 // scared toroko attacking in Shack #define OBJ_CRITTER_HOPPING_BLUE 64 // from First Cave #define OBJ_BAT_BLUE 65 // from First Cave #define OBJ_MISERYS_BUBBLE 66 // misery's bubble that takes Toroko away in Shack #define OBJ_MISERY_FLOAT 67 #define OBJ_BALROG_BOSS_RUNNING 68 #define OBJ_MUSHROOM_ENEMY 69 #define OBJ_HIDDEN_SPARKLE 70 #define OBJ_CHINFISH 71 #define OBJ_SPRINKLER 72 #define OBJ_WATER_DROPLET 73 #define OBJ_JACK 74 // guards cemetary door in Village #define OBJ_KANPACHI_FISHING 75 #define OBJ_YAMASHITA_FLOWERS 76 // flowers grown in Yamashita Farm #define OBJ_YAMASHITA_PAVILION 77 // Sandaime's Pavilion from Yamashita Farm #define OBJ_POT 78 #define OBJ_MAHIN 79 // from village #define OBJ_GRAVEKEEPER 80 // man with knife in Mimiga Graveyard #define OBJ_GIANT_MUSHROOM_ENEMY 81 #define OBJ_MISERY_STAND 82 #define OBJ_NPC_IGOR 83 #define OBJ_GIANT_BEETLE_SHOT 84 #define OBJ_TERMINAL 85 #define OBJ_MISSILE 86 #define OBJ_HEART 87 #define OBJ_BOSS_IGOR 88 #define OBJ_BOSS_IGOR_DEFEATED 89 #define OBJ_CAGE 91 #define OBJ_SUE_AT_COMPUTER 92 #define OBJ_CHACO 93 #define OBJ_GIANT_JELLY 94 #define OBJ_JELLY 95 #define OBJ_FAN_LEFT 96 #define OBJ_FAN_UP 97 #define OBJ_FAN_RIGHT 98 #define OBJ_FAN_DOWN 99 #define OBJ_GRATE 100 #define OBJ_POWERCOMP 101 #define OBJ_POWERSINE 102 #define OBJ_MANNAN_SHOT 103 #define OBJ_FROG 104 #define OBJ_HEY 105 // "Hey!" balloon #define OBJ_HEY_SPAWNER 106 // creates "Hey!" ballons #define OBJ_MALCO 107 #define OBJ_BALFROG_SHOT 108 #define OBJ_MALCO_BROKEN 109 #define OBJ_MINIFROG 110 #define OBJ_PTELOUT 111 // player teleporting out (using teleporter) #define OBJ_PTELIN 112 // player teleporting in (using teleporter) #define OBJ_PROFESSOR_BOOSTER 113 #define OBJ_PRESS 114 #define OBJ_FRENZIED_MIMIGA 115 #define OBJ_RED_PETALS 116 // scattered around beds #define OBJ_CURLY 117 // curly (npc) #define OBJ_CURLY_BOSS 118 // curly (boss) #define OBJ_TABLECHAIRS 119 // table & chairs #define OBJ_MIMIGAC1 120 // curly's mimigas #define OBJ_MIMIGAC2 121 // curly's mimigas #define OBJ_MIMIGAC_ENEMY 122 // fighting mimigas during 1st boss fight in sand zone #define OBJ_CURLYBOSS_SHOT 123 #define OBJ_SUNSTONE 124 #define OBJ_HIDDEN_POWERUP 125 #define OBJ_PUPPY_RUN 126 #define OBJ_PUPPY_WAG 130 #define OBJ_PUPPY_SLEEP 131 #define OBJ_PUPPY_BARK 132 #define OBJ_JENKA 133 #define OBJ_ARMADILLO 134 #define OBJ_SKELETON 135 #define OBJ_PUPPY_CARRY 136 #define OBJ_LARGEDOOR_FRAME 137 #define OBJ_LARGEDOOR 138 #define OBJ_DOCTOR 139 #define OBJ_TOROKO_FRENZIED 140 #define OBJ_TOROKO_BLOCK 141 #define OBJ_TOROKO_FLOWER 142 #define OBJ_JENKA_COLLAPSED 143 #define OBJ_TOROKO_TELEPORT_IN 144 #define OBJ_KINGS_SWORD 145 // sticks to linkedobject #define OBJ_LIGHTNING 146 #define OBJ_CRITTER_SHOOTING_PURPLE 147 #define OBJ_CRITTER_SHOT 148 #define OBJ_BLOCK_MOVEH 149 #define OBJ_NPC_PLAYER 150 // the player as an NPC in cutscenes #define OBJ_BLUE_ROBOT 151 #define OBJ_SHUTTER_STUCK 152 #define OBJ_GAUDI 153 #define OBJ_GAUDI_DYING 154 #define OBJ_GAUDI_FLYING 155 #define OBJ_GAUDI_FLYING_SHOT 156 #define OBJ_BLOCK_MOVEV 157 #define OBJ_X_FISHY_MISSILE 158 // homing fish projectiles fired by Monster X #define OBJ_X_DEFEATED 159 // cat that falls out after defeating X #define OBJ_POOH_BLACK 160 // clinic ghost #define OBJ_POOH_BLACK_BUBBLE 161 #define OBJ_POOH_BLACK_DYING 162 #define OBJ_DR_GERO 163 // from labyrinth clinic #define OBJ_NURSE_HASUMI 164 // from labyrinth clinic #define OBJ_CURLY_COLLAPSED 165 #define OBJ_GAUDI_SHOPKEEP 166 // aka Chaba, at table in labyrinth shop #define OBJ_BOOSTER_FALLING 167 // professor booster falling after Labyrinth #define OBJ_BOULDER 168 // large boulder in the Boulder Chamber #define OBJ_BALROG_BOSS_MISSILES 169 // balrog boss in Boulder Chamber #define OBJ_BALROG_MISSILE 170 #define OBJ_FIREWHIRR 171 #define OBJ_FIREWHIRR_SHOT 172 #define OBJ_GAUDI_ARMORED 173 #define OBJ_GAUDI_ARMORED_SHOT 174 #define OBJ_GAUDI_EGG 175 #define OBJ_BUYOBUYO_BASE 176 #define OBJ_BUYOBUYO 177 #define OBJ_MINICORE_SHOT 178 #define OBJ_CORE_GHOSTIE 179 #define OBJ_CURLY_AI 180 #define OBJ_CAI_GUN 181 #define OBJ_CAI_MGUN 182 #define OBJ_CAI_WATERSHIELD 183 #define OBJ_SHUTTER_BIG 184 #define OBJ_SHUTTER 185 #define OBJ_ALMOND_LIFT 186 #define OBJ_FUZZ_CORE 187 #define OBJ_FUZZ 188 #define OBJ_ALMOND_ROBOT 190 #define OBJ_WATERLEVEL 191 // controls water level in Almond #define OBJ_MOTORBIKE 192 #define OBJ_MOTORBIKE_BROKEN 193 #define OBJ_BLUE_ROBOT_REMAINS 194 #define OBJ_GRATING 195 #define OBJ_MOTION_WALL 196 // top & bottom wall during Ironhead battle #define OBJ_IRONH_FISHY 197 // fishies in IronH battle #define OBJ_IRONH_SHOT 198 #define OBJ_FAN_DROPLET 199 // air or water current (from fans and Waterway) #define OBJ_DRAGON_ZOMBIE 200 #define OBJ_DRAGON_ZOMBIE_DEAD 201 #define OBJ_DRAGON_ZOMBIE_SHOT 202 #define OBJ_CRITTER_HOPPING_AQUA 203 #define OBJ_FALLING_SPIKE_SMALL 204 #define OBJ_FALLING_SPIKE_LARGE 205 #define OBJ_COUNTER_BOMB 206 #define OBJ_COUNTER_BOMB_NUMBER 207 #define OBJ_GIANT_BEETLE_2 208 #define OBJ_BEETLE_FREEFLY_2 210 #define OBJ_SPIKE_SMALL 211 #define OBJ_SKY_DRAGON 212 // kazuma's nice dragon (npc) #define OBJ_NIGHT_SPIRIT 213 #define OBJ_NIGHT_SPIRIT_SHOT 214 #define OBJ_SANDCROC_OSIDE 215 // from outer wall #define OBJ_PIXEL_CAT 216 // hidden pixel the cat from oside aka "debug kitty" #define OBJ_ITOH 217 #define OBJ_CORE_BLAST 218 #define OBJ_BUBBLE_SPAWNER 219 #define OBJ_MIMIGA_FARMER_STANDING 220 // from plantation, doesn't move #define OBJ_MIMIGA_FARMER_WALKING 221 // from plantation, walks back and forth #define OBJ_JAIL_GRATING 222 #define OBJ_MOMORIN 223 #define OBJ_CHIE 224 // plantation lounge #define OBJ_MEGANE 225 // plantation lounge (you give him the sprinkler) #define OBJ_KANPACHI_STANDING 226 // standing version, plantation lounge #define OBJ_BUCKET 227 // kanpachi's fishing bucket #define OBJ_DROLL_GUARD 228 // droll that stomps you in Teleporter Room #define OBJ_RED_FLOWERS_SPROUTS 229 #define OBJ_RED_FLOWERS_BLOOMING 230 #define OBJ_ROCKET 231 // ...that you ride up to Last Cave #define OBJ_ORANGEBELL 232 // bat swarm from Plantation #define OBJ_ORANGEBELL_BABY 233 #define OBJ_RED_FLOWERS_PICKED 234 #define OBJ_FLOWERS_PENS1 234 // picked red flowers in lower-right corner of Arthur's House #define OBJ_MIDORIN 235 #define OBJ_GUNFISH 236 #define OBJ_GUNFISH_SHOT 237 #define OBJ_PROXIMITY_PRESS_HOZ 238 // horizontal-moving presses along rocket path #define OBJ_MIMIGA_CAGE 239 #define OBJ_MIMIGA_JAILED 240 // mimigas in jail2 #define OBJ_CRITTER_HOPPING_RED 241 #define OBJ_RED_BAT 242 #define OBJ_RED_BAT_SPAWNER 243 #define OBJ_LAVA_DRIP 244 #define OBJ_LAVA_DRIP_SPAWNER 245 // for example at entrance to last cave (hidden) #define OBJ_PROXIMITY_PRESS_VERT 246 #define OBJ_BOSS_MISERY 247 #define OBJ_MISERY_SHOT 248 #define OBJ_MISERY_PHASE 249 // 2 used in teleport effect #define OBJ_MISERY_BALL 250 #define OBJ_BLACK_LIGHTNING 251 #define OBJ_MISERY_RING 252 #define OBJ_XP_CAPSULE 253 #define OBJ_HELICOPTER 254 // Balcony helicopter #define OBJ_HELICOPTER_BLADE 255 #define OBJ_DOCTOR_CROWNED 256 #define OBJ_RED_CRYSTAL 257 #define OBJ_MIMIGA_SLEEPING 258 // plantation lounge #define OBJ_CURLY_CARRIED 259 // curly being carried via Tow Rope #define OBJ_MIMIGA_CAGED 260 // from Kings Table #define OBJ_CHIE_CAGED 261 // from Kings Table #define OBJ_CHACO_CAGED 262 // from Kings Table #define OBJ_BOSS_DOCTOR 263 #define OBJ_DOCTOR_SHOT 264 // wave shot #define OBJ_DOCTOR_SHOT_TRAIL 265 #define OBJ_DOCTOR_BLAST 266 // his explosion of red bouncy shots #define OBJ_BOSS_DOCTOR_FRENZIED 267 // Muscle Doctor #define OBJ_IGOR_BALCONY 268 // "igor"-like big Ravil on Balcony #define OBJ_DOCTOR_BAT 269 // orange bats spawned by Doctor 2 #define OBJ_RED_ENERGY 270 // used by Doctor 2 and Undead Core cutscene #define OBJ_IRONH_BRICK 271 #define OBJ_BRICK_SPAWNER 272 #define OBJ_DROLL_SHOT 273 #define OBJ_DROLL 274 #define OBJ_PUPPY_ITEMS 275 // wagging puppy such as that gives you life capsule #define OBJ_RED_DEMON 276 // middle-boss in Last Cave Hidden #define OBJ_RED_DEMON_SHOT 277 #define OBJ_LITTLE_FAMILY 278 // Little Man, and also used for his family #define OBJ_FALLING_BLOCK 279 // from Misery and Hell B1 #define OBJ_SUE_TELEPORT_IN 280 #define OBJ_DOCTOR_GHOST 281 // doctor as red energy #define OBJ_UDMINI_PLATFORM 282 // undead minicore (platforms) #define OBJ_MISERY_FRENZIED 283 // for Final Battle transformed by DOCTOR_GHOST #define OBJ_SUE_FRENZIED 284 // for Final Battle transformed by DOCTOR_GHOST #define OBJ_UD_SPINNER 285 #define OBJ_UD_SPINNER_TRAIL 286 #define OBJ_UD_SMOKE 287 #define OBJ_UD_PELLET 288 // undead core pellet/rock shot #define OBJ_MISERY_CRITTER 289 #define OBJ_MISERY_BAT 290 #define OBJ_UD_MINICORE_IDLE 291 #define OBJ_QUAKE 292 #define OBJ_UD_BLAST 293 #define OBJ_FALLING_BLOCK_SPAWNER 294 #define OBJ_CLOUD 295 #define OBJ_CLOUD_SPAWNER 296 // clouds from prtFall (ending sequence) #define OBJ_INTRO_DOCTOR 298 // from intro #define OBJ_INTRO_KINGS 299 // balrog/misery in bubble (from intro) #define OBJ_INTRO_CROWN 300 // Demon Crown (from intro) #define OBJ_MISERY_MISSILE 301 #define OBJ_SCROLL_CONTROLLER 302 // weapons[WPN_SPUR]; spur->chargetimer = 0; spur->level = 0; spur->xp = 0; init_whimstar(&player->whimstar); } void PDoWeapons(void) { // switching weapons. have to check for inputs_frozen since justpushed // reads inputs[] directly, not pinputs[]. if (!player->inputs_locked) { if (justpushed(PREVWPNKEY)) stat_PrevWeapon(); if (justpushed(NEXTWPNKEY)) stat_NextWeapon(); } // firing weapon if (pinputs[FIREKEY]) { FireWeapon(); RunWeapon(true); } else { RunWeapon(false); } PHandleSpur(); run_whimstar(&player->whimstar); if (empty_timer) empty_timer--; } /* void c------------------------------() {} */ // called when player is trying to fire the current weapon // i.e. the fire button is down. void FireWeapon(void) { Weapon *curweapon = &player->weapons[player->curWeapon]; int level = curweapon->level; // check if we can fire if (curweapon->firerate[level] != 0) { // rapid/fully-auto fire // decremented in RunWeapon() if (curweapon->firetimer) { return; } else { curweapon->firetimer = curweapon->firerate[level]; } } else { // else must push key for each shot if (lastpinputs[FIREKEY]) return; } // check if we have enough ammo if (curweapon->maxammo > 0 && curweapon->ammo <= 0) { sound(SND_GUN_CLICK); if (empty_timer <= 0) { effect(player->CenterX(), player->CenterY(), EFFECT_EMPTY); empty_timer = 50; } return; } // subtract ammo if (curweapon->ammo) curweapon->ammo--; // fire!! switch(player->curWeapon) { case WPN_NONE: break; case WPN_POLARSTAR: PFirePolarStar(level); break; case WPN_FIREBALL: PFireFireball(level); break; case WPN_MGUN: PFireMachineGun(level); break; case WPN_MISSILE: case WPN_SUPER_MISSILE: PFireMissile(level, (player->curWeapon == WPN_SUPER_MISSILE)); break; case WPN_BLADE: PFireBlade(level); break; case WPN_SNAKE: PFireSnake(level); break; case WPN_NEMESIS: PFireNemesis(level); break; case WPN_BUBBLER: PFireBubbler(level); break; case WPN_SPUR: PFireSpur(); break; default: console.Print("FireWeapon: cannot fire unimplemented weapon %d", player->curWeapon); sound(SND_BONK_HEAD); break; } } // "run" the current weapon. // firing = 1 if fire key is currently down, and 0 if it is not. void RunWeapon(bool firing) { Weapon *curweapon = &player->weapons[player->curWeapon]; int level = curweapon->level; // bubbler L1 has recharge but not rapid fire, // so it recharges even if the key is held down. if (firing && !curweapon->firerate[level] && lastpinputs[FIREKEY]) firing = false; // recharge machine gun when it's not firing or it's not selected if ((curweapon->rechargerate[level]) && \ (curweapon->ammo < curweapon->maxammo) && \ !firing) { // start recharging ammo int rate = curweapon->rechargerate[level]; if ((player->equipmask & EQUIP_TURBOCHARGE) && player->curWeapon == WPN_MGUN) { rate = 2; } // it's greater than OR EQUAL TO, so that we can have rate=0 be no recharge. // Otherwise there would be no value that recharges every frame. if (++curweapon->rechargetimer >= rate) { curweapon->rechargetimer = 0; curweapon->ammo++; } } for(int i=0;iweapons[i].firetimer) player->weapons[i].firetimer--; if ((i != player->curWeapon) || \ (player->weapons[i].ammo >= player->weapons[i].maxammo) || \ firing) { player->weapons[i].rechargetimer = 0; } } } /* void c------------------------------() {} */ // set up the specified bullet to be a shot of type btype // (note: shared by Curly sand-zone boss) void SetupBullet(Object *shot, int x, int y, int btype, int dir) { const BulletInfo *info = &bullet_table[btype]; shot->sprite = info->sprite; shot->frame = info->frame; shot->shot.ttl = info->timetolive; shot->shot.damage = info->damage; shot->shot.level = info->level; shot->shot.btype = btype; shot->shot.dir = dir; shot->nxflags |= NXFLAG_NO_RESET_YINERTIA; if (game.debug.infinite_damage) shot->shot.damage = 255; if (info->sound) sound(info->sound); if (info->makes_star == 1) effect(x, y, EFFECT_STARPOOF); if (info->manualsetup != 1) { switch(dir) { case LEFT: shot->xinertia = -info->speed; shot->dir = LEFT; break; case RIGHT: shot->xinertia = info->speed; shot->dir = RIGHT; break; case UP: shot->yinertia = -info->speed; shot->dir = RIGHT; if (info->manualsetup != 2) { shot->sprite++; } break; case DOWN: shot->yinertia = info->speed; shot->dir = LEFT; if (info->manualsetup != 2) { shot->sprite++; } break; } if (info->makes_star == 2) effect(x+shot->xinertia/2, y, EFFECT_STARPOOF); // have to do this because inertia will get applied later in the tick before the first // time it's drawn so it won't actually appear where we put it if we don't x -= shot->xinertia; y -= shot->yinertia; } // put shot center at [x,y], // this also centers it within starpoof shot->x = x - (shot->Width() / 2); shot->y = y - (shot->Height() / 2); } // fire a basic, single bullet static Object *FireSimpleBullet(int otype, int btype, int xoff, int yoff) { int x, y, dir; // get location to fire from GetPlayerShootPoint(&x, &y); x += xoff; y += yoff; // create the shot Object *shot = CreateObject(0, 0, otype); // set up the shot if (player->look) dir = player->look; else dir = player->dir; SetupBullet(shot, x, y, btype, dir); return shot; } // fires a bullet at an offset from the exact center of the player's shoot point. // FireSimpleBullet can do this too-- but it's xoff/yoff is absolute. This function // takes a parameter for when you are shooting right and extrapolates out the other // directions from that. ALSO, xoff/yoff on FireSimpleBullet moves the star; // this function does not. static Object *FireSimpleBulletOffset(int otype, int btype, int xoff, int yoff) { int dir; if (player->look) dir = player->look; else dir = player->dir; switch(dir) { case RIGHT: break; // already in format for RIGHT frame case LEFT: xoff = -xoff; break; case UP: SWAP(xoff, yoff); yoff = -yoff; break; case DOWN: SWAP(xoff, yoff); break; } Object *shot = FireSimpleBullet(otype, btype); shot->x += xoff; shot->y += yoff; return shot; } /* void c------------------------------() {} */ static void PFirePolarStar(int level) { // at level 3 only two shots per screen permitted if (level < 2 || CountObjectsOfType(OBJ_POLAR_SHOT) < 2) { int xoff; if (level == 2) xoff = -5<look) ? player->look : player->dir; if (level == 0) { // level 1 is real easy! no frickin' layers!! shot = FireSimpleBullet(OBJ_POLAR_SHOT, B_MGUN_L1, 0, 0); shot->dir = dir; if (player->look) shot->xinertia = random(-0xAA, 0xAA); else shot->yinertia = random(-0xAA, 0xAA); } else { // drop an OBJ_MGUN_SHOOTER object to fire the layers (trail) of the MGun blast. GetPlayerShootPoint(&x, &y); FireLevel23MGun(x, y, level, dir); } // do machine-gun flying if (player->look==DOWN && level==2) { PMgunFly(); } } // fire a level 2 or level 3 MGun blast from position x,y. // Broken out here into a seperate sub so OBJ_CURLY_AI can use it also. void FireLevel23MGun(int x, int y, int level, int dir) { static const uchar no_layers[] = { 1, 3, 5 }; static const int bultype_table[] = { 0, B_MGUN_L2, B_MGUN_L3 }; Object *shot; // note: this relies on the player AI running before the entity AI...which it does... // so leave it that way, else he wouldn't actually fire for 1 additional frame shot = CreateObject(x, y, OBJ_MGUN_SPAWNER); shot->dir = dir; shot->mgun.bultype = bultype_table[level]; shot->mgun.nlayers = no_layers[level]; shot->mgun.wave_amt = random(-0xAA, 0xAA); shot->invisible = true; } // handles flying when shooting down using Machine Gun at Level 3 void PMgunFly(void) { if (player->yinertia > 0) { player->yinertia >>= 1; } if (player->yinertia > -0x400) { player->yinertia -= 0x200; if (player->yinertia < -0x400) player->yinertia = -0x400; } } /* void c------------------------------() {} */ // fire the missile launcher. // level: 0 - 2: weapon level from 1 - 3 // is_super: bool: true if the player is firing the Super Missile Launcher static void PFireMissile(int level, bool is_super) { Object *o; int xoff, yoff; int object_type = (!is_super) ? OBJ_MISSILE_SHOT : OBJ_SUPERMISSILE_SHOT; // can only fire one missile at once on L1, // two missiles on L2, and two sets of three missiles on L3. static const uint8_t max_missiles_at_once[] = { 1, 2, 6 }; if (CountObjectsOfType(object_type) >= max_missiles_at_once[level]) { // give back the previously-decremented ammo so they don't lose it (hack) player->weapons[player->curWeapon].ammo++; return; } int bullet_type = (!is_super) ? B_MISSILE_L1 : B_SUPER_MISSILE_L1; bullet_type += level; // level 1 & 2 fires just one missile FireSimpleBulletOffset(object_type, bullet_type, -4<look==DOWN || player->look==UP) { xoff = (4<shot.dir==LEFT) o->xinertia = recoil_upper[is_super]; else if (o->shot.dir==RIGHT) o->xinertia = -recoil_upper[is_super]; else if (o->shot.dir==UP) o->yinertia = recoil_upper[is_super]; else o->yinertia = -recoil_upper[is_super]; // this one is lower o = FireSimpleBullet(object_type, bullet_type, xoff, yoff); if (o->shot.dir==LEFT) o->xinertia = recoil_lower[is_super]; else if (o->shot.dir==RIGHT) o->xinertia = -recoil_lower[is_super]; else if (o->shot.dir==UP) o->yinertia = recoil_lower[is_super]; else o->yinertia = -recoil_lower[is_super]; } } /* void c------------------------------() {} */ static void PFireFireball(int level) { static const int object_types[] = { OBJ_FIREBALL1, OBJ_FIREBALL23, OBJ_FIREBALL23 }; static uchar max_fireballs[] = { 2, 3, 4 }; int count; count = (CountObjectsOfType(OBJ_FIREBALL1) + CountObjectsOfType(OBJ_FIREBALL23)); if (count >= max_fireballs[level]) { return; } // the 8px offset fires the shot just a tiny bit behind the player-- // you can't see the difference but it makes the shot correctly bounce if // you shoot while flat up against a wall, instead of embedding the fireball // in the wall. Object *fb = FireSimpleBulletOffset(object_types[level], B_FIREBALL1 + level, -8<dir = player->dir; fb->nxflags &= ~NXFLAG_NO_RESET_YINERTIA; switch(fb->shot.dir) { case LEFT: fb->xinertia = -0x400; break; case RIGHT: fb->xinertia = 0x400; break; case UP: fb->xinertia = player->xinertia + ((player->dir==RIGHT) ? 128 : -128); if (player->xinertia) fb->dir = (player->xinertia > 0) ? RIGHT:LEFT; fb->yinertia = -0x5ff; break; case DOWN: fb->xinertia = player->xinertia; if (player->xinertia) fb->dir = (player->xinertia > 0) ? RIGHT:LEFT; fb->yinertia = 0x5ff; break; } } static void PFireBlade(int level) { int numblades = CountObjectsOfType(OBJ_BLADE12_SHOT) + CountObjectsOfType(OBJ_BLADE3_SHOT); if (numblades >= 1) return; int dir = (player->look) ? player->look : player->dir; int x = player->CenterX(); int y = player->CenterY(); if (level == 2) { if (dir == RIGHT || dir == LEFT) { y -= (3 << CSF); x += (dir == LEFT) ? (3 << CSF) : -(3 << CSF); } } else { switch(dir) { case RIGHT: x -= (6 << CSF); y -= (3 << CSF); break; case LEFT: x += (6 << CSF); y -= (3 << CSF); break; case UP: y += (6 << CSF); break; case DOWN: y -= (6 << CSF); break; } } Object *shot = CreateObject(x, y, (level != 2) ? OBJ_BLADE12_SHOT : OBJ_BLADE3_SHOT); SetupBullet(shot, x, y, B_BLADE_L1+level, dir); } /* void c------------------------------() {} */ static void PFireSnake(int level) { if (level == 2) { int count = (CountObjectsOfType(OBJ_SNAKE1_SHOT) + \ CountObjectsOfType(OBJ_SNAKE23_SHOT)); if (count >= 4) return; } int object_type = (level == 0) ? OBJ_SNAKE1_SHOT : OBJ_SNAKE23_SHOT; FireSimpleBulletOffset(object_type, B_SNAKE_L1+level, -5<= 2) return; FireSimpleBullet(OBJ_NEMESIS_SHOT, B_NEMESIS_L1+level); } static void PFireBubbler(int level) { static const int max_bubbles[] = { 4, 16, 16 }; int count = CountObjectsOfType(OBJ_BUBBLER12_SHOT) + \ CountObjectsOfType(OBJ_BUBBLER3_SHOT); if (count >= max_bubbles[level]) return; int objtype = (level != 2) ? OBJ_BUBBLER12_SHOT : OBJ_BUBBLER3_SHOT; FireSimpleBulletOffset(objtype, B_BUBBLER_L1+level, -4<weapons[WPN_SPUR]; if (player->curWeapon != WPN_SPUR) { spur->level = 0; spur->xp = 0; return; } if (pinputs[FIREKEY]) { if (!IsWeaponMaxed()) { int amt = (player->equipmask & EQUIP_TURBOCHARGE) ? 3 : 2; AddXP(amt, true); if (IsWeaponMaxed()) { sound(SND_SPUR_MAXED); } else { spur->chargetimer++; if (spur->chargetimer & 2) { sound(SND_SPUR_CHARGE_1 + spur->level); } } } else { // keep flashing even once at max statusbar.xpflashcount = FLASH_TIME; if (player->equipmask & EQUIP_WHIMSTAR) add_whimstar(&player->whimstar); } } else { if (spur->chargetimer) { if (spur->level > 0 && can_fire_spur()) { int level = IsWeaponMaxed() ? 2 : (spur->level - 1); FireSimpleBulletOffset(OBJ_SPUR_SHOT, B_SPUR_L1+level, -4<chargetimer = 0; } spur->level = 0; spur->xp = 0; } if (statusbar.xpflashcount > FLASH_TIME) statusbar.xpflashcount = FLASH_TIME; } static bool can_fire_spur(void) { if (CountObjectsOfType(OBJ_SPUR_SHOT)) return false; return true; } // returns true if the current weapon has full xp at level 3 (is showing "Max") static bool IsWeaponMaxed(void) { Weapon *wpn = &player->weapons[player->curWeapon]; return (wpn->level == 2) && (wpn->xp == wpn->max_xp[2]); } ================================================ FILE: p_arms.fdh ================================================ //hash:0b443ff1 //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// Object *CreateObject(int x, int y, int type); /* located in caret.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// Caret *effect(int x, int y, int effectno); /* located in player.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// void GetPlayerShootPoint(int *x_out, int *y_out); /* located in playerstats.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// void AddXP(int xp, bool quiet); /* located in p_arms.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// void PResetWeapons(); void PDoWeapons(void); void FireWeapon(void); void RunWeapon(bool firing); void SetupBullet(Object *shot, int x, int y, int btype, int dir); static Object *FireSimpleBullet(int otype, int btype, int xoff, int yoff); static Object *FireSimpleBulletOffset(int otype, int btype, int xoff, int yoff); static void PFirePolarStar(int level); static void PFireMachineGun(int level); void FireLevel23MGun(int x, int y, int level, int dir); void PMgunFly(void); static void PFireMissile(int level, bool is_super); static void PFireFireball(int level); static void PFireBlade(int level); static void PFireSnake(int level); static void PFireNemesis(int level); static void PFireBubbler(int level); static void PFireSpur(void); static void PHandleSpur(void); static bool can_fire_spur(void); static bool IsWeaponMaxed(void); /* located in statusbar.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// void stat_PrevWeapon(bool quiet); void stat_NextWeapon(bool quiet); /* located in input.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// bool justpushed(int k); /* located in ai/weapons/whimstar.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// void init_whimstar(WhimsicalStar *wh); void run_whimstar(WhimsicalStar *wh); void add_whimstar(WhimsicalStar *wh); /* located in sound/sound.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// void sound(int snd); /* located in common/misc.cpp */ //--------------------[referenced from p_arms.cpp]-------------------// int random(int min, int max); ================================================ FILE: p_arms.h ================================================ #ifndef _P_ARMS_H #define _P_ARMS_H // player->weapons[] array enum { WPN_NONE = 0, WPN_SNAKE = 1, WPN_POLARSTAR = 2, WPN_FIREBALL = 3, WPN_MGUN = 4, WPN_MISSILE = 5, WPN_BUBBLER = 7, WPN_BLADE = 9, WPN_SUPER_MISSILE = 10, WPN_NEMESIS = 12, WPN_SPUR = 13, WPN_COUNT = 14 }; // stored inside player structure struct Weapon { bool hasWeapon; // true if player has this weapon int xp, max_xp[3]; // current XP, & max XP per level uint8_t level; // current level (0=L1 1=L2 2=L3) int ammo; // current ammo (0 = n/a) int maxammo; // max ammo (0 = unlimited) // for rapid fire weapons. if firerate = 0, must push for each shot. int firetimer; int firerate[3]; // for recharging weapons int rechargetimer; int rechargerate[3]; // for charged-shot weapons (Spur) int chargetimer; void SetFireRate(int l1, int l2, int l3) { firerate[0] = l1; firerate[1] = l2; firerate[2] = l3; } void SetRechargeRate(int l1, int l2, int l3) { rechargerate[0] = l1; rechargerate[1] = l2; rechargerate[2] = l3; } }; // shot types for SetupBullet. // matches the order of bullet_table. enum { B_PSTAR_L1, B_PSTAR_L2, B_PSTAR_L3, B_MGUN_L1, B_MGUN_L2, B_MGUN_L2P2, B_MGUN_L2P3, B_MGUN_L3, B_MGUN_L3P2, B_MGUN_L3P3, B_MGUN_L3P4, B_MGUN_L3P5, B_MISSILE_L1, B_MISSILE_L2, B_MISSILE_L3, B_SUPER_MISSILE_L1, B_SUPER_MISSILE_L2, B_SUPER_MISSILE_L3, B_FIREBALL1, B_FIREBALL2, B_FIREBALL3, B_BLADE_L1, B_BLADE_L2, B_BLADE_L3, B_SNAKE_L1, B_SNAKE_L2, B_SNAKE_L3, B_NEMESIS_L1, B_NEMESIS_L2, B_NEMESIS_L3, B_BUBBLER_L1, B_BUBBLER_L2, B_BUBBLER_L3, B_SPUR_L1, B_SPUR_L2, B_SPUR_L3, B_CURLYS_NEMESIS, B_LAST }; #endif ================================================ FILE: pause/dialog.cpp ================================================ #include "../nx.h" #include "dialog.h" #include "dialog.fdh" #include "../l10n_strings.h" using namespace Options; extern FocusStack optionstack; #ifdef _480X272 // 480x272 widescreen fix #define DLG_X ((SCREEN_WIDTH / 2) - 110) #define DLG_Y ((SCREEN_HEIGHT / 2) - 90) #define DLG_W 240 #define DLG_H 180 #else #define DLG_X ((SCREEN_WIDTH / 2) - 88) #define DLG_Y ((SCREEN_HEIGHT / 2) - 90) #define DLG_W 190 #define DLG_H 180 #endif #define REPEAT_WAIT 30 #define REPEAT_RATE 4 Dialog::Dialog() { onclear = NULL; ondismiss = NULL; fCoords.x = DLG_X; fCoords.y = DLG_Y; fCoords.w = DLG_W; fCoords.h = DLG_H; fTextX = (fCoords.x + 48); fCurSel = 0; fNumShown = 0; fRepeatTimer = 0; optionstack.AddItem(this); } Dialog::~Dialog() { for(int i=0;ODItem *item = ItemAt(i);i++) delete item; optionstack.RemoveItem(this); } void Dialog::SetSize(int w, int h) { fCoords.w = w; fCoords.h = h; fCoords.x = ((DLG_W / 2) - (w / 2)) + DLG_X; fCoords.y = ((DLG_H / 2) - (h / 2)) + DLG_Y; fTextX = (fCoords.x + 34); } void Dialog::offset(int xd, int yd) { fCoords.x += xd; fCoords.y += yd; fTextX += xd; } /* void c------------------------------() {} */ ODItem *Dialog::AddItem(const char *text, \ void (*activate)(ODItem *, int), \ void (*update)(ODItem *),\ int id, int type) { ODItem *item = new ODItem; memset(item, 0, sizeof(ODItem)); strcpy(item->text, text); item->activate = activate; item->update = update; item->id = id; item->type = type; fItems.AddItem(item); if (update) (*update)(item); return item; } ODItem *Dialog::AddSeparator() { return AddItem("", NULL, NULL, -1, OD_SEPARATOR); } ODItem *Dialog::AddDismissalItem(const char *text) { if (!text) text = LC_RETURN; return AddItem(text, NULL, NULL, -1, OD_DISMISS); } /* void c------------------------------() {} */ void Dialog::Draw() { TextBox::DrawFrame(fCoords.x, fCoords.y, fCoords.w, fCoords.h); int x = fTextX; int y = (fCoords.y + 18); for(int i=0;;i++) { ODItem *item = (ODItem *)fItems.ItemAt(i); if (!item) break; if (i < fNumShown) DrawItem(x, y, item); if (i == fCurSel) draw_sprite(x - 16, y, SPR_WHIMSICAL_STAR, 1); y += GetFontHeight(); } if (fNumShown < 99) fNumShown++; } void Dialog::DrawItem(int x, int y, ODItem *item) { char text[132]; strcpy(text, item->text); strcat(text, item->suffix); // for replay times // comes first because it can trim the text on the left side if needed if (item->raligntext[0]) { int rx = (fCoords.x + fCoords.w) - 10; rx -= GetFontWidth(item->raligntext, 5); font_draw(rx, y, item->raligntext, 5); // ... ellipses if too long int maxx = (rx - 4); //FillRect(maxx, 0, maxx, SCREEN_HEIGHT, 0,255,0); for(;;) { int wd = GetFontWidth(text, 0); if (x+wd < maxx) break; int len = strlen(text); if (len <= 3) { *text = 0; break; } text[len-1] = 0; text[len-2] = '.'; text[len-3] = '.'; text[len-4] = '.'; } } font_draw(x, y, text, 0); // for key remaps if (item->righttext[0]) { font_draw((fCoords.x + fCoords.w) - 62, y, item->righttext, 0); } } /* void c------------------------------() {} */ void Dialog::RunInput() { if (inputs[UPKEY] || inputs[DOWNKEY]) { int dir = (inputs[DOWNKEY]) ? 1 : -1; if (!fRepeatTimer) { fRepeatTimer = (lastinputs[UPKEY] || lastinputs[DOWNKEY]) ? REPEAT_RATE : REPEAT_WAIT; sound(SND_MENU_MOVE); int nitems = fItems.CountItems(); for(;;) { fCurSel += dir; if (fCurSel < 0) fCurSel = (nitems - 1); else fCurSel %= nitems; ODItem *item = ItemAt(fCurSel); if (item && item->type != OD_SEPARATOR) break; } } else fRepeatTimer--; } else fRepeatTimer = 0; if (buttonjustpushed() || justpushed(RIGHTKEY) || justpushed(LEFTKEY)) { int dir = (!inputs[LEFTKEY] || buttonjustpushed() || justpushed(RIGHTKEY)) ? 1 : -1; ODItem *item = ItemAt(fCurSel); if (item) { if (item->type == OD_DISMISS) { if (dir > 0) { sound(SND_MENU_MOVE); if (ondismiss) (*ondismiss)(); return; } } else if (item->activate) { (*item->activate)(item, dir); if (item->update) (*item->update)(item); } } } /*if (justpushed(ESCKEY)) { Dismiss(); return; }*/ } void Dialog::SetSelection(int sel) { if (sel < 0) sel = fItems.CountItems(); if (sel >= fItems.CountItems()) sel = (fItems.CountItems() - 1); fCurSel = sel; } void Dialog::Dismiss() { delete this; } void Dialog::Refresh() { for(int i=0;ODItem *item = ItemAt(i);i++) { if (item->update) (*item->update)(item); } } void Dialog::Clear() { if (onclear) (*onclear)(); for(int i=0;ODItem *item = ItemAt(i);i++) delete item; fItems.MakeEmpty(); fNumShown = 0; fCurSel = 0; } ================================================ FILE: pause/dialog.fdh ================================================ //hash:fd95fe73 //automatically generated by Makegen /* located in tsc.cpp */ //-----------------[referenced from pause/dialog.cpp]----------------// void Clear(); /* located in input.cpp */ //-----------------[referenced from pause/dialog.cpp]----------------// bool buttonjustpushed(void); bool justpushed(int k); /* located in graphics/font.cpp */ //-----------------[referenced from pause/dialog.cpp]----------------// int GetFontHeight(); int GetFontWidth(const char *text, int spacing, bool is_shaded); int font_draw(int x, int y, const char *text, int spacing, NXFont *font); /* located in sound/sound.cpp */ //-----------------[referenced from pause/dialog.cpp]----------------// void sound(int snd); ================================================ FILE: pause/dialog.h ================================================ #ifndef _DIALOG_H #define _DIALOG_H #include "../common/BList.h" #include "options.h" namespace Options { class ODItem; enum OD_TYPES { OD_CHOICE, OD_SEPARATOR, OD_DISMISS }; class Dialog : public FocusHolder { public: Dialog(); ~Dialog(); ODItem *AddItem(const char *text, \ void (*activate)(ODItem *, int)=NULL, \ void (*update)(ODItem *)=NULL, int id=-1, int type=OD_CHOICE); ODItem *AddSeparator(); ODItem *AddDismissalItem(const char *text = NULL); void Draw(); void RunInput(); void Dismiss(); void Clear(); void Refresh(); void SetSize(int w, int h); void offset(int xd, int yd); ODItem *ItemAt(int index) { return (ODItem *)fItems.ItemAt(index); } void SetSelection(int sel); int GetSelection() { return fCurSel; } void ShowFull() { fNumShown = 99; } void (*onclear)(); void (*ondismiss)(); private: void DrawItem(int x, int y, ODItem *item); int fCurSel; int fNumShown; // for text-draw animation on entry int fRepeatTimer; BList fItems; struct { int x, y, w, h; } fCoords; int fTextX; bool fDismissOnFocus; }; struct ODItem { char text[100]; char suffix[32]; char righttext[64]; char raligntext[32]; int type, id; void (*update)(ODItem *item); void (*activate)(ODItem *item, int dir); }; } #endif ================================================ FILE: pause/message.cpp ================================================ #include "../nx.h" #include "message.h" #include "message.fdh" using namespace Options; extern FocusStack optionstack; extern int last_sdl_key; // from inputs.cpp #define MESSAGE_X ((SCREEN_WIDTH / 2) - 112) #define MESSAGE_Y ((SCREEN_HEIGHT / 2) - 30) #define MESSAGE_W 244 #define MESSAGE_H 48 Message::Message(const char *msg, const char *msg2) { rawKeyReturn = NULL; on_dismiss = NULL; last_sdl_key = -1; fMsg = strdup(msg); fMsg2 = strdup(msg2 ? msg2 : ""); fMsgX = MESSAGE_X + ((MESSAGE_W / 2) - (GetFontWidth(fMsg, 0) / 2)); if (fMsg2[0]) { fMsgY = MESSAGE_Y + 10; fMsg2X = MESSAGE_X + ((MESSAGE_W / 2) - (GetFontWidth(fMsg2, 0) / 2)); fMsg2Y = fMsgY + GetFontHeight() + 4; fShowDelay = 0; } else { fMsgY = (MESSAGE_Y + ((MESSAGE_H / 2) - (GetFontHeight() / 2))) - 1; fShowDelay = 4; } optionstack.AddItem(this); } Message::~Message() { optionstack.RemoveItem(this); free(fMsg); free(fMsg2); } /* void c------------------------------() {} */ void Message::Draw() { TextBox::DrawFrame(MESSAGE_X, MESSAGE_Y, MESSAGE_W, MESSAGE_H); if (fShowDelay > 0) { fShowDelay--; return; } font_draw(fMsgX, fMsgY, fMsg, 0); if (fMsg2[0]) font_draw(fMsg2X, fMsg2Y, fMsg2, 0); } void Message::RunInput() { if (last_sdl_key != -1) { if (rawKeyReturn) *rawKeyReturn = last_sdl_key; if (on_dismiss) (*on_dismiss)(this); delete this; } } ================================================ FILE: pause/message.fdh ================================================ //hash:b11f32f6 //automatically generated by Makegen /* located in graphics/font.cpp */ //-----------------[referenced from pause/message.cpp]---------------// int GetFontWidth(const char *text, int spacing, bool is_shaded); int GetFontHeight(); int font_draw(int x, int y, const char *text, int spacing, NXFont *font); ================================================ FILE: pause/message.h ================================================ #ifndef _MESSAGE_H #define _MESSAGE_H #include "options.h" namespace Options { class Message : public FocusHolder { public: Message(const char *msg, const char *msg2 = NULL); ~Message(); void Draw(); void RunInput(); int *rawKeyReturn; void (*on_dismiss)(Message *msg); private: char *fMsg, *fMsg2; int fMsgX, fMsgY; int fMsg2X, fMsg2Y; int fShowDelay; }; } #endif ================================================ FILE: pause/objects.cpp ================================================ // A miniature implementation of the object manager. // It runs the little "mascots" that come on the screen after a while in the options menu. #include "../nx.h" #include "../common/llist.h" #include "options.h" #include "objects.fdh" using namespace Options; Object *firstobj, *lastobj; #define OC_CONTROLLER 0 #define OC_QUOTE 1 #define OC_IKACHAN 2 void Options::init_objects() { firstobj = NULL; lastobj = NULL; create_object(0, 0, OC_CONTROLLER); } void Options::close_objects() { Object *o = firstobj; while(o) { Object *next = o->next; delete o; o = next; } firstobj = lastobj = NULL; } void Options::run_and_draw_objects(void) { void (*ai_routine[])(Object *) = { ai_oc_controller, ai_oc_quote, ai_oc_ikachan }; // draw character Object *o = firstobj; while(o) { (*ai_routine[o->type])(o); Object *next = o->next; // cull deleted if (o->deleted) { LL_REMOVE(o, prev, next, firstobj, lastobj); delete o; } else if (o->sprite != SPR_NULL) { o->x += o->xinertia; o->y += o->yinertia; draw_sprite(o->x >> CSF, o->y >> CSF, o->sprite, o->frame, o->dir); } o = next; } } Object *Options::create_object(int x, int y, int type) { static Object ZERO; Object *o = new Object; *o = ZERO; o->x = x; o->y = y; o->type = type; LL_ADD_END(o, prev, next, firstobj, lastobj); return o; } /* void c------------------------------() {} */ static void ai_oc_controller(Object *o) { //AIDEBUG; switch(o->state) { case 0: // init { o->timer = 400; o->state = 1; } break; case 1: // delay before next event { if (--o->timer <= 0) { o->state = (++o->timer2 * 10); o->timer = 0; if (o->timer2 >= 2) o->timer2 = 0; } } break; case 10: // quote { create_object(0, 0, OC_QUOTE); o->timer = 1100; o->state = 1; } break; case 20: // ikachans { o->timer++; // current /*if (o->timer < 175) { if ((o->timer % 6) == 1) create_object(-16<timer <= 150) { if ((o->timer % 10) == 1) create_object(-16<timer > 300) o->state = 0; } break; } } static void ai_oc_quote(Object *o) { //AIDEBUG; switch(o->state) { case 0: { o->xmark = (SCREEN_WIDTH - 50) << CSF; o->xmark2 = (SCREEN_WIDTH + 10) << CSF; o->x = o->xmark2; o->y = (SCREEN_HEIGHT - sprites[o->sprite].h - 8) << CSF; o->dir = LEFT; o->sprite = SPR_OC_QUOTE; o->state = 20; } break; case 20: { o->dir = LEFT; o->timer = 0; o->animtimer = 2; o->state = 21; } case 21: { if (o->x > o->xmark) { ANIMATE(8, 0, 3); XMOVE(0x100); } else { o->frame = 0; o->xinertia = 0; if (++o->timer > 20) { o->state = 22; o->timer = 0; o->frame = 4; } } } break; case 22: { o->timer++; if (o->timer == 100) o->frame = 0; if (o->timer > 130) { o->state = 30; o->timer = 0; o->dir = RIGHT; } } break; case 30: { ANIMATE(8, 0, 3); XMOVE(0x100); if (o->x > o->xmark2) o->deleted = true; } break; } } static void ai_oc_ikachan(Object *o) { switch(o->state) { case 0: { o->state = 1; o->timer = random(3, 20); o->sprite = SPR_IKACHAN; } case 1: // he pushes ahead { if (--o->timer <= 0) { o->state = 2; o->timer = random(10, 50); o->frame = 1; o->xinertia = 0x600; } } break; case 2: // after a short time his tentacles look less whooshed-back { if (--o->timer <= 0) { o->state = 3; o->timer = random(40, 50); o->frame = 2; o->yinertia = random(-0x100, 0x100); } } break; case 3: // gliding { if (--o->timer <= 0) { o->state = 1; o->timer = 0; o->frame = 0; } o->xinertia -= 0x10; } break; } if (o->x > SCREEN_WIDTH<deleted = true; } /* static void ai_oc_current(Object *o) { o->sprite = SPR_WATER_DROPLET; o->frame = random(0, 4); o->xinertia = 0x400; if (o->x > SCREEN_WIDTH<deleted = true; } */ ================================================ FILE: pause/objects.fdh ================================================ //hash:721c5ba0 //automatically generated by Makegen /* located in pause/objects.cpp */ //-----------------[referenced from pause/objects.cpp]---------------// static void ai_oc_controller(Object *o); static void ai_oc_quote(Object *o); static void ai_oc_ikachan(Object *o); /* located in common/misc.cpp */ //-----------------[referenced from pause/objects.cpp]---------------// int random(int min, int max); ================================================ FILE: pause/options.cpp ================================================ #include "../nx.h" #include "../replay.h" #include "options.h" #include "dialog.h" #include "message.h" #include "../l10n_strings.h" using namespace Options; #include "options.fdh" FocusStack optionstack; #define SLIDE_SPEED 32 #define SLIDE_DIST (3 * SLIDE_SPEED) static struct { Dialog *dlg, *subdlg; Dialog *dismiss_on_focus; int mm_cursel; bool InMainMenu; int xoffset; int selected_replay; int remapping_key, new_sdl_key; } opt; bool options_init(int retmode) { memset(&opt, 0, sizeof(opt)); Options::init_objects(); opt.dlg = new Dialog; opt.xoffset = SLIDE_DIST; opt.dlg->offset(-SLIDE_DIST, 0); EnterMainMenu(); opt.dlg->ondismiss = DialogDismissed; opt.dlg->ShowFull(); #if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX) inputs[OPTIONS_KEY] = 0; #else inputs[F3KEY] = 0; #endif sound(SND_MENU_MOVE); return 0; } void options_close() { Options::close_objects(); while(FocusHolder *fh = optionstack.ItemAt(0)) delete fh; settings_save(); } /* void c------------------------------() {} */ void options_tick() { int i; FocusHolder *fh; #if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX) if (justpushed(OPTIONS_KEY)) #else if (justpushed(F3KEY)) #endif { game.pause(0); return; } ClearScreen(BLACK); Options::run_and_draw_objects(); fh = optionstack.ItemAt(optionstack.CountItems() - 1); if (fh) { fh->RunInput(); if (game.paused != GP_OPTIONS) return; fh = optionstack.ItemAt(optionstack.CountItems() - 1); if (fh == opt.dismiss_on_focus && fh) { opt.dismiss_on_focus = NULL; delete fh; } } for(i=0;;i++) { fh = optionstack.ItemAt(i); if (!fh) break; fh->Draw(); } if (opt.xoffset > 0) { opt.dlg->offset(SLIDE_SPEED, 0); opt.xoffset -= SLIDE_SPEED; } } /* void c------------------------------() {} */ void DialogDismissed() { if (opt.InMainMenu) { memset(inputs, 0, sizeof(inputs)); game.pause(false); } else { EnterMainMenu(); } } /* void c------------------------------() {} */ static void EnterMainMenu() { Dialog *dlg = opt.dlg; dlg->Clear(); dlg->AddItem(LC_RES, _res_change, _res_get); dlg->AddItem(LC_KEYS, EnterControlsMenu); dlg->AddItem(LC_REPLAY, EnterReplayMenu); dlg->AddSeparator(); #if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX) dlg->AddItem(LC_DEBUG, EnterDebugMenu); #else dlg->AddItem(LC_DEBUG_KEYS, _debug_change, _debug_get); #endif dlg->AddItem(LC_SAVE_SLOTS, _save_change, _save_get); dlg->AddSeparator(); dlg->AddItem(LC_MUSIC, _music_change, _music_get); dlg->AddItem(LC_SOUND, _sound_change, _sound_get); dlg->AddSeparator(); dlg->AddDismissalItem(); dlg->SetSelection(opt.mm_cursel); dlg->onclear = LeavingMainMenu; opt.InMainMenu = true; } void LeavingMainMenu() { opt.mm_cursel = opt.dlg->GetSelection(); opt.dlg->onclear = NULL; opt.InMainMenu = false; } void _res_get(ODItem *item) { const char **reslist = Graphics::GetResolutions(); if (settings->resolution < 0 || \ settings->resolution >= count_string_list(reslist)) { item->suffix[0] = 0; } else { #if defined (_480X272) || defined (_320X240) strcpy(item->suffix, reslist[0]); #else strcpy(item->suffix, reslist[settings->resolution]); #endif } } void _res_change(ODItem *item, int dir) { const char **reslist = Graphics::GetResolutions(); int numres = count_string_list(reslist); int newres; sound(SND_DOOR); newres = (settings->resolution + dir); if (newres >= numres) newres = 0; if (newres < 0) newres = (numres - 1); // because on my computer, a SDL bug causes switching to fullscreen to // not restore the resolution properly on exit, and it keeps messing up all // the windows when I press it accidently. if (newres == 0 && settings->inhibit_fullscreen) { new Message(LC_FULLSCREEN_DIS, LC_FULLSCREEN_CON); sound(SND_GUN_CLICK); return; } #if (defined(_L10N_CP1251) && (!defined (_480X272) || !defined (_320X240))) || defined(__HAIKU__) // L10N Hack if (newres == 1) { new Message(LC_RES_FAILED_320); return; } #endif if (!Graphics::SetResolution(newres, true)) { #if defined (_480X272) || defined (_320X240) settings->resolution = 0; #else settings->resolution = newres; #endif } else { new Message(LC_RES_FAILED); sound(SND_GUN_CLICK); } } /************ DEBUG MENU ************/ static void EnterDebugMenu(ODItem *item, int dir) { Dialog *dlg = opt.dlg; dlg->Clear(); sound(SND_MENU_MOVE); dlg->AddItem(LC_FPS, _fps_change, _fps_get); dlg->AddItem(LC_GODMODE, _godmode, _godmode_get); dlg->AddItem(LC_BOXES, _drawBoxes, _drawBoxes_get); dlg->AddSeparator(); dlg->AddItem(LC_ADDEXP, _add_xp); dlg->AddItem(LC_SAVE_NOW, _save_now); // dlg->AddItem("Disable Debug Features", _disable_debug); dlg->AddSeparator(); dlg->AddDismissalItem(); } void _godmode(ODItem *item, int dir) { if (!(settings->enable_debug_keys)) { settings->enable_debug_keys = true; } game.debug.god ^= 1; sound(SND_MENU_SELECT); } void _godmode_get(ODItem *item) { static const char *strs[] = { "", " =" }; strcpy(item->suffix, strs[game.debug.god]); } void _fps_change(ODItem *item, int dir) { settings->show_fps ^= 1; sound(SND_MENU_SELECT); } void _fps_get(ODItem *item) { static const char *strs[] = { "", " =" }; strcpy(item->suffix, strs[settings->show_fps]); } void _save_now(ODItem *item, int dir) { game_save(settings->last_save_slot); sound(SND_MENU_SELECT); console.Print("Game saved."); } void _drawBoxes(ODItem *item, int dir) { if (!(settings->enable_debug_keys)) { settings->enable_debug_keys = true; } game.debug.DrawBoundingBoxes ^= 1; sound(SND_MENU_SELECT); } void _drawBoxes_get(ODItem *item) { static const char *strs[] = { "", " =" }; strcpy(item->suffix, strs[game.debug.DrawBoundingBoxes]); } void _add_xp(ODItem *item, int dir) { AddXP(1); } void _disable_debug(ODItem *item, int dir) { if(settings->enable_debug_keys) { game.debug.god = false; game.debug.DrawBoundingBoxes = false; settings->enable_debug_keys = false; settings->show_fps = false; sound(SND_MENU_SELECT); } } /************ END DEBUG MENU ************/ void _debug_change(ODItem *item, int dir) { settings->enable_debug_keys ^= 1; sound(SND_MENU_SELECT); } void _debug_get(ODItem *item) { static const char *strs[] = { "", " =" }; strcpy(item->suffix, strs[settings->enable_debug_keys]); } void _save_change(ODItem *item, int dir) { settings->multisave ^= 1; sound(SND_MENU_MOVE); } void _save_get(ODItem *item) { static const char *strs[] = { "1", "5" }; strcpy(item->suffix, strs[settings->multisave]); } void _sound_change(ODItem *item, int dir) { settings->sound_enabled ^= 1; sound(SND_MENU_SELECT); } void _sound_get(ODItem *item) { static const char *strs[] = { LC_OFF, LC_ON }; strcpy(item->suffix, strs[settings->sound_enabled]); } void _music_change(ODItem *item, int dir) { music_set_enabled((settings->music_enabled + 1) % 3); sound(SND_MENU_SELECT); } void _music_get(ODItem *item) { static const char *strs[] = { LC_OFF, LC_ON, LC_BOSS_ONLY }; strcpy(item->suffix, strs[settings->music_enabled]); } /* void c------------------------------() {} */ static void EnterReplayMenu(ODItem *item, int dir) { Dialog *dlg = opt.dlg; ReplaySlotInfo slot; bool have_replays = false; dlg->Clear(); sound(SND_MENU_MOVE); for(int i=0;iAddItem(mapname, EnterReplaySubmenu, _upd_replay, i); have_replays = true; } } if (!have_replays) dlg->AddDismissalItem(LC_NO_RPL); dlg->AddSeparator(); dlg->AddDismissalItem(); } void _upd_replay(ODItem *item) { ReplaySlotInfo slot; Replay::GetSlotInfo(item->id, &slot); Replay::FramesToTime(slot.hdr.total_frames, &item->raligntext[1]); item->raligntext[0] = (slot.hdr.locked) ? '=':' '; } /* void c------------------------------() {} */ void EnterReplaySubmenu(ODItem *item, int dir) { opt.selected_replay = item->id; sound(SND_MENU_MOVE); opt.subdlg = new Dialog; opt.subdlg->SetSize(80, 60); opt.subdlg->AddItem(LC_PLAY, _play_replay); opt.subdlg->AddItem(LC_KEEP, _keep_replay); } void _keep_replay(ODItem *item, int dir) { char fname[MAXPATHLEN]; ReplayHeader hdr; GetReplayName(opt.selected_replay, fname); if (Replay::LoadHeader(fname, &hdr)) { new Message(LC_FAIL_LOAD_HEADER); sound(SND_GUN_CLICK); opt.dismiss_on_focus = opt.subdlg; return; } hdr.locked ^= 1; if (Replay::SaveHeader(fname, &hdr)) { new Message(LC_FAIL_WRITE_HEADER); sound(SND_GUN_CLICK); opt.dismiss_on_focus = opt.subdlg; return; } sound(SND_MENU_MOVE); opt.subdlg->Dismiss(); opt.dlg->Refresh(); } void _play_replay(ODItem *item, int dir) { game.switchstage.param = opt.selected_replay; game.switchmap(START_REPLAY); game.setmode(GM_NORMAL); game.pause(false); } /* void c------------------------------() {} */ static void EnterControlsMenu(ODItem *item, int dir) { Dialog *dlg = opt.dlg; dlg->Clear(); sound(SND_MENU_MOVE); dlg->AddItem(LC_KB_LEFT, _edit_control, _upd_control, LEFTKEY); dlg->AddItem(LC_KB_RIGHT, _edit_control, _upd_control, RIGHTKEY); dlg->AddItem(LC_KB_UP, _edit_control, _upd_control, UPKEY); dlg->AddItem(LC_KB_DOWN, _edit_control, _upd_control, DOWNKEY); #ifndef _L10N_CP1251 dlg->AddSeparator(); #endif dlg->AddItem(LC_KB_JUMP, _edit_control, _upd_control, JUMPKEY); dlg->AddItem(LC_KB_FIRE, _edit_control, _upd_control, FIREKEY); dlg->AddItem(LC_KB_WPN_PREV, _edit_control, _upd_control, PREVWPNKEY); dlg->AddItem(LC_KB_WPN_NEXT, _edit_control, _upd_control, NEXTWPNKEY); dlg->AddItem(LC_KB_INV, _edit_control, _upd_control, INVENTORYKEY); dlg->AddItem(LC_KB_MAP, _edit_control, _upd_control, MAPSYSTEMKEY); #ifndef _L10N_CP1251 dlg->AddSeparator(); #endif dlg->AddDismissalItem(); } static void _upd_control(ODItem *item) { int keysym = input_get_mapping(item->id); const char *keyname = SDL_GetKeyName((SDLKey)keysym); maxcpy(item->righttext, keyname, sizeof(item->righttext) - 1); } static void _edit_control(ODItem *item, int dir) { Message *msg; opt.remapping_key = item->id; opt.new_sdl_key = -1; msg = new Message(LC_KB_NEW_KEY, input_get_name(opt.remapping_key)); msg->rawKeyReturn = &opt.new_sdl_key; msg->on_dismiss = _finish_control_edit; sound(SND_DOOR); } static void _finish_control_edit(Message *msg) { int inputno = opt.remapping_key; int new_sdl_key = opt.new_sdl_key; int i; if (input_get_mapping(inputno) == new_sdl_key) { sound(SND_MENU_MOVE); return; } // check if key is already in use for(i=0;iRefresh(); } ================================================ FILE: pause/options.fdh ================================================ //hash:7ce8659a //automatically generated by Makegen /* located in map.cpp */ //-----------------[referenced from pause/options.cpp]---------------// const char *map_get_stage_name(int mapno); /* located in settings.cpp */ //-----------------[referenced from pause/options.cpp]---------------// bool settings_save(Settings *setfile); /* located in tsc.cpp */ //-----------------[referenced from pause/options.cpp]---------------// void Clear(); /* located in input.cpp */ //-----------------[referenced from pause/options.cpp]---------------// bool justpushed(int k); int input_get_mapping(int keyindex); const char *input_get_name(int index); void input_remap(int keyindex, int sdl_key); /* located in replay.cpp */ //-----------------[referenced from pause/options.cpp]---------------// const char *GetReplayName(int slotno, char *buffer); /* located in pause/options.cpp */ //-----------------[referenced from pause/options.cpp]---------------// bool options_init(int retmode); void options_close(); void options_tick(); void DialogDismissed(); static void EnterMainMenu(); void LeavingMainMenu(); void _res_get(ODItem *item); void _res_change(ODItem *item, int dir); static void EnterDebugMenu(ODItem *item, int dir); void _godmode(ODItem *item, int dir); void _godmode_get(ODItem *item); void _fps_change(ODItem *item, int dir); void _fps_get(ODItem *item); void _save_now(ODItem *item, int dir); void _drawBoxes(ODItem *item, int dir); void _drawBoxes_get(ODItem *item); void _add_xp(ODItem *item, int dir); void _debug_change(ODItem *item, int dir); void _debug_get(ODItem *item); void _save_change(ODItem *item, int dir); void _save_get(ODItem *item); void _sound_change(ODItem *item, int dir); void _sound_get(ODItem *item); void _music_change(ODItem *item, int dir); void _music_get(ODItem *item); void _disable_debug(ODItem *item, int dir); static void EnterReplayMenu(ODItem *item, int dir); void _upd_replay(ODItem *item); void EnterReplaySubmenu(ODItem *item, int dir); void _keep_replay(ODItem *item, int dir); void _play_replay(ODItem *item, int dir); static void EnterControlsMenu(ODItem *item, int dir); static void _upd_control(ODItem *item); static void _edit_control(ODItem *item, int dir); static void _finish_control_edit(Message *msg); /* located in sound/sound.cpp */ //-----------------[referenced from pause/options.cpp]---------------// void sound(int snd); void music_set_enabled(int newstate); /* located in common/misc.cpp */ //-----------------[referenced from pause/options.cpp]---------------// int count_string_list(const char *list[]); void maxcpy(char *dst, const char *src, int maxlen); ================================================ FILE: pause/options.h ================================================ #ifndef _OPTIONS_H #define _OPTIONS_H namespace Options { // class for something like a dialog box that can hold the focus. // there is a stack of them. everyone in the stack is drawn, // and the topmost one receives HandleKey events. class FocusHolder { public: virtual ~FocusHolder() { } virtual void Draw() = 0; virtual void RunInput() = 0; }; class FocusStack : public BList { public: FocusHolder *ItemAt(int index) { return (FocusHolder *)BList::ItemAt(index); } }; void init_objects(); void close_objects(); void run_and_draw_objects(void); Object *create_object(int x, int y, int type); }; // end namespace bool options_init(int param); void options_tick(void); void options_close(void); #endif ================================================ FILE: pause/pause.cpp ================================================ #include "../nx.h" #include "pause.fdh" #include "../l10n_strings.h" bool pause_init(int param) { memset(lastinputs, 1, sizeof(lastinputs)); return 0; } void pause_tick() { #ifdef _DINGUX ClearScreen(DK_BLUE); const char *strMenu = "Select:Quit / B:Resume / A:Reset"; int cx = (SCREEN_WIDTH / 2) - (GetFontWidth(strMenu, 0) / 2) - 4; int cy = (SCREEN_HEIGHT / 2) - GetFontHeight(); int f3wd = font_draw(cx, cy, "Select", 0); int f3wd1 = font_draw(f3wd + cx, cy, LC_PS_QUIT, 0, &bluefont); int f3wd2 = font_draw(f3wd1 + f3wd + cx, cy, " / B", 0); int f3wd3 = font_draw(f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESUME, 0, &bluefont); int f3wd4 = font_draw(f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, " / A", 0); font_draw(f3wd4 + f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESET, 0, &bluefont); #elif _MOTOMAGX ClearScreen(DK_BLUE); const char *strMenu = "Camera:Quit / Center:Resume / Vol+:Reset"; int cx = (SCREEN_WIDTH / 2) - (GetFontWidth(strMenu, 0) / 2) - 4; int cy = (SCREEN_HEIGHT / 2) - GetFontHeight(); int f3wd = font_draw(cx, cy, "Camera", 0); int f3wd1 = font_draw(f3wd + cx, cy, LC_PS_QUIT, 0, &bluefont); int f3wd2 = font_draw(f3wd1 + f3wd + cx, cy, " / Center", 0); int f3wd3 = font_draw(f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESUME, 0, &bluefont); int f3wd4 = font_draw(f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, " / Vol+", 0); font_draw(f3wd4 + f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESET, 0, &bluefont); #elif _MOTOEZX ClearScreen(DK_BLUE); const char *strMenu = "Camera:Quit / Vol-:Resume / Vol+:Reset"; int cx = (SCREEN_WIDTH / 2) - (GetFontWidth(strMenu, 0) / 2) - 4; int cy = (SCREEN_HEIGHT / 2) - GetFontHeight(); int f3wd = font_draw(cx, cy, "Camera", 0); int f3wd1 = font_draw(f3wd + cx, cy, LC_PS_QUIT, 0, &bluefont); int f3wd2 = font_draw(f3wd1 + f3wd + cx, cy, " / Vol-", 0); int f3wd3 = font_draw(f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESUME, 0, &bluefont); int f3wd4 = font_draw(f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, " / Vol+", 0); font_draw(f3wd4 + f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESET, 0, &bluefont); #elif defined(_L10N_CP1251) && !defined(_DINGUX) && !defined(_MOTOMAGX) && !defined(_MOTOEZX) ClearScreen(BLACK); const char *strMenu = "ESC:Quit / F1:Resume / F2:Reset"; int cx = (SCREEN_WIDTH / 2) - (GetFontWidth(strMenu, 0) / 2) - 4; int cy = (SCREEN_HEIGHT / 2) - GetFontHeight(); int f3wd = font_draw(cx, cy, "ESC", 0); int f3wd1 = font_draw(f3wd + cx, cy, LC_PS_QUIT, 0, &bluefont); int f3wd2 = font_draw(f3wd1 + f3wd + cx, cy, " / F1", 0); int f3wd3 = font_draw(f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESUME, 0, &bluefont); int f3wd4 = font_draw(f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, " / F2", 0); font_draw(f3wd4 + f3wd3 + f3wd2 + f3wd1 + f3wd + cx, cy, LC_PS_RESET, 0, &bluefont); #else ClearScreen(BLACK); int cx = (SCREEN_WIDTH / 2) - (sprites[SPR_RESETPROMPT].w / 2); int cy = (SCREEN_HEIGHT / 2) - (sprites[SPR_RESETPROMPT].h / 2); int f3wd = 0; draw_sprite(cx, cy, SPR_RESETPROMPT); #endif #ifdef _DINGUX const char *str = "L:Options"; cx = (SCREEN_WIDTH / 2) - (GetFontWidth(str, 0) / 2) - 4; cy = (SCREEN_HEIGHT - 8) - GetFontHeight(); f3wd = font_draw(cx, cy, "L", 0); #elif _MOTOMAGX const char *str = "#:Options"; cx = (SCREEN_WIDTH / 2) - (GetFontWidth(str, 0) / 2) - 4; cy = (SCREEN_HEIGHT - 8) - GetFontHeight(); f3wd = font_draw(cx, cy, "#", 0); #elif _MOTOEZX const char *str = "Mod + Camera:Options"; cx = (SCREEN_WIDTH / 2) - (GetFontWidth(str, 0) / 2) - 4; cy = (SCREEN_HEIGHT - 8) - GetFontHeight(); f3wd = font_draw(cx, cy, "Mod + Camera", 0); #else const char *str = "F3:Options"; cx = (SCREEN_WIDTH / 2) - (GetFontWidth(str, 0) / 2) - 4; cy = (SCREEN_HEIGHT - 8) - GetFontHeight(); f3wd = font_draw(cx, cy, "F3", 0); #endif font_draw(cx + f3wd, cy, LC_PS_OPTIONS, 0, &bluefont); #if defined (_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX) #define F1KEY FIREKEY #define F2KEY JUMPKEY #endif // resume if (justpushed(F1KEY)) { lastinputs[F1KEY] = true; game.pause(false); return; } // reset if (justpushed(F2KEY)) { lastinputs[F2KEY] = true; game.reset(); return; } // exit if (justpushed(ESCKEY)) { lastinputs[ESCKEY] = true; game.running = false; return; } } ================================================ FILE: pause/pause.fdh ================================================ //hash:f8b50229 //automatically generated by Makegen /* located in input.cpp */ //------------------[referenced from pause/pause.cpp]----------------// bool justpushed(int k); /* located in pause/pause.cpp */ //------------------[referenced from pause/pause.cpp]----------------// bool pause_init(int param); void pause_tick(); /* located in graphics/font.cpp */ //------------------[referenced from pause/pause.cpp]----------------// int GetFontWidth(const char *text, int spacing, bool is_shaded); int GetFontHeight(); int font_draw(int x, int y, const char *text, int spacing, NXFont *font); ================================================ FILE: pause/pause.h ================================================ #ifndef _PAUSE_H #define _PAUSE_H bool pause_init(int retmode); void pause_tick(void); #endif ================================================ FILE: platform/EZX/EZX_SDL_PollEvent.cpp ================================================ #include "EZX_SDL_PollEvent.h" #include SDL_AudioSpec EZX_SDL_obtained; bool EZX_SDL_qAudioSuspend; void EZX_SDL_mix_CloseAudio(void); int EZX_SDL_PollEvent(SDL_Event *event) { int result = SDL_PollEvent(event); if (!result) { return 0; } if (event->type == SDL_ACTIVEEVENT) { if (event->active.state == SDL_APPINPUTFOCUS && !event->active.gain) { EZX_SDL_mix_SuspendAudio(); // Use SDL_mixer for (;;) { result = SDL_WaitEvent(event); if (!result) { continue; } if (event->type == SDL_QUIT) { return 1; } if (event->type != SDL_ACTIVEEVENT) { continue; } if (event->active.state == SDL_APPINPUTFOCUS && event->active.gain) { EZX_SDL_mix_ResumeAudio(); // Use SDL_mixer return 1; } } } } return result; } // Audio through SDL void EZX_SDL_SuspendAudio() { SDL_CloseAudio(); EZX_SDL_qAudioSuspend = true; } int EZX_SDL_ResumeAudio() { if (SDL_OpenAudio(&EZX_SDL_obtained, NULL) < 0) { return -1; } SDL_PauseAudio(0); EZX_SDL_qAudioSuspend = false; return 0; } // Audio through SDL_mixer void EZX_SDL_mix_SuspendAudio() { Mix_SuspendAudio(); } int EZX_SDL_mix_ResumeAudio() { int result = Mix_ResumeAudio(); if (result == (-1)) { EZX_SDL_mix_CloseAudio(); return (-1); } } void EZX_SDL_mix_CloseAudio(void) { Mix_CloseAudio(); } ================================================ FILE: platform/EZX/EZX_SDL_PollEvent.h ================================================ #ifndef EZX_SDL_POLLEVENT #define EZX_SDL_POLLEVENT #include int EZX_SDL_PollEvent(SDL_Event *event); // Audio through SDL void EZX_SDL_SuspendAudio(); int EZX_SDL_ResumeAudio(); // Audio through SDL_mixer void EZX_SDL_mix_SuspendAudio(); int EZX_SDL_mix_ResumeAudio(); #endif // EZX_SDL_POLLEVENT ================================================ FILE: platform/EZX/NXEngine.desktop ================================================ [Desktop Entry] Name=Cave Story Version=1.0.0.4-Rev4 Description=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. Author=Cave Story: Daisuke "Pixel" Amaya; NXEngine: Caitlin "rogueeve" Shaw. Comment=Ported to EZX (A1200, A1600, E2, E6) by EXL, 16-FEB-2015 Vendor=forum.motofan.ru Exec=run.sh BigIcon=icon_ezx_big.png Icon=icon_ezx_small.png Type=Application Category=Games Shared=2 ================================================ FILE: platform/EZX/run.sh ================================================ #!/bin/bash here=`echo $0 | sed -e 's/\/'$(basename $0)'$//'`; if [ "$here" = "`basename $0`" ]; then here="`pwd`"; fi . /home/native/.profile GAMES=/mmc/mmca1/games app="nx.ezx" export HOME=$here mkdir -p $GAMES/logs if [ -f $GAMES/gamesrc ]; then . $GAMES/gamesrc else export LD_LIBRARY_PATH=$GAMES/lib:$LD_LIBRARY_PATH #export SDL_QT_INVERT_ROTATION=1 fi cd $here if [ ! -f "$here/$app" ]; then echo "ERROR: The application binary is missing!" > $GAMES/logs/$app.log 2>&1 exit 1 fi sleep 1 exec $here/$app > $GAMES/logs/$app.log 2>&1 ================================================ FILE: platform/Haiku/NXEngine.sh ================================================ #!/bin/bash if [[ `locale -l` == ru* ]] ; then EXE="`finddir B_SYSTEM_APPS_DIRECTORY`/NXEngine/RUS/Cave Story" else EXE="`finddir B_SYSTEM_APPS_DIRECTORY`/NXEngine/ENG/Cave Story" fi "$EXE" $@ ================================================ FILE: platform/Haiku/nxengine.rdef.in ================================================ resource app_flags B_SINGLE_LAUNCH; resource app_version { major = @MAJOR@, middle = @MIDDLE@, minor = @MINOR@, variety = B_APPV_FINAL, internal = 0, short_info = "NXEngine", long_info = "@LONG_INFO@" }; resource app_signature "@APP_SIGNATURE@"; resource vector_icon array { $"6E6369660803A9BDC503A9824A03DAEFDE030110010394A7AD038A9DA0032946" $"560501020A20284E284C264C262C282C282A5A2A5A2C5C2C5C2E5E2E5E4C5C4C" $"5C4E5A4E5A5058505854565456564A564A4E3E4E3E523C523C543A543A562E56" $"2E523052304E0A043030305050505030390A0701001001158402040A00010102" $"40C000000000000000400000C78000C3FFFF0A010101023A0000000000000000" $"400000470000C400000A010101023A00000000000000004000004A8000C40000" $"0A020101023C00000000000000003C000046000048C0000A020101023C000000" $"00000000003C00004A400048C0000A020101023800000000000000003A00004A" $"50004940000A020101023800000000000000003A00004AF0004940000A020101" $"023800000000000000003A00004640004940000A020101023800000000000000" $"003A00004860004940000A020101023800000000000000003A000047400048C0" $"000A020101023800000000000000003A00004A900048C0000A03010102380000" $"0000000000003BFFFF47400048C0000A030101023800000000000000003BFFFF" $"4A900048C0000A030101023C000000000000000037FFFF4A3FFF48A0000A0301" $"01023C000000000000000037FFFF45FFFF48A0000A0301010238000000000000" $"000037FFFF463FFF48E0000A0301010238000000000000000037FFFF485FFF48" $"E0000A0301010238000000000000000037FFFF4A4FFF48E0000A030101023800" $"0000000000000037FFFF4AEFFF48E0000A030101023E80000000000000003A00" $"00467FFF4A20000A030101023E0000000000000000380000477FFF4A70000A05" $"01010238000000000000000038000046400048A0000A05010102380000000000" $"00000038000048600048A0000A050101023800000000000000003800004A5000" $"48A0000A050101023800000000000000003800004AF00048A0000A0401010238" $"00000000000000003800004AD00048E0000A0401010238000000000000000038" $"00004A700048E0000A0401010238000000000000000038000048200048E0000A" $"0401010238000000000000000038000046C00048E0000A040101023800000000" $"000000003800004640004740000A050101023800000000000000003800004580" $"0046C0000A060101023800000000000000003800004480004A90000A06010102" $"3800000000000000003800004B30004A90000A06010102380000000000000000" $"3800004B30004640000A0001010238000000000000000038000047C00048E000" $"0A000101023800000000000000003800004AB00048E0000A0601010238000000" $"00000000003F80004580000822220A06010102408000000000000000380000C6" $"800046C0000A020101023800000000000000003FC000448000C300000A020101" $"023800000000000000003FC0004B3000C300000A0201010240C0000000000000" $"00B80000C780004740000A0601010240C000000000000000B80000C780004AF0" $"000A060101023D8000000000000000BA00004640004B40000A060101023C0000" $"000000000000B800004800004B50000A060101023D0000000000000000B80000" $"4600004B70000A060101023D0000000000000000BC80004A40004BB0000A0601" $"0102380000000000000000C0A0004B50004C48000A0601010238000000000000" $"0000C060004B70004C18000A06010102380000000000000000C020004B90004B" $"F0000A06010102380000000000000000BFC0004BB0004BB0000A020101023C00" $"00000000000000B8000044FFFF4AD0000A000101023C0000000000000000B800" $"004680004B50000A000101023C8000000000000000B800004A50004B50000A02" $"0101023C8000000000000000B800004A50004AD0000A01010102380000000000" $"0000003DC0004B900047E0000A030101023800000000000000003E5FFF4B7000" $"46E000" }; ================================================ FILE: platform/Linux/vbesync.c ================================================ #include #include #if 0 #include #endif #include #define DRM_VBLANK_RELATIVE 0x1 #if 0 void platform_sync_to_vblank(void) { static char initilized = 0; static int fd; int ret; if (!initilized) { initilized = 1; printf("Linux vbesync: opening DRM card interface...\n"); fd = open("/dev/dri/card0", O_RDWR); if (fd == -1) { printf("Failed to open DRM interface; sync-to-vblank will not be done.\n"); return; } printf("Linux vbesync: DRM-based sync-to-vblank activated.\n"); } else if (fd == -1) { return; } drm_wait_vblank_t vbl; vbl.request.type = DRM_VBLANK_RELATIVE; vbl.request.sequence = 1; do { ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl); vbl.request.type &= ~DRM_VBLANK_RELATIVE; } while(ret && errno == EINTR); } #endif ================================================ FILE: platform/Linux/vbesync.fdh ================================================ //hash:3d032dcf //automatically generated by Makegen /* located in platform/Linux/vbesync.c */ //-------------[referenced from platform/Linux/vbesync.c]------------// void platform_sync_to_vblank(void); ================================================ FILE: platform.cpp ================================================ #include #include #include "config.h" #include "platform.fdh" #ifndef __SDLSHIM__ FILE *fileopen(const char *fname, const char *mode) { return fopen(fname, mode); } #else FILE *fileopen(const char *fname, const char *mode) { return SDLS_fopen(fname, mode); } #endif ================================================ FILE: platform.fdh ================================================ //hash:19a15e6b //automatically generated by Makegen /* located in platform.cpp */ //-------------------[referenced from platform.cpp]------------------// FILE *fileopen(const char *fname, const char *mode); FILE *fileopen(const char *fname, const char *mode); ================================================ FILE: platform.h ================================================ #ifndef _PLATFORM_H #define _PLATFORM_H extern "C" { void platform_sync_to_vblank(void); }; #endif ================================================ FILE: player.cpp ================================================ #include "nx.h" #include "inventory.h" #include "playerstats.fdh" #include "player.fdh" Player *player = NULL; static void InitWeapon(int wpn, int l1, int l2, int l3, int maxammo=0); bool pinputs[INPUT_COUNT]; bool lastpinputs[INPUT_COUNT]; void PInitFirstTime() { player->dir = RIGHT; player->hp = player->maxHealth = 3; player->nxflags |= NXFLAG_FOLLOW_SLOPE; player->ninventory = 0; memset(player->weapons, 0, sizeof(player->weapons)); InitWeapon(WPN_POLARSTAR, 10, 20, 10); InitWeapon(WPN_MGUN, 30, 40, 10, 100); InitWeapon(WPN_MISSILE, 10, 20, 10, 10); InitWeapon(WPN_FIREBALL, 10, 20, 20); InitWeapon(WPN_BLADE, 15, 18, 0); InitWeapon(WPN_BUBBLER, 10, 20, 5); InitWeapon(WPN_SUPER_MISSILE, 30, 60, 10, 10); InitWeapon(WPN_SNAKE, 30, 40, 16); InitWeapon(WPN_SPUR, 40, 60, 200); InitWeapon(WPN_NEMESIS, 1, 1, 0); player->weapons[WPN_MGUN].SetFireRate(6, 6, 6); player->weapons[WPN_MGUN].SetRechargeRate(5, 5, 5); player->weapons[WPN_BUBBLER].SetFireRate(0, 7, 7); player->weapons[WPN_BUBBLER].SetRechargeRate(20, 1, 1); player->curWeapon = WPN_NONE; if (player->XPText) delete player->XPText; player->XPText = new FloatText(SPR_WHITENUMBERS); // initialize player repel points PInitRepel(); } static void InitWeapon(int wpn, int l1, int l2, int l3, int maxammo) { player->weapons[wpn].max_xp[0] = l1; player->weapons[wpn].max_xp[1] = l2; player->weapons[wpn].max_xp[2] = l3; player->weapons[wpn].maxammo = maxammo; } void InitPlayer(void) { player->lookaway = false; player->walking = false; player->dead = false; player->drowned = false; player->disabled = false; player->hurt_time = 0; player->hurt_flash_state = 0; player->water_shield_frame = 0; player->movementmode = MOVEMODE_NORMAL; player->inputs_locked_lasttime = true; player->booststate = BOOST_OFF; player->lastbooststate = BOOST_OFF; player->boosterfuel = BOOSTER_FUEL_QTY; player->xinertia = 0; player->yinertia = 0; player->riding = NULL; player->lastriding = NULL; player->cannotride = NULL; player->DamageText->Reset(); player->XPText->Reset(); statusbar.xpflashcount = 0; PResetWeapons(); PSelectSprite(); // this prevents a splash if we start underwater, and prevents us // from drowning immediately since our air isn't yet set up player->touchattr = TA_WATER; player->airleft = 1000; player->airshowtimer = 0; } Player::~Player() { if (XPText) { delete XPText; XPText = NULL; } } /* void c------------------------------() {} */ void HandlePlayer(void) { // freeze player for the split-second between dead) { PHandleAttributes(); // handle special tile attributes PHandleSolidMushyObjects(); // handle objects like bugs marked "solid / mushy" PDoWeapons(); // p_arms.cpp PDoHurtFlash(); switch((inputs[DEBUG_MOVE_KEY] && settings->enable_debug_keys) ? MOVEMODE_DEBUG : \ player->movementmode) { case MOVEMODE_NORMAL: { PDoBooster(); PDoBoosterEnd(); PDoWalking(); PDoLooking(); PDoJumping(); PDoFalling(); PSelectFrame(); } break; case MOVEMODE_ZEROG: // Ironhead battle/UNI 1 { PHandleZeroG(); } break; case MOVEMODE_DEBUG: { player->xinertia = player->yinertia = 0; player->blockl = player->blockr = player->blockd = player->blocku = 0; if (inputs[DOWNKEY]) player->y += 0x1000; if (inputs[UPKEY]) player->y -= 0x1000; if (inputs[LEFTKEY]) { player->x -= 0x1000; player->dir = LEFT; } if (inputs[RIGHTKEY]) { player->x += 0x1000; player->dir = RIGHT; } map_scroll_jump(player->x, player->y); player->frame = 2; } break; default: { player->xinertia = player->yinertia = 0; } break; } // handle some special features, like damage and bouncy, of // 100% solid objects such as moving blocks. It's put at the end // so that we can see the desired inertia of the player before // it's canceled out by any block points that are set. That way // we can tell if the player is trying to move into it. PHandleSolidBrickObjects(); } // apply inertia PDoPhysics(); // thud sound when land on some objects if (player->riding && !player->lastriding && (player->riding->nxflags & NXFLAG_THUD_ON_RIDING)) { sound(SND_THUD); } } // player aftermove routine void HandlePlayer_am(void) { //debug("xinertia: %s", strhex(player->xinertia)); //debug("yinertia: %s", strhex(player->yinertia)); //debug("booststate: %d", player->booststate); //debug("y: %d", player->y>>CSF); //debug("riding %x", player->riding); //debug("block: %d%d%d%d", player->blockl, player->blockr, player->blocku, player->blockd); // if player is riding some sort of platform apply it's inertia to him if (player->riding) { player->apply_xinertia(player->riding->xinertia); player->apply_yinertia(player->riding->yinertia); } // keep player out of blocks "SMB1 style" PDoRepel(); // handle landing and bonking head if (player->blockd && player->yinertia > 0) { if (player->yinertia > 0x400 && !player->hide) sound(SND_THUD); player->yinertia = 0; player->jumping = 0; } else if (player->blocku && player->yinertia < 0) { // he behaves a bit differently when bonking his head on a // solid-brick object vs. bonking his head on the map. // bonk-head star effect if (player->yinertia < -0x200 && !player->hide && \ player->blocku == BLOCKED_MAP) { sound(SND_BONK_HEAD); effect(player->CenterX(), player->y, EFFECT_BONKPLUS); } // bounces off ceiling with booster 0.8 if (player->booststate == BOOST_08) { player->yinertia = 0x200; } else if (player->bopped_object && player->bopped_object->yinertia != 0) { // no clear yinertia when bop head on OBJ_BLOCK_MOVEV in labyrinth. } else { player->yinertia = 0; } player->jumping = false; } player->lastwalking = player->walking; player->lastriding = player->riding; player->inputs_locked_lasttime = player->inputs_locked; memcpy(lastpinputs, pinputs, sizeof(lastpinputs)); } /* void c------------------------------() {} */ void PDoPhysics(void) { if (player->xinertia > 0x5ff) player->xinertia = 0x5ff; if (player->xinertia < -0x5ff) player->xinertia = -0x5ff; if (player->yinertia > 0x5ff) player->yinertia = 0x5ff; if (player->yinertia < -0x5ff) player->yinertia = -0x5ff; if (player->blockd && player->yinertia > 0) player->yinertia = 0; player->apply_yinertia(player->yinertia); // if xinertia is less than the decel speed then maintain the value but don't actually // move anything. It seems a bit odd...but that's the best I can figure to make it // behave like the original. if (player->xinertia > player->decelspeed || player->xinertia < -player->decelspeed) { player->apply_xinertia(player->xinertia); } } void PUpdateInput(void) { int i; if (player->inputs_locked || player->disabled) { memset(pinputs, 0, sizeof(pinputs)); } else { memcpy(pinputs, inputs, sizeof(pinputs)); // prevent jumping/shooting when leaving a messagebox if (player->inputs_locked_lasttime) { for(i=0;idead && GetCurrentScript() == -1) { game.setmode(GM_INVENTORY); } } // Map System if (justpushed(MAPSYSTEMKEY) && (FindInventory(ITEM_MAP_SYSTEM) != -1)) { if (!game.frozen && !player->dead && GetCurrentScript() == -1) { if (fade.getstate() == FS_NO_FADE && game.switchstage.mapno == -1) { game.setmode(GM_MAP_SYSTEM, game.mode); } } } } } // handles tile attributes of tiles player is touching void PHandleAttributes(void) { static const Point pattrpoints[] = { {8, 8}, {8, 14} }; static const Point hurt_bottom_attrpoint = {8, 7}; unsigned int attr; int tile; // get attributes of tiles player it touching. // first, we'll check the top pattrpoint alone; this is the point at // which you go underwater, when that point is lower than the water level. // ** There is a spot in Labyrinth W just after the Shop where the positioning // of this point is a minor element in the gameplay, and so it must be set // correctly. If set too high you will not be underwater after climbing up the // small slope and you can just jump over the wall that you shouldn't be able to. attr = player->GetAttributes(&pattrpoints[0], 1, &tile); // water handler -- water uses only the top pattrpoint if (attr & TA_WATER) { // check if we just entered the water if (!(player->touchattr & TA_WATER)) { // splash on entering water quick enough if ((player->yinertia > 0x200 && !player->blockd) || \ (player->xinertia < -0x200 || player->xinertia > 0x200)) { int x = player->CenterX(); int y = player->CenterY(); int splashtype = !(player->touchattr & TA_HURTS_PLAYER) ? \ OBJ_WATER_DROPLET : OBJ_LAVA_DROPLET; for(int i=0;i<8;i++) { Object *o = CreateObject(x + (random(-8, 8) << CSF), y, splashtype); o->xinertia = random(-0x200, 0x200) + player->xinertia; o->yinertia = random(-0x200, 0x80) - (player->yinertia >> 1); } sound(SND_SPLASH); } } // setup physics constants for water player->walkspeed = 0x196; player->fallspeed = 0x2ff; player->fallaccel = 0x28; player->jumpfallaccel = 0x10; player->walkaccel = 0x2a; player->jumpwalkaccel = 0x10; player->decelspeed = 0x19; // was set at 0x280 but I believe that makes it impossible to clear one of the long // spike jumps in River player->jumpvelocity = 0x2c0; // decrement air left if (player->equipmask & EQUIP_AIRTANK) { player->airleft = 1000; player->airshowtimer = 0; } else { player->airshowtimer = 60; if (!player->drowned) { if (!player->inputs_locked) player->airleft--; if (player->airleft <= 0 && !game.debug.god) { // player drowned // if flag 4000 is set, then we do not drown, but are in the Almond // level after Core battle, and should instead execute script 1100. if (game.flags[4000]) { // "your senses dim and the world grows dark" StartScript(1100); } else { // nope sorry buddy, no such luck this time Object *o = CreateObject(player->x, player->y, OBJ_NULL); o->sprite = SPR_PDROWNED; o->dir = player->dir; killplayer(SCRIPT_DROWNED); } player->drowned = 1; } } } } else { // setup normal physics constants player->walkspeed = 0x32c;////0x030e; player->fallspeed = 0x5ff; player->fallaccel = 0x50; player->jumpfallaccel = 0x20; player->walkaccel = 0x55; player->jumpwalkaccel = 0x20; player->decelspeed = 0x33; player->jumpvelocity = 0x500; // reset air supply player->airleft = 1000; if (player->airshowtimer) player->airshowtimer--; } // add in the bottom pattrpoint, but don't let it set the "water" bit. // only the top pattrpoint can set "water". attr |= (player->GetAttributes(&pattrpoints[1], 1, &tile) & ~TA_WATER); // If the tile has "hurt" bit, we recheck it with the the different bottom attrpoint. // This fixes bottom spikes in water level, last cave... Standart bottom attrpoint // allows intersection with spike only for 1 pixel, but origianl game allows 8 pixels // of safe intersection. if (attr & TA_HURTS_PLAYER) { attr &= ~TA_HURTS_PLAYER; attr |= (player->GetAttributes(&hurt_bottom_attrpoint, 1, &tile) & ~TA_WATER); } if (attr & TA_HURTS_PLAYER) hurtplayer(10); // water current/wind: // for water currents--get the sum total of several points on the player to see // all the directions he's getting blown around at (support multiple directions) DoWaterCurrents(); player->touchattr = attr; } // handes player being blown around by water currents void DoWaterCurrents(void) { static Point currentpoints[] = { {7, 8}, {1, 2}, {1, 8}, {1, 14}, {7, 2}, {7, 14}, {15,2}, {15, 8}, {15, 14} }; int i; static const int current_dir[] = { LEFTMASK, UPMASK, RIGHTMASK, DOWNMASK }; uint8_t currentmask; int tile; // check each point in currentpoints[] for a water current, and if found, // add it to the list of directions we're being blown currentmask = 0; for(i=0;i<9;i++) { //DebugCrosshair(player->x+(currentpoints[i].x<y+(currentpoints[i].y<GetAttributes(¤tpoints[i], 1, &tile) & TA_CURRENT) { currentmask |= current_dir[tilecode[tile] & 3]; } // if the center point (the first one) has no current, then don't // bother checking the rest. as during 90% of the game you are NOT underwater. if (!currentmask) return; } // these constants are very critical for Waterway to work properly. // please be careful with them. if (currentmask & LEFTMASK) player->xinertia -= 0x88; if (currentmask & RIGHTMASK) player->xinertia += 0x88; if (currentmask & UPMASK) player->yinertia -= 0x80; if (currentmask & DOWNMASK) player->yinertia += 0x50; } void PDoWalking(void) { int walk_accel; int limit; walk_accel = (player->blockd) ? player->walkaccel : player->jumpwalkaccel; // walking/moving if (pinputs[LEFTKEY] || pinputs[RIGHTKEY]) { // we check both without an else so that both keys down=turn right & walk in place if (pinputs[LEFTKEY]) { player->walking = true; player->dir = LEFT; if (player->xinertia > -player->walkspeed) { player->xinertia -= walk_accel; if (player->xinertia < -player->walkspeed) player->xinertia = -player->walkspeed; } } if (pinputs[RIGHTKEY]) { player->walking = true; player->dir = RIGHT; if (player->xinertia < player->walkspeed) { player->xinertia += walk_accel; if (player->xinertia > player->walkspeed) player->xinertia = player->walkspeed; } } if (player->walking && !player->lastwalking) player->walkanimframe = 1; } else { player->walking = false; player->walkanimframe = 0; player->walkanimtimer = 0; // tap sound when stopped walking if (player->lastwalking && player->blockd) sound(SND_PLAYER_WALK); } // deceleration if (player->blockd && player->yinertia >= 0) { // deceleration on ground... // always move towards zero at decelspeed if (player->xinertia > 0) { if (player->blockr && !pinputs[RIGHTKEY]) { player->xinertia = 0; } else if (player->xinertia > player->decelspeed) { player->xinertia -= player->decelspeed; } else { player->xinertia = 0; } } else if (player->xinertia < 0) { if (player->blockl && !pinputs[LEFTKEY]) { player->xinertia = 0; } else if (player->xinertia < -player->decelspeed) { player->xinertia += player->decelspeed; } else { player->xinertia = 0; } } } else // deceleration in air... { // implements 2 things // 1) if player partially hits a brick while in air, his inertia is lesser after he passes it // 2) but, if he's trying to turn around, let him! don't "stick" him to it just because // of a high inertia when he hit it if (player->blockr) { limit = (player->dir == RIGHT) ? 0x180 : 0; if (player->xinertia > limit) player->xinertia = limit; } if (player->blockl) { limit = (player->dir == LEFT) ? -0x180 : 0; if (player->xinertia < limit) player->xinertia = limit; } } } void PDoFalling(void) { if (player->disabled) return; if (player->booststate) return; if (game.curmap == STAGE_KINGS_TABLE && \ fade.getstate() == FS_FADING) return; // needed to be able to see the falling blocks during // good-ending Helicopter cutscene (otherwise your // invisible character falls and the blocks spawn too low). if (player->hide) { player->xinertia = 0; player->yinertia = 0; return; } // use jump gravity as long as Jump Key is down and we're moving up, // regardless of whether a jump was ever actually initiated. // this is for the fans that blow up--you can push JUMP to climb higher. if (player->yinertia < 0 && pinputs[JUMPKEY]) { // use jump gravity if (player->yinertia < player->fallspeed) { player->yinertia += player->jumpfallaccel; if (player->yinertia > player->fallspeed) player->yinertia = player->fallspeed; } } else { // use normal gravity if (player->yinertia < player->fallspeed) { player->yinertia += player->fallaccel; if (player->yinertia > player->fallspeed) player->yinertia = player->fallspeed; } // if we no longer qualify for jump gravity then the jump is over player->jumping = 0; } } void PDoJumping(void) { // jumping if (pinputs[JUMPKEY] && !lastpinputs[JUMPKEY]) { if (player->blockd) { if (!player->jumping) { player->jumping = true; player->yinertia -= player->jumpvelocity; sound(SND_PLAYER_JUMP); } } else if ((player->equipmask & (EQUIP_BOOSTER08 | EQUIP_BOOSTER20))) { PStartBooster(); } } } void PDoLooking(void) { int lookscroll_want; int i, key; // looking/aiming up and down player->look = lookscroll_want = 0; if (pinputs[DOWNKEY]) { if (!player->blockd) { player->look = DOWN; } else if (!lastpinputs[DOWNKEY]) { // activating scripts/talking to NPC's if (!player->walking && !player->lookaway && \ !pinputs[JUMPKEY] && !pinputs[FIREKEY]) { if (!inputs[DEBUG_MOVE_KEY] || !settings->enable_debug_keys) { player->lookaway = true; player->xinertia = 0; PTryActivateScript(); } } } // can still scroll screen down while standing, even though // it doesn't show any different frame. lookscroll_want = DOWN; } if (pinputs[UPKEY]) { player->look = lookscroll_want = UP; } // when looking, pause a second to be sure they really want to do it // before triggering any real screen scrolling if (player->lookscroll != lookscroll_want) { if (player->lookscroll_timer >= 4 || !lookscroll_want) { player->lookscroll = lookscroll_want; } else { player->lookscroll_timer++; } } else { player->lookscroll_timer = 0; } // deactivation of lookaway if (player->lookaway) { // keys which deactivate lookaway when you are facing away from player static const signed char actionkeys[] = \ { LEFTKEY, RIGHTKEY, UPKEY, JUMPKEY, FIREKEY, -1 }; // stop looking away if any keys are pushed for(i=0;;i++) { key = actionkeys[i]; if (key == -1) break; if (pinputs[key]) { player->lookaway = false; break; } } if (!player->blockd) player->lookaway = false; } } /* void c------------------------------() {} */ // called when the player has just turned on the booster void PStartBooster(void) { if (player->boosterfuel <= 0) return; // booster 2.0 lets you pick a direction and tacks inertia // solid in that direction when first activated if ((player->equipmask & EQUIP_BOOSTER20)) { // default boost direction if no key is pressed player->booststate = BOOST_UP; // in order of precedence if (inputs[LEFTKEY] || inputs[RIGHTKEY]) player->booststate = BOOST_HOZ; if (inputs[DOWNKEY]) player->booststate = BOOST_DOWN; if (inputs[UPKEY]) player->booststate = BOOST_UP; // set initial inertia full on if (player->booststate == BOOST_UP || player->booststate == BOOST_DOWN) player->xinertia = 0; switch(player->booststate) { case BOOST_UP: player->yinertia = -0x5ff; break; case BOOST_DOWN: player->yinertia = 0x5ff; break; case BOOST_HOZ: { player->yinertia = 0; if (inputs[LEFTKEY]) player->xinertia = -0x5ff; else player->xinertia = 0x5ff; } break; } } else { player->booststate = BOOST_08; // help it overcome gravity if (player->yinertia > 0x100) player->yinertia >>= 1; } PBoosterSmokePuff(); } // called every tick to run the booster void PDoBooster(void) { /*static const char *statedesc[] = { "OFF", "UP", "DN", "HOZ", "0.8" }; debug("fuel: %d", player->boosterfuel); debug("booststate: %s", statedesc[player->booststate]); debug("xinertia: %d", player->xinertia); debug("yinertia: %d", player->yinertia);*/ if (!(player->equipmask & (EQUIP_BOOSTER08 | EQUIP_BOOSTER20))) { player->booststate = BOOST_OFF; return; } if (!pinputs[JUMPKEY]) { player->booststate = BOOST_OFF; if (player->blockd) player->boosterfuel = BOOSTER_FUEL_QTY; return; } if (!player->booststate) return; // player seems to want it active...check the fuel if (player->boosterfuel <= 0) { player->booststate = BOOST_OFF; return; } else { player->boosterfuel--; } // ok so then, booster is active right now bool sputtering = false; switch(player->booststate) { case BOOST_HOZ: { if ((player->dir == LEFT && player->blockl) || \ (player->dir == RIGHT && player->blockr)) { player->yinertia = -0x100; } // this probably isn't the right way to do this, but this // bit makes the hurt-hop work if you get hit during a sideways boost //if (player->hitwhileboosting) // player->yinertia = -0x400; if (player->dir == LEFT) player->xinertia -= 0x20; if (player->dir == RIGHT) player->xinertia += 0x20; } break; case BOOST_UP: { player->yinertia -= 0x20; } break; case BOOST_DOWN: { player->yinertia += 0x20; } break; case BOOST_08: { // top speed and sputtering if (player->yinertia < -0x400) { player->yinertia += 0x20; sputtering = true; // no sound/smoke this frame } else { player->yinertia -= 0x20; } } break; } // don't land if we booster through a one-tile high corridor, // but do land if we're, well, landing on something (yinertia not negative). // must be done after booster inertia applied to work properly. // for 1) there's a place in the village next to Mahin that is good for testing this, // for 2) the gaps in outer wall by the little house. if (player->blockd) { if (player->yinertia < 0) player->blockd = false; else { player->booststate = BOOST_OFF; return; } } // smoke and sound effects if ((player->boosterfuel % 3) == 1 && !sputtering) { PBoosterSmokePuff(); } } // called every tick just after PDoBooster returns. // tones down player's inertia a bit once the Booster 2.0 stops firing void PDoBoosterEnd() { // put here to be sure it catches all the different ways the Booster can get turned off //if (!player->booststate) //player->hitwhileboosting = false; if (player->booststate != player->lastbooststate) { if (player->booststate == BOOST_OFF && (player->equipmask & EQUIP_BOOSTER20)) { switch(player->lastbooststate) { case BOOST_HOZ: player->xinertia >>= 1; break; case BOOST_UP: player->yinertia >>= 1; break; } } } // in the original touching a slope while boosting horizontally // disables the booster. In that case, we don't want to half the xinertia, // which is why it's here. //if (player->booststate == BOOST_HOZ && CheckStandOnSlope(player)) //player->booststate = BOOST_OFF; player->lastbooststate = player->booststate; } // spawn a Booster smoke puff void PBoosterSmokePuff() { // these are the directions the SMOKE is traveling, not the player // RT LT UP DN static const int smoke_xoffs[] = { 10, 4, 7, 7 }; static const int smoke_yoffs[] = { 10, 10, 0, 14 }; int smokedir; switch(player->booststate) { case BOOST_HOZ: smokedir = (player->dir ^ 1); break; case BOOST_UP: smokedir = DOWN; break; case BOOST_DOWN:smokedir = UP; break; case BOOST_08: smokedir = DOWN; break; default: return; } int x = player->x + (smoke_xoffs[smokedir] << CSF); int y = player->y + (smoke_yoffs[smokedir] << CSF); Caret *smoke = effect(x, y, EFFECT_SMOKETRAIL_SLOW); smoke->MoveAtDir(smokedir, 0x200); sound(SND_BOOSTER); } /* void c------------------------------() {} */ // handle some special characteristics of solid-brick objects, // such as bouncy and damage. Unlike with FLAG_SOLID_MUSHY; the // block/l/r/u/d flags for these objects have already been set in // UpdateBlockStates, so we don't have to worry about those. void PHandleSolidBrickObjects(void) { int i; SIFSprite *sprite = player->Sprite(); Object *o; // calculate total inertia of player--this is needed so that // the forcefields in the Monster X arena will damage you if // the treads carry you into them. int p_xinertia = player->xinertia; int p_yinertia = player->yinertia; if (player->riding) { p_xinertia += player->riding->xinertia; p_yinertia += player->riding->yinertia; } for(i=0;iflags & FLAG_SOLID_BRICK)) continue; // left, right, and up contact damage if (o->damage > 0) { if (player->blockl && player->CheckSolidIntersect(o, &sprite->block_l)) { if (p_xinertia < 0 || o->xinertia > 0) o->DealContactDamage(); } if (player->blockr && player->CheckSolidIntersect(o, &sprite->block_r)) { if (p_xinertia > 0 || o->xinertia < 0) o->DealContactDamage(); } if (player->blocku && player->CheckSolidIntersect(o, &sprite->block_u)) { if (p_yinertia < 0 || o->yinertia > 0) o->DealContactDamage(); } } // stuff for when you are standing on it if (player->blockd && player->CheckSolidIntersect(o, &sprite->block_d)) { if (o->damage && (player->yinertia >= 0 || o->yinertia < 0)) o->DealContactDamage(); // don't do weird glitchy shit if we jump while being carried upward // by an object moving faster than us. handles if you jump while flying // momorin's rocket. if (player->yinertia < 0 && o->yinertia < player->yinertia) player->yinertia = 0; // handle FLAG_BOUNCY--used eg by treads on Monster X when tipped up if (o->flags & FLAG_BOUNCY) { if (player->yinertia > (o->yinertia - 0x200)) player->yinertia = (o->yinertia - 0x200); } else if (o->yinertia <= player->yinertia) { // snap his Y right on top if it player->y = o->SolidTop() - (sprites[player->sprite].block_d[0].y << CSF); } } } } void PHandleSolidMushyObjects(void) { for(int i=0;iflags & FLAG_SOLID_MUSHY) PRunSolidMushy(o); } } // handle "solid mushy" objects, such as bugs. These objects are solid but not 100% super // solid like a brick. Their solidity is more of an "it repels the player" kind of way. // NOTE: This is also responsible for the horizontal motion you see when hit by many kinds // of enemies. The hurtplayer damage routine makes you hop vertically, but it is this that // throws you away horizontally. void PRunSolidMushy(Object *o) { // cache these, so we're not calling the same functions over and over again const int p_left = player->SolidLeft(); const int p_right = player->SolidRight(); const int p_top = player->SolidTop(); const int p_bottom = player->SolidBottom(); const int o_left = o->SolidLeft(); const int o_right = o->SolidRight(); const int o_top = o->SolidTop(); const int o_bottom = o->SolidBottom(); static const int MUSHY_MARGIN = (3< (o_top + MUSHY_MARGIN))) { // left side if ((p_right > o_left) && (p_right < o->CenterX())) { if (player->xinertia > -REPEL_FORCE) player->xinertia -= REPEL_FORCE; } // right side if ((p_left < o_right) && (p_left > o->CenterX())) { if (player->xinertia < REPEL_FORCE) player->xinertia += REPEL_FORCE; } } // bonking head on object or standing on object // to tell if we are within horizontal bounds to be standing on the object, // we will check if we have NOT FALLEN OFF the object. if (p_left > (o_right - STAND_MARGIN) || p_right < (o_left + STAND_MARGIN)) { } else { // standing on object if (p_bottom >= o_top && p_bottom <= o->CenterY()) { if (o->flags & FLAG_BOUNCY) { if (player->yinertia > (o->yinertia - 0x200)) player->yinertia = (o->yinertia - 0x200); } else { // force to top of sprite if we're REALLY far into it int em_fline = o->SolidTop() + (3 << CSF); if (player->SolidBottom() > em_fline) { int over_amt = (em_fline - player->SolidBottom()); int dec_amt = (3 << CSF); if (over_amt < dec_amt) dec_amt = over_amt; if (dec_amt < (1<apply_yinertia(-dec_amt); } player->blockd = true; player->riding = o; } } else if (p_top < o_bottom && p_top > o->CenterY()) { // hit bottom of object with head if (player->yinertia < 0) player->yinertia = 0; } } } /* void c------------------------------() {} */ // does "damage" points of damage to the player // if even_if_controls_locked is true the damage is // dealt even if the player's input is locked. void hurtplayer(int damage) { if (damage == 0) return; if (!player || !player->hp) return; if (settings->enable_debug_keys && (game.debug.god || inputs[DEBUG_MOVE_KEY])) return; if (player->hurt_time) return; if (player->hide) return; player->hp -= damage; player->DamageText->AddQty(damage); player->lookaway = 0; player->hurt_time = 128; if (player->equipmask & EQUIP_WHIMSTAR) remove_whimstar(&player->whimstar); //if (player->booststate) //player->hitwhileboosting = true; if (player->hp <= 0) { sound(SND_PLAYER_DIE); SmokeClouds(player, 64, 16, 16); killplayer(SCRIPT_DIED); } else { sound(SND_PLAYER_HURT); // hop if (player->movementmode != MOVEMODE_ZEROG) player->yinertia = -0x400; } // decrement weapon XP. if (player->equipmask & EQUIP_ARMS_BARRIER) SubXP(damage); else SubXP(damage * 2); } // set the player state to "dead" and execute script "script" void killplayer(int script) { Replay::end_record(); Replay::end_playback(); player->hp = 0; player->dead = true; player->hide = true; player->xinertia = 0; player->yinertia = 0; player->riding = NULL; // why exactly did I say this? i dunno, but not touching for safety StopLoopSounds(); // important for Almond StartScript(script); } /* void c------------------------------() {} */ // this is basically a replacement for most of the player code, // used when the player is in inputs_locked) { if (inputs[LEFTKEY] || inputs[RIGHTKEY]) { if (inputs[LEFTKEY]) player->xinertia -= 0x100; if (inputs[RIGHTKEY]) player->xinertia += 0x100; } else { // decel if (player->xinertia < 0x80 || player->xinertia > -0x80) { player->xinertia = 0; } else { player->xinertia += (player->xinertia > 0) ? -0x80 : 0x80; } } if (inputs[UPKEY] || inputs[DOWNKEY]) { if (inputs[UPKEY]) player->yinertia -= 0x100; if (inputs[DOWNKEY]) player->yinertia += 0x100; } else { // decel if (player->yinertia < 0x80 || player->yinertia > -0x80) { player->yinertia = 0; } else { player->xinertia += (player->xinertia > 0) ? -0x80 : 0x80; } } } else { // decel for when inputs locked after victory if (player->xinertia < 0x80 && player->xinertia > -0x40) { player->xinertia = 0; } else { player->xinertia += (player->xinertia > 0) ? -0x80 : 0x80; } if (player->yinertia < 0x80 && player->yinertia > -0x40) { player->yinertia = 0; } else { player->yinertia += (player->yinertia > 0) ? -0x80 : 0x80; } } if (player->xinertia > 0x400) player->xinertia = 0x400; if (player->xinertia < -0x400) player->xinertia = -0x400; if (player->yinertia > 0x400) player->yinertia = 0x400; if (player->yinertia < -0x400) player->yinertia = -0x400; player->frame = (player->yinertia > 0) ? 1 : 2; } /* void c------------------------------() {} */ void PInitRepel(void) { const int s = SPR_MYCHAR; int i; player->nrepel_l = sprites[s].block_l.count; player->nrepel_r = sprites[s].block_r.count; player->nrepel_d = sprites[s].block_d.count; player->nrepel_u = sprites[s].block_u.count; for(i=0;inrepel_l;i++) { player->repel_l[i].x = sprites[s].block_l[i].x + 1; player->repel_l[i].y = sprites[s].block_l[i].y; } for(i=0;inrepel_r;i++) { player->repel_r[i].x = sprites[s].block_r[i].x - 1; player->repel_r[i].y = sprites[s].block_r[i].y; } for(i=0;inrepel_d;i++) { player->repel_d[i].x = sprites[s].block_d[i].x; player->repel_d[i].y = sprites[s].block_d[i].y - 1; } for(i=0;inrepel_u;i++) { player->repel_u[i].x = sprites[s].block_u[i].x; player->repel_u[i].y = sprites[s].block_u[i].y + 1; } } // the player's block points are assymetrical--block u/d are closer together than block l/r. // So it's quite possible to get e.g. your blockl points embedded in a wall by // falling off the top of it. This function implements a SMB1-style "repel" that // allows this to happen but then pushes the player out of the block over the next // few frames. void PDoRepel(void) { // since this function is called from the aftermove, regular player->blockl etc // won't be updated until the following frame, so we always check the attributes // directly here. static const int REPEL_SPEED = (1<enable_debug_keys && inputs[DEBUG_MOVE_KEY]) return; // pushes player out of walls if he become embedded in them, ala Super Mario 1. // this can happen for example because his R,L block points are further out than // his D block points so it's possible to fall really close to a block and // embed the R or L points further into the block than they should be if (player->CheckAttribute(player->repel_r, player->nrepel_r, TA_SOLID_PLAYER)) { if (!player->CheckAttribute(&sprites[player->sprite].block_l, TA_SOLID_PLAYER)) { player->x -= REPEL_SPEED; //debug("REPEL [to left]"); } } if (player->CheckAttribute(player->repel_l, player->nrepel_l, TA_SOLID_PLAYER)) { if (!player->CheckAttribute(&sprites[player->sprite].block_r, TA_SOLID_PLAYER)) { player->x += REPEL_SPEED; //debug("REPEL [to right]"); } } // vertical repel doesn't happen normally, but if we get embedded in a // block somehow, it can happen. /* // do repel down if (player->CheckAttribute(player->repel_u, player->nrepel_u, TA_SOLID_PLAYER)) { if (!player->CheckAttribute(&sprites[player->sprite].block_d, TA_SOLID_PLAYER)) { player->y += REPEL_SPEED; //debug("REPEL [down]"); } } // do repel up if (player->CheckAttribute(player->repel_d, player->nrepel_d, TA_SOLID_PLAYER)) { if (!player->CheckAttribute(&sprites[player->sprite].block_u, TA_SOLID_PLAYER)) { player->y -= REPEL_SPEED; //debug("REPEL [up]"); } } */ } /* void c------------------------------() {} */ // called when you press down. // Tries to find an SCRIPTONACTIVATE object you are standing near and activate it. // if it can't find anything to activate, spawns the "question mark" effect. void PTryActivateScript() { if (RunScriptAtX(player->CenterX())) return; if (player->dir == RIGHT) { if (RunScriptAtX(player->Right()) || RunScriptAtX(player->Left())) return; } else { if (RunScriptAtX(player->Left()) || RunScriptAtX(player->Right())) return; } // e.g. Plantation Rocket if (player->riding && (player->riding->flags & FLAG_SCRIPTONACTIVATE)) { StartScript(player->riding->id2); return; } effect(player->CenterX(), player->CenterY(), EFFECT_QMARK); } static bool RunScriptAtX(int x) { if (RunScriptAtLocation(x, player->y + (8 << CSF)) || \ RunScriptAtLocation(x, player->y + (14 << CSF)) || \ RunScriptAtLocation(x, player->y + (2 << CSF))) { return true; } return false; } static bool RunScriptAtLocation(int x, int y) { // top-to-bottom scan for(int i=nOnscreenObjects-1; i>=0; i--) { Object *o = onscreen_objects[i]; if (o->flags & FLAG_SCRIPTONACTIVATE) { if (x >= o->Left() && x <= o->Right() && \ y >= o->Top() && y <= o->Bottom()) { StartScript(o->id2); return true; } } } return false; } /* void c------------------------------() {} */ // does the invincibility flash when the player has recently been hurt void PDoHurtFlash(void) { // note that hurt_flash_state is NOT cleared when timer reaches 0, // but this is ok because the number of blinks are and always should be even. // (if not it wouldn't look right when he unhurts). if (player->hurt_time) { player->hurt_time--; player->hurt_flash_state = (player->hurt_time & 2); } } // decides which player frame to show void PSelectFrame(void) { if (player->lookaway) { // looking away player->frame = 11; } else if (!player->blockd || player->yinertia < 0) { // jumping/falling player->frame = (player->yinertia > 0) ? 1 : 2; } else if (player->walking) { // do walk animation static const uint8_t pwalkanimframes[] = { 0, 1, 0, 2 }; if (++player->walkanimtimer >= 5) { player->walkanimtimer = 0; if (++player->walkanimframe >= 4) player->walkanimframe = 0; if (pwalkanimframes[player->walkanimframe]==0) sound(SND_PLAYER_WALK); } player->frame = pwalkanimframes[player->walkanimframe]; } else { // standing player->frame = 0; } // switch frames to "up" or "down" versions if we're looking if (player->look) { if (player->look == UP) { if (!player->blockd || player->yinertia < 0) player->frame = 4; else player->frame += 3; } else { player->frame += 6; } } // mimiga mask support-- it would be better to make equipmask private, // and funnel all player->equipmask changes through a setter function, // then I'd feel safe doing this only when equipped items are changed. PSelectSprite(); } // mimiga mask support void PSelectSprite(void) { player->sprite = (player->equipmask & EQUIP_MIMIGA_MASK) ? \ SPR_MYCHAR_MIMIGA : SPR_MYCHAR; } /* void c------------------------------() {} */ // returns the sprite and frame # to be used for drawing the given weapon void GetSpriteForGun(int wpn, int look, int *spr, int *frame) { int s; switch(wpn) { case WPN_SUPER_MISSILE: s = SPR_SUPER_MLAUNCHER; break; case WPN_NEMESIS: s = SPR_NEMESIS; break; case WPN_BUBBLER: s = SPR_BUBBLER; break; case WPN_SPUR: s = SPR_SPUR; break; default: s = SPR_WEAPONS_START + (wpn * 2); break; } if (look) { s++; *frame = (look == DOWN); } else { *frame = 0; } *spr = s; } // returns the point that a player's shot should be centered on when firing void GetPlayerShootPoint(int *x_out, int *y_out) { int spr, frame; int x, y; GetSpriteForGun(player->curWeapon, player->look, &spr, &frame); // we have to figure out where the gun is being carried, then figure out where the // gun's sprite is drawn relative to that, then finally we can offset in the // shoot point of the gun's sprite. x = player->x + (sprites[player->sprite].frame[player->frame].dir[player->dir].actionpoint.x << CSF); x -= sprites[spr].frame[frame].dir[player->dir].drawpoint.x << CSF; x += sprites[spr].frame[frame].dir[player->dir].actionpoint.x << CSF; y = player->y + (sprites[player->sprite].frame[player->frame].dir[player->dir].actionpoint.y << CSF); y -= sprites[spr].frame[frame].dir[player->dir].drawpoint.y << CSF; y += sprites[spr].frame[frame].dir[player->dir].actionpoint.y << CSF; *x_out = x; *y_out = y; } // draws the player void DrawPlayer(void) { int scr_x, scr_y; if (player->hide || player->disabled) return; // keep his floattext position linked--do NOT update this if he is hidden // so that floattext doesn't follow him after he dies. player->DamageText->UpdatePos(player); player->XPText->UpdatePos(player); // get screen position to draw him at scr_x = (player->x >> CSF) - (map.displayed_xscroll >> CSF); scr_y = (player->y >> CSF) - (map.displayed_yscroll >> CSF); // draw his gun if (player->curWeapon != WPN_NONE && player->curWeapon != WPN_BLADE) { int spr, frame; GetSpriteForGun(player->curWeapon, player->look, &spr, &frame); // draw the gun at the player's Action Point. Since guns have their Draw Point set // to point at their handle, this places the handle in the player's hand. draw_sprite_at_dp(scr_x + sprites[player->sprite].frame[player->frame].dir[player->dir].actionpoint.x, \ scr_y + sprites[player->sprite].frame[player->frame].dir[player->dir].actionpoint.y, \ spr, frame, player->dir); } // draw the player sprite if (!player->hurt_flash_state) { draw_sprite(scr_x, scr_y, player->sprite, player->frame, player->dir); // draw the air bubble shield if we have it on if (((player->touchattr & TA_WATER) && (player->equipmask & EQUIP_AIRTANK)) || \ player->movementmode == MOVEMODE_ZEROG) { draw_sprite_at_dp(scr_x, scr_y, SPR_WATER_SHIELD, \ player->water_shield_frame, player->dir); if (++player->water_shield_timer > 1) { player->water_shield_frame ^= 1; player->water_shield_timer = 0; } } } if (player->equipmask & EQUIP_WHIMSTAR) draw_whimstars(&player->whimstar); } ================================================ FILE: player.fdh ================================================ //hash:ff06af60 //automatically generated by Makegen /* located in ObjManager.cpp */ //--------------------[referenced from player.cpp]-------------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //--------------------[referenced from player.cpp]-------------------// void map_scroll_jump(int x, int y); /* located in caret.cpp */ //--------------------[referenced from player.cpp]-------------------// Caret *effect(int x, int y, int effectno); /* located in player.cpp */ //--------------------[referenced from player.cpp]-------------------// void PInitFirstTime(); static void InitWeapon(int wpn, int l1, int l2, int l3, int maxammo); void InitPlayer(void); void HandlePlayer(void); void HandlePlayer_am(void); void PDoPhysics(void); void PUpdateInput(void); void PHandleAttributes(void); void DoWaterCurrents(void); void PDoWalking(void); void PDoFalling(void); void PDoJumping(void); void PDoLooking(void); void PStartBooster(void); void PDoBooster(void); void PDoBoosterEnd(); void PBoosterSmokePuff(); void PHandleSolidBrickObjects(void); void PHandleSolidMushyObjects(void); void PRunSolidMushy(Object *o); void hurtplayer(int damage); void killplayer(int script); void PHandleZeroG(void); void PInitRepel(void); void PDoRepel(void); void PTryActivateScript(); static bool RunScriptAtX(int x); static bool RunScriptAtLocation(int x, int y); void PDoHurtFlash(void); void PSelectFrame(void); void PSelectSprite(void); void GetSpriteForGun(int wpn, int look, int *spr, int *frame); void GetPlayerShootPoint(int *x_out, int *y_out); void DrawPlayer(void); /* located in playerstats.cpp */ //--------------------[referenced from player.cpp]-------------------// void SubXP(int xp, bool quiet); /* located in p_arms.cpp */ //--------------------[referenced from player.cpp]-------------------// void PResetWeapons(); void PDoWeapons(void); /* located in tsc.cpp */ //--------------------[referenced from player.cpp]-------------------// int GetCurrentScript(void); ScriptInstance *StartScript(int scriptno, int pageno); /* located in input.cpp */ //--------------------[referenced from player.cpp]-------------------// bool justpushed(int k); /* located in ai/weapons/whimstar.cpp */ //--------------------[referenced from player.cpp]-------------------// void remove_whimstar(WhimsicalStar *wh); void draw_whimstars(WhimsicalStar *wh); /* located in ai/sym/smoke.cpp */ //--------------------[referenced from player.cpp]-------------------// void SmokeClouds(Object *o, int nclouds, int rangex, int rangey, Object *push_behind); /* located in sound/sound.cpp */ //--------------------[referenced from player.cpp]-------------------// void sound(int snd); void StopLoopSounds(void); /* located in common/misc.cpp */ //--------------------[referenced from player.cpp]-------------------// int random(int min, int max); ================================================ FILE: player.h ================================================ #ifndef _PLAYER_H #define _PLAYER_H #include "p_arms.h" #include "ai/weapons/whimstar.h" #define MAX_INVENTORY 42 class Player : public Object { public: virtual ~Player(); // current physics constants (change when you go underwater, etc) int fallspeed, walkspeed; int fallaccel, jumpfallaccel; int walkaccel, jumpwalkaccel; int decelspeed; int jumpvelocity; // attributes player is touching: water etc uint32_t touchattr; int airleft; // remaining air (is scaled x10) int airshowtimer; // used for blinking "100" when coming out of water bool walking, lastwalking; int walkanimframe; int walkanimtimer; bool jumping; // 1 if jump physics are enabled uint8_t look; // 0 = not looking, UP = looking up, DOWN = looking down uint8_t lookscroll; // which way the screen should scroll because of a look uint8_t lookscroll_timer; // delays a moment before scrolling when player pushes UP/DOWN bool inputs_locked; // if 1, the controls are turned off (player can't control his sprite) bool inputs_locked_lasttime; bool dead; // deactivates player AI...do we really need this? bool hide; // if 1, player and his statusbar is invisible bool drowned; // if 1, player drowning code has been activated // if 1, player is invisible and controls unresponsive // but statusbar still shown. bool disabled; bool lookaway; // 1 makes him look away from screen (eg when you push DOWN) int inventory[MAX_INVENTORY]; // list of inventory items we have int ninventory; // how many objects are in inventory[] Object *riding; // if non-null, he is "riding" this object (used for solidity) Object *lastriding; // for thud sound // if non-null then this points at an object for which ->riding cannot be set. // This is used when a platform you are riding tries to push you into the ceiling // and so the engine deals with it by having you fall through the platform instead. Object *cannotride; // object if any that caused player's blocku to be set Object *bopped_object; // hp += hp; if (player->hp > player->maxHealth) player->hp = player->maxHealth; } void AddXP(int xp, bool quiet) { Weapon *weapon = &player->weapons[player->curWeapon]; bool leveled_up = false; weapon->xp += xp; // leveling up... while(weapon->xp > weapon->max_xp[weapon->level]) { if (weapon->level < 2) { weapon->xp -= weapon->max_xp[weapon->level]; weapon->level++; leveled_up = true; } else { weapon->xp = weapon->max_xp[weapon->level]; break; } } statusbar.xpflashcount = 30; if (player->curWeapon == WPN_SPUR) leveled_up = false; if (!quiet) { if (!player->hide) { if (leveled_up) { sound(SND_LEVEL_UP); effect(player->CenterX(), player->CenterY(), EFFECT_LEVELUP); } else { sound(SND_GET_XP); } } player->XPText->AddQty(xp); } } void SubXP(int xp, bool quiet) { Weapon *weapon = &player->weapons[player->curWeapon]; bool leveled_down = false; weapon->xp -= xp; // leveling down... while(weapon->xp < 0) { if (weapon->level > 0) { weapon->level--; weapon->xp += weapon->max_xp[weapon->level]; leveled_down = true; } else { weapon->xp = 0; break; } } if (player->curWeapon == WPN_SPUR) leveled_down = false; if (leveled_down && !quiet && !player->hide) { effect(player->CenterX(), player->CenterY(), EFFECT_LEVELDOWN); } } /* void c------------------------------() {} */ // add an item to the inventory list (generates an error msg if inventory is full) void AddInventory(int item) { if (player->ninventory+1 >= MAX_INVENTORY) { staterr("<<>"); game.running = 0; return; } player->inventory[player->ninventory++] = item; sound(SND_GET_ITEM); RefreshInventoryScreen(); } // remove an item from the inventory list (does nothing if it's not in there) void DelInventory(int item) { int slot; int i; for(;;) { slot = FindInventory(item); if (slot == -1) break; for(i=slot;ininventory-1;i++) { player->inventory[i] = player->inventory[i+1]; } player->ninventory--; } RefreshInventoryScreen(); } // find which slot an item is in (returns -1 if player does not have it) int FindInventory(int item) { return CheckInventoryList(item, player->inventory, player->ninventory); } // checks if the inventory list given contains the given item. // if so, returns the index of the item. if not, returns -1. int CheckInventoryList(int item, int *list, int nitems) { int i; for(i=0;iweapons[wpn].hasWeapon) { player->weapons[wpn].ammo = 0; // will be filled to full by AddAmmo below player->weapons[wpn].maxammo = ammo; player->weapons[wpn].level = 0; player->weapons[wpn].xp = 0; player->weapons[wpn].hasWeapon = true; player->curWeapon = wpn; } else { // missile capacity powerups player->weapons[wpn].maxammo += ammo; } AddAmmo(wpn, ammo); sound(SND_GET_ITEM); } // AM- command. Drops specified weapon. void LoseWeapon(int wpn) { player->weapons[wpn].hasWeapon = false; // lost current weapon? if (wpn == player->curWeapon) { // in case he has no weapons left at all player->curWeapon = WPN_NONE; // find a new weapon for him for(int i=0;iweapons[i].hasWeapon) { player->curWeapon = i; break; } } } } // TAM command. void TradeWeapon(int oldwpn, int newwpn, int ammo) { int oldcurwpn = player->curWeapon; // ammo 0 = no change; used when you get missiles are upgraded to Super Missiles if (ammo == 0) ammo = player->weapons[oldwpn].maxammo; GetWeapon(newwpn, ammo); LoseWeapon(oldwpn); // switch to new weapon if the weapon traded was the // one we were using. Otherwise, don't change current weapon. if (oldwpn == oldcurwpn) player->curWeapon = newwpn; else player->curWeapon = oldcurwpn; } // adds "ammo" ammo to the specified weapon, but doesn't go over the limit. void AddAmmo(int wpn, int ammo) { player->weapons[wpn].ammo += ammo; if (player->weapons[wpn].ammo > player->weapons[wpn].maxammo) player->weapons[wpn].ammo = player->weapons[wpn].maxammo; } // sets all weapons to max ammo. AE+ command. void RefillAllAmmo(void) { for(int i=0;iweapons[i].hasWeapon) player->weapons[i].ammo = player->weapons[i].maxammo; } } ================================================ FILE: playerstats.fdh ================================================ //hash:7a858c13 //automatically generated by Makegen /* located in caret.cpp */ //------------------[referenced from playerstats.cpp]----------------// Caret *effect(int x, int y, int effectno); /* located in playerstats.cpp */ //------------------[referenced from playerstats.cpp]----------------// void AddHealth(int hp); void AddXP(int xp, bool quiet); void SubXP(int xp, bool quiet); void AddInventory(int item); void DelInventory(int item); int FindInventory(int item); int CheckInventoryList(int item, int *list, int nitems); void GetWeapon(int wpn, int ammo); void LoseWeapon(int wpn); void TradeWeapon(int oldwpn, int newwpn, int ammo); void AddAmmo(int wpn, int ammo); void RefillAllAmmo(void); /* located in inventory.cpp */ //------------------[referenced from playerstats.cpp]----------------// int RefreshInventoryScreen(void); /* located in sound/sound.cpp */ //------------------[referenced from playerstats.cpp]----------------// void sound(int snd); /* located in common/stat.cpp */ //------------------[referenced from playerstats.cpp]----------------// void staterr(const char *fmt, ...); ================================================ FILE: profile.cpp ================================================ #include "nx.h" #include "profile.h" #include "profile.fdh" #define PF_WEAPONS_OFFS 0x38 #define PF_CURWEAPON_OFFS 0x24 #define PF_INVENTORY_OFFS 0xD8 #define PF_TELEPORTER_OFFS 0x158 #define PF_FLAGS_OFFS 0x218 #define MAX_WPN_SLOTS 8 #define MAX_TELE_SLOTS 8 // load savefile #num into the given Profile structure. bool profile_load(const char *pfname, Profile *file) { int i, curweaponslot; FILE *fp; stat("Loading profile from %s...", pfname); memset(file, 0, sizeof(Profile)); fp = fileopen(pfname, "rb"); if (!fp) { staterr("profile_load: unable to open '%s'", pfname); return 1; } if (!fverifystring(fp, "Do041220")) { staterr("profile_load: invalid savegame format: '%s'", pfname); fclose(fp); return 1; } file->stage = fgetl(fp); file->songno = fgetl(fp); file->px = fgetl(fp); file->py = fgetl(fp); file->pdir = CVTDir(fgetl(fp)); file->maxhp = fgeti(fp); file->num_whimstars = fgeti(fp); file->hp = fgeti(fp); fgeti(fp); // unknown value curweaponslot = fgetl(fp); // current weapon (slot, not number, converted below) fgetl(fp); // unknown value file->equipmask = fgetl(fp); // equipped items // load weapons fseek(fp, PF_WEAPONS_OFFS, SEEK_SET); for(i=0;i= WPN_COUNT) { staterr("profile_load: invalid weapon type %d", type); break; } int level = fgetl(fp); int xp = fgetl(fp); int maxammo = fgetl(fp); int ammo = fgetl(fp); file->weapons[type].hasWeapon = true; file->weapons[type].level = (level - 1); file->weapons[type].xp = xp; file->weapons[type].ammo = ammo; file->weapons[type].maxammo = maxammo; if (i == curweaponslot) { file->curWeapon = type; } } // load inventory file->ninventory = 0; fseek(fp, PF_INVENTORY_OFFS, SEEK_SET); for(i=0;iinventory[file->ninventory++] = item; } // load teleporter slots file->num_teleslots = 0; fseek(fp, PF_TELEPORTER_OFFS, SEEK_SET); for(i=0;iteleslots[file->num_teleslots].slotno = slotno; file->teleslots[file->num_teleslots].scriptno = scriptno; file->num_teleslots++; } // load flags fseek(fp, PF_FLAGS_OFFS, SEEK_SET); if (!fverifystring(fp, "FLAG")) { staterr("profile_load: missing 'FLAG' marker"); fclose(fp); return 1; } fresetboolean(); for(i=0;iflags[i] = fbooleanread(fp); } fclose(fp); return 0; } bool profile_save(const char *pfname, Profile *file) { FILE *fp; int i; //stat("Writing saved game to %s...", pfname); fp = fileopen(pfname, "wb"); if (!fp) { staterr("profile_save: unable to open %s", pfname); return 1; } fputstringnonull("Do041220", fp); fputl(file->stage, fp); fputl(file->songno, fp); fputl(file->px, fp); fputl(file->py, fp); fputl((file->pdir == RIGHT) ? 2:0, fp); fputi(file->maxhp, fp); fputi(file->num_whimstars, fp); fputi(file->hp, fp); fseek(fp, 0x2C, SEEK_SET); fputi(file->equipmask, fp); // save weapons fseek(fp, PF_WEAPONS_OFFS, SEEK_SET); int slotno = 0, curweaponslot = 0; for(i=0;iweapons[i].hasWeapon) { fputl(i, fp); fputl(file->weapons[i].level + 1, fp); fputl(file->weapons[i].xp, fp); fputl(file->weapons[i].maxammo, fp); fputl(file->weapons[i].ammo, fp); if (i == file->curWeapon) curweaponslot = slotno; slotno++; if (slotno >= MAX_WPN_SLOTS) break; } } if (slotno < MAX_WPN_SLOTS) fputl(0, fp); // 0-type weapon: terminator // go back and save slot no of current weapon fseek(fp, PF_CURWEAPON_OFFS, SEEK_SET); fputl(curweaponslot, fp); // save inventory fseek(fp, PF_INVENTORY_OFFS, SEEK_SET); for(i=0;ininventory;i++) { fputl(file->inventory[i], fp); } fputl(0, fp); // write teleporter slots fseek(fp, PF_TELEPORTER_OFFS, SEEK_SET); for(i=0;inum_teleslots) { fputl(file->teleslots[i].slotno, fp); fputl(file->teleslots[i].scriptno, fp); } else { fputl(0, fp); fputl(0, fp); } } // write flags fseek(fp, PF_FLAGS_OFFS, SEEK_SET); fputstringnonull("FLAG", fp); fresetboolean(); for(i=0;iflags[i], fp); } fbooleanflush(fp); fclose(fp); return 0; } /* void c------------------------------() {} */ // returns the filename for a save file given it's number const char *GetProfileName(int num) { #ifndef __HAIKU__ if (num == 0) return "profile.dat"; else return stprintf("profile%d.dat", num+1); #else char path[PATH_MAX]; char *haikuPath = getHaikuSettingsPath(); strcpy(path, haikuPath); if (num == 0) { strcat(path, "profile.dat"); } else { strcat(path, "profile%d.dat"); } free(haikuPath); return stprintf(path, num+1); #endif } // returns whether the given save file slot exists bool ProfileExists(int num) { return file_exists(GetProfileName(num)); } bool AnyProfileExists() { for(int i=0;i #include "nx.h" #include "replay.h" #include "profile.h" #include "replay.fdh" using namespace Replay; #define REPLAY_MAGICK 0xC322 static ReplayRecording rec; static ReplayPlaying play; static int next_ffwdto = 0; static int next_stopat = 0; static bool next_accel = false; extern int flipacceltime; // begin recording a replay into the given file, // creating the save-profile section from the current game state. bool Replay::begin_record(const char *fname) { FILE *fp; Profile profile; end_record(); memset(&rec, 0, sizeof(rec)); stat("begin_record('%s')", fname); // grab a savefile record of the game state and write it at the start of the file // just like a regular profile.dat. if (game_save(&profile)) return 1; if (profile_save(fname, &profile)) return 1; fp = fileopen(fname, "r+"); if (!fp) { staterr("begin_record: failed to open file %s", fname); return 1; } fseek(fp, PROFILE_LENGTH, SEEK_SET); // seek to end of profile data rec.hdr.magick = REPLAY_MAGICK; rec.hdr.randseed = getrand(); rec.hdr.locked = false; rec.hdr.total_frames = 0; rec.hdr.createstamp = (uint64_t)time(NULL); rec.hdr.stageno = game.curmap; memcpy(&rec.hdr.settings, &normal_settings, sizeof(Settings)); fwrite(&rec.hdr, sizeof(ReplayHeader), 1, fp); rec.fp = fp; seedrand(rec.hdr.randseed); fputl('MARK', fp); rec.fb.SetFile(fp); rec.fb.SetBufferSize(256); rec.fb.Dump(); return 0; } bool Replay::end_record() { if (!IsRecording()) return 1; // flush final RLE run write_record(rec.lastkeys, rec.runlength, &rec.fb); rec.runlength = 0; rec.fb.Flush(); rec.fb.SetFile(NULL); fputc('!', rec.fp); fputl('STOP', rec.fp); // go back and save the header again so we have total_frames correct. fseek(rec.fp, PROFILE_LENGTH, SEEK_SET); fwrite(&rec.hdr, sizeof(ReplayHeader), 1, rec.fp); fclose(rec.fp); stat("end_record(): wrote %d frames", rec.hdr.total_frames); memset(&rec, 0, sizeof(rec)); return 0; } /* void c------------------------------() {} */ // load the save-game contained with the given replay and begin playback. bool Replay::begin_playback(const char *fname) { FILE *fp; Profile profile; end_playback(); memset(&play, 0, sizeof(play)); stat("begin_playback('%s')", fname); if (profile_load(fname, &profile)) return 1; fp = fileopen(fname, "rb"); if (!fp) { staterr("begin_playback: failed to open file %s", fname); return 1; } fseek(fp, PROFILE_LENGTH, SEEK_SET); // seek to end of profile data fread(&play.hdr, sizeof(ReplayHeader), 1, fp); if (play.hdr.magick != REPLAY_MAGICK) { staterr("begin_playback: magick mismatch on file '%s' (%x shouldbe %x)", fname, play.hdr.magick, REPLAY_MAGICK); return 1; } // undo settings we don't want to apply during the replay memcpy(&replay_settings, &play.hdr.settings, sizeof(Settings)); replay_settings.resolution = normal_settings.resolution; replay_settings.sound_enabled = normal_settings.sound_enabled; replay_settings.music_enabled = normal_settings.music_enabled; game_load(&profile); seedrand(play.hdr.randseed); if (fgetl(fp) != 'MARK') { console.Print("Replay fail MARK"); return 1; } // debug stuff for replaying at startup from main.cpp play.ffwdto = next_ffwdto; next_ffwdto = 0; play.stopat = next_stopat; next_stopat = 0; play.ffwd_accel = next_accel; next_accel = 0; play.fp = fp; // dump_replay(); return 0; } bool Replay::end_playback() { if (!IsPlaying()) return 1; fclose(play.fp); play.fp = NULL; memset(inputs, 0, sizeof(inputs)); play.termtimer = 110; return 0; } /* void c------------------------------() {} */ // run record and playback. // * inputs states can be recorded to the file. // * inputs can be injected into the array from the file. void Replay::run() { //debug("%d %d", IsPlaying(), IsRecording()); if (IsPlaying()) { settings = &replay_settings; run_playback(); } else { settings = &normal_settings; } if (IsRecording()) run_record(); } // record incoming inputs states to the record_fp. void Replay::run_record() { rec.hdr.total_frames++; uint32_t keys = EncodeBits(inputs, INPUT_COUNT); if (keys != rec.lastkeys) { if (rec.runlength != 0) { write_record(rec.lastkeys, rec.runlength, &rec.fb); rec.runlength = 0; } rec.lastkeys = keys; } rec.runlength++; } static void Replay::run_playback() { play.elapsed_frames++; if (play.stopat && play.elapsed_frames >= play.stopat) { end_playback(); return; } if (play.ffwdto && play.elapsed_frames < play.ffwdto) { game.ffwdtime = 2; if (play.ffwd_accel) flipacceltime = 2; // global variable from main; disables screen->Flip() } // RLE decoding if (play.runlength == 0) { if (read_record(&play.keys, &play.runlength, play.fp)) { end_playback(); play.keys = 0; return; } play.elapsed_records++; } play.runlength--; debug("keys: %08x", play.keys); debug("runlength: %d", play.runlength); debug("frame: %d", play.elapsed_frames); debug("record: %d", play.elapsed_records); //debug("frames left: %d", (play.hdr.total_frames - play.elapsed_frames)); bool keys[INPUT_COUNT]; DecodeBits(play.keys, keys, INPUT_COUNT); // which recorded inputs should be applied static const int list[] = { LEFTKEY, RIGHTKEY, UPKEY, DOWNKEY, JUMPKEY, FIREKEY, PREVWPNKEY, NEXTWPNKEY, INVENTORYKEY, MAPSYSTEMKEY, DEBUG_MOVE_KEY, DEBUG_GOD_KEY, DEBUG_FLY_KEY, -1 }; for(int i=0;list[i] != -1;i++) { int key = list[i]; inputs[key] = keys[key]; } return; } /* void c------------------------------() {} */ static void write_record(uint32_t keys, uint32_t runlength, FileBuffer *fb) { fb->Write8('['); fb->Write32(keys); fb->Write8(':'); fb->Write32(runlength); fb->Write8(']'); } static bool read_record(uint32_t *keys, uint32_t *runlength, FILE *fp) { char ch = fgetc(fp); if (ch == '!') return REC_END; if (feof(fp)) { console.Print("unexpected end of file"); return REC_ERR; } if (ch != '[') { console.Print("replay field fail ["); return REC_ERR; } *keys = fgetl(fp); if (fgetc(fp) != ':') { console.Print("replay field fail :"); return REC_ERR; } *runlength = fgetl(fp); if (fgetc(fp) != ']') { console.Print("replay field fail ]"); return REC_ERR; } return REC_OK; } /* void c------------------------------() {} */ // draw the playback status "tape" void Replay::DrawStatus() { static const int TAPE_CHARS = 10; static const int x = 4; char buf[40]; int tapepos; if (!IsPlaying() || game.paused) { if (play.termtimer > 0) { play.termtimer--; const char *str = ((play.termtimer % 40) >= 20) ? "> PLAYBACK TERMINATED <":"> <"; int y = (SCREEN_HEIGHT - 3) - (GetFontHeight() * 2); font_draw_shaded(x, y, str, 0, &greenfont); } return; } // ask for one more char in length than we actually have, this makes it // so the tape gets all-the-way filled up near the end (otherwise, the only time // it'd be fully filled is on the very last frame, so we wouldn't ever see it). tapepos = GetPlaybackPosition(TAPE_CHARS + 1); if (tapepos > TAPE_CHARS) tapepos = TAPE_CHARS; // > PLAY : 00000 // [>>>>>>>>>>] buf[0] = '['; buf[TAPE_CHARS+1] = ']'; buf[TAPE_CHARS+2] = 0; memset(&buf[1], ' ', TAPE_CHARS); memset(&buf[1], '>', tapepos); int y = (SCREEN_HEIGHT - 3) - GetFontHeight(); font_draw_shaded(x, y, buf, 0, &greenfont); const char *mode = ((play.elapsed_frames % 40) < 20) ? "PLAY" : " "; if (game.ffwdtime) mode = "FFWD"; sprintf(buf, "> %s : %05d", mode, play.elapsed_frames); y -= GetFontHeight(); font_draw_shaded(x, y, buf, 0, &greenfont); } /* void c------------------------------() {} */ // called from main after a game is loaded or a new game is begun. void Replay::OnGameStarting() { stat("Replay::OnGameStarting()"); if (!IsPlaying()) begin_record_next(); } bool Replay::begin_record_next() { int slot = GetAvailableSlot(); if (slot == -1) { stat("begin_record_next: all slots locked; not recording a replay"); return 1; } stat("begin_record_next: starting record to slot %d", slot); return begin_record(GetReplayName(slot)); } static int Replay::GetAvailableSlot(void) { ReplaySlotInfo slotinfo[MAX_REPLAYS]; ReplaySlotInfo *unlocked[MAX_REPLAYS]; int i, numUnlocked; // get info for all slots. // try to find a slot that isn't used yet, if we can, take the first one. for(i=MAX_REPLAYS-1;i>=0;i--) { GetSlotInfo(i, &slotinfo[i]); //stat("Read status of slot %d: [ %d ]", i, slotinfo[i].status); if (slotinfo[i].status == RS_UNUSED) return i; } // nope, the easy way out didn't work because all the replay slots // have at least something in them. so, get a list of all unlocked files. numUnlocked = 0; for(i=0;ifilename); unlocked[numUnlocked]->status = RS_UNUSED; // assign new filenames to all the files in the list, working downward // from the highest-numbered slot. The going backwards also ensures there // can't be any conflicts while we're in the middle of this. int nextslot = (MAX_REPLAYS - 1); for(i=numUnlocked-1;i>=0;i--) { // skip over locked slots while(slotinfo[nextslot].status == RS_LOCKED) nextslot--; const char *newfilename = GetReplayName(nextslot); rename(unlocked[i]->filename, newfilename); strcpy(unlocked[i]->filename, newfilename); nextslot--; } // now take the first unused slot. we're sure that there is one this time. for(i=0;ifilename); if (LoadHeader(slot->filename, &slot->hdr) || \ slot->hdr.magick != REPLAY_MAGICK) { slot->status = RS_UNUSED; slot->filename[0] = 0; } else { slot->status = (slot->hdr.locked) ? RS_LOCKED : RS_UNLOCKED; } } const char *GetReplayName(int slotno, char *buffer) { if (!buffer) buffer = GetStaticStr(); #ifndef __HAIKU__ sprintf(buffer, "replay/rep%d.dat", slotno); #else char path[PATH_MAX]; char *haikuPath = getHaikuSettingsPath(); strcpy(path, haikuPath); strcat(path, "replay/rep%d.dat"); sprintf(buffer, path, slotno); free(haikuPath); #endif return buffer; } bool Replay::LoadHeader(const char *fname, ReplayHeader *hdr) { FILE *fp; fp = fileopen(fname, "rb"); if (!fp) { staterr("LoadHeader: can't open file '%s'", fname); return 1; } fseek(fp, PROFILE_LENGTH, SEEK_SET); // seek to end of profile data fread(hdr, sizeof(ReplayHeader), 1, fp); fclose(fp); return 0; } bool Replay::SaveHeader(const char *fname, ReplayHeader *hdr) { FILE *fp; fp = fileopen(fname, "r+"); if (!fp) { staterr("SaveHeader: can't open file '%s'", fname); return 1; } fseek(fp, PROFILE_LENGTH, SEEK_SET); // seek to end of profile data fwrite(hdr, sizeof(ReplayHeader), 1, fp); fclose(fp); return 0; } /* void c------------------------------() {} */ // converts a framecount value into a textual total time. void Replay::FramesToTime(int framecount, char *buffer) { int mins, secs; secs = (framecount / GAME_FPS); mins = (secs / 60); secs = (secs % 60); if (mins > 99) mins = 99; sprintf(buffer, "[%02d:%02d]", mins, secs); } // returns a value between 0 and max which is like a percentage // of where we are on the "tape" (only works during playback). int Replay::GetPlaybackPosition(int max) { if (play.elapsed_frames >= play.hdr.total_frames) return max; double ratio = ((double)max / (double)play.hdr.total_frames); return (int)((double)play.elapsed_frames * ratio); } /* void c------------------------------() {} */ bool Replay::IsRecording() { return (rec.fp != NULL); } bool Replay::IsPlaying() { return (play.fp != NULL); } void Replay::close() { end_record(); end_playback(); } /* void c------------------------------() {} */ void Replay::set_ffwd(int frame, bool accel) { if (IsPlaying()) { play.ffwdto = frame; play.ffwd_accel = accel; } else { next_ffwdto = frame; next_accel = accel; } } void Replay::set_stopat(int frame) { if (IsPlaying()) play.stopat = frame; else next_stopat = frame; } /* void c------------------------------() {} */ // shoves an array of bool values up to 32 entries long into a uint32. static uint32_t Replay::EncodeBits(bool *values, int nvalues) { uint32_t result = 0; uint32_t mask = 1; for(int i=0;i= 0x200000) { staterr(" -- bogus runlength %08x", runlength); break; } lastkeys = keys; } //total_frames--; stat("total frames count: %d", total_frames); stat("frames reported: %d", play.hdr.total_frames); exit(1); } ================================================ FILE: replay.fdh ================================================ //hash:afdce1d2 //automatically generated by Makegen /* located in game.cpp */ //--------------------[referenced from replay.cpp]-------------------// bool game_save(Profile *p); bool game_load(Profile *p); /* located in map.cpp */ //--------------------[referenced from replay.cpp]-------------------// const char *map_get_stage_name(int mapno); /* located in profile.cpp */ //--------------------[referenced from replay.cpp]-------------------// bool profile_save(const char *pfname, Profile *file); bool profile_load(const char *pfname, Profile *file); /* located in platform.cpp */ //--------------------[referenced from replay.cpp]-------------------// FILE *fileopen(const char *fname, const char *mode); /* located in replay.cpp */ //--------------------[referenced from replay.cpp]-------------------// static void write_record(uint32_t keys, uint32_t runlength, FileBuffer *fb); static bool read_record(uint32_t *keys, uint32_t *runlength, FILE *fp); const char *GetReplayName(int slotno, char *buffer); static void dump_replay(); /* located in debug.cpp */ //--------------------[referenced from replay.cpp]-------------------// void debug(const char *fmt, ...); /* located in graphics/font.cpp */ //--------------------[referenced from replay.cpp]-------------------// int GetFontHeight(); int font_draw_shaded(int x, int y, const char *text, int spacing, NXFont *font); /* located in common/stat.cpp */ //--------------------[referenced from replay.cpp]-------------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //--------------------[referenced from replay.cpp]-------------------// uint32_t getrand(); void seedrand(uint32_t newseed); void fputl(uint32_t word, FILE *fp); uint32_t fgetl(FILE *fp); bool file_exists(const char *fname); char *GetStaticStr(void); ================================================ FILE: replay.h ================================================ #ifndef _REPLAY_H #define _REPLAY_H #include "common/FileBuffer.h" #define MAX_REPLAYS 8 // how many automatic replays to save #define REC_OK 0 #define REC_ERR 1 #define REC_END 2 struct ReplayHeader { uint16_t magick; uint32_t randseed; bool locked; int total_frames; int stageno; uint64_t createstamp; Settings settings; }; struct ReplayRecording { ReplayHeader hdr; FileBuffer fb; uint32_t lastkeys; uint32_t runlength; FILE *fp; }; struct ReplayPlaying { ReplayHeader hdr; uint32_t keys; uint32_t runlength; int elapsed_frames; int elapsed_records; FILE *fp; int ffwdto, ffwd_accel; int stopat; int termtimer; // blinks "TERMINATED" after replay ends }; enum RS_Status { RS_UNUSED, // there is no file in this slot RS_UNLOCKED, // there is an unlocked file in this slot RS_LOCKED // there is a locked file in this slot }; struct ReplaySlotInfo { char filename[MAXPATHLEN]; // filename of the replay for this slot, if there is one int status; // status of this slot ReplayHeader hdr; // header from slot }; namespace Replay { bool begin_record(const char *fname); bool end_record(); bool begin_playback(const char *fname); bool end_playback(); void run(); void close(); void OnGameStarting(); bool begin_record_next(); bool IsRecording(); bool IsPlaying(); void DrawStatus(); void set_ffwd(int frame, bool accel=true); void set_stopat(int frame); bool LoadHeader(const char *fname, ReplayHeader *hdr); bool SaveHeader(const char *fname, ReplayHeader *hdr); void GetSlotInfo(int slotno, ReplaySlotInfo *slot); void FramesToTime(int framecount, char *buffer); int GetPlaybackPosition(int max); static uint32_t EncodeBits(bool *values, int nvalues); static void DecodeBits(uint32_t value, bool *array, int len); static void run_record(); static void run_playback(); static int GetAvailableSlot(void); }; const char *GetReplayName(int slotno, char *buffer = NULL); #endif ================================================ FILE: screeneffect.cpp ================================================ #include "nx.h" #include "screeneffect.h" #include "screeneffect.fdh" SE_FlashScreen flashscreen; SE_Starflash starflash; SE_Fade fade; /* void c------------------------------() {} */ // FlashScreen simply flashes the screen white several times, // and is used in various places, such as when Misery casts spells. void SE_FlashScreen::Start(void) { timer = -1; flashes_left = 5; flashstate = true; enabled = true; } void SE_FlashScreen::Draw(void) { if (++timer >= 2) { timer = 0; flashstate ^= 1; if (!flashstate) { if (--flashes_left <= 0) enabled = false; } } if (flashstate) ClearScreen(0xff, 0xff, 0xff); } /* void c------------------------------() {} */ // Starflash is a full-screen white explosion in the shape of a '+', // used when some bosses are defeated. void SE_Starflash::Start(int x, int y) { sound(SND_EXPLOSION1); enabled = true; state = 0; centerx = x; centery = y; size = speed = 0; } void SE_Starflash::Draw(void) { SE_Starflash * const &star = this; int scr_x1, scr_y1, scr_x2, scr_y2; int rel_x, rel_y; if (state == 0) { // flash getting bigger star->speed += (1 << CSF); star->size += star->speed; } else { // flash getting smaller star->size -= (star->size >> 3); if (star->size < 255) { enabled = false; return; } } // draw the flash rel_x = (star->centerx - map.displayed_xscroll); rel_y = (star->centery - map.displayed_yscroll); // draw a horizontal bar scr_y1 = (rel_y - star->size) >> CSF; scr_y2 = (rel_y + star->size) >> CSF; FillRect(0, scr_y1, SCREEN_WIDTH, scr_y2, 255, 255, 255); if (star->state == 0) { // draw a vertical bar scr_x1 = (rel_x - starflash.size) >> CSF; scr_x2 = (rel_x + starflash.size) >> CSF; FillRect(scr_x1, 0, scr_x2, SCREEN_HEIGHT, 255, 255, 255); // once it's big enough, switch to making it smaller if (star->size > (1280<size = (SCREEN_HEIGHT << CSF); star->state = 1; } } } /* void c------------------------------() {} */ #define FADE_LAST_FRAME 15 // Fade is the fade-in/out used on every stage transistion/TRA. // Unlike other effects, it is drawn underneath the textboxes and Nikumaru counter, // and so isn't drawn from ScreenEffects::Draw(). SE_Fade::SE_Fade() { state = FS_NO_FADE; enabled = false; } // start a fade in or out. // fadedir: either FADE_IN or FADE_OUT // sweepdir: direction to "sweep" the fade // spr: the sprite to use for the fading void SE_Fade::Start(int fadedir, int sweepdir, int spr) { if (fadedir == FADE_OUT) { // when fading out, the directions are reversed switch(sweepdir) { case FADE_LEFT: sweepdir = FADE_RIGHT; break; case FADE_RIGHT: sweepdir = FADE_LEFT; break; case FADE_UP: sweepdir = FADE_DOWN; break; case FADE_DOWN: sweepdir = FADE_UP; break; } } state = FS_FADING; enabled = true; fade.sprite = spr; fade.fadedir = fadedir; fade.sweepdir = sweepdir; fade.curframe = (fadedir == FADE_OUT) ? -FADE_LAST_FRAME : FADE_LAST_FRAME; } void SE_Fade::Draw(void) { int x, y; #define DRAW_VCOLUMN \ { \ if (frame >= 0) \ { \ if (frame > FADE_LAST_FRAME) frame = FADE_LAST_FRAME; \ \ for(y=0;y= 0) \ { \ if (frame > FADE_LAST_FRAME) frame = FADE_LAST_FRAME; \ \ for(x=0;x=-16;x-=16) { DRAW_VCOLUMN; frame++; } break; case FADE_DOWN: for(y=0;y=-16;y-=16) { DRAW_HROW; frame++; } break; case FADE_CENTER: { int startframe = fade.curframe; int centerx = (SCREEN_WIDTH/2)-8; int centery = (SCREEN_HEIGHT/2)-8; for(x=0;x= 0) { if (frame > FADE_LAST_FRAME) frame = FADE_LAST_FRAME; draw_sprite(centerx+x, centery+y, fade.sprite, frame); draw_sprite(centerx-x, centery+y, fade.sprite, frame); draw_sprite(centerx+x, centery-y, fade.sprite, frame); draw_sprite(centerx-x, centery-y, fade.sprite, frame); } frame++; } startframe++; } } break; } if (fade.fadedir == FADE_OUT) { fade.curframe++; if (fade.curframe > FADE_LAST_FRAME) state = FS_FADED_OUT; } else { // fading in--terminate fade when done fade.curframe--; if (fade.curframe < -20) { state = FS_NO_FADE; enabled = false; } } } void SE_Fade::set_full(int dir) { if (dir == FADE_OUT) { state = FS_FADED_OUT; fade.fadedir = FADE_OUT; fade.sweepdir = FADE_RIGHT; // doesn't matter fade.curframe = FADE_LAST_FRAME; fade.sprite = SPR_FADE_DIAMOND; } else { state = FS_NO_FADE; enabled = false; } } int SE_Fade::getstate(void) { return this->state; } /* void c------------------------------() {} */ void ScreenEffects::Draw(void) { if (starflash.enabled) starflash.Draw(); if (flashscreen.enabled) flashscreen.Draw(); } void ScreenEffects::Stop() { starflash.enabled = false; flashscreen.enabled = false; } ================================================ FILE: screeneffect.fdh ================================================ //hash:a8ebd728 //automatically generated by Makegen /* located in sound/sound.cpp */ //-----------------[referenced from screeneffect.cpp]----------------// void sound(int snd); ================================================ FILE: screeneffect.h ================================================ #ifndef _SCREENEFFECT_H #define _SCREENEFFECT_H // screeneffects are a simple draw overlay used w/ things such as flashes and such. class ScreenEffect { public: ScreenEffect() { enabled = false; } virtual ~ScreenEffect() { } virtual void Draw() = 0; bool enabled; protected: int state; int timer; }; // FlashScreen simply flashes the screen white several times, // and is used in various places such as when Misery casts spells. struct SE_FlashScreen : public ScreenEffect { void Start(); void Draw(); int flashes_left; bool flashstate; }; // Starflash is a full-screen white explosion in the shape of a '+', // used when some bosses are defeated. struct SE_Starflash : public ScreenEffect { void Start(int x, int y); void Draw(); int centerx, centery; int size, speed; }; // Fade is the fade-in/out used on every stage transistion/TRA. struct SE_Fade : public ScreenEffect { SE_Fade(); void Start(int fadedir, int dir, int spr=SPR_FADE_DIAMOND); void Draw(void); void set_full(int dir); int getstate(void); struct { int fadedir; int sweepdir; int curframe; int sprite; } fade; }; #define FADE_IN 0 #define FADE_OUT 1 // these directions correspond to the FAI/FAO parameters. #define FADE_LEFT 0 #define FADE_UP 1 #define FADE_RIGHT 2 #define FADE_DOWN 3 #define FADE_CENTER 4 #define FS_NO_FADE 0 // no fade is active #define FS_FADING 1 // currently fading in or out #define FS_FADED_OUT 2 // completely faded out namespace ScreenEffects { void Draw(void); void Stop(); }; extern SE_FlashScreen flashscreen; extern SE_Starflash starflash; extern SE_Fade fade; #endif ================================================ FILE: settings.cpp ================================================ #include #include #include #include #include #include "settings.h" #include "replay.h" #include "settings.fdh" #include "nx.h" const char *setfilename = "settings.dat"; const uint16_t SETTINGS_VERSION = 0x1602; // serves as both a version and magic Settings normal_settings; Settings replay_settings; Settings *settings = &normal_settings; bool settings_load(Settings *setfile) { if (!setfile) setfile = &normal_settings; if (tryload(settings)) { stat("No saved settings; using defaults."); memset(setfile, 0, sizeof(Settings)); #if defined (_480X272) || defined (_320X240) setfile->resolution = 0; // 640x480 Windowed, should be safe value #else setfile->resolution = 2; #endif setfile->last_save_slot = 0; setfile->multisave = true; setfile->enable_debug_keys = false; setfile->sound_enabled = true; setfile->music_enabled = 1; // both Boss and Regular music setfile->instant_quit = false; setfile->emulate_bugs = false; setfile->no_quake_in_hell = false; setfile->inhibit_fullscreen = false; #ifndef __HAIKU__ setfile->files_extracted = false; #else setfile->files_extracted = true; #endif // I found that 8bpp->32bpp blits are actually noticably faster // than 32bpp->32bpp blits on several systems I tested. Not sure why // but calling SDL_DisplayFormat seems to actually be slowing things // down. This goes against established wisdom so if you want it back on, // run "displayformat 1" in the console and restart. setfile->displayformat = false; return 1; } else { #ifdef __SDLSHIM__ stat("settings_load(): Hey FIXME!!!"); settings->show_fps = true; #else input_set_mappings(settings->input_mappings); #endif } return 0; } /* void c------------------------------() {} */ static bool tryload(Settings *setfile) { FILE *fp; stat("Loading settings..."); #ifdef __HAIKU__ char path[PATH_MAX]; char *haikuPath = getHaikuSettingsPath(); strcpy(path, haikuPath); strcat(path, setfilename); free(haikuPath); fp = fileopen(path, "rb"); #else fp = fileopen(setfilename, "rb"); #endif if (!fp) { stat("Couldn't open file %s.", setfilename); return 1; } setfile->version = 0; fread(setfile, sizeof(Settings), 1, fp); if (setfile->version != SETTINGS_VERSION) { stat("Wrong settings version %04x.", setfile->version); return 1; } fclose(fp); return 0; } bool settings_save(Settings *setfile) { FILE *fp; if (!setfile) setfile = &normal_settings; stat("Writing settings..."); #ifdef __HAIKU__ char path[PATH_MAX]; char *haikuPath = getHaikuSettingsPath(); strcpy(path, haikuPath); strcat(path, setfilename); free(haikuPath); fp = fileopen(path, "wb"); #else fp = fileopen(setfilename, "wb"); #endif if (!fp) { stat("Couldn't open file %s.", setfilename); return 1; } for(int i=0;iinput_mappings[i] = input_get_mapping(i); setfile->version = SETTINGS_VERSION; fwrite(setfile, sizeof(Settings), 1, fp); fclose(fp); return 0; } ================================================ FILE: settings.fdh ================================================ //hash:db8bcb16 //automatically generated by Makegen /* located in settings.cpp */ //-------------------[referenced from settings.cpp]------------------// bool settings_load(Settings *setfile); static bool tryload(Settings *setfile); bool settings_save(Settings *setfile); /* located in platform.cpp */ //-------------------[referenced from settings.cpp]------------------// FILE *fileopen(const char *fname, const char *mode); /* located in input.cpp */ //-------------------[referenced from settings.cpp]------------------// void input_set_mappings(int *array); int input_get_mapping(int keyindex); /* located in common/stat.cpp */ //-------------------[referenced from settings.cpp]------------------// void stat(const char *fmt, ...); ================================================ FILE: settings.h ================================================ #ifndef _SETTINGS_H #define _SETTINGS_H #include "input.h" struct Settings { uint16_t version; int resolution; int last_save_slot; bool multisave; bool files_extracted; bool show_fps; bool displayformat; bool enable_debug_keys; bool sound_enabled; int music_enabled; bool instant_quit; bool emulate_bugs; bool no_quake_in_hell; bool inhibit_fullscreen; bool skip_intro; int reserved[8]; int input_mappings[INPUT_COUNT]; }; bool settings_load(Settings *settings=NULL); bool settings_save(Settings *settings=NULL); extern Settings *settings; extern Settings normal_settings; extern Settings replay_settings; #endif ================================================ FILE: siflib/sectSprites.cpp ================================================ #include #include #include #include "../common/DBuffer.h" #include "../common/bufio.h" #include "sectSprites.h" #include "sectSprites.fdh" int SIFSpritesSect::GetSpriteCount(const uint8_t *data, int datalen) { const uint8_t *data_end = data + (datalen - 1); return read_U16(&data, data_end); } bool SIFSpritesSect::Decode(const uint8_t *data, int datalen, \ SIFSprite *sprites, int *nsprites_out, int maxsprites) { const uint8_t *data_end = data + (datalen - 1); int i, f, nsprites; nsprites = read_U16(&data, data_end); if (nsprites_out) *nsprites_out = nsprites; if (nsprites >= maxsprites) { staterr("SIFSpritesSect::Decode: too many sprites in file (nsprites=%d, maxsprites=%d)", nsprites, maxsprites); return 1; } stat("SIFSpritesSect: loading %d sprites", nsprites); for(i=0;i data_end) { staterr("SIFSpritesSect::Decode: section corrupt: overran end of data"); return 1; } // read sprite-level fields sprites[i].w = read_U8(&data, data_end); sprites[i].h = read_U8(&data, data_end); sprites[i].spritesheet = read_U8(&data, data_end); sprites[i].nframes = read_U8(&data, data_end); sprites[i].ndirs = read_U8(&data, data_end); if (sprites[i].ndirs > SIF_MAX_DIRS) { staterr("SIFSpritesSect::Decode: SIF_MAX_DIRS exceeded on sprite %d (ndirs=%d)", i, sprites[i].ndirs); return 1; } LoadRect(&sprites[i].bbox, &data, data_end); LoadRect(&sprites[i].solidbox, &data, data_end); LoadPoint(&sprites[i].spawn_point, &data, data_end); LoadPointList(&sprites[i].block_l, &data, data_end); LoadPointList(&sprites[i].block_r, &data, data_end); LoadPointList(&sprites[i].block_u, &data, data_end); LoadPointList(&sprites[i].block_d, &data, data_end); // malloc enough space to hold the specified number // of apple fritters, i mean, frames. sprites[i].frame = (SIFFrame *)malloc(sizeof(SIFFrame) * sprites[i].nframes); // then load all frames for(f=0;fdir[d]; LoadPoint(&dir->sheet_offset, data, data_end); int t; for(;;) { t = read_U8(data, data_end); if (t == S_DIR_END) break; switch(t) { case S_DIR_DRAW_POINT: LoadPoint(&dir->drawpoint, data, data_end); break; case S_DIR_ACTION_POINT: LoadPoint(&dir->actionpoint, data, data_end); break; case S_DIR_ACTION_POINT_2: LoadPoint(&dir->actionpoint2, data, data_end); break; case S_DIR_PF_BBOX: LoadRect(&dir->pf_bbox, data, data_end); break; default: stat("SIFSpriteSect::LoadFrame: encountered unknown optional field type %d", t); return 1; } } } return 0; } /* void c------------------------------() {} */ void SIFSpritesSect::LoadRect(SIFRect *rect, const uint8_t **data, const uint8_t *data_end) { rect->x1 = (int16_t)read_U16(data, data_end); rect->y1 = (int16_t)read_U16(data, data_end); rect->x2 = (int16_t)read_U16(data, data_end); rect->y2 = (int16_t)read_U16(data, data_end); } void SIFSpritesSect::LoadPoint(SIFPoint *pt, const uint8_t **data, const uint8_t *data_end) { pt->x = (int16_t)read_U16(data, data_end); pt->y = (int16_t)read_U16(data, data_end); } void SIFSpritesSect::LoadPointList(SIFPointList *lst, const uint8_t **data, const uint8_t *data_end) { lst->count = read_U8(data, data_end); if (lst->count > SIF_MAX_BLOCK_POINTS) { staterr("SIFSpritesSect::LoadPointList: too many block points (%d, max=%d)", lst->count, SIF_MAX_BLOCK_POINTS); return; } for(int i=0;icount;i++) { lst->point[i].x = (int16_t)read_U16(data, data_end); lst->point[i].y = (int16_t)read_U16(data, data_end); } } /* void c------------------------------() {} */ uint8_t *SIFSpritesSect::Encode(SIFSprite *sprites, int nsprites, int *datalen_out) { DBuffer buf; int i, f; buf.Append16(nsprites); for(i=0;idir[d]; SavePoint(&dir->sheet_offset, out); SaveOptionalPoint(S_DIR_DRAW_POINT, &dir->drawpoint, out); SaveOptionalPoint(S_DIR_ACTION_POINT, &dir->actionpoint, out); SaveOptionalPoint(S_DIR_ACTION_POINT_2, &dir->actionpoint2, out); SaveOptionalRect(S_DIR_PF_BBOX, &dir->pf_bbox, out); out->Append8(S_DIR_END); } } /* void c------------------------------() {} */ void SIFSpritesSect::SaveRect(SIFRect *rect, DBuffer *out) { out->Append16((uint16_t)rect->x1); out->Append16((uint16_t)rect->y1); out->Append16((uint16_t)rect->x2); out->Append16((uint16_t)rect->y2); } void SIFSpritesSect::SavePoint(SIFPoint *pt, DBuffer *out) { out->Append16((uint16_t)pt->x); out->Append16((uint16_t)pt->y); } void SIFSpritesSect::SavePointList(SIFPointList *lst, DBuffer *out) { out->Append8(lst->count); for(int i=0;icount;i++) { out->Append16((uint16_t)lst->point[i].x); out->Append16((uint16_t)lst->point[i].y); } } void SIFSpritesSect::SaveOptionalPoint(int type, SIFPoint *pt, DBuffer *out) { if (!pt->equ(0, 0)) { out->Append8(type); SavePoint(pt, out); } } void SIFSpritesSect::SaveOptionalRect(int type, SIFRect *rect, DBuffer *out) { if (!rect->equ(0, 0, 0, 0)) { out->Append8(type); SaveRect(rect, out); } } ================================================ FILE: siflib/sectSprites.fdh ================================================ //hash:99f5c088 //automatically generated by Makegen /* located in common/bufio.cpp */ //--------------[referenced from siflib/sectSprites.cpp]-------------// uint16_t read_U16(const uint8_t **data, const uint8_t *data_end); uint8_t read_U8(const uint8_t **data, const uint8_t *data_end); /* located in common/stat.cpp */ //--------------[referenced from siflib/sectSprites.cpp]-------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); ================================================ FILE: siflib/sectSprites.h ================================================ #ifndef _SECT_SPRITES_H #define _SECT_SPRITES_H // this decodes and encodes the main sprites[] array of SIFSprite structures. class DBuffer; #include "sif.h" class SIFSpritesSect { public: // get how many sprites are in the file. You can call this first if you need // to know how big to make the array. static int GetSpriteCount(const uint8_t *data, int datalen); // decode from a SIF_SECTION_SPRITES and use the resultant data to fill in // an array of SIFSprite structures pointed to by sprites. static bool Decode(const uint8_t *data, int datalen, \ SIFSprite *sprites, int *nsprites_out, int maxsprites); // read sprites out of the given array of SIFSprite structures and generate // a SIF_SECTION_SPRITES record. static uint8_t *Encode(SIFSprite *sprites, int nsprites, int *datalen_out); private: static void LoadRect(SIFRect *rect, const uint8_t **data, const uint8_t *data_end); static void LoadPoint(SIFPoint *pt, const uint8_t **data, const uint8_t *data_end); static void LoadPointList(SIFPointList *lst, const uint8_t **data, const uint8_t *data_end); static bool LoadFrame(SIFFrame *frame, int ndirs, const uint8_t **data, const uint8_t *data_end); static void SaveRect(SIFRect *rect, DBuffer *out); static void SavePoint(SIFPoint *pt, DBuffer *out); static void SavePointList(SIFPointList *lst, DBuffer *out); static void SaveOptionalPoint(int type, SIFPoint *pt, DBuffer *out); static void SaveOptionalRect(int type, SIFRect *rect, DBuffer *out); static void SaveFrame(SIFFrame *frame, int ndirs, DBuffer *out); }; // field types within SIFDir which are optional enum { S_DIR_END, // ends section list S_DIR_DRAW_POINT, // default is [0,0] S_DIR_ACTION_POINT, // default is [0,0] S_DIR_ACTION_POINT_2, // default is [0,0] S_DIR_PF_BBOX // default is no per-frame bbox, or rather [0,0]-[0,0] }; #endif ================================================ FILE: siflib/sectStringArray.cpp ================================================ #include #include #include #include "../common/DBuffer.h" #include "../common/DString.h" #include "../common/bufio.h" #include "../common/StringList.h" #include "sectStringArray.h" #include "sectStringArray.fdh" // decode the raw section data into the given StringList object bool SIFStringArraySect::Decode(const uint8_t *data, int datalen, StringList *out) { const uint8_t *data_end = data + (datalen - 1); int i, nstrings; nstrings = read_U16(&data, data_end); for(i=0;i data_end) { staterr("SIFStringArraySect::Decode: section corrupt: overran end of data"); return 1; } DString string; ReadPascalString(&data, data_end, &string); out->AddString(string.String()); } return 0; } uint8_t *SIFStringArraySect::Encode(StringList *strings, int *datalen_out) { DBuffer buf; if (strings->CountItems() > 65535) { staterr("SIFStringArraySect::Encode: too many strings in list"); return NULL; } buf.Append16(strings->CountItems()); for(int i=0;;i++) { const char *str = strings->StringAt(i); if (!str) break; WritePascalString(str, &buf); } if (datalen_out) *datalen_out = buf.Length(); return buf.TakeData(); } /* void c------------------------------() {} */ void SIFStringArraySect::ReadPascalString(const uint8_t **data, const uint8_t *data_end, DString *out) { int len = read_U8(data, data_end); if (len == 255) len = read_U16(data, data_end); out->Clear(); for(int i=0;iAppendChar(read_U8(data, data_end)); } } void SIFStringArraySect::WritePascalString(const char *str, DBuffer *out) { int len = strlen(str); if (len > 65535) len = 65535; if (len < 255) { out->Append8(len); } else { out->Append8(0xff); out->Append16(len); } for(int j=0;jAppend8(str[j]); } ================================================ FILE: siflib/sectStringArray.fdh ================================================ //hash:89fa228c //automatically generated by Makegen /* located in tsc.cpp */ //------------[referenced from siflib/sectStringArray.cpp]-----------// void Clear(); /* located in common/bufio.cpp */ //------------[referenced from siflib/sectStringArray.cpp]-----------// uint16_t read_U16(const uint8_t **data, const uint8_t *data_end); uint8_t read_U8(const uint8_t **data, const uint8_t *data_end); /* located in common/stat.cpp */ //------------[referenced from siflib/sectStringArray.cpp]-----------// void staterr(const char *fmt, ...); ================================================ FILE: siflib/sectStringArray.h ================================================ #ifndef _SECT_STRINGARRAY_H #define _SECT_STRINGARRAY_H class StringList; class DString; class DBuffer; // the SectStringArray handler decodes sif sections which consist of an array // of pascal strings. This includes SIF_SECTION_SHEETS and SIF_SECTION_DIRECTORY. class SIFStringArraySect { public: static bool Decode(const uint8_t *data, int datalen, StringList *out); static uint8_t *Encode(StringList *strings, int *datalen_out); static void ReadPascalString(const uint8_t **data, const uint8_t *data_end, DString *out); static void WritePascalString(const char *str, DBuffer *out); }; #endif ================================================ FILE: siflib/sif.cpp ================================================ #include #include #include #include #include "sif.h" #include "sifloader.h" #include "sectSprites.h" #include "sectStringArray.h" #include "sif.fdh" // safely make some vars sane while still staying POD void SIFSprite::Init() { frame = NULL; } // completely zero ALL vars void SIFSprite::Zero() { memset(this, 0, sizeof(SIFSprite)); } void SIFSprite::FreeData() { if (frame) { free(frame); frame = NULL; } } /* void c------------------------------() {} */ void SIFSprite::CopyFrom(SIFSprite *other) { *this = *other; // whoops though, we can't share the frame pointer, so create a new copy of that int copy_size = (nframes * sizeof(SIFFrame)); frame = (SIFFrame *)malloc(copy_size); memcpy(frame, other->frame, copy_size); } SIFSprite *SIFSprite::Duplicate() { SIFSprite *spr = (SIFSprite *)malloc(sizeof(SIFSprite)); spr->CopyFrom(this); return spr; } /* void c------------------------------() {} */ void SIFSprite::AddFrame(SIFFrame *newframe) { int frameno = nframes; SetNumFrames(nframes + 1); memcpy(&frame[frameno], newframe, sizeof(SIFFrame)); } void SIFSprite::InsertFrame(SIFFrame *newframe, int insertbefore) { if (insertbefore < 0) return; if (insertbefore >= nframes - 1) { AddFrame(newframe); return; } // copy newframe now--if it's a pointer to one of our own frames, it might get // invalidated in a moment when SetNumFrames realloc's. SIFFrame insertframe = *newframe; SetNumFrames(nframes + 1); int copy_len = ((nframes - 1) - insertbefore) * sizeof(SIFFrame); memmove(&frame[insertbefore+1], &frame[insertbefore], copy_len); frame[insertbefore] = insertframe; } void SIFSprite::DeleteFrame(int index) { if (index < 0 || index >= nframes) return; if (index < (nframes - 1)) { int copy_len = ((nframes - 1) - index) * sizeof(SIFFrame); memmove(&frame[index], &frame[index+1], copy_len); } SetNumFrames(nframes - 1); } void SIFSprite::SetNumFrames(int newcount) { if (newcount == nframes) return; int required_size = (sizeof(SIFFrame) * newcount); if (frame) frame = (SIFFrame *)realloc(frame, required_size); else frame = (SIFFrame *)malloc(required_size); if (newcount > nframes) { int blank_size = (newcount - nframes) * sizeof(SIFFrame); memset(&frame[nframes], 0, blank_size); } nframes = newcount; return; } SIFDir *SIFSprite::dir(int f, int d) { if (f < 0 || f >= nframes) return NULL; if (d < 0 || d >= ndirs) return NULL; if (frame == NULL) return NULL; return &frame[f].dir[d]; } /* void c------------------------------() {} */ ================================================ FILE: siflib/sif.fdh ================================================ //hash:00000000 //automatically generated by Makegen ================================================ FILE: siflib/sif.h ================================================ #ifndef _SIF_H #define _SIF_H #include "../common/misc.fdh" // stprintf // a sprite has certain settings global to the whole sprite. // each sprite also contains a certain number of frames. // each frame contains one or more directions, for example for when that // frame is facing left or right, and sometimes up or down. // the number of directions is settable per-sprite, but each frame in // a given sprite always has the same number of directions. // this layout is somewhat wasteful of memory what with all static allocations and few pointers // or dynamically-sized substructures. the reason I did it this way is for speed; hoping the // tradeoff in memory will mean less indirections to access the sprite data, which is generally // read several times per frame per sprite. #define SIF_MAX_DIRS 4 #define SIF_MAX_BLOCK_POINTS 4 struct SIFPoint { int16_t x, y; void set(int x, int y) { this->x = x; this->y = y; } void offset(int dx, int dy) { x += dx; y += dy; } bool equ(int x, int y) { return (this->x == x && this->y == y); } const char *ToString() { return stprintf("[%d, %d]", this->x, this->y); } bool operator== (const SIFPoint &other) const { return (this->x == other.x && this->y == other.y); } bool operator!= (const SIFPoint &other) const { return (this->x != other.x || this->y != other.y); } }; struct SIFRect { int16_t x1, y1, x2, y2; void set(int x1, int y1, int x2, int y2) { this->x1 = x1; this->y1 = y1; this->x2 = x2; this->y2 = y2; } void offset(int dx, int dy) { x1 += dx; y1 += dy; x2 += dx; y2 += dy; } bool equ(int x1, int y1, int x2, int y2) { return (this->x1 == x1 && this->y1 == y1 && \ this->x2 == x2 && this->y2 == y2); } const char *ToString() { return stprintf("[%d, %d] - [%d, %d]", this->x1, this->y1, this->x2, this->y2); } bool operator== (const SIFRect &other) const { return (x1 == other.x1 && y1 == other.y1 && \ x2 == other.x2 && y2 == other.y2); } bool operator!= (const SIFRect &other) const { return (x1 != other.x1 || y1 != other.y1 || \ x2 != other.x2 || y2 != other.y2); } }; struct SIFPointList { SIFPoint point[SIF_MAX_BLOCK_POINTS]; int count; SIFPoint& operator[] (const int nIndex) { return point[nIndex]; } bool operator== (const SIFPointList &other) const { if (other.count != count) return false; for(int i=0;ix & o->y can represent their center // point instead of their upper-left corner. SIFPoint drawpoint; // a pixel of "noteworthiness" on the sprite. // * for Player: position he holds his gun at // * for Guns: position to spawn the shots at // * for everything else: whatever they want it for SIFPoint actionpoint; // optional secondary action point SIFPoint actionpoint2; // optional additional/extra per-frame/dir bbox // (has no effect to engine, it's just metadata. but object AI can copy the // per-frame bbox over the real bbox when changing the frame). SIFRect pf_bbox; }; struct SIFFrame { SIFDir dir[SIF_MAX_DIRS]; }; // a design goal here is that this structure MUST STAY POD so // no virtuals, constructors, classes for members or anything else // dodgy that might endanger that. we should able to zero out a SIFSprite // with memset and worry about nothing. yes it has a few member functions // but those are just a syntactical detail and should be harmless. struct SIFSprite { void Init(); void Zero(); void FreeData(); void AddFrame(SIFFrame *newframe); void InsertFrame(SIFFrame *newframe, int insertbefore); void DeleteFrame(int index); void SetNumFrames(int newcount); SIFDir *dir(int frame, int dir); void CopyFrom(SIFSprite *other); SIFSprite *Duplicate(); // --------------------------------------- int w, h; uint8_t spritesheet; // # of spritesheet sprite is located on int nframes; int ndirs; SIFFrame *frame; SIFRect bbox; // bounding box for hit detection with other sprites SIFRect solidbox; // bounding box for solidity w/ other objects SIFRect slopebox; // bounding box for moving up and down slopes (generated at runtime) // when an object is spawned or changed from one type to another, this point is subtracted // from it's x,y coordinates, so that this point ends up being centered on the given x,y coords. SIFPoint spawn_point; // points to check for setting the corresponding block vars on the object // (which determine whether it's blocked on that side by a solid wall or object). SIFPointList block_l; SIFPointList block_r; SIFPointList block_u; SIFPointList block_d; }; #endif ================================================ FILE: siflib/sifloader.cpp ================================================ #include #include #include #include "sifloader.h" #include "sifloader.fdh" #define SIF_MAGICK 'SIF2' // SIF magick and version denotation; first 4 bytes of file SIFLoader::SIFLoader() { fFP = NULL; } SIFLoader::~SIFLoader() { ClearIndex(); if (fFP) fclose(fFP); } /* void c------------------------------() {} */ void SIFLoader::ClearIndex() { for(int i=0;;i++) { SIFIndexEntry *entry = (SIFIndexEntry *)fIndex.ItemAt(i); if (!entry) break; if (entry->data) free(entry->data); delete entry; } fIndex.MakeEmpty(); } void SIFLoader::CloseFile() { ClearIndex(); if (fFP) { fclose(fFP); fFP = NULL; } } /* void c------------------------------() {} */ bool SIFLoader::LoadHeader(const char *filename) { FILE *fp; uint32_t magick; ClearIndex(); if (fFP) fclose(fFP); fp = fFP = fileopen(filename, "rb"); if (!fp) { staterr("SIFLoader::LoadHeader: failed to open file '%s'", filename); return 1; } if ((magick = fgetl(fp)) != SIF_MAGICK) { staterr("SIFLoader::LoadHeader: magick check failed--this isn't a SIF file or is wrong version?"); staterr(" (expected %08x, got %08x)", SIF_MAGICK, magick); return 1; } int nsections = fgetc(fp); stat("SIFLoader::LoadHeader: read index of %d sections", nsections); for(int i=0;itype = fgetc(fp); // section type entry->foffset = fgetl(fp); // absolute offset in file entry->length = fgetl(fp); // length of section data entry->data = NULL; // we won't load it until asked fIndex.AddItem(entry); //stat(" - Sect%02d @ %04x", entry->type, entry->foffset); } // ..leave file handle open, its ok return 0; } // load into memory and return a pointer to the section of type 'type', // or NULL if the file doesn't have a section of that type. uint8_t *SIFLoader::FindSection(int type, int *length_out) { // try and find the section in the index for(int i=0;;i++) { SIFIndexEntry *entry = (SIFIndexEntry *)fIndex.ItemAt(i); if (!entry) break; if (entry->type == type) { // got it! // haven't loaded it yet? need to fetch it from file? if (!entry->data) { if (!fFP) { staterr("SIFLoader::FindSection: entry found and need to load it, but file handle closed"); if (length_out) *length_out = 0; return NULL; } stat("Loading SIF section %d from address %04x", type, entry->foffset); entry->data = (uint8_t *)malloc(entry->length); fseek(fFP, entry->foffset, SEEK_SET); fread(entry->data, entry->length, 1, fFP); } if (length_out) *length_out = entry->length; return entry->data; } } if (length_out) *length_out = 0; return NULL; } /* void c------------------------------() {} */ bool SIFLoader::BeginSave() { fTotalDataAdded = 0; if (fFP) { fclose(fFP); fFP = NULL; } ClearIndex(); return 0; } bool SIFLoader::AddSection(int type, uint8_t *data, int datalen) { SIFIndexEntry *entry = new SIFIndexEntry; entry->type = type; entry->foffset = fTotalDataAdded; // not including index tables or header, yet entry->length = datalen; entry->data = data; fTotalDataAdded += datalen; fIndex.AddItem(entry); return 0; } bool SIFLoader::EndSave(const char *filename) { FILE *fp; fp = fileopen(filename, "wb"); if (!fp) { stat("SIFLoader::EndSave: failed to open '%s' for writing", filename); return 1; } // write header-header fputl(SIF_MAGICK, fp); fputc(fIndex.CountItems(), fp); // compute fianl length of index table so we can write the correct foffsets int indexlen = 5 + (fIndex.CountItems() * 9); // write index table for(int i=0;;i++) { SIFIndexEntry *entry = (SIFIndexEntry *)fIndex.ItemAt(i); if (!entry) break; fputc(entry->type, fp); fputl(entry->foffset + indexlen, fp); fputl(entry->length, fp); } // save actual section data for(int i=0;;i++) { SIFIndexEntry *entry = (SIFIndexEntry *)fIndex.ItemAt(i); if (!entry) break; fwrite(entry->data, entry->length, 1, fp); } fclose(fp); return 0; } ================================================ FILE: siflib/sifloader.fdh ================================================ //hash:fa413049 //automatically generated by Makegen /* located in platform.cpp */ //---------------[referenced from siflib/sifloader.cpp]--------------// FILE *fileopen(const char *fname, const char *mode); /* located in common/stat.cpp */ //---------------[referenced from siflib/sifloader.cpp]--------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); /* located in common/misc.cpp */ //---------------[referenced from siflib/sifloader.cpp]--------------// uint32_t fgetl(FILE *fp); void fputl(uint32_t word, FILE *fp); ================================================ FILE: siflib/sifloader.h ================================================ #ifndef _SIFLOADER_H #define _SIFLOADER_H //#include "sif2.h" #include "../common/BList.h" #define SIF_MAX_GROUPS 255 // limitation of SECTION_GROUPS format /* the .sif file format is designed to hold a number of different sprite-related data and to be extensible while still being able to read older versions of the files. the .sif file is essentially a container format, with individual subclasses to decode each specific section type. sections can then contain additional subsections. the main section, SIF_SECTION_SPRITES, is an array of sprites. For each sprite entry, data typecodes denote a variable in the SIFSprite structure and it's value. Any values not mentioned are set to default values when loaded. Values set to defaults are not saved. */ enum { SIF_SECTION_SESSION, // holds SIFEdit session info such as last sprite edited SIF_SECTION_SHEETS, // filenames of spritesheets used by sprites SIF_SECTION_SPRITES, // main sprite array SIF_SECTION_NAMES, // names of sprites in array, minus the SPR_... prefix SIF_SECTION_GROUPS, // names of SIFEdit directories for grouping sprites SIF_SECTION_COMMENTS, // SIFEdit comments about sprites SIF_SECTION_PATHS, // things like base directory of sheets, for SIFEdit SIF_SECTION_DIRNAMES, // names/order of the SIFDir directions SIF_SECTION_COUNT }; // section entries in the header index table struct SIFIndexEntry { uint8_t type; // section typecode (SIF_SECTION_...) uint32_t foffset; // offset within file uint32_t length; // length of section data uint8_t *data; // the actual data, if it has already been loaded, else NULL }; class SIFLoader { public: SIFLoader(); ~SIFLoader(); // open a file handle to the given .sif and load the header and // section index into memory. bool LoadHeader(const char *filename); // return a pointer to the section data of type 'type', // or NULL if the file doesn't have a section of that type. uint8_t *FindSection(int type, int *length_out); // --------------------------------------- // SIF-saving functions. You shouldn't use the same object for saving // as currently has a file loaded, just construct a new one. // But it is safe to save over the same file you are referencing data // from using the "Load" object; because the changes are finalized to disk // until you call EndSave(). // allocate memory etc to save a new file from provided data. bool BeginSave(); // add a section to the SIF of the given type, containing the given data. bool AddSection(int type, uint8_t *data, int datalen); // finalize the changes and write them to disk in the given file. bool EndSave(const char *filename); // --------------------------------------- // free any temporary memory and close the file handle. void CloseFile(); private: void ClearIndex(); BList fIndex; // index table from header (list of SIFIndexEntry) FILE *fFP; // open file handle uint32_t fTotalDataAdded; // for saving }; #endif ================================================ FILE: slope.cpp ================================================ #include "nx.h" #include "slope.fdh" //#define DEBUG_SLOPE static SlopeTable slopetable[SLOPE_LAST+1]; // creates the slope tables bool initslopetable(void) { int x, y, ya, mx; int curtable, opposing_table; int inverttable, invertfliptable; int flipmx, flipy; stat("initslopetable: generating slopetables."); memset(slopetable, 0, sizeof(slopetable)); ya = TILE_H-1; for(x=0;x= map.xsize || my >= map.ysize) return 0; t = map.tiles[mx][my]; if (tileattr[t] & TA_SLOPE) { slopetype = (tilecode[t] & 0x07) + 1; // extract slope type from tile code // get offset from the tile x %= TILE_W; y %= TILE_H; if (slopetable[slopetype].table[x][y]) return slopetype; } return 0; } // returns true if any of the points in the given point list // are on the solid portion of a slope tile. bool IsSlopeAtPointList(Object *o, SIFPointList *points) { int x, y, i; for(i=0;icount;i++) { x = (o->x >> CSF) + points->point[i].x; y = (o->y >> CSF) + points->point[i].y; if (ReadSlopeTable(x, y)) return 1; } return 0; } /* void c------------------------------() {} */ // returns nonzero (the slope type) if the object is standing on a slope. int CheckStandOnSlope(Object *o) { int x, y, st; y = (o->y >> CSF) + sprites[o->sprite].slopebox.y2 + 1; x = (o->x >> CSF); if ((st = ReadSlopeTable(x + sprites[o->sprite].slopebox.x1, y))) return st; if ((st = ReadSlopeTable(x + sprites[o->sprite].slopebox.x2, y))) return st; return 0; } // returns nonzero (the slope type) if the objects blocku should be set // because of a ceiling slope. int CheckBoppedHeadOnSlope(Object *o) { int x, y, st; y = (o->y >> CSF) + sprites[o->sprite].slopebox.y1 - 1; x = (o->x >> CSF); // without this, you get stuck in the save area below Gum Door in Grasstown //if (o == player) y += 4; if ((st = ReadSlopeTable(x + sprites[o->sprite].slopebox.x1, y))) return st; if ((st = ReadSlopeTable(x + sprites[o->sprite].slopebox.x2, y))) return st; return 0; } // move an object laterally, and have it climb slopes as it approaches them. // We also have to move the object down as it goes down the slope. // Otherwise, it would "skip" down the slope ungracefully. // returns 1 if the object was blocked by a wall. bool movehandleslope(Object *o, int xinertia) { int xoff, opposing_x; int newx, newy, oldy; char blocked_wall; if (!xinertia) return 0; // for objects which don't follow slope, just treat the slope as a blockl/r if (!(o->nxflags & NXFLAG_FOLLOW_SLOPE)) { if (xinertia > 0) { if (o->blockr) return 1; } else { if (o->blockl) return 1; } o->x += xinertia; return 0; } newx = o->x; newy = o->y; // determine which side of the bounding box to use based on which way // we're traveling if (xinertia > 0) { // moving right (right side of slopebox hits slopes first) opposing_x = sprites[o->sprite].slopebox.x1; xoff = sprites[o->sprite].slopebox.x2; } else { // move left (left side of slopebox hits slopes first) opposing_x = sprites[o->sprite].slopebox.x2; xoff = sprites[o->sprite].slopebox.x1; } // check the opposing side at y+1 to see if we were standing on a slope before the move. uint8_t old_floor_slope, old_ceil_slope; old_floor_slope = ReadSlopeTable((newx>>CSF) + opposing_x, \ (newy>>CSF) + sprites[o->sprite].slopebox.y2 + 1); old_ceil_slope = ReadSlopeTable((newx>>CSF) + opposing_x, \ (newy>>CSF) + sprites[o->sprite].slopebox.y1 - 1); // move the object newx += xinertia; // check the opposing side again and if now we're not standing any more, // we moved down the slope, so add +1 to the object's Y coordinate. if (old_floor_slope && !ReadSlopeTable((newx>>CSF) + opposing_x, \ (newy>>CSF) + sprites[o->sprite].slopebox.y2 + 1)) { bool walking_down = false; // only trigger if it's the correct slope type so that we would be walking down it if // we were going in the direction we're going. prevents being shoved down 1px when // exiting the top of a slope. if (xinertia < 0) { if (old_floor_slope == SLOPE_FWD1 || \ old_floor_slope == SLOPE_FWD2) { walking_down = true; } } else if (xinertia > 0) { if (old_floor_slope == SLOPE_BACK1 || \ old_floor_slope == SLOPE_BACK2) { walking_down = true; } } if (walking_down) { newy += (1<>CSF) + opposing_x, \ (newy>>CSF) + sprites[o->sprite].slopebox.y1 - 1)) { bool moveme = false; if (xinertia < 0) { if (old_ceil_slope == SLOPE_CEIL_BACK1 || \ old_ceil_slope == SLOPE_CEIL_BACK2) { moveme = true; } } else if (xinertia > 0) { if (old_ceil_slope == SLOPE_CEIL_FWD1 || \ old_ceil_slope == SLOPE_CEIL_FWD2) { moveme = true; } } if (moveme) { // moving down (actually up) the "descending" (closer to real ceil) portion // of a ceiling slope tile. Reverse of floor slope thingy above. newy -= (1<>CSF) + xoff, \ (newy>>CSF) + sprites[o->sprite].slopebox.y1); if (moved_into_ceil_slope) { newy += (1<>CSF) + xoff, \ (newy>>CSF) + sprites[o->sprite].slopebox.y2); if (moved_into_floor_slope) { newy -= (1<y; o->y = newy; if (xinertia > 0) { if (oldy != newy) o->UpdateBlockStates(RIGHTMASK); blocked_wall = o->blockr; } else { if (oldy != newy) o->UpdateBlockStates(LEFTMASK); blocked_wall = o->blockl; } if (blocked_wall) { // we can't actually move...so reset Y position o->y = oldy; } else { // can move...complete the move by setting the X position too o->x = newx; } return blocked_wall; } /* void c------------------------------() {} */ #ifdef DEBUG_SLOPE // debug crap void DrawSlopeTablesOnTiles() { static int lastmap = -1; if (game.curmap != lastmap) { lastmap = game.curmap; for(int i=0;i<256;i++) { if (tileattr[i] & TA_SLOPE) { DrawSlopeTableOnTile((tilecode[i]&7)+1, i); } } } } void DrawSlopeTableOnTile(int table, int tile) { SDL_Rect dstrect; int x, y; extern SDL_Surface *tileset; for(y=0;y> 4) << 5; dstrect.w = 2; dstrect.h = 2; dstrect.x += x*2; dstrect.y += y*2; if (slopetable[table].table[x][y]) { if (table > 4) // floor slopes SDL_FillRect(tileset, &dstrect, SDL_MapRGB(tileset->format, 0, 255, 0)); else SDL_FillRect(tileset, &dstrect, SDL_MapRGB(tileset->format, 255, 0, 0)); } } } } void dumpslopetable(int t) { int x, y; char buffer[80]; stat("\nDumping slope table %d:", t); for(y=0;y #ifdef _SDL_MIXER #include #endif #include #include #include #include #if defined(__MINGW32__) || defined(_DINGUX) || defined (_MOTOMAGX) || defined (_MOTOEZX) || defined(__GNUC_RH_RELEASE__) #define htole16(x) (x) #else #include #endif #include "../common/basics.h" #include "org.h" #include "pxt.h" // for loading drums #include "sslib.h" // SAMPLE_RATE #include "org.fdh" //#define QUIET #define DRUM_PXT #ifdef DRUM_PXT #define drumK 22050 #else #define drumK 30050 #endif static bool org_inited = false; static stNoteChannel note_channel[16]; static stSong song; static int cache_ahead_time = 2000; // approximate number of ms to cache ahead (is rounded to a # of beats) static int buffer_beats; // # of beats to cache ahead in each buffer static int buffer_samples; // how many samples are in each outbuffer static int outbuffer_size_bytes; // length of each outbuffer, and of final_buffer, in bytes static struct { signed short *samples; // pointer to the raw PCM sound data int firstbeat; // beat # of the first beat contained in this chunk } final_buffer[2]; static uint8_t current_buffer; static bool buffers_full; static int OrgVolume; static struct { signed short samples[256]; } wavetable[100]; #ifdef DRUM_PXT // sound effect numbers which correspond to the drums static const unsigned char drum_pxt[] = { 0x96, 0, 0x97, 0, 0x9a, 0x98, 0x99, 0, 0x9b, 0, 0, 0 }; #else // names of the WAV files to load for each drum slot static const char *drum_names[] = { "Bass01", "Bass02", "Snare01", "Snare02", "Tom01", "HiClose", "HiOpen", "Crash", "Per01", "Per02", "Bass03", "Tom02" }; #endif static struct { signed short *samples; int nsamples; } drumtable[NUM_DRUMS]; static int pitch[NUM_NOTES]; static void init_pitch(void) { stat("Calculating pitch scale..."); for(int i=0;ialen); drumtable[d].nsamples = chunk->alen / 2 / 2; // 16-bit stereo sound drumtable[d].samples = malloc(drumtable[d].nsamples * 2); #ifndef QUIET stat("drum0%X [%s]: %d samples", d, fname, drumtable[d].nsamples); #endif read_pt = 0; abuf = (signed short *)chunk->abuf; for(i=0;i= MAX_SONG_LENGTH) { visible_warning(" * org_load: instrument %d has too many notes! (has %d, max %d)", i, song.instrument[i].nnotes, MAX_SONG_LENGTH); fclose(fp); return 1; } /*if (song.instrument[i].nnotes) { lprintf("Instrument %d: ", i); lprintf(" Pitch: %d, ", song.instrument[i].pitch); lprintf(" Wave: %d, ", song.instrument[i].wave); lprintf(" Pi: %d, ", song.instrument[i].pi); lprintf(" Nnotes: %d\n", song.instrument[i].nnotes); }*/ // substitute unavailable drums // credits track for one, has Per02 set which CS didn't actually have, I don't think if (i >= 8) { switch(song.instrument[i].wave) { case 9: song.instrument[i].wave = 8; break; } } } for(i=0;i<16;i++) { for(j=0;j= 25) { int newvol = (song.volume - 1); if (newvol <= 0) { song.fading = false; #ifndef _SDL_MIXER org_stop(); #endif } else { org_set_volume(newvol); } song.last_fade_time = curtime; } } /* void c------------------------------() {} */ // combines all of the individual channel output buffers into a single, final, buffer. static void mix_buffers(void) { int i, cursample, len; int mixed_sample; signed short *final; // lprintf("mix_buffers: mixing channels into final_buffer[%d]\n", current_buffer); // go up to samples*2 because we're mixing the stereo audio output from calls to WAV_Synth len = buffer_samples * 2; final = final_buffer[current_buffer].samples; //stat("mixing %d samples", len); for(cursample=0;cursample 32767) mixed_sample = 32767; else if (mixed_sample < -32768) mixed_sample = -32768; final[cursample] = htole16(mixed_sample); } } // start whichever buffer is queued to play next, and flag the other one as needing // to be filled static void queue_final_buffer(void) { SSEnqueueChunk(ORG_CHANNEL, final_buffer[current_buffer].samples, buffer_samples, current_buffer, OrgBufferFinished); current_buffer ^= 1; } // callback from sslib when a buffer is finished playing. static void OrgBufferFinished(int channel, int buffer_no) { buffers_full = false; } /* void c------------------------------() {} */ // given a volume and a panning value, it returns three values // between 0 and 1.00 which are how much to scale: // the whole sound (volume_ratio) // just the left channel (volume_left_ratio) // just the right channel (volume_right_ratio) static void ComputeVolumeRatios(int volume, int panning, double *volume_ratio, \ double *volume_left_ratio, double *volume_right_ratio) { *volume_ratio = ((double)volume / ORG_MAX_VOLUME); // get volume ratios for left and right channels (panning) if (panning < ORG_PAN_CENTERED) { // panning left (make right channel quieter) *volume_right_ratio = ((double)panning / ORG_PAN_CENTERED); *volume_left_ratio = 1.00f; } else if (panning > ORG_PAN_CENTERED) { // panning right (make left channel quieter) *volume_left_ratio = ((double)(ORG_PAN_FULL_RIGHT - panning) / ORG_PAN_CENTERED); *volume_right_ratio = 1.00f; } else { // perfectly centered (both channels get the full volume) *volume_left_ratio = 1.00f; *volume_right_ratio = 1.00f; } } // Interpolates a new sample from two samples which will be "in-between" the two samples. // if ratio is 0.00, it will return exactly sample1. // if ratio is 1.00, it will return exactly sample2. // and if ratio is something like 0.5, it will mix the samples together. static double Interpolate(int sample1, int sample2, double ratio) { double s1, s2; s1 = ((double)sample1 * (1.00f - ratio)); s2 = ((double)sample2 * ratio); return (s1 + s2); } // ensures that there are exactly desired_samples contained in the output buffer of instrument m. // if there are fewer samples than desired, the gap is filled with silence. // if there are more, the extra audio is truncated. static void ForceSamplePos(int m, int desired_samples) { if (note_channel[m].samples_so_far != desired_samples) { if (desired_samples > note_channel[m].samples_so_far) { silence_gen(¬e_channel[m], (desired_samples - note_channel[m].samples_so_far)); } else { // this should NEVER actually happen!! stat("ForceSamplePos: WARNING: !!! truncated channel %d from %d to %d samples !!!", m, note_channel[m].samples_so_far, desired_samples); note_channel[m].samples_so_far = desired_samples; note_channel[m].outpos = desired_samples * 2; } } } // adds num_samples samples of silence to the output buffer of channel "m". static void silence_gen(stNoteChannel *chan, int num_samples) { int clear_bytes; //stat("silence_gen: making %d samples of silence", num_samples); clear_bytes = (num_samples * 2 * 2); // clear twice as many shorts as = num_samples memset(&chan->outbuffer[chan->outpos], 0, clear_bytes); chan->samples_so_far += num_samples; chan->outpos += (num_samples * 2); } // ------------------- // note_open // ------------------- // initializes the synthesis of a new note. // chan: the instrument channel the note will play on // wave: the instrument no to play the note with // pitch: the pitch variation of the instrument as set in the org // note: the note # we'll be playing // total_ms: the maximum length the note will play for (controls buffer allocation length) static void note_open(stNoteChannel *chan, int wave, int pitch, int note) { double new_sample_rate; #define samplK 11025 // constant is original sampling rate of the samples in the wavetable // compute how quickly, or slowly, to play back the wavetable sample new_sample_rate = GetNoteSampleRate(note, pitch); chan->sample_inc = (new_sample_rate / (double)samplK); chan->wave = wave; chan->phaseacc = 0; //lprintf("note_open: new note opened for channel %08x at sample_inc %.2f, using wave %d\n", chan, chan->sample_inc, chan->wave); } // ------------------- // note_gen // ------------------- // Adds num_samples worth of audio data to the channel at the current frequency, volume, // panning, and pitch settings, and at the note & wave spec'd in note_open. static void note_gen(stNoteChannel *chan, int num_samples) { int i; double audioval; double master_volume_ratio, volume_left_ratio, volume_right_ratio; int wave; unsigned char pos1, pos2; double iratio; wave = chan->wave; // compute volume ratios; unlike drums we have to do this every time // since they can change in the middle of the note. ComputeVolumeRatios(chan->volume, chan->panning, &master_volume_ratio, &volume_left_ratio, &volume_right_ratio); //statbuild("Entering note_gen with phaseacc=%.2f and sample_inc=%.2f", chan->phaseacc, chan->sample_inc); //statbuild(", using buffer %08x\n", chan->outbuffer); //stat("note_gen(%d, %d)", chan->number, num_samples); // generate however many output samples we were asked for for(i=0;iphaseacc; pos2 = pos1 + 1; // since pos1&2 are chars, this wraps at 255 iratio = chan->phaseacc - (int)chan->phaseacc; audioval = Interpolate(wavetable[wave].samples[pos1], wavetable[wave].samples[pos2], iratio); audioval *= master_volume_ratio; chan->outbuffer[chan->outpos++] = (int)(audioval * volume_left_ratio); chan->outbuffer[chan->outpos++] = (int)(audioval * volume_right_ratio); chan->samples_so_far++; chan->phaseacc += chan->sample_inc; if ((int)chan->phaseacc >= 256) chan->phaseacc -= 256; } } // ------------------- // note_close // ------------------- // ends a note smoothly by ensuring that it's wave stops near the 0-crossing point. // this avoids a slight popping noise which can be caused by abruptly moving from // a high sample value to a close-to-zero sample value. // returns the # of extra samples generated. static int note_close(stNoteChannel *chan) { if (chan->outpos == 0) return 0; int samples_made = 0; while(chan->samples_so_far < buffer_samples) // avoid potential buffer overflow { // get the value of the last sample in the buffer and check // if it's close enough to silence yet. if not, let the note // run on a teeny bit longer than it's supposed to until it's wave // hits the zero-crossing point, to avoid a click. int last_sample = chan->outbuffer[chan->outpos - 1]; if (abs(last_sample) < 1000) break; note_gen(chan, 1); samples_made++; } return samples_made; } // set up to make a drum noise using drum "wave" at note "note" on channel "m_channel". // the total number of samples the drum will last is returned. static int drum_open(int m_channel, int wave, int note) { stNoteChannel *chan = ¬e_channel[m_channel]; double new_sample_rate; int gen_samples; //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); new_sample_rate = GetNoteSampleRate(note, song.instrument[m_channel].pitch); chan->sample_inc = (new_sample_rate / (double)drumK); // get the new number of samples for the sound gen_samples = (int)((double)drumtable[wave].nsamples / chan->sample_inc); // precompute volume and panning values since they're the same over the length of the drum ComputeVolumeRatios(chan->volume, chan->panning, &chan->master_volume_ratio, &chan->volume_left_ratio, &chan->volume_right_ratio); chan->wave = wave; chan->phaseacc = 0; return gen_samples; } // generates "num_samples" of a drum noise previously set up via drum_open into the output // buffer of the channel. static void drum_gen(int m_channel, int num_samples) { stNoteChannel *chan = ¬e_channel[m_channel]; double volume_ratio, volume_left_ratio, volume_right_ratio; int wave; int pos1, pos2; double iratio; double audioval; int i; volume_ratio = chan->master_volume_ratio; volume_left_ratio = chan->volume_left_ratio; volume_right_ratio = chan->volume_right_ratio; wave = chan->wave; //stat("drum_gen(%d, %d)", m_channel, num_samples); // generate the drum sound for(i=0;iphaseacc; pos2 = pos1 + 1; if (pos2 >= drumtable[wave].nsamples) pos2 = pos1; iratio = chan->phaseacc - (int)chan->phaseacc; audioval = Interpolate(drumtable[wave].samples[pos1], drumtable[wave].samples[pos2], iratio); audioval *= volume_ratio; chan->outbuffer[chan->outpos++] = (signed short)(audioval * volume_left_ratio); chan->outbuffer[chan->outpos++] = (signed short)(audioval * volume_right_ratio); chan->samples_so_far++; chan->phaseacc += chan->sample_inc; if ((int)chan->phaseacc > drumtable[wave].nsamples) { staterr(" **ERROR-phaseacc ran over end of drumsample %.2f %d", chan->phaseacc, drumtable[wave].nsamples); break; } } } void org_run(void) { if (!song.playing) return; // keep both buffers queued. if one of them isn't queued, then it's time to // generate more music for it and queue it back on. if (!buffers_full) { generate_music(); // generate more music into current_buffer queue_final_buffer(); // enqueue current_buffer and switch buffers buffers_full = true; // both buffers full again until OrgBufferFinished called } if (song.fading) runfade(); } // generate a buffer's worth of music and place it in the current final buffer. static void generate_music(void) { int m; int beats_left; int out_position; //stat("generate_music: cb=%d buffer_beats=%d", current_buffer, buffer_beats); // save beat # of the first beat in buffer for calculating current beat for TrackFuncs final_buffer[current_buffer].firstbeat = song.beat; // clear all the channel buffers for(m=0;m<16;m++) { note_channel[m].samples_so_far = 0; note_channel[m].outpos = 0; } //stat("generate_music: generating %d beats of music\n", buffer_beats); beats_left = buffer_beats; out_position = 0; while(beats_left) { out_position += song.samples_per_beat; // for each channel... for(m=0;m<16;m++) { // generate any music that's supposed to go into the current beat NextBeat(m); // ensure that exactly one beat of samples was added to the channel by inserting silence // if needed. sometimes NextBeat may not actually generate a full beats worth, for // example if there was no note playing on the track, of if it was the last beat of a note. ForceSamplePos(m, out_position); } if (++song.beat >= song.loop_end) { song.beat = song.loop_start; song.haslooped = true; for(m=0;m<16;m++) { song.instrument[m].curnote = song.instrument[m].loop_note; note_channel[m].length = 0; } } beats_left--; } mix_buffers(); } // generate up to a 1 beat worth of music from channel "m" at the song.beat cursor point. // it may generate less. static void NextBeat(int m) { stNoteChannel *chan = ¬e_channel[m]; stInstrument *track = &song.instrument[m]; //int volume, panning; stNote *note; int len; // add notes as long as instrument has notes left to add if (track->curnote < track->nnotes) { for(;;) { // when we hit the loop start point, record the note we were on for later if (song.beat == song.loop_start) { track->loop_note = track->curnote; } // get a pointer to the note at current position in the song note = &track->note[track->curnote]; // skip ahead if the song got ahead of us somehow if (song.beat > note->beat) { if (++track->curnote >= track->nnotes) return; } else break; } // 1st- start notes as we arrive at their beat if (song.beat == note->beat) { //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); if (note->volume != 0xff) chan->volume = note->volume; if (note->panning != 0xff) chan->panning = note->panning; if (note->note != 0xff) { if (m < 8) { note_open(chan, track->wave, track->pitch, note->note); chan->length = note->length; } else { // on percussion tracks the length works differently---drum_open returns the // number of samples the drum will take to finish playing. chan->length = drum_open(m, track->wave, note->note); } } track->curnote++; } } // 2nd- generate any notes which are running if (chan->length) { if (m < 8) { // melody tracks if (track->pi) { // pi tracks always generate only 1024 samples for ANY note note_gen(chan, 1024); chan->length = 0; } else { if (chan->length > 1) { // generate a full beat of music note_gen(chan, song.samples_per_beat); } else // generate only most of the beat--if there's a note immediately after { // this one they should not run together note_gen(chan, song.note_closing_samples); } if (!--chan->length) { note_close(chan); } } } else { // percussion tracks // if less than a whole beats worth of samples is left to play on the drum, finish // whatever's left. Else generate only one beats worth right now. if (chan->length > song.samples_per_beat) len = song.samples_per_beat; else len = chan->length; drum_gen(m, len); chan->length -= len; } } } /* void c------------------------------() {} */ int org_GetCurrentBeat(void) { if (SSChannelPlaying(ORG_CHANNEL)) { int curbuffer; int elapsed; int sample_pos; int beat; // if we don't lockout the audio over both these calls, it's possible // for the first variable to be from one buffer and the second from another. SSLockAudio(); { curbuffer = SSGetCurUserData(ORG_CHANNEL); sample_pos = SSGetSamplePos(ORG_CHANNEL); } SSUnlockAudio(); elapsed = SamplesToMS(sample_pos); beat = elapsed / song.ms_per_beat; beat += final_buffer[curbuffer].firstbeat; // wrap at end of song while(beat >= song.loop_end) beat -= (song.loop_end - song.loop_start); return beat; } return -1; } // returns which org buffer is currently playing. int org_GetCurrentBuffer(void) { if (!SSChannelPlaying(ORG_CHANNEL)) return -1; return SSGetCurUserData(ORG_CHANNEL); } // returns the musical name of an org note number /*char *org_GetNoteName(int note) { static char static_buffer[16]; static const char *note_names[] = { "C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B" }; sprintf(static_buffer, "%s%d", \ note_names[note % KEYS_OCTAVE], \ note / KEYS_OCTAVE); return static_buffer; } */ // returns true if a note is a sharp note /*bool org_IsSharp(int note) { static const bool sharps[] = { 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0 }; return (sharps[note % KEYS_OCTAVE]); } */ ================================================ FILE: sound/org.fdh ================================================ //hash:86bec1cb //automatically generated by Makegen /* located in main.cpp */ //-------------------[referenced from sound/org.cpp]-----------------// void visible_warning(const char *fmt, ...); /* located in platform.cpp */ //-------------------[referenced from sound/org.cpp]-----------------// FILE *fileopen(const char *fname, const char *mode); /* located in sound/sslib.cpp */ //-------------------[referenced from sound/org.cpp]-----------------// void SSReserveChannel(int c); void SSSetVolume(int c, int newvol); void SSAbortChannel(int c); int SSEnqueueChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int)); char SSChannelPlaying(int c); void SSLockAudio(void); int SSGetCurUserData(int c); int SSGetSamplePos(int c); void SSUnlockAudio(void); /* located in sound/org.cpp */ //-------------------[referenced from sound/org.cpp]-----------------// static void init_pitch(void); static double GetNoteSampleRate(int note, int instrument_pitch); static int MSToSamples(int ms); static int SamplesToMS(int samples); static bool load_drumtable(const char *pxt_path); static bool load_drum(char *fname, int d); static bool load_drum_pxt(char *fname, int d); static bool load_wavetable(const char *fname); int org_init(const char *wavetable_fname, const char *drum_pxt_dir, int org_volume); void org_close(void); char org_load(char *fname); static bool init_buffers(void); static void free_buffers(void); bool org_start(int startbeat); void org_stop(void); bool org_is_playing(void); void org_fade(void); void org_set_volume(int newvolume); static void runfade(); static void mix_buffers(void); static void queue_final_buffer(void); static void OrgBufferFinished(int channel, int buffer_no); static void ComputeVolumeRatios(int volume, int panning, double *volume_ratio, double *volume_left_ratio, double *volume_right_ratio); static double Interpolate(int sample1, int sample2, double ratio); static void ForceSamplePos(int m, int desired_samples); static void silence_gen(stNoteChannel *chan, int num_samples); static void note_open(stNoteChannel *chan, int wave, int pitch, int note); static void note_gen(stNoteChannel *chan, int num_samples); static int note_close(stNoteChannel *chan); static int drum_open(int m_channel, int wave, int note); static void drum_gen(int m_channel, int num_samples); void org_run(void); static void generate_music(void); static void NextBeat(int m); int org_GetCurrentBeat(void); int org_GetCurrentBuffer(void); /* located in sound/pxt.cpp */ //-------------------[referenced from sound/org.cpp]-----------------// char pxt_initsynth(void); char pxt_load(const char *fname, stPXSound *snd); char pxt_Render(stPXSound *snd); void FreePXTBuf(stPXSound *snd); /* located in common/stat.cpp */ //-------------------[referenced from sound/org.cpp]-----------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); /* located in common/misc.cpp */ //-------------------[referenced from sound/org.cpp]-----------------// uint32_t fgetl(FILE *fp); void fputl(uint32_t word, FILE *fp); uint16_t fgeti(FILE *fp); ================================================ FILE: sound/org.h ================================================ #ifndef _ORG_H #define _ORG_H // SSChannel # to play the music on #define ORG_CHANNEL 15 // maximum possible volume of an org instrument (in the file) // i hear according to orgmaker you can't go higher than F8 but a few // songs actually do go all the way to FF. #define ORG_MAX_VOLUME 255 // which panning value is perfectly centered #define ORG_PAN_CENTERED 6 #define ORG_PAN_FULL_RIGHT (ORG_PAN_CENTERED + ORG_PAN_CENTERED) #define KEYS_OCTAVE 12 #define NUM_NOTES (8 * KEYS_OCTAVE) // range of note values: 00-this. #define NUM_DRUMS 12 // max # of drum instruments to load // if you care to know which music note an org note is, modulus it by // KEYS_OCTAVE and compare to the following constants. #define NOTE_C 0 #define NOTE_CS 1 #define NOTE_D 2 #define NOTE_DS 3 #define NOTE_E 4 #define NOTE_F 5 #define NOTE_FS 6 #define NOTE_G 7 #define NOTE_GS 8 #define NOTE_A 9 #define NOTE_AS 10 #define NOTE_B 11 #define MAX_SONG_LENGTH 5000 // max song length to allocate for, in notes // this handles the actual synthesis struct stNoteChannel { signed short *outbuffer; // position inside outbuffer (not the same as samples_so_far because org module outputs stereo. // outpos counts data, samples_so_far counts samples. samples_so_far=outpos*2) int outpos; // incs by 2 for each samples_so_far, one for left ch one for right ch int samples_so_far; // number of samples generated so far into outbuffer double phaseacc; // current read position inside wavetable sample double sample_inc; // speed at which to iterate over the wavetable waveform // for drums double master_volume_ratio, volume_left_ratio, volume_right_ratio; int wave; // index into wavetable (which instrument we're using) int volume; // last volume value sent to note_gen int panning; // last panning value sent to note_gen int length; // # of beats of the current note left to generate int number; // the chanel number of this channel }; struct stNote { int beat; // beat no. that note starts on uchar note; // 00 - 5F, starts on a C uchar length; // in beats uchar volume; // 00 - F8 uchar panning; // 00 - 0C }; // keeps track of instrument settings for a track struct stInstrument { int pitch; int wave; // which wave (00-99) to use // if pi is set all notes on the channel play for 1024 samples regardless // of length or tempo settings. pi only has meaning on the instrument tracks. bool pi; int curnote; // current note (during playback) int loop_note; // used when looping back to the beginning of a song at beat loop_end int nnotes; stNote note[MAX_SONG_LENGTH]; }; struct stSong { bool playing; int volume; int ms_per_beat, ms_of_last_beat_of_note; int beats_per_step; int steps_per_bar; int beats_per_bar; // == (beats_per_step * steps_per_bar) int samples_per_beat; // # of samples in each beat int note_closing_samples; // # of samples of note to generate at the last beat of a note int loop_start, loop_end; stInstrument instrument[16]; int beat; char haslooped; bool fading; uint32_t last_fade_time; }; #endif ================================================ FILE: sound/pxt.cpp ================================================ // PXT sound file player // see bottom of file for info on how to use this module #ifdef _SDL_MIXER #include Mix_Chunk *mixChunk; #endif #include #include // for sin() #include #include #include "pxt.h" #include "sslib.h" #include "pxt.fdh" #define MODEL_SIZE 256 // gets the next byte from wave "wave", scales it by the waves volume, and places result in "out". // x * (y / z) = (x * y) / z #define GETWAVEBYTE(wave, out) \ { \ if (wave->model_no != MOD_WHITE) \ { \ out = wave->model[(unsigned char)wave->phaseacc]; \ } \ else \ { \ out = white[wave->white_ptr]; \ if (++wave->white_ptr >= WHITE_LEN) wave->white_ptr = 0; \ } \ out *= wave->volume; \ out /= 64; \ } #define WHITE_LEN 22050 signed char white[WHITE_LEN]; // the final sounds ready to play (after pxt_PrepareToPlay) static struct { signed short *buffer; int len; int loops_left; void (*DoneCallback)(int, int); int channel; } sound_fx[256]; int load_top; static struct { unsigned char table[256]; } wave[PXT_NO_MODELS]; static unsigned int rng_seed = 0; static unsigned short rand_next(void) { rng_seed *= 0x343fd; rng_seed += 0x269ec3; return (rng_seed >> 16) & 0x7fff; } static void GenerateSineModel(unsigned char *table) { double tpi = 6.283184000f; double ratio = 256.00f; double rat64 = 64.00f; double reg; int i; for(i=0;i<256;i++) { reg = (double)i; reg *= tpi; reg /= ratio; reg = sin(reg); reg *= rat64; table[i] = (unsigned char)reg; } } static void GenerateTriangleModel(unsigned char *table) { int i, f; for(i=0;i<64;i++) table[i] = i; f = 0; for(;i<192;i++) { table[i] = 0x40 - f; f++; } f = 0; for(;i<256;i++) { table[i] = f - 0x40; f++; } } static void GenerateSawUpModel(unsigned char *table) { int i; for(i=0;i<256;i++) table[i] = (i >> 1) - 0x40; } static void GenerateSawDownModel(unsigned char *table) { int i; for(i=0;i<256;i++) table[i] = 0x40 - (i >> 1); } static void GenerateSquareModel(unsigned char *table) { int i; for(i=0;i<128;i++) table[i] = 0x40; for(;i<256;i++) table[i] = -0x40; } static void GenerateRandModel(unsigned char *table) { int i; signed char k; rng_seed = 0; for(i=0;i<256;i++) { k = (signed char)rand_next(); if (k < 0) k++; table[i] = k >> 1; } } void GenerateWhiteModel(void) { int i; seedrand(0xa42c1911); for(i=0;i= 0 && m < PXT_NO_MODELS) { pxwave->model = (signed char *)wave[m].table; pxwave->model_no = m; return 0; } else { staterr("pxt_SetModel: invalid sound model '%d'", m); return 1; } } /*void cout(int val) { static int c = 0; char buf[8]; int i; sprintf(buf, "%d", val); for(i=0;i<4-strlen(buf);i++) lprintf(" "); lprintf("%s ", buf); if (++c > 16) {c=0; lprintf("\n");} } void couthx(int val) { static int c = 0; char buf[80]; int i; sprintf(buf, "%02x", val); i = strlen(buf) - 2; lprintf("%s ", &buf[i]); if (++c > 24) { c=0; lprintf("\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) { double ratio, yratio; double curpos; int x, y; int lastx, lasty; signed char value; int wd = 315; int xoff = 2; char buf[80]; #define scale_sample(value) (centerline + (int)((double)value * yratio)) //lprintf("display_audio: displaying buffer of len %d\n", size_blocks); ratio = (double)size_blocks / (double)wd; yratio = (double)ysize / (double)(127+127); //lprintf("ratio = %.2f yratio = %.2f\n", ratio, yratio); DrawSDLLine(SCREEN_WIDTH/2, 0, SCREEN_WIDTH/2, SCREEN_HEIGHT, 18,18,18); DrawSDLLine(xoff, centerline, xoff+wd, centerline, 255,0,0); y = scale_sample(TOPAMP); DrawSDLLine(xoff, y, xoff+wd, y, 68,68,68); y = scale_sample(BTMAMP); DrawSDLLine(xoff, y, xoff+wd, y, 68,68,68); curpos = 0; lastx = -1; for(x=xoff;x=0;c--) { if (snd->chan[c].enabled) { display_audio(snd->chan[c].buffer, snd->chan[c].size_blocks, 60, 80, capt1, 0, r[c], g[c], b[c]); display_audio(snd->chan[c].envbuffer, 256, 170, 80, capt2, 1, r[c], g[c], b[c]); } if (c==1) { capt1 = "Output"; capt2 = "Envelope"; } } flip(); } */ // sets the given envelope to default values void pxt_SetDefaultEnvelope(stPXEnvelope *env) { env->initial = 63; env->time[0] = 64; env->time[1] = 128; env->time[2] = 255; env->val[0] = 63; env->val[1] = 63; env->val[2] = 63; } // generate a 256-byte envelope "waveform" containing volume adjustment values from 00-3f // in short it renders the envelope for a sound. // the envelope must be ready before CreateAudio can be used. void GenerateEnvelope(stPXEnvelope *env, char *buffer) { double curenv, envinc; int i; curenv = env->initial; envinc = (double)(env->val[0] - env->initial) / env->time[0]; for(i=0;itime[0];i++) { buffer[i] = (int)curenv; curenv += envinc; } curenv = env->val[0]; envinc = (double)(env->val[1] - env->val[0]) / (env->time[1] - env->time[0]); for(;itime[1];i++) { buffer[i] = (int)curenv; curenv += envinc; } curenv = env->val[1]; envinc = (double)(env->val[2] - env->val[1]) / (env->time[2] - env->time[1]); for(;itime[2];i++) { buffer[i] = (int)curenv; curenv += envinc; } // fade to 0 volume if time_c is < end of sound, just like the pretty drawing in PixTone. envinc = (double)(-1 - env->val[2]) / (256 - env->time[2]); curenv = env->val[2]; for(;i<256;i++) { buffer[i] = (int)curenv; curenv += envinc; } } // added this for sound editing tools. it will render you a single PXWave, // that is a component of a PXSound, into a buffer you provide. // otherwise it's useless. void pxt_RenderPXWave(stPXWave *pxwave, signed char *buffer, int size_blocks) { int i, j, e; int output; // we generate twice the buf size and average it down afterwards for increased precision. // this is what pixtone does, and although I'm not sure if that's why; it really does // seem to make a slight quality increase size_blocks *= 2; char *tempbuffer = (char *)malloc(size_blocks); //lprintf("RenderPXWave: buffer len %d, repeat = %.2f\n", size_blocks, pxwave->repeat); pxwave->phaseinc = ((MODEL_SIZE * pxwave->repeat) / (double)size_blocks); pxwave->phaseacc = (double)pxwave->offset; pxwave->white_ptr = pxwave->offset; for(i=0;iphaseacc += pxwave->phaseinc; } // average our doublesampled audio down into the final buffer for(i=j=0;i>= 1; buffer[j++] = e; } } // renders a sound channel. // call GenerateEnvelope first. static void CreateAudio(stPXChannel *chan) { // store all the commonly-used pointers stPXWave *main = &chan->main; stPXWave *pitch = &chan->pitch; stPXWave *pitch2 = &chan->pitch2; stPXWave *volume = &chan->volume; unsigned char *envbuffer = chan->envbuffer; int size_blocks = chan->size_blocks; // var defs int i, j; int output, bm, bm2, volmod; double phaseval; int e; double env_acc, env_inc; // we generate twice the buf size and average it down afterwards for increased precision. // this is what pixtone does, and although I'm not sure if that's why; it really does // seem to make a slight quality increase size_blocks *= 2; signed char *buffer = (signed char *)malloc(size_blocks); //lprintf("CreateAudio: buffer len %d, repeat = %.2f / %.2f\n", size_blocks, main->repeat, pitch->repeat); // calculate all the phaseinc's main->phaseinc = ((MODEL_SIZE * main->repeat) / (double)size_blocks); pitch->phaseinc = ((MODEL_SIZE * pitch->repeat) / (double)size_blocks); pitch2->phaseinc = ((MODEL_SIZE * pitch2->repeat) / (double)size_blocks); volume->phaseinc = ((MODEL_SIZE * volume->repeat) / (double)size_blocks); env_inc = (MODEL_SIZE / (double)size_blocks); //lprintf("main phaseinc = %.6f\n", main->phaseinc); //lprintf("pitch phaseinc = %.6f\n", pitch->phaseinc); //lprintf("volume phaseinc = %.6f\n", volume->phaseinc); // set the starting positions main->phaseacc = (double)main->offset; pitch->phaseacc = (double)pitch->offset; pitch2->phaseacc = (double)pitch2->offset; volume->phaseacc = (double)volume->offset; main->white_ptr = main->offset; pitch->white_ptr = pitch->offset; pitch2->white_ptr = pitch2->offset; volume->white_ptr = volume->offset; env_acc = 0; for(i=0;imodel_no==MOD_PULSE) { if (volmod > 127 || volmod < -127) { if (volmod > 127) { volmod = 256 - volmod; } else { volmod = -(256 - -volmod); } volmod = -volmod; } } // offset volume modulator such that it completely silences the sound at <= -0x40 volmod += 64; if (volmod < 0) volmod = 0; // apply volume modulator to main output = (output * volmod) / 64; // apply the envelope e = envbuffer[(unsigned char)env_acc]; output = (output * e) / 64; // save sample to output buffer buffer[i] = output; // get next byte from the frequency modulator waveform GETWAVEBYTE(pitch, bm); GETWAVEBYTE(pitch2, bm2); // clip the values to a signed char if it's a pulse waveform...allows // switch it's signed from up/up/down to down/down/up just by taking // the top over 128. but for other waveforms we actually want the clipping // to not happen right in this case because A. it allows for making larger // range frequency sweeps than otherwise possible and B. pixtone has this // same "glitch" so it's a compatibility thing. if (pitch->model_no==MOD_PULSE) bm = (signed char)bm; if (pitch2->model_no==MOD_PULSE) bm2 = (signed char)bm2; bm += bm2; if (bm >= 0) { // when positive, every 32 clicks doubles the phaseinc. // this is actually "phaseval = (mod / 32) * main->phaseinc;" however // we lose precision by doing the division first, so this is equivalent: phaseval = ((double)bm * main->phaseinc) / 32; // phaseinc is sped up by phaseval main->phaseacc += (main->phaseinc + phaseval); } else { // when negative, every 64 clicks half's the phaseinc. // this can be thought of as "phaseval = (mod / 64) * (main->phaseinc * 0.5f);" however // that doesn't actually work because of precision loss, so this instead: phaseval = ((double)(-bm) * main->phaseinc) / 128; // phaseinc is slowed down by phaseval main->phaseacc += (main->phaseinc - phaseval); } pitch->phaseacc += pitch->phaseinc; pitch2->phaseacc += pitch2->phaseinc; volume->phaseacc += volume->phaseinc; env_acc += env_inc; // just to make certain the envelope never starts over from the beginning. // although it shouldn't; the precision on env_inc seems to be pretty good. if (env_acc > 255) env_acc = 255; // normally we would have to do this, but we don't as long as model_size is 256 // and we cast phaseacc to an unsigned char when we do the lookup; it'll wrap by itself. // neat huh. //while(main->phaseacc >= MODEL_SIZE) main->phaseacc -= MODEL_SIZE; //while(pitch->phaseacc >= MODEL_SIZE) pitch->phaseacc -= MODEL_SIZE; } // average our doublesampled audio down into the final buffer signed char *outbuffer = chan->buffer; for(i=j=0;i>= 1; outbuffer[j++] = e; } } // allocate all the buffers needed for the given sound static char AllocBuffers(stPXSound *snd) { int topbufsize = 64; int i; FreePXTBuf(snd); // allocate buffers for each enabled channel for(i=0;ichan[i].enabled) { snd->chan[i].buffer = (signed char *)malloc(snd->chan[i].size_blocks); if (!snd->chan[i].buffer) { staterr("AllocBuffers (pxt): out of memory (1)!"); return -1; } if (snd->chan[i].size_blocks > topbufsize) topbufsize = snd->chan[i].size_blocks; } } // allocate the final buffer snd->final_buffer = (signed char *)malloc(topbufsize); if (!snd->final_buffer) { staterr("AllocBuffers (pxt): out of memory (2)!"); return -1; } snd->final_size = topbufsize; return topbufsize; } // generate 8-bit signed PCM audio from a PXT sound, put it in it's final_buffer. char pxt_Render(stPXSound *snd) { int i, s; signed short mixed_sample; signed short *middle_buffer; int bufsize; bufsize = AllocBuffers(snd); if (bufsize==-1) return 1; // error // -------------------------------- // render all the channels // -------------------------------- for(i=0;ichan[i].enabled) { // memset(snd->chan[i].buffer, 0, sizeof(snd->chan[i].buffer)); GenerateEnvelope(&snd->chan[i].envelope, (char *)snd->chan[i].envbuffer); CreateAudio(&snd->chan[i]); } } // ---------------------------------------------- // mix the channels [generate final_buffer] // ---------------------------------------------- //lprintf("final_size = %d final_buffer = %08x\n", snd->final_size, snd->final_buffer); middle_buffer = (signed short *)malloc(snd->final_size * 2); memset(middle_buffer, 0, snd->final_size * 2); for(i=0;ichan[i].enabled) { for(s=0;schan[i].size_blocks;s++) { middle_buffer[s] += snd->chan[i].buffer[s]; } } } for(s=0;sfinal_size;s++) { mixed_sample = middle_buffer[s]; if (mixed_sample > 127) mixed_sample = 127; else if (mixed_sample < -127) mixed_sample = -127; snd->final_buffer[s] = (char)mixed_sample; } free(middle_buffer); return 0; } // get an already-rendered pxt 'snd' ready for sending to SDL_mixer. // converts the 8-bit signed audio to SDL_mixer's 16-bit stereo format and // sets up the Mix_Chunk. void pxt_PrepareToPlay(stPXSound *snd, int slot) { int value; int ap; int i; signed char *buffer = snd->final_buffer; signed short *outbuffer; int malc_size; // convert the buffer from 8-bit mono signed to 16-bit stereo signed malc_size = (snd->final_size * 2 * 2); outbuffer = (signed short *)malloc(malc_size); for(i=ap=0;ifinal_size;i++) { value = buffer[i]; value *= 200; outbuffer[ap++] = value; // left ch outbuffer[ap++] = value; // right ch } sound_fx[slot].buffer = outbuffer; sound_fx[slot].len = snd->final_size; //lprintf("pxt ready to play in slot %d\n", slot); } // quick-and-dirty function to raise or lower the pitch of a sound. // I say quick-and-dirty because it also changes the length. // We need this for the "SSS" (Stream Sound) which is supposed to have // adjustable pitch. void pxt_ChangePitch(stPXSound *snd, double factor) { signed char *inbuffer = snd->final_buffer; int insize = snd->final_size; int outsize = (int)((double)insize * factor); signed char *outbuffer = (signed char *)malloc(outsize); if (factor == 0) factor = 0.001; for(int i=0;ifinal_buffer); snd->final_buffer = outbuffer; snd->final_size = outsize; } // begins playing the pxt in the given slot. // the SSChannel is returned. // on error, returns -1. int pxt_Play(int chan, int slot, char loop) { #ifdef _SDL_MIXER if (mixChunk) { pxt_chunk_free(); } /* I don't know correct this way or no but it works! */ /* See https://github.com/EXL/NXEngine/blob/ddaf82dacc54aa7e45bf078c03ad19e6318e528e/sound/sslib.cpp#L157 for proper length in bytes. */ mixChunk = Mix_QuickLoad_RAW((Uint8 *)sound_fx[slot].buffer, sound_fx[slot].len * 2 * 2); if(Mix_PlayChannel(chan, mixChunk, loop)==-1) { stat("Mix_PlayChannel: %s\n",Mix_GetError()); } return chan; #else return pxt_PlayWithCallback(chan, slot, loop, NULL); #endif } int pxt_PlayWithCallback(int chan, int slot, char loop, void (*FinishedCB)(int, int)) { if (sound_fx[slot].buffer) { // locking the audio here ensures that sound won't finish before we get down // below and finish setting it's params. SSLockAudio(); if (loop) { chan = SSPlayChunk(chan, sound_fx[slot].buffer, sound_fx[slot].len, slot, pxtLooper); SSEnqueueChunk(chan, sound_fx[slot].buffer, sound_fx[slot].len, slot, pxtLooper); sound_fx[slot].loops_left = (loop==-1) ? -1 : (loop - 1); } else { chan = SSPlayChunk(chan, sound_fx[slot].buffer, sound_fx[slot].len, slot, pxtSoundDone); } sound_fx[slot].DoneCallback = FinishedCB; sound_fx[slot].channel = chan; SSUnlockAudio(); if (chan < 0) { staterr("pxt_Play: SSPlayChunk returned error"); } return chan; } else { staterr("pxt_Play: sound slot 0x%02x not rendered", slot); return -1; } } static void pxtSoundDone(int chan, int slot) { sound_fx[slot].channel = -1; if (sound_fx[slot].DoneCallback) { (*sound_fx[slot].DoneCallback)(chan, slot); } } static void pxtLooper(int chan, int slot) { if (sound_fx[slot].loops_left) { SSEnqueueChunk(chan, sound_fx[slot].buffer, sound_fx[slot].len, slot, pxtLooper); } else { pxtSoundDone(chan, slot); } if (sound_fx[slot].loops_left > 0) sound_fx[slot].loops_left--; } void pxt_Stop(int slot) { /// possible threading issues here? i'm not sure if it's important enough /// i don't want to lock the audio because i'm worried that when the sound is aborted /// it could end up being left locked during the user's sound done callback. if (sound_fx[slot].channel != -1) { #ifdef _SDL_MIXER Mix_HaltChannel(sound_fx[slot].channel); #ifdef DEBUG stat("Halt channel"); #endif #endif sound_fx[slot].loops_left = 0; SSAbortChannel(sound_fx[slot].channel); } } char pxt_IsPlaying(int slot) { return (sound_fx[slot].channel != -1); } // render all pxt files under "path" up to slot "top". // get them all ready to play in their sound slots. // if cache_name is specified the pcm audio data is cached under the given filename. char pxt_LoadSoundFX(const char *path, const char *cache_name, int top) { char fname[80]; int slot; stPXSound snd; FILE *fp = NULL; stat("Loading Sound FX..."); load_top = top; if (cache_name) { // try to load the cache if we can if (LoadFXCache(cache_name, top) == 0) { return 0; } fp = fopen(cache_name, "wb"); if (!fp) { staterr("LoadSoundFX: failed open: '%s'", cache_name); return 1; } fputl('PXC1', fp); fputi(top, fp); } // get ready to do synthesis pxt_initsynth(); for(slot=1;slot<=top;slot++) { sprintf(fname, "%sfx%02x.pxt", path, slot); if (pxt_load(fname, &snd)) continue; pxt_Render(&snd); // dirty hack; lower the pitch of the Stream Sounds // to match the way they actually sound in the game // with the SSS0400 command. if (slot == 40) pxt_ChangePitch(&snd, 5.0f); if (slot == 41) pxt_ChangePitch(&snd, 6.0f); // save the rendered audio to cache if (fp) { fputl(snd.final_size, fp); fputc(slot, fp); fwrite(snd.final_buffer, snd.final_size, 1, fp); } // upscale the sound to 16-bit for SDL_mixer then throw away the now unnecessary 8-bit data pxt_PrepareToPlay(&snd, slot); FreePXTBuf(&snd); } if (fp) { stat(" - created %s; %d bytes", cache_name, ftell(fp)); fclose(fp); } return 0; } // attempts to load all the PXT's out of the given cache file. // if succesful, returns 0. static char LoadFXCache(const char *fname, int top) { FILE *fp; int slot; stPXSound snd; fp = fopen(fname, "rb"); if (!fp) { stat("LoadFXCache: audio cache %s not exist", fname); return 1; } if (fgetl(fp) != 'PXC1') { stat("LoadFXCache: %s is incorrect format", fname); fclose(fp); return 1; } if (fgeti(fp) != top) { stat("LoadFXCache: # of sounds has changed since cache creation"); fclose(fp); return 1; } int allocd_size = 0; snd.final_buffer = NULL; int eof = 0; stat("LoadFXCache: restoring pxts from cache"); for(;;) { snd.final_size = fgetl(fp, &eof); if (eof) break; slot = fgetc(fp); if (snd.final_size > allocd_size) { allocd_size = (snd.final_size * 10); if (snd.final_buffer) free(snd.final_buffer); snd.final_buffer = (signed char *)malloc(allocd_size); if (!snd.final_buffer) { staterr("LoadFXCache: out of memory!"); return 1; } } fread(snd.final_buffer, snd.final_size, 1, fp); pxt_PrepareToPlay(&snd, slot); } load_top = slot; free(snd.final_buffer); return 0; } void pxt_freeSoundFX(void) { int i; for(i=0;i<=load_top;i++) { if (sound_fx[i].buffer) { free(sound_fx[i].buffer); sound_fx[i].buffer = NULL; } } } void pxt_FreeSound(int slot) { if (sound_fx[slot].buffer) { free(sound_fx[slot].buffer); sound_fx[slot].buffer = NULL; } } /* char pxt_init(void) { int start; //lprintf("Loading sound FX...\n"); start = SDL_GetTicks(); if (LoadSoundFX("pxt/", "fx.pcm", 0xa0)) return 1; lprintf("time = %d\n", SDL_GetTicks() - start); pxt_Play(0x1e); snd = pxt_load("pxt/fx11.pxt"); if (snd) { render_pxt(snd); pxt_PrepareToPlay(snd, 4); pxt_Play(4); debugshowsound(snd); } return 0; }*/ // free all the internal buffers of a PXSound void FreePXTBuf(stPXSound *snd) { if (snd) { int i; // free up the buffers for(i=0;ichan[i].buffer) { free(snd->chan[i].buffer); snd->chan[i].buffer = NULL; } } if (snd->final_buffer) { free(snd->final_buffer); snd->final_buffer = NULL; } } } // read a .pxt file into memory and return a stPXSound ready to be rendered. char pxt_load(const char *fname, stPXSound *snd) { FILE *fp; char ch; char cc; int i; char load_extended_section = 0; #define BRACK '{' // my damn IDE is borking up the Function List if i put this inline fp = fopen(fname, "rb"); if (!fp) { staterr("pxt_load: file '%s' not found.", fname); return 1; } //lprintf("pxt_load: reading %s...\n", fname); // set all buffers to non-existant and zero-length to start memset(snd, 0, sizeof(stPXSound)); // skip ahead in the file till we find the machine readable data, denoted by '{' if (ReadToBracket(fp)) return 1; // load all channels we find cc = 0; ch = BRACK; while(!feof(fp)) { if (ch=='>') // extended section { load_extended_section = 1; break; } else if (ch==BRACK) { // opening a new channel if (cc >= PXT_NO_CHANNELS) { staterr("pxt_load: sound '%s' contains too many channels!", fname); goto error; } snd->chan[cc].enabled = fgeticsv(fp); snd->chan[cc].size_blocks = fgeticsv(fp); if (LoadComponent(fp, &snd->chan[cc].main)) goto error; if (LoadComponent(fp, &snd->chan[cc].pitch)) goto error; if (LoadComponent(fp, &snd->chan[cc].volume)) goto error; snd->chan[cc].envelope.initial = fgeticsv(fp); for(i=0;ichan[cc].envelope.time[i] = fgeticsv(fp); snd->chan[cc].envelope.val[i] = fgeticsv(fp); } cc++; } ch = fgetc(fp); } if (load_extended_section) { stat("pxt_load: extended section found, loading it"); if (ReadToBracket(fp)) return 1; for(cc=0;ccchan[cc].pitch2)) goto error; } } else { //stat("No extended section found; setting compatibility values."); for(i=0;ichan[i].pitch2, 0, sizeof(stPXWave)); pxt_SetModel(&snd->chan[i].pitch2, 0); } } //stat("pxt_load: '%s' parsed ok", fname); fclose(fp); return 0; error: ; for(i=0;ichan[i].buffer) { free(snd->chan[i].buffer); snd->chan[i].buffer = NULL; } } if (fp) fclose(fp); return 1; } static char LoadComponent(FILE *fp, stPXWave *pxw) { if (pxt_SetModel(pxw, fgeticsv(fp))) return 1; pxw->repeat = fgetfcsv(fp); pxw->volume = fgeticsv(fp); pxw->offset = fgeticsv(fp); return 0; } static char ReadToBracket(FILE *fp) { uchar ch; for(;;) { ch = fgetc(fp); if (ch==BRACK) break; if (feof(fp)) { staterr("pxt_load: file is in incorrect file format [failed to find '{']"); fclose(fp); return 1; } } return 0; } char pxt_save(const char *fname, stPXSound *snd) { FILE *fp; int i, j; fp = fopen(fname, "wb"); if (!fp) { stat("save_pxt: unable to open '%s'", fname); return 1; } for(i=0;ichan[i].enabled); fprintf(fp, "size :%d\r\n", snd->chan[i].size_blocks); SaveComponent(fp, "main", &snd->chan[i].main); SaveComponent(fp, "pitch", &snd->chan[i].pitch); SaveComponent(fp, "volume", &snd->chan[i].volume); fprintf(fp, "initialY:%d\r\n", snd->chan[i].envelope.initial); for(j=0;jchan[i].envelope, j); } fprintf(fp, "\r\n"); } // save "machine-readable" section for(i=0;ichan[i].enabled, snd->chan[i].size_blocks); SaveComponentMachine(fp, &snd->chan[i].main, 1); SaveComponentMachine(fp, &snd->chan[i].pitch, 1); SaveComponentMachine(fp, &snd->chan[i].volume, 1); fprintf(fp, "%d,", snd->chan[i].envelope.initial); for(j=0;jchan[i].envelope.time[j], snd->chan[i].envelope.val[j]); } fprintf(fp, "%d,%d", snd->chan[i].envelope.time[j], snd->chan[i].envelope.val[j]); fprintf(fp, "},\r\n"); } // save "extended" section-- original PixTone seems really picky about // trying to put anything it doesn't know about into the normal section // machine readable pitch2 fprintf(fp, "\r\n-> {"); for(i=0;ichan[i].pitch2, (i+1 {255,0,255,0,255,0,255,0},\r\n"); // human readable copy fprintf(fp, "\r\n"); for(i=0;ichan[i].pitch); fprintf(fp, "dx :255\r\n"); fprintf(fp, "dy :0\r\n"); fprintf(fp, "\r\n"); } fclose(fp); stat("pxt save ok '%s'", fname); return 0; } #ifdef _SDL_MIXER void pxt_chunk_free() { Mix_FreeChunk(mixChunk); #ifdef DEBUG stat("Chunk free!"); #endif } #endif static void SaveComponent(FILE *fp, const char *name, stPXWave *pxw) { char spaces[40]; int nspaces; nspaces = 6 - strlen(name); if (nspaces) memset(spaces, ' ', nspaces); spaces[nspaces] = 0; fprintf(fp, "%s_model %s:%d\r\n", name, spaces, pxw->model_no); fprintf(fp, "%s_freq %s:%.2f\r\n", name, spaces, pxw->repeat); fprintf(fp, "%s_top %s:%d\r\n", name, spaces, pxw->volume); fprintf(fp, "%s_offset%s:%d\r\n", name, spaces, pxw->offset); } static void SaveComponentMachine(FILE *fp, stPXWave *pxw, char trailcomma) { fprintf(fp, "%d,%.2f,%d,%d", pxw->model_no, pxw->repeat, pxw->volume, pxw->offset); if (trailcomma) fprintf(fp, ","); } static void SaveEnvVertice(FILE *fp, stPXEnvelope *env, int v) { fprintf(fp, "%cx :%d\r\n", v+'a', env->time[v]); fprintf(fp, "%cy :%d\r\n", v+'a', env->val[v]); } /* how to use it--it's pretty easy First you have to load (parse) the pxt file you want to play. You can do this with pxt_load() which will read a pxt file and set up your stPXSound structure with the proper values as spec'd in the file. Then you must synthesize or *render* the sound. First make sure the synthesizer is initilized by calling pxt_init & pxt_initsynth. Send your stPXSound through render_pxt. Now it includes 8-bit signed PCM audio in final_buffer. But maybe you want it in a format SDL_mixer can play easier? No problem, call pxt_PrepareToPlay. Give it your sound and a *slot number* from 0-255 which is like a sound id as would be used in a game. You can free (pxt_freebuffers) that old 8-bit data now if you like and in fact entirely throw away the stPXSound as it has nothing to do with pxt_Play. When you're ready to play the sound give pxt_Play the slot number you picked and it will return to you the SDL_mixer channel number if successful. Oh yeah, you can also load a whole directory full of pxt's, up to some max slot #, by using pxt_LoadSoundFX. This function also has the bonus that first, you don't have to do any of the above stuff, it does it all for you and you can just call pxt_Play straight away. Secondly, you can give it a filename for a cache file and it will cache all the sounds after it builds them so that they load quicker next time. */ ================================================ FILE: sound/pxt.fdh ================================================ //hash:4162bd25 //automatically generated by Makegen /* located in sound/sslib.cpp */ //-------------------[referenced from sound/pxt.cpp]-----------------// void SSLockAudio(void); int SSPlayChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int)); int SSEnqueueChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int)); void SSUnlockAudio(void); void SSAbortChannel(int c); /* located in sound/pxt.cpp */ //-------------------[referenced from sound/pxt.cpp]-----------------// static unsigned short rand_next(void); static void GenerateSineModel(unsigned char *table); static void GenerateTriangleModel(unsigned char *table); static void GenerateSawUpModel(unsigned char *table); static void GenerateSawDownModel(unsigned char *table); static void GenerateSquareModel(unsigned char *table); static void GenerateRandModel(unsigned char *table); void GenerateWhiteModel(void); static void GeneratePulseModel(unsigned char *table); char pxt_init(void); char pxt_initsynth(void); char pxt_SetModel(stPXWave *pxwave, int m); void pxt_SetDefaultEnvelope(stPXEnvelope *env); void GenerateEnvelope(stPXEnvelope *env, char *buffer); void pxt_RenderPXWave(stPXWave *pxwave, signed char *buffer, int size_blocks); static void CreateAudio(stPXChannel *chan); static char AllocBuffers(stPXSound *snd); char pxt_Render(stPXSound *snd); void pxt_PrepareToPlay(stPXSound *snd, int slot); void pxt_ChangePitch(stPXSound *snd, double factor); int pxt_Play(int chan, int slot, char loop); int pxt_PlayWithCallback(int chan, int slot, char loop, void (*FinishedCB)(int, int)); static void pxtSoundDone(int chan, int slot); static void pxtLooper(int chan, int slot); void pxt_Stop(int slot); char pxt_IsPlaying(int slot); char pxt_LoadSoundFX(const char *path, const char *cache_name, int top); static char LoadFXCache(const char *fname, int top); void pxt_freeSoundFX(void); void pxt_FreeSound(int slot); void FreePXTBuf(stPXSound *snd); char pxt_load(const char *fname, stPXSound *snd); static char LoadComponent(FILE *fp, stPXWave *pxw); static char ReadToBracket(FILE *fp); char pxt_save(const char *fname, stPXSound *snd); void pxt_chunk_free(); static void SaveComponent(FILE *fp, const char *name, stPXWave *pxw); static void SaveComponentMachine(FILE *fp, stPXWave *pxw, char trailcomma); static void SaveEnvVertice(FILE *fp, stPXEnvelope *env, int v); /* located in common/stat.cpp */ //-------------------[referenced from sound/pxt.cpp]-----------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); /* located in common/misc.cpp */ //-------------------[referenced from sound/pxt.cpp]-----------------// void seedrand(uint32_t newseed); int random(int min, int max); void fputl(unsigned int word, FILE *fp); void fputi(unsigned short word, FILE *fp); unsigned int fgetl(FILE *fp); unsigned int fgetl(FILE *fp, int *eof); unsigned short fgeti(FILE *fp); int fgeticsv(FILE *fp); double fgetfcsv(FILE *fp); ================================================ FILE: sound/pxt.h ================================================ #ifndef _PXT_H #define _PXT_H #include "../common/basics.h" #define PXT_NO_CHANNELS 4 enum { MOD_SINE, MOD_TRI, MOD_SAWUP, MOD_SAWDOWN, MOD_SQUARE, MOD_NOISE, MOD_WHITE, MOD_PULSE, PXT_NO_MODELS }; typedef struct { signed char *model; // ptr to model data uchar model_no; // index of model data (0-5, which wave[] model points to) double phaseacc; double phaseinc; double repeat; // pixtone calls it "freq" uchar volume; // pixtone calls it "top" uchar offset; int white_ptr; // like "phaseacc" but for MOD_WHITE (the odd one out) } stPXWave; #define PXENV_NUM_VERTICES 3 typedef struct { int initial; int time[PXENV_NUM_VERTICES]; int val[PXENV_NUM_VERTICES]; } stPXEnvelope; typedef struct { int size_blocks; char enabled; stPXWave main; stPXWave pitch; stPXWave pitch2; stPXWave volume; stPXEnvelope envelope; unsigned char envbuffer[256]; signed char *buffer; } stPXChannel; typedef struct { stPXChannel chan[PXT_NO_CHANNELS]; signed char *final_buffer; int final_size; } stPXSound; #endif ================================================ FILE: sound/sound.cpp ================================================ /* SOUND.C PXT/SS/Org sound interface */ #include #include #ifdef _SDL_MIXER #include Mix_Music *music_xm; #endif #include "../nx.h" #include "../settings.h" #include "pxt.h" #include "sound.h" #include "sound.fdh" #define MUSIC_OFF 0 #define MUSIC_ON 1 #define MUSIC_BOSS_ONLY 2 static int lastsong = 0; // this holds the previous song, for sound_enabled) return; pxt_Stop(snd); pxt_Play(-1, snd, 0); } void sound_loop(int snd) { if (!settings->sound_enabled) return; pxt_Play(-1, snd, -1); } void sound_stop(int snd) { pxt_Stop(snd); } bool sound_is_playing(int snd) { return pxt_IsPlaying(snd); } void StartStreamSound(int freq) { // pxt_ChangePitch(SND_STREAM1, some_formula); // pxt_ChangePitch(SND_STREAM2, some_other_formula); sound_loop(SND_STREAM1); sound_loop(SND_STREAM2); } void StartPropSound(void) { sound_loop(SND_PROPELLOR); } void StopLoopSounds(void) { sound_stop(SND_STREAM1); sound_stop(SND_STREAM2); sound_stop(SND_PROPELLOR); } /* void c------------------------------() {} */ void music(int songno) { if (songno == cursong) return; lastsong = cursong; cursong = songno; stat(" >> music(%d)", songno); if (songno != 0 && !should_music_play(songno, settings->music_enabled)) { stat("Not playing track %d because music_enabled is %d", songno, settings->music_enabled); org_stop(); return; } start_track(songno); } bool should_music_play(int songno, int musicmode) { /* if (game.mode == GM_TITLE || game.mode == GM_CREDITS) return true; */ switch(musicmode) { case MUSIC_OFF: return false; case MUSIC_ON: return true; case MUSIC_BOSS_ONLY: return music_is_boss(songno); } return false; } bool music_is_boss(int songno) { if (strchr(bossmusic, songno)) return true; else return false; } void music_set_enabled(int newstate) { if (newstate != settings->music_enabled) { stat("music_set_enabled(%d)", newstate); settings->music_enabled = newstate; bool play = should_music_play(cursong, newstate); if (play != org_is_playing()) { if (play) start_track(cursong); else org_stop(); } } } static void start_track(int songno) { char fname[MAXPATHLEN]; if (songno == 0) { org_stop(); return; } #ifdef _SDL_MIXER if (music_xm) { music_free(); } strcpy(fname, xm_dir); strcat(fname, org_names[songno]); strcat(fname, ".xm"); if(music_xm=Mix_LoadMUS(fname)) { stat("openning %s file\n", fname); } bool qLooped = (songno == 3 || songno == 10 || songno == 15 || songno == 16); if(Mix_PlayMusic(music_xm, (qLooped) ? 0 : -1) == -1) { staterr("Error in Mix_PlayMusic!"); } org_set_playing(true); #else strcpy(fname, org_dir); strcat(fname, org_names[songno]); strcat(fname, ".org"); if (!org_load(fname)) { org_start(0); } #endif } #ifdef _SDL_MIXER void music_free() { Mix_FreeMusic(music_xm); #ifdef DEBUG stat("Music is free!"); #endif } #endif int music_cursong() { return cursong; } int music_lastsong() { return lastsong; } ================================================ FILE: sound/sound.fdh ================================================ //hash:7c81ee46 //automatically generated by Makegen /* located in sound/sound.cpp */ //------------------[referenced from sound/sound.cpp]----------------// bool sound_init(void); void sound_close(void); void sound(int snd); void sound_loop(int snd); void sound_stop(int snd); bool sound_is_playing(int snd); void StartStreamSound(int freq); void StartPropSound(void); void StopLoopSounds(void); void music(int songno); bool should_music_play(int songno, int musicmode); bool music_is_boss(int songno); void music_set_enabled(int newstate); static void start_track(int songno); void music_free(); int music_cursong(); int music_lastsong(); /* located in sound/sslib.cpp */ //------------------[referenced from sound/sound.cpp]----------------// char SSInit(void); void SSClose(void); /* located in sound/org.cpp */ //------------------[referenced from sound/sound.cpp]----------------// int org_init(const char *wavetable_fname, const char *drum_pxt_dir, int org_volume); void org_stop(void); bool org_is_playing(void); void org_set_playing(bool); char org_load(char *fname); bool org_start(int startbeat); /* located in sound/pxt.cpp */ //------------------[referenced from sound/sound.cpp]----------------// char pxt_init(void); char pxt_LoadSoundFX(const char *path, const char *cache_name, int top); void pxt_freeSoundFX(void); void pxt_Stop(int slot); int pxt_Play(int chan, int slot, char loop); char pxt_IsPlaying(int slot); void pxt_chunk_free(); /* located in common/stat.cpp */ //------------------[referenced from sound/sound.cpp]----------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); ================================================ FILE: sound/sound.h ================================================ //automatically generated by SoundList.vbp #define SND_MENU_MOVE 1 #define SND_MSG 2 #define SND_BONK_HEAD 3 #define SND_SWITCH_WEAPON 4 #define SND_MENU_PROMPT 5 #define SND_HOPPY_JUMP 6 #define SND_DOOR 11 #define SND_BLOCK_DESTROY 12 #define SND_GET_XP 14 #define SND_PLAYER_JUMP 15 #define SND_PLAYER_HURT 16 #define SND_PLAYER_DIE 17 #define SND_MENU_SELECT 18 #define SND_HEALTH_REFILL 20 #define SND_BUBBLE 21 #define SND_CHEST_OPEN 22 #define SND_THUD 23 #define SND_PLAYER_WALK 24 #define SND_FUNNY_EXPLODE 25 #define SND_QUAKE 26 #define SND_LEVEL_UP 27 #define SND_SHOT_HIT 28 #define SND_TELEPORT 29 #define SND_ENEMY_JUMP 30 #define SND_TINK 31 #define SND_POLAR_STAR_L1_2 32 #define SND_SNAKE_FIRE 33 #define SND_FIREBALL 34 #define SND_EXPLOSION1 35 #define SND_GUN_CLICK 37 #define SND_GET_ITEM 38 #define SND_EM_FIRE 39 #define SND_STREAM1 40 #define SND_STREAM2 41 #define SND_GET_MISSILE 42 #define SND_COMPUTER_BEEP 43 #define SND_MISSILE_HIT 44 #define SND_XP_BOUNCE 45 #define SND_IRONH_SHOT_FLY 46 #define SND_EXPLOSION2 47 #define SND_BUBBLER_FIRE 48 #define SND_POLAR_STAR_L3 49 #define SND_ENEMY_SQUEAK 50 #define SND_ENEMY_HURT 51 #define SND_ENEMY_HURT_BIG 52 #define SND_ENEMY_HURT_SMALL 53 #define SND_ENEMY_HURT_COOL 54 #define SND_ENEMY_SQUEAK2 55 #define SND_SPLASH 56 #define SND_ENEMY_DAMAGE 57 #define SND_PROPELLOR 58 #define SND_SPUR_CHARGE_1 59 #define SND_SPUR_CHARGE_2 60 #define SND_SPUR_CHARGE_3 61 #define SND_SPUR_FIRE_1 62 #define SND_SPUR_FIRE_2 63 #define SND_SPUR_FIRE_3 64 #define SND_SPUR_MAXED 65 #define SND_EXPL_SMALL 70 #define SND_LITTLE_CRASH 71 #define SND_BIG_CRASH 72 #define SND_BUBBLER_LAUNCH 100 #define SND_LIGHTNING_STRIKE 101 #define SND_JAWS 102 #define SND_CHARGE_GUN 103 #define SND_104 104 #define SND_PUPPY_BARK 105 #define SND_SLASH 106 #define SND_BLOCK_MOVE 107 #define SND_IGOR_JUMP 108 #define SND_CRITTER_FLY 109 #define SND_DROLL_SHOT_FLY 110 #define SND_MOTOR_RUN 111 #define SND_MOTOR_SKIP 112 #define SND_BOOSTER 113 #define SND_CORE_HURT 114 #define SND_CORE_THRUST 115 #define SND_CORE_CHARGE 116 #define SND_NEMESIS_FIRE 117 #define SND_150 150 #define SND_151 151 #define SND_152 152 #define SND_153 153 #define SND_154 154 #define SND_155 155 ================================================ FILE: sound/sslib.cpp ================================================ // Sound System // more or less, my own version of SDL_mixer #include #ifdef _SDL_MIXER #include #endif #include #include #include #include #include "../common/basics.h" #include "sslib.h" #include "sslib.fdh" #include "sound.fdh" static SSChannel channel[SS_NUM_CHANNELS]; uint8_t *mixbuffer = NULL; int mix_pos; int lockcount = 0; char SSInit(void) { SDL_AudioSpec fmt, obtained; // Set 16-bit stereo audio at 22Khz fmt.freq = SAMPLE_RATE; fmt.format = AUDIO_S16; fmt.channels = 2; fmt.samples = 512; fmt.callback = mixaudio; fmt.userdata = NULL; // Open the audio device and start playing sound! #ifdef _SDL_MIXER if (Mix_OpenAudio(fmt.freq, fmt.format, fmt.channels, fmt.samples)) { staterr("SS: Unable to open audio: %s", SDL_GetError()); return 1; } #else if (SDL_OpenAudio(&fmt, &obtained) < 0) { staterr("SS: Unable to open audio: %s", SDL_GetError()); return 1; } if (obtained.format != fmt.format || \ obtained.channels != fmt.channels) { staterr("SS: Failed to obtain the audio format I wanted"); return 1; } #endif mixbuffer = (uint8_t *)malloc(obtained.samples * obtained.channels * 2); // zero everything in all channels memset(channel, 0, sizeof(channel)); for(int i=0;i= SS_NUM_CHANNELS) { staterr("SSEnqueueChunk: channel %d is higher than SS_NUM_CHANNELS", c); return -1; } SSLockAudio(); if (c < 0) c = SSFindFreeChannel(); if (c==-1) { staterr("SSEnqueueChunk: no available sound channels!"); SSUnlockAudio(); return -1; } chan = &channel[c]; chan->FinishedCB = FinishedCB; chunk = &chan->chunks[chan->tail]; chunk->buffer = buffer; chunk->length = len; // in 16-bit stereo samples chunk->userdata = userdata; chunk->bytebuffer = (signed char *)buffer; chunk->bytelength = chunk->length * 2 * 2; // in bytes chunk->bytepos = 0; // advance tail pointer if (++chan->tail >= MAX_QUEUED_CHUNKS) chan->tail = 0; if (chan->tail==chan->head) { staterr("SS: overqueued channel %d; Bad Things about to happen", c); SSUnlockAudio(); return -1; } SSUnlockAudio(); //stat("SSEnqueued buffer %d: %08x of %d bytes to channel %d (containing %d samples); UD %d", loc, buffer, chunk->bytelength, c, len, chunk->userdata); return c; } // works like SSEnqueueChunk, only it does not enqueue. Instead, if a sound // is already playing on the channel, it is stopped and the new sound takes it's place. // if c==-1, it acts identically to SSEnqueueChunk since a "free channel" by definition // has no existing sound to be affected by a queueing operation. int SSPlayChunk(int c, signed short *buffer, int len, int userdata, void(*FinishedCB)(int, int)) { if (c != -1) SSAbortChannel(c); return SSEnqueueChunk(c, buffer, len, userdata, FinishedCB); } // returns true if channel c is currently playing char SSChannelPlaying(int c) { int result; SSLockAudio(); result = (channel[c].head != channel[c].tail); SSUnlockAudio(); return result; } // returns the userdata member of the currently playing chunk on channel c. // if channel c is not playing, the results are undefined. int SSGetCurUserData(int c) { int result; SSLockAudio(); if (channel[c].head != channel[c].tail) { result = (channel[c].chunks[channel[c].head].userdata); } else { staterr("SSGetUserData: channel %d is not playing!\n", c); result = -1; } SSUnlockAudio(); return result; } // returns the currently playing sample within the currently playing chunk // of channel c. If no chunk is playing, the results are undefined. // as with "len" parameter to SSEnqueueChunk, the count counts the two // components of a stereo sample as a single sample. int SSGetSamplePos(int c) { int result; SSLockAudio(); if (channel[c].head != channel[c].tail) { result = (channel[c].chunks[channel[c].head].bytepos / 4); } else { staterr("SSGetSamplePos: channel %d is not playing!", c); result = -1; } SSUnlockAudio(); return result; } // if a sound is playing on channel c, stops it immediately. // if not, does nothing. void SSAbortChannel(int c) { SSLockAudio(); /*if (c >= 0 && c < SS_NUM_CHANNELS) { while(channel[c].head != channel[c].tail) { if (channel[c].FinishedCB) (*channel[c].FinishedCB)(c, channel[c].chunks[channel[c].head].userdata); if (++channel[c].head >= MAX_QUEUED_CHUNKS) channel[c].head = 0; } }*/ channel[c].head = channel[c].tail; SSUnlockAudio(); } // aborts all sounds with a userdata value matching "ud". void SSAbortChannelByUserData(int ud) { int c; SSLockAudio(); for(c=0;cchunks[chan->head]; if (bytes > chunk->bytelength) { bytes = chunk->bytelength; } // don't copy past end of chunk if (chunk->bytepos+bytes > chunk->bytelength) { // add it to list of finished chunks chan->FinishedChunkUserdata[chan->nFinishedChunks++] = chunk->userdata; // only add what's left. and advance the head pointer to the next chunk. bytes = chunk->bytelength - chunk->bytepos; if (++chan->head >= MAX_QUEUED_CHUNKS) chan->head = 0; //stat("AddBuffer: reached end of chunk %d; new head is %d, and tail is %d", c, chan->head, chan->tail); } // stat("%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); memcpy(&mixbuffer[mix_pos], &chunk->bytebuffer[chunk->bytepos], bytes); mix_pos += bytes; chunk->bytepos += bytes; return bytes; } static void mixaudio(void *unused, uint8_t *stream, int len) { int bytes_copied; int bytestogo; int c; int i; // get data for all channels and add it to the mix for(c=0;c 0) { bytes_copied = AddBuffer(&channel[c], bytestogo); bytestogo -= bytes_copied; if (channel[c].head==channel[c].tail) { // ran out of chunks before buffer full // clear remaining portion of mixbuffer if (bytestogo) { memset(&mixbuffer[mix_pos], 0, bytestogo); } break; } } SDL_MixAudio(stream, mixbuffer, len, channel[c].volume); } // tell any callbacks that had a chunk finish, that their chunk finished for(c=0;cDelete(); game.stageboss.object = NULL; } } fBossType = newtype; fBoss = NULL; switch(newtype) { case BOSS_NONE: break; case BOSS_OMEGA: fBoss = new OmegaBoss; break; case BOSS_BALFROG: fBoss = new BalfrogBoss; break; case BOSS_MONSTER_X: fBoss = new XBoss; break; case BOSS_CORE: fBoss = new CoreBoss; break; case BOSS_IRONH: fBoss = new IronheadBoss; break; case BOSS_SISTERS: fBoss = new SistersBoss; break; case BOSS_UNDEAD_CORE: fBoss = new UDCoreBoss; break; case BOSS_HEAVY_PRESS: fBoss = new HeavyPress; break; case BOSS_BALLOS: fBoss = new BallosBoss; break; default: staterr("StageBossManager::SetType: unhandled boss type %d", newtype); fBossType = BOSS_NONE; return 1; } return 0; } int StageBossManager::Type() { return fBossType; } /* void c------------------------------() {} */ void StageBossManager::OnMapEntry() { if (fBoss) fBoss->OnMapEntry(); } void StageBossManager::OnMapExit() { if (fBoss) fBoss->OnMapExit(); } void StageBossManager::Run() { if (fBoss) fBoss->Run(); } void StageBossManager::RunAftermove() { if (fBoss) fBoss->RunAftermove(); } /* void c------------------------------() {} */ void StageBossManager::SetState(int newstate) { if (fBoss) { fBoss->SetState(newstate); } else { staterr("StageBossManager::SetState(%d): no stageboss object in existance!", newstate); } } /* void c------------------------------() {} */ // these are default implementation, bosses can override them if they want to. void StageBoss::SetState(int newstate) { if (game.stageboss.object) { game.stageboss.object->state = newstate; } else { staterr("StageBoss::SetState(%d): no stageboss object!", newstate); } } ================================================ FILE: stageboss.fdh ================================================ //hash:0fd34063 //automatically generated by Makegen /* located in common/stat.cpp */ //-------------------[referenced from stageboss.cpp]-----------------// void stat(const char *fmt, ...); void staterr(const char *fmt, ...); ================================================ FILE: stageboss.h ================================================ #ifndef _STAGEBOSS_H #define _STAGEBOSS_H // Stage Bosses are "big" boss enemies used in some stages. // // The stage boss class runs at a conceptual level "above" // normal AI routines, more like at the level of the game loop. // // This gives these complex bosses a good way to control more // things than just a single object (some bosses for example have // multiple parts which need to be coordinated, such as Omega). // // A pointer to the "main" object of a stage boss is stored by // the derived class at game.stageboss.object. // // The script command #include #include "stagedata.h" const char *backdrop_names[] = { "bk0", "bkBlue", "bkGreen", "bkBlack", "bkGard", "bkMaze", "bkGray", "bkRed", "bkWater", "bkMoon", "bkFog", "bkFall", NULL }; const char *tileset_names[] = { "0", "Pens", "Eggs", "EggX", "EggIn", "Store", "Weed", "Barr", "Maze", "Sand", "Mimi", "Cave", "River", "Gard", "Almond", "Oside", "Cent", "Jail", "White", "Fall", "Hell", "Labo", NULL }; ================================================ FILE: stagedata.fdh ================================================ //hash:00000000 //automatically generated by Makegen ================================================ FILE: stagedata.h ================================================ #ifndef _STAGEDATA_H #define _STAGEDATA_H //#define NMAPS 120 //extern MapRecord stages[NMAPS]; #define NUM_BACKDROPS 12 #define NUM_TILESETS 22 extern const char *backdrop_names[]; extern const char *tileset_names[]; #define NPCSET_GUEST 0 #define NPCSET_0 1 #define NPCSET_EGGS1 2 #define NPCSET_RAVIL 3 #define NPCSET_WEED 4 #define NPCSET_MAZE 5 #define NPCSET_SAND 6 #define NPCSET_OMG 7 #define NPCSET_CEMET 8 #define NPCSET_BLLG 9 #define NPCSET_PLANT 10 #define NPCSET_FROG 11 #define NPCSET_CURLY 12 #define NPCSET_STREAM 13 #define NPCSET_IRONH 14 #define NPCSET_TORO 15 #define NPCSET_X 16 #define NPCSET_DARK 17 #define NPCSET_ALMO1 18 #define NPCSET_EGGS2 19 #define NPCSET_TWIND 20 #define NPCSET_MOON 21 #define NPCSET_CENT 22 #define NPCSET_HERI 23 #define NPCSET_RED 24 #define NPCSET_MIZA 25 #define NPCSET_DR 26 #define NPCSET_ALMO2 27 #define NPCSET_KINGS 28 #define NPCSET_HELL 29 #define NPCSET_PRESS 30 #define NPCSET_PRIEST 31 #define NPCSET_BALLOS 32 #define NPCSET_ISLAND 33 #endif ================================================ FILE: statusbar.cpp ================================================ #include "nx.h" #include "statusbar.h" #include "statusbar.fdh" #ifdef WIDESCREEN #define STATUS_X 10 #define STATUS_Y 10 #else #define STATUS_X 16 #define STATUS_Y 16 #endif #define HEALTH_X (STATUS_X+0) #define HEALTH_Y (STATUS_Y+24) #define HEALTHFILL_X (HEALTH_X+24) #define HEALTHFILL_Y (HEALTH_Y+1) #define HEALTHFILL_MAXLEN 39 #define WEAPONBAR_Y (STATUS_Y+1) #define CURWEAPON_X (STATUS_X+1) #define XPBAR_Y (STATUS_Y+16) // Y coordinate of "XP" area #define XPBAR_X (STATUS_X+24) // X of yellow XP bar #define AMMO_X (STATUS_X+32) #define AMMO_Y (STATUS_Y+0) #define NIKU_X STATUS_X #define NIKU_Y 8 #define FRAME_XP_BAR 0 // empty bar frame #define FRAME_XP_FILL 1 // sprite to fill bar with #define FRAME_XP_FLASH 2 // white flashing when XP is gained #define FRAME_XP_MAX 3 // "MAX" when XP is at max on L3 //int displayed_health = 0; //int healthdectimer = 0; StatusBar statusbar; static PercentBar PHealthBar; // the "slide" effect when changing weapons struct stWeaponSlide { int lv_offset; // offset of XP bar int wpn_offset; // offset of weapon bar int ammo_offset; // offset of ammo, in addition to wpn_offset char timer; int move_dir; int firstWeapon; // weapon to show as current weapon } slide; #define SLIDE_LV_OFFSET 16 #define SLIDE_TIMER_START 5 bool statusbar_init(void) { InitPercentBar(&PHealthBar, player->hp); memset(&slide, 0, sizeof(slide)); slide.firstWeapon = player->curWeapon; return 0; } void DrawStatusBar(void) { int level, curxp, maxxp; int w, x; bool maxed_out; //debug("%08x", game.bossbar.object); //debug("%s", game.bossbar.defeated ? "true" : "false"); // handle animations etc RunStatusBar(); // draw boss bar if (game.bossbar.object && !game.bossbar.defeated) { #define BOSSBAR_W 198 // BOSS_X = 32 at normal resolution #define BOSS_X ((SCREEN_WIDTH / 2) - (BOSSBAR_W / 2) - 29) #define BOSS_Y (SCREEN_HEIGHT-20) draw_sprite(BOSS_X, BOSS_Y, SPR_TEXTBOX, 0, 0); draw_sprite(BOSS_X, BOSS_Y+8, SPR_TEXTBOX, 2, 0); draw_sprite(BOSS_X+8, BOSS_Y+4, SPR_BOSSHPICON, 0, 0); // e.g. bosses w/ multiple forms (Ballos) if (game.bossbar.object->hp > game.bossbar.starting_hp) game.bossbar.starting_hp = game.bossbar.object->hp; RunPercentBar(&game.bossbar.bar, game.bossbar.object->hp); DrawPercentBar(&game.bossbar.bar, BOSS_X+40, BOSS_Y+5, game.bossbar.object->hp, game.bossbar.starting_hp, BOSSBAR_W); } if (game.frozen || player->inputs_locked) return; if (fade.getstate() != FS_NO_FADE) return; if (player->hp) { if (!player->hurt_flash_state) { if (!game.debug.god) { // -- draw the health bar ----------------------------- draw_sprite(HEALTH_X, HEALTH_Y, SPR_HEALTHBAR, 0, 0); DrawPercentBar(&PHealthBar, HEALTHFILL_X, HEALTHFILL_Y, player->hp, player->maxHealth, HEALTHFILL_MAXLEN); // draw the health in numbers DrawNumberRAlign(HEALTH_X+24, HEALTH_Y, SPR_WHITENUMBERS, PHealthBar.displayed_value); } // -- draw the XP bar --------------------------------- level = player->weapons[player->curWeapon].level; curxp = player->weapons[player->curWeapon].xp; maxxp = player->weapons[player->curWeapon].max_xp[level]; if (player->curWeapon == WPN_NONE) { curxp = 0; maxxp = 1; } // draw XP bar and fill it draw_sprite(XPBAR_X+slide.lv_offset, XPBAR_Y, SPR_XPBAR, FRAME_XP_BAR, 0); maxed_out = ((curxp == maxxp) && level == 2); if (!maxed_out) DrawPercentage(XPBAR_X+slide.lv_offset, XPBAR_Y, SPR_XPBAR, FRAME_XP_FILL, curxp, maxxp, sprites[SPR_XPBAR].w); // draw the white flashing if we just got more XP // the time-left and flash-state are in separate variables-- // otherwise the Spur will not flash XP bar if (statusbar.xpflashcount) { if (++statusbar.xpflashstate & 2) { draw_sprite(XPBAR_X+slide.lv_offset, XPBAR_Y, SPR_XPBAR, FRAME_XP_FLASH, 0); } statusbar.xpflashcount--; } else statusbar.xpflashstate = 0; // draw "MAX" if (maxed_out) draw_sprite(XPBAR_X+slide.lv_offset, XPBAR_Y, SPR_XPBAR, FRAME_XP_MAX, 0); // Level Number DrawWeaponLevel(HEALTH_X + slide.lv_offset, XPBAR_Y, player->curWeapon); } // -- draw the weapon bar ----------------------------- // draw current weapon if (player->curWeapon != WPN_NONE) draw_sprite(CURWEAPON_X + slide.wpn_offset, WEAPONBAR_Y, SPR_ARMSICONS, slide.firstWeapon, 0); // draw ammo, note we draw ammo of firstweapon NOT current weapon, for slide effect DrawWeaponAmmo((AMMO_X + slide.wpn_offset + slide.ammo_offset), AMMO_Y, slide.firstWeapon); // draw other weapons w = slide.firstWeapon; x = STATUS_X + 64 + slide.wpn_offset + 1; for(;;) { if (++w >= WPN_COUNT) w = 0; if (w==slide.firstWeapon) break; if (player->weapons[w].hasWeapon) { draw_sprite(x, WEAPONBAR_Y, SPR_ARMSICONS, w, RIGHT); x += 16; } } DrawAirLeft((SCREEN_WIDTH/2) - (5*8), ((SCREEN_HEIGHT)/2)-16); } } void DrawAirLeft(int x, int y) { if (player->airshowtimer) { draw_sprite(x, y, SPR_AIR, (player->airleft%30 > 10) ? 0:1, RIGHT); if (player->airshowtimer%6 < 4) DrawNumber(x+32, y, player->airleft/10); } } void DrawWeaponAmmo(int x, int y, int wpn) { // draw slash if (!player->hurt_flash_state || game.mode != GM_NORMAL) { draw_sprite(x, y+8, SPR_WHITENUMBERS, 11, 0); } if (!player->weapons[wpn].maxammo) { // ammo is "not applicable" x += 16; draw_sprite(x, y, SPR_NAAMMO, 0, 0); draw_sprite(x, y+8, SPR_NAAMMO, 0, 0); } else { DrawNumber(x, y, player->weapons[wpn].ammo); DrawNumber(x, y+8, player->weapons[wpn].maxammo); } } void DrawWeaponLevel(int x, int y, int wpn) { int level = (player->weapons[wpn].level + 1); if (wpn == WPN_NONE) level = 0; draw_sprite(x, y, SPR_XPLEVELICON, 0, 0); draw_sprite(x+16, y, SPR_WHITENUMBERS, level, 0); } static void RunStatusBar(void) { // handle slowly decreasing the health when player is hurt // note how it only decrements while it's actually visible--i thought that was a nice touch if (!player->hurt_flash_state) { RunPercentBar(&PHealthBar, player->hp); } if (game.frozen || player->inputs_locked) return; if (fade.getstate() != FS_NO_FADE) return; // sliding effect when changing weapons if (slide.lv_offset) { // next weapon slide.lv_offset += slide.move_dir; if (--slide.timer > 0) { slide.wpn_offset += slide.move_dir; } else { if (!slide.timer) slide.firstWeapon = player->curWeapon; slide.wpn_offset = slide.lv_offset; slide.ammo_offset = 0; } } else { slide.firstWeapon = player->curWeapon; } } // start the slide effect. if dir = LEFT, slides left (next weapon), if RIGHT does "prev weapon" // newwpn = the weapon to change to void weapon_slide(int dir, int newwpn) { int sign; if (slide.lv_offset) slide.firstWeapon = player->curWeapon; // if already sliding change immediately if (dir==RIGHT) sign = -1; else sign = 1; slide.lv_offset = SLIDE_LV_OFFSET * sign; slide.timer = SLIDE_TIMER_START; slide.ammo_offset = 16 * sign; slide.move_dir = -2 * sign; player->curWeapon = newwpn; } // the opening slide effect on load/new game void weapon_introslide() { if (player->curWeapon == WPN_NONE) { weapon_slide(LEFT, player->curWeapon); return; } stat_PrevWeapon(true); slide.lv_offset = 0; stat_NextWeapon(true); } // switches to the next weapon in inventory void stat_NextWeapon(bool quiet) { int w; w = player->curWeapon; if (w == WPN_NONE) return; for(;;) { if (++w >= WPN_COUNT) w = 0; if (player->weapons[w].hasWeapon || w == player->curWeapon) { if (!quiet) sound(SND_SWITCH_WEAPON); weapon_slide(LEFT, w); return; } } while(w != player->curWeapon); } // switches to the previous weapon in inventory void stat_PrevWeapon(bool quiet) { int w; w = player->curWeapon; if (w == WPN_NONE) return; for(;;) { if (--w < 0) w = WPN_COUNT-1; if (player->weapons[w].hasWeapon || w == player->curWeapon) { if (!quiet) sound(SND_SWITCH_WEAPON); weapon_slide(RIGHT, w); return; } } } void InitPercentBar(PercentBar *bar, int starting_value) { PHealthBar.displayed_value = starting_value; PHealthBar.dectimer = 0; } void RunPercentBar(PercentBar *bar, int current_value) { if (current_value != bar->displayed_value) { if (current_value > bar->displayed_value) { bar->displayed_value = current_value; } else { if (++bar->dectimer > 0x1e) { bar->displayed_value--; } } } else bar->dectimer = 0; } void DrawPercentBar(PercentBar *bar, int x, int y, int curvalue, int maxvalue, int width) { if (bar->displayed_value != curvalue) DrawPercentage(x, y, SPR_HEALTHFILL, 1, bar->displayed_value, maxvalue, width); DrawPercentage(x, y, SPR_HEALTHFILL, 0, curvalue, maxvalue, width); } /* void c------------------------------() {} */ // draws number "num" at x,y. // leading zeroes are omitted, however, the space for them is still // skipped over (left blank). thus it always leaves space for 3 digits. void DrawNumber(int x, int y, int num) { static const int numtable[3] = { 1000, 100, 10 }; int place, digit, total; if (num > 9999) num = 9999; place = total = 0; while(place < 3) { digit = 0; while(num >= numtable[place]) { num -= numtable[place]; digit++; } total += digit; if (total) draw_sprite(x+(place*8), y, SPR_WHITENUMBERS, digit); place++; } draw_sprite(x+(3*8), y, SPR_WHITENUMBERS, num); } void DrawPercentage(int x, int y, int fill_sprite, int fsframe, int curvalue, int maxvalue, int width_at_max) { if (curvalue < 0) curvalue = 0; if (curvalue > 0 || maxvalue==0) { int fillwidth; if (curvalue >= maxvalue) { fillwidth = width_at_max; } else { fillwidth = (int)(((float)width_at_max / (float)maxvalue) * (float)curvalue); if (!fillwidth) return; } draw_sprite_clip_width(x, y, fill_sprite, fsframe, fillwidth); } } // draws a given number using sprite 's' as the font // the numbers are drawn right-aligned to "x". void DrawNumberRAlign(int x, int y, int s, int num) { char str[50]; int i, len; int fontwidth = sprites[s].w; sprintf(str, "%d", num); x -= strlen(str) * fontwidth; len = strlen(str); for(i=0;iequipmask & EQUIP_NIKUMARU) { if (!game.frozen && !player->inputs_locked) { if (game.counter < 300000) // 100'00"0 game.counter++; } } else { game.counter = 0; } } void niku_draw(int value, bool force_white) { int clkframe = (game.counter % 30) <= 10; if (game.frozen || player->inputs_locked || force_white) clkframe = 0; draw_sprite(NIKU_X, NIKU_Y, SPR_NIKU_CLOCK, clkframe); int mins = (value / 3000); // the game runs at 50 fps int secs = (value / 50) % 60; int tens = (value / 5) % 10; DrawNumber(NIKU_X, NIKU_Y, mins); DrawTwoDigitNumber(NIKU_X+36, NIKU_Y, secs); DrawDigit(NIKU_X+56, NIKU_Y, tens); draw_sprite(NIKU_X+30, NIKU_Y, SPR_NIKU_PUNC); } ================================================ FILE: statusbar.fdh ================================================ //hash:32c2827d //automatically generated by Makegen /* located in statusbar.cpp */ //-------------------[referenced from statusbar.cpp]-----------------// bool statusbar_init(void); void DrawStatusBar(void); void DrawAirLeft(int x, int y); void DrawWeaponAmmo(int x, int y, int wpn); void DrawWeaponLevel(int x, int y, int wpn); static void RunStatusBar(void); void weapon_slide(int dir, int newwpn); void weapon_introslide(); void stat_NextWeapon(bool quiet); void stat_PrevWeapon(bool quiet); void InitPercentBar(PercentBar *bar, int starting_value); void RunPercentBar(PercentBar *bar, int current_value); void DrawPercentBar(PercentBar *bar, int x, int y, int curvalue, int maxvalue, int width); void DrawNumber(int x, int y, int num); void DrawPercentage(int x, int y, int fill_sprite, int fsframe, int curvalue, int maxvalue, int width_at_max); void DrawNumberRAlign(int x, int y, int s, int num); void DrawTwoDigitNumber(int x, int y, int num); void DrawDigit(int x, int y, int digit); void niku_run(); void niku_draw(int value, bool force_white); /* located in sound/sound.cpp */ //-------------------[referenced from statusbar.cpp]-----------------// void sound(int snd); ================================================ FILE: statusbar.h ================================================ #ifndef _STATUSBAR_H #define _STATUSBAR_H struct PercentBar { int displayed_value; int dectimer; }; struct StatusBar { int xpflashcount; int xpflashstate; }; extern StatusBar statusbar; void niku_draw(int value, bool force_white=false); void stat_PrevWeapon(bool quiet=false); void stat_NextWeapon(bool quiet=false); #endif ================================================ FILE: tools/extractmapinfo.c ================================================ #include #include #define NMAPS 95 #define DATA_OFFSET 0x937B0 typedef struct { char tileset[32]; char filename[32]; int scroll_type; char background[32]; char NPCset1[32]; char NPCset2[32]; uint8_t bossNo; char caption[35]; } MapRecord; MapRecord MapData[NMAPS]; typedef struct { char files[NMAPS+1][32]; int nfiles; } filelist; int FindFileInList(filelist *list, char *fname) { int i; for(i=0;infiles;i++) { if (!strcasecmp(list->files[i], fname)) { return i; } } return -1; } void AddFileToList(filelist *list, char *fname) { if (FindFileInList(list, fname) != -1) return; //printf("Added '%s' to list at pos %d\n", fname, list->nfiles); strcpy(list->files[list->nfiles], fname); list->nfiles++; } int main(void) { filelist bg, tileset, npcset; FILE *fp; int i, j; char *comma; char buf[256]; // read data from exe fp = fopen("/data/win/Programs/Games/Cave Story Deluxe/CaveStory/Doukutsu.exe", "rb"); if (!fp) { printf("Failed opening exe\n"); return 1; } // load raw data into struct fseek(fp, DATA_OFFSET, SEEK_SET); fread(MapData, sizeof(MapRecord), NMAPS, fp); fclose(fp); // parse tileset and bg info and convert strings to numbers memset(&bg, 0, sizeof(bg)); memset(&tileset, 0, sizeof(tileset)); memset(&npcset, 0, sizeof(npcset)); for(i=0;i=0;j--) { npcset.files[i][j] = toupper(npcset.files[i][j]); } fprintf(fp, "#define NPCSET_%s\t\t %d\n", npcset.files[i], i); } fprintf(fp, "\n"); fclose(fp); fp = fopen("../autogen/stagedata.cpp", "wb"); fprintf(fp, "//auto-generated by extractmapinfo.c\n\n"); fprintf(fp, "#include \n"); fprintf(fp, "#include \n"); fprintf(fp, "#include \"stagedata.h\"\n\n"); // output the backdrop names fprintf(fp, "const char *backdrop_names[] = {\n"); for(i=0;i #include "nx.h" #include "trig.fdh" signed int sin_table[256]; signed int tan_table[64]; char trig_init(void) { int degrees; // converts from 0-256 scale to 0-360 scale, then from degrees to radians #define PIBT ((360.00f / 256.00f) * (3.14159265f / 180.00f)) for(degrees=0;degrees<256;degrees++) { sin_table[degrees] = (int)(sin((double)degrees * PIBT) * (1 << CSF)); } for(degrees=0;degrees<64;degrees++) { tan_table[degrees] = (int)(tan((double)degrees * PIBT) * (1 << 13)); } //SetFullscreen(1); return 0; } /*void trig_test(void) { int x, y; int x1, y1, x2, y2; int xdist, ydist; char buf[80]; int angle; double fratio; int ratio; char k = 0; static int avx, avy; static int avtimer=0; static int avsx=80< x2 && avx>>CSF < x2) k++; if (x1 < x2 && avx>>CSF > x2) k++; if (y1 > y2 && avy>>CSF < y2) k++; if (y1 < y2 && avy>>CSF > y2) k++; if (k >= 2) avtimer = 0; if (x1 != lx || y1 != ly) { lx=x1;ly=y1;avtimer=0; } avtimer--; if (avtimer < 0) { vector_from_angle(angle, 0xA0, &avectx, &avecty); avtimer = 650; avx = x1<>CSF, avy>>CSF, 200, 120, 120, 0, 256, 6); flip(); } void PlotCircle(int x, int y, uchar r, uchar g, uchar b, int start, int stop, int shift) { int ang; int xa, ya; uchar angle; for(ang=start;ang> shift; angle += 64; ya = sin_table[angle] >> shift; PlotSDLPixel(x+xa, y+ya, r, g, b); } } */ // given an angle and a speed, places the X and Y speeds in xs and ys. // note: the output values _ARE_ CSF'd, despite the >>= CSF done on them at the end. void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys) { if (ys) { *ys = sin_table[angle]; *ys *= speed; *ys >>= CSF; } if (xs) { angle += 64; // wraps at 255 because it's a char *xs = sin_table[angle]; // what's going on here is that when we calculated sin_table, we could not hold the // fractional (0-1.00f) values outputted from sin(), so we scaled them from 0-0x200. // so now we basically are >>= CSFing the value back to it's original 0-1.00, then // multiplying by speed. We're just doing it backwards so as the precision will stay. // which is ok because multiplication and division are on the same level of OoO. *xs *= speed; *xs >>= CSF; } } int xinertia_from_angle(uint8_t angle, int speed) { angle += 64; int xs = sin_table[angle]; xs *= speed; xs >>= CSF; return xs; } int yinertia_from_angle(uint8_t angle, int speed) { int ys = sin_table[angle]; ys *= speed; ys >>= CSF; return ys; } // give it your position and a target position, and it tells you what angle you should travel at. uint8_t GetAngle(int curx, int cury, int tgtx, int tgty) { int xdist, ydist; int ratio; int angle; xdist = (tgtx - curx); ydist = (tgty - cury); if (xdist==0) { // fixup for undefined slope if (tgty > cury) return 0x40; // straight down return 0xC0; // straight up } // (ydist / xdist) * 512 [scale it for integer floating point] ratio = (abs(ydist) << 13) / abs(xdist); if (ratio > tan_table[63]) { angle = 0x40; } else { for(angle=0;angle<64;angle++) { if (tan_table[angle] >= ratio) break; } } if (curx > tgtx) angle = 0x80 - angle; if (cury > tgty) angle = 0x100 - angle; return angle; } /* void c------------------------------() {} */ // convenience function. // * spawn an object at o's action point. // * launch it at the player at speed. // * introduce "rand_variance" random error/variation into the launch angle. void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed) { Object *shot; shot = SpawnObjectAtActionPoint(o, objtype); ThrowObjectAtPlayer(shot, rand_variance, speed); } // like EmFireAngledShot, but it's throws an already existing object // instead of spawning a new one void ThrowObjectAtPlayer(Object *o, int rand_variance, int speed) { ThrowObject(o, player->x, player->y, rand_variance, speed); } // set the x&y inertia of object o so that it travels towards [destx,desty]. // rand_variance is a random amount of inaccuracy, in 0-255 degrees, to introduce // into the toss. // speed is how quickly to throw the object, in CSF'd coordinates. void ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed) { uint8_t angle = GetAngle(o->x, o->y, destx, desty); if (rand_variance) angle += random(-rand_variance, rand_variance); ThrowObjectAtAngle(o, angle, speed); } // toss object o along angle angle at speed speed void ThrowObjectAtAngle(Object *o, uint8_t angle, int speed) { o->yinertia = (sin_table[angle] * speed) >> CSF; angle += 64; o->xinertia = (sin_table[angle] * speed) >> CSF; } ================================================ FILE: trig.fdh ================================================ //hash:bef9350c //automatically generated by Makegen /* located in trig.cpp */ //---------------------[referenced from trig.cpp]--------------------// char trig_init(void); void vector_from_angle(uint8_t angle, int speed, int *xs, int *ys); int xinertia_from_angle(uint8_t angle, int speed); int yinertia_from_angle(uint8_t angle, int speed); uint8_t GetAngle(int curx, int cury, int tgtx, int tgty); void EmFireAngledShot(Object *o, int objtype, int rand_variance, int speed); void ThrowObjectAtPlayer(Object *o, int rand_variance, int speed); void ThrowObject(Object *o, int destx, int desty, int rand_variance, int speed); void ThrowObjectAtAngle(Object *o, uint8_t angle, int speed); /* located in ai/ai.cpp */ //---------------------[referenced from trig.cpp]--------------------// Object *SpawnObjectAtActionPoint(Object *o, int otype); /* located in common/misc.cpp */ //---------------------[referenced from trig.cpp]--------------------// int random(int min, int max); ================================================ FILE: trig.h ================================================ extern signed int sin_table[256]; ================================================ FILE: tsc.cpp ================================================ // TSC script parser & executor #include "nx.h" #include "common/DBuffer.h" #include "vararray.h" #include "tsc.h" #include "tsc.fdh" #define TRACE_SCRIPT // which textbox options are enabled by the " scripts; void Clear() { for(int i=0;iClear(); // load the raw script text buf = tsc_decrypt(fname, &fsize); if (!buf) { staterr("tsc_load: failed to load file: '%s'", fname); return 1; } // now "compile" all the scripts in the TSC //int top_script = CompileScripts(buf, fsize, base); result = tsc_compile(buf, fsize, pageno); free(buf); return result; } char *tsc_decrypt(const char *fname, int *fsize_out) { FILE *fp; int fsize, i; fp = fileopen(fname, "rb"); if (!fp) { staterr("tsc_decrypt: no such file: '%s'!", fname); return NULL; } fseek(fp, 0, SEEK_END); fsize = ftell(fp); fseek(fp, 0, SEEK_SET); // load file char *buf = (char *)malloc(fsize+1); fread(buf, fsize, 1, fp); buf[fsize] = 0; fclose(fp); // get decryption key, which is actually part of the text int keypos = (fsize / 2); int key = buf[keypos]; // everything EXCEPT the key is encrypted for(i=0;i tsc_compile bufsize = %d pageno = %d", bufsize, pageno); while(buf <= buf_end) { char ch = *(buf++); if (ch == '#') { // start of a scriptzz if (script) { script->Append8(OP_END); script = NULL; } int scriptno = ReadNumber(&buf, buf_end); if (scriptno >= 10000 || scriptno < 0) { staterr("tsc_compile: invalid script number: %d", scriptno); return 1; } // skip the CR after the script # while(buf < buf_end) { if (*buf != '\r' && *buf != '\n') break; buf++; } //stat("Parsing script #%04d", scriptno); if (page->scripts.get(scriptno)) { staterr("tsc_compile WARNING: duplicate script #%04d; ignoring", scriptno); // because script is left null, we'll ignore everything until we see another # } else { script = new DBuffer; page->scripts.put(scriptno, script); } } else if (ch == '<' && script) { // read the command type cmdbuf[0] = nextchar(&buf, buf_end); cmdbuf[1] = nextchar(&buf, buf_end); cmdbuf[2] = nextchar(&buf, buf_end); int cmd = MnemonicToOpcode(cmdbuf); if (cmd == -1) return 1; //stat("Command '%s', parameters %d", cmdbuf, cmd_table[cmd].nparams); script->Append8(cmd); // read all parameters expected by that command int nparams = cmd_table[cmd].nparams; for(int i=0;iAppend8(val >> 8); script->Append8(val & 0xff); // colon between params if (i < (nparams - 1)) buf++; } } else if (script) { // text for message boxes buf--; script->Append8(OP_TEXT); ReadText(script, &buf, buf_end); } } if (script) script->Append8(OP_END); return 0; } static char nextchar(const char **buf, const char *buf_end) { if (*buf <= buf_end) return *(*buf)++; return 0; } static int ReadNumber(const char **buf, const char *buf_end) { static char num[5] = { 0 }; int i = 0; while(i < 4) { num[i] = nextchar(buf, buf_end); if (!isdigit(num[i])) { (*buf)--; break; } i++; } return atoi(num); } static void ReadText(DBuffer *script, const char **buf, const char *buf_end) { while(*buf <= buf_end) { char ch = nextchar(buf, buf_end); if (ch == '<' || ch == '#') { (*buf)--; break; } if (ch != 10) script->Append8(ch); } script->Append8('\0'); } /* void c------------------------------() {} */ void RunScripts(void) { if (curscript.running) ExecScript(&curscript); } void StopScripts(void) { if (curscript.running) StopScript(&curscript); } int GetCurrentScript(void) { if (curscript.running) return curscript.scriptno; return -1; } ScriptInstance *GetCurrentScriptInstance() { if (curscript.running) return &curscript; return NULL; } /* void c------------------------------() {} */ // returns a pointer to the executable data/bytecode of the given script. // handles looking on head, etc. const uint8_t *FindScriptData(int scriptno, int pageno, int *page_out) { ScriptPage *page = &script_pages[pageno]; DBuffer *script; script = page->scripts.get(scriptno); if (!script) { if (pageno != SP_HEAD) { // try to find the script in head.tsc return FindScriptData(scriptno, SP_HEAD, page_out); } else { return NULL; } } if (page_out) *page_out = pageno; return script->Data(); } ScriptInstance *StartScript(int scriptno, int pageno) { const uint8_t *program; int found_pageno; program = FindScriptData(scriptno, pageno, &found_pageno); if (!program) { staterr("StartScript: no script at position #%04d page %d!", scriptno, pageno); return NULL; } // don't start regular map scripts (e.g. hvtrigger) if player is dead if (player->dead && found_pageno != SP_HEAD) { stat("Not starting script %d; player is dead", scriptno); return NULL; } // set the script memset(&curscript, 0, sizeof(ScriptInstance)); curscript.program = program; curscript.scriptno = scriptno; curscript.pageno = found_pageno; curscript.ynj_jump = -1; curscript.running = true; textbox.ResetState(); stat(" - Started script %04d", scriptno); RunScripts(); return &curscript; } void StopScript(ScriptInstance *s) { if (!s->running) return; s->running = false; stat(" - Stopped script %04d", s->scriptno); // TRA is really supposed to be a jump, not a script restart-- // in that in maintains KEY/PRI across the stage transition. // Emulate this by leaving the script state alone until the // on-entry script starts. player->inputs_locked = false; game.frozen = false; player->lookaway = false; textbox.ResetState(); } /* void c------------------------------() {} */ bool JumpScript(int newscriptno, int pageno) { ScriptInstance *s = &curscript; if (pageno == -1) pageno = s->pageno; stat("JumpScript: moving to script #%04d page %d", newscriptno, pageno); s->program = FindScriptData(newscriptno, pageno, &s->pageno); s->scriptno = newscriptno; s->ip = 0; if (!s->program) { staterr("JumpScript: missing script #%04d! Script terminated.", newscriptno); StopScript(s); return 1; } s->delaytimer = 0; s->waitforkey = false; s->wait_standing = false; // ynj_jump != -1) { if (textbox.YesNoPrompt.ResultReady()) { if (textbox.YesNoPrompt.GetResult() == NO) JumpScript(s->ynj_jump); textbox.YesNoPrompt.SetVisible(false); s->ynj_jump = -1; } else { // pause script until answer is receieved return; } } // pause script while text is still displaying if (textbox.IsBusy()) return; // pause while NOD is in effect if (s->waitforkey) { if (s->nod_delay) // used to pause during nod_delay--; } else { // if key was just pressed release nod. // check them separately to allow holding X while // tapping Z to keep text scrolling fast. if ((inputs[JUMPKEY] && !s->lastjump) || \ (inputs[FIREKEY] && !s->lastfire)) { // hide the fact that the key was just pushed // so player doesn't jump/fire stupidly when dismissing textboxes lastinputs[JUMPKEY] |= inputs[JUMPKEY]; lastinputs[FIREKEY] |= inputs[FIREKEY]; lastpinputs[JUMPKEY] |= inputs[JUMPKEY]; lastpinputs[FIREKEY] |= inputs[FIREKEY]; s->waitforkey = false; textbox.ShowCursor(false); } s->lastjump = inputs[JUMPKEY]; s->lastfire = inputs[FIREKEY]; } // if still on return if (s->waitforkey) return; } // pause scripts while WAI is in effect. // delaytimer) { if (s->delaytimer == 9999) { UnlockInventoryInput(); } else { s->delaytimer--; } return; } // pause while WAS (wait until standing) is in effect. if (s->wait_standing) { if (!player->blockd) return; s->wait_standing = false; } //stat("<> Entering script execution loop at ip = %d", s->ip); // main execution loop for(;;) { cmdip = s->ip++; cmd = s->program[cmdip]; mnemonic = (char *)cmd_table[cmd].mnemonic; if (cmd != OP_TEXT) { snprintf(debugbuffer, sizeof(debugbuffer), "%04x <%s ", cmd, mnemonic); for(i=0;iprogram[s->ip++]) << 8; val |= s->program[s->ip++]; parm[i] = val; snprintf(debugbuffer, sizeof(debugbuffer), "%s %04d", debugbuffer, val); } } #ifdef TRACE_SCRIPT else { char debugbuffer2[10000]; crtoslashn((char *)&s->program[s->ip], debugbuffer2); snprintf(debugbuffer, sizeof(debugbuffer), "TEXT '%s'", debugbuffer2); } if (cmd == OP_TEXT && !textbox.IsVisible() && !strcmp(debugbuffer, "TEXT '\n'")) { } else { stat("%04d:%d %s", s->scriptno, cmdip, debugbuffer); } #endif switch(cmd) { case OP_END: StopScript(s); return; case OP_FAI: fade.Start(FADE_IN, parm[0], SPR_FADE_DIAMOND); return; case OP_FAO: fade.Start(FADE_OUT, parm[0], SPR_FADE_DIAMOND); return; case OP_FLA: flashscreen.Start(); break; case OP_SOU: sound(parm[0]); break; case OP_CMU: music(parm[0]); break; case OP_RMU: music(music_lastsong()); break; case OP_FMU: org_fade(); break; case OP_SSS: StartStreamSound(parm[0]); break; case OP_SPS: StartPropSound(); break; case OP_CSS: // these seem identical-- either one will case OP_CPS: // in fact stop the other. { StopLoopSounds(); } break; // free menu selector in Inventory. It also undoes inputs_locked = false; UnlockInventoryInput(); } break; case OP_PRI: // freeze entire game (players + NPCs) { game.frozen = true; player->inputs_locked = false; statusbar.xpflashcount = 0; // looks odd if this happens after a long inputs_locked = true; } break; case OP_MOV: player->x = (parm[0] * TILE_W) << CSF; player->y = (parm[1] * TILE_H) << CSF; player->xinertia = player->yinertia = 0; player->lookaway = false; break; case OP_UNI: player->movementmode = parm[0]; map_scroll_lock(parm[0]); // locks on anything other than 0 break; case OP_MNA: // show map name (as used on entry) map_show_map_name(); break; case OP_MLP: // bring up Map System game.setmode(GM_MAP_SYSTEM, game.mode); break; case OP_TRA: { bool waslocked = (player->inputs_locked || game.frozen); stat("******* Executing inputs_locked = true; game.frozen = false; } } return; } break; case OP_AMPLUS: GetWeapon(parm[0], parm[1]); lastammoinc = parm[1]; break; case OP_AMMINUS: LoseWeapon(parm[0]); break; case OP_TAM: TradeWeapon(parm[0], parm[1], parm[2]); break; case OP_AMJ: JUMP_IF(player->weapons[parm[0]].hasWeapon); break; case OP_ZAM: // drop all weapons to level 1 { for(int i=0;iweapons[i].xp = 0; player->weapons[i].level = 0; } } break; case OP_EVE: JumpScript(parm[0]); break; // unconditional jump to event case OP_FLPLUS: game.flags[parm[0]] = 1; break; case OP_FLMINUS: game.flags[parm[0]] = 0; break; case OP_FLJ: JUMP_IF(game.flags[parm[0]]); break; case OP_ITPLUS: AddInventory(parm[0]); break; case OP_ITMINUS: DelInventory(parm[0]); break; case OP_ITJ: JUMP_IF((FindInventory(parm[0]) != -1)); break; // the PSelectSprite is a hack so when the Mimiga Mask is taken // it disappears immediately even though the game is in equipmask |= parm[0]; PSelectSprite(); break; case OP_EQMINUS: player->equipmask &= ~parm[0]; PSelectSprite(); break; case OP_SKPLUS: game.skipflags[parm[0]] = 1; break; case OP_SKMINUS: game.skipflags[parm[0]] = 0; break; case OP_SKJ: JUMP_IF(game.skipflags[parm[0]]); break; case OP_PSPLUS: textbox.StageSelect.SetSlot(parm[0], parm[1]); break; case OP_NCJ: JUMP_IF(CountObjectsOfType(parm[0]) > 0); break; case OP_ECJ: // unused but valid JUMP_IF(FindObjectByID2(parm[0])); break; // life capsule--add to max life case OP_MLPLUS: player->maxHealth += parm[0]; player->hp = player->maxHealth; break; case OP_FON: // focus on NPC { if ((o = FindObjectByID2(parm[0]))) { map_focus(o, parm[1]); } } break; case OP_FOB: // focus on boss { if (game.stageboss.object) map_focus(game.stageboss.object, parm[1]); else staterr("tsc: type == parm[0]) o->Delete(); o = o->next; } } break; case OP_ANP: NPCDo(parm[0], parm[1], parm[2], DoANP); break; case OP_CNP: NPCDo(parm[0], parm[1], parm[2], DoCNP); break; case OP_DNP: NPCDo(parm[0], parm[1], parm[2], DoDNP); break; case OP_MNP: // move object X to (Y,Z) with direction W if ((o = FindObjectByID2(parm[0]))) { SetCSDir(o, parm[3]); o->x = (parm[1] * TILE_W) << CSF; o->y = (parm[2] * TILE_H) << CSF; } break; case OP_BOA: // set boss state { game.stageboss.SetState(parm[0]); } break; case OP_BSL: // bring up boss bar { Object *target; if (parm[0] == 0) { // hp; game.bossbar.bar.displayed_value = target->hp; } else { staterr("Target of xinertia = 0; break; case OP_MYD: SetPDir(parm[0]); break; case OP_MYB: { player->lookaway = 0; player->yinertia = -0x200; int dir = parm[0]; if (dir >= 10) // bump away from the object in parm { o = FindObjectByID2(dir); if (o) { if (player->CenterX() > o->CenterX()) dir = 0; else dir = 2; } } if (dir == 0) { player->dir = LEFT; player->xinertia = 0x200; } else if (dir == 2) { player->dir = RIGHT; player->xinertia = -0x200; } } break; case OP_WAI: s->delaytimer = parm[0]; return; case OP_WAS: s->wait_standing = true; return; // wait until player has blockd case OP_SMP: map.tiles[parm[0]][parm[1]]--; break; case OP_CMP: // change map tile at x:y to z and create smoke { int x = parm[0]; int y = parm[1]; map.tiles[x][y] = parm[2]; // get smoke coords x = ((x * TILE_W) + (TILE_W / 2)) << CSF; y = ((y * TILE_H) + (TILE_H / 2)) << CSF; // when tiles are CMP'd during a PRI the smoke is not visible // until the game is released, so I came up with this scheme // to make that happen. See the "you see a button" destroyable // box on the 2nd level of Maze M. if (game.frozen) { o = CreateObject(x, y, OBJ_SMOKE_DROPPER); o->timer2 = 4; // amount of smoke } else { SmokeXY(x, y, 4, TILE_W/2, TILE_H/2); } } break; case OP_QUA: s->nod_delay = game.quaketime = parm[0]; break; case OP_LIPLUS: AddHealth(parm[0]); break; case OP_AEPLUS: RefillAllAmmo(); break; // refills missiles case OP_INI: game.switchstage.mapno = NEW_GAME; break; // restart game from beginning case OP_STC: niku_save(game.counter); break; case OP_SVP: { if (!settings->multisave) { if (!Replay::IsPlaying()) game_save(settings->last_save_slot); } else { textbox.SaveSelect.SetVisible(true, SS_SAVING); s->delaytimer = 9999; return; } } break; case OP_LDP: game.switchstage.mapno = LOAD_GAME; break; case OP_HMC: player->hide = true; break; case OP_SMC: player->hide = false; break; // --------------------------------------- case OP_MSG: // bring up text box { // required for post-Ballos cutscene textbox.SetFlags(TUR_PARAMS, false); textbox.SetVisible(true, TB_DEFAULTS); } break; case OP_MS2: // bring up text box, at top, with no border { textbox.SetFace(0); // required for Undead Core intro textbox.SetFlags(TUR_PARAMS, false); textbox.SetVisible(true, TB_DRAW_AT_TOP | TB_NO_BORDER); } break; case OP_MS3: // bring up text box, at top { textbox.SetFlags(TUR_PARAMS, false); textbox.SetVisible(true, TB_DRAW_AT_TOP); } break; case OP_CLO: // dismiss text box. textbox.SetVisible(false); textbox.ClearText(); // ...don't ResetState(), or it'll clear program[s->ip]; s->ip += (strlen(str) + 1); textbox.AddText(str); // must yield execution, because the message is busy now. // however, if the message contains only CR's, then we don't yield, // because CR's take no time to display. if (contains_non_cr(str)) { //stat("<> Pausing script execution to display message."); return; } /*else { stat("<> Message is only CR's, continuing script..."); }*/ } break; case OP_CLR: // erase all text in box textbox.ClearText(); break; case OP_FAC: // set and slide in given character face textbox.SetFace(parm[0]); break; case OP_NOD: // pause till user presses key { if (textbox.IsVisible()) { s->waitforkey = true; // pause exec till key pressed // don't release immediately if keys already down s->lastjump = true; s->lastfire = true; textbox.ShowCursor(true); } } return; case OP_YNJ: // prompt Yes or No and jump to given script if No { textbox.YesNoPrompt.SetVisible(true); s->ynj_jump = parm[0]; return; } break; case OP_SAT: // disables typing animation case OP_CAT: // unused synonym { textbox.SetFlags(TB_LINE_AT_ONCE | TB_CURSOR_NEVER_SHOWN, true); } break; case OP_TUR: // set text mode to that used for signs { textbox.SetFlags(TUR_PARAMS, true); textbox.SetCanSpeedUp(false); } break; case OP_GIT: // show item graphic { if (parm[0] != 0) { int sprite, frame; if (parm[0] >= 1000) { // an item sprite = SPR_ITEMIMAGE; frame = (parm[0] - 1000); } else { // a weapon sprite = SPR_ARMSICONS; frame = parm[0]; } textbox.ItemImage.SetSprite(sprite, frame); textbox.ItemImage.SetVisible(true); } else { textbox.ItemImage.SetVisible(false); } } break; case OP_NUM: { // seems to show the last value that was used with "AM+" char buf[16]; sprintf(buf, "%d", lastammoinc); textbox.AddText(buf); } break; case OP_SLP: // bring up teleporter menu { textbox.StageSelect.SetVisible(true); return; } break; case OP_ESC: { StopScript(s); game.reset(); } break; // --------------------------------------- // trigger island-falling cinematic // if the parameter is 0, the island crashes (good ending); // if the parameter is 1, the island survives (best ending) case OP_XX1: { game.setmode(GM_ISLAND, parm[0]); return; } break; case OP_CRE: { game.setmode(GM_CREDITS); return; } break; case OP_SIL: credit_set_image(parm[0]); break; case OP_CIL: credit_clear_image(); break; default: { if (cmd < OP_COUNT) console.Print("- unimplemented opcode %s; script %04d halted.", cmd_table[cmd].mnemonic, s->scriptno); else console.Print("- unimplemented opcode %02x; script %04d halted.", cmd, s->scriptno); StopScript(s); return; } } } } /* void c------------------------------() {} */ int CVTDir(int csdir) { const int cdir_to_nxdir[4] = { LEFT, UP, RIGHT, DOWN }; if (csdir >= 0 && csdir < 4) return cdir_to_nxdir[csdir]; staterr("CVTDir: invalid direction %d, returning LEFT", csdir); return LEFT; } const char *DescribeCSDir(int csdir) { switch(csdir) { case 0: return "LEFT"; case 1: return "UP"; case 2: return "RIGHT"; case 3: return "DOWN"; case 4: return "FACE_PLAYER"; case 5: return "NO_CHANGE"; default: return stprintf("Invalid CS Dir %d", csdir); } } // converts from a CS direction (0123 = left,up,right,down) // into a NXEngine direction (0123 = right,left,up,down), // and applies the converted direction to the object. void SetCSDir(Object *o, int csdir) { if (csdir < 4) { o->dir = CVTDir(csdir); } else if (csdir == 4) { // face towards player o->dir = (o->x >= player->x) ? LEFT : RIGHT; } else if (csdir == 5) { // no-change, used with e.g. ANP } else { staterr("SetCSDir: warning: invalid direction %04d passed as dirparam only", csdir); } // a few late-game objects, such as statues in the statue room, // use ANP/CNP's direction parameter as an extra generic parameter // to the object. I didn't feel it was safe to set a dir of say 200 // in our engine as it may cause crashes somewhere if the sprite was // ever tried to be drawn using that dir. There's also the complication // that we're about to munge the requested values since our direction // constants don't have the same numerical values as CS's engine. // So is dirparam holds the raw value of the last dir that a script // tried to set. o->dirparam = csdir; } void SetPDir(int d) { if (d == 3) { // look away player->lookaway = 1; } else { player->lookaway = 0; if (d < 10) { // set direction - left/right/up/down SetCSDir(player, d); } else { // face the object in parm Object *o; if ((o = FindObjectByID2(d))) { player->dir = (player->x > o->x) ? LEFT:RIGHT; } } } player->xinertia = 0; PSelectFrame(); } /* void c------------------------------() {} */ // call action_function on all NPCs with id2 matching "id2". void NPCDo(int id2, int p1, int p2, void (*action_function)(Object *o, int p1, int p2)) { // make a list first, as during id2 == id2 && o != player) { if (numhits < MAX_OBJECTS) hits[numhits++] = o; } } for(int i=0;itype), p1, DescribeCSDir(p2)); #endif o->state = p1; SetCSDir(o, p2); } void DoCNP(Object *o, int p1, int p2) // CHANGE object to p1 and set dir to p2 { #ifdef TRACE_SCRIPT stat("CNP: Obj %08x changing from %s to %s, new dir = %s", o, DescribeObjectType(o->type), DescribeObjectType(p1), DescribeCSDir(p2)); #endif // Must set direction BEFORE changing type, so that the Carried Puppy object // gets priority over the direction to use while the game is ChangeType(p1); } void DoDNP(Object *o, int p1, int p2) // DELETE object { #ifdef TRACE_SCRIPT stat("DNP: %08x (%s) deleted", o, DescribeObjectType(o->type)); #endif o->Delete(); } /* void c------------------------------() {} */ // delimit real newlines in 'in' to "\n"'s. void crtoslashn(const char *in, char *out) { int i, j; for(i=j=0;in[i];i++) { if (in[i] == 13) { out[j++] = '\\'; out[j++] = 'n'; } else { out[j++] = in[i]; } } out[j] = 0; } bool contains_non_cr(const char *str) { for(int i=0;str[i];i++) { if (str[i] != '\r' && str[i] != '\n') return true; } return false; } ================================================ FILE: tsc.fdh ================================================ //hash:a5b57e94 //automatically generated by Makegen /* located in game.cpp */ //----------------------[referenced from tsc.cpp]--------------------// bool game_save(Profile *p); /* located in ObjManager.cpp */ //----------------------[referenced from tsc.cpp]--------------------// Object *CreateObject(int x, int y, int type); /* located in map.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void map_scroll_lock(bool lockstate); void map_show_map_name(); Object *FindObjectByID2(int id2); void map_focus(Object *o, int spd); /* located in platform.cpp */ //----------------------[referenced from tsc.cpp]--------------------// FILE *fileopen(const char *fname, const char *mode); /* located in player.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void PSelectSprite(void); void PSelectFrame(void); /* located in playerstats.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void GetWeapon(int wpn, int ammo); void LoseWeapon(int wpn); void TradeWeapon(int oldwpn, int newwpn, int ammo); void AddInventory(int item); void DelInventory(int item); int FindInventory(int item); void AddHealth(int hp); void RefillAllAmmo(void); /* located in tsc.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void Clear(); static void GenLTC(void); static int MnemonicToIndex(const char *str); static int MnemonicToOpcode(char *str); bool tsc_init(void); void tsc_close(void); bool tsc_load(const char *fname, int pageno); char *tsc_decrypt(const char *fname, int *fsize_out); bool tsc_compile(const char *buf, int bufsize, int pageno); static char nextchar(const char **buf, const char *buf_end); static int ReadNumber(const char **buf, const char *buf_end); static void ReadText(DBuffer *script, const char **buf, const char *buf_end); void RunScripts(void); void StopScripts(void); int GetCurrentScript(void); ScriptInstance *GetCurrentScriptInstance(); const uint8_t *FindScriptData(int scriptno, int pageno, int *page_out); ScriptInstance *StartScript(int scriptno, int pageno); void StopScript(ScriptInstance *s); bool JumpScript(int newscriptno, int pageno); void ExecScript(ScriptInstance *s); int CVTDir(int csdir); const char *DescribeCSDir(int csdir); void SetCSDir(Object *o, int csdir); void SetPDir(int d); void NPCDo(int id2, int p1, int p2, void (*action_function)(Object *o, int p1, int p2)); void DoANP(Object *o, int p1, int p2); void DoCNP(Object *o, int p1, int p2); void DoDNP(Object *o, int p1, int p2); void crtoslashn(const char *in, char *out); bool contains_non_cr(const char *str); /* located in inventory.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void UnlockInventoryInput(void); /* located in debug.cpp */ //----------------------[referenced from tsc.cpp]--------------------// const char *DescribeObjectType(int type); /* located in niku.cpp */ //----------------------[referenced from tsc.cpp]--------------------// bool niku_save(uint32_t value); /* located in ai/sym/smoke.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void SmokeXY(int x, int y, int nclouds, int rangex, int rangey, Object *push_behind); /* located in endgame/credits.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void credit_set_image(int imgno); void credit_clear_image(); /* located in sound/sound.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void sound(int snd); void music(int songno); int music_lastsong(); void StartStreamSound(int freq); void StartPropSound(void); void StopLoopSounds(void); /* located in sound/org.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void org_fade(void); /* located in common/stat.cpp */ //----------------------[referenced from tsc.cpp]--------------------// void staterr(const char *fmt, ...); void stat(const char *fmt, ...); /* located in common/misc.cpp */ //----------------------[referenced from tsc.cpp]--------------------// char *stprintf(const char *fmt, ...); ================================================ FILE: tsc.h ================================================ #ifndef _TSC_H #define _TSC_H // TSC running script instance; there is only ever one running at once // but I generalized it as if there might be more just for good style. struct ScriptInstance { const uint8_t *program; // compiled script code uint32_t ip; // instruction pointer bool running; int scriptno; // script # of active script int pageno; // ScriptPage/namespace # script is in int delaytimer; // time left on a template class VarArray { public: VarArray() { nitems = 0; items = NULL; } ~VarArray() { if (items) free(items); } // retrieves the item at index. if index is outside // the bounds of the array, returns 0/null. T get(int index) { if (index < 0 || index >= nitems) return (T)0; return items[index]; } // put an item into the array at index. // if index is past the end of the array, the array is expanded. void put(int index, T value) { if (index >= 0) { EnsureAlloc(index + 1); items[index] = value; } } // make sure the array is big enough to contain up to allocnum items. // any unused items are initilized to 0/null. void EnsureAlloc(int allocnum) { if (allocnum > nitems) { if (items == NULL) items = (T *)malloc(sizeof(T) * allocnum); else items = (T *)realloc(items, (sizeof(T) * allocnum)); memset(&items[nitems], 0, ((allocnum - nitems) * sizeof(T))); nitems = allocnum; } } // convenience function to access it like an array. // however unlike put(), you cannot use it to expand the array-- // if you try to use it to write outside the bounds of the array, // the value will simply be lost. T& operator[] (const int index) { if (index < 0 || index >= nitems) { static T ZERO_T; memset(&ZERO_T, 0, sizeof(T)); return ZERO_T; } return items[index]; } // set the size of the array to 0 items. void MakeEmpty() { if (items) { free(items); items = NULL; } nitems = 0; } int nitems; private: T *items; }; #endif ================================================ FILE: xm/README_XM_MUSIC_DATA ================================================ Please download "*.xm"-music archive here: http://cloud.z-lab.me/public.php?service=files&t=13c2848f4959e54d68d97115f0b7ff27&download And unpack files into "xm" dir: mkdir xm && cd xm unzip ../xm.zip