From fa3888422fc58949fe64d1e9f8efe1db083c1fe1 Mon Sep 17 00:00:00 2001 From: jlew Date: Thu, 21 Oct 2010 15:47:29 +0000 Subject: Moved FortuneEngine to sub module --- diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..aa44bfb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "MAFH2/fortuneengine"] + path = MAFH2/fortuneengine + url = git://git.fedorahosted.org/FortuneEngine.git diff --git a/MAFH2/fortuneengine b/MAFH2/fortuneengine new file mode 160000 +Subproject 724c337f51bb3cc39ee22198b8ba4c90e48ae4c diff --git a/MAFH2/fortuneengine/LICENSE.txt b/MAFH2/fortuneengine/LICENSE.txt deleted file mode 100644 index 94a9ed0..0000000 --- a/MAFH2/fortuneengine/LICENSE.txt +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/MAFH2/fortuneengine/docs/epydoc/api-objects.txt b/MAFH2/fortuneengine/docs/epydoc/api-objects.txt deleted file mode 100644 index acfc998..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/api-objects.txt +++ /dev/null @@ -1,503 +0,0 @@ -fortuneengine fortuneengine-module.html -fortuneengine.__package__ fortuneengine-module.html#__package__ -fortuneengine.DrawableFontObject fortuneengine.DrawableFontObject-module.html -fortuneengine.DrawableFontObject.__package__ fortuneengine.DrawableFontObject-module.html#__package__ -fortuneengine.DrawableObject fortuneengine.DrawableObject-module.html -fortuneengine.DrawableObject.__package__ fortuneengine.DrawableObject-module.html#__package__ -fortuneengine.DynamicDrawableObject fortuneengine.DynamicDrawableObject-module.html -fortuneengine.DynamicDrawableObject.__package__ fortuneengine.DynamicDrawableObject-module.html#__package__ -fortuneengine.GameEngine fortuneengine.GameEngine-module.html -fortuneengine.GameEngine.__package__ fortuneengine.GameEngine-module.html#__package__ -fortuneengine.GameEngineConsole fortuneengine.GameEngineConsole-module.html -fortuneengine.GameEngineConsole.__package__ fortuneengine.GameEngineConsole-module.html#__package__ -fortuneengine.GameEngineElement fortuneengine.GameEngineElement-module.html -fortuneengine.GameEngineElement.__package__ fortuneengine.GameEngineElement-module.html#__package__ -fortuneengine.GameInspect fortuneengine.GameInspect-module.html -fortuneengine.GameInspect.__package__ fortuneengine.GameInspect-module.html#__package__ -fortuneengine.Scene fortuneengine.Scene-module.html -fortuneengine.Scene.__package__ fortuneengine.Scene-module.html#__package__ -fortuneengine.pyconsole fortuneengine.pyconsole-module.html -fortuneengine.pyconsole.__package__ fortuneengine.pyconsole-module.html#__package__ -fortuneengine.pyconsole.pyconsole fortuneengine.pyconsole.pyconsole-module.html -fortuneengine.pyconsole.pyconsole.K_KP_MINUS fortuneengine.pyconsole.pyconsole-module.html#K_KP_MINUS -fortuneengine.pyconsole.pyconsole.GL_STEREO fortuneengine.pyconsole.pyconsole-module.html#GL_STEREO -fortuneengine.pyconsole.pyconsole.K_F2 fortuneengine.pyconsole.pyconsole-module.html#K_F2 -fortuneengine.pyconsole.pyconsole.K_F3 fortuneengine.pyconsole.pyconsole-module.html#K_F3 -fortuneengine.pyconsole.pyconsole.BLEND_MULT fortuneengine.pyconsole.pyconsole-module.html#BLEND_MULT -fortuneengine.pyconsole.pyconsole.K_F5 fortuneengine.pyconsole.pyconsole-module.html#K_F5 -fortuneengine.pyconsole.pyconsole.K_F6 fortuneengine.pyconsole.pyconsole-module.html#K_F6 -fortuneengine.pyconsole.pyconsole.K_F1 fortuneengine.pyconsole.pyconsole-module.html#K_F1 -fortuneengine.pyconsole.pyconsole.K_F8 fortuneengine.pyconsole.pyconsole-module.html#K_F8 -fortuneengine.pyconsole.pyconsole.K_F9 fortuneengine.pyconsole.pyconsole-module.html#K_F9 -fortuneengine.pyconsole.pyconsole.K_2 fortuneengine.pyconsole.pyconsole-module.html#K_2 -fortuneengine.pyconsole.pyconsole.K_COMMA fortuneengine.pyconsole.pyconsole-module.html#K_COMMA -fortuneengine.pyconsole.pyconsole.SCRAP_PPM fortuneengine.pyconsole.pyconsole-module.html#SCRAP_PPM -fortuneengine.pyconsole.pyconsole.WIDTH fortuneengine.pyconsole.pyconsole-module.html#WIDTH -fortuneengine.pyconsole.pyconsole.BLEND_RGBA_MAX fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGBA_MAX -fortuneengine.pyconsole.pyconsole.KMOD_RALT fortuneengine.pyconsole.pyconsole-module.html#KMOD_RALT -fortuneengine.pyconsole.pyconsole.__package__ fortuneengine.pyconsole.pyconsole-module.html#__package__ -fortuneengine.pyconsole.pyconsole.BLEND_RGBA_MIN fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGBA_MIN -fortuneengine.pyconsole.pyconsole.GL_GREEN_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_GREEN_SIZE -fortuneengine.pyconsole.pyconsole.KMOD_NONE fortuneengine.pyconsole.pyconsole-module.html#KMOD_NONE -fortuneengine.pyconsole.pyconsole.K_AMPERSAND fortuneengine.pyconsole.pyconsole-module.html#K_AMPERSAND -fortuneengine.pyconsole.pyconsole.K_n fortuneengine.pyconsole.pyconsole-module.html#K_n -fortuneengine.pyconsole.pyconsole.KMOD_LCTRL fortuneengine.pyconsole.pyconsole-module.html#KMOD_LCTRL -fortuneengine.pyconsole.pyconsole.K_CLEAR fortuneengine.pyconsole.pyconsole-module.html#K_CLEAR -fortuneengine.pyconsole.pyconsole.HAT_LEFTUP fortuneengine.pyconsole.pyconsole-module.html#HAT_LEFTUP -fortuneengine.pyconsole.pyconsole.K_F7 fortuneengine.pyconsole.pyconsole-module.html#K_F7 -fortuneengine.pyconsole.pyconsole.KMOD_META fortuneengine.pyconsole.pyconsole-module.html#KMOD_META -fortuneengine.pyconsole.pyconsole.TIMER_RESOLUTION fortuneengine.pyconsole.pyconsole-module.html#TIMER_RESOLUTION -fortuneengine.pyconsole.pyconsole.HWPALETTE fortuneengine.pyconsole.pyconsole-module.html#HWPALETTE -fortuneengine.pyconsole.pyconsole.KMOD_CAPS fortuneengine.pyconsole.pyconsole-module.html#KMOD_CAPS -fortuneengine.pyconsole.pyconsole.re_is_number fortuneengine.pyconsole.pyconsole-module.html#re_is_number -fortuneengine.pyconsole.pyconsole.SCRAP_PBM fortuneengine.pyconsole.pyconsole-module.html#SCRAP_PBM -fortuneengine.pyconsole.pyconsole.font_path fortuneengine.pyconsole.pyconsole-module.html#font_path -fortuneengine.pyconsole.pyconsole.AUDIO_U8 fortuneengine.pyconsole.pyconsole-module.html#AUDIO_U8 -fortuneengine.pyconsole.pyconsole.SCRAP_CLIPBOARD fortuneengine.pyconsole.pyconsole-module.html#SCRAP_CLIPBOARD -fortuneengine.pyconsole.pyconsole.GL_BUFFER_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_BUFFER_SIZE -fortuneengine.pyconsole.pyconsole.AUDIO_U16 fortuneengine.pyconsole.pyconsole-module.html#AUDIO_U16 -fortuneengine.pyconsole.pyconsole.K_SPACE fortuneengine.pyconsole.pyconsole-module.html#K_SPACE -fortuneengine.pyconsole.pyconsole.BLEND_RGB_MULT fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGB_MULT -fortuneengine.pyconsole.pyconsole.MOUSEMOTION fortuneengine.pyconsole.pyconsole-module.html#MOUSEMOTION -fortuneengine.pyconsole.pyconsole.K_INSERT fortuneengine.pyconsole.pyconsole-module.html#K_INSERT -fortuneengine.pyconsole.pyconsole.GL_ACCUM_GREEN_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_ACCUM_GREEN_SIZE -fortuneengine.pyconsole.pyconsole.K_HOME fortuneengine.pyconsole.pyconsole-module.html#K_HOME -fortuneengine.pyconsole.pyconsole.GL_ACCUM_RED_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_ACCUM_RED_SIZE -fortuneengine.pyconsole.pyconsole.K_LSUPER fortuneengine.pyconsole.pyconsole-module.html#K_LSUPER -fortuneengine.pyconsole.pyconsole.re_token fortuneengine.pyconsole.pyconsole-module.html#re_token -fortuneengine.pyconsole.pyconsole.K_KP_DIVIDE fortuneengine.pyconsole.pyconsole-module.html#K_KP_DIVIDE -fortuneengine.pyconsole.pyconsole.BLEND_RGB_MAX fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGB_MAX -fortuneengine.pyconsole.pyconsole.BLEND_RGB_MIN fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGB_MIN -fortuneengine.pyconsole.pyconsole.SCRAP_SELECTION fortuneengine.pyconsole.pyconsole-module.html#SCRAP_SELECTION -fortuneengine.pyconsole.pyconsole.GL_RED_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_RED_SIZE -fortuneengine.pyconsole.pyconsole.HAT_RIGHT fortuneengine.pyconsole.pyconsole-module.html#HAT_RIGHT -fortuneengine.pyconsole.pyconsole.HWACCEL fortuneengine.pyconsole.pyconsole-module.html#HWACCEL -fortuneengine.pyconsole.pyconsole.K_GREATER fortuneengine.pyconsole.pyconsole-module.html#K_GREATER -fortuneengine.pyconsole.pyconsole.HAT_DOWN fortuneengine.pyconsole.pyconsole-module.html#HAT_DOWN -fortuneengine.pyconsole.pyconsole.K_FIRST fortuneengine.pyconsole.pyconsole-module.html#K_FIRST -fortuneengine.pyconsole.pyconsole.K_KP_PERIOD fortuneengine.pyconsole.pyconsole-module.html#K_KP_PERIOD -fortuneengine.pyconsole.pyconsole.K_RALT fortuneengine.pyconsole.pyconsole-module.html#K_RALT -fortuneengine.pyconsole.pyconsole.YV12_OVERLAY fortuneengine.pyconsole.pyconsole-module.html#YV12_OVERLAY -fortuneengine.pyconsole.pyconsole.K_RIGHTBRACKET fortuneengine.pyconsole.pyconsole-module.html#K_RIGHTBRACKET -fortuneengine.pyconsole.pyconsole.K_RSHIFT fortuneengine.pyconsole.pyconsole-module.html#K_RSHIFT -fortuneengine.pyconsole.pyconsole.K_LSHIFT fortuneengine.pyconsole.pyconsole-module.html#K_LSHIFT -fortuneengine.pyconsole.pyconsole.K_LEFTPAREN fortuneengine.pyconsole.pyconsole-module.html#K_LEFTPAREN -fortuneengine.pyconsole.pyconsole.JOYBALLMOTION fortuneengine.pyconsole.pyconsole-module.html#JOYBALLMOTION -fortuneengine.pyconsole.pyconsole.K_LAST fortuneengine.pyconsole.pyconsole-module.html#K_LAST -fortuneengine.pyconsole.pyconsole.BLEND_RGBA_SUB fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGBA_SUB -fortuneengine.pyconsole.pyconsole.K_DOLLAR fortuneengine.pyconsole.pyconsole-module.html#K_DOLLAR -fortuneengine.pyconsole.pyconsole.K_KP_ENTER fortuneengine.pyconsole.pyconsole-module.html#K_KP_ENTER -fortuneengine.pyconsole.pyconsole.K_PAGEDOWN fortuneengine.pyconsole.pyconsole-module.html#K_PAGEDOWN -fortuneengine.pyconsole.pyconsole.K_HASH fortuneengine.pyconsole.pyconsole-module.html#K_HASH -fortuneengine.pyconsole.pyconsole.VIDEORESIZE fortuneengine.pyconsole.pyconsole-module.html#VIDEORESIZE -fortuneengine.pyconsole.pyconsole.K_DOWN fortuneengine.pyconsole.pyconsole-module.html#K_DOWN -fortuneengine.pyconsole.pyconsole.JOYAXISMOTION fortuneengine.pyconsole.pyconsole-module.html#JOYAXISMOTION -fortuneengine.pyconsole.pyconsole.K_END fortuneengine.pyconsole.pyconsole-module.html#K_END -fortuneengine.pyconsole.pyconsole.HAT_LEFT fortuneengine.pyconsole.pyconsole-module.html#HAT_LEFT -fortuneengine.pyconsole.pyconsole.GL_DEPTH_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_DEPTH_SIZE -fortuneengine.pyconsole.pyconsole.UYVY_OVERLAY fortuneengine.pyconsole.pyconsole-module.html#UYVY_OVERLAY -fortuneengine.pyconsole.pyconsole.K_ASTERISK fortuneengine.pyconsole.pyconsole-module.html#K_ASTERISK -fortuneengine.pyconsole.pyconsole.AUDIO_S8 fortuneengine.pyconsole.pyconsole-module.html#AUDIO_S8 -fortuneengine.pyconsole.pyconsole.RESIZABLE fortuneengine.pyconsole.pyconsole-module.html#RESIZABLE -fortuneengine.pyconsole.pyconsole.BLEND_MAX fortuneengine.pyconsole.pyconsole-module.html#BLEND_MAX -fortuneengine.pyconsole.pyconsole.path fortuneengine.pyconsole.pyconsole-module.html#path -fortuneengine.pyconsole.pyconsole.K_LCTRL fortuneengine.pyconsole.pyconsole-module.html#K_LCTRL -fortuneengine.pyconsole.pyconsole.KMOD_NUM fortuneengine.pyconsole.pyconsole-module.html#KMOD_NUM -fortuneengine.pyconsole.pyconsole.K_PAUSE fortuneengine.pyconsole.pyconsole-module.html#K_PAUSE -fortuneengine.pyconsole.pyconsole.K_BACKSLASH fortuneengine.pyconsole.pyconsole-module.html#K_BACKSLASH -fortuneengine.pyconsole.pyconsole.AUDIO_U16LSB fortuneengine.pyconsole.pyconsole-module.html#AUDIO_U16LSB -fortuneengine.pyconsole.pyconsole.K_MINUS fortuneengine.pyconsole.pyconsole-module.html#K_MINUS -fortuneengine.pyconsole.pyconsole.K_HELP fortuneengine.pyconsole.pyconsole-module.html#K_HELP -fortuneengine.pyconsole.pyconsole.SWSURFACE fortuneengine.pyconsole.pyconsole-module.html#SWSURFACE -fortuneengine.pyconsole.pyconsole.SCRAP_TEXT fortuneengine.pyconsole.pyconsole-module.html#SCRAP_TEXT -fortuneengine.pyconsole.pyconsole.K_r fortuneengine.pyconsole.pyconsole-module.html#K_r -fortuneengine.pyconsole.pyconsole.K_q fortuneengine.pyconsole.pyconsole-module.html#K_q -fortuneengine.pyconsole.pyconsole.SYSWMEVENT fortuneengine.pyconsole.pyconsole-module.html#SYSWMEVENT -fortuneengine.pyconsole.pyconsole.K_EXCLAIM fortuneengine.pyconsole.pyconsole-module.html#K_EXCLAIM -fortuneengine.pyconsole.pyconsole.KMOD_LSHIFT fortuneengine.pyconsole.pyconsole-module.html#KMOD_LSHIFT -fortuneengine.pyconsole.pyconsole.KMOD_ALT fortuneengine.pyconsole.pyconsole-module.html#KMOD_ALT -fortuneengine.pyconsole.pyconsole.K_BREAK fortuneengine.pyconsole.pyconsole-module.html#K_BREAK -fortuneengine.pyconsole.pyconsole.NOEVENT fortuneengine.pyconsole.pyconsole-module.html#NOEVENT -fortuneengine.pyconsole.pyconsole.BLEND_ADD fortuneengine.pyconsole.pyconsole-module.html#BLEND_ADD -fortuneengine.pyconsole.pyconsole.K_POWER fortuneengine.pyconsole.pyconsole-module.html#K_POWER -fortuneengine.pyconsole.pyconsole.K_ESCAPE fortuneengine.pyconsole.pyconsole-module.html#K_ESCAPE -fortuneengine.pyconsole.pyconsole.K_BACKSPACE fortuneengine.pyconsole.pyconsole-module.html#K_BACKSPACE -fortuneengine.pyconsole.pyconsole.K_MENU fortuneengine.pyconsole.pyconsole-module.html#K_MENU -fortuneengine.pyconsole.pyconsole.K_6 fortuneengine.pyconsole.pyconsole-module.html#K_6 -fortuneengine.pyconsole.pyconsole.K_UNDERSCORE fortuneengine.pyconsole.pyconsole-module.html#K_UNDERSCORE -fortuneengine.pyconsole.pyconsole.FULLSCREEN fortuneengine.pyconsole.pyconsole-module.html#FULLSCREEN -fortuneengine.pyconsole.pyconsole.PYTHON fortuneengine.pyconsole.pyconsole-module.html#PYTHON -fortuneengine.pyconsole.pyconsole.JOYHATMOTION fortuneengine.pyconsole.pyconsole-module.html#JOYHATMOTION -fortuneengine.pyconsole.pyconsole.SRCALPHA fortuneengine.pyconsole.pyconsole-module.html#SRCALPHA -fortuneengine.pyconsole.pyconsole.SRCCOLORKEY fortuneengine.pyconsole.pyconsole-module.html#SRCCOLORKEY -fortuneengine.pyconsole.pyconsole.K_QUOTEDBL fortuneengine.pyconsole.pyconsole-module.html#K_QUOTEDBL -fortuneengine.pyconsole.pyconsole.K_KP_MULTIPLY fortuneengine.pyconsole.pyconsole-module.html#K_KP_MULTIPLY -fortuneengine.pyconsole.pyconsole.RLEACCEL fortuneengine.pyconsole.pyconsole-module.html#RLEACCEL -fortuneengine.pyconsole.pyconsole.K_COLON fortuneengine.pyconsole.pyconsole-module.html#K_COLON -fortuneengine.pyconsole.pyconsole.GL_SWAP_CONTROL fortuneengine.pyconsole.pyconsole-module.html#GL_SWAP_CONTROL -fortuneengine.pyconsole.pyconsole.KMOD_LMETA fortuneengine.pyconsole.pyconsole-module.html#KMOD_LMETA -fortuneengine.pyconsole.pyconsole.GL_DOUBLEBUFFER fortuneengine.pyconsole.pyconsole-module.html#GL_DOUBLEBUFFER -fortuneengine.pyconsole.pyconsole.ASYNCBLIT fortuneengine.pyconsole.pyconsole-module.html#ASYNCBLIT -fortuneengine.pyconsole.pyconsole.K_t fortuneengine.pyconsole.pyconsole-module.html#K_t -fortuneengine.pyconsole.pyconsole.HAT_LEFTDOWN fortuneengine.pyconsole.pyconsole-module.html#HAT_LEFTDOWN -fortuneengine.pyconsole.pyconsole.VIDEOEXPOSE fortuneengine.pyconsole.pyconsole-module.html#VIDEOEXPOSE -fortuneengine.pyconsole.pyconsole.K_LALT fortuneengine.pyconsole.pyconsole-module.html#K_LALT -fortuneengine.pyconsole.pyconsole.KMOD_LALT fortuneengine.pyconsole.pyconsole-module.html#KMOD_LALT -fortuneengine.pyconsole.pyconsole.K_KP_PLUS fortuneengine.pyconsole.pyconsole-module.html#K_KP_PLUS -fortuneengine.pyconsole.pyconsole.K_NUMLOCK fortuneengine.pyconsole.pyconsole-module.html#K_NUMLOCK -fortuneengine.pyconsole.pyconsole.K_x fortuneengine.pyconsole.pyconsole-module.html#K_x -fortuneengine.pyconsole.pyconsole.K_RMETA fortuneengine.pyconsole.pyconsole-module.html#K_RMETA -fortuneengine.pyconsole.pyconsole.K_QUESTION fortuneengine.pyconsole.pyconsole-module.html#K_QUESTION -fortuneengine.pyconsole.pyconsole.K_LEFT fortuneengine.pyconsole.pyconsole-module.html#K_LEFT -fortuneengine.pyconsole.pyconsole.K_RIGHT fortuneengine.pyconsole.pyconsole-module.html#K_RIGHT -fortuneengine.pyconsole.pyconsole.AUDIO_S16 fortuneengine.pyconsole.pyconsole-module.html#AUDIO_S16 -fortuneengine.pyconsole.pyconsole.GL_ALPHA_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_ALPHA_SIZE -fortuneengine.pyconsole.pyconsole.K_z fortuneengine.pyconsole.pyconsole-module.html#K_z -fortuneengine.pyconsole.pyconsole.HWSURFACE fortuneengine.pyconsole.pyconsole-module.html#HWSURFACE -fortuneengine.pyconsole.pyconsole.K_SYSREQ fortuneengine.pyconsole.pyconsole-module.html#K_SYSREQ -fortuneengine.pyconsole.pyconsole.balanced fortuneengine.pyconsole.pyconsole-module.html#balanced -fortuneengine.pyconsole.pyconsole.NOFRAME fortuneengine.pyconsole.pyconsole-module.html#NOFRAME -fortuneengine.pyconsole.pyconsole.AUDIO_S16LSB fortuneengine.pyconsole.pyconsole-module.html#AUDIO_S16LSB -fortuneengine.pyconsole.pyconsole.K_SEMICOLON fortuneengine.pyconsole.pyconsole-module.html#K_SEMICOLON -fortuneengine.pyconsole.pyconsole.BLEND_RGBA_ADD fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGBA_ADD -fortuneengine.pyconsole.pyconsole.KMOD_RMETA fortuneengine.pyconsole.pyconsole-module.html#KMOD_RMETA -fortuneengine.pyconsole.pyconsole.HAT_RIGHTDOWN fortuneengine.pyconsole.pyconsole-module.html#HAT_RIGHTDOWN -fortuneengine.pyconsole.pyconsole.K_UNKNOWN fortuneengine.pyconsole.pyconsole-module.html#K_UNKNOWN -fortuneengine.pyconsole.pyconsole.KMOD_MODE fortuneengine.pyconsole.pyconsole-module.html#KMOD_MODE -fortuneengine.pyconsole.pyconsole.BLEND_RGB_ADD fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGB_ADD -fortuneengine.pyconsole.pyconsole.HAT_CENTERED fortuneengine.pyconsole.pyconsole-module.html#HAT_CENTERED -fortuneengine.pyconsole.pyconsole.GL_MULTISAMPLESAMPLES fortuneengine.pyconsole.pyconsole-module.html#GL_MULTISAMPLESAMPLES -fortuneengine.pyconsole.pyconsole.GL_BLUE_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_BLUE_SIZE -fortuneengine.pyconsole.pyconsole.GL_ACCELERATED_VISUAL fortuneengine.pyconsole.pyconsole-module.html#GL_ACCELERATED_VISUAL -fortuneengine.pyconsole.pyconsole.cfg_path fortuneengine.pyconsole.pyconsole-module.html#cfg_path -fortuneengine.pyconsole.pyconsole.K_EURO fortuneengine.pyconsole.pyconsole-module.html#K_EURO -fortuneengine.pyconsole.pyconsole.KMOD_CTRL fortuneengine.pyconsole.pyconsole-module.html#KMOD_CTRL -fortuneengine.pyconsole.pyconsole.MOUSEBUTTONUP fortuneengine.pyconsole.pyconsole-module.html#MOUSEBUTTONUP -fortuneengine.pyconsole.pyconsole.K_PERIOD fortuneengine.pyconsole.pyconsole-module.html#K_PERIOD -fortuneengine.pyconsole.pyconsole.BLEND_SUB fortuneengine.pyconsole.pyconsole-module.html#BLEND_SUB -fortuneengine.pyconsole.pyconsole.re_is_var fortuneengine.pyconsole.pyconsole-module.html#re_is_var -fortuneengine.pyconsole.pyconsole.BLEND_MIN fortuneengine.pyconsole.pyconsole-module.html#BLEND_MIN -fortuneengine.pyconsole.pyconsole.JOYBUTTONUP fortuneengine.pyconsole.pyconsole-module.html#JOYBUTTONUP -fortuneengine.pyconsole.pyconsole.re_is_list fortuneengine.pyconsole.pyconsole-module.html#re_is_list -fortuneengine.pyconsole.pyconsole.K_DELETE fortuneengine.pyconsole.pyconsole-module.html#K_DELETE -fortuneengine.pyconsole.pyconsole.K_CARET fortuneengine.pyconsole.pyconsole-module.html#K_CARET -fortuneengine.pyconsole.pyconsole.USEREVENT fortuneengine.pyconsole.pyconsole-module.html#USEREVENT -fortuneengine.pyconsole.pyconsole.BLEND_RGBA_MULT fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGBA_MULT -fortuneengine.pyconsole.pyconsole.LIL_ENDIAN fortuneengine.pyconsole.pyconsole-module.html#LIL_ENDIAN -fortuneengine.pyconsole.pyconsole.KMOD_SHIFT fortuneengine.pyconsole.pyconsole-module.html#KMOD_SHIFT -fortuneengine.pyconsole.pyconsole.KMOD_RSHIFT fortuneengine.pyconsole.pyconsole-module.html#KMOD_RSHIFT -fortuneengine.pyconsole.pyconsole.BIG_ENDIAN fortuneengine.pyconsole.pyconsole-module.html#BIG_ENDIAN -fortuneengine.pyconsole.pyconsole.K_v fortuneengine.pyconsole.pyconsole-module.html#K_v -fortuneengine.pyconsole.pyconsole.GL_MULTISAMPLEBUFFERS fortuneengine.pyconsole.pyconsole-module.html#GL_MULTISAMPLEBUFFERS -fortuneengine.pyconsole.pyconsole.HAT_RIGHTUP fortuneengine.pyconsole.pyconsole-module.html#HAT_RIGHTUP -fortuneengine.pyconsole.pyconsole.QUIT fortuneengine.pyconsole.pyconsole-module.html#QUIT -fortuneengine.pyconsole.pyconsole.K_LMETA fortuneengine.pyconsole.pyconsole-module.html#K_LMETA -fortuneengine.pyconsole.pyconsole.RLEACCELOK fortuneengine.pyconsole.pyconsole-module.html#RLEACCELOK -fortuneengine.pyconsole.pyconsole.K_TAB fortuneengine.pyconsole.pyconsole-module.html#K_TAB -fortuneengine.pyconsole.pyconsole.K_EQUALS fortuneengine.pyconsole.pyconsole-module.html#K_EQUALS -fortuneengine.pyconsole.pyconsole.GL_ACCUM_BLUE_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_ACCUM_BLUE_SIZE -fortuneengine.pyconsole.pyconsole.K_MODE fortuneengine.pyconsole.pyconsole-module.html#K_MODE -fortuneengine.pyconsole.pyconsole.OPENGL fortuneengine.pyconsole.pyconsole-module.html#OPENGL -fortuneengine.pyconsole.pyconsole.K_RIGHTPAREN fortuneengine.pyconsole.pyconsole-module.html#K_RIGHTPAREN -fortuneengine.pyconsole.pyconsole.K_SLASH fortuneengine.pyconsole.pyconsole-module.html#K_SLASH -fortuneengine.pyconsole.pyconsole.GL_STENCIL_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_STENCIL_SIZE -fortuneengine.pyconsole.pyconsole.PREALLOC fortuneengine.pyconsole.pyconsole-module.html#PREALLOC -fortuneengine.pyconsole.pyconsole.K_F12 fortuneengine.pyconsole.pyconsole-module.html#K_F12 -fortuneengine.pyconsole.pyconsole.K_F13 fortuneengine.pyconsole.pyconsole-module.html#K_F13 -fortuneengine.pyconsole.pyconsole.K_F10 fortuneengine.pyconsole.pyconsole-module.html#K_F10 -fortuneengine.pyconsole.pyconsole.K_F11 fortuneengine.pyconsole.pyconsole-module.html#K_F11 -fortuneengine.pyconsole.pyconsole.K_F14 fortuneengine.pyconsole.pyconsole-module.html#K_F14 -fortuneengine.pyconsole.pyconsole.K_F15 fortuneengine.pyconsole.pyconsole-module.html#K_F15 -fortuneengine.pyconsole.pyconsole.K_y fortuneengine.pyconsole.pyconsole-module.html#K_y -fortuneengine.pyconsole.pyconsole.K_KP_EQUALS fortuneengine.pyconsole.pyconsole-module.html#K_KP_EQUALS -fortuneengine.pyconsole.pyconsole.K_l fortuneengine.pyconsole.pyconsole-module.html#K_l -fortuneengine.pyconsole.pyconsole.K_o fortuneengine.pyconsole.pyconsole-module.html#K_o -fortuneengine.pyconsole.pyconsole.ERR fortuneengine.pyconsole.pyconsole-module.html#ERR -fortuneengine.pyconsole.pyconsole.YVYU_OVERLAY fortuneengine.pyconsole.pyconsole-module.html#YVYU_OVERLAY -fortuneengine.pyconsole.pyconsole.K_UP fortuneengine.pyconsole.pyconsole-module.html#K_UP -fortuneengine.pyconsole.pyconsole.K_p fortuneengine.pyconsole.pyconsole-module.html#K_p -fortuneengine.pyconsole.pyconsole.K_s fortuneengine.pyconsole.pyconsole-module.html#K_s -fortuneengine.pyconsole.pyconsole.KEYUP fortuneengine.pyconsole.pyconsole-module.html#KEYUP -fortuneengine.pyconsole.pyconsole.K_u fortuneengine.pyconsole.pyconsole-module.html#K_u -fortuneengine.pyconsole.pyconsole.AUDIO_S16MSB fortuneengine.pyconsole.pyconsole-module.html#AUDIO_S16MSB -fortuneengine.pyconsole.pyconsole.K_w fortuneengine.pyconsole.pyconsole-module.html#K_w -fortuneengine.pyconsole.pyconsole.KMOD_RCTRL fortuneengine.pyconsole.pyconsole-module.html#KMOD_RCTRL -fortuneengine.pyconsole.pyconsole.K_i fortuneengine.pyconsole.pyconsole-module.html#K_i -fortuneengine.pyconsole.pyconsole.K_h fortuneengine.pyconsole.pyconsole-module.html#K_h -fortuneengine.pyconsole.pyconsole.K_k fortuneengine.pyconsole.pyconsole-module.html#K_k -fortuneengine.pyconsole.pyconsole.GL_ACCUM_ALPHA_SIZE fortuneengine.pyconsole.pyconsole-module.html#GL_ACCUM_ALPHA_SIZE -fortuneengine.pyconsole.pyconsole.K_m fortuneengine.pyconsole.pyconsole-module.html#K_m -fortuneengine.pyconsole.pyconsole.K_LEFTBRACKET fortuneengine.pyconsole.pyconsole-module.html#K_LEFTBRACKET -fortuneengine.pyconsole.pyconsole.IYUV_OVERLAY fortuneengine.pyconsole.pyconsole-module.html#IYUV_OVERLAY -fortuneengine.pyconsole.pyconsole.K_RSUPER fortuneengine.pyconsole.pyconsole-module.html#K_RSUPER -fortuneengine.pyconsole.pyconsole.K_a fortuneengine.pyconsole.pyconsole-module.html#K_a -fortuneengine.pyconsole.pyconsole.ANYFORMAT fortuneengine.pyconsole.pyconsole-module.html#ANYFORMAT -fortuneengine.pyconsole.pyconsole.BLEND_RGB_SUB fortuneengine.pyconsole.pyconsole-module.html#BLEND_RGB_SUB -fortuneengine.pyconsole.pyconsole.K_e fortuneengine.pyconsole.pyconsole-module.html#K_e -fortuneengine.pyconsole.pyconsole.K_c fortuneengine.pyconsole.pyconsole-module.html#K_c -fortuneengine.pyconsole.pyconsole.K_g fortuneengine.pyconsole.pyconsole-module.html#K_g -fortuneengine.pyconsole.pyconsole.K_f fortuneengine.pyconsole.pyconsole-module.html#K_f -fortuneengine.pyconsole.pyconsole.BUTTON_X2 fortuneengine.pyconsole.pyconsole-module.html#BUTTON_X2 -fortuneengine.pyconsole.pyconsole.K_AT fortuneengine.pyconsole.pyconsole-module.html#K_AT -fortuneengine.pyconsole.pyconsole.BUTTON_X1 fortuneengine.pyconsole.pyconsole-module.html#BUTTON_X1 -fortuneengine.pyconsole.pyconsole.K_PAGEUP fortuneengine.pyconsole.pyconsole-module.html#K_PAGEUP -fortuneengine.pyconsole.pyconsole.K_CAPSLOCK fortuneengine.pyconsole.pyconsole-module.html#K_CAPSLOCK -fortuneengine.pyconsole.pyconsole.DOUBLEBUF fortuneengine.pyconsole.pyconsole-module.html#DOUBLEBUF -fortuneengine.pyconsole.pyconsole.K_PRINT fortuneengine.pyconsole.pyconsole-module.html#K_PRINT -fortuneengine.pyconsole.pyconsole.PYCONSOLE fortuneengine.pyconsole.pyconsole-module.html#PYCONSOLE -fortuneengine.pyconsole.pyconsole.re_is_assign fortuneengine.pyconsole.pyconsole-module.html#re_is_assign -fortuneengine.pyconsole.pyconsole.K_j fortuneengine.pyconsole.pyconsole-module.html#K_j -fortuneengine.pyconsole.pyconsole.KEYDOWN fortuneengine.pyconsole.pyconsole-module.html#KEYDOWN -fortuneengine.pyconsole.pyconsole.K_d fortuneengine.pyconsole.pyconsole-module.html#K_d -fortuneengine.pyconsole.pyconsole.AUDIO_U16SYS fortuneengine.pyconsole.pyconsole-module.html#AUDIO_U16SYS -fortuneengine.pyconsole.pyconsole.K_RETURN fortuneengine.pyconsole.pyconsole-module.html#K_RETURN -fortuneengine.pyconsole.pyconsole.K_SCROLLOCK fortuneengine.pyconsole.pyconsole-module.html#K_SCROLLOCK -fortuneengine.pyconsole.pyconsole.ACTIVEEVENT fortuneengine.pyconsole.pyconsole-module.html#ACTIVEEVENT -fortuneengine.pyconsole.pyconsole.SCRAP_BMP fortuneengine.pyconsole.pyconsole-module.html#SCRAP_BMP -fortuneengine.pyconsole.pyconsole.K_9 fortuneengine.pyconsole.pyconsole-module.html#K_9 -fortuneengine.pyconsole.pyconsole.K_8 fortuneengine.pyconsole.pyconsole-module.html#K_8 -fortuneengine.pyconsole.pyconsole.NUMEVENTS fortuneengine.pyconsole.pyconsole-module.html#NUMEVENTS -fortuneengine.pyconsole.pyconsole.K_LESS fortuneengine.pyconsole.pyconsole-module.html#K_LESS -fortuneengine.pyconsole.pyconsole.HAT_UP fortuneengine.pyconsole.pyconsole-module.html#HAT_UP -fortuneengine.pyconsole.pyconsole.K_1 fortuneengine.pyconsole.pyconsole-module.html#K_1 -fortuneengine.pyconsole.pyconsole.K_0 fortuneengine.pyconsole.pyconsole-module.html#K_0 -fortuneengine.pyconsole.pyconsole.K_3 fortuneengine.pyconsole.pyconsole-module.html#K_3 -fortuneengine.pyconsole.pyconsole.AUDIO_U16MSB fortuneengine.pyconsole.pyconsole-module.html#AUDIO_U16MSB -fortuneengine.pyconsole.pyconsole.K_5 fortuneengine.pyconsole.pyconsole-module.html#K_5 -fortuneengine.pyconsole.pyconsole.K_4 fortuneengine.pyconsole.pyconsole-module.html#K_4 -fortuneengine.pyconsole.pyconsole.K_7 fortuneengine.pyconsole.pyconsole-module.html#K_7 -fortuneengine.pyconsole.pyconsole.HEIGHT fortuneengine.pyconsole.pyconsole-module.html#HEIGHT -fortuneengine.pyconsole.pyconsole.YUY2_OVERLAY fortuneengine.pyconsole.pyconsole-module.html#YUY2_OVERLAY -fortuneengine.pyconsole.pyconsole.IN fortuneengine.pyconsole.pyconsole-module.html#IN -fortuneengine.pyconsole.pyconsole.K_PLUS fortuneengine.pyconsole.pyconsole-module.html#K_PLUS -fortuneengine.pyconsole.pyconsole.K_KP6 fortuneengine.pyconsole.pyconsole-module.html#K_KP6 -fortuneengine.pyconsole.pyconsole.K_b fortuneengine.pyconsole.pyconsole-module.html#K_b -fortuneengine.pyconsole.pyconsole.K_QUOTE fortuneengine.pyconsole.pyconsole-module.html#K_QUOTE -fortuneengine.pyconsole.pyconsole.K_RCTRL fortuneengine.pyconsole.pyconsole-module.html#K_RCTRL -fortuneengine.pyconsole.pyconsole.MOUSEBUTTONDOWN fortuneengine.pyconsole.pyconsole-module.html#MOUSEBUTTONDOWN -fortuneengine.pyconsole.pyconsole.K_F4 fortuneengine.pyconsole.pyconsole-module.html#K_F4 -fortuneengine.pyconsole.pyconsole.AUDIO_S16SYS fortuneengine.pyconsole.pyconsole-module.html#AUDIO_S16SYS -fortuneengine.pyconsole.pyconsole.OPENGLBLIT fortuneengine.pyconsole.pyconsole-module.html#OPENGLBLIT -fortuneengine.pyconsole.pyconsole.JOYBUTTONDOWN fortuneengine.pyconsole.pyconsole-module.html#JOYBUTTONDOWN -fortuneengine.pyconsole.pyconsole.OUT fortuneengine.pyconsole.pyconsole-module.html#OUT -fortuneengine.pyconsole.pyconsole.K_KP8 fortuneengine.pyconsole.pyconsole-module.html#K_KP8 -fortuneengine.pyconsole.pyconsole.K_KP9 fortuneengine.pyconsole.pyconsole-module.html#K_KP9 -fortuneengine.pyconsole.pyconsole.re_is_comment fortuneengine.pyconsole.pyconsole-module.html#re_is_comment -fortuneengine.pyconsole.pyconsole.K_KP4 fortuneengine.pyconsole.pyconsole-module.html#K_KP4 -fortuneengine.pyconsole.pyconsole.K_KP5 fortuneengine.pyconsole.pyconsole-module.html#K_KP5 -fortuneengine.pyconsole.pyconsole.K_BACKQUOTE fortuneengine.pyconsole.pyconsole-module.html#K_BACKQUOTE -fortuneengine.pyconsole.pyconsole.K_KP7 fortuneengine.pyconsole.pyconsole-module.html#K_KP7 -fortuneengine.pyconsole.pyconsole.K_KP0 fortuneengine.pyconsole.pyconsole-module.html#K_KP0 -fortuneengine.pyconsole.pyconsole.K_KP1 fortuneengine.pyconsole.pyconsole-module.html#K_KP1 -fortuneengine.pyconsole.pyconsole.K_KP2 fortuneengine.pyconsole.pyconsole-module.html#K_KP2 -fortuneengine.pyconsole.pyconsole.K_KP3 fortuneengine.pyconsole.pyconsole-module.html#K_KP3 -fortuneengine.DrawableFontObject.DrawableFontObject fortuneengine.DrawableFontObject.DrawableFontObject-class.html -fortuneengine.DrawableObject.DrawableObject.nextCurrentAnimFrame fortuneengine.DrawableObject.DrawableObject-class.html#nextCurrentAnimFrame -fortuneengine.DrawableObject.DrawableObject.goToFrame fortuneengine.DrawableObject.DrawableObject-class.html#goToFrame -fortuneengine.DrawableFontObject.DrawableFontObject.getText fortuneengine.DrawableFontObject.DrawableFontObject-class.html#getText -fortuneengine.DrawableObject.DrawableObject.getYPos fortuneengine.DrawableObject.DrawableObject-class.html#getYPos -fortuneengine.DrawableObject.DrawableObject.getRotation fortuneengine.DrawableObject.DrawableObject-class.html#getRotation -fortuneengine.DrawableObject.DrawableObject.getYSize fortuneengine.DrawableObject.DrawableObject-class.html#getYSize -fortuneengine.DrawableFontObject.DrawableFontObject.__init__ fortuneengine.DrawableFontObject.DrawableFontObject-class.html#__init__ -fortuneengine.DrawableObject.DrawableObject.fill fortuneengine.DrawableObject.DrawableObject-class.html#fill -fortuneengine.DrawableObject.DrawableObject.scale fortuneengine.DrawableObject.DrawableObject-class.html#scale -fortuneengine.DrawableObject.DrawableObject.nudge fortuneengine.DrawableObject.DrawableObject-class.html#nudge -fortuneengine.DrawableObject.DrawableObject.calcColorKey fortuneengine.DrawableObject.DrawableObject-class.html#calcColorKey -fortuneengine.DrawableObject.DrawableObject.setColorKey fortuneengine.DrawableObject.DrawableObject-class.html#setColorKey -fortuneengine.DrawableObject.DrawableObject.addImages fortuneengine.DrawableObject.DrawableObject-class.html#addImages -fortuneengine.DrawableObject.DrawableObject.getXPos fortuneengine.DrawableObject.DrawableObject-class.html#getXPos -fortuneengine.DrawableObject.DrawableObject.goToAnim fortuneengine.DrawableObject.DrawableObject-class.html#goToAnim -fortuneengine.DrawableObject.DrawableObject.nextFrame fortuneengine.DrawableObject.DrawableObject-class.html#nextFrame -fortuneengine.DrawableObject.DrawableObject.update fortuneengine.DrawableObject.DrawableObject-class.html#update -fortuneengine.DrawableObject.DrawableObject.setPosition fortuneengine.DrawableObject.DrawableObject-class.html#setPosition -fortuneengine.DrawableObject.DrawableObject.makeTransparent fortuneengine.DrawableObject.DrawableObject-class.html#makeTransparent -fortuneengine.DrawableObject.DrawableObject.rotate fortuneengine.DrawableObject.DrawableObject-class.html#rotate -fortuneengine.DrawableObject.DrawableObject.getXSize fortuneengine.DrawableObject.DrawableObject-class.html#getXSize -fortuneengine.DrawableObject.DrawableObject.repopulateImages fortuneengine.DrawableObject.DrawableObject-class.html#repopulateImages -fortuneengine.DrawableFontObject.DrawableFontObject.changeText fortuneengine.DrawableFontObject.DrawableFontObject-class.html#changeText -fortuneengine.DrawableObject.DrawableObject fortuneengine.DrawableObject.DrawableObject-class.html -fortuneengine.DrawableObject.DrawableObject.nextCurrentAnimFrame fortuneengine.DrawableObject.DrawableObject-class.html#nextCurrentAnimFrame -fortuneengine.DrawableObject.DrawableObject.goToFrame fortuneengine.DrawableObject.DrawableObject-class.html#goToFrame -fortuneengine.DrawableObject.DrawableObject.getYPos fortuneengine.DrawableObject.DrawableObject-class.html#getYPos -fortuneengine.DrawableObject.DrawableObject.getRotation fortuneengine.DrawableObject.DrawableObject-class.html#getRotation -fortuneengine.DrawableObject.DrawableObject.getYSize fortuneengine.DrawableObject.DrawableObject-class.html#getYSize -fortuneengine.DrawableObject.DrawableObject.__init__ fortuneengine.DrawableObject.DrawableObject-class.html#__init__ -fortuneengine.DrawableObject.DrawableObject.fill fortuneengine.DrawableObject.DrawableObject-class.html#fill -fortuneengine.DrawableObject.DrawableObject.scale fortuneengine.DrawableObject.DrawableObject-class.html#scale -fortuneengine.DrawableObject.DrawableObject.nudge fortuneengine.DrawableObject.DrawableObject-class.html#nudge -fortuneengine.DrawableObject.DrawableObject.calcColorKey fortuneengine.DrawableObject.DrawableObject-class.html#calcColorKey -fortuneengine.DrawableObject.DrawableObject.setColorKey fortuneengine.DrawableObject.DrawableObject-class.html#setColorKey -fortuneengine.DrawableObject.DrawableObject.addImages fortuneengine.DrawableObject.DrawableObject-class.html#addImages -fortuneengine.DrawableObject.DrawableObject.getXPos fortuneengine.DrawableObject.DrawableObject-class.html#getXPos -fortuneengine.DrawableObject.DrawableObject.goToAnim fortuneengine.DrawableObject.DrawableObject-class.html#goToAnim -fortuneengine.DrawableObject.DrawableObject.nextFrame fortuneengine.DrawableObject.DrawableObject-class.html#nextFrame -fortuneengine.DrawableObject.DrawableObject.update fortuneengine.DrawableObject.DrawableObject-class.html#update -fortuneengine.DrawableObject.DrawableObject.setPosition fortuneengine.DrawableObject.DrawableObject-class.html#setPosition -fortuneengine.DrawableObject.DrawableObject.makeTransparent fortuneengine.DrawableObject.DrawableObject-class.html#makeTransparent -fortuneengine.DrawableObject.DrawableObject.rotate fortuneengine.DrawableObject.DrawableObject-class.html#rotate -fortuneengine.DrawableObject.DrawableObject.getXSize fortuneengine.DrawableObject.DrawableObject-class.html#getXSize -fortuneengine.DrawableObject.DrawableObject.repopulateImages fortuneengine.DrawableObject.DrawableObject-class.html#repopulateImages -fortuneengine.DynamicDrawableObject.DynamicDrawableObject fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html -fortuneengine.DynamicDrawableObject.DynamicDrawableObject.nextCurrentAnimFrame fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html#nextCurrentAnimFrame -fortuneengine.DrawableObject.DrawableObject.goToFrame fortuneengine.DrawableObject.DrawableObject-class.html#goToFrame -fortuneengine.DynamicDrawableObject.DynamicDrawableObject.move fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html#move -fortuneengine.DrawableObject.DrawableObject.getYPos fortuneengine.DrawableObject.DrawableObject-class.html#getYPos -fortuneengine.DynamicDrawableObject.DynamicDrawableObject.getXSpeed fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html#getXSpeed -fortuneengine.DrawableObject.DrawableObject.getRotation fortuneengine.DrawableObject.DrawableObject-class.html#getRotation -fortuneengine.DrawableObject.DrawableObject.setPosition fortuneengine.DrawableObject.DrawableObject-class.html#setPosition -fortuneengine.DynamicDrawableObject.DynamicDrawableObject.__init__ fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html#__init__ -fortuneengine.DrawableObject.DrawableObject.fill fortuneengine.DrawableObject.DrawableObject-class.html#fill -fortuneengine.DrawableObject.DrawableObject.scale fortuneengine.DrawableObject.DrawableObject-class.html#scale -fortuneengine.DrawableObject.DrawableObject.nudge fortuneengine.DrawableObject.DrawableObject-class.html#nudge -fortuneengine.DrawableObject.DrawableObject.calcColorKey fortuneengine.DrawableObject.DrawableObject-class.html#calcColorKey -fortuneengine.DrawableObject.DrawableObject.setColorKey fortuneengine.DrawableObject.DrawableObject-class.html#setColorKey -fortuneengine.DynamicDrawableObject.DynamicDrawableObject.addImages fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html#addImages -fortuneengine.DrawableObject.DrawableObject.getXPos fortuneengine.DrawableObject.DrawableObject-class.html#getXPos -fortuneengine.DrawableObject.DrawableObject.goToAnim fortuneengine.DrawableObject.DrawableObject-class.html#goToAnim -fortuneengine.DynamicDrawableObject.DynamicDrawableObject.nextFrame fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html#nextFrame -fortuneengine.DynamicDrawableObject.DynamicDrawableObject.getYSpeed fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html#getYSpeed -fortuneengine.DynamicDrawableObject.DynamicDrawableObject.update fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html#update -fortuneengine.DrawableObject.DrawableObject.getYSize fortuneengine.DrawableObject.DrawableObject-class.html#getYSize -fortuneengine.DrawableObject.DrawableObject.makeTransparent fortuneengine.DrawableObject.DrawableObject-class.html#makeTransparent -fortuneengine.DrawableObject.DrawableObject.rotate fortuneengine.DrawableObject.DrawableObject-class.html#rotate -fortuneengine.DrawableObject.DrawableObject.getXSize fortuneengine.DrawableObject.DrawableObject-class.html#getXSize -fortuneengine.DynamicDrawableObject.DynamicDrawableObject.setSpeed fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html#setSpeed -fortuneengine.DrawableObject.DrawableObject.repopulateImages fortuneengine.DrawableObject.DrawableObject-class.html#repopulateImages -fortuneengine.GameEngine.GameEngine fortuneengine.GameEngine.GameEngine-class.html -fortuneengine.GameEngine.GameEngine.list_event_timers fortuneengine.GameEngine.GameEngine-class.html#list_event_timers -fortuneengine.GameEngine.GameEngine.list_objects fortuneengine.GameEngine.GameEngine-class.html#list_objects -fortuneengine.GameEngine.GameEngine.start_event_timer fortuneengine.GameEngine.GameEngine-class.html#start_event_timer -fortuneengine.GameEngine.GameEngine.set_dirty fortuneengine.GameEngine.GameEngine-class.html#set_dirty -fortuneengine.GameEngine.GameEngine.remove_event_callback fortuneengine.GameEngine.GameEngine-class.html#remove_event_callback -fortuneengine.GameEngine.GameEngine._event_loop fortuneengine.GameEngine.GameEngine-class.html#_event_loop -fortuneengine.GameEngine.GameEngine.list_event_time fortuneengine.GameEngine.GameEngine-class.html#list_event_time -fortuneengine.GameEngine.GameEngine.__init__ fortuneengine.GameEngine.GameEngine-class.html#__init__ -fortuneengine.GameEngine.GameEngine.get_scene fortuneengine.GameEngine.GameEngine-class.html#get_scene -fortuneengine.GameEngine.GameEngine.add_draw_callback fortuneengine.GameEngine.GameEngine-class.html#add_draw_callback -fortuneengine.GameEngine.GameEngine.instance fortuneengine.GameEngine.GameEngine-class.html#instance -fortuneengine.GameEngine.GameEngine.add_event_callback fortuneengine.GameEngine.GameEngine-class.html#add_event_callback -fortuneengine.GameEngine.GameEngine.remove_draw_callback fortuneengine.GameEngine.GameEngine-class.html#remove_draw_callback -fortuneengine.GameEngine.GameEngine._draw fortuneengine.GameEngine.GameEngine-class.html#_draw -fortuneengine.GameEngine.GameEngine.art_scale fortuneengine.GameEngine.GameEngine-class.html#art_scale -fortuneengine.GameEngine.GameEngine.list_timer_time fortuneengine.GameEngine.GameEngine-class.html#list_timer_time -fortuneengine.GameEngine.GameEngine.list_draw_callbacks fortuneengine.GameEngine.GameEngine-class.html#list_draw_callbacks -fortuneengine.GameEngine.GameEngine.start_main_loop fortuneengine.GameEngine.GameEngine-class.html#start_main_loop -fortuneengine.GameEngine.GameEngine.has_object fortuneengine.GameEngine.GameEngine-class.html#has_object -fortuneengine.GameEngine.GameEngine.clear_draw_callback fortuneengine.GameEngine.GameEngine-class.html#clear_draw_callback -fortuneengine.GameEngine.GameEngine.add_object fortuneengine.GameEngine.GameEngine-class.html#add_object -fortuneengine.GameEngine.GameEngine.list_event_callbacks fortuneengine.GameEngine.GameEngine-class.html#list_event_callbacks -fortuneengine.GameEngine.GameEngine.toggle_fps fortuneengine.GameEngine.GameEngine-class.html#toggle_fps -fortuneengine.GameEngine.GameEngine.remove_object fortuneengine.GameEngine.GameEngine-class.html#remove_object -fortuneengine.GameEngine.GameEngine.stop_event_loop fortuneengine.GameEngine.GameEngine-class.html#stop_event_loop -fortuneengine.GameEngine.GameEngine.get_object fortuneengine.GameEngine.GameEngine-class.html#get_object -fortuneengine.GameEngine.GameEngine.pop_draw_callback fortuneengine.GameEngine.GameEngine-class.html#pop_draw_callback -fortuneengine.GameEngine.GameEngine.list_draw_time fortuneengine.GameEngine.GameEngine-class.html#list_draw_time -fortuneengine.GameEngine.GameEngine.stop_event_timer fortuneengine.GameEngine.GameEngine-class.html#stop_event_timer -fortuneengine.GameEngineConsole.GameEngineConsole fortuneengine.GameEngineConsole.GameEngineConsole-class.html -fortuneengine.pyconsole.pyconsole.Console.init_default_cfg fortuneengine.pyconsole.pyconsole.Console-class.html#init_default_cfg -fortuneengine.pyconsole.pyconsole.Console.setvars fortuneengine.pyconsole.pyconsole.Console-class.html#setvars -fortuneengine.pyconsole.pyconsole.Console.set_interpreter fortuneengine.pyconsole.pyconsole.Console-class.html#set_interpreter -fortuneengine.pyconsole.pyconsole.Console.set_pos fortuneengine.pyconsole.pyconsole.Console-class.html#set_pos -fortuneengine.pyconsole.pyconsole.Console.safe_set_attr fortuneengine.pyconsole.pyconsole.Console-class.html#safe_set_attr -fortuneengine.pyconsole.pyconsole.Console.format_input_line fortuneengine.pyconsole.pyconsole.Console-class.html#format_input_line -fortuneengine.GameEngineConsole.GameEngineConsole.__init__ fortuneengine.GameEngineConsole.GameEngineConsole-class.html#__init__ -fortuneengine.pyconsole.pyconsole.Console.help fortuneengine.pyconsole.pyconsole.Console-class.html#help -fortuneengine.pyconsole.pyconsole.Console.getvars fortuneengine.pyconsole.pyconsole.Console-class.html#getvars -fortuneengine.pyconsole.pyconsole.Console.str_insert fortuneengine.pyconsole.pyconsole.Console-class.html#str_insert -fortuneengine.pyconsole.pyconsole.Console.process_input fortuneengine.pyconsole.pyconsole.Console-class.html#process_input -fortuneengine.pyconsole.pyconsole.Console.submit_input fortuneengine.pyconsole.pyconsole.Console-class.html#submit_input -fortuneengine.pyconsole.pyconsole.Console.tokenize fortuneengine.pyconsole.pyconsole.Console-class.html#tokenize -fortuneengine.pyconsole.pyconsole.Console.add_func_calls fortuneengine.pyconsole.pyconsole.Console-class.html#add_func_calls -fortuneengine.pyconsole.pyconsole.Console.catch_output fortuneengine.pyconsole.pyconsole.Console-class.html#catch_output -fortuneengine.pyconsole.pyconsole.Console.send_python fortuneengine.pyconsole.pyconsole.Console-class.html#send_python -fortuneengine.pyconsole.pyconsole.Console.setvar fortuneengine.pyconsole.pyconsole.Console-class.html#setvar -fortuneengine.pyconsole.pyconsole.Console.draw fortuneengine.pyconsole.pyconsole.Console-class.html#draw -fortuneengine.GameEngineConsole.GameEngineConsole.console_mode fortuneengine.GameEngineConsole.GameEngineConsole-class.html#console_mode -fortuneengine.pyconsole.pyconsole.Console.clear_input fortuneengine.pyconsole.pyconsole.Console-class.html#clear_input -fortuneengine.pyconsole.pyconsole.Console.load_cfg fortuneengine.pyconsole.pyconsole.Console-class.html#load_cfg -fortuneengine.pyconsole.pyconsole.Console.getvar fortuneengine.pyconsole.pyconsole.Console-class.html#getvar -fortuneengine.pyconsole.pyconsole.Console.release_output fortuneengine.pyconsole.pyconsole.Console-class.html#release_output -fortuneengine.pyconsole.pyconsole.Console.add_to_history fortuneengine.pyconsole.pyconsole.Console-class.html#add_to_history -fortuneengine.pyconsole.pyconsole.Console.set_active fortuneengine.pyconsole.pyconsole.Console-class.html#set_active -fortuneengine.pyconsole.pyconsole.Console.convert_token fortuneengine.pyconsole.pyconsole.Console-class.html#convert_token -fortuneengine.pyconsole.pyconsole.Console.send_pyconsole fortuneengine.pyconsole.pyconsole.Console-class.html#send_pyconsole -fortuneengine.pyconsole.pyconsole.Console.output fortuneengine.pyconsole.pyconsole.Console-class.html#output -fortuneengine.pyconsole.pyconsole.Console.add_key_calls fortuneengine.pyconsole.pyconsole.Console-class.html#add_key_calls -fortuneengine.pyconsole.pyconsole.Console.clear fortuneengine.pyconsole.pyconsole.Console-class.html#clear -fortuneengine.GameEngineElement.GameEngineElement fortuneengine.GameEngineElement.GameEngineElement-class.html -fortuneengine.GameEngineElement.GameEngineElement.draw fortuneengine.GameEngineElement.GameEngineElement-class.html#draw -fortuneengine.GameEngineElement.GameEngineElement.is_in_engine fortuneengine.GameEngineElement.GameEngineElement-class.html#is_in_engine -fortuneengine.GameEngineElement.GameEngineElement.remove_from_engine fortuneengine.GameEngineElement.GameEngineElement-class.html#remove_from_engine -fortuneengine.GameEngineElement.GameEngineElement.event_handler fortuneengine.GameEngineElement.GameEngineElement-class.html#event_handler -fortuneengine.GameEngineElement.GameEngineElement.add_to_engine fortuneengine.GameEngineElement.GameEngineElement-class.html#add_to_engine -fortuneengine.GameEngineElement.GameEngineElement.__init__ fortuneengine.GameEngineElement.GameEngineElement-class.html#__init__ -fortuneengine.GameEngineElement.GameEngineElement.add_to_scene fortuneengine.GameEngineElement.GameEngineElement-class.html#add_to_scene -fortuneengine.GameInspect.GameInspect fortuneengine.GameInspect.GameInspect-class.html -fortuneengine.GameInspect.GameInspect.drilldown_object fortuneengine.GameInspect.GameInspect-class.html#drilldown_object -fortuneengine.GameInspect.GameInspect.inspect_object fortuneengine.GameInspect.GameInspect-class.html#inspect_object -fortuneengine.GameInspect.GameInspect.set_int fortuneengine.GameInspect.GameInspect-class.html#set_int -fortuneengine.GameInspect.GameInspect.set_str fortuneengine.GameInspect.GameInspect-class.html#set_str -fortuneengine.GameInspect.GameInspect.set_eval fortuneengine.GameInspect.GameInspect-class.html#set_eval -fortuneengine.GameInspect.GameInspect.__init__ fortuneengine.GameInspect.GameInspect-class.html#__init__ -fortuneengine.Scene.Scene fortuneengine.Scene.Scene-class.html -fortuneengine.Scene.Scene.scaleScene fortuneengine.Scene.Scene-class.html#scaleScene -fortuneengine.Scene.Scene.getObject fortuneengine.Scene.Scene-class.html#getObject -fortuneengine.Scene.Scene.getYPos fortuneengine.Scene.Scene-class.html#getYPos -fortuneengine.Scene.Scene.calcSize fortuneengine.Scene.Scene-class.html#calcSize -fortuneengine.Scene.Scene.calcPosition fortuneengine.Scene.Scene-class.html#calcPosition -fortuneengine.Scene.Scene.getYSize fortuneengine.Scene.Scene-class.html#getYSize -fortuneengine.Scene.Scene.__init__ fortuneengine.Scene.Scene-class.html#__init__ -fortuneengine.Scene.Scene.nextFrame fortuneengine.Scene.Scene-class.html#nextFrame -fortuneengine.Scene.Scene.addObjects fortuneengine.Scene.Scene-class.html#addObjects -fortuneengine.Scene.Scene.scaleObjects fortuneengine.Scene.Scene-class.html#scaleObjects -fortuneengine.Scene.Scene.drawEntireScene fortuneengine.Scene.Scene-class.html#drawEntireScene -fortuneengine.Scene.Scene.getXPos fortuneengine.Scene.Scene-class.html#getXPos -fortuneengine.Scene.Scene.moveScene fortuneengine.Scene.Scene-class.html#moveScene -fortuneengine.Scene.Scene.addObject fortuneengine.Scene.Scene-class.html#addObject -fortuneengine.Scene.Scene.draw fortuneengine.Scene.Scene-class.html#draw -fortuneengine.Scene.Scene.update fortuneengine.Scene.Scene-class.html#update -fortuneengine.Scene.Scene.getListSize fortuneengine.Scene.Scene-class.html#getListSize -fortuneengine.Scene.Scene.setPosition fortuneengine.Scene.Scene-class.html#setPosition -fortuneengine.Scene.Scene.moveObjects fortuneengine.Scene.Scene-class.html#moveObjects -fortuneengine.Scene.Scene.getList fortuneengine.Scene.Scene-class.html#getList -fortuneengine.Scene.Scene.setRelativePositions fortuneengine.Scene.Scene-class.html#setRelativePositions -fortuneengine.Scene.Scene.getXSize fortuneengine.Scene.Scene-class.html#getXSize -fortuneengine.Scene.Scene.removeObject fortuneengine.Scene.Scene-class.html#removeObject -fortuneengine.pyconsole.pyconsole.Console fortuneengine.pyconsole.pyconsole.Console-class.html -fortuneengine.pyconsole.pyconsole.Console.init_default_cfg fortuneengine.pyconsole.pyconsole.Console-class.html#init_default_cfg -fortuneengine.pyconsole.pyconsole.Console.setvars fortuneengine.pyconsole.pyconsole.Console-class.html#setvars -fortuneengine.pyconsole.pyconsole.Console.set_interpreter fortuneengine.pyconsole.pyconsole.Console-class.html#set_interpreter -fortuneengine.pyconsole.pyconsole.Console.set_pos fortuneengine.pyconsole.pyconsole.Console-class.html#set_pos -fortuneengine.pyconsole.pyconsole.Console.safe_set_attr fortuneengine.pyconsole.pyconsole.Console-class.html#safe_set_attr -fortuneengine.pyconsole.pyconsole.Console.format_input_line fortuneengine.pyconsole.pyconsole.Console-class.html#format_input_line -fortuneengine.pyconsole.pyconsole.Console.__init__ fortuneengine.pyconsole.pyconsole.Console-class.html#__init__ -fortuneengine.pyconsole.pyconsole.Console.help fortuneengine.pyconsole.pyconsole.Console-class.html#help -fortuneengine.pyconsole.pyconsole.Console.getvars fortuneengine.pyconsole.pyconsole.Console-class.html#getvars -fortuneengine.pyconsole.pyconsole.Console.str_insert fortuneengine.pyconsole.pyconsole.Console-class.html#str_insert -fortuneengine.pyconsole.pyconsole.Console.process_input fortuneengine.pyconsole.pyconsole.Console-class.html#process_input -fortuneengine.pyconsole.pyconsole.Console.submit_input fortuneengine.pyconsole.pyconsole.Console-class.html#submit_input -fortuneengine.pyconsole.pyconsole.Console.tokenize fortuneengine.pyconsole.pyconsole.Console-class.html#tokenize -fortuneengine.pyconsole.pyconsole.Console.add_func_calls fortuneengine.pyconsole.pyconsole.Console-class.html#add_func_calls -fortuneengine.pyconsole.pyconsole.Console.catch_output fortuneengine.pyconsole.pyconsole.Console-class.html#catch_output -fortuneengine.pyconsole.pyconsole.Console.send_python fortuneengine.pyconsole.pyconsole.Console-class.html#send_python -fortuneengine.pyconsole.pyconsole.Console.setvar fortuneengine.pyconsole.pyconsole.Console-class.html#setvar -fortuneengine.pyconsole.pyconsole.Console.draw fortuneengine.pyconsole.pyconsole.Console-class.html#draw -fortuneengine.pyconsole.pyconsole.Console.clear_input fortuneengine.pyconsole.pyconsole.Console-class.html#clear_input -fortuneengine.pyconsole.pyconsole.Console.load_cfg fortuneengine.pyconsole.pyconsole.Console-class.html#load_cfg -fortuneengine.pyconsole.pyconsole.Console.getvar fortuneengine.pyconsole.pyconsole.Console-class.html#getvar -fortuneengine.pyconsole.pyconsole.Console.release_output fortuneengine.pyconsole.pyconsole.Console-class.html#release_output -fortuneengine.pyconsole.pyconsole.Console.add_to_history fortuneengine.pyconsole.pyconsole.Console-class.html#add_to_history -fortuneengine.pyconsole.pyconsole.Console.set_active fortuneengine.pyconsole.pyconsole.Console-class.html#set_active -fortuneengine.pyconsole.pyconsole.Console.convert_token fortuneengine.pyconsole.pyconsole.Console-class.html#convert_token -fortuneengine.pyconsole.pyconsole.Console.send_pyconsole fortuneengine.pyconsole.pyconsole.Console-class.html#send_pyconsole -fortuneengine.pyconsole.pyconsole.Console.output fortuneengine.pyconsole.pyconsole.Console-class.html#output -fortuneengine.pyconsole.pyconsole.Console.add_key_calls fortuneengine.pyconsole.pyconsole.Console-class.html#add_key_calls -fortuneengine.pyconsole.pyconsole.Console.clear fortuneengine.pyconsole.pyconsole.Console-class.html#clear -fortuneengine.pyconsole.pyconsole.ParseError fortuneengine.pyconsole.pyconsole.ParseError-class.html -fortuneengine.pyconsole.pyconsole.ParseError.at_token fortuneengine.pyconsole.pyconsole.ParseError-class.html#at_token -fortuneengine.pyconsole.pyconsole.ParseError.__init__ fortuneengine.pyconsole.pyconsole.ParseError-class.html#__init__ -fortuneengine.pyconsole.pyconsole.Writable fortuneengine.pyconsole.pyconsole.Writable-class.html -fortuneengine.pyconsole.pyconsole.Writable.write fortuneengine.pyconsole.pyconsole.Writable-class.html#write -fortuneengine.pyconsole.pyconsole.Writable.line_pointer fortuneengine.pyconsole.pyconsole.Writable-class.html#line_pointer -fortuneengine.pyconsole.pyconsole.Writable.readline fortuneengine.pyconsole.pyconsole.Writable-class.html#readline -fortuneengine.pyconsole.pyconsole.Writable.reset fortuneengine.pyconsole.pyconsole.Writable-class.html#reset diff --git a/MAFH2/fortuneengine/docs/epydoc/class-tree.html b/MAFH2/fortuneengine/docs/epydoc/class-tree.html deleted file mode 100644 index 3cdf6ce..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/class-tree.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - Class Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
- [ Module Hierarchy - | Class Hierarchy ] -

-

Class Hierarchy

- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/crarr.png b/MAFH2/fortuneengine/docs/epydoc/crarr.png deleted file mode 100644 index 26b43c5..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/crarr.png +++ /dev/null Binary files differ diff --git a/MAFH2/fortuneengine/docs/epydoc/epydoc.css b/MAFH2/fortuneengine/docs/epydoc/epydoc.css deleted file mode 100644 index 86d4170..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/epydoc.css +++ /dev/null @@ -1,322 +0,0 @@ - - -/* Epydoc CSS Stylesheet - * - * This stylesheet can be used to customize the appearance of epydoc's - * HTML output. - * - */ - -/* Default Colors & Styles - * - Set the default foreground & background color with 'body'; and - * link colors with 'a:link' and 'a:visited'. - * - Use bold for decision list terms. - * - The heading styles defined here are used for headings *within* - * docstring descriptions. All headings used by epydoc itself use - * either class='epydoc' or class='toc' (CSS styles for both - * defined below). - */ -body { background: #ffffff; color: #000000; } -p { margin-top: 0.5em; margin-bottom: 0.5em; } -a:link { color: #0000ff; } -a:visited { color: #204080; } -dt { font-weight: bold; } -h1 { font-size: +140%; font-style: italic; - font-weight: bold; } -h2 { font-size: +125%; font-style: italic; - font-weight: bold; } -h3 { font-size: +110%; font-style: italic; - font-weight: normal; } -code { font-size: 100%; } -/* N.B.: class, not pseudoclass */ -a.link { font-family: monospace; } - -/* Page Header & Footer - * - The standard page header consists of a navigation bar (with - * pointers to standard pages such as 'home' and 'trees'); a - * breadcrumbs list, which can be used to navigate to containing - * classes or modules; options links, to show/hide private - * variables and to show/hide frames; and a page title (using - *

). The page title may be followed by a link to the - * corresponding source code (using 'span.codelink'). - * - The footer consists of a navigation bar, a timestamp, and a - * pointer to epydoc's homepage. - */ -h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; } -h2.epydoc { font-size: +130%; font-weight: bold; } -h3.epydoc { font-size: +115%; font-weight: bold; - margin-top: 0.2em; } -td h3.epydoc { font-size: +115%; font-weight: bold; - margin-bottom: 0; } -table.navbar { background: #a0c0ff; color: #000000; - border: 2px groove #c0d0d0; } -table.navbar table { color: #000000; } -th.navbar-select { background: #70b0ff; - color: #000000; } -table.navbar a { text-decoration: none; } -table.navbar a:link { color: #0000ff; } -table.navbar a:visited { color: #204080; } -span.breadcrumbs { font-size: 85%; font-weight: bold; } -span.options { font-size: 70%; } -span.codelink { font-size: 85%; } -td.footer { font-size: 85%; } - -/* Table Headers - * - Each summary table and details section begins with a 'header' - * row. This row contains a section title (marked by - * 'span.table-header') as well as a show/hide private link - * (marked by 'span.options', defined above). - * - Summary tables that contain user-defined groups mark those - * groups using 'group header' rows. - */ -td.table-header { background: #70b0ff; color: #000000; - border: 1px solid #608090; } -td.table-header table { color: #000000; } -td.table-header table a:link { color: #0000ff; } -td.table-header table a:visited { color: #204080; } -span.table-header { font-size: 120%; font-weight: bold; } -th.group-header { background: #c0e0f8; color: #000000; - text-align: left; font-style: italic; - font-size: 115%; - border: 1px solid #608090; } - -/* Summary Tables (functions, variables, etc) - * - Each object is described by a single row of the table with - * two cells. The left cell gives the object's type, and is - * marked with 'code.summary-type'. The right cell gives the - * object's name and a summary description. - * - CSS styles for the table's header and group headers are - * defined above, under 'Table Headers' - */ -table.summary { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin-bottom: 0.5em; } -td.summary { border: 1px solid #608090; } -code.summary-type { font-size: 85%; } -table.summary a:link { color: #0000ff; } -table.summary a:visited { color: #204080; } - - -/* Details Tables (functions, variables, etc) - * - Each object is described in its own div. - * - A single-row summary table w/ table-header is used as - * a header for each details section (CSS style for table-header - * is defined above, under 'Table Headers'). - */ -table.details { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -table.details table { color: #000000; } -table.details a:link { color: #0000ff; } -table.details a:visited { color: #204080; } - -/* Fields */ -dl.fields { margin-left: 2em; margin-top: 1em; - margin-bottom: 1em; } -dl.fields dd ul { margin-left: 0em; padding-left: 0em; } -dl.fields dd ul li ul { margin-left: 2em; padding-left: 0em; } -div.fields { margin-left: 2em; } -div.fields p { margin-bottom: 0.5em; } - -/* Index tables (identifier index, term index, etc) - * - link-index is used for indices containing lists of links - * (namely, the identifier index & term index). - * - index-where is used in link indices for the text indicating - * the container/source for each link. - * - metadata-index is used for indices containing metadata - * extracted from fields (namely, the bug index & todo index). - */ -table.link-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; } -td.link-index { border-width: 0px; } -table.link-index a:link { color: #0000ff; } -table.link-index a:visited { color: #204080; } -span.index-where { font-size: 70%; } -table.metadata-index { border-collapse: collapse; - background: #e8f0f8; color: #000000; - border: 1px solid #608090; - margin: .2em 0 0 0; } -td.metadata-index { border-width: 1px; border-style: solid; } -table.metadata-index a:link { color: #0000ff; } -table.metadata-index a:visited { color: #204080; } - -/* Function signatures - * - sig* is used for the signature in the details section. - * - .summary-sig* is used for the signature in the summary - * table, and when listing property accessor functions. - * */ -.sig-name { color: #006080; } -.sig-arg { color: #008060; } -.sig-default { color: #602000; } -.summary-sig { font-family: monospace; } -.summary-sig-name { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:link - { color: #006080; font-weight: bold; } -table.summary a.summary-sig-name:visited - { color: #006080; font-weight: bold; } -.summary-sig-arg { color: #006040; } -.summary-sig-default { color: #501800; } - -/* Subclass list - */ -ul.subclass-list { display: inline; } -ul.subclass-list li { display: inline; } - -/* To render variables, classes etc. like functions */ -table.summary .summary-name { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:link { color: #006080; font-weight: bold; - font-family: monospace; } -table.summary - a.summary-name:visited { color: #006080; font-weight: bold; - font-family: monospace; } - -/* Variable values - * - In the 'variable details' sections, each varaible's value is - * listed in a 'pre.variable' box. The width of this box is - * restricted to 80 chars; if the value's repr is longer than - * this it will be wrapped, using a backslash marked with - * class 'variable-linewrap'. If the value's repr is longer - * than 3 lines, the rest will be ellided; and an ellipsis - * marker ('...' marked with 'variable-ellipsis') will be used. - * - If the value is a string, its quote marks will be marked - * with 'variable-quote'. - * - If the variable is a regexp, it is syntax-highlighted using - * the re* CSS classes. - */ -pre.variable { padding: .5em; margin: 0; - background: #dce4ec; color: #000000; - border: 1px solid #708890; } -.variable-linewrap { color: #604000; font-weight: bold; } -.variable-ellipsis { color: #604000; font-weight: bold; } -.variable-quote { color: #604000; font-weight: bold; } -.variable-group { color: #008000; font-weight: bold; } -.variable-op { color: #604000; font-weight: bold; } -.variable-string { color: #006030; } -.variable-unknown { color: #a00000; font-weight: bold; } -.re { color: #000000; } -.re-char { color: #006030; } -.re-op { color: #600000; } -.re-group { color: #003060; } -.re-ref { color: #404040; } - -/* Base tree - * - Used by class pages to display the base class hierarchy. - */ -pre.base-tree { font-size: 80%; margin: 0; } - -/* Frames-based table of contents headers - * - Consists of two frames: one for selecting modules; and - * the other listing the contents of the selected module. - * - h1.toc is used for each frame's heading - * - h2.toc is used for subheadings within each frame. - */ -h1.toc { text-align: center; font-size: 105%; - margin: 0; font-weight: bold; - padding: 0; } -h2.toc { font-size: 100%; font-weight: bold; - margin: 0.5em 0 0 -0.3em; } - -/* Syntax Highlighting for Source Code - * - doctest examples are displayed in a 'pre.py-doctest' block. - * If the example is in a details table entry, then it will use - * the colors specified by the 'table pre.py-doctest' line. - * - Source code listings are displayed in a 'pre.py-src' block. - * Each line is marked with 'span.py-line' (used to draw a line - * down the left margin, separating the code from the line - * numbers). Line numbers are displayed with 'span.py-lineno'. - * The expand/collapse block toggle button is displayed with - * 'a.py-toggle' (Note: the CSS style for 'a.py-toggle' should not - * modify the font size of the text.) - * - If a source code page is opened with an anchor, then the - * corresponding code block will be highlighted. The code - * block's header is highlighted with 'py-highlight-hdr'; and - * the code block's body is highlighted with 'py-highlight'. - * - The remaining py-* classes are used to perform syntax - * highlighting (py-string for string literals, py-name for names, - * etc.) - */ -pre.py-doctest { padding: .5em; margin: 1em; - background: #e8f0f8; color: #000000; - border: 1px solid #708890; } -table pre.py-doctest { background: #dce4ec; - color: #000000; } -pre.py-src { border: 2px solid #000000; - background: #f0f0f0; color: #000000; } -.py-line { border-left: 2px solid #000000; - margin-left: .2em; padding-left: .4em; } -.py-lineno { font-style: italic; font-size: 90%; - padding-left: .5em; } -a.py-toggle { text-decoration: none; } -div.py-highlight-hdr { border-top: 2px solid #000000; - border-bottom: 2px solid #000000; - background: #d8e8e8; } -div.py-highlight { border-bottom: 2px solid #000000; - background: #d0e0e0; } -.py-prompt { color: #005050; font-weight: bold;} -.py-more { color: #005050; font-weight: bold;} -.py-string { color: #006030; } -.py-comment { color: #003060; } -.py-keyword { color: #600000; } -.py-output { color: #404040; } -.py-name { color: #000050; } -.py-name:link { color: #000050 !important; } -.py-name:visited { color: #000050 !important; } -.py-number { color: #005000; } -.py-defname { color: #000060; font-weight: bold; } -.py-def-name { color: #000060; font-weight: bold; } -.py-base-class { color: #000060; } -.py-param { color: #000060; } -.py-docstring { color: #006030; } -.py-decorator { color: #804020; } -/* Use this if you don't want links to names underlined: */ -/*a.py-name { text-decoration: none; }*/ - -/* Graphs & Diagrams - * - These CSS styles are used for graphs & diagrams generated using - * Graphviz dot. 'img.graph-without-title' is used for bare - * diagrams (to remove the border created by making the image - * clickable). - */ -img.graph-without-title { border: none; } -img.graph-with-title { border: 1px solid #000000; } -span.graph-title { font-weight: bold; } -span.graph-caption { } - -/* General-purpose classes - * - 'p.indent-wrapped-lines' defines a paragraph whose first line - * is not indented, but whose subsequent lines are. - * - The 'nomargin-top' class is used to remove the top margin (e.g. - * from lists). The 'nomargin' class is used to remove both the - * top and bottom margin (but not the left or right margin -- - * for lists, that would cause the bullets to disappear.) - */ -p.indent-wrapped-lines { padding: 0 0 0 7em; text-indent: -7em; - margin: 0; } -.nomargin-top { margin-top: 0; } -.nomargin { margin-top: 0; margin-bottom: 0; } - -/* HTML Log */ -div.log-block { padding: 0; margin: .5em 0 .5em 0; - background: #e8f0f8; color: #000000; - border: 1px solid #000000; } -div.log-error { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffb0b0; color: #000000; - border: 1px solid #000000; } -div.log-warning { padding: .1em .3em .1em .3em; margin: 4px; - background: #ffffb0; color: #000000; - border: 1px solid #000000; } -div.log-info { padding: .1em .3em .1em .3em; margin: 4px; - background: #b0ffb0; color: #000000; - border: 1px solid #000000; } -h2.log-hdr { background: #70b0ff; color: #000000; - margin: 0; padding: 0em 0.5em 0em 0.5em; - border-bottom: 1px solid #000000; font-size: 110%; } -p.log { font-weight: bold; margin: .5em 0 .5em 0; } -tr.opt-changed { color: #000000; font-weight: bold; } -tr.opt-default { color: #606060; } -pre.log { margin: 0; padding: 0; padding-left: 1em; } diff --git a/MAFH2/fortuneengine/docs/epydoc/epydoc.js b/MAFH2/fortuneengine/docs/epydoc/epydoc.js deleted file mode 100644 index e787dbc..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/epydoc.js +++ /dev/null @@ -1,293 +0,0 @@ -function toggle_private() { - // Search for any private/public links on this page. Store - // their old text in "cmd," so we will know what action to - // take; and change their text to the opposite action. - var cmd = "?"; - var elts = document.getElementsByTagName("a"); - for(var i=0; i...
"; - elt.innerHTML = s; - } -} - -function toggle(id) { - elt = document.getElementById(id+"-toggle"); - if (elt.innerHTML == "-") - collapse(id); - else - expand(id); - return false; -} - -function highlight(id) { - var elt = document.getElementById(id+"-def"); - if (elt) elt.className = "py-highlight-hdr"; - var elt = document.getElementById(id+"-expanded"); - if (elt) elt.className = "py-highlight"; - var elt = document.getElementById(id+"-collapsed"); - if (elt) elt.className = "py-highlight"; -} - -function num_lines(s) { - var n = 1; - var pos = s.indexOf("\n"); - while ( pos > 0) { - n += 1; - pos = s.indexOf("\n", pos+1); - } - return n; -} - -// Collapse all blocks that mave more than `min_lines` lines. -function collapse_all(min_lines) { - var elts = document.getElementsByTagName("div"); - for (var i=0; i 0) - if (elt.id.substring(split, elt.id.length) == "-expanded") - if (num_lines(elt.innerHTML) > min_lines) - collapse(elt.id.substring(0, split)); - } -} - -function expandto(href) { - var start = href.indexOf("#")+1; - if (start != 0 && start != href.length) { - if (href.substring(start, href.length) != "-") { - collapse_all(4); - pos = href.indexOf(".", start); - while (pos != -1) { - var id = href.substring(start, pos); - expand(id); - pos = href.indexOf(".", pos+1); - } - var id = href.substring(start, href.length); - expand(id); - highlight(id); - } - } -} - -function kill_doclink(id) { - var parent = document.getElementById(id); - parent.removeChild(parent.childNodes.item(0)); -} -function auto_kill_doclink(ev) { - if (!ev) var ev = window.event; - if (!this.contains(ev.toElement)) { - var parent = document.getElementById(this.parentID); - parent.removeChild(parent.childNodes.item(0)); - } -} - -function doclink(id, name, targets_id) { - var elt = document.getElementById(id); - - // If we already opened the box, then destroy it. - // (This case should never occur, but leave it in just in case.) - if (elt.childNodes.length > 1) { - elt.removeChild(elt.childNodes.item(0)); - } - else { - // The outer box: relative + inline positioning. - var box1 = document.createElement("div"); - box1.style.position = "relative"; - box1.style.display = "inline"; - box1.style.top = 0; - box1.style.left = 0; - - // A shadow for fun - var shadow = document.createElement("div"); - shadow.style.position = "absolute"; - shadow.style.left = "-1.3em"; - shadow.style.top = "-1.3em"; - shadow.style.background = "#404040"; - - // The inner box: absolute positioning. - var box2 = document.createElement("div"); - box2.style.position = "relative"; - box2.style.border = "1px solid #a0a0a0"; - box2.style.left = "-.2em"; - box2.style.top = "-.2em"; - box2.style.background = "white"; - box2.style.padding = ".3em .4em .3em .4em"; - box2.style.fontStyle = "normal"; - box2.onmouseout=auto_kill_doclink; - box2.parentID = id; - - // Get the targets - var targets_elt = document.getElementById(targets_id); - var targets = targets_elt.getAttribute("targets"); - var links = ""; - target_list = targets.split(","); - for (var i=0; i" + - target[0] + ""; - } - - // Put it all together. - elt.insertBefore(box1, elt.childNodes.item(0)); - //box1.appendChild(box2); - box1.appendChild(shadow); - shadow.appendChild(box2); - box2.innerHTML = - "Which "+name+" do you want to see documentation for?" + - ""; - } - return false; -} - -function get_anchor() { - var href = location.href; - var start = href.indexOf("#")+1; - if ((start != 0) && (start != href.length)) - return href.substring(start, href.length); - } -function redirect_url(dottedName) { - // Scan through each element of the "pages" list, and check - // if "name" matches with any of them. - for (var i=0; i-m" or "-c"; - // extract the portion & compare it to dottedName. - var pagename = pages[i].substring(0, pages[i].length-2); - if (pagename == dottedName.substring(0,pagename.length)) { - - // We've found a page that matches `dottedName`; - // construct its URL, using leftover `dottedName` - // content to form an anchor. - var pagetype = pages[i].charAt(pages[i].length-1); - var url = pagename + ((pagetype=="m")?"-module.html": - "-class.html"); - if (dottedName.length > pagename.length) - url += "#" + dottedName.substring(pagename.length+1, - dottedName.length); - return url; - } - } - } diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine-module.html deleted file mode 100644 index ed9f616..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine-module.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - fortuneengine - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Package fortuneengine

source code

- - - - - - - -
- - - - - -
Submodules[hide private]
-
-
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None
- hash(x) -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine-pysrc.html deleted file mode 100644 index d9609e5..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine-pysrc.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - fortuneengine - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Package fortuneengine

-
- 1  #    FortuneEngine is free software: you can redistribute it and/or modify 
- 2  #    it under the terms of the GNU General Public License as published by 
- 3  #    the Free Software Foundation, either version 3 of the License, or 
- 4  #    (at your option) any later version. 
- 5  # 
- 6  #    FortuneEngine is distributed in the hope that it will be useful, 
- 7  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
- 8  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
- 9  #    GNU General Public License for more details. 
-10  # 
-11  #    You should have received a copy of the GNU General Public License 
-12  #    along with the FortuneEngine.  If not, see <http://www.gnu.org/licenses/>. 
-13  # 
-14  #    Author: Justin Lewis  <jlew.blackout@gmail.com> 
-15   
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableFontObject-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableFontObject-module.html deleted file mode 100644 index d8ead0c..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableFontObject-module.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - fortuneengine.DrawableFontObject - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module DrawableFontObject - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module DrawableFontObject

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - DrawableFontObject -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'fortuneengine' -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableFontObject-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableFontObject-pysrc.html deleted file mode 100644 index 4e13d2f..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableFontObject-pysrc.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - fortuneengine.DrawableFontObject - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module DrawableFontObject - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module fortuneengine.DrawableFontObject

-
- 1  import pygame 
- 2  from DrawableObject import DrawableObject 
- 3  
 
-
4 -class DrawableFontObject(DrawableObject, pygame.sprite.Sprite): -
5 -
6 - def __init__(self,text,font, x = 0, y = 0): -
7 - 8 self.font = font - 9 self.textImage = font.render(text, 1, (255,255,255)) -10 self.text = text -11 DrawableObject.__init__(self, [self.textImage], '') -
12 -
13 - def changeText(self, newText, color=(0,0,0)): -
14 self.text = newText -15 self._images[0] = self.font.render(str(newText), True, color) -16 self.image = self._images[0] -
17 -
18 - def getText(self): -
19 return str(self.text) -
20 -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableFontObject.DrawableFontObject-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableFontObject.DrawableFontObject-class.html deleted file mode 100644 index 4692c9a..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableFontObject.DrawableFontObject-class.html +++ /dev/null @@ -1,315 +0,0 @@ - - - - - fortuneengine.DrawableFontObject.DrawableFontObject - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module DrawableFontObject :: - Class DrawableFontObject - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DrawableFontObject

source code

-
-               object --+        
-                        |        
-     pygame.sprite.Sprite --+    
-                            |    
-DrawableObject.DrawableObject --+
-                                |
-                   object --+   |
-                            |   |
-         pygame.sprite.Sprite --+
-                                |
-                               DrawableFontObject
-
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - text, - font, - x=0, - y=0)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- source code - -
- -
-   - - - - - - -
changeText(self, - newText, - color=(0, 0, 0)) - source code - -
- -
-   - - - - - - -
getText(self) - source code - -
- -
-

Inherited from DrawableObject.DrawableObject: - addImages, - calcColorKey, - fill, - getRotation, - getXPos, - getXSize, - getYPos, - getYSize, - goToAnim, - goToFrame, - makeTransparent, - nextCurrentAnimFrame, - nextFrame, - nudge, - repopulateImages, - rotate, - scale, - setColorKey, - setPosition, - update -

-

Inherited from pygame.sprite.Sprite: - __repr__, - add, - add_internal, - alive, - groups, - kill, - remove, - remove_internal -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - text, - font, - x=0, - y=0) -
(Constructor) -

-
source code  -
- -

x.__init__(...) initializes x; see x.__class__.__doc__ for - signature

-
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableObject-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableObject-module.html deleted file mode 100644 index 8f6de81..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableObject-module.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - fortuneengine.DrawableObject - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module DrawableObject - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module DrawableObject

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - DrawableObject -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'fortuneengine' -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableObject-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableObject-pysrc.html deleted file mode 100644 index 2063d7b..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableObject-pysrc.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - fortuneengine.DrawableObject - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module DrawableObject - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module fortuneengine.DrawableObject

-
-  1  import pygame 
-  2  
 
-
3 -class DrawableObject(pygame.sprite.Sprite): -
4 -
5 - def __init__(self, images, textfileName, transparent = False, x = 0, y = 0): -
6 pygame.sprite.Sprite.__init__(self) - 7 - 8 self._images = [] - 9 self._origImages = [] - 10 for i in range(len(images)): - 11 self._images.append(images[i].convert_alpha()) - 12 self._origImages.append(images[i].convert_alpha()) - 13 - 14 blank = pygame.Surface((0,0)) - 15 - 16 if(transparent): - 17 for i in range(len(images)): - 18 self._images[i] = blank - 19 - 20 self._start = pygame.time.get_ticks() - 21 self.image = self._images[0] - 22 self._last_update = 0 - 23 self._frame = 0 - 24 self.animations = {} - 25 self._current_anim = "" - 26 self.rect = self.image.get_rect() - 27 self.xPos = x - 28 self.yPos = y - 29 self.myAngle = 0 - 30 self.xSize = self.image.get_width() - 31 self.ySize = self.image.get_height() - 32 self.rect.topleft = (x,y) - 33 - 34 if textfileName != '': - 35 - 36 f = open(textfileName, 'r') - 37 currentLine = f.readline() - 38 while currentLine != '': - 39 - 40 animValues = currentLine.split(",") - 41 self.animations[animValues[0]] = [int(animValues[1]), int(animValues[2])] - 42 currentLine = f.readline() - 43 - 44 else: - 45 - 46 self.animations["anim1"] = [0, len(self._images)] - 47 self.goToAnim("anim1") - 48 - 49 self.makeTransparent(transparent) -
50 -
51 - def repopulateImages(self, newImages): -
52 - 53 self._images = [] - 54 self._origImages = [] - 55 for i in range(len(newImages)): - 56 self._images.append(newImages[i].convert_alpha()) - 57 self._origImages.append(newImages[i].convert_alpha()) - 58 - 59 self.image = self._images[0] - 60 self._frame = 0 - 61 self.xSize = self.image.get_width() - 62 self.ySize = self.image.get_height() -
63 -
64 - def addImages(self, images): -
65 self._images.extend(images) - 66 self._origImages.extend(images) -
67 -
68 - def goToAnim(self, animName): -
69 if self.animations.get(animName, 0) != 0: - 70 self._current_anim = animName - 71 self._frame = self.animations[animName][0] - 72 self.image = self._images[self._frame] -
73 -
74 - def goToFrame(self, frame): -
75 - 76 if frame <= len(self._images): - 77 self._frame = frame - 78 self.image = self._images[self._frame] -
79 -
80 - def nudge(self, x, y): -
81 self.xPos += x - 82 self.yPos += y - 83 self.rect.right += x - 84 self.rect.top += y -
85 -
86 - def scale(self, x=None, y=None): -
87 if type(x).__name__=='int': self.xSize = x - 88 if type(y).__name__=='int': self.ySize = y - 89 - 90 for i in range(len(self._images)): - 91 self._origImages[i] = pygame.transform.scale(self._origImages[i], (self.xSize, self.ySize)) - 92 self._images[i] = self._origImages[i] -
93 -
94 - def fill(self, color): -
95 for i in range(len(self._images)): - 96 #print "filling with ", color - 97 self._origImages[i].fill(color) - 98 self._images[i].fill(color) -
99 -
100 - def getXSize(self): -
101 return self.xSize -
102 -
103 - def getYSize(self): -
104 return self.ySize -
105 -
106 - def rotate(self,angle): -
107 self.myAngle += angle -108 for i in range(len(self._images)): -109 self._images[i] = pygame.transform.rotate(self._origImages[i], self.myAngle) -
110 -
111 - def getRotation(self): -
112 return self.myAngle -
113 -
114 - def setPosition(self, x = None, y = None): -
115 if type(x).__name__=='int': self.xPos = x -116 if type(y).__name__=='int': self.yPos = y -117 self.rect.topleft = (self.xPos, self.yPos) -
118 -
119 - def getXPos(self): -
120 return self.xPos -
121 -
122 - def getYPos(self): -
123 return self.yPos -
124 -
125 - def calcColorKey(self, x=0, y=0): -
126 myColorKey = images[0].get_at((x,y)) -127 setColorKey(myColorKey) -
128 -
129 - def makeTransparent(self, bool = True): -
130 if bool == True: -131 surf = pygame.Surface((0,0)) -132 for i in range(len(self._images)): -133 self._images[i] = surf -134 else: -135 for i in range(len(self._images)): -136 self._images[i] = self._origImages[i] -137 self.image = self._images[self._frame] -
138 -
139 - def setColorKey(self, aColor): -
140 for i in range(len(self._images)): -141 self._images[i].set_colorkey(aColor) -
142 -
143 - def update(self, t=None): -
144 timePassed = t + self._last_update -145 -146 if (timePassed) > 200: -147 -148 self.image = self._images[self._frame] -149 self._last_update = timePassed%1000 -150 else: -151 self._last_update = timePassed -
152 -
153 - def nextFrame(self): -
154 pass -
155 -
156 - def nextCurrentAnimFrame(self): -
157 pass -
158 -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableObject.DrawableObject-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableObject.DrawableObject-class.html deleted file mode 100644 index 3eeadab..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DrawableObject.DrawableObject-class.html +++ /dev/null @@ -1,628 +0,0 @@ - - - - - fortuneengine.DrawableObject.DrawableObject - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module DrawableObject :: - Class DrawableObject - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DrawableObject

source code

-
-          object --+    
-                   |    
-pygame.sprite.Sprite --+
-                       |
-                      DrawableObject
-
- -
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - images, - textfileName, - transparent=False, - x=0, - y=0)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- source code - -
- -
-   - - - - - - -
repopulateImages(self, - newImages) - source code - -
- -
-   - - - - - - -
addImages(self, - images) - source code - -
- -
-   - - - - - - -
goToAnim(self, - animName) - source code - -
- -
-   - - - - - - -
goToFrame(self, - frame) - source code - -
- -
-   - - - - - - -
nudge(self, - x, - y) - source code - -
- -
-   - - - - - - -
scale(self, - x=None, - y=None) - source code - -
- -
-   - - - - - - -
fill(self, - color) - source code - -
- -
-   - - - - - - -
getXSize(self) - source code - -
- -
-   - - - - - - -
getYSize(self) - source code - -
- -
-   - - - - - - -
rotate(self, - angle) - source code - -
- -
-   - - - - - - -
getRotation(self) - source code - -
- -
-   - - - - - - -
setPosition(self, - x=None, - y=None) - source code - -
- -
-   - - - - - - -
getXPos(self) - source code - -
- -
-   - - - - - - -
getYPos(self) - source code - -
- -
-   - - - - - - -
calcColorKey(self, - x=0, - y=0) - source code - -
- -
-   - - - - - - -
makeTransparent(self, - bool=True) - source code - -
- -
-   - - - - - - -
setColorKey(self, - aColor) - source code - -
- -
-   - - - - - - -
update(self, - t=None)
- method to control sprite behavior Sprite.update(*args):
- source code - -
- -
-   - - - - - - -
nextFrame(self) - source code - -
- -
-   - - - - - - -
nextCurrentAnimFrame(self) - source code - -
- -
-

Inherited from pygame.sprite.Sprite: - __repr__, - add, - add_internal, - alive, - groups, - kill, - remove, - remove_internal -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - images, - textfileName, - transparent=False, - x=0, - y=0) -
(Constructor) -

-
source code  -
- -

x.__init__(...) initializes x; see x.__class__.__doc__ for - signature

-
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

update(self, - t=None) -

-
source code  -
- -

method to control sprite behavior Sprite.update(*args):

-

The default implementation of this method does nothing; it's just a - convenient "hook" that you can override. This method is called - by Group.update() with whatever arguments you give it.

-

There is no need to use this method if not using the convenience - method by the same name in the Group class.

-
-
Overrides: - pygame.sprite.Sprite.update -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DynamicDrawableObject-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DynamicDrawableObject-module.html deleted file mode 100644 index 982466b..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DynamicDrawableObject-module.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - fortuneengine.DynamicDrawableObject - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module DynamicDrawableObject - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module DynamicDrawableObject

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - DynamicDrawableObject -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'fortuneengine' -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DynamicDrawableObject-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DynamicDrawableObject-pysrc.html deleted file mode 100644 index 1a89b18..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DynamicDrawableObject-pysrc.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - fortuneengine.DynamicDrawableObject - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module DynamicDrawableObject - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module fortuneengine.DynamicDrawableObject

-
- 1  import pygame 
- 2  from DrawableObject import DrawableObject 
- 3  
 
-
4 -class DynamicDrawableObject(DrawableObject, pygame.sprite.Sprite): -
5 -
6 - def __init__(self,images,textfileName,fps = 10, x = 0, y = 0, xVelocity = 0, yVelocity = 0): -
7 - 8 self._delay = 1000/fps - 9 DrawableObject.__init__(self, images, textfileName, x, y) -
10 -
11 - def addImages(self, images): -
12 -13 self._images.extend(images) -
14 -
15 - def setSpeed(self, xVelocity = None, yVelocity = None): -
16 -17 if xVelocity != None: self.xSpeed = xVelocity -18 if yVelocity != None: self.ySpeed = yVelocity -
19 -
20 - def getXSpeed(self): -
21 -22 return self.xSpeed -
23 -
24 - def getYSpeed(self): -
25 -26 return self.ySpeed -
27 -
28 - def move(self): -
29 self.xPos += self.xSpeed -30 self.yPos += self.ySpeed -31 self.rect.right += self.xSpeed -32 self.rect.top += self.ySpeed -
33 -
34 - def update(self, t): -
35 -36 timePassed = t + self._last_update -37 -38 if (timePassed) > self._delay: -39 if self._frame < self.animations.get(self._current_anim)[0] or self._frame > self.animations.get(self._current_anim)[1]: -40 self._frame = self.animations.get(self._current_anim)[0] - 1 -41 -42 self._frame += timePassed/self._delay -43 -44 if self._frame >= self.animations.get(self._current_anim)[1]: -45 self._frame = self._frame%(self.animations.get(self._current_anim)[1]) -46 -47 self.image = self._images[self._frame] -48 self._last_update = timePassed%self._delay -49 else: -50 self._last_update = timePassed -
51 -
52 - def nextFrame(self): -
53 self._frame += 1 -54 if self._frame >= len(self._images): -55 framesPast = self._frame - len(self._images) -56 self._frame = framesPast -57 -58 self.image = self._images[self._frame] -
59 -
60 - def nextCurrentAnimFrame(self): -
61 -62 for cnt in range(len(animations)): -63 -64 if animations[cnt] == self._current_anim: -65 if self._frame < self.animations[self._current_anim][0] or self._frame > self.animations[self._current_anim][1]: -66 self._frame = self.animations[self._current_anim][0] -67 -68 else: self._frame += 1 -69 -70 if self._frame > self.animations[self._current_anim][1]: -71 framesPast = self._frame - self.animations[self._current_anim][1] -72 self._frame = framesPast - 1 + self.animations[self._current_anim][0] -73 -74 self.image = self._images[self._frame] -
75 -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html deleted file mode 100644 index dff3fa0..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.DynamicDrawableObject.DynamicDrawableObject-class.html +++ /dev/null @@ -1,512 +0,0 @@ - - - - - fortuneengine.DynamicDrawableObject.DynamicDrawableObject - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module DynamicDrawableObject :: - Class DynamicDrawableObject - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class DynamicDrawableObject

source code

-
-               object --+        
-                        |        
-     pygame.sprite.Sprite --+    
-                            |    
-DrawableObject.DrawableObject --+
-                                |
-                   object --+   |
-                            |   |
-         pygame.sprite.Sprite --+
-                                |
-                               DynamicDrawableObject
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - images, - textfileName, - fps=10, - x=0, - y=0, - xVelocity=0, - yVelocity=0)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- source code - -
- -
-   - - - - - - -
addImages(self, - images) - source code - -
- -
-   - - - - - - -
setSpeed(self, - xVelocity=None, - yVelocity=None) - source code - -
- -
-   - - - - - - -
getXSpeed(self) - source code - -
- -
-   - - - - - - -
getYSpeed(self) - source code - -
- -
-   - - - - - - -
move(self) - source code - -
- -
-   - - - - - - -
update(self, - t)
- method to control sprite behavior Sprite.update(*args):
- source code - -
- -
-   - - - - - - -
nextFrame(self) - source code - -
- -
-   - - - - - - -
nextCurrentAnimFrame(self) - source code - -
- -
-

Inherited from DrawableObject.DrawableObject: - calcColorKey, - fill, - getRotation, - getXPos, - getXSize, - getYPos, - getYSize, - goToAnim, - goToFrame, - makeTransparent, - nudge, - repopulateImages, - rotate, - scale, - setColorKey, - setPosition -

-

Inherited from pygame.sprite.Sprite: - __repr__, - add, - add_internal, - alive, - groups, - kill, - remove, - remove_internal -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - images, - textfileName, - fps=10, - x=0, - y=0, - xVelocity=0, - yVelocity=0) -
(Constructor) -

-
source code  -
- -

x.__init__(...) initializes x; see x.__class__.__doc__ for - signature

-
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

addImages(self, - images) -

-
source code  -
- - -
-
Overrides: - DrawableObject.DrawableObject.addImages -
-
-
-
- -
- -
- - -
-

update(self, - t) -

-
source code  -
- -

method to control sprite behavior Sprite.update(*args):

-

The default implementation of this method does nothing; it's just a - convenient "hook" that you can override. This method is called - by Group.update() with whatever arguments you give it.

-

There is no need to use this method if not using the convenience - method by the same name in the Group class.

-
-
Overrides: - pygame.sprite.Sprite.update -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

nextFrame(self) -

-
source code  -
- - -
-
Overrides: - DrawableObject.DrawableObject.nextFrame -
-
-
-
- -
- -
- - -
-

nextCurrentAnimFrame(self) -

-
source code  -
- - -
-
Overrides: - DrawableObject.DrawableObject.nextCurrentAnimFrame -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngine-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngine-module.html deleted file mode 100644 index 20e38f2..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngine-module.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - fortuneengine.GameEngine - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameEngine - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module GameEngine

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - GameEngine
- The Fortune Engine GameEngine is a main loop wrapper around pygame. -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'fortuneengine' -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngine-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngine-pysrc.html deleted file mode 100644 index 3f3f46b..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngine-pysrc.html +++ /dev/null @@ -1,637 +0,0 @@ - - - - - fortuneengine.GameEngine - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameEngine - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module fortuneengine.GameEngine

-
-  1  #    FortuneEngine is free software: you can redistribute it and/or modify 
-  2  #    it under the terms of the GNU General Public License as published by 
-  3  #    the Free Software Foundation, either version 3 of the License, or 
-  4  #    (at your option) any later version. 
-  5  # 
-  6  #    FortuneEngine is distributed in the hope that it will be useful, 
-  7  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
-  8  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-  9  #    GNU General Public License for more details. 
- 10  # 
- 11  #    You should have received a copy of the GNU General Public License 
- 12  #    along with the FortuneEngine.  If not, see <http://www.gnu.org/licenses/>. 
- 13  # 
- 14  #    Author: Justin Lewis  <jlew.blackout@gmail.com> 
- 15   
- 16  import pygame 
- 17  from time import time 
- 18  from GameEngineConsole import GameEngineConsole 
- 19  from GameInspect import GameInspect 
- 20  from DrawableFontObject import DrawableFontObject 
- 21  from Scene import Scene 
- 22   
- 23   
-
24 -class GameEngine(object): -
25 """ - 26 The Fortune Engine GameEngine is a main loop wrapper around pygame. - 27 It manages the event and drawing loops allowing the user to just - 28 register for user events and drawing time in the draw loop. - 29 """ - 30 instance = None - 31 -
32 - def __init__(self, width=1200, height=900, always_draw=False, - 33 fps_cap=15, version=False, title="FortuneEngine"): -
34 """ - 35 Constructor for the game engine. - 36 - 37 @param width: Window width - 38 @param height: Window height - 39 @param always_draw: Boolean to set the animation mode to always - 40 draw vs draw when set_dirty is called - 41 @param fps_cap: Sets the framerate cap. Set to 0 to disable - 42 the cap. Warning: setting the cap to 0 when - 43 always draw = False will cause cpu 100% when - 44 not driving. - 45 @param version: If true, use new rendering system, false uses - 46 only the draw system - 47 @param title: Window Title - 48 """ - 49 GameEngine.instance = self - 50 pygame.init() - 51 pygame.mouse.set_visible(False) - 52 self.__version = version #true is new, false is old - 53 - 54 # Window Settings - 55 self.width = width - 56 self.height = height - 57 size = width, height - 58 self.screen = pygame.display.set_mode(size) - 59 pygame.display.set_caption(title) - 60 self.__fps = DrawableFontObject("", pygame.font.Font(None, 17)) - 61 self.__fps.setPosition(0, 0) - 62 self.__scene = Scene(self.__fps) - 63 - 64 # Engine Internal Variables - 65 self.__fps_cap = fps_cap - 66 self.__showfps = False - 67 self.__dirty = True - 68 self.__always_draw = always_draw - 69 self.__font = pygame.font.Font(None, 17) - 70 self.__run_event = False - 71 - 72 # Variables to hold game engine elements and callbacks - 73 self.__event_cb = [] - 74 self.__draw_lst = [] - 75 self.__object_hold = {} - 76 - 77 - 78 # Game Timers - 79 self.__active_event_timers = [] - 80 self.__active_event_timers_tick = [] - 81 - 82 # Game Clock - 83 self.clock = pygame.time.Clock() - 84 self.__tick_time = 0 - 85 - 86 # Inspector - 87 self._inspector = GameInspect(self.__object_hold) - 88 - 89 # Time Profiler Timers - 90 self.__draw_time = {} - 91 self.__draw_calls = {} - 92 self.__event_time = {} - 93 self.__event_calls = {} - 94 self.__timer_time = {} - 95 self.__timer_calls = {} - 96 - 97 # Initialize Py Console - 98 self.console = GameEngineConsole(self, (0, 0, width, height / 2)) - 99 -100 # Disable Mouse Usage -101 # TODO Allow mouse motion on request -102 pygame.event.set_blocked(pygame.MOUSEMOTION) -
103 -
104 - def set_dirty(self): -
105 """ -106 Sets the dirty flag to force the engine to draw the next time -107 it enters the draw flag. -108 """ -109 self.__dirty = True -
110 -
111 - def get_scene(self): -
112 """ -113 Returns the scene object -114 -115 @return: Returns the scene object held by the game engine -116 """ -117 return self.__scene -
118 -
119 - def start_event_timer(self, function_cb, time): -
120 """ -121 Starts a timer that fires a user event into the queue every "time" -122 milliseconds -123 -124 @param function_cb: The function to call when timer fires -125 @param time: Milliseconds between fires -126 """ -127 avail_timer = len(self.__active_event_timers) -128 -129 if avail_timer + pygame.USEREVENT < pygame.NUMEVENTS: -130 if function_cb not in self.__active_event_timers: -131 self.__timer_time[str(function_cb)] = 0 -132 self.__timer_calls[str(function_cb)] = 0 -133 -134 self.__active_event_timers.append(function_cb) -135 self.__active_event_timers_tick.append(time) -136 pygame.time.set_timer(pygame.USEREVENT + avail_timer, time) -137 else: -138 print "ERROR TIMER IN LIST" -139 else: -140 print "Ran out of timers :(" -141 self.stop_event_loop() -
142 -
143 - def stop_event_timer(self, function_cb): -
144 """ -145 Stops the timer that has id from firing -146 -147 @param function_cb: The function registered with the timer that -148 should be canceled -149 """ -150 try: -151 timer_id = self.__active_event_timers.index(function_cb) -152 except ValueError: -153 return -154 -155 pygame.time.set_timer(pygame.USEREVENT + timer_id, 0) -156 del self.__active_event_timers[timer_id] -157 del self.__active_event_timers_tick[timer_id] -158 -159 # Timers have been removed, now need to clear any events -160 # already fired and in the queue -161 pygame.event.clear(pygame.USEREVENT + timer_id) -
162 -
163 - def list_event_timers(self): -
164 """ -165 returns a list of configured timers, if the timers has a time of 0 the -166 timer is disabled -167 """ -168 timer_list = "Event Timers:\n" -169 i = 0 -170 for timer_item in self.__active_event_timers: -171 timer_list += "\t%d: %d\n" % (timer_item, -172 self.__active_event_timers_tick[i]) -173 i = i + 1 -174 -175 return timer_list -
176 -
177 - def list_timer_time(self): -
178 """ -179 Returns a string representation of the time the game spends -180 in each timer callback. -181 """ -182 mystr = "Timer Times:\n\tName\tCalls\tTotal Time\tAvg" -183 for key in self.__timer_time: -184 timer_times = self.__timer_time[key] -185 timer_calls = self.__timer_calls[key] -186 if timer_calls == 0: -187 avg = 0 -188 else: -189 avg = timer_times / timer_calls -190 -191 mystr = "%s\n\t%s\n\t\t%d\t%f\t%f" % \ -192 (mystr, key, timer_calls, timer_times, avg) -193 return mystr -
194 -
195 - def start_main_loop(self): -
196 """ -197 Starts the game loop. -198 -199 This function does not return until after the game loop exits -200 """ -201 self.__run_event = True -202 self._event_loop() -
203 -
204 - def _draw(self, tick_time): -
205 """ -206 Draws all elements in draw callback to the screen -207 -208 @param tick_time: The amount of time passed since last -209 draw cycle. (should be produced by -210 pygamme.clock.tick method) -211 """ -212 screen = self.screen -213 -214 # If console is active, we want to draw console, pausing -215 # game drawing (events are still being fired, just no -216 # draw updates. -217 if self.__version: -218 if self.console.active: -219 self.console.draw() -220 pygame.display.flip() -221 else: -222 for fnc in self.__draw_lst: -223 start = time() -224 fnc() -225 self.__draw_time[str(fnc)] += time() - start -226 self.__draw_calls[str(fnc)] += 1 -227 # Print Frame Rate -228 if self.__showfps: -229 self.__fps.changeText('FPS: %d' % self.clock.get_fps(), -230 (255, 255, 255)) -231 else: -232 self.__fps.changeText('') -233 self.__scene.update(tick_time) -234 pygame.display.update(self.__scene.draw(screen)) -235 else: -236 if self.console.active: -237 self.console.draw() -238 pygame.display.flip() -239 else: -240 for fnc in self.__draw_lst: -241 start = time() -242 fnc(screen, tick_time) -243 self.__draw_time[str(fnc)] += time() - start -244 self.__draw_calls[str(fnc)] += 1 -245 # Print Frame Rate -246 if self.__showfps: -247 text = self.__font.render('FPS: %d' % \ -248 self.clock.get_fps(), False, (255, 255, 255), -249 (159, 182, 205)) -250 screen.blit(text, (0, 0)) -251 pygame.display.flip() -
252 -
253 - def _event_loop(self): -
254 """ -255 The main event loop. -256 """ -257 while self.__run_event: -258 -259 event = pygame.event.poll() -260 -261 # Handle Game Quit Message -262 if event.type == pygame.QUIT: -263 self.__run_event = False -264 -265 # No-Op sent, draw if set to always draw -266 elif event.type == pygame.NOEVENT: -267 # Tick even if not drawing -268 # We want to pause the cpu from getting into a -269 # 100% usage looping on the poll until something -270 # becomes dirty -271 self.__tick_time += self.clock.tick(self.__fps_cap) -272 if self.__always_draw or self.__dirty: -273 self.__dirty = False -274 self._draw(self.__tick_time) -275 self.__tick_time = 0 -276 -277 -278 # Handle User event Timers -279 elif event.type >= pygame.USEREVENT and \ -280 event.type < pygame.NUMEVENTS: -281 -282 timer_id = event.type - pygame.USEREVENT -283 -284 # Call timer -285 str_rep = str(self.__active_event_timers[timer_id]) -286 start = time() -287 self.__active_event_timers[timer_id]() -288 self.__timer_time[str_rep] += time() - start -289 self.__timer_calls[str_rep] += 1 -290 -291 # Check if we should activate the console -292 elif event.type == pygame.KEYDOWN and event.key == pygame.K_w \ -293 and pygame.key.get_mods() & pygame.KMOD_CTRL: -294 self.console.set_active() -295 self.set_dirty() -296 -297 # Pass event to console -298 elif self.console.process_input(event): -299 self.set_dirty() -300 -301 # Pass events to all others -302 else: -303 # Make a copy first so that adding events don't get fired -304 # right away -305 list_cp = self.__event_cb[:] -306 -307 # Reverse list so that newest stuff is on top -308 # TODO: cache this list -309 list_cp.reverse() -310 -311 for cb in list_cp: -312 # Fire the event for all in cb and stop -313 # if the callback returns True -314 start = time() -315 retur_val = cb(event) -316 self.__event_time[str(cb)] += time() - start -317 self.__event_calls[str(cb)] += 1 -318 -319 if retur_val: -320 break -
321 -
322 - def stop_event_loop(self): -
323 """ -324 Sends a pygame.QUIT event into the event queue which -325 exits the event loop -326 """ -327 pygame.event.post(pygame.event.Event(pygame.QUIT)) -
328 -
329 - def add_event_callback(self, cb): -
330 """ -331 Adds event callback to the event callback stack -332 -333 @param cb: Callback to be added to the stack when events are fired. -334 """ -335 self.__event_time[str(cb)] = 0 -336 self.__event_calls[str(cb)] = 0 -337 self.__event_cb.append(cb) -
338 -
339 - def remove_event_callback(self, cb): -
340 """ -341 Removes an event from the event callback stack -342 -343 @param cb: The callback to remove from the event callback stack -344 @return: Returns true if successful in removing callback -345 """ -346 try: -347 self.__event_cb.remove(cb) -348 return True -349 except: -350 return False -
351 -
352 - def list_event_callbacks(self): -
353 """ -354 Returns a string representation of all events registered with the game -355 engine -356 """ -357 event_callbacks = "Event Listeners:\n" -358 for eventlst in self.__event_cb: -359 event_callbacks = "%s\t%s\n" % (event_callbacks, str(eventlst)) -360 return event_callbacks -
361 -
362 - def list_event_time(self): -
363 """ -364 Returns a string representation of the time the game spends -365 in each event callback. -366 """ -367 mystr = "Event Times:\n\tName\tCalls\tTotal Time\tAvg" -368 for key in self.__event_time: -369 event_times = self.__event_time[key] -370 event_calls = self.__event_calls[key] -371 if event_calls == 0: -372 avg = 0 -373 else: -374 avg = event_times / event_calls -375 -376 mystr = "%s\n\t%s\n\t\t%d\t%f\t%f" % \ -377 (mystr, key, event_calls, event_times, avg) -378 return mystr -
379 -
380 - def add_draw_callback(self, fnc): -
381 """ -382 Adds a callback to the draw list. Function will be passed the -383 game screen it should draw too. -384 -385 @param fnc: The function to call when system is drawing -386 """ -387 -388 self.__draw_time[str(fnc)] = 0 -389 self.__draw_calls[str(fnc)] = 0 -390 self.__draw_lst.append(fnc) -
391 -
392 - def pop_draw_callback(self): -
393 """ -394 Removes top of draw stack and returns it -395 -396 @return: Returns the top callback function that was removed -397 """ -398 return self.__draw_lst.pop() -
399 -
400 - def clear_draw_callback(self): -
401 """ -402 Empties draw callback stack -403 """ -404 self.__draw_lst = [] -
405 -
406 - def remove_draw_callback(self, fnc): -
407 """ -408 Removes a draw callback from the game engine draw function -409 -410 @param fnc: The callback function to remove -411 @return: Returns true if successful removal of the function -412 """ -413 try: -414 self.__draw_lst.remove(fnc) -415 return True -416 except: -417 return False -
418 -
419 - def list_draw_callbacks(self): -
420 """ -421 Lists all the draw callbacks currently registered with the game engine -422 """ -423 -424 callbacks = "Draw Callbacks:\n" -425 for eventlst in self.__draw_lst: -426 callbacks += "\t%s\n" % str(eventlst) -427 return callbacks -
428 -
429 - def list_draw_time(self): -
430 """ -431 Returns a string representation of the time the game spends -432 in each drawing callback. -433 """ -434 mystr = "Drawing Times:\n\tName\tCalls\tTotal Time\tAvg" -435 for key in self.__draw_time: -436 draw_times = self.__draw_time[key] -437 draw_calls = self.__draw_calls[key] -438 if draw_calls == 0: -439 avg = 0 -440 else: -441 avg = draw_times / draw_calls -442 -443 mystr = "%s\n\t%s\n\t\t%d\t%f\t%f" % \ -444 (mystr, key, draw_calls, draw_times, avg) -445 return mystr -
446 -
447 - def has_object(self, name): -
448 """ -449 Returns true if object is stored in game engine -450 -451 @param name: Name of the object to check if exists -452 @return: Returns true if object found -453 """ -454 return name in self.__object_hold -
455 -
456 - def add_object(self, name, obj): -
457 """ -458 Adds an object to the game engine datastore -459 -460 @param name: The name used to store the object -461 @param obj: The object to store -462 """ -463 self.__object_hold[name] = obj -
464 -
465 - def get_object(self, name): -
466 """ -467 Returns an object from the game engine datastore -468 -469 @param name: The name of object to return -470 @return: Returns the object -471 """ -472 return self.__object_hold[name] -
473 -
474 - def remove_object(self, name): -
475 """ -476 Removes an object from the game engine datastore -477 -478 @param name: The name of the object to remove -479 """ -480 del self.__object_hold[name] -
481 -
482 - def list_objects(self): -
483 """ -484 Returns a sting of registered objects -485 """ -486 objlist = "Objects Registered:\n" -487 for eventlst in self.__object_hold: -488 objlist += "\t%s\n" % str(eventlst) -489 return objlist -
490 -
491 - def toggle_fps(self): -
492 """ -493 Toggles fps display -494 """ -495 self.__showfps = not self.__showfps -
496 -
497 - def art_scale(self, original, expected, width=True): -
498 if width: -499 return int(self.width / float(expected) * float(original)) -500 else: -501 -502 return int(self.height / float(expected) * float(original)) -
503 -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngine.GameEngine-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngine.GameEngine-class.html deleted file mode 100644 index d06467c..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngine.GameEngine-class.html +++ /dev/null @@ -1,1111 +0,0 @@ - - - - - fortuneengine.GameEngine.GameEngine - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameEngine :: - Class GameEngine - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class GameEngine

source code

-
-object --+
-         |
-        GameEngine
-
- -
-

The Fortune Engine GameEngine is a main loop wrapper around pygame. It - manages the event and drawing loops allowing the user to just register - for user events and drawing time in the draw loop.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - width=1200, - height=900, - always_draw=False, - fps_cap=15, - version=False, - title='FortuneEngine')
- Constructor for the game engine.
- source code - -
- -
-   - - - - - - -
set_dirty(self)
- Sets the dirty flag to force the engine to draw the next time it - enters the draw flag.
- source code - -
- -
-   - - - - - - -
get_scene(self)
- Returns the scene object
- source code - -
- -
-   - - - - - - -
start_event_timer(self, - function_cb, - time)
- Starts a timer that fires a user event into the queue every - "time" milliseconds
- source code - -
- -
-   - - - - - - -
stop_event_timer(self, - function_cb)
- Stops the timer that has id from firing
- source code - -
- -
-   - - - - - - -
list_event_timers(self)
- returns a list of configured timers, if the timers has a time of 0 - the timer is disabled
- source code - -
- -
-   - - - - - - -
list_timer_time(self)
- Returns a string representation of the time the game spends in each - timer callback.
- source code - -
- -
-   - - - - - - -
start_main_loop(self)
- Starts the game loop.
- source code - -
- -
-   - - - - - - -
_draw(self, - tick_time)
- Draws all elements in draw callback to the screen
- source code - -
- -
-   - - - - - - -
_event_loop(self)
- The main event loop.
- source code - -
- -
-   - - - - - - -
stop_event_loop(self)
- Sends a pygame.QUIT event into the event queue which exits the event - loop
- source code - -
- -
-   - - - - - - -
add_event_callback(self, - cb)
- Adds event callback to the event callback stack
- source code - -
- -
-   - - - - - - -
remove_event_callback(self, - cb)
- Removes an event from the event callback stack
- source code - -
- -
-   - - - - - - -
list_event_callbacks(self)
- Returns a string representation of all events registered with the - game engine
- source code - -
- -
-   - - - - - - -
list_event_time(self)
- Returns a string representation of the time the game spends in each - event callback.
- source code - -
- -
-   - - - - - - -
add_draw_callback(self, - fnc)
- Adds a callback to the draw list.
- source code - -
- -
-   - - - - - - -
pop_draw_callback(self)
- Removes top of draw stack and returns it
- source code - -
- -
-   - - - - - - -
clear_draw_callback(self)
- Empties draw callback stack
- source code - -
- -
-   - - - - - - -
remove_draw_callback(self, - fnc)
- Removes a draw callback from the game engine draw function
- source code - -
- -
-   - - - - - - -
list_draw_callbacks(self)
- Lists all the draw callbacks currently registered with the game - engine
- source code - -
- -
-   - - - - - - -
list_draw_time(self)
- Returns a string representation of the time the game spends in each - drawing callback.
- source code - -
- -
-   - - - - - - -
has_object(self, - name)
- Returns true if object is stored in game engine
- source code - -
- -
-   - - - - - - -
add_object(self, - name, - obj)
- Adds an object to the game engine datastore
- source code - -
- -
-   - - - - - - -
get_object(self, - name)
- Returns an object from the game engine datastore
- source code - -
- -
-   - - - - - - -
remove_object(self, - name)
- Removes an object from the game engine datastore
- source code - -
- -
-   - - - - - - -
list_objects(self)
- Returns a sting of registered objects
- source code - -
- -
-   - - - - - - -
toggle_fps(self)
- Toggles fps display
- source code - -
- -
-   - - - - - - -
art_scale(self, - original, - expected, - width=True) - source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - instance = None
- hash(x) -
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - width=1200, - height=900, - always_draw=False, - fps_cap=15, - version=False, - title='FortuneEngine') -
(Constructor) -

-
source code  -
- -

Constructor for the game engine.

-
-
Parameters:
-
    -
  • width - Window width
  • -
  • height - Window height
  • -
  • always_draw - Boolean to set the animation mode to always draw vs draw when - set_dirty is called
  • -
  • fps_cap - Sets the framerate cap. Set to 0 to disable the cap. Warning: - setting the cap to 0 when always draw = False will cause cpu 100% - when not driving.
  • -
  • version - If true, use new rendering system, false uses only the draw - system
  • -
  • title - Window Title
  • -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

get_scene(self) -

-
source code  -
- -

Returns the scene object

-
-
Returns:
-
Returns the scene object held by the game engine
-
-
-
- -
- -
- - -
-

start_event_timer(self, - function_cb, - time) -

-
source code  -
- -

Starts a timer that fires a user event into the queue every - "time" milliseconds

-
-
Parameters:
-
    -
  • function_cb - The function to call when timer fires
  • -
  • time - Milliseconds between fires
  • -
-
-
-
- -
- -
- - -
-

stop_event_timer(self, - function_cb) -

-
source code  -
- -

Stops the timer that has id from firing

-
-
Parameters:
-
    -
  • function_cb - The function registered with the timer that should be canceled
  • -
-
-
-
- -
- -
- - -
-

start_main_loop(self) -

-
source code  -
- -

Starts the game loop.

-

This function does not return until after the game loop exits

-
-
-
-
- -
- -
- - -
-

_draw(self, - tick_time) -

-
source code  -
- -

Draws all elements in draw callback to the screen

-
-
Parameters:
-
    -
  • tick_time - The amount of time passed since last draw cycle. (should be - produced by pygamme.clock.tick method)
  • -
-
-
-
- -
- -
- - -
-

add_event_callback(self, - cb) -

-
source code  -
- -

Adds event callback to the event callback stack

-
-
Parameters:
-
    -
  • cb - Callback to be added to the stack when events are fired.
  • -
-
-
-
- -
- -
- - -
-

remove_event_callback(self, - cb) -

-
source code  -
- -

Removes an event from the event callback stack

-
-
Parameters:
-
    -
  • cb - The callback to remove from the event callback stack
  • -
-
Returns:
-
Returns true if successful in removing callback
-
-
-
- -
- -
- - -
-

add_draw_callback(self, - fnc) -

-
source code  -
- -

Adds a callback to the draw list. Function will be passed the game - screen it should draw too.

-
-
Parameters:
-
    -
  • fnc - The function to call when system is drawing
  • -
-
-
-
- -
- -
- - -
-

pop_draw_callback(self) -

-
source code  -
- -

Removes top of draw stack and returns it

-
-
Returns:
-
Returns the top callback function that was removed
-
-
-
- -
- -
- - -
-

remove_draw_callback(self, - fnc) -

-
source code  -
- -

Removes a draw callback from the game engine draw function

-
-
Parameters:
-
    -
  • fnc - The callback function to remove
  • -
-
Returns:
-
Returns true if successful removal of the function
-
-
-
- -
- -
- - -
-

has_object(self, - name) -

-
source code  -
- -

Returns true if object is stored in game engine

-
-
Parameters:
-
    -
  • name - Name of the object to check if exists
  • -
-
Returns:
-
Returns true if object found
-
-
-
- -
- -
- - -
-

add_object(self, - name, - obj) -

-
source code  -
- -

Adds an object to the game engine datastore

-
-
Parameters:
-
    -
  • name - The name used to store the object
  • -
  • obj - The object to store
  • -
-
-
-
- -
- -
- - -
-

get_object(self, - name) -

-
source code  -
- -

Returns an object from the game engine datastore

-
-
Parameters:
-
    -
  • name - The name of object to return
  • -
-
Returns:
-
Returns the object
-
-
-
- -
- -
- - -
-

remove_object(self, - name) -

-
source code  -
- -

Removes an object from the game engine datastore

-
-
Parameters:
-
    -
  • name - The name of the object to remove
  • -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineConsole-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineConsole-module.html deleted file mode 100644 index 769f82a..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineConsole-module.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - fortuneengine.GameEngineConsole - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameEngineConsole - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module GameEngineConsole

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - GameEngineConsole
- GameEngineConsole is a class that extends the pyconsole adding in - game engine specific functions. -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'fortuneengine' -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineConsole-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineConsole-pysrc.html deleted file mode 100644 index 48cd19e..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineConsole-pysrc.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - fortuneengine.GameEngineConsole - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameEngineConsole - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module fortuneengine.GameEngineConsole

-
- 1  #    FortuneEngine is free software: you can redistribute it and/or modify 
- 2  #    it under the terms of the GNU General Public License as published by 
- 3  #    the Free Software Foundation, either version 3 of the License, or 
- 4  #    (at your option) any later version. 
- 5  # 
- 6  #    FortuneEngine is distributed in the hope that it will be useful, 
- 7  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
- 8  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
- 9  #    GNU General Public License for more details. 
-10  # 
-11  #    You should have received a copy of the GNU General Public License 
-12  #    along with the FortuneEngine.  If not, see <http://www.gnu.org/licenses/>. 
-13  # 
-14  #    Author: Justin Lewis  <jlew.blackout@gmail.com> 
-15   
-16  from pyconsole.pyconsole import Console 
-17   
-18   
-
19 -class GameEngineConsole(Console): -
20 """ -21 GameEngineConsole is a class that extends the pyconsole adding -22 in game engine specific functions. -23 """ -24 -
25 - def __init__(self, gei, pos): -
26 """ -27 Init function of the GameEngineConsole -28 -29 @param gei: Passing in the Game Engine Instance. -30 @param pos: The position tuple to place the pyconsole -31 (startx, starty, width, height) -32 """ -33 # functions exposed to the console -34 function_list = { -35 "quit": gei.stop_event_loop, -36 -37 "list_objects": gei.list_objects, -38 "list_drawcb": gei.list_draw_callbacks, -39 "list_eventcb": gei.list_event_callbacks, -40 "list_timers": gei.list_event_timers, -41 "inspect": gei._inspector.inspect_object, -42 -43 "profile_draw":gei.list_draw_time, -44 "profile_event":gei.list_event_time, -45 "profile_timer":gei.list_timer_time, -46 -47 "set_str": gei._inspector.set_str, -48 "set_int": gei._inspector.set_int, -49 "set_eval": gei._inspector.set_eval, -50 -51 "fps": gei.toggle_fps, -52 } -53 -54 # Ctrl + key mappings -55 key_calls = { -56 "d": gei.stop_event_loop, -57 "m": self.console_mode, -58 } -59 -60 # Call parent class's init function passing in the -61 # function and key mapping dictionaries -62 Console.__init__(self, gei.screen, pos, -63 functions=function_list, key_calls=key_calls, -64 vars={}, syntax={}) -
65 -
66 - def console_mode(self): -
67 """ -68 Switches console between console and python interpreter -69 """ -70 # Deactivate Console if showing -71 if self.active: -72 self.set_active() -73 self.setvar("python_mode", -74 not self.getvar("python_mode")) -75 -76 self.set_interpreter() -77 self.set_active() -
78 -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineConsole.GameEngineConsole-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineConsole.GameEngineConsole-class.html deleted file mode 100644 index 2d63c63..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineConsole.GameEngineConsole-class.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - fortuneengine.GameEngineConsole.GameEngineConsole - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameEngineConsole :: - Class GameEngineConsole - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class GameEngineConsole

source code

-
-pyconsole.pyconsole.Console --+
-                              |
-                             GameEngineConsole
-
- -
-

GameEngineConsole is a class that extends the pyconsole adding in game - engine specific functions.

- - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - gei, - pos)
- Init function of the GameEngineConsole
- source code - -
- -
-   - - - - - - -
console_mode(self)
- Switches console between console and python interpreter
- source code - -
- -
-

Inherited from pyconsole.pyconsole.Console: - add_func_calls, - add_key_calls, - add_to_history, - catch_output, - clear, - clear_input, - convert_token, - draw, - format_input_line, - getvar, - getvars, - help, - init_default_cfg, - load_cfg, - output, - process_input, - release_output, - safe_set_attr, - send_pyconsole, - send_python, - set_active, - set_interpreter, - set_pos, - setvar, - setvars, - str_insert, - submit_input, - tokenize -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - gei, - pos) -
(Constructor) -

-
source code  -
- -

Init function of the GameEngineConsole

-
-
Parameters:
-
    -
  • gei - Passing in the Game Engine Instance.
  • -
  • pos - The position tuple to place the pyconsole (startx, starty, width, - height)
  • -
-
Overrides: - pyconsole.pyconsole.Console.__init__ -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineElement-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineElement-module.html deleted file mode 100644 index 71cf02c..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineElement-module.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - fortuneengine.GameEngineElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameEngineElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module GameEngineElement

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - GameEngineElement
- The GameEngineElement is a helper object that can be extended by - other classes. -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'fortuneengine' -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineElement-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineElement-pysrc.html deleted file mode 100644 index 89c1487..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineElement-pysrc.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - fortuneengine.GameEngineElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameEngineElement - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module fortuneengine.GameEngineElement

-
-  1  #    FortuneEngine is free software: you can redistribute it and/or modify 
-  2  #    it under the terms of the GNU General Public License as published by 
-  3  #    the Free Software Foundation, either version 3 of the License, or 
-  4  #    (at your option) any later version. 
-  5  # 
-  6  #    FortuneEngine is distributed in the hope that it will be useful, 
-  7  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
-  8  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-  9  #    GNU General Public License for more details. 
- 10  # 
- 11  #    You should have received a copy of the GNU General Public License 
- 12  #    along with the FortuneEngine.  If not, see <http://www.gnu.org/licenses/>. 
- 13  # 
- 14  #    Author: Justin Lewis  <jlew.blackout@gmail.com> 
- 15   
- 16  from fortuneengine.GameEngine import GameEngine 
- 17  #from fortuneengine.DrawableFontObject import DrawableFontObject 
- 18  #from fortuneengine.DrawableObject import DrawableObject 
- 19  #from fortuneengine.DynamicDrawableObject import DynamicDrawableObject 
- 20   
- 21   
-
22 -class GameEngineElement(object): -
23 """ - 24 The GameEngineElement is a helper object that can be extended by - 25 other classes. When the class is extended, it will automatically - 26 register its self for the event and draw loops with the game engine. - 27 """ - 28 -
29 - def __init__(self, has_draw=True, has_event=True): -
30 """ - 31 Default constructor for GameEngineElement - 32 - 33 @param has_draw: boolean to signify if element should be drawn - 34 @param has_event: boolean to signify whether the element should be - 35 given events from the queue - 36 """ - 37 self.__has_draw = has_draw - 38 self.__has_event = has_event - 39 self.__in_engine = False - 40 self.game_engine = GameEngine.instance - 41 self.__ddo_list = [] -
42 -
43 - def is_in_engine(self): -
44 """ - 45 Returns true if object has been registered with the game engine. - 46 """ - 47 return self.__in_engine -
48 -
49 - def add_to_scene(self, objects): -
50 """ - 51 Adds some objects to the DynamicDrawableObject list and the - 52 game engine's scene. - 53 - 54 @param objects: A list of DynamicDrawableObjects - 55 """ - 56 - 57 self.game_engine.get_scene().addObjects(objects) - 58 self.__ddo_list += objects -
59 -
60 - def add_to_engine(self): -
61 """ - 62 Registers the object with the game engine. Registers draw and event - 63 call backs separately if they were set to true in the constructor. - 64 """ - 65 if not self.__in_engine: - 66 self.__in_engine = True - 67 - 68 if self.__has_draw: - 69 self.game_engine.add_draw_callback(self.draw) - 70 - 71 if self.__has_event: - 72 self.game_engine.add_event_callback(self.event_handler) -
73 -
74 - def remove_from_engine(self): -
75 """ - 76 Removes the object from the correct queues in the engine - 77 """ - 78 if self.__in_engine: - 79 self.__in_engine = False - 80 - 81 if self.__has_draw: - 82 self.game_engine.remove_draw_callback(self.draw) - 83 - 84 if self.__has_event: - 85 self.game_engine.remove_event_callback(self.event_handler) - 86 - 87 if not (self.__ddo_list == []): - 88 for object in self.__ddo_list: - 89 self.game_engine.get_scene().removeObject(object) -
90 - 91 -
92 - def event_handler(self, event): -
93 """ - 94 This method should be overridden by the user-specified class that - 95 extends this GameEngineElement class. This method specifies how that - 96 class will handle events given to it by the engine. - 97 - 98 @return: true if the user wants to prevent the event from - 99 continuing down the queue -100 """ -101 pass -
102 -
103 - def draw(self, screen): -
104 """ -105 This method should be overridden by the user-specified class that -106 extends this GameEngineElement class. This method specifies how the -107 class will be drawn. -108 """ -109 pass -
110 -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineElement.GameEngineElement-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineElement.GameEngineElement-class.html deleted file mode 100644 index 408c18e..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameEngineElement.GameEngineElement-class.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - - fortuneengine.GameEngineElement.GameEngineElement - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameEngineElement :: - Class GameEngineElement - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class GameEngineElement

source code

-
-object --+
-         |
-        GameEngineElement
-
- -
-

The GameEngineElement is a helper object that can be extended by other - classes. When the class is extended, it will automatically register its - self for the event and draw loops with the game engine.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - has_draw=True, - has_event=True)
- Default constructor for GameEngineElement
- source code - -
- -
-   - - - - - - -
is_in_engine(self)
- Returns true if object has been registered with the game engine.
- source code - -
- -
-   - - - - - - -
add_to_scene(self, - objects)
- Adds some objects to the DynamicDrawableObject list and the game - engine's scene.
- source code - -
- -
-   - - - - - - -
add_to_engine(self)
- Registers the object with the game engine.
- source code - -
- -
-   - - - - - - -
remove_from_engine(self)
- Removes the object from the correct queues in the engine
- source code - -
- -
-   - - - - - - -
event_handler(self, - event)
- This method should be overridden by the user-specified class that - extends this GameEngineElement class.
- source code - -
- -
-   - - - - - - -
draw(self, - screen)
- This method should be overridden by the user-specified class that - extends this GameEngineElement class.
- source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - has_draw=True, - has_event=True) -
(Constructor) -

-
source code  -
- -

Default constructor for GameEngineElement

-
-
Parameters:
-
    -
  • has_draw - boolean to signify if element should be drawn
  • -
  • has_event - boolean to signify whether the element should be given events - from the queue
  • -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

add_to_scene(self, - objects) -

-
source code  -
- -

Adds some objects to the DynamicDrawableObject list and the game - engine's scene.

-
-
Parameters:
-
    -
  • objects - A list of DynamicDrawableObjects
  • -
-
-
-
- -
- -
- - -
-

add_to_engine(self) -

-
source code  -
- -

Registers the object with the game engine. Registers draw and event - call backs separately if they were set to true in the constructor.

-
-
-
-
- -
- -
- - -
-

event_handler(self, - event) -

-
source code  -
- -

This method should be overridden by the user-specified class that - extends this GameEngineElement class. This method specifies how that - class will handle events given to it by the engine.

-
-
Returns:
-
true if the user wants to prevent the event from continuing down - the queue
-
-
-
- -
- -
- - -
-

draw(self, - screen) -

-
source code  -
- -

This method should be overridden by the user-specified class that - extends this GameEngineElement class. This method specifies how the class - will be drawn.

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameInspect-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameInspect-module.html deleted file mode 100644 index e2713fc..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameInspect-module.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - fortuneengine.GameInspect - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameInspect - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module GameInspect

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - GameInspect
- GameInspect is a class that can inspect and modify object trees. -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'fortuneengine' -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameInspect-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameInspect-pysrc.html deleted file mode 100644 index 1f3eed2..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameInspect-pysrc.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - fortuneengine.GameInspect - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameInspect - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module fortuneengine.GameInspect

-
-  1  #    FortuneEngine is free software: you can redistribute it and/or modify 
-  2  #    it under the terms of the GNU General Public License as published by 
-  3  #    the Free Software Foundation, either version 3 of the License, or 
-  4  #    (at your option) any later version. 
-  5  # 
-  6  #    FortuneEngine is distributed in the hope that it will be useful, 
-  7  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
-  8  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-  9  #    GNU General Public License for more details. 
- 10  # 
- 11  #    You should have received a copy of the GNU General Public License 
- 12  #    along with the FortuneEngine.  If not, see <http://www.gnu.org/licenses/>. 
- 13  # 
- 14  #    Author: Justin Lewis  <jlew.blackout@gmail.com> 
- 15   
- 16  import inspect 
- 17   
- 18   
-
19 -class GameInspect(object): -
20 """ - 21 GameInspect is a class that can inspect and modify object trees. - 22 - 23 The top most object must be a dictionary - 24 """ - 25 -
26 - def __init__(self, object_root): -
27 """ - 28 Init function of the GameInspect class. - 29 - 30 @param object_root: The root dictionary of the tree - 31 """ - 32 self.root = object_root -
33 -
34 - def drilldown_object(self, objectname): -
35 """ - 36 Takes the objectname string and tries to find the object that it is - 37 representing and returns that object. - 38 - 39 Example: battle.enemy_list[1].sprite._images[1] - 40 - 41 @param objectname: The string that represents the object's path. - 42 @return: Returns the object requested - 43 @raise Exception: Throws an Exception with the string being the - 44 path error. - 45 """ - 46 last = "empt" - 47 obj = "empt" - 48 last_token = "" - 49 - 50 # Objects are separated by the period (".") symbol - 51 object_tokens = objectname.split(".") - 52 - 53 # Check if the first part of the name is registered with the - 54 # game engine as that is our starting point - 55 try: - 56 obj = self.root[object_tokens[0]] - 57 last = obj - 58 last_token = object_tokens[0] - 59 - 60 except KeyError: - 61 raise Exception("%s is not registered with the game engine" % - 62 object_tokens[0]) - 63 - 64 # Handles dot notation for sub modules by looping through the tokens - 65 for token in object_tokens[1:]: - 66 - 67 # Splits the dictionary/list token ("[") - 68 dict_token = token.split('[') - 69 try: - 70 last = obj - 71 obj = getattr(obj, dict_token[0]) - 72 last_token = dict_token[0] - 73 - 74 except: - 75 raise Exception("Error finding member element: %s" % token) - 76 - 77 # Handles dictionaries - 78 for d_token in dict_token[1:]: - 79 if d_token[-1] == "]": - 80 d_token = d_token[:-1] - 81 # Try list notation first then try dictionary notation - 82 try: - 83 key = int(d_token) - 84 except: - 85 key = d_token - 86 - 87 try: - 88 last = obj - 89 obj = obj[key] - 90 last_token = key - 91 except: - 92 raise Exception("Unable to find %s" % key) - 93 - 94 else: - 95 raise Exception("Invalid Syntax, expected ] at end of %s" % - 96 d_token) - 97 - 98 return obj, last, last_token -
99 -
100 - def set_eval(self, objectname, statement): -
101 """ -102 Sets the object referenced by objectname to a value returned by -103 passing the string stored in the val parameter to an eval statement. -104 -105 @param objectname: A string representation of the location -106 of the object being inspected in relation -107 to the game engine registered object. -108 @param statement: A string to be evaluated and set to the object. -109 """ -110 try: -111 obj, last, last_token = self.drilldown_object(objectname) -112 except Exception, detail: -113 return str(detail) -114 -115 try: -116 setattr(last, last_token, eval(str(statement))) -117 except Exception, detail: -118 return str(detail) -
119 -
120 - def set_str(self, objectname, val): -
121 """ -122 Sets the object referenced by objectname to a string passed into the -123 val parameter. -124 -125 @param objectname: A string representation of the location -126 of the object being inspected in relation -127 to the game engine registered object. -128 @param val: A string to be set as the value of the object. -129 """ -130 try: -131 obj, last, last_token = self.drilldown_object(objectname) -132 except Exception, detail: -133 return str(detail) -134 -135 setattr(last, last_token, val) -
136 -
137 - def set_int(self, objectname, val): -
138 """ -139 Sets the object referenced by objectname to an integer passed into the -140 val parameter. It may be a string that holds the int as it will be -141 type casted. -142 -143 @param objectname: A string representation of the location -144 of the object being inspected in relation -145 to the game engine registered object. -146 @param val: An int/string containing an int to be set as -147 the value of the object. -148 """ -149 try: -150 obj, last, last_token = self.drilldown_object(objectname) -151 except Exception, detail: -152 return str(detail) -153 -154 try: -155 setattr(last, last_token, int(val)) -156 except: -157 return str(detail) -
158 -
159 - def inspect_object(self, objectname): -
160 """ -161 Displays information about the object path it is passed -162 -163 @param objectname: A string representation of the location -164 of the object being inspected in relation -165 to the game engine registered object. -166 """ -167 try: -168 obj, last, last_token = self.drilldown_object(objectname) -169 -170 except Exception, detail: -171 return str(detail) -172 -173 classname = obj.__class__.__name__ -174 -175 # If it has the __dict__ attribute, it is an object we can inspect -176 if hasattr(obj, "__dict__"): -177 attribute_list = "Attributes:" -178 attributes = obj.__dict__ -179 for attribute_key in attributes.keys(): -180 attribute_list = "%s\n\t%s:%s" % (attribute_list, -181 attribute_key, str(attributes[attribute_key])) -182 -183 # Inspect the object for all its methods -184 method_list = inspect.getmembers(obj, inspect.ismethod) -185 if method_list != []: -186 -187 # Loop through the methods in the object and print them -188 # to the console -189 attribute_list = "%s\n\nMethods:" % attribute_list -190 for method in method_list: -191 attribute_list = "%s\n\t%s" % (attribute_list, method[0]) -192 -193 # Inspect the arguments to the current method -194 args, vargs, kwargs, local = inspect.getargspec(method[1]) -195 -196 # Display function arguments -197 attribute_list = "%s\n\t\tArgs: %s" % \ -198 (attribute_list, ",".join(args)) -199 -200 # Display * and ** arguments if they were found -201 if vargs: -202 attribute_list = "%s\n\t\tVArgs: %s" % \ -203 (attribute_list, ",".join(vargs)) -204 -205 # Display KW Arguments if they were found -206 if kwargs: -207 attribute_list = "%s\n\t\tKWArgs: %s" % \ -208 (attribute_list, ",".join(kwargs)) -209 -210 # If dictionary, show keys -211 elif hasattr(obj, "keys"): -212 attribute_list = "Dictionary Items:" -213 -214 for d_obj in obj.keys(): -215 attribute_list = "%s\n\t%s:%s" % (attribute_list, d_obj, -216 str(obj[d_obj])) -217 -218 # If list, iterate over the list and show its values -219 elif type(obj).__name__ == 'list': -220 i = 0 -221 attribute_list = "List Items:" -222 for item in obj: -223 attribute_list = "%s\n\t%d:%s" % (attribute_list, i, str(item)) -224 i = i + 1 -225 -226 # We don't know what it is, so just display string representation -227 # of the object in question -228 else: -229 attribute_list = str(obj) -230 -231 return "Class: %s\n%s" % (classname, attribute_list) -
232 -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameInspect.GameInspect-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameInspect.GameInspect-class.html deleted file mode 100644 index 10a7888..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.GameInspect.GameInspect-class.html +++ /dev/null @@ -1,481 +0,0 @@ - - - - - fortuneengine.GameInspect.GameInspect - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module GameInspect :: - Class GameInspect - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class GameInspect

source code

-
-object --+
-         |
-        GameInspect
-
- -
-

GameInspect is a class that can inspect and modify object trees.

-

The top most object must be a dictionary

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - object_root)
- Init function of the GameInspect class.
- source code - -
- -
-   - - - - - - -
drilldown_object(self, - objectname)
- Takes the objectname string and tries to find the object that it is - representing and returns that object.
- source code - -
- -
-   - - - - - - -
set_eval(self, - objectname, - statement)
- Sets the object referenced by objectname to a value returned by - passing the string stored in the val parameter to an eval statement.
- source code - -
- -
-   - - - - - - -
set_str(self, - objectname, - val)
- Sets the object referenced by objectname to a string passed into the - val parameter.
- source code - -
- -
-   - - - - - - -
set_int(self, - objectname, - val)
- Sets the object referenced by objectname to an integer passed into - the val parameter.
- source code - -
- -
-   - - - - - - -
inspect_object(self, - objectname)
- Displays information about the object path it is passed
- source code - -
- -
-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __repr__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - object_root) -
(Constructor) -

-
source code  -
- -

Init function of the GameInspect class.

-
-
Parameters:
-
    -
  • object_root - The root dictionary of the tree
  • -
-
Overrides: - object.__init__ -
-
-
-
- -
- -
- - -
-

drilldown_object(self, - objectname) -

-
source code  -
- -

Takes the objectname string and tries to find the object that it is - representing and returns that object.

-

Example: battle.enemy_list[1].sprite._images[1]

-
-
Parameters:
-
    -
  • objectname - The string that represents the object's path.
  • -
-
Returns:
-
Returns the object requested
-
Raises:
-
    -
  • Exception - Throws an Exception with the string being the path error.
  • -
-
-
-
- -
- -
- - -
-

set_eval(self, - objectname, - statement) -

-
source code  -
- -

Sets the object referenced by objectname to a value returned by - passing the string stored in the val parameter to an eval statement.

-
-
Parameters:
-
    -
  • objectname - A string representation of the location of the object being - inspected in relation to the game engine registered object.
  • -
  • statement - A string to be evaluated and set to the object.
  • -
-
-
-
- -
- -
- - -
-

set_str(self, - objectname, - val) -

-
source code  -
- -

Sets the object referenced by objectname to a string passed into the - val parameter.

-
-
Parameters:
-
    -
  • objectname - A string representation of the location of the object being - inspected in relation to the game engine registered object.
  • -
  • val - A string to be set as the value of the object.
  • -
-
-
-
- -
- -
- - -
-

set_int(self, - objectname, - val) -

-
source code  -
- -

Sets the object referenced by objectname to an integer passed into the - val parameter. It may be a string that holds the int as it will be type - casted.

-
-
Parameters:
-
    -
  • objectname - A string representation of the location of the object being - inspected in relation to the game engine registered object.
  • -
  • val - An int/string containing an int to be set as the value of the - object.
  • -
-
-
-
- -
- -
- - -
-

inspect_object(self, - objectname) -

-
source code  -
- -

Displays information about the object path it is passed

-
-
Parameters:
-
    -
  • objectname - A string representation of the location of the object being - inspected in relation to the game engine registered object.
  • -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.Scene-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.Scene-module.html deleted file mode 100644 index 2ec4ceb..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.Scene-module.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - fortuneengine.Scene - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module Scene - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module Scene

source code

- - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - Scene -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = 'fortuneengine' -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.Scene-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.Scene-pysrc.html deleted file mode 100644 index 3f3ac23..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.Scene-pysrc.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - fortuneengine.Scene - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module Scene - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module fortuneengine.Scene

-
-  1  import pygame 
-  2  from pygame.sprite import RenderUpdates 
-  3  
 
-
4 -class Scene(pygame.sprite.RenderUpdates): -
5 -
6 - def __init__(self, sprites): -
7 - 8 self._spritelist = [[sprites, sprites.getXPos(), sprites.getYPos()]] - 9 #self._spritelist.append([sprites, sprites.getXPos(), sprites.getYPos()]) - 10 RenderUpdates.__init__(self, sprites) - 11 - 12 self.xPos = 0 - 13 self.yPos = 0 - 14 self.xSize = 0 - 15 self.ySize = 0 - 16 - 17 self.calcPosition() - 18 self.calcSize() - 19 self.setRelativePositions() -
20 -
21 - def calcPosition(self): -
22 - 23 lowestX = 9000 - 24 lowestY = 9000 - 25 - 26 for i in range(len(self._spritelist)): - 27 if self._spritelist[i][0].getXPos() < lowestX: lowestX = self._spritelist[i][0].getXPos() - 28 if self._spritelist[i][0].getYPos() < lowestY: lowestY = self._spritelist[i][0].getYPos() - 29 - 30 self.xPos = lowestX - 31 self.yPos = lowestY -
32 -
33 - def calcSize(self): -
34 - 35 highestX = 0 - 36 highestY = 0 - 37 - 38 for i in range(len(self._spritelist)): - 39 if (self._spritelist[i][0].getXPos() + self._spritelist[i][0].getXSize()) > highestX: highestX = self._spritelist[i][0].getXPos() + self._spritelist[i][0].getXSize() - 40 if (self._spritelist[i][0].getYPos() + self._spritelist[i][0].getYSize()) > highestY: highestY = self._spritelist[i][0].getYPos() + self._spritelist[i][0].getYSize() - 41 - 42 self.xSize = highestX - self.xPos - 43 self.ySize = highestY - self.yPos -
44 -
45 - def addObject(self, newDrawableObject): -
46 RenderUpdates.add_internal(self, newDrawableObject) - 47 self._spritelist.insert(len(self._spritelist) - 1, [newDrawableObject, newDrawableObject.getXPos(), newDrawableObject.getYPos()]) -
48 -
49 - def addObjects(self, newDrawableObjects): -
50 for sprite in newDrawableObjects: - 51 RenderUpdates.add_internal(self, sprite) - 52 self._spritelist.insert(len(self._spritelist) - 1, [sprite, sprite.getXPos(), sprite.getYPos()]) -
53 -
54 - def setRelativePositions(self): -
55 - 56 for i in range(len(self._spritelist)): - 57 self._spritelist[i][1] = self._spritelist[i][0].getXPos() - self.xPos - 58 self._spritelist[i][2] = self._spritelist[i][0].getYPos() - self.yPos -
59 -
60 - def removeObject(self, sprite): -
61 - 62 for i in self._spritelist: - 63 if i[0] == sprite: - 64 self._spritelist.remove(i) - 65 break - 66 RenderUpdates.remove_internal(self, sprite) -
67 -
68 - def getObject(self, index): -
69 - 70 if index < len(self._spritelist): - 71 return self._spritelist[index][0] -
72 -
73 - def getListSize(self): -
74 - 75 return len(self._spritelist) -
76 -
77 - def getList(self): -
78 - 79 return list(self._spritelist) -
80 -
81 - def moveObjects(self): -
82 - 83 for i in range(len(self._spritelist)): - 84 self._spritelist[i][0].move() - 85 - 86 self.calcPosition() - 87 self.calcSize() - 88 self.setRelativePositions() -
89 -
90 - def moveScene(self, xNudge = 0, yNudge = 0): -
91 - 92 - 93 for i in range(len(self._spritelist)): - 94 - 95 self._spritelist[i][0].nudge(xNudge, yNudge) - 96 - 97 - 98 self.calcPosition() -
99 -
100 - def setPosition(self, newXPos = None, newYPos = None): -
101 -102 if newXPos != None: self.xPos = newXPos -103 if newYPos != None: self.yPos = newYPos -104 -105 for i in range(len(self._spritelist)): -106 -107 self._spritelist[i][0].setPosition(self.xPos + self._spritelist[i][1], self.yPos + self._spritelist[i][2]) -
108 -
109 - def getXPos(self): -
110 return self.xPos -
111 -
112 - def getYPos(self): -
113 return self.yPos -
114 -
115 - def getXSize(self): -
116 return self.xSize -
117 -
118 - def getYSize(self): -
119 return self.ySize -
120 -
121 - def scaleObjects(self, newXSize = None, newYSize = None): -
122 -123 -124 for i in range(len(self._spritelist)): -125 self._spritelist[i][0].scale(newXSize, newYSize) -
126 -
127 - def scaleScene(self, newXSize = None, newYSize = None): -
128 -129 self.calcPosition() -130 self.calcSize() -131 -132 xScale = 1 -133 yScale = 1 -134 -135 if newXSize != None: xScale = (newXSize * 1.0)/self.xSize -136 if newYSize != None: yScale = (newYSize * 1.0)/self.ySize -137 -138 for i in range(len(self._spritelist)): -139 self._spritelist[i][0].scale(xScale * self._spritelist[iaw][0].getXSize(), yScale * self._spritelist[i][0].getYSize()) -140 self._spritelist[i][1] = xScale * self._spritelist[i][1] -141 self._spritelist[i][2] = yScale * self._spritelist[i][2] -142 -143 self.calcPosition() -144 self.calcSize() -145 self.setPosition() -
146 -
147 - def update(self, t): -
148 -149 for s in self._spritelist: s[0].update(t); -
150 -
151 - def draw(self, surface): -
152 spritedict = self.spritedict -153 surface_blit = surface.blit -154 dirty = self.lostsprites -155 self.lostsprites = [] -156 dirty_append = dirty.append -157 for s in self._spritelist: -158 r = spritedict[s[0]] -159 newrect = surface_blit(s[0].image, s[0].rect) -160 if r is 0: -161 dirty_append(newrect) -162 else: -163 if newrect.colliderect(r): -164 dirty_append(newrect.union(r)) -165 else: -166 dirty_append(newrect) -167 dirty_append(r) -168 spritedict[s[0]] = newrect -169 return dirty -
170 -
171 - def drawEntireScene(self, surface): -
172 spritedict = self.spritedict -173 surface_blit = surface.blit -174 dirty = self.lostsprites -175 self.lostsprites = [] -176 dirty_append = dirty.append -177 for s in self._spritelist: -178 dirty_append(spritedict[s[0]]) -179 dirty_append(surface_blit(s[0].image, s[0].rect)) -180 return dirty -
181 -
182 - def nextFrame(self): -
183 -184 for i in range(len(self._spritelist)): -185 -186 self._spritelist[i][0].nextFrame() -
187 -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.Scene.Scene-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.Scene.Scene-class.html deleted file mode 100644 index ac9119b..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.Scene.Scene-class.html +++ /dev/null @@ -1,703 +0,0 @@ - - - - - fortuneengine.Scene.Scene - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Module Scene :: - Class Scene - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Scene

source code

-
-                 object --+            
-                          |            
-pygame.sprite.AbstractGroup --+        
-                              |        
-            pygame.sprite.Group --+    
-                                  |    
-        pygame.sprite.RenderUpdates --+
-                                      |
-                                     Scene
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - sprites)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- source code - -
- -
-   - - - - - - -
calcPosition(self) - source code - -
- -
-   - - - - - - -
calcSize(self) - source code - -
- -
-   - - - - - - -
addObject(self, - newDrawableObject) - source code - -
- -
-   - - - - - - -
addObjects(self, - newDrawableObjects) - source code - -
- -
-   - - - - - - -
setRelativePositions(self) - source code - -
- -
-   - - - - - - -
removeObject(self, - sprite) - source code - -
- -
-   - - - - - - -
getObject(self, - index) - source code - -
- -
-   - - - - - - -
getListSize(self) - source code - -
- -
-   - - - - - - -
getList(self) - source code - -
- -
-   - - - - - - -
moveObjects(self) - source code - -
- -
-   - - - - - - -
moveScene(self, - xNudge=0, - yNudge=0) - source code - -
- -
-   - - - - - - -
setPosition(self, - newXPos=None, - newYPos=None) - source code - -
- -
-   - - - - - - -
getXPos(self) - source code - -
- -
-   - - - - - - -
getYPos(self) - source code - -
- -
-   - - - - - - -
getXSize(self) - source code - -
- -
-   - - - - - - -
getYSize(self) - source code - -
- -
-   - - - - - - -
scaleObjects(self, - newXSize=None, - newYSize=None) - source code - -
- -
-   - - - - - - -
scaleScene(self, - newXSize=None, - newYSize=None) - source code - -
- -
-   - - - - - - -
update(self, - t)
- call update for all member sprites
- source code - -
- -
-   - - - - - - -
draw(self, - surface)
- draw all sprites onto the surface
- source code - -
- -
-   - - - - - - -
drawEntireScene(self, - surface) - source code - -
- -
-   - - - - - - -
nextFrame(self) - source code - -
- -
-

Inherited from pygame.sprite.AbstractGroup: - __contains__, - __iter__, - __len__, - __nonzero__, - __repr__, - add, - add_internal, - clear, - copy, - empty, - has, - has_internal, - remove, - remove_internal, - sprites -

-

Inherited from object: - __delattr__, - __format__, - __getattribute__, - __hash__, - __new__, - __reduce__, - __reduce_ex__, - __setattr__, - __sizeof__, - __str__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-

Inherited from pygame.sprite.AbstractGroup (private): - _spritegroup -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - sprites) -
(Constructor) -

-
source code  -
- -

x.__init__(...) initializes x; see x.__class__.__doc__ for - signature

-
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

update(self, - t) -

-
source code  -
- -

call update for all member sprites

-

calls the update method for all sprites in the group. Passes all - arguments on to the Sprite update function.

-
-
Overrides: - pygame.sprite.AbstractGroup.update -
(inherited documentation)
- -
-
-
- -
- -
- - -
-

draw(self, - surface) -

-
source code  -
- -

draw all sprites onto the surface

-

Draws all the sprites onto the given surface.

-
-
Overrides: - pygame.sprite.AbstractGroup.draw -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole-module.html deleted file mode 100644 index 48bae6f..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole-module.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - fortuneengine.pyconsole - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Package pyconsole - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Package pyconsole

source code

- - - - - - - -
- - - - - -
Submodules[hide private]
-
-
- -
- - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - __package__ = None
- hash(x) -
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole-pysrc.html deleted file mode 100644 index 66b0107..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole-pysrc.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - fortuneengine.pyconsole - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Package pyconsole - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Package fortuneengine.pyconsole

-
-1   
-2   
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole-module.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole-module.html deleted file mode 100644 index 7d93754..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole-module.html +++ /dev/null @@ -1,2212 +0,0 @@ - - - - - fortuneengine.pyconsole.pyconsole - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Package pyconsole :: - Module pyconsole - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Module pyconsole

source code

-
-

Version: - 0.7 -

-
- - - - - - - - - - - - - - -
- - - - - -
Classes[hide private]
-
-   - - Writable -
-   - - ParseError -
-   - - Console -
- - - - - - - - - -
- - - - - -
Functions[hide private]
-
-   - - - - - - -
balanced(t) - source code - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Variables[hide private]
-
-   - - WIDTH = 0 -
-   - - HEIGHT = 1 -
-   - - OUT = 0 -
-   - - IN = 1 -
-   - - ERR = 2 -
-   - - PYCONSOLE = 1 -
-   - - PYTHON = 2 -
-   - - path = '/home/jlew/Code/MAFH/MAFH2/fortuneengine/fortuneengine... -
-   - - font_path = '/home/jlew/Code/MAFH/MAFH2/fortuneengine/fortunee... -
-   - - cfg_path = '/home/jlew/Code/MAFH/MAFH2/fortuneengine/fortuneen... -
-   - - re_token = re.compile(r'".*?"|\{.*?\}|\(.*?\)|\[.*?\]|\S+') -
-   - - re_is_list = re.compile(r'^[\{\[\(]') -
-   - - re_is_number = re.compile(r'(?x)-?0x[0-9a-fA-F]+[lLjJ]?|-?0[0-... -
-   - - re_is_assign = re.compile(r'\$(?P<name>[a-zA-Z_]+\S*)\s*=\s*(?... -
-   - - re_is_comment = re.compile(r'\s*#.*') -
-   - - re_is_var = re.compile(r'^\$[a-zA-Z_]+\w*\Z') -
-   - - ACTIVEEVENT = 1 -
-   - - ANYFORMAT = 268435456 -
-   - - ASYNCBLIT = 4 -
-   - - AUDIO_S16 = 32784 -
-   - - AUDIO_S16LSB = 32784 -
-   - - AUDIO_S16MSB = 36880 -
-   - - AUDIO_S16SYS = 32784 -
-   - - AUDIO_S8 = 32776 -
-   - - AUDIO_U16 = 16 -
-   - - AUDIO_U16LSB = 16 -
-   - - AUDIO_U16MSB = 4112 -
-   - - AUDIO_U16SYS = 16 -
-   - - AUDIO_U8 = 8 -
-   - - BIG_ENDIAN = 4321 -
-   - - BLEND_ADD = 1 -
-   - - BLEND_MAX = 5 -
-   - - BLEND_MIN = 4 -
-   - - BLEND_MULT = 3 -
-   - - BLEND_RGBA_ADD = 6 -
-   - - BLEND_RGBA_MAX = 16 -
-   - - BLEND_RGBA_MIN = 9 -
-   - - BLEND_RGBA_MULT = 8 -
-   - - BLEND_RGBA_SUB = 7 -
-   - - BLEND_RGB_ADD = 1 -
-   - - BLEND_RGB_MAX = 5 -
-   - - BLEND_RGB_MIN = 4 -
-   - - BLEND_RGB_MULT = 3 -
-   - - BLEND_RGB_SUB = 2 -
-   - - BLEND_SUB = 2 -
-   - - BUTTON_X1 = 6 -
-   - - BUTTON_X2 = 7 -
-   - - DOUBLEBUF = 1073741824 -
-   - - FULLSCREEN = -2147483648 -
-   - - GL_ACCELERATED_VISUAL = 15 -
-   - - GL_ACCUM_ALPHA_SIZE = 11 -
-   - - GL_ACCUM_BLUE_SIZE = 10 -
-   - - GL_ACCUM_GREEN_SIZE = 9 -
-   - - GL_ACCUM_RED_SIZE = 8 -
-   - - GL_ALPHA_SIZE = 3 -
-   - - GL_BLUE_SIZE = 2 -
-   - - GL_BUFFER_SIZE = 4 -
-   - - GL_DEPTH_SIZE = 6 -
-   - - GL_DOUBLEBUFFER = 5 -
-   - - GL_GREEN_SIZE = 1 -
-   - - GL_MULTISAMPLEBUFFERS = 13 -
-   - - GL_MULTISAMPLESAMPLES = 14 -
-   - - GL_RED_SIZE = 0 -
-   - - GL_STENCIL_SIZE = 7 -
-   - - GL_STEREO = 12 -
-   - - GL_SWAP_CONTROL = 16 -
-   - - HAT_CENTERED = 0 -
-   - - HAT_DOWN = 4 -
-   - - HAT_LEFT = 8 -
-   - - HAT_LEFTDOWN = 12 -
-   - - HAT_LEFTUP = 9 -
-   - - HAT_RIGHT = 2 -
-   - - HAT_RIGHTDOWN = 6 -
-   - - HAT_RIGHTUP = 3 -
-   - - HAT_UP = 1 -
-   - - HWACCEL = 256 -
-   - - HWPALETTE = 536870912 -
-   - - HWSURFACE = 1 -
-   - - IYUV_OVERLAY = 1448433993 -
-   - - JOYAXISMOTION = 7 -
-   - - JOYBALLMOTION = 8 -
-   - - JOYBUTTONDOWN = 10 -
-   - - JOYBUTTONUP = 11 -
-   - - JOYHATMOTION = 9 -
-   - - KEYDOWN = 2 -
-   - - KEYUP = 3 -
-   - - KMOD_ALT = 768 -
-   - - KMOD_CAPS = 8192 -
-   - - KMOD_CTRL = 192 -
-   - - KMOD_LALT = 256 -
-   - - KMOD_LCTRL = 64 -
-   - - KMOD_LMETA = 1024 -
-   - - KMOD_LSHIFT = 1 -
-   - - KMOD_META = 3072 -
-   - - KMOD_MODE = 16384 -
-   - - KMOD_NONE = 0 -
-   - - KMOD_NUM = 4096 -
-   - - KMOD_RALT = 512 -
-   - - KMOD_RCTRL = 128 -
-   - - KMOD_RMETA = 2048 -
-   - - KMOD_RSHIFT = 2 -
-   - - KMOD_SHIFT = 3 -
-   - - K_0 = 48 -
-   - - K_1 = 49 -
-   - - K_2 = 50 -
-   - - K_3 = 51 -
-   - - K_4 = 52 -
-   - - K_5 = 53 -
-   - - K_6 = 54 -
-   - - K_7 = 55 -
-   - - K_8 = 56 -
-   - - K_9 = 57 -
-   - - K_AMPERSAND = 38 -
-   - - K_ASTERISK = 42 -
-   - - K_AT = 64 -
-   - - K_BACKQUOTE = 96 -
-   - - K_BACKSLASH = 92 -
-   - - K_BACKSPACE = 8 -
-   - - K_BREAK = 318 -
-   - - K_CAPSLOCK = 301 -
-   - - K_CARET = 94 -
-   - - K_CLEAR = 12 -
-   - - K_COLON = 58 -
-   - - K_COMMA = 44 -
-   - - K_DELETE = 127 -
-   - - K_DOLLAR = 36 -
-   - - K_DOWN = 274 -
-   - - K_END = 279 -
-   - - K_EQUALS = 61 -
-   - - K_ESCAPE = 27 -
-   - - K_EURO = 321 -
-   - - K_EXCLAIM = 33 -
-   - - K_F1 = 282 -
-   - - K_F10 = 291 -
-   - - K_F11 = 292 -
-   - - K_F12 = 293 -
-   - - K_F13 = 294 -
-   - - K_F14 = 295 -
-   - - K_F15 = 296 -
-   - - K_F2 = 283 -
-   - - K_F3 = 284 -
-   - - K_F4 = 285 -
-   - - K_F5 = 286 -
-   - - K_F6 = 287 -
-   - - K_F7 = 288 -
-   - - K_F8 = 289 -
-   - - K_F9 = 290 -
-   - - K_FIRST = 0 -
-   - - K_GREATER = 62 -
-   - - K_HASH = 35 -
-   - - K_HELP = 315 -
-   - - K_HOME = 278 -
-   - - K_INSERT = 277 -
-   - - K_KP0 = 256 -
-   - - K_KP1 = 257 -
-   - - K_KP2 = 258 -
-   - - K_KP3 = 259 -
-   - - K_KP4 = 260 -
-   - - K_KP5 = 261 -
-   - - K_KP6 = 262 -
-   - - K_KP7 = 263 -
-   - - K_KP8 = 264 -
-   - - K_KP9 = 265 -
-   - - K_KP_DIVIDE = 267 -
-   - - K_KP_ENTER = 271 -
-   - - K_KP_EQUALS = 272 -
-   - - K_KP_MINUS = 269 -
-   - - K_KP_MULTIPLY = 268 -
-   - - K_KP_PERIOD = 266 -
-   - - K_KP_PLUS = 270 -
-   - - K_LALT = 308 -
-   - - K_LAST = 323 -
-   - - K_LCTRL = 306 -
-   - - K_LEFT = 276 -
-   - - K_LEFTBRACKET = 91 -
-   - - K_LEFTPAREN = 40 -
-   - - K_LESS = 60 -
-   - - K_LMETA = 310 -
-   - - K_LSHIFT = 304 -
-   - - K_LSUPER = 311 -
-   - - K_MENU = 319 -
-   - - K_MINUS = 45 -
-   - - K_MODE = 313 -
-   - - K_NUMLOCK = 300 -
-   - - K_PAGEDOWN = 281 -
-   - - K_PAGEUP = 280 -
-   - - K_PAUSE = 19 -
-   - - K_PERIOD = 46 -
-   - - K_PLUS = 43 -
-   - - K_POWER = 320 -
-   - - K_PRINT = 316 -
-   - - K_QUESTION = 63 -
-   - - K_QUOTE = 39 -
-   - - K_QUOTEDBL = 34 -
-   - - K_RALT = 307 -
-   - - K_RCTRL = 305 -
-   - - K_RETURN = 13 -
-   - - K_RIGHT = 275 -
-   - - K_RIGHTBRACKET = 93 -
-   - - K_RIGHTPAREN = 41 -
-   - - K_RMETA = 309 -
-   - - K_RSHIFT = 303 -
-   - - K_RSUPER = 312 -
-   - - K_SCROLLOCK = 302 -
-   - - K_SEMICOLON = 59 -
-   - - K_SLASH = 47 -
-   - - K_SPACE = 32 -
-   - - K_SYSREQ = 317 -
-   - - K_TAB = 9 -
-   - - K_UNDERSCORE = 95 -
-   - - K_UNKNOWN = 0 -
-   - - K_UP = 273 -
-   - - K_a = 97 -
-   - - K_b = 98 -
-   - - K_c = 99 -
-   - - K_d = 100 -
-   - - K_e = 101 -
-   - - K_f = 102 -
-   - - K_g = 103 -
-   - - K_h = 104 -
-   - - K_i = 105 -
-   - - K_j = 106 -
-   - - K_k = 107 -
-   - - K_l = 108 -
-   - - K_m = 109 -
-   - - K_n = 110 -
-   - - K_o = 111 -
-   - - K_p = 112 -
-   - - K_q = 113 -
-   - - K_r = 114 -
-   - - K_s = 115 -
-   - - K_t = 116 -
-   - - K_u = 117 -
-   - - K_v = 118 -
-   - - K_w = 119 -
-   - - K_x = 120 -
-   - - K_y = 121 -
-   - - K_z = 122 -
-   - - LIL_ENDIAN = 1234 -
-   - - MOUSEBUTTONDOWN = 5 -
-   - - MOUSEBUTTONUP = 6 -
-   - - MOUSEMOTION = 4 -
-   - - NOEVENT = 0 -
-   - - NOFRAME = 32 -
-   - - NUMEVENTS = 32 -
-   - - OPENGL = 2 -
-   - - OPENGLBLIT = 10 -
-   - - PREALLOC = 16777216 -
-   - - QUIT = 12 -
-   - - RESIZABLE = 16 -
-   - - RLEACCEL = 16384 -
-   - - RLEACCELOK = 8192 -
-   - - SCRAP_BMP = 'image/bmp' -
-   - - SCRAP_CLIPBOARD = 0 -
-   - - SCRAP_PBM = 'image/pbm' -
-   - - SCRAP_PPM = 'image/ppm' -
-   - - SCRAP_SELECTION = 1 -
-   - - SCRAP_TEXT = 'text/plain' -
-   - - SRCALPHA = 65536 -
-   - - SRCCOLORKEY = 4096 -
-   - - SWSURFACE = 0 -
-   - - SYSWMEVENT = 13 -
-   - - TIMER_RESOLUTION = 10 -
-   - - USEREVENT = 24 -
-   - - UYVY_OVERLAY = 1498831189 -
-   - - VIDEOEXPOSE = 17 -
-   - - VIDEORESIZE = 16 -
-   - - YUY2_OVERLAY = 844715353 -
-   - - YV12_OVERLAY = 842094169 -
-   - - YVYU_OVERLAY = 1431918169 -
-   - - __package__ = 'fortuneengine.pyconsole' -
- - - - - - -
- - - - - -
Variables Details[hide private]
-
- -
- -
-

path

- -
-
-
-
Value:
-
-'/home/jlew/Code/MAFH/MAFH2/fortuneengine/fortuneengine/pyconsole'
-
-
-
-
-
- -
- -
-

font_path

- -
-
-
-
Value:
-
-'/home/jlew/Code/MAFH/MAFH2/fortuneengine/fortuneengine/pyconsole/font\
-s'
-
-
-
-
-
- -
- -
-

cfg_path

- -
-
-
-
Value:
-
-'/home/jlew/Code/MAFH/MAFH2/fortuneengine/fortuneengine/pyconsole/pyco\
-nsole.cfg'
-
-
-
-
-
- -
- -
-

re_is_number

- -
-
-
-
Value:
-
-re.compile(r'(?x)-?0x[0-9a-fA-F]+[lLjJ]?|-?0[0-7]+[lLjJ]?|-?\d+(?:\.\d\
-*)?[lLjJ]?')
-
-
-
-
-
- -
- -
-

re_is_assign

- -
-
-
-
Value:
-
-re.compile(r'\$(?P<name>[a-zA-Z_]+\S*)\s*=\s*(?P<value>.+)')
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole-pysrc.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole-pysrc.html deleted file mode 100644 index 4836c16..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole-pysrc.html +++ /dev/null @@ -1,778 +0,0 @@ - - - - - fortuneengine.pyconsole.pyconsole - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Package pyconsole :: - Module pyconsole - - - - - - -
[hide private]
[frames] | no frames]
-
-

Source Code for Module fortuneengine.pyconsole.pyconsole

-
-  1  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
-  2  # pyconsole - a simple console for pygame based applications 
-  3  # 
-  4  # Copyright (C) 2006  John Schanck 
-  5  # 
-  6  # This program is free software; you can redistribute it and/or modify 
-  7  # it under the terms of the GNU General Public License as published by 
-  8  # the Free Software Foundation; either version 2 of the License, or 
-  9  # (at your option) any later version. 
- 10  # 
- 11  # This program is distributed in the hope that it will be useful, 
- 12  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
- 13  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
- 14  # GNU General Public License for more details. 
- 15  # 
- 16  # You should have received a copy of the GNU General Public License along 
- 17  # with this program; if not, write to the Free Software Foundation, Inc., 
- 18  # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 
- 19  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
- 20   
- 21   
- 22  import pygame, os, sys 
- 23  from pygame.locals import * 
- 24   
- 25  import re       # Python's Regexp library. Used in pyconsole for parsing 
- 26  import textwrap # Used for proper word wrapping 
- 27  from string import ascii_letters 
- 28  from code import InteractiveConsole     # Gives us access to the python interpreter 
- 29   
- 30   
- 31  __version__ = "0.7" 
- 32   
- 33  WIDTH=0 
- 34  HEIGHT=1 
- 35   
- 36  OUT = 0 
- 37  IN = 1 
- 38  ERR = 2 
- 39   
- 40  PYCONSOLE = 1 
- 41  PYTHON = 2 
- 42   
- 43  path = os.path.abspath(os.path.dirname(__file__)) 
- 44  font_path = os.path.join(path, "fonts") 
- 45  cfg_path = os.path.join(path, "pyconsole.cfg") 
- 46   
- 47   
- 48  re_token = re.compile(r"""[\"].*?[\"]|[\{].*?[\}]|[\(].*?[\)]|[\[].*?[\]]|\S+""") 
- 49  re_is_list = re.compile(r'^[{\[(]') 
- 50  re_is_number = re.compile(r""" 
- 51                          (?x) 
- 52                          [-]?[0][x][0-9a-fA-F]+[lLjJ]? |     #  Hexadecimal 
- 53                          [-]?[0][0-7]+[lLjJ]? |              #  Octal 
- 54                          [-]?[\d]+(?:[.][\d]*)?[lLjJ]?       #  Decimal (Int or float) 
- 55                          """) 
- 56  re_is_assign = re.compile(r'[$](?P<name>[a-zA-Z_]+\S*)\s*[=]\s*(?P<value>.+)') 
- 57  re_is_comment =  re.compile(r'\s*#.*') 
- 58  re_is_var = re.compile(r'^[$][a-zA-Z_]+\w*\Z') 
- 59   
- 60   
- 61   
-
62 -class Writable(list): -
63 line_pointer = -1 -
64 - def write(self, line): -
65 self.append(str(line)) -
66 - def reset(self): -
67 self.__init__() -
68 - def readline(self, size=-1): -
69 # Python's interactive help likes to try and call this, which causes the program to crash - 70 # I see no reason to implement interactive help. - 71 raise NotImplementedError -
72 -
73 -class ParseError(Exception): -
74 - def __init__(self, token): -
75 self.token = token -
76 - def at_token(self): -
77 return self.token -
78 -
79 -def balanced(t): -
80 stack = [] - 81 pairs = {"\'":"\'", '\"':'\"', "{":"}", "[":"]", "(":")"} - 82 for char in t: - 83 if stack and char == pairs[stack[-1]]: - 84 stack.pop() - 85 elif char in pairs: - 86 stack.append(char) - 87 return not bool(stack) -
88 -
89 -class Console: -
90 - def __init__(self, screen, rect, functions={}, key_calls={}, vars={}, syntax={}): -
91 if not pygame.display.get_init(): - 92 raise pygame.error, "Display not initialized. Initialize the display before creating a Console" - 93 - 94 if not pygame.font.get_init(): - 95 pygame.font.init() - 96 - 97 self.parent_screen = screen - 98 self.rect = pygame.Rect(rect) - 99 self.size = self.rect.size -100 -101 self.user_vars = vars -102 self.user_syntax = syntax -103 self.user_namespace = {} -104 -105 self.variables = {\ -106 "bg_alpha":int,\ -107 "bg_color": list,\ -108 "txt_color_i": list,\ -109 "txt_color_o": list,\ -110 "ps1": str,\ -111 "ps2": str,\ -112 "ps3": str,\ -113 "active": bool,\ -114 "repeat_rate": list,\ -115 "preserve_events":bool,\ -116 "python_mode":bool,\ -117 "motd":list -118 } -119 -120 self.load_cfg() -121 -122 self.set_interpreter() -123 -124 #pygame.key.set_repeat(*self.repeat_rate) -125 -126 self.bg_layer = pygame.Surface(self.size) -127 self.bg_layer.set_alpha(self.bg_alpha) -128 -129 self.txt_layer = pygame.Surface(self.size) -130 self.txt_layer.set_colorkey(self.bg_color) -131 -132 try: -133 self.font = pygame.font.Font(os.path.join(font_path,"default.ttf"), 14) -134 except IOError: -135 self.font = pygame.font.SysFont("monospace", 14) -136 -137 self.font_height = self.font.get_linesize() -138 self.max_lines = (self.size[HEIGHT] / self.font_height) - 1 -139 -140 self.max_chars = (self.size[WIDTH]/(self.font.size(ascii_letters)[WIDTH]/len(ascii_letters))) - 1 -141 self.txt_wrapper = textwrap.TextWrapper() -142 -143 self.c_out = self.motd -144 self.c_hist = [""] -145 self.c_hist_pos = 0 -146 self.c_in = "" -147 self.c_pos = 0 -148 self.c_draw_pos = 0 -149 self.c_scroll = 0 -150 -151 -152 self.changed = True -153 -154 self.func_calls = {} -155 self.key_calls = {} -156 -157 self.add_func_calls({"echo":self.output, "clear": self.clear, "help":self.help}) -158 self.add_func_calls(functions) -159 -160 self.add_key_calls({"l":self.clear, "c":self.clear_input, "w":self.set_active}) -161 self.add_key_calls(key_calls) -
162 -163 -164 ################## -165 #-Initialization-# -
166 - def load_cfg(self): -
167 '''\ -168 Loads the config file path/pygame-console.cfg\ -169 All variables are initialized to their defaults,\ -170 then new values will be loaded from the config file if it exists. -171 ''' -172 self.init_default_cfg() -173 if os.path.exists(cfg_path): -174 for line in file(cfg_path): -175 tokens = self.tokenize(line) -176 if re_is_comment.match(line): -177 continue -178 elif len(tokens) != 2: -179 continue -180 self.safe_set_attr(tokens[0],tokens[1]) -
181 -
182 - def init_default_cfg(self): -
183 self.bg_alpha = 255 -184 self.bg_color = [0x0,0x0,0x0] -185 self.txt_color_i = [0xFF,0xFF,0xFF] -186 self.txt_color_o = [0xCC,0xCC,0xCC] -187 self.ps1 = "] " -188 self.ps2 = ">>> " -189 self.ps3 = "... " -190 self.active = False -191 self.repeat_rate = [500,30] -192 self.python_mode = False -193 self.preserve_events = False -194 self.motd = ["[PyConsole 0.5]"] -
195 -
196 - def safe_set_attr(self, name, value): -
197 '''\ -198 Safely set the console variables -199 ''' -200 if name in self.variables: -201 if isinstance(value, self.variables[name]) or not self.variables[name]: -202 self.__dict__[name] = value -
203 -
204 - def add_func_calls(self, functions): -
205 '''\ -206 Add functions to the func_calls dictionary. -207 Arguments: -208 functions -- dictionary of functions to add. -209 ''' -210 if isinstance(functions,dict): -211 self.func_calls.update(functions) -212 self.user_namespace.update(self.func_calls) -
213 -
214 - def add_key_calls(self, functions): -
215 '''\ -216 Add functions to the key_calls dictionary. -217 Arguments: -218 functions -- dictionary of key_calls to add. -219 ''' -220 if isinstance(functions,dict): -221 self.key_calls.update(functions) -
222 -
223 - def output(self, text): -
224 '''\ -225 Prepare text to be displayed -226 Arguments: -227 text -- Text to be displayed -228 ''' -229 if not str(text): -230 return; -231 -232 try: -233 self.changed = True -234 if not isinstance(text,str): -235 text = str(text) -236 text = text.expandtabs() -237 text = text.splitlines() -238 self.txt_wrapper.width = self.max_chars -239 for line in text: -240 for w in self.txt_wrapper.wrap(line): -241 self.c_out.append(w) -242 except: -243 pass -
244 -
245 - def set_active(self,b=None): -
246 '''\ -247 Activate or Deactivate the console -248 Arguments: -249 b -- Optional boolean argument, True=Activate False=Deactivate -250 ''' -251 if not b: -252 self.active = not self.active -253 else: -254 self.active = b -
255 -256 -
257 - def format_input_line(self): -
258 '''\ -259 Format input line to be displayed -260 ''' -261 # The \v here is sort of a hack, it's just a character that isn't recognized by the font engine -262 text = self.c_in[:self.c_pos] + "\v" + self.c_in[self.c_pos+1:] -263 n_max = self.max_chars - len(self.c_ps) -264 vis_range = self.c_draw_pos, self.c_draw_pos + n_max -265 return self.c_ps + text[vis_range[0]:vis_range[1]] -
266 -
267 - def draw(self): -
268 '''\ -269 Draw the console to the parent screen -270 ''' -271 if not self.active: -272 return; -273 -274 if self.changed: -275 self.changed = False -276 # Draw Output -277 self.txt_layer.fill(self.bg_color) -278 lines = self.c_out[-(self.max_lines+self.c_scroll):len(self.c_out)-self.c_scroll] -279 y_pos = self.size[HEIGHT]-(self.font_height*(len(lines)+1)) -280 -281 for line in lines: -282 tmp_surf = self.font.render(line, True, self.txt_color_o) -283 self.txt_layer.blit(tmp_surf, (1, y_pos, 0, 0)) -284 y_pos += self.font_height -285 # Draw Input -286 tmp_surf = self.font.render(self.format_input_line(), True, self.txt_color_i) -287 self.txt_layer.blit(tmp_surf, (1,self.size[HEIGHT]-self.font_height,0,0)) -288 # Clear background and blit text to it -289 self.bg_layer.fill(self.bg_color) -290 self.bg_layer.blit(self.txt_layer,(0,0,0,0)) -291 -292 # Draw console to parent screen -293 # self.parent_screen.fill(self.txt_color_i, (self.rect.x-1, self.rect.y-1, self.size[WIDTH]+2, self.size[HEIGHT]+2)) -294 pygame.draw.rect(self.parent_screen, self.txt_color_i, (self.rect.x-1, self.rect.y-1, self.size[WIDTH]+2, self.size[HEIGHT]+2), 1) -295 self.parent_screen.blit(self.bg_layer,self.rect) -
296 -297 ####################################################################### -298 # Functions to communicate with the console and the python interpreter# -
299 - def set_interpreter(self): -
300 if self.python_mode: -301 self.output("Entering Python mode") -302 self.python_mode = True -303 self.python_interpreter = InteractiveConsole() -304 self.tmp_fds = [] -305 self.py_fds = [Writable() for i in range(3)] -306 self.c_ps = self.ps2 -307 else: -308 self.output("Entering Pyconsole mode") -309 self.python_mode = False -310 self.c_ps = self.ps1 -
311 -
312 - def catch_output(self): -
313 if not self.tmp_fds: -314 self.tmp_fds = [sys.stdout, sys.stdin, sys.stderr] -315 sys.stdout, sys.stdin, sys.stderr = self.py_fds -
316 -
317 - def release_output(self): -
318 if self.tmp_fds: -319 sys.stdout, sys.stdin, sys.stderr = self.tmp_fds -320 self.tmp_fds = [] -321 [fd.reset() for fd in self.py_fds] -
322 -
323 - def submit_input(self, text): -
324 '''\ -325 Submit input -326 1) Move input to output -327 2) Evaluate input -328 3) Clear input line -329 ''' -330 -331 self.clear_input() -332 self.output(self.c_ps + text) -333 self.c_scroll = 0 -334 if self.python_mode: -335 self.send_python(text) -336 else: -337 self.send_pyconsole(text) -
338 -
339 - def send_python(self, text): -
340 '''\ -341 Sends input the the python interpreter in effect giving the user the ability to do anything python can. -342 ''' -343 self.c_ps = self.ps2 -344 self.catch_output() -345 if text: -346 self.add_to_history(text) -347 r = self.python_interpreter.push(text) -348 if r: -349 self.c_ps = self.ps3 -350 else: -351 code = "".join(self.py_fds[OUT]) -352 self.python_interpreter.push("\n") -353 self.python_interpreter.runsource(code) -354 for i in self.py_fds[OUT]+self.py_fds[ERR]: -355 self.output(i) -356 self.release_output() -
357 -
358 - def send_pyconsole(self, text): -
359 '''\ -360 Sends input to pyconsole to be interpreted -361 ''' -362 if not text: # Output a blank row if nothing is entered -363 self.output("") -364 return; -365 -366 self.add_to_history(text) -367 -368 #Determine if the statement is an assignment -369 assign = re_is_assign.match(text) -370 try: -371 #If it is tokenize only the "value" part of $name = value -372 if assign: -373 tokens = self.tokenize(assign.group('value')) -374 else: -375 tokens = self.tokenize(text) -376 except ParseError, e: -377 self.output(r'At Token: "%s"' % e.at_token()) -378 return; -379 -380 if tokens == None: -381 return -382 -383 #Evaluate -384 try: -385 out = None -386 # A variable alone on a line -387 if (len(tokens) is 1) and re_is_var.match(text) and not assign: -388 out = tokens[0] -389 # Statement in the form $name = value -390 elif (len(tokens) is 1) and assign: -391 self.setvar(assign.group('name'), tokens[0]) -392 else: -393 # Function -394 out = self.func_calls[tokens[0]](*tokens[1:]) -395 # Assignment from function's return value -396 if assign: -397 self.setvar(assign.group('name'), out) -398 -399 if not out == None: -400 self.output(out) -401 except (KeyError,TypeError): -402 self.output("Unknown Command: " + str(tokens[0])) -403 self.output(r'Type "help" for a list of commands.') -
404 -405 -406 -407 #################################################### -408 #-Functions for sharing variables with the console-# -
409 - def setvar(self, name, value): -
410 '''\ -411 Sets the value of a variable -412 ''' -413 if self.user_vars.has_key(name) or not self.__dict__.has_key(name): -414 self.user_vars.update({name:value}) -415 self.user_namespace.update(self.user_vars) -416 elif self.__dict__.has_key(name): -417 self.__dict__.update({name:value}) -
418 -
419 - def getvar(self, name): -
420 '''\ -421 Gets the value of a variable, this is useful for people that want to access console variables from within their game -422 ''' -423 if self.user_vars.has_key(name) or not self.__dict__.has_key(name): -424 return self.user_vars[name] -425 elif self.__dict__.has_key(name): -426 return self.__dict__[name] -
427 -
428 - def setvars(self, vars): -
429 try: -430 self.user_vars.update(vars) -431 self.user_namespace.update(self.user_vars) -432 except TypeError: -433 self.output("setvars requires a dictionary") -
434 -
435 - def getvars(self, opt_dict=None): -
436 if opt_dict: -437 opt_dict.update(self.user_vars) -438 else: -439 return self.user_vars -
440 -441 -
442 - def add_to_history(self, text): -
443 '''\ -444 Add specified text to the history -445 ''' -446 self.c_hist.insert(-1,text) -447 self.c_hist_pos = len(self.c_hist)-1 -
448 -
449 - def clear_input(self): -
450 '''\ -451 Clear input line and reset cursor position -452 ''' -453 self.c_in = "" -454 self.c_pos = 0 -455 self.c_draw_pos = 0 -
456 -
457 - def set_pos(self, newpos): -
458 '''\ -459 Moves cursor safely -460 ''' -461 self.c_pos = newpos -462 if (self.c_pos - self.c_draw_pos) >= (self.max_chars - len(self.c_ps)): -463 self.c_draw_pos = max(0, self.c_pos - (self.max_chars - len(self.c_ps))) -464 elif self.c_draw_pos > self.c_pos: -465 self.c_draw_pos = self.c_pos - (self.max_chars/2) -466 if self.c_draw_pos < 0: -467 self.c_draw_pos = 0 -468 self.c_pos = 0 -
469 -
470 - def str_insert(self, text, strn): -
471 '''\ -472 Insert characters at the current cursor position -473 ''' -474 foo = text[:self.c_pos] + strn + text[self.c_pos:] -475 self.set_pos(self.c_pos + len(strn)) -476 return foo -
477 -
478 - def process_input(self, event): -
479 '''\ -480 Loop through pygame events and evaluate them -481 ''' -482 if not self.active: -483 return False; -484 -485 if event.type == KEYDOWN: -486 self.changed = True -487 ## Special Character Manipulation -488 if event.key == K_TAB: -489 self.c_in = self.str_insert(self.c_in, " ") -490 elif event.key == K_BACKSPACE: -491 if self.c_pos > 0: -492 self.c_in = self.c_in[:self.c_pos-1] + self.c_in[self.c_pos:] -493 self.set_pos(self.c_pos-1) -494 elif event.key == K_DELETE: -495 if self.c_pos < len(self.c_in): -496 self.c_in = self.c_in[:self.c_pos] + self.c_in[self.c_pos+1:] -497 elif event.key == K_RETURN or event.key == 271: -498 self.submit_input(self.c_in) -499 ## Changing Cursor Position -500 elif event.key == K_LEFT: -501 if self.c_pos > 0: -502 self.set_pos(self.c_pos-1) -503 elif event.key == K_RIGHT: -504 if self.c_pos < len(self.c_in): -505 self.set_pos(self.c_pos+1) -506 elif event.key == K_HOME: -507 self.set_pos(0) -508 elif event.key == K_END: -509 self.set_pos(len(self.c_in)) -510 ## History Navigation -511 elif event.key == K_UP: -512 if len(self.c_out): -513 if self.c_hist_pos > 0: -514 self.c_hist_pos -= 1 -515 self.c_in = self.c_hist[self.c_hist_pos] -516 self.set_pos(len(self.c_in)) -517 elif event.key == K_DOWN: -518 if len(self.c_out): -519 if self.c_hist_pos < len(self.c_hist)-1: -520 self.c_hist_pos += 1 -521 self.c_in = self.c_hist[self.c_hist_pos] -522 self.set_pos(len(self.c_in)) -523 ## Scrolling -524 elif event.key == K_PAGEUP: -525 if self.c_scroll < len(self.c_out)-1: -526 self.c_scroll += 1 -527 elif event.key == K_PAGEDOWN: -528 if self.c_scroll > 0: -529 self.c_scroll -= 1 -530 ## Normal character printing -531 elif event.key >= 32: -532 mods = pygame.key.get_mods() -533 if mods & KMOD_CTRL: -534 if event.key in range(256) and chr(event.key) in self.key_calls: -535 self.key_calls[chr(event.key)]() -536 else: -537 char = str(event.unicode) -538 self.c_in = self.str_insert(self.c_in, char) -539 return True -
540 -
541 - def convert_token(self, tok): -
542 '''\ -543 Convert a token to its proper type -544 ''' -545 tok = tok.strip("$") -546 try: -547 tmp = eval(tok, self.__dict__, self.user_namespace) -548 except SyntaxError, strerror: -549 self.output("SyntaxError: " + str(strerror)) -550 raise ParseError, tok -551 except TypeError, strerror: -552 self.output("TypeError: " + str(strerror)) -553 raise ParseError, tok -554 except NameError, strerror: -555 self.output("NameError: " + str(strerror)) -556 except: -557 self.output("Error:") -558 raise ParseError, tok -559 else: -560 return tmp -
561 -
562 - def tokenize(self, s): -
563 '''\ -564 Tokenize input line, convert tokens to proper types -565 ''' -566 if re_is_comment.match(s): -567 return [s] -568 -569 for re in self.user_syntax: -570 group = re.match(s) -571 if group: -572 self.user_syntax[re](self, group) -573 return -574 -575 tokens = re_token.findall(s) -576 tokens = [i.strip("\"") for i in tokens] -577 cmd = [] -578 i = 0 -579 while i < len(tokens): -580 t_count = 0 -581 val = tokens[i] -582 -583 if re_is_number.match(val): -584 cmd.append(self.convert_token(val)) -585 elif re_is_var.match(val): -586 cmd.append(self.convert_token(val)) -587 elif val == "True": -588 cmd.append(True) -589 elif val == "False": -590 cmd.append(False) -591 elif re_is_list.match(val): -592 while not balanced(val) and (i + t_count) < len(tokens)-1: -593 t_count += 1 -594 val += tokens[i+t_count] -595 else: -596 if (i + t_count) < len(tokens): -597 cmd.append(self.convert_token(val)) -598 else: -599 raise ParseError, val -600 else: -601 cmd.append(val) -602 i += t_count + 1 -603 return cmd -
604 -605 -606 ########################## -607 #-Some Builtin functions-# -
608 - def clear(self): -
609 '''\ -610 Clear the Screen -611 ''' -612 self.c_out = ["[Screen Cleared]"] -613 self.c_scroll = 0 -
614 -
615 - def help(self, *args): -
616 '''\ -617 Output information about functions -618 Arguments: -619 args -- arbitrary argument list of function names -620 |- No Args - A list of available functions will be displayed -621 |- One or more Args - Docstring of each function will be displayed -622 ''' -623 if args: -624 items = [(i,self.func_calls[i]) for i in args if i in self.func_calls] -625 for i,v in items: -626 out = i + ": Takes %d arguments. " % (v.func_code.co_argcount - (v.func_code.co_varnames[0] is "self")) -627 doc = v.func_doc -628 if doc: -629 out += textwrap.dedent(doc) -630 tmp_indent = self.txt_wrapper.subsequent_indent -631 self.txt_wrapper.subsequent_indent = " "*(len(i)+2) -632 self.output(out) -633 self.txt_wrapper.subsequent_indent = tmp_indent -634 else: -635 out = "Available commands: " + str(self.func_calls.keys()).strip("[]") -636 self.output(out) -637 self.output(r'Type "help command-name" for more information on that command') -
638 -
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole.Console-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole.Console-class.html deleted file mode 100644 index f4d3020..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole.Console-class.html +++ /dev/null @@ -1,796 +0,0 @@ - - - - - fortuneengine.pyconsole.pyconsole.Console - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Package pyconsole :: - Module pyconsole :: - Class Console - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Console

source code

-
Known Subclasses:
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - screen, - rect, - functions={}, - key_calls={}, - vars={}, - syntax={}) - source code - -
- -
-   - - - - - - -
load_cfg(self)
- Loads the config file path/pygame-console.cfg All variables - are initialized to their defaults, then new values will be - loaded from the config file if it exists.
- source code - -
- -
-   - - - - - - -
init_default_cfg(self) - source code - -
- -
-   - - - - - - -
safe_set_attr(self, - name, - value)
- Safely set the console variables
- source code - -
- -
-   - - - - - - -
add_func_calls(self, - functions)
- Add functions to the func_calls dictionary.
- source code - -
- -
-   - - - - - - -
add_key_calls(self, - functions)
- Add functions to the key_calls dictionary.
- source code - -
- -
-   - - - - - - -
output(self, - text)
- Prepare text to be displayed...
- source code - -
- -
-   - - - - - - -
set_active(self, - b=None)
- Activate or Deactivate the console...
- source code - -
- -
-   - - - - - - -
format_input_line(self)
- Format input line to be displayed
- source code - -
- -
-   - - - - - - -
draw(self)
- Draw the console to the parent screen
- source code - -
- -
-   - - - - - - -
set_interpreter(self) - source code - -
- -
-   - - - - - - -
catch_output(self) - source code - -
- -
-   - - - - - - -
release_output(self) - source code - -
- -
-   - - - - - - -
submit_input(self, - text)
- Submit input 1) Move input to output 2) Evaluate input 3) Clear input - line
- source code - -
- -
-   - - - - - - -
send_python(self, - text)
- Sends input the the python interpreter in effect giving the user the - ability to do anything python can.
- source code - -
- -
-   - - - - - - -
send_pyconsole(self, - text)
- Sends input to pyconsole to be interpreted
- source code - -
- -
-   - - - - - - -
setvar(self, - name, - value)
- Sets the value of a variable
- source code - -
- -
-   - - - - - - -
getvar(self, - name)
- Gets the value of a variable, this is useful for people that want to - access console variables from within their game
- source code - -
- -
-   - - - - - - -
setvars(self, - vars) - source code - -
- -
-   - - - - - - -
getvars(self, - opt_dict=None) - source code - -
- -
-   - - - - - - -
add_to_history(self, - text)
- Add specified text to the history
- source code - -
- -
-   - - - - - - -
clear_input(self)
- Clear input line and reset cursor position
- source code - -
- -
-   - - - - - - -
set_pos(self, - newpos)
- Moves cursor safely
- source code - -
- -
-   - - - - - - -
str_insert(self, - text, - strn)
- Insert characters at the current cursor position
- source code - -
- -
-   - - - - - - -
process_input(self, - event)
- Loop through pygame events and evaluate them
- source code - -
- -
-   - - - - - - -
convert_token(self, - tok)
- Convert a token to its proper type
- source code - -
- -
-   - - - - - - -
tokenize(self, - s)
- Tokenize input line, convert tokens to proper types
- source code - -
- -
-   - - - - - - -
clear(self)
- Clear the Screen
- source code - -
- -
-   - - - - - - -
help(self, - *args)
- Output information about functions...
- source code - -
- -
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

add_func_calls(self, - functions) -

-
source code  -
- -
-Add functions to the func_calls dictionary.
-Arguments:
-   functions -- dictionary of functions to add.
-
-
-
-
-
-
- -
- -
- - -
-

add_key_calls(self, - functions) -

-
source code  -
- -
-Add functions to the key_calls dictionary.
-Arguments:
-   functions -- dictionary of key_calls to add.
-
-
-
-
-
-
- -
- -
- - -
-

output(self, - text) -

-
source code  -
- -
-Prepare text to be displayed
-Arguments:
-   text -- Text to be displayed
-
-
-
-
-
-
- -
- -
- - -
-

set_active(self, - b=None) -

-
source code  -
- -
-Activate or Deactivate the console
-Arguments:
-   b -- Optional boolean argument, True=Activate False=Deactivate
-
-
-
-
-
-
- -
- -
- - -
-

help(self, - *args) -

-
source code  -
- -
-Output information about functions
-Arguments:
-   args -- arbitrary argument list of function names
-     |- No Args - A list of available functions will be displayed
-     |- One or more Args - Docstring of each function will be displayed
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole.ParseError-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole.ParseError-class.html deleted file mode 100644 index 04daf5b..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole.ParseError-class.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - fortuneengine.pyconsole.pyconsole.ParseError - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Package pyconsole :: - Module pyconsole :: - Class ParseError - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class ParseError

source code

-
-              object --+        
-                       |        
-exceptions.BaseException --+    
-                           |    
-        exceptions.Exception --+
-                               |
-                              ParseError
-
- -
- - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
__init__(self, - token)
- x.__init__(...) initializes x; see x.__class__.__doc__ for signature
- source code - -
- -
-   - - - - - - -
at_token(self) - source code - -
- -
-

Inherited from exceptions.Exception: - __new__ -

-

Inherited from exceptions.BaseException: - __delattr__, - __getattribute__, - __getitem__, - __getslice__, - __reduce__, - __repr__, - __setattr__, - __setstate__, - __str__, - __unicode__ -

-

Inherited from object: - __format__, - __hash__, - __reduce_ex__, - __sizeof__, - __subclasshook__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from exceptions.BaseException: - args, - message -

-

Inherited from object: - __class__ -

-
- - - - - - -
- - - - - -
Method Details[hide private]
-
- -
- -
- - -
-

__init__(self, - token) -
(Constructor) -

-
source code  -
- -

x.__init__(...) initializes x; see x.__class__.__doc__ for - signature

-
-
Overrides: - object.__init__ -
(inherited documentation)
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole.Writable-class.html b/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole.Writable-class.html deleted file mode 100644 index 51f0698..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/fortuneengine.pyconsole.pyconsole.Writable-class.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - fortuneengine.pyconsole.pyconsole.Writable - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - Package fortuneengine :: - Package pyconsole :: - Module pyconsole :: - Class Writable - - - - - - -
[hide private]
[frames] | no frames]
-
- -

Class Writable

source code

-
-object --+    
-         |    
-      list --+
-             |
-            Writable
-
- -
- - - - - - - - - - - - - - - - - - -
- - - - - -
Instance Methods[hide private]
-
-   - - - - - - -
write(self, - line) - source code - -
- -
-   - - - - - - -
reset(self) - source code - -
- -
-   - - - - - - -
readline(self, - size=-1) - source code - -
- -
-

Inherited from list: - __add__, - __contains__, - __delitem__, - __delslice__, - __eq__, - __ge__, - __getattribute__, - __getitem__, - __getslice__, - __gt__, - __iadd__, - __imul__, - __init__, - __iter__, - __le__, - __len__, - __lt__, - __mul__, - __ne__, - __new__, - __repr__, - __reversed__, - __rmul__, - __setitem__, - __setslice__, - __sizeof__, - append, - count, - extend, - index, - insert, - pop, - remove, - reverse, - sort -

-

Inherited from object: - __delattr__, - __format__, - __reduce__, - __reduce_ex__, - __setattr__, - __str__, - __subclasshook__ -

-
- - - - - - - - - - - - -
- - - - - -
Class Variables[hide private]
-
-   - - line_pointer = -1 -
-

Inherited from list: - __hash__ -

-
- - - - - - - - - -
- - - - - -
Properties[hide private]
-
-

Inherited from object: - __class__ -

-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/frames.html b/MAFH2/fortuneengine/docs/epydoc/frames.html deleted file mode 100644 index 9bda1ce..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/frames.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - API Documentation - - - - - - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/help.html b/MAFH2/fortuneengine/docs/epydoc/help.html deleted file mode 100644 index 3845da0..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/help.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - Help - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
- -

API Documentation

- -

This document contains the API (Application Programming Interface) -documentation for this project. Documentation for the Python -objects defined by the project is divided into separate pages for each -package, module, and class. The API documentation also includes two -pages containing information about the project as a whole: a trees -page, and an index page.

- -

Object Documentation

- -

Each Package Documentation page contains:

-
    -
  • A description of the package.
  • -
  • A list of the modules and sub-packages contained by the - package.
  • -
  • A summary of the classes defined by the package.
  • -
  • A summary of the functions defined by the package.
  • -
  • A summary of the variables defined by the package.
  • -
  • A detailed description of each function defined by the - package.
  • -
  • A detailed description of each variable defined by the - package.
  • -
- -

Each Module Documentation page contains:

-
    -
  • A description of the module.
  • -
  • A summary of the classes defined by the module.
  • -
  • A summary of the functions defined by the module.
  • -
  • A summary of the variables defined by the module.
  • -
  • A detailed description of each function defined by the - module.
  • -
  • A detailed description of each variable defined by the - module.
  • -
- -

Each Class Documentation page contains:

-
    -
  • A class inheritance diagram.
  • -
  • A list of known subclasses.
  • -
  • A description of the class.
  • -
  • A summary of the methods defined by the class.
  • -
  • A summary of the instance variables defined by the class.
  • -
  • A summary of the class (static) variables defined by the - class.
  • -
  • A detailed description of each method defined by the - class.
  • -
  • A detailed description of each instance variable defined by the - class.
  • -
  • A detailed description of each class (static) variable defined - by the class.
  • -
- -

Project Documentation

- -

The Trees page contains the module and class hierarchies:

-
    -
  • The module hierarchy lists every package and module, with - modules grouped into packages. At the top level, and within each - package, modules and sub-packages are listed alphabetically.
  • -
  • The class hierarchy lists every class, grouped by base - class. If a class has more than one base class, then it will be - listed under each base class. At the top level, and under each base - class, classes are listed alphabetically.
  • -
- -

The Index page contains indices of terms and - identifiers:

-
    -
  • The term index lists every term indexed by any object's - documentation. For each term, the index provides links to each - place where the term is indexed.
  • -
  • The identifier index lists the (short) name of every package, - module, class, method, function, variable, and parameter. For each - identifier, the index provides a short description, and a link to - its documentation.
  • -
- -

The Table of Contents

- -

The table of contents occupies the two frames on the left side of -the window. The upper-left frame displays the project -contents, and the lower-left frame displays the module -contents:

- - - - - - - - - -
- Project
Contents
...
- API
Documentation
Frame


-
- Module
Contents
 
...
  -

- -

The project contents frame contains a list of all packages -and modules that are defined by the project. Clicking on an entry -will display its contents in the module contents frame. Clicking on a -special entry, labeled "Everything," will display the contents of -the entire project.

- -

The module contents frame contains a list of every -submodule, class, type, exception, function, and variable defined by a -module or package. Clicking on an entry will display its -documentation in the API documentation frame. Clicking on the name of -the module, at the top of the frame, will display the documentation -for the module itself.

- -

The "frames" and "no frames" buttons below the top -navigation bar can be used to control whether the table of contents is -displayed or not.

- -

The Navigation Bar

- -

A navigation bar is located at the top and bottom of every page. -It indicates what type of page you are currently viewing, and allows -you to go to related pages. The following table describes the labels -on the navigation bar. Note that not some labels (such as -[Parent]) are not displayed on all pages.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
LabelHighlighted when...Links to...
[Parent](never highlighted) the parent of the current package
[Package]viewing a packagethe package containing the current object -
[Module]viewing a modulethe module containing the current object -
[Class]viewing a class the class containing the current object
[Trees]viewing the trees page the trees page
[Index]viewing the index page the index page
[Help]viewing the help page the help page
- -

The "show private" and "hide private" buttons below -the top navigation bar can be used to control whether documentation -for private objects is displayed. Private objects are usually defined -as objects whose (short) names begin with a single underscore, but do -not end with an underscore. For example, "_x", -"__pprint", and "epydoc.epytext._tokenize" -are private objects; but "re.sub", -"__init__", and "type_" are not. However, -if a module defines the "__all__" variable, then its -contents are used to decide which objects are private.

- -

A timestamp below the bottom navigation bar indicates when each -page was last updated.

- - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/identifier-index.html b/MAFH2/fortuneengine/docs/epydoc/identifier-index.html deleted file mode 100644 index 2dfaeba..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/identifier-index.html +++ /dev/null @@ -1,1472 +0,0 @@ - - - - - Identifier Index - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
- -
-

Identifier Index

-
-[ - A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - _ -] -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

B

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

C

- - - - - - - - - - - - - - - - - - - - - - -

D

- - - - - - - - - - - - - - - - - - - - - - -

E

- - - - - - - - -

F

- - - - - - - - - - - - -

G

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

H

- - - - - - - - - - - - - - - - - - - - - - - - - - - -

I

- - - - - - - - - - - - -

J

- - - - - - - - - - - - -

K

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

L

- - - - - - - - - - - - - - - - - - - - - - -

M

- - - - - - - - - - - - - - - - - -

N

- - - - - - - - - - - - - - - - - -

O

- - - - - - - - - - - - -

P

- - - - - - - - - - - - - - - - - -

Q

- - - - - - - - -

R

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

S

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

T

- - - - - - - - -

U

- - - - - - - - - - - - -

V

- - - - - - - - -

W

- - - - - - - - -

Y

- - - - - - - - -

_

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/index.html b/MAFH2/fortuneengine/docs/epydoc/index.html deleted file mode 100644 index 9bda1ce..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - API Documentation - - - - - - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/module-tree.html b/MAFH2/fortuneengine/docs/epydoc/module-tree.html deleted file mode 100644 index 5c9996f..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/module-tree.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - Module Hierarchy - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - - - - -
[hide private]
[frames] | no frames]
-
-
- [ Module Hierarchy - | Class Hierarchy ] -

-

Module Hierarchy

- - - - - - - - - - - - - - - - - - - - - - - - -
- - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/redirect.html b/MAFH2/fortuneengine/docs/epydoc/redirect.html deleted file mode 100644 index 8e303bf..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/redirect.html +++ /dev/null @@ -1,38 +0,0 @@ -Epydoc Redirect Page - - - - - - - - -

Epydoc Auto-redirect page

- -

When javascript is enabled, this page will redirect URLs of -the form redirect.html#dotted.name to the -documentation for the object with the given fully-qualified -dotted name.

-

 

- - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-everything.html b/MAFH2/fortuneengine/docs/epydoc/toc-everything.html deleted file mode 100644 index 56e509c..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-everything.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - Everything - - - - - -

Everything

-
-

All Classes

- fortuneengine.DrawableFontObject.DrawableFontObject
fortuneengine.DrawableObject.DrawableObject
fortuneengine.DynamicDrawableObject.DynamicDrawableObject
fortuneengine.GameEngine.GameEngine
fortuneengine.GameEngineConsole.GameEngineConsole
fortuneengine.GameEngineElement.GameEngineElement
fortuneengine.GameInspect.GameInspect
fortuneengine.Scene.Scene
fortuneengine.pyconsole.pyconsole.Console
fortuneengine.pyconsole.pyconsole.ParseError
fortuneengine.pyconsole.pyconsole.Writable

All Functions

- fortuneengine.pyconsole.pyconsole.balanced

All Variables

- fortuneengine.DrawableFontObject.__package__
fortuneengine.DrawableObject.__package__
fortuneengine.DynamicDrawableObject.__package__
fortuneengine.GameEngine.__package__
fortuneengine.GameEngineConsole.__package__
fortuneengine.GameEngineElement.__package__
fortuneengine.GameInspect.__package__
fortuneengine.Scene.__package__
fortuneengine.__package__
fortuneengine.pyconsole.__package__
fortuneengine.pyconsole.pyconsole.ACTIVEEVENT
fortuneengine.pyconsole.pyconsole.ANYFORMAT
fortuneengine.pyconsole.pyconsole.ASYNCBLIT
fortuneengine.pyconsole.pyconsole.AUDIO_S16
fortuneengine.pyconsole.pyconsole.AUDIO_S16LSB
fortuneengine.pyconsole.pyconsole.AUDIO_S16MSB
fortuneengine.pyconsole.pyconsole.AUDIO_S16SYS
fortuneengine.pyconsole.pyconsole.AUDIO_S8
fortuneengine.pyconsole.pyconsole.AUDIO_U16
fortuneengine.pyconsole.pyconsole.AUDIO_U16LSB
fortuneengine.pyconsole.pyconsole.AUDIO_U16MSB
fortuneengine.pyconsole.pyconsole.AUDIO_U16SYS
fortuneengine.pyconsole.pyconsole.AUDIO_U8
fortuneengine.pyconsole.pyconsole.BIG_ENDIAN
fortuneengine.pyconsole.pyconsole.BLEND_ADD
fortuneengine.pyconsole.pyconsole.BLEND_MAX
fortuneengine.pyconsole.pyconsole.BLEND_MIN
fortuneengine.pyconsole.pyconsole.BLEND_MULT
fortuneengine.pyconsole.pyconsole.BLEND_RGBA_ADD
fortuneengine.pyconsole.pyconsole.BLEND_RGBA_MAX
fortuneengine.pyconsole.pyconsole.BLEND_RGBA_MIN
fortuneengine.pyconsole.pyconsole.BLEND_RGBA_MULT
fortuneengine.pyconsole.pyconsole.BLEND_RGBA_SUB
fortuneengine.pyconsole.pyconsole.BLEND_RGB_ADD
fortuneengine.pyconsole.pyconsole.BLEND_RGB_MAX
fortuneengine.pyconsole.pyconsole.BLEND_RGB_MIN
fortuneengine.pyconsole.pyconsole.BLEND_RGB_MULT
fortuneengine.pyconsole.pyconsole.BLEND_RGB_SUB
fortuneengine.pyconsole.pyconsole.BLEND_SUB
fortuneengine.pyconsole.pyconsole.BUTTON_X1
fortuneengine.pyconsole.pyconsole.BUTTON_X2
fortuneengine.pyconsole.pyconsole.DOUBLEBUF
fortuneengine.pyconsole.pyconsole.ERR
fortuneengine.pyconsole.pyconsole.FULLSCREEN
fortuneengine.pyconsole.pyconsole.GL_ACCELERATED_VISUAL
fortuneengine.pyconsole.pyconsole.GL_ACCUM_ALPHA_SIZE
fortuneengine.pyconsole.pyconsole.GL_ACCUM_BLUE_SIZE
fortuneengine.pyconsole.pyconsole.GL_ACCUM_GREEN_SIZE
fortuneengine.pyconsole.pyconsole.GL_ACCUM_RED_SIZE
fortuneengine.pyconsole.pyconsole.GL_ALPHA_SIZE
fortuneengine.pyconsole.pyconsole.GL_BLUE_SIZE
fortuneengine.pyconsole.pyconsole.GL_BUFFER_SIZE
fortuneengine.pyconsole.pyconsole.GL_DEPTH_SIZE
fortuneengine.pyconsole.pyconsole.GL_DOUBLEBUFFER
fortuneengine.pyconsole.pyconsole.GL_GREEN_SIZE
fortuneengine.pyconsole.pyconsole.GL_MULTISAMPLEBUFFERS
fortuneengine.pyconsole.pyconsole.GL_MULTISAMPLESAMPLES
fortuneengine.pyconsole.pyconsole.GL_RED_SIZE
fortuneengine.pyconsole.pyconsole.GL_STENCIL_SIZE
fortuneengine.pyconsole.pyconsole.GL_STEREO
fortuneengine.pyconsole.pyconsole.GL_SWAP_CONTROL
fortuneengine.pyconsole.pyconsole.HAT_CENTERED
fortuneengine.pyconsole.pyconsole.HAT_DOWN
fortuneengine.pyconsole.pyconsole.HAT_LEFT
fortuneengine.pyconsole.pyconsole.HAT_LEFTDOWN
fortuneengine.pyconsole.pyconsole.HAT_LEFTUP
fortuneengine.pyconsole.pyconsole.HAT_RIGHT
fortuneengine.pyconsole.pyconsole.HAT_RIGHTDOWN
fortuneengine.pyconsole.pyconsole.HAT_RIGHTUP
fortuneengine.pyconsole.pyconsole.HAT_UP
fortuneengine.pyconsole.pyconsole.HEIGHT
fortuneengine.pyconsole.pyconsole.HWACCEL
fortuneengine.pyconsole.pyconsole.HWPALETTE
fortuneengine.pyconsole.pyconsole.HWSURFACE
fortuneengine.pyconsole.pyconsole.IN
fortuneengine.pyconsole.pyconsole.IYUV_OVERLAY
fortuneengine.pyconsole.pyconsole.JOYAXISMOTION
fortuneengine.pyconsole.pyconsole.JOYBALLMOTION
fortuneengine.pyconsole.pyconsole.JOYBUTTONDOWN
fortuneengine.pyconsole.pyconsole.JOYBUTTONUP
fortuneengine.pyconsole.pyconsole.JOYHATMOTION
fortuneengine.pyconsole.pyconsole.KEYDOWN
fortuneengine.pyconsole.pyconsole.KEYUP
fortuneengine.pyconsole.pyconsole.KMOD_ALT
fortuneengine.pyconsole.pyconsole.KMOD_CAPS
fortuneengine.pyconsole.pyconsole.KMOD_CTRL
fortuneengine.pyconsole.pyconsole.KMOD_LALT
fortuneengine.pyconsole.pyconsole.KMOD_LCTRL
fortuneengine.pyconsole.pyconsole.KMOD_LMETA
fortuneengine.pyconsole.pyconsole.KMOD_LSHIFT
fortuneengine.pyconsole.pyconsole.KMOD_META
fortuneengine.pyconsole.pyconsole.KMOD_MODE
fortuneengine.pyconsole.pyconsole.KMOD_NONE
fortuneengine.pyconsole.pyconsole.KMOD_NUM
fortuneengine.pyconsole.pyconsole.KMOD_RALT
fortuneengine.pyconsole.pyconsole.KMOD_RCTRL
fortuneengine.pyconsole.pyconsole.KMOD_RMETA
fortuneengine.pyconsole.pyconsole.KMOD_RSHIFT
fortuneengine.pyconsole.pyconsole.KMOD_SHIFT
fortuneengine.pyconsole.pyconsole.K_0
fortuneengine.pyconsole.pyconsole.K_1
fortuneengine.pyconsole.pyconsole.K_2
fortuneengine.pyconsole.pyconsole.K_3
fortuneengine.pyconsole.pyconsole.K_4
fortuneengine.pyconsole.pyconsole.K_5
fortuneengine.pyconsole.pyconsole.K_6
fortuneengine.pyconsole.pyconsole.K_7
fortuneengine.pyconsole.pyconsole.K_8
fortuneengine.pyconsole.pyconsole.K_9
fortuneengine.pyconsole.pyconsole.K_AMPERSAND
fortuneengine.pyconsole.pyconsole.K_ASTERISK
fortuneengine.pyconsole.pyconsole.K_AT
fortuneengine.pyconsole.pyconsole.K_BACKQUOTE
fortuneengine.pyconsole.pyconsole.K_BACKSLASH
fortuneengine.pyconsole.pyconsole.K_BACKSPACE
fortuneengine.pyconsole.pyconsole.K_BREAK
fortuneengine.pyconsole.pyconsole.K_CAPSLOCK
fortuneengine.pyconsole.pyconsole.K_CARET
fortuneengine.pyconsole.pyconsole.K_CLEAR
fortuneengine.pyconsole.pyconsole.K_COLON
fortuneengine.pyconsole.pyconsole.K_COMMA
fortuneengine.pyconsole.pyconsole.K_DELETE
fortuneengine.pyconsole.pyconsole.K_DOLLAR
fortuneengine.pyconsole.pyconsole.K_DOWN
fortuneengine.pyconsole.pyconsole.K_END
fortuneengine.pyconsole.pyconsole.K_EQUALS
fortuneengine.pyconsole.pyconsole.K_ESCAPE
fortuneengine.pyconsole.pyconsole.K_EURO
fortuneengine.pyconsole.pyconsole.K_EXCLAIM
fortuneengine.pyconsole.pyconsole.K_F1
fortuneengine.pyconsole.pyconsole.K_F10
fortuneengine.pyconsole.pyconsole.K_F11
fortuneengine.pyconsole.pyconsole.K_F12
fortuneengine.pyconsole.pyconsole.K_F13
fortuneengine.pyconsole.pyconsole.K_F14
fortuneengine.pyconsole.pyconsole.K_F15
fortuneengine.pyconsole.pyconsole.K_F2
fortuneengine.pyconsole.pyconsole.K_F3
fortuneengine.pyconsole.pyconsole.K_F4
fortuneengine.pyconsole.pyconsole.K_F5
fortuneengine.pyconsole.pyconsole.K_F6
fortuneengine.pyconsole.pyconsole.K_F7
fortuneengine.pyconsole.pyconsole.K_F8
fortuneengine.pyconsole.pyconsole.K_F9
fortuneengine.pyconsole.pyconsole.K_FIRST
fortuneengine.pyconsole.pyconsole.K_GREATER
fortuneengine.pyconsole.pyconsole.K_HASH
fortuneengine.pyconsole.pyconsole.K_HELP
fortuneengine.pyconsole.pyconsole.K_HOME
fortuneengine.pyconsole.pyconsole.K_INSERT
fortuneengine.pyconsole.pyconsole.K_KP0
fortuneengine.pyconsole.pyconsole.K_KP1
fortuneengine.pyconsole.pyconsole.K_KP2
fortuneengine.pyconsole.pyconsole.K_KP3
fortuneengine.pyconsole.pyconsole.K_KP4
fortuneengine.pyconsole.pyconsole.K_KP5
fortuneengine.pyconsole.pyconsole.K_KP6
fortuneengine.pyconsole.pyconsole.K_KP7
fortuneengine.pyconsole.pyconsole.K_KP8
fortuneengine.pyconsole.pyconsole.K_KP9
fortuneengine.pyconsole.pyconsole.K_KP_DIVIDE
fortuneengine.pyconsole.pyconsole.K_KP_ENTER
fortuneengine.pyconsole.pyconsole.K_KP_EQUALS
fortuneengine.pyconsole.pyconsole.K_KP_MINUS
fortuneengine.pyconsole.pyconsole.K_KP_MULTIPLY
fortuneengine.pyconsole.pyconsole.K_KP_PERIOD
fortuneengine.pyconsole.pyconsole.K_KP_PLUS
fortuneengine.pyconsole.pyconsole.K_LALT
fortuneengine.pyconsole.pyconsole.K_LAST
fortuneengine.pyconsole.pyconsole.K_LCTRL
fortuneengine.pyconsole.pyconsole.K_LEFT
fortuneengine.pyconsole.pyconsole.K_LEFTBRACKET
fortuneengine.pyconsole.pyconsole.K_LEFTPAREN
fortuneengine.pyconsole.pyconsole.K_LESS
fortuneengine.pyconsole.pyconsole.K_LMETA
fortuneengine.pyconsole.pyconsole.K_LSHIFT
fortuneengine.pyconsole.pyconsole.K_LSUPER
fortuneengine.pyconsole.pyconsole.K_MENU
fortuneengine.pyconsole.pyconsole.K_MINUS
fortuneengine.pyconsole.pyconsole.K_MODE
fortuneengine.pyconsole.pyconsole.K_NUMLOCK
fortuneengine.pyconsole.pyconsole.K_PAGEDOWN
fortuneengine.pyconsole.pyconsole.K_PAGEUP
fortuneengine.pyconsole.pyconsole.K_PAUSE
fortuneengine.pyconsole.pyconsole.K_PERIOD
fortuneengine.pyconsole.pyconsole.K_PLUS
fortuneengine.pyconsole.pyconsole.K_POWER
fortuneengine.pyconsole.pyconsole.K_PRINT
fortuneengine.pyconsole.pyconsole.K_QUESTION
fortuneengine.pyconsole.pyconsole.K_QUOTE
fortuneengine.pyconsole.pyconsole.K_QUOTEDBL
fortuneengine.pyconsole.pyconsole.K_RALT
fortuneengine.pyconsole.pyconsole.K_RCTRL
fortuneengine.pyconsole.pyconsole.K_RETURN
fortuneengine.pyconsole.pyconsole.K_RIGHT
fortuneengine.pyconsole.pyconsole.K_RIGHTBRACKET
fortuneengine.pyconsole.pyconsole.K_RIGHTPAREN
fortuneengine.pyconsole.pyconsole.K_RMETA
fortuneengine.pyconsole.pyconsole.K_RSHIFT
fortuneengine.pyconsole.pyconsole.K_RSUPER
fortuneengine.pyconsole.pyconsole.K_SCROLLOCK
fortuneengine.pyconsole.pyconsole.K_SEMICOLON
fortuneengine.pyconsole.pyconsole.K_SLASH
fortuneengine.pyconsole.pyconsole.K_SPACE
fortuneengine.pyconsole.pyconsole.K_SYSREQ
fortuneengine.pyconsole.pyconsole.K_TAB
fortuneengine.pyconsole.pyconsole.K_UNDERSCORE
fortuneengine.pyconsole.pyconsole.K_UNKNOWN
fortuneengine.pyconsole.pyconsole.K_UP
fortuneengine.pyconsole.pyconsole.K_a
fortuneengine.pyconsole.pyconsole.K_b
fortuneengine.pyconsole.pyconsole.K_c
fortuneengine.pyconsole.pyconsole.K_d
fortuneengine.pyconsole.pyconsole.K_e
fortuneengine.pyconsole.pyconsole.K_f
fortuneengine.pyconsole.pyconsole.K_g
fortuneengine.pyconsole.pyconsole.K_h
fortuneengine.pyconsole.pyconsole.K_i
fortuneengine.pyconsole.pyconsole.K_j
fortuneengine.pyconsole.pyconsole.K_k
fortuneengine.pyconsole.pyconsole.K_l
fortuneengine.pyconsole.pyconsole.K_m
fortuneengine.pyconsole.pyconsole.K_n
fortuneengine.pyconsole.pyconsole.K_o
fortuneengine.pyconsole.pyconsole.K_p
fortuneengine.pyconsole.pyconsole.K_q
fortuneengine.pyconsole.pyconsole.K_r
fortuneengine.pyconsole.pyconsole.K_s
fortuneengine.pyconsole.pyconsole.K_t
fortuneengine.pyconsole.pyconsole.K_u
fortuneengine.pyconsole.pyconsole.K_v
fortuneengine.pyconsole.pyconsole.K_w
fortuneengine.pyconsole.pyconsole.K_x
fortuneengine.pyconsole.pyconsole.K_y
fortuneengine.pyconsole.pyconsole.K_z
fortuneengine.pyconsole.pyconsole.LIL_ENDIAN
fortuneengine.pyconsole.pyconsole.MOUSEBUTTONDOWN
fortuneengine.pyconsole.pyconsole.MOUSEBUTTONUP
fortuneengine.pyconsole.pyconsole.MOUSEMOTION
fortuneengine.pyconsole.pyconsole.NOEVENT
fortuneengine.pyconsole.pyconsole.NOFRAME
fortuneengine.pyconsole.pyconsole.NUMEVENTS
fortuneengine.pyconsole.pyconsole.OPENGL
fortuneengine.pyconsole.pyconsole.OPENGLBLIT
fortuneengine.pyconsole.pyconsole.OUT
fortuneengine.pyconsole.pyconsole.PREALLOC
fortuneengine.pyconsole.pyconsole.PYCONSOLE
fortuneengine.pyconsole.pyconsole.PYTHON
fortuneengine.pyconsole.pyconsole.QUIT
fortuneengine.pyconsole.pyconsole.RESIZABLE
fortuneengine.pyconsole.pyconsole.RLEACCEL
fortuneengine.pyconsole.pyconsole.RLEACCELOK
fortuneengine.pyconsole.pyconsole.SCRAP_BMP
fortuneengine.pyconsole.pyconsole.SCRAP_CLIPBOARD
fortuneengine.pyconsole.pyconsole.SCRAP_PBM
fortuneengine.pyconsole.pyconsole.SCRAP_PPM
fortuneengine.pyconsole.pyconsole.SCRAP_SELECTION
fortuneengine.pyconsole.pyconsole.SCRAP_TEXT
fortuneengine.pyconsole.pyconsole.SRCALPHA
fortuneengine.pyconsole.pyconsole.SRCCOLORKEY
fortuneengine.pyconsole.pyconsole.SWSURFACE
fortuneengine.pyconsole.pyconsole.SYSWMEVENT
fortuneengine.pyconsole.pyconsole.TIMER_RESOLUTION
fortuneengine.pyconsole.pyconsole.USEREVENT
fortuneengine.pyconsole.pyconsole.UYVY_OVERLAY
fortuneengine.pyconsole.pyconsole.VIDEOEXPOSE
fortuneengine.pyconsole.pyconsole.VIDEORESIZE
fortuneengine.pyconsole.pyconsole.WIDTH
fortuneengine.pyconsole.pyconsole.YUY2_OVERLAY
fortuneengine.pyconsole.pyconsole.YV12_OVERLAY
fortuneengine.pyconsole.pyconsole.YVYU_OVERLAY
fortuneengine.pyconsole.pyconsole.__package__
fortuneengine.pyconsole.pyconsole.cfg_path
fortuneengine.pyconsole.pyconsole.font_path
fortuneengine.pyconsole.pyconsole.path
fortuneengine.pyconsole.pyconsole.re_is_assign
fortuneengine.pyconsole.pyconsole.re_is_comment
fortuneengine.pyconsole.pyconsole.re_is_list
fortuneengine.pyconsole.pyconsole.re_is_number
fortuneengine.pyconsole.pyconsole.re_is_var
fortuneengine.pyconsole.pyconsole.re_token

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine-module.html deleted file mode 100644 index 0f7f89d..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine-module.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - fortuneengine - - - - - -

Module fortuneengine

-
-

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.DrawableFontObject-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.DrawableFontObject-module.html deleted file mode 100644 index b5aa902..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.DrawableFontObject-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - DrawableFontObject - - - - - -

Module DrawableFontObject

-
-

Classes

- DrawableFontObject

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.DrawableObject-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.DrawableObject-module.html deleted file mode 100644 index 36fd57b..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.DrawableObject-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - DrawableObject - - - - - -

Module DrawableObject

-
-

Classes

- DrawableObject

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.DynamicDrawableObject-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.DynamicDrawableObject-module.html deleted file mode 100644 index ba289e1..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.DynamicDrawableObject-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - DynamicDrawableObject - - - - - -

Module DynamicDrawableObject

-
-

Classes

- DynamicDrawableObject

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameEngine-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameEngine-module.html deleted file mode 100644 index afc7155..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameEngine-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - GameEngine - - - - - -

Module GameEngine

-
-

Classes

- GameEngine

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameEngineConsole-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameEngineConsole-module.html deleted file mode 100644 index 22d0c28..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameEngineConsole-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - GameEngineConsole - - - - - -

Module GameEngineConsole

-
-

Classes

- GameEngineConsole

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameEngineElement-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameEngineElement-module.html deleted file mode 100644 index c5e5fb4..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameEngineElement-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - GameEngineElement - - - - - -

Module GameEngineElement

-
-

Classes

- GameEngineElement

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameInspect-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameInspect-module.html deleted file mode 100644 index ff36dc7..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.GameInspect-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - GameInspect - - - - - -

Module GameInspect

-
-

Classes

- GameInspect

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.Scene-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.Scene-module.html deleted file mode 100644 index 9ae7f06..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.Scene-module.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - Scene - - - - - -

Module Scene

-
-

Classes

- Scene

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.pyconsole-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.pyconsole-module.html deleted file mode 100644 index d412499..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.pyconsole-module.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - pyconsole - - - - - -

Module pyconsole

-
-

Variables

- __package__

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.pyconsole.pyconsole-module.html b/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.pyconsole.pyconsole-module.html deleted file mode 100644 index 1379c64..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc-fortuneengine.pyconsole.pyconsole-module.html +++ /dev/null @@ -1,307 +0,0 @@ - - - - - pyconsole - - - - - -

Module pyconsole

-
-

Classes

- Console
ParseError
Writable

Functions

- balanced

Variables

- ACTIVEEVENT
ANYFORMAT
ASYNCBLIT
AUDIO_S16
AUDIO_S16LSB
AUDIO_S16MSB
AUDIO_S16SYS
AUDIO_S8
AUDIO_U16
AUDIO_U16LSB
AUDIO_U16MSB
AUDIO_U16SYS
AUDIO_U8
BIG_ENDIAN
BLEND_ADD
BLEND_MAX
BLEND_MIN
BLEND_MULT
BLEND_RGBA_ADD
BLEND_RGBA_MAX
BLEND_RGBA_MIN
BLEND_RGBA_MULT
BLEND_RGBA_SUB
BLEND_RGB_ADD
BLEND_RGB_MAX
BLEND_RGB_MIN
BLEND_RGB_MULT
BLEND_RGB_SUB
BLEND_SUB
BUTTON_X1
BUTTON_X2
DOUBLEBUF
ERR
FULLSCREEN
GL_ACCELERATED_VISUAL
GL_ACCUM_ALPHA_SIZE
GL_ACCUM_BLUE_SIZE
GL_ACCUM_GREEN_SIZE
GL_ACCUM_RED_SIZE
GL_ALPHA_SIZE
GL_BLUE_SIZE
GL_BUFFER_SIZE
GL_DEPTH_SIZE
GL_DOUBLEBUFFER
GL_GREEN_SIZE
GL_MULTISAMPLEBUFFERS
GL_MULTISAMPLESAMPLES
GL_RED_SIZE
GL_STENCIL_SIZE
GL_STEREO
GL_SWAP_CONTROL
HAT_CENTERED
HAT_DOWN
HAT_LEFT
HAT_LEFTDOWN
HAT_LEFTUP
HAT_RIGHT
HAT_RIGHTDOWN
HAT_RIGHTUP
HAT_UP
HEIGHT
HWACCEL
HWPALETTE
HWSURFACE
IN
IYUV_OVERLAY
JOYAXISMOTION
JOYBALLMOTION
JOYBUTTONDOWN
JOYBUTTONUP
JOYHATMOTION
KEYDOWN
KEYUP
KMOD_ALT
KMOD_CAPS
KMOD_CTRL
KMOD_LALT
KMOD_LCTRL
KMOD_LMETA
KMOD_LSHIFT
KMOD_META
KMOD_MODE
KMOD_NONE
KMOD_NUM
KMOD_RALT
KMOD_RCTRL
KMOD_RMETA
KMOD_RSHIFT
KMOD_SHIFT
K_0
K_1
K_2
K_3
K_4
K_5
K_6
K_7
K_8
K_9
K_AMPERSAND
K_ASTERISK
K_AT
K_BACKQUOTE
K_BACKSLASH
K_BACKSPACE
K_BREAK
K_CAPSLOCK
K_CARET
K_CLEAR
K_COLON
K_COMMA
K_DELETE
K_DOLLAR
K_DOWN
K_END
K_EQUALS
K_ESCAPE
K_EURO
K_EXCLAIM
K_F1
K_F10
K_F11
K_F12
K_F13
K_F14
K_F15
K_F2
K_F3
K_F4
K_F5
K_F6
K_F7
K_F8
K_F9
K_FIRST
K_GREATER
K_HASH
K_HELP
K_HOME
K_INSERT
K_KP0
K_KP1
K_KP2
K_KP3
K_KP4
K_KP5
K_KP6
K_KP7
K_KP8
K_KP9
K_KP_DIVIDE
K_KP_ENTER
K_KP_EQUALS
K_KP_MINUS
K_KP_MULTIPLY
K_KP_PERIOD
K_KP_PLUS
K_LALT
K_LAST
K_LCTRL
K_LEFT
K_LEFTBRACKET
K_LEFTPAREN
K_LESS
K_LMETA
K_LSHIFT
K_LSUPER
K_MENU
K_MINUS
K_MODE
K_NUMLOCK
K_PAGEDOWN
K_PAGEUP
K_PAUSE
K_PERIOD
K_PLUS
K_POWER
K_PRINT
K_QUESTION
K_QUOTE
K_QUOTEDBL
K_RALT
K_RCTRL
K_RETURN
K_RIGHT
K_RIGHTBRACKET
K_RIGHTPAREN
K_RMETA
K_RSHIFT
K_RSUPER
K_SCROLLOCK
K_SEMICOLON
K_SLASH
K_SPACE
K_SYSREQ
K_TAB
K_UNDERSCORE
K_UNKNOWN
K_UP
K_a
K_b
K_c
K_d
K_e
K_f
K_g
K_h
K_i
K_j
K_k
K_l
K_m
K_n
K_o
K_p
K_q
K_r
K_s
K_t
K_u
K_v
K_w
K_x
K_y
K_z
LIL_ENDIAN
MOUSEBUTTONDOWN
MOUSEBUTTONUP
MOUSEMOTION
NOEVENT
NOFRAME
NUMEVENTS
OPENGL
OPENGLBLIT
OUT
PREALLOC
PYCONSOLE
PYTHON
QUIT
RESIZABLE
RLEACCEL
RLEACCELOK
SCRAP_BMP
SCRAP_CLIPBOARD
SCRAP_PBM
SCRAP_PPM
SCRAP_SELECTION
SCRAP_TEXT
SRCALPHA
SRCCOLORKEY
SWSURFACE
SYSWMEVENT
TIMER_RESOLUTION
USEREVENT
UYVY_OVERLAY
VIDEOEXPOSE
VIDEORESIZE
WIDTH
YUY2_OVERLAY
YV12_OVERLAY
YVYU_OVERLAY
__package__
cfg_path
font_path
path
re_is_assign
re_is_comment
re_is_list
re_is_number
re_is_var
re_token

-[hide private] - - - - diff --git a/MAFH2/fortuneengine/docs/epydoc/toc.html b/MAFH2/fortuneengine/docs/epydoc/toc.html deleted file mode 100644 index 1ffbb58..0000000 --- a/MAFH2/fortuneengine/docs/epydoc/toc.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - Table of Contents - - - - - -

Table of Contents

-
- Everything -
-

Modules

- fortuneengine
fortuneengine.DrawableFontObject
fortuneengine.DrawableObject
fortuneengine.DynamicDrawableObject
fortuneengine.GameEngine
fortuneengine.GameEngineConsole
fortuneengine.GameEngineElement
fortuneengine.GameInspect
fortuneengine.Scene
fortuneengine.pyconsole
fortuneengine.pyconsole.pyconsole

- [hide private] - - - - diff --git a/MAFH2/fortuneengine/fortuneengine/DrawableFontObject.py b/MAFH2/fortuneengine/fortuneengine/DrawableFontObject.py deleted file mode 100644 index 92f641f..0000000 --- a/MAFH2/fortuneengine/fortuneengine/DrawableFontObject.py +++ /dev/null @@ -1,19 +0,0 @@ -import pygame -from DrawableObject import DrawableObject - -class DrawableFontObject(DrawableObject, pygame.sprite.Sprite): - - def __init__(self,text,font, x = 0, y = 0): - - self.font = font - self.textImage = font.render(text, 1, (255,255,255)) - self.text = text - DrawableObject.__init__(self, [self.textImage], '') - - def changeText(self, newText, color=(0,0,0)): - self.text = newText - self._images[0] = self.font.render(str(newText), True, color) - self.image = self._images[0] - - def getText(self): - return str(self.text) diff --git a/MAFH2/fortuneengine/fortuneengine/DrawableObject.py b/MAFH2/fortuneengine/fortuneengine/DrawableObject.py deleted file mode 100644 index 96bb8ef..0000000 --- a/MAFH2/fortuneengine/fortuneengine/DrawableObject.py +++ /dev/null @@ -1,157 +0,0 @@ -import pygame - -class DrawableObject(pygame.sprite.Sprite): - - def __init__(self, images, textfileName, transparent = False, x = 0, y = 0): - pygame.sprite.Sprite.__init__(self) - - self._images = [] - self._origImages = [] - for i in range(len(images)): - self._images.append(images[i].convert_alpha()) - self._origImages.append(images[i].convert_alpha()) - - blank = pygame.Surface((0,0)) - - if(transparent): - for i in range(len(images)): - self._images[i] = blank - - self._start = pygame.time.get_ticks() - self.image = self._images[0] - self._last_update = 0 - self._frame = 0 - self.animations = {} - self._current_anim = "" - self.rect = self.image.get_rect() - self.xPos = x - self.yPos = y - self.myAngle = 0 - self.xSize = self.image.get_width() - self.ySize = self.image.get_height() - self.rect.topleft = (x,y) - - if textfileName != '': - - f = open(textfileName, 'r') - currentLine = f.readline() - while currentLine != '': - - animValues = currentLine.split(",") - self.animations[animValues[0]] = [int(animValues[1]), int(animValues[2])] - currentLine = f.readline() - - else: - - self.animations["anim1"] = [0, len(self._images)] - self.goToAnim("anim1") - - self.makeTransparent(transparent) - - def repopulateImages(self, newImages): - - self._images = [] - self._origImages = [] - for i in range(len(newImages)): - self._images.append(newImages[i].convert_alpha()) - self._origImages.append(newImages[i].convert_alpha()) - - self.image = self._images[0] - self._frame = 0 - self.xSize = self.image.get_width() - self.ySize = self.image.get_height() - - def addImages(self, images): - self._images.extend(images) - self._origImages.extend(images) - - def goToAnim(self, animName): - if self.animations.get(animName, 0) != 0: - self._current_anim = animName - self._frame = self.animations[animName][0] - self.image = self._images[self._frame] - - def goToFrame(self, frame): - - if frame <= len(self._images): - self._frame = frame - self.image = self._images[self._frame] - - def nudge(self, x, y): - self.xPos += x - self.yPos += y - self.rect.right += x - self.rect.top += y - - def scale(self, x=None, y=None): - if type(x).__name__=='int': self.xSize = x - if type(y).__name__=='int': self.ySize = y - - for i in range(len(self._images)): - self._origImages[i] = pygame.transform.scale(self._origImages[i], (self.xSize, self.ySize)) - self._images[i] = self._origImages[i] - - def fill(self, color): - for i in range(len(self._images)): - #print "filling with ", color - self._origImages[i].fill(color) - self._images[i].fill(color) - - def getXSize(self): - return self.xSize - - def getYSize(self): - return self.ySize - - def rotate(self,angle): - self.myAngle += angle - for i in range(len(self._images)): - self._images[i] = pygame.transform.rotate(self._origImages[i], self.myAngle) - - def getRotation(self): - return self.myAngle - - def setPosition(self, x = None, y = None): - if type(x).__name__=='int': self.xPos = x - if type(y).__name__=='int': self.yPos = y - self.rect.topleft = (self.xPos, self.yPos) - - def getXPos(self): - return self.xPos - - def getYPos(self): - return self.yPos - - def calcColorKey(self, x=0, y=0): - myColorKey = images[0].get_at((x,y)) - setColorKey(myColorKey) - - def makeTransparent(self, bool = True): - if bool == True: - surf = pygame.Surface((0,0)) - for i in range(len(self._images)): - self._images[i] = surf - else: - for i in range(len(self._images)): - self._images[i] = self._origImages[i] - self.image = self._images[self._frame] - - def setColorKey(self, aColor): - for i in range(len(self._images)): - self._images[i].set_colorkey(aColor) - - def update(self, t=None): - timePassed = t + self._last_update - - if (timePassed) > 200: - - self.image = self._images[self._frame] - self._last_update = timePassed%1000 - else: - self._last_update = timePassed - - def nextFrame(self): - pass - - def nextCurrentAnimFrame(self): - pass diff --git a/MAFH2/fortuneengine/fortuneengine/DynamicDrawableObject.py b/MAFH2/fortuneengine/fortuneengine/DynamicDrawableObject.py deleted file mode 100644 index 7dcb831d..0000000 --- a/MAFH2/fortuneengine/fortuneengine/DynamicDrawableObject.py +++ /dev/null @@ -1,74 +0,0 @@ -import pygame -from DrawableObject import DrawableObject - -class DynamicDrawableObject(DrawableObject, pygame.sprite.Sprite): - - def __init__(self,images,textfileName,fps = 10, x = 0, y = 0, xVelocity = 0, yVelocity = 0): - - self._delay = 1000/fps - DrawableObject.__init__(self, images, textfileName, x, y) - - def addImages(self, images): - - self._images.extend(images) - - def setSpeed(self, xVelocity = None, yVelocity = None): - - if xVelocity != None: self.xSpeed = xVelocity - if yVelocity != None: self.ySpeed = yVelocity - - def getXSpeed(self): - - return self.xSpeed - - def getYSpeed(self): - - return self.ySpeed - - def move(self): - self.xPos += self.xSpeed - self.yPos += self.ySpeed - self.rect.right += self.xSpeed - self.rect.top += self.ySpeed - - def update(self, t): - - timePassed = t + self._last_update - - if (timePassed) > self._delay: - if self._frame < self.animations.get(self._current_anim)[0] or self._frame > self.animations.get(self._current_anim)[1]: - self._frame = self.animations.get(self._current_anim)[0] - 1 - - self._frame += timePassed/self._delay - - if self._frame >= self.animations.get(self._current_anim)[1]: - self._frame = self._frame%(self.animations.get(self._current_anim)[1]) - - self.image = self._images[self._frame] - self._last_update = timePassed%self._delay - else: - self._last_update = timePassed - - def nextFrame(self): - self._frame += 1 - if self._frame >= len(self._images): - framesPast = self._frame - len(self._images) - self._frame = framesPast - - self.image = self._images[self._frame] - - def nextCurrentAnimFrame(self): - - for cnt in range(len(animations)): - - if animations[cnt] == self._current_anim: - if self._frame < self.animations[self._current_anim][0] or self._frame > self.animations[self._current_anim][1]: - self._frame = self.animations[self._current_anim][0] - - else: self._frame += 1 - - if self._frame > self.animations[self._current_anim][1]: - framesPast = self._frame - self.animations[self._current_anim][1] - self._frame = framesPast - 1 + self.animations[self._current_anim][0] - - self.image = self._images[self._frame] diff --git a/MAFH2/fortuneengine/fortuneengine/GameEngine.py b/MAFH2/fortuneengine/fortuneengine/GameEngine.py deleted file mode 100644 index 48d7d3e..0000000 --- a/MAFH2/fortuneengine/fortuneengine/GameEngine.py +++ /dev/null @@ -1,502 +0,0 @@ -# FortuneEngine 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. -# -# FortuneEngine 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 the FortuneEngine. If not, see . -# -# Author: Justin Lewis - -import pygame -from time import time -from GameEngineConsole import GameEngineConsole -from GameInspect import GameInspect -from DrawableFontObject import DrawableFontObject -from Scene import Scene - - -class GameEngine(object): - """ - The Fortune Engine GameEngine is a main loop wrapper around pygame. - It manages the event and drawing loops allowing the user to just - register for user events and drawing time in the draw loop. - """ - instance = None - - def __init__(self, width=1200, height=900, always_draw=False, - fps_cap=15, version=False, title="FortuneEngine"): - """ - Constructor for the game engine. - - @param width: Window width - @param height: Window height - @param always_draw: Boolean to set the animation mode to always - draw vs draw when set_dirty is called - @param fps_cap: Sets the framerate cap. Set to 0 to disable - the cap. Warning: setting the cap to 0 when - always draw = False will cause cpu 100% when - not driving. - @param version: If true, use new rendering system, false uses - only the draw system - @param title: Window Title - """ - GameEngine.instance = self - pygame.init() - pygame.mouse.set_visible(False) - self.__version = version #true is new, false is old - - # Window Settings - self.width = width - self.height = height - size = width, height - self.screen = pygame.display.set_mode(size) - pygame.display.set_caption(title) - self.__fps = DrawableFontObject("", pygame.font.Font(None, 17)) - self.__fps.setPosition(0, 0) - self.__scene = Scene(self.__fps) - - # Engine Internal Variables - self.__fps_cap = fps_cap - self.__showfps = False - self.__dirty = True - self.__always_draw = always_draw - self.__font = pygame.font.Font(None, 17) - self.__run_event = False - - # Variables to hold game engine elements and callbacks - self.__event_cb = [] - self.__draw_lst = [] - self.__object_hold = {} - - - # Game Timers - self.__active_event_timers = [] - self.__active_event_timers_tick = [] - - # Game Clock - self.clock = pygame.time.Clock() - self.__tick_time = 0 - - # Inspector - self._inspector = GameInspect(self.__object_hold) - - # Time Profiler Timers - self.__draw_time = {} - self.__draw_calls = {} - self.__event_time = {} - self.__event_calls = {} - self.__timer_time = {} - self.__timer_calls = {} - - # Initialize Py Console - self.console = GameEngineConsole(self, (0, 0, width, height / 2)) - - # Disable Mouse Usage - # TODO Allow mouse motion on request - pygame.event.set_blocked(pygame.MOUSEMOTION) - - def set_dirty(self): - """ - Sets the dirty flag to force the engine to draw the next time - it enters the draw flag. - """ - self.__dirty = True - - def get_scene(self): - """ - Returns the scene object - - @return: Returns the scene object held by the game engine - """ - return self.__scene - - def start_event_timer(self, function_cb, time): - """ - Starts a timer that fires a user event into the queue every "time" - milliseconds - - @param function_cb: The function to call when timer fires - @param time: Milliseconds between fires - """ - avail_timer = len(self.__active_event_timers) - - if avail_timer + pygame.USEREVENT < pygame.NUMEVENTS: - if function_cb not in self.__active_event_timers: - self.__timer_time[str(function_cb)] = 0 - self.__timer_calls[str(function_cb)] = 0 - - self.__active_event_timers.append(function_cb) - self.__active_event_timers_tick.append(time) - pygame.time.set_timer(pygame.USEREVENT + avail_timer, time) - else: - print "ERROR TIMER IN LIST" - else: - print "Ran out of timers :(" - self.stop_event_loop() - - def stop_event_timer(self, function_cb): - """ - Stops the timer that has id from firing - - @param function_cb: The function registered with the timer that - should be canceled - """ - try: - timer_id = self.__active_event_timers.index(function_cb) - except ValueError: - return - - pygame.time.set_timer(pygame.USEREVENT + timer_id, 0) - del self.__active_event_timers[timer_id] - del self.__active_event_timers_tick[timer_id] - - # Timers have been removed, now need to clear any events - # already fired and in the queue - pygame.event.clear(pygame.USEREVENT + timer_id) - - def list_event_timers(self): - """ - returns a list of configured timers, if the timers has a time of 0 the - timer is disabled - """ - timer_list = "Event Timers:\n" - i = 0 - for timer_item in self.__active_event_timers: - timer_list += "\t%d: %d\n" % (timer_item, - self.__active_event_timers_tick[i]) - i = i + 1 - - return timer_list - - def list_timer_time(self): - """ - Returns a string representation of the time the game spends - in each timer callback. - """ - mystr = "Timer Times:\n\tName\tCalls\tTotal Time\tAvg" - for key in self.__timer_time: - timer_times = self.__timer_time[key] - timer_calls = self.__timer_calls[key] - if timer_calls == 0: - avg = 0 - else: - avg = timer_times / timer_calls - - mystr = "%s\n\t%s\n\t\t%d\t%f\t%f" % \ - (mystr, key, timer_calls, timer_times, avg) - return mystr - - def start_main_loop(self): - """ - Starts the game loop. - - This function does not return until after the game loop exits - """ - self.__run_event = True - self._event_loop() - - def _draw(self, tick_time): - """ - Draws all elements in draw callback to the screen - - @param tick_time: The amount of time passed since last - draw cycle. (should be produced by - pygamme.clock.tick method) - """ - screen = self.screen - - # If console is active, we want to draw console, pausing - # game drawing (events are still being fired, just no - # draw updates. - if self.__version: - if self.console.active: - self.console.draw() - pygame.display.flip() - else: - for fnc in self.__draw_lst: - start = time() - fnc() - self.__draw_time[str(fnc)] += time() - start - self.__draw_calls[str(fnc)] += 1 - # Print Frame Rate - if self.__showfps: - self.__fps.changeText('FPS: %d' % self.clock.get_fps(), - (255, 255, 255)) - else: - self.__fps.changeText('') - self.__scene.update(tick_time) - pygame.display.update(self.__scene.draw(screen)) - else: - if self.console.active: - self.console.draw() - pygame.display.flip() - else: - for fnc in self.__draw_lst: - start = time() - fnc(screen, tick_time) - self.__draw_time[str(fnc)] += time() - start - self.__draw_calls[str(fnc)] += 1 - # Print Frame Rate - if self.__showfps: - text = self.__font.render('FPS: %d' % \ - self.clock.get_fps(), False, (255, 255, 255), - (159, 182, 205)) - screen.blit(text, (0, 0)) - pygame.display.flip() - - def _event_loop(self): - """ - The main event loop. - """ - while self.__run_event: - - event = pygame.event.poll() - - # Handle Game Quit Message - if event.type == pygame.QUIT: - self.__run_event = False - - # No-Op sent, draw if set to always draw - elif event.type == pygame.NOEVENT: - # Tick even if not drawing - # We want to pause the cpu from getting into a - # 100% usage looping on the poll until something - # becomes dirty - self.__tick_time += self.clock.tick(self.__fps_cap) - if self.__always_draw or self.__dirty: - self.__dirty = False - self._draw(self.__tick_time) - self.__tick_time = 0 - - - # Handle User event Timers - elif event.type >= pygame.USEREVENT and \ - event.type < pygame.NUMEVENTS: - - timer_id = event.type - pygame.USEREVENT - - # Call timer - str_rep = str(self.__active_event_timers[timer_id]) - start = time() - self.__active_event_timers[timer_id]() - self.__timer_time[str_rep] += time() - start - self.__timer_calls[str_rep] += 1 - - # Check if we should activate the console - elif event.type == pygame.KEYDOWN and event.key == pygame.K_w \ - and pygame.key.get_mods() & pygame.KMOD_CTRL: - self.console.set_active() - self.set_dirty() - - # Pass event to console - elif self.console.process_input(event): - self.set_dirty() - - # Pass events to all others - else: - # Make a copy first so that adding events don't get fired - # right away - list_cp = self.__event_cb[:] - - # Reverse list so that newest stuff is on top - # TODO: cache this list - list_cp.reverse() - - for cb in list_cp: - # Fire the event for all in cb and stop - # if the callback returns True - start = time() - retur_val = cb(event) - self.__event_time[str(cb)] += time() - start - self.__event_calls[str(cb)] += 1 - - if retur_val: - break - - def stop_event_loop(self): - """ - Sends a pygame.QUIT event into the event queue which - exits the event loop - """ - pygame.event.post(pygame.event.Event(pygame.QUIT)) - - def add_event_callback(self, cb): - """ - Adds event callback to the event callback stack - - @param cb: Callback to be added to the stack when events are fired. - """ - self.__event_time[str(cb)] = 0 - self.__event_calls[str(cb)] = 0 - self.__event_cb.append(cb) - - def remove_event_callback(self, cb): - """ - Removes an event from the event callback stack - - @param cb: The callback to remove from the event callback stack - @return: Returns true if successful in removing callback - """ - try: - self.__event_cb.remove(cb) - return True - except: - return False - - def list_event_callbacks(self): - """ - Returns a string representation of all events registered with the game - engine - """ - event_callbacks = "Event Listeners:\n" - for eventlst in self.__event_cb: - event_callbacks = "%s\t%s\n" % (event_callbacks, str(eventlst)) - return event_callbacks - - def list_event_time(self): - """ - Returns a string representation of the time the game spends - in each event callback. - """ - mystr = "Event Times:\n\tName\tCalls\tTotal Time\tAvg" - for key in self.__event_time: - event_times = self.__event_time[key] - event_calls = self.__event_calls[key] - if event_calls == 0: - avg = 0 - else: - avg = event_times / event_calls - - mystr = "%s\n\t%s\n\t\t%d\t%f\t%f" % \ - (mystr, key, event_calls, event_times, avg) - return mystr - - def add_draw_callback(self, fnc): - """ - Adds a callback to the draw list. Function will be passed the - game screen it should draw too. - - @param fnc: The function to call when system is drawing - """ - - self.__draw_time[str(fnc)] = 0 - self.__draw_calls[str(fnc)] = 0 - self.__draw_lst.append(fnc) - - def pop_draw_callback(self): - """ - Removes top of draw stack and returns it - - @return: Returns the top callback function that was removed - """ - return self.__draw_lst.pop() - - def clear_draw_callback(self): - """ - Empties draw callback stack - """ - self.__draw_lst = [] - - def remove_draw_callback(self, fnc): - """ - Removes a draw callback from the game engine draw function - - @param fnc: The callback function to remove - @return: Returns true if successful removal of the function - """ - try: - self.__draw_lst.remove(fnc) - return True - except: - return False - - def list_draw_callbacks(self): - """ - Lists all the draw callbacks currently registered with the game engine - """ - - callbacks = "Draw Callbacks:\n" - for eventlst in self.__draw_lst: - callbacks += "\t%s\n" % str(eventlst) - return callbacks - - def list_draw_time(self): - """ - Returns a string representation of the time the game spends - in each drawing callback. - """ - mystr = "Drawing Times:\n\tName\tCalls\tTotal Time\tAvg" - for key in self.__draw_time: - draw_times = self.__draw_time[key] - draw_calls = self.__draw_calls[key] - if draw_calls == 0: - avg = 0 - else: - avg = draw_times / draw_calls - - mystr = "%s\n\t%s\n\t\t%d\t%f\t%f" % \ - (mystr, key, draw_calls, draw_times, avg) - return mystr - - def has_object(self, name): - """ - Returns true if object is stored in game engine - - @param name: Name of the object to check if exists - @return: Returns true if object found - """ - return name in self.__object_hold - - def add_object(self, name, obj): - """ - Adds an object to the game engine datastore - - @param name: The name used to store the object - @param obj: The object to store - """ - self.__object_hold[name] = obj - - def get_object(self, name): - """ - Returns an object from the game engine datastore - - @param name: The name of object to return - @return: Returns the object - """ - return self.__object_hold[name] - - def remove_object(self, name): - """ - Removes an object from the game engine datastore - - @param name: The name of the object to remove - """ - del self.__object_hold[name] - - def list_objects(self): - """ - Returns a sting of registered objects - """ - objlist = "Objects Registered:\n" - for eventlst in self.__object_hold: - objlist += "\t%s\n" % str(eventlst) - return objlist - - def toggle_fps(self): - """ - Toggles fps display - """ - self.__showfps = not self.__showfps - - def art_scale(self, original, expected, width=True): - if width: - return int(self.width / float(expected) * float(original)) - else: - - return int(self.height / float(expected) * float(original)) diff --git a/MAFH2/fortuneengine/fortuneengine/GameEngineConsole.py b/MAFH2/fortuneengine/fortuneengine/GameEngineConsole.py deleted file mode 100644 index 0f5efdc..0000000 --- a/MAFH2/fortuneengine/fortuneengine/GameEngineConsole.py +++ /dev/null @@ -1,77 +0,0 @@ -# FortuneEngine 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. -# -# FortuneEngine 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 the FortuneEngine. If not, see . -# -# Author: Justin Lewis - -from pyconsole.pyconsole import Console - - -class GameEngineConsole(Console): - """ - GameEngineConsole is a class that extends the pyconsole adding - in game engine specific functions. - """ - - def __init__(self, gei, pos): - """ - Init function of the GameEngineConsole - - @param gei: Passing in the Game Engine Instance. - @param pos: The position tuple to place the pyconsole - (startx, starty, width, height) - """ - # functions exposed to the console - function_list = { - "quit": gei.stop_event_loop, - - "list_objects": gei.list_objects, - "list_drawcb": gei.list_draw_callbacks, - "list_eventcb": gei.list_event_callbacks, - "list_timers": gei.list_event_timers, - "inspect": gei._inspector.inspect_object, - - "profile_draw":gei.list_draw_time, - "profile_event":gei.list_event_time, - "profile_timer":gei.list_timer_time, - - "set_str": gei._inspector.set_str, - "set_int": gei._inspector.set_int, - "set_eval": gei._inspector.set_eval, - - "fps": gei.toggle_fps, - } - - # Ctrl + key mappings - key_calls = { - "d": gei.stop_event_loop, - "m": self.console_mode, - } - - # Call parent class's init function passing in the - # function and key mapping dictionaries - Console.__init__(self, gei.screen, pos, - functions=function_list, key_calls=key_calls, - vars={}, syntax={}) - - def console_mode(self): - """ - Switches console between console and python interpreter - """ - # Deactivate Console if showing - if self.active: - self.set_active() - self.setvar("python_mode", - not self.getvar("python_mode")) - - self.set_interpreter() - self.set_active() diff --git a/MAFH2/fortuneengine/fortuneengine/GameEngineElement.py b/MAFH2/fortuneengine/fortuneengine/GameEngineElement.py deleted file mode 100644 index 3f51f2f..0000000 --- a/MAFH2/fortuneengine/fortuneengine/GameEngineElement.py +++ /dev/null @@ -1,109 +0,0 @@ -# FortuneEngine 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. -# -# FortuneEngine 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 the FortuneEngine. If not, see . -# -# Author: Justin Lewis - -from fortuneengine.GameEngine import GameEngine -#from fortuneengine.DrawableFontObject import DrawableFontObject -#from fortuneengine.DrawableObject import DrawableObject -#from fortuneengine.DynamicDrawableObject import DynamicDrawableObject - - -class GameEngineElement(object): - """ - The GameEngineElement is a helper object that can be extended by - other classes. When the class is extended, it will automatically - register its self for the event and draw loops with the game engine. - """ - - def __init__(self, has_draw=True, has_event=True): - """ - Default constructor for GameEngineElement - - @param has_draw: boolean to signify if element should be drawn - @param has_event: boolean to signify whether the element should be - given events from the queue - """ - self.__has_draw = has_draw - self.__has_event = has_event - self.__in_engine = False - self.game_engine = GameEngine.instance - self.__ddo_list = [] - - def is_in_engine(self): - """ - Returns true if object has been registered with the game engine. - """ - return self.__in_engine - - def add_to_scene(self, objects): - """ - Adds some objects to the DynamicDrawableObject list and the - game engine's scene. - - @param objects: A list of DynamicDrawableObjects - """ - - self.game_engine.get_scene().addObjects(objects) - self.__ddo_list += objects - - def add_to_engine(self): - """ - Registers the object with the game engine. Registers draw and event - call backs separately if they were set to true in the constructor. - """ - if not self.__in_engine: - self.__in_engine = True - - if self.__has_draw: - self.game_engine.add_draw_callback(self.draw) - - if self.__has_event: - self.game_engine.add_event_callback(self.event_handler) - - def remove_from_engine(self): - """ - Removes the object from the correct queues in the engine - """ - if self.__in_engine: - self.__in_engine = False - - if self.__has_draw: - self.game_engine.remove_draw_callback(self.draw) - - if self.__has_event: - self.game_engine.remove_event_callback(self.event_handler) - - if not (self.__ddo_list == []): - for object in self.__ddo_list: - self.game_engine.get_scene().removeObject(object) - - - def event_handler(self, event): - """ - This method should be overridden by the user-specified class that - extends this GameEngineElement class. This method specifies how that - class will handle events given to it by the engine. - - @return: true if the user wants to prevent the event from - continuing down the queue - """ - pass - - def draw(self, screen): - """ - This method should be overridden by the user-specified class that - extends this GameEngineElement class. This method specifies how the - class will be drawn. - """ - pass diff --git a/MAFH2/fortuneengine/fortuneengine/GameInspect.py b/MAFH2/fortuneengine/fortuneengine/GameInspect.py deleted file mode 100644 index 33a9938..0000000 --- a/MAFH2/fortuneengine/fortuneengine/GameInspect.py +++ /dev/null @@ -1,231 +0,0 @@ -# FortuneEngine 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. -# -# FortuneEngine 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 the FortuneEngine. If not, see . -# -# Author: Justin Lewis - -import inspect - - -class GameInspect(object): - """ - GameInspect is a class that can inspect and modify object trees. - - The top most object must be a dictionary - """ - - def __init__(self, object_root): - """ - Init function of the GameInspect class. - - @param object_root: The root dictionary of the tree - """ - self.root = object_root - - def drilldown_object(self, objectname): - """ - Takes the objectname string and tries to find the object that it is - representing and returns that object. - - Example: battle.enemy_list[1].sprite._images[1] - - @param objectname: The string that represents the object's path. - @return: Returns the object requested - @raise Exception: Throws an Exception with the string being the - path error. - """ - last = "empt" - obj = "empt" - last_token = "" - - # Objects are separated by the period (".") symbol - object_tokens = objectname.split(".") - - # Check if the first part of the name is registered with the - # game engine as that is our starting point - try: - obj = self.root[object_tokens[0]] - last = obj - last_token = object_tokens[0] - - except KeyError: - raise Exception("%s is not registered with the game engine" % - object_tokens[0]) - - # Handles dot notation for sub modules by looping through the tokens - for token in object_tokens[1:]: - - # Splits the dictionary/list token ("[") - dict_token = token.split('[') - try: - last = obj - obj = getattr(obj, dict_token[0]) - last_token = dict_token[0] - - except: - raise Exception("Error finding member element: %s" % token) - - # Handles dictionaries - for d_token in dict_token[1:]: - if d_token[-1] == "]": - d_token = d_token[:-1] - # Try list notation first then try dictionary notation - try: - key = int(d_token) - except: - key = d_token - - try: - last = obj - obj = obj[key] - last_token = key - except: - raise Exception("Unable to find %s" % key) - - else: - raise Exception("Invalid Syntax, expected ] at end of %s" % - d_token) - - return obj, last, last_token - - def set_eval(self, objectname, statement): - """ - Sets the object referenced by objectname to a value returned by - passing the string stored in the val parameter to an eval statement. - - @param objectname: A string representation of the location - of the object being inspected in relation - to the game engine registered object. - @param statement: A string to be evaluated and set to the object. - """ - try: - obj, last, last_token = self.drilldown_object(objectname) - except Exception, detail: - return str(detail) - - try: - setattr(last, last_token, eval(str(statement))) - except Exception, detail: - return str(detail) - - def set_str(self, objectname, val): - """ - Sets the object referenced by objectname to a string passed into the - val parameter. - - @param objectname: A string representation of the location - of the object being inspected in relation - to the game engine registered object. - @param val: A string to be set as the value of the object. - """ - try: - obj, last, last_token = self.drilldown_object(objectname) - except Exception, detail: - return str(detail) - - setattr(last, last_token, val) - - def set_int(self, objectname, val): - """ - Sets the object referenced by objectname to an integer passed into the - val parameter. It may be a string that holds the int as it will be - type casted. - - @param objectname: A string representation of the location - of the object being inspected in relation - to the game engine registered object. - @param val: An int/string containing an int to be set as - the value of the object. - """ - try: - obj, last, last_token = self.drilldown_object(objectname) - except Exception, detail: - return str(detail) - - try: - setattr(last, last_token, int(val)) - except: - return str(detail) - - def inspect_object(self, objectname): - """ - Displays information about the object path it is passed - - @param objectname: A string representation of the location - of the object being inspected in relation - to the game engine registered object. - """ - try: - obj, last, last_token = self.drilldown_object(objectname) - - except Exception, detail: - return str(detail) - - classname = obj.__class__.__name__ - - # If it has the __dict__ attribute, it is an object we can inspect - if hasattr(obj, "__dict__"): - attribute_list = "Attributes:" - attributes = obj.__dict__ - for attribute_key in attributes.keys(): - attribute_list = "%s\n\t%s:%s" % (attribute_list, - attribute_key, str(attributes[attribute_key])) - - # Inspect the object for all its methods - method_list = inspect.getmembers(obj, inspect.ismethod) - if method_list != []: - - # Loop through the methods in the object and print them - # to the console - attribute_list = "%s\n\nMethods:" % attribute_list - for method in method_list: - attribute_list = "%s\n\t%s" % (attribute_list, method[0]) - - # Inspect the arguments to the current method - args, vargs, kwargs, local = inspect.getargspec(method[1]) - - # Display function arguments - attribute_list = "%s\n\t\tArgs: %s" % \ - (attribute_list, ",".join(args)) - - # Display * and ** arguments if they were found - if vargs: - attribute_list = "%s\n\t\tVArgs: %s" % \ - (attribute_list, ",".join(vargs)) - - # Display KW Arguments if they were found - if kwargs: - attribute_list = "%s\n\t\tKWArgs: %s" % \ - (attribute_list, ",".join(kwargs)) - - # If dictionary, show keys - elif hasattr(obj, "keys"): - attribute_list = "Dictionary Items:" - - for d_obj in obj.keys(): - attribute_list = "%s\n\t%s:%s" % (attribute_list, d_obj, - str(obj[d_obj])) - - # If list, iterate over the list and show its values - elif type(obj).__name__ == 'list': - i = 0 - attribute_list = "List Items:" - for item in obj: - attribute_list = "%s\n\t%d:%s" % (attribute_list, i, str(item)) - i = i + 1 - - # We don't know what it is, so just display string representation - # of the object in question - else: - attribute_list = str(obj) - - return "Class: %s\n%s" % (classname, attribute_list) diff --git a/MAFH2/fortuneengine/fortuneengine/Scene.py b/MAFH2/fortuneengine/fortuneengine/Scene.py deleted file mode 100644 index d2e50a9..0000000 --- a/MAFH2/fortuneengine/fortuneengine/Scene.py +++ /dev/null @@ -1,186 +0,0 @@ -import pygame -from pygame.sprite import RenderUpdates - -class Scene(pygame.sprite.RenderUpdates): - - def __init__(self, sprites): - - self._spritelist = [[sprites, sprites.getXPos(), sprites.getYPos()]] - #self._spritelist.append([sprites, sprites.getXPos(), sprites.getYPos()]) - RenderUpdates.__init__(self, sprites) - - self.xPos = 0 - self.yPos = 0 - self.xSize = 0 - self.ySize = 0 - - self.calcPosition() - self.calcSize() - self.setRelativePositions() - - def calcPosition(self): - - lowestX = 9000 - lowestY = 9000 - - for i in range(len(self._spritelist)): - if self._spritelist[i][0].getXPos() < lowestX: lowestX = self._spritelist[i][0].getXPos() - if self._spritelist[i][0].getYPos() < lowestY: lowestY = self._spritelist[i][0].getYPos() - - self.xPos = lowestX - self.yPos = lowestY - - def calcSize(self): - - highestX = 0 - highestY = 0 - - for i in range(len(self._spritelist)): - if (self._spritelist[i][0].getXPos() + self._spritelist[i][0].getXSize()) > highestX: highestX = self._spritelist[i][0].getXPos() + self._spritelist[i][0].getXSize() - if (self._spritelist[i][0].getYPos() + self._spritelist[i][0].getYSize()) > highestY: highestY = self._spritelist[i][0].getYPos() + self._spritelist[i][0].getYSize() - - self.xSize = highestX - self.xPos - self.ySize = highestY - self.yPos - - def addObject(self, newDrawableObject): - RenderUpdates.add_internal(self, newDrawableObject) - self._spritelist.insert(len(self._spritelist) - 1, [newDrawableObject, newDrawableObject.getXPos(), newDrawableObject.getYPos()]) - - def addObjects(self, newDrawableObjects): - for sprite in newDrawableObjects: - RenderUpdates.add_internal(self, sprite) - self._spritelist.insert(len(self._spritelist) - 1, [sprite, sprite.getXPos(), sprite.getYPos()]) - - def setRelativePositions(self): - - for i in range(len(self._spritelist)): - self._spritelist[i][1] = self._spritelist[i][0].getXPos() - self.xPos - self._spritelist[i][2] = self._spritelist[i][0].getYPos() - self.yPos - - def removeObject(self, sprite): - - for i in self._spritelist: - if i[0] == sprite: - self._spritelist.remove(i) - break - RenderUpdates.remove_internal(self, sprite) - - def getObject(self, index): - - if index < len(self._spritelist): - return self._spritelist[index][0] - - def getListSize(self): - - return len(self._spritelist) - - def getList(self): - - return list(self._spritelist) - - def moveObjects(self): - - for i in range(len(self._spritelist)): - self._spritelist[i][0].move() - - self.calcPosition() - self.calcSize() - self.setRelativePositions() - - def moveScene(self, xNudge = 0, yNudge = 0): - - - for i in range(len(self._spritelist)): - - self._spritelist[i][0].nudge(xNudge, yNudge) - - - self.calcPosition() - - def setPosition(self, newXPos = None, newYPos = None): - - if newXPos != None: self.xPos = newXPos - if newYPos != None: self.yPos = newYPos - - for i in range(len(self._spritelist)): - - self._spritelist[i][0].setPosition(self.xPos + self._spritelist[i][1], self.yPos + self._spritelist[i][2]) - - def getXPos(self): - return self.xPos - - def getYPos(self): - return self.yPos - - def getXSize(self): - return self.xSize - - def getYSize(self): - return self.ySize - - def scaleObjects(self, newXSize = None, newYSize = None): - - - for i in range(len(self._spritelist)): - self._spritelist[i][0].scale(newXSize, newYSize) - - def scaleScene(self, newXSize = None, newYSize = None): - - self.calcPosition() - self.calcSize() - - xScale = 1 - yScale = 1 - - if newXSize != None: xScale = (newXSize * 1.0)/self.xSize - if newYSize != None: yScale = (newYSize * 1.0)/self.ySize - - for i in range(len(self._spritelist)): - self._spritelist[i][0].scale(xScale * self._spritelist[iaw][0].getXSize(), yScale * self._spritelist[i][0].getYSize()) - self._spritelist[i][1] = xScale * self._spritelist[i][1] - self._spritelist[i][2] = yScale * self._spritelist[i][2] - - self.calcPosition() - self.calcSize() - self.setPosition() - - def update(self, t): - - for s in self._spritelist: s[0].update(t); - - def draw(self, surface): - spritedict = self.spritedict - surface_blit = surface.blit - dirty = self.lostsprites - self.lostsprites = [] - dirty_append = dirty.append - for s in self._spritelist: - r = spritedict[s[0]] - newrect = surface_blit(s[0].image, s[0].rect) - if r is 0: - dirty_append(newrect) - else: - if newrect.colliderect(r): - dirty_append(newrect.union(r)) - else: - dirty_append(newrect) - dirty_append(r) - spritedict[s[0]] = newrect - return dirty - - def drawEntireScene(self, surface): - spritedict = self.spritedict - surface_blit = surface.blit - dirty = self.lostsprites - self.lostsprites = [] - dirty_append = dirty.append - for s in self._spritelist: - dirty_append(spritedict[s[0]]) - dirty_append(surface_blit(s[0].image, s[0].rect)) - return dirty - - def nextFrame(self): - - for i in range(len(self._spritelist)): - - self._spritelist[i][0].nextFrame() diff --git a/MAFH2/fortuneengine/fortuneengine/__init__.py b/MAFH2/fortuneengine/fortuneengine/__init__.py deleted file mode 100644 index 211298b..0000000 --- a/MAFH2/fortuneengine/fortuneengine/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# FortuneEngine 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. -# -# FortuneEngine 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 the FortuneEngine. If not, see . -# -# Author: Justin Lewis diff --git a/MAFH2/fortuneengine/fortuneengine/pyconsole/__init__.py b/MAFH2/fortuneengine/fortuneengine/pyconsole/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/MAFH2/fortuneengine/fortuneengine/pyconsole/__init__.py +++ /dev/null diff --git a/MAFH2/fortuneengine/fortuneengine/pyconsole/fonts/default.ttf b/MAFH2/fortuneengine/fortuneengine/pyconsole/fonts/default.ttf deleted file mode 100755 index 139f0b4..0000000 --- a/MAFH2/fortuneengine/fortuneengine/pyconsole/fonts/default.ttf +++ /dev/null Binary files differ diff --git a/MAFH2/fortuneengine/fortuneengine/pyconsole/pyconsole.cfg b/MAFH2/fortuneengine/fortuneengine/pyconsole/pyconsole.cfg deleted file mode 100644 index a1f8c0f..0000000 --- a/MAFH2/fortuneengine/fortuneengine/pyconsole/pyconsole.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# # # # # # # # # # # # # # # # # # # # # # # # # # # -# Available variables: -# -# bg_alpha - background alpha value, range 0 to 255 (Pretty, but a big performance hit) -# bg_color - Background Color, RGB format -# txt_color_i - Text Color (Input). Color of the input line, RGB format -# txt_color_o - Text Color (Output). Color of the output lines, RGB format -# ps1/ps2/ps3 - strings that are prefixed to each input line, like their POSIX counterparts -# active - Whether or not the console is initially displayed -# repeat_rate - value to pass to pygame.key.set_repeat -# preserve_events - determines whether or not the console puts unused events back on the event queue -# python_mode - Send commands to the python interpreter instead of the pyconsole interpreter -# # # # # # # # # # # # # # # # # # # # # # # # # # # - -bg_alpha 255 -bg_color [0x0,0x44,0xAA] - -txt_color_i [0xFF,0xFF,0xFF] -txt_color_o [0xEE,0xEE,0xEE] - -ps1 "] " -ps2 ">>> " -ps3 "... " - -active False - -repeat_rate [500,30] - -preserve_events True - -python_mode False - -motd ["|Fortune Engine || PyConsole 0.7|","Type help for a list of commands","Ctrl_w toggle the console","Ctrl_m toggle python mode"] diff --git a/MAFH2/fortuneengine/fortuneengine/pyconsole/pyconsole.py b/MAFH2/fortuneengine/fortuneengine/pyconsole/pyconsole.py deleted file mode 100644 index 7bb68e4..0000000 --- a/MAFH2/fortuneengine/fortuneengine/pyconsole/pyconsole.py +++ /dev/null @@ -1,637 +0,0 @@ -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -# pyconsole - a simple console for pygame based applications -# -# Copyright (C) 2006 John Schanck -# -# 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 2 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, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # - - -import pygame, os, sys -from pygame.locals import * - -import re # Python's Regexp library. Used in pyconsole for parsing -import textwrap # Used for proper word wrapping -from string import ascii_letters -from code import InteractiveConsole # Gives us access to the python interpreter - - -__version__ = "0.7" - -WIDTH=0 -HEIGHT=1 - -OUT = 0 -IN = 1 -ERR = 2 - -PYCONSOLE = 1 -PYTHON = 2 - -path = os.path.abspath(os.path.dirname(__file__)) -font_path = os.path.join(path, "fonts") -cfg_path = os.path.join(path, "pyconsole.cfg") - - -re_token = re.compile(r"""[\"].*?[\"]|[\{].*?[\}]|[\(].*?[\)]|[\[].*?[\]]|\S+""") -re_is_list = re.compile(r'^[{\[(]') -re_is_number = re.compile(r""" - (?x) - [-]?[0][x][0-9a-fA-F]+[lLjJ]? | # Hexadecimal - [-]?[0][0-7]+[lLjJ]? | # Octal - [-]?[\d]+(?:[.][\d]*)?[lLjJ]? # Decimal (Int or float) - """) -re_is_assign = re.compile(r'[$](?P[a-zA-Z_]+\S*)\s*[=]\s*(?P.+)') -re_is_comment = re.compile(r'\s*#.*') -re_is_var = re.compile(r'^[$][a-zA-Z_]+\w*\Z') - - - -class Writable(list): - line_pointer = -1 - def write(self, line): - self.append(str(line)) - def reset(self): - self.__init__() - def readline(self, size=-1): - # Python's interactive help likes to try and call this, which causes the program to crash - # I see no reason to implement interactive help. - raise NotImplementedError - -class ParseError(Exception): - def __init__(self, token): - self.token = token - def at_token(self): - return self.token - -def balanced(t): - stack = [] - pairs = {"\'":"\'", '\"':'\"', "{":"}", "[":"]", "(":")"} - for char in t: - if stack and char == pairs[stack[-1]]: - stack.pop() - elif char in pairs: - stack.append(char) - return not bool(stack) - -class Console: - def __init__(self, screen, rect, functions={}, key_calls={}, vars={}, syntax={}): - if not pygame.display.get_init(): - raise pygame.error, "Display not initialized. Initialize the display before creating a Console" - - if not pygame.font.get_init(): - pygame.font.init() - - self.parent_screen = screen - self.rect = pygame.Rect(rect) - self.size = self.rect.size - - self.user_vars = vars - self.user_syntax = syntax - self.user_namespace = {} - - self.variables = {\ - "bg_alpha":int,\ - "bg_color": list,\ - "txt_color_i": list,\ - "txt_color_o": list,\ - "ps1": str,\ - "ps2": str,\ - "ps3": str,\ - "active": bool,\ - "repeat_rate": list,\ - "preserve_events":bool,\ - "python_mode":bool,\ - "motd":list - } - - self.load_cfg() - - self.set_interpreter() - - #pygame.key.set_repeat(*self.repeat_rate) - - self.bg_layer = pygame.Surface(self.size) - self.bg_layer.set_alpha(self.bg_alpha) - - self.txt_layer = pygame.Surface(self.size) - self.txt_layer.set_colorkey(self.bg_color) - - try: - self.font = pygame.font.Font(os.path.join(font_path,"default.ttf"), 14) - except IOError: - self.font = pygame.font.SysFont("monospace", 14) - - self.font_height = self.font.get_linesize() - self.max_lines = (self.size[HEIGHT] / self.font_height) - 1 - - self.max_chars = (self.size[WIDTH]/(self.font.size(ascii_letters)[WIDTH]/len(ascii_letters))) - 1 - self.txt_wrapper = textwrap.TextWrapper() - - self.c_out = self.motd - self.c_hist = [""] - self.c_hist_pos = 0 - self.c_in = "" - self.c_pos = 0 - self.c_draw_pos = 0 - self.c_scroll = 0 - - - self.changed = True - - self.func_calls = {} - self.key_calls = {} - - self.add_func_calls({"echo":self.output, "clear": self.clear, "help":self.help}) - self.add_func_calls(functions) - - self.add_key_calls({"l":self.clear, "c":self.clear_input, "w":self.set_active}) - self.add_key_calls(key_calls) - - - ################## - #-Initialization-# - def load_cfg(self): - '''\ - Loads the config file path/pygame-console.cfg\ - All variables are initialized to their defaults,\ - then new values will be loaded from the config file if it exists. - ''' - self.init_default_cfg() - if os.path.exists(cfg_path): - for line in file(cfg_path): - tokens = self.tokenize(line) - if re_is_comment.match(line): - continue - elif len(tokens) != 2: - continue - self.safe_set_attr(tokens[0],tokens[1]) - - def init_default_cfg(self): - self.bg_alpha = 255 - self.bg_color = [0x0,0x0,0x0] - self.txt_color_i = [0xFF,0xFF,0xFF] - self.txt_color_o = [0xCC,0xCC,0xCC] - self.ps1 = "] " - self.ps2 = ">>> " - self.ps3 = "... " - self.active = False - self.repeat_rate = [500,30] - self.python_mode = False - self.preserve_events = False - self.motd = ["[PyConsole 0.5]"] - - def safe_set_attr(self, name, value): - '''\ - Safely set the console variables - ''' - if name in self.variables: - if isinstance(value, self.variables[name]) or not self.variables[name]: - self.__dict__[name] = value - - def add_func_calls(self, functions): - '''\ - Add functions to the func_calls dictionary. - Arguments: - functions -- dictionary of functions to add. - ''' - if isinstance(functions,dict): - self.func_calls.update(functions) - self.user_namespace.update(self.func_calls) - - def add_key_calls(self, functions): - '''\ - Add functions to the key_calls dictionary. - Arguments: - functions -- dictionary of key_calls to add. - ''' - if isinstance(functions,dict): - self.key_calls.update(functions) - - def output(self, text): - '''\ - Prepare text to be displayed - Arguments: - text -- Text to be displayed - ''' - if not str(text): - return; - - try: - self.changed = True - if not isinstance(text,str): - text = str(text) - text = text.expandtabs() - text = text.splitlines() - self.txt_wrapper.width = self.max_chars - for line in text: - for w in self.txt_wrapper.wrap(line): - self.c_out.append(w) - except: - pass - - def set_active(self,b=None): - '''\ - Activate or Deactivate the console - Arguments: - b -- Optional boolean argument, True=Activate False=Deactivate - ''' - if not b: - self.active = not self.active - else: - self.active = b - - - def format_input_line(self): - '''\ - Format input line to be displayed - ''' - # The \v here is sort of a hack, it's just a character that isn't recognized by the font engine - text = self.c_in[:self.c_pos] + "\v" + self.c_in[self.c_pos+1:] - n_max = self.max_chars - len(self.c_ps) - vis_range = self.c_draw_pos, self.c_draw_pos + n_max - return self.c_ps + text[vis_range[0]:vis_range[1]] - - def draw(self): - '''\ - Draw the console to the parent screen - ''' - if not self.active: - return; - - if self.changed: - self.changed = False - # Draw Output - self.txt_layer.fill(self.bg_color) - lines = self.c_out[-(self.max_lines+self.c_scroll):len(self.c_out)-self.c_scroll] - y_pos = self.size[HEIGHT]-(self.font_height*(len(lines)+1)) - - for line in lines: - tmp_surf = self.font.render(line, True, self.txt_color_o) - self.txt_layer.blit(tmp_surf, (1, y_pos, 0, 0)) - y_pos += self.font_height - # Draw Input - tmp_surf = self.font.render(self.format_input_line(), True, self.txt_color_i) - self.txt_layer.blit(tmp_surf, (1,self.size[HEIGHT]-self.font_height,0,0)) - # Clear background and blit text to it - self.bg_layer.fill(self.bg_color) - self.bg_layer.blit(self.txt_layer,(0,0,0,0)) - - # Draw console to parent screen - # self.parent_screen.fill(self.txt_color_i, (self.rect.x-1, self.rect.y-1, self.size[WIDTH]+2, self.size[HEIGHT]+2)) - pygame.draw.rect(self.parent_screen, self.txt_color_i, (self.rect.x-1, self.rect.y-1, self.size[WIDTH]+2, self.size[HEIGHT]+2), 1) - self.parent_screen.blit(self.bg_layer,self.rect) - - ####################################################################### - # Functions to communicate with the console and the python interpreter# - def set_interpreter(self): - if self.python_mode: - self.output("Entering Python mode") - self.python_mode = True - self.python_interpreter = InteractiveConsole() - self.tmp_fds = [] - self.py_fds = [Writable() for i in range(3)] - self.c_ps = self.ps2 - else: - self.output("Entering Pyconsole mode") - self.python_mode = False - self.c_ps = self.ps1 - - def catch_output(self): - if not self.tmp_fds: - self.tmp_fds = [sys.stdout, sys.stdin, sys.stderr] - sys.stdout, sys.stdin, sys.stderr = self.py_fds - - def release_output(self): - if self.tmp_fds: - sys.stdout, sys.stdin, sys.stderr = self.tmp_fds - self.tmp_fds = [] - [fd.reset() for fd in self.py_fds] - - def submit_input(self, text): - '''\ - Submit input - 1) Move input to output - 2) Evaluate input - 3) Clear input line - ''' - - self.clear_input() - self.output(self.c_ps + text) - self.c_scroll = 0 - if self.python_mode: - self.send_python(text) - else: - self.send_pyconsole(text) - - def send_python(self, text): - '''\ - Sends input the the python interpreter in effect giving the user the ability to do anything python can. - ''' - self.c_ps = self.ps2 - self.catch_output() - if text: - self.add_to_history(text) - r = self.python_interpreter.push(text) - if r: - self.c_ps = self.ps3 - else: - code = "".join(self.py_fds[OUT]) - self.python_interpreter.push("\n") - self.python_interpreter.runsource(code) - for i in self.py_fds[OUT]+self.py_fds[ERR]: - self.output(i) - self.release_output() - - def send_pyconsole(self, text): - '''\ - Sends input to pyconsole to be interpreted - ''' - if not text: # Output a blank row if nothing is entered - self.output("") - return; - - self.add_to_history(text) - - #Determine if the statement is an assignment - assign = re_is_assign.match(text) - try: - #If it is tokenize only the "value" part of $name = value - if assign: - tokens = self.tokenize(assign.group('value')) - else: - tokens = self.tokenize(text) - except ParseError, e: - self.output(r'At Token: "%s"' % e.at_token()) - return; - - if tokens == None: - return - - #Evaluate - try: - out = None - # A variable alone on a line - if (len(tokens) is 1) and re_is_var.match(text) and not assign: - out = tokens[0] - # Statement in the form $name = value - elif (len(tokens) is 1) and assign: - self.setvar(assign.group('name'), tokens[0]) - else: - # Function - out = self.func_calls[tokens[0]](*tokens[1:]) - # Assignment from function's return value - if assign: - self.setvar(assign.group('name'), out) - - if not out == None: - self.output(out) - except (KeyError,TypeError): - self.output("Unknown Command: " + str(tokens[0])) - self.output(r'Type "help" for a list of commands.') - - - - #################################################### - #-Functions for sharing variables with the console-# - def setvar(self, name, value): - '''\ - Sets the value of a variable - ''' - if self.user_vars.has_key(name) or not self.__dict__.has_key(name): - self.user_vars.update({name:value}) - self.user_namespace.update(self.user_vars) - elif self.__dict__.has_key(name): - self.__dict__.update({name:value}) - - def getvar(self, name): - '''\ - Gets the value of a variable, this is useful for people that want to access console variables from within their game - ''' - if self.user_vars.has_key(name) or not self.__dict__.has_key(name): - return self.user_vars[name] - elif self.__dict__.has_key(name): - return self.__dict__[name] - - def setvars(self, vars): - try: - self.user_vars.update(vars) - self.user_namespace.update(self.user_vars) - except TypeError: - self.output("setvars requires a dictionary") - - def getvars(self, opt_dict=None): - if opt_dict: - opt_dict.update(self.user_vars) - else: - return self.user_vars - - - def add_to_history(self, text): - '''\ - Add specified text to the history - ''' - self.c_hist.insert(-1,text) - self.c_hist_pos = len(self.c_hist)-1 - - def clear_input(self): - '''\ - Clear input line and reset cursor position - ''' - self.c_in = "" - self.c_pos = 0 - self.c_draw_pos = 0 - - def set_pos(self, newpos): - '''\ - Moves cursor safely - ''' - self.c_pos = newpos - if (self.c_pos - self.c_draw_pos) >= (self.max_chars - len(self.c_ps)): - self.c_draw_pos = max(0, self.c_pos - (self.max_chars - len(self.c_ps))) - elif self.c_draw_pos > self.c_pos: - self.c_draw_pos = self.c_pos - (self.max_chars/2) - if self.c_draw_pos < 0: - self.c_draw_pos = 0 - self.c_pos = 0 - - def str_insert(self, text, strn): - '''\ - Insert characters at the current cursor position - ''' - foo = text[:self.c_pos] + strn + text[self.c_pos:] - self.set_pos(self.c_pos + len(strn)) - return foo - - def process_input(self, event): - '''\ - Loop through pygame events and evaluate them - ''' - if not self.active: - return False; - - if event.type == KEYDOWN: - self.changed = True - ## Special Character Manipulation - if event.key == K_TAB: - self.c_in = self.str_insert(self.c_in, " ") - elif event.key == K_BACKSPACE: - if self.c_pos > 0: - self.c_in = self.c_in[:self.c_pos-1] + self.c_in[self.c_pos:] - self.set_pos(self.c_pos-1) - elif event.key == K_DELETE: - if self.c_pos < len(self.c_in): - self.c_in = self.c_in[:self.c_pos] + self.c_in[self.c_pos+1:] - elif event.key == K_RETURN or event.key == 271: - self.submit_input(self.c_in) - ## Changing Cursor Position - elif event.key == K_LEFT: - if self.c_pos > 0: - self.set_pos(self.c_pos-1) - elif event.key == K_RIGHT: - if self.c_pos < len(self.c_in): - self.set_pos(self.c_pos+1) - elif event.key == K_HOME: - self.set_pos(0) - elif event.key == K_END: - self.set_pos(len(self.c_in)) - ## History Navigation - elif event.key == K_UP: - if len(self.c_out): - if self.c_hist_pos > 0: - self.c_hist_pos -= 1 - self.c_in = self.c_hist[self.c_hist_pos] - self.set_pos(len(self.c_in)) - elif event.key == K_DOWN: - if len(self.c_out): - if self.c_hist_pos < len(self.c_hist)-1: - self.c_hist_pos += 1 - self.c_in = self.c_hist[self.c_hist_pos] - self.set_pos(len(self.c_in)) - ## Scrolling - elif event.key == K_PAGEUP: - if self.c_scroll < len(self.c_out)-1: - self.c_scroll += 1 - elif event.key == K_PAGEDOWN: - if self.c_scroll > 0: - self.c_scroll -= 1 - ## Normal character printing - elif event.key >= 32: - mods = pygame.key.get_mods() - if mods & KMOD_CTRL: - if event.key in range(256) and chr(event.key) in self.key_calls: - self.key_calls[chr(event.key)]() - else: - char = str(event.unicode) - self.c_in = self.str_insert(self.c_in, char) - return True - - def convert_token(self, tok): - '''\ - Convert a token to its proper type - ''' - tok = tok.strip("$") - try: - tmp = eval(tok, self.__dict__, self.user_namespace) - except SyntaxError, strerror: - self.output("SyntaxError: " + str(strerror)) - raise ParseError, tok - except TypeError, strerror: - self.output("TypeError: " + str(strerror)) - raise ParseError, tok - except NameError, strerror: - self.output("NameError: " + str(strerror)) - except: - self.output("Error:") - raise ParseError, tok - else: - return tmp - - def tokenize(self, s): - '''\ - Tokenize input line, convert tokens to proper types - ''' - if re_is_comment.match(s): - return [s] - - for re in self.user_syntax: - group = re.match(s) - if group: - self.user_syntax[re](self, group) - return - - tokens = re_token.findall(s) - tokens = [i.strip("\"") for i in tokens] - cmd = [] - i = 0 - while i < len(tokens): - t_count = 0 - val = tokens[i] - - if re_is_number.match(val): - cmd.append(self.convert_token(val)) - elif re_is_var.match(val): - cmd.append(self.convert_token(val)) - elif val == "True": - cmd.append(True) - elif val == "False": - cmd.append(False) - elif re_is_list.match(val): - while not balanced(val) and (i + t_count) < len(tokens)-1: - t_count += 1 - val += tokens[i+t_count] - else: - if (i + t_count) < len(tokens): - cmd.append(self.convert_token(val)) - else: - raise ParseError, val - else: - cmd.append(val) - i += t_count + 1 - return cmd - - - ########################## - #-Some Builtin functions-# - def clear(self): - '''\ - Clear the Screen - ''' - self.c_out = ["[Screen Cleared]"] - self.c_scroll = 0 - - def help(self, *args): - '''\ - Output information about functions - Arguments: - args -- arbitrary argument list of function names - |- No Args - A list of available functions will be displayed - |- One or more Args - Docstring of each function will be displayed - ''' - if args: - items = [(i,self.func_calls[i]) for i in args if i in self.func_calls] - for i,v in items: - out = i + ": Takes %d arguments. " % (v.func_code.co_argcount - (v.func_code.co_varnames[0] is "self")) - doc = v.func_doc - if doc: - out += textwrap.dedent(doc) - tmp_indent = self.txt_wrapper.subsequent_indent - self.txt_wrapper.subsequent_indent = " "*(len(i)+2) - self.output(out) - self.txt_wrapper.subsequent_indent = tmp_indent - else: - out = "Available commands: " + str(self.func_calls.keys()).strip("[]") - self.output(out) - self.output(r'Type "help command-name" for more information on that command') diff --git a/MAFH2/fortuneengine/setup.py b/MAFH2/fortuneengine/setup.py deleted file mode 100644 index 9e512e7..0000000 --- a/MAFH2/fortuneengine/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python - -from distutils.core import setup - -setup(name='Fortune Engine', - version='1.0', - description='The Fortune Game Engine', - author='Justin Lewis', - author_email='jlew.blackout@gmail.com', - url='https://fedorahosted.org/fortune_hunter/wiki/FortuneEngine', - packages=['fortuneengine','fortuneengine.pyconsole'], - package_data={'fortuneengine.pyconsole': ['*.cfg','fonts/*.ttf']}, - license="GPL 3", - ) -- cgit v0.9.1