From: David Polakovic Date: Thu, 17 Jul 2025 19:48:43 +0000 (+0200) Subject: initial commit, version 1.0 X-Git-Url: https://git.dpolakovic.space/?a=commitdiff_plain;h=ca4d9c45183047fa517bc579539cfd77a8a9e279;p=halo3-reclaimer initial commit, version 1.0 --- ca4d9c45183047fa517bc579539cfd77a8a9e279 diff --git a/DOC_LICENSE.txt b/DOC_LICENSE.txt new file mode 100644 index 0000000..857214d --- /dev/null +++ b/DOC_LICENSE.txt @@ -0,0 +1,451 @@ + + GNU Free Documentation License + Version 1.3, 3 November 2008 + + + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of +the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no +other conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to +give them a chance to provide you with an updated version of the +Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other +documents released under this License, and replace the individual +copies of this License in the various documents with a single copy +that is included in the collection, provided that you follow the rules +of this License for verbatim copying of each of the documents in all +other respects. + +You may extract a single document from such a collection, and +distribute it individually under this License, provided you insert a +copy of this License into the extracted document, and follow this +License in all other respects regarding verbatim copying of that +document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +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, receipt of a copy of some or all of the same material does +not give you any rights to use it. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the +GNU Free Documentation 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. See +https://www.gnu.org/licenses/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +"Massive Multiauthor Collaboration" (or "MMC") contained in the site +means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in +part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole or +in part into the MMC, (1) had no cover texts or invariant sections, and +(2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..f288702 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.txt b/README.txt new file mode 100755 index 0000000..bbb6493 --- /dev/null +++ b/README.txt @@ -0,0 +1,59 @@ +Halo 3 Reclaimer +player data extractor from Xbox 360 version of Halo 3 +copyright 2025, David Polakovic, licensed under GPLv3 + + +ABOUT: +Today it is almost impossible to get you player data +like screenshots or Forge map variants from classic +Xbox 360 Halo 3 to you PC. This program solves this +problem. + + +HOW TO RUN: +You need to have Java version 8 or later. For lanuching +the Reclaimer in graphical user interface mode, simply +double click the halo3-reclaimer.jar. If your GUI options +are limited, you can open it via terminal in terminal user +interface mode by typing: + java -jar halo3-reclaimer.jar -h +Make sure to be in same directory as the file itself. +NOTE: Apple users might experience security warnings as +for all .jar files. Check some tutorials how to open .jar +files on Mac or use terminal: + java -jar halo3-reclaimer.jar (without option) + + +HOW TO USE +You can copy your Halo 3 screenshots and maps into +USB stick formated for Xbox 360 file system. Then, +insert the USB stick into the computer and run the +halo3-reclaimer. +1. Click 'Browse' next to 'Raw file destination' + to select your Xbox 360 Halo 3 file +2. Click 'Browse' next to 'Save destination + to choose where to save the converted image +3. Click 'PELICAN!' to start the extraction process + The tool will convert your Xbox 360 file + into a standard JPEG image or map file* that you + share on any device. +* map files are not implemented yet + + +BUILDING FORM SOURCE: +There is a build.xml file configured for you convinience +which requires Apache Ant. Install Ant and simply run: + ant all + + + +LICENSE: +https://www.gnu.org/licenses/gpl-3.0.en.html +see LICENSE.txt + +CONTACT: +email@dpolakovic.space +Fetch my GPG here: https://dpolakovic.space/gpg + +RELEASE NOTES: +1.0 - Screenshots extracting diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..5facf61 --- /dev/null +++ b/build.xml @@ -0,0 +1,84 @@ + + + player data extractor from Xbox 360 version of Halo 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Halo 3 Reclaimer]]>
+
File extractor from Xbox 360 version of Halo 3]]>
+ + + +
+
+ + + + +
\ No newline at end of file diff --git a/build/Arbiter.class b/build/Arbiter.class new file mode 100644 index 0000000..4b6db27 Binary files /dev/null and b/build/Arbiter.class differ diff --git a/build/ErrorHandler.class b/build/ErrorHandler.class new file mode 100644 index 0000000..e0c5fce Binary files /dev/null and b/build/ErrorHandler.class differ diff --git a/build/GraphicalUI$1.class b/build/GraphicalUI$1.class new file mode 100644 index 0000000..f371e54 Binary files /dev/null and b/build/GraphicalUI$1.class differ diff --git a/build/GraphicalUI$BrowseRawActionListener$1.class b/build/GraphicalUI$BrowseRawActionListener$1.class new file mode 100644 index 0000000..24627e5 Binary files /dev/null and b/build/GraphicalUI$BrowseRawActionListener$1.class differ diff --git a/build/GraphicalUI$BrowseRawActionListener.class b/build/GraphicalUI$BrowseRawActionListener.class new file mode 100644 index 0000000..169e191 Binary files /dev/null and b/build/GraphicalUI$BrowseRawActionListener.class differ diff --git a/build/GraphicalUI$BrowseSaveActionListener.class b/build/GraphicalUI$BrowseSaveActionListener.class new file mode 100644 index 0000000..8f2eb8c Binary files /dev/null and b/build/GraphicalUI$BrowseSaveActionListener.class differ diff --git a/build/GraphicalUI$ReclaimActionListener$1.class b/build/GraphicalUI$ReclaimActionListener$1.class new file mode 100644 index 0000000..6475749 Binary files /dev/null and b/build/GraphicalUI$ReclaimActionListener$1.class differ diff --git a/build/GraphicalUI$ReclaimActionListener.class b/build/GraphicalUI$ReclaimActionListener.class new file mode 100644 index 0000000..9185d94 Binary files /dev/null and b/build/GraphicalUI$ReclaimActionListener.class differ diff --git a/build/GraphicalUI.class b/build/GraphicalUI.class new file mode 100644 index 0000000..b33376c Binary files /dev/null and b/build/GraphicalUI.class differ diff --git a/build/Main.class b/build/Main.class new file mode 100644 index 0000000..eedcfdc Binary files /dev/null and b/build/Main.class differ diff --git a/build/MapReclaimer.class b/build/MapReclaimer.class new file mode 100644 index 0000000..0cf23b3 Binary files /dev/null and b/build/MapReclaimer.class differ diff --git a/build/ScreenshotReclaimer.class b/build/ScreenshotReclaimer.class new file mode 100644 index 0000000..dff2b10 Binary files /dev/null and b/build/ScreenshotReclaimer.class differ diff --git a/build/TerminalUI.class b/build/TerminalUI.class new file mode 100644 index 0000000..80ef7fb Binary files /dev/null and b/build/TerminalUI.class differ diff --git a/doc/Arbiter.html b/doc/Arbiter.html new file mode 100644 index 0000000..a83d989 --- /dev/null +++ b/doc/Arbiter.html @@ -0,0 +1,302 @@ + + + + + +Arbiter (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + + +
+

Class Arbiter

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • Arbiter
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Arbiter
    +extends java.lang.Object
    +
    Arbiter class that determines file type and routes to appropriate extractor. + +

    This class analyzes the input file to determine whether it's a screenshot + or map file, then calls the appropriate reclaimer. The Xbox 360 saves file + type directly in file name. So it just checks for names...

    +
    +
    Version:
    +
    1.0
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Arbiter() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static java.lang.StringgetFileTypeDescription(java.io.File inputFile) 
      static voidprocessFile(java.io.File inputFile, + java.io.File outputDir) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Arbiter

        +
        public Arbiter()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        processFile

        +
        public static void processFile(java.io.File inputFile,
        +                               java.io.File outputDir)
        +                        throws java.lang.Exception
        +
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      + + + +
        +
      • +

        getFileTypeDescription

        +
        public static java.lang.String getFileTypeDescription(java.io.File inputFile)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/ErrorHandler.html b/doc/ErrorHandler.html new file mode 100644 index 0000000..742aa55 --- /dev/null +++ b/doc/ErrorHandler.html @@ -0,0 +1,476 @@ + + + + + +ErrorHandler (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + + +
+

Class ErrorHandler

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • ErrorHandler
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class ErrorHandler
    +extends java.lang.Object
    +
    Simple error handling class. + +

    This class just stores error messages and prints them when needed.

    +
    +
    Version:
    +
    1.0
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      ErrorHandler() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static voidexitWithError(java.lang.String errorMessage) +
      TUI only: print error AND QUIT
      +
      static voidexitWithError(java.lang.String errorMessage, + java.lang.String extraInfo) +
      TUI only: print error AND QUIT
      +
      static java.lang.ExceptionmakeException(java.lang.String errorMessage) +
      Make exception for GUI
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ErrorHandler

        +
        public ErrorHandler()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        exitWithError

        +
        public static void exitWithError(java.lang.String errorMessage,
        +                                 java.lang.String extraInfo)
        +
        TUI only: print error AND QUIT
        +
      • +
      + + + +
        +
      • +

        exitWithError

        +
        public static void exitWithError(java.lang.String errorMessage)
        +
        TUI only: print error AND QUIT
        +
      • +
      + + + +
        +
      • +

        makeException

        +
        public static java.lang.Exception makeException(java.lang.String errorMessage)
        +
        Make exception for GUI
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/GraphicalUI.html b/doc/GraphicalUI.html new file mode 100644 index 0000000..11f2fb8 --- /dev/null +++ b/doc/GraphicalUI.html @@ -0,0 +1,446 @@ + + + + + +GraphicalUI (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + + +
+

Class GraphicalUI

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.awt.Component
    • +
    • +
        +
      • java.awt.Container
      • +
      • +
          +
        • java.awt.Window
        • +
        • +
            +
          • java.awt.Frame
          • +
          • +
              +
            • javax.swing.JFrame
            • +
            • +
                +
              • GraphicalUI
              • +
              +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
    +
    +
    +
    +
    public class GraphicalUI
    +extends javax.swing.JFrame
    +
    Graphical User Interface for Halo 3 Reclaimer. + +

    This class contains all the GUI components and + logic for the application's windowed interface

    +
    +
    Version:
    +
    1.0
    +
    See Also:
    +
    Serialized Form
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      +
        +
      • + + +

        Nested classes/interfaces inherited from class javax.swing.JFrame

        +javax.swing.JFrame.AccessibleJFrame
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Frame

        +java.awt.Frame.AccessibleAWTFrame
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Window

        +java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Container

        +java.awt.Container.AccessibleAWTContainer
      • +
      +
        +
      • + + +

        Nested classes/interfaces inherited from class java.awt.Component

        +java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
      • +
      +
    • +
    + +
      +
    • + + +

      Field Summary

      +
        +
      • + + +

        Fields inherited from class javax.swing.JFrame

        +accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
      • +
      +
        +
      • + + +

        Fields inherited from class java.awt.Frame

        +CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
      • +
      +
        +
      • + + +

        Fields inherited from class java.awt.Component

        +BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • +
      +
        +
      • + + +

        Fields inherited from interface javax.swing.WindowConstants

        +DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
      • +
      +
        +
      • + + +

        Fields inherited from interface java.awt.image.ImageObserver

        +ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
      • +
      +
    • +
    + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      GraphicalUI() +
      initializes the GUI
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static voidmain() +
      start the GUI mode
      +
      +
        +
      • + + +

        Methods inherited from class javax.swing.JFrame

        +addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Frame

        +addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Window

        +addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Container

        +add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
      • +
      +
        +
      • + + +

        Methods inherited from class java.awt.Component

        +action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
        +
      • + + +

        Methods inherited from interface java.awt.MenuContainer

        +getFont, postEvent
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        GraphicalUI

        +
        public GraphicalUI()
        +
        initializes the GUI
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        main

        +
        public static void main()
        +
        start the GUI mode
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/Main.html b/doc/Main.html new file mode 100644 index 0000000..2d4dc51 --- /dev/null +++ b/doc/Main.html @@ -0,0 +1,281 @@ + + + + + +Main (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + + +
+

Class Main

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • Main
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class Main
    +extends java.lang.Object
    +
    Main entry point for the program. + +

    This class handles command line argument processing + and routes execution to either the GUI or TUI.

    +
    +
    Version:
    +
    1.0
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      Main() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static voidmain(java.lang.String[] args) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        Main

        +
        public Main()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        main

        +
        public static void main(java.lang.String[] args)
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/MapReclaimer.html b/doc/MapReclaimer.html new file mode 100644 index 0000000..cb7fa46 --- /dev/null +++ b/doc/MapReclaimer.html @@ -0,0 +1,287 @@ + + + + + +MapReclaimer (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + + +
+

Class MapReclaimer

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • MapReclaimer
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class MapReclaimer
    +extends java.lang.Object
    +
    Core extraction engine for Forge map variants. + +

    This is harder than it looks. WIP.

    +
    +
    Version:
    +
    "1.0"
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      MapReclaimer() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voidextractMap(java.io.File inputFile, + java.io.File outputDir) 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        MapReclaimer

        +
        public MapReclaimer()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        extractMap

        +
        public void extractMap(java.io.File inputFile,
        +                       java.io.File outputDir)
        +                throws java.lang.Exception
        +
        +
        Throws:
        +
        java.lang.Exception
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/ScreenshotReclaimer.html b/doc/ScreenshotReclaimer.html new file mode 100644 index 0000000..bec14ee --- /dev/null +++ b/doc/ScreenshotReclaimer.html @@ -0,0 +1,307 @@ + + + + + +ScreenshotReclaimer (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + + +
+

Class ScreenshotReclaimer

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • ScreenshotReclaimer
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class ScreenshotReclaimer
    +extends java.lang.Object
    +
    Core extraction engine for screenshots. + +

    This class extracts image data from Xbox 360 screenshot files, + which are stored in STFS (Secure Transacted File System) format.

    + +

    Supported input formats:

    +
      +
    • STFS container files (CON, LIVE, PIRS)
    • +
    • DDS (DirectDraw Surface) files
    • +
    • TGA (Targa) files
    • +
    • Raw Xbox 360 texture data
    • +
    + +

    Supported pixel formats:

    +
      +
    • A8R8G8B8 (32-bit ARGB)
    • +
    • X8R8G8B8 (32-bit RGB)
    • +
    • RGB565 (16-bit RGB)
    • +
    • Standard RGBA and RGB formats
    • +
    +
    +
    Version:
    +
    1.0
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      voidextractScreenshot(java.io.File inputFile, + java.io.File outputDir) +
      Extracts a screenshot from an Xbox 360 file and saves it as a JPEG.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        ScreenshotReclaimer

        +
        public ScreenshotReclaimer()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        extractScreenshot

        +
        public void extractScreenshot(java.io.File inputFile,
        +                              java.io.File outputDir)
        +                       throws java.lang.Exception
        +
        Extracts a screenshot from an Xbox 360 file and saves it as a JPEG.
        +
        +
        Throws:
        +
        java.lang.Exception - if the file cannot be read, parsed, or converted
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/TerminalUI.html b/doc/TerminalUI.html new file mode 100644 index 0000000..e5d957a --- /dev/null +++ b/doc/TerminalUI.html @@ -0,0 +1,335 @@ + + + + + +TerminalUI (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + + +
+

Class TerminalUI

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • TerminalUI
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public class TerminalUI
    +extends java.lang.Object
    +
    Terminal User Interface for Halo 3 Reclaimer. + +

    This class contains all the command-line interface logic.

    +
    +
    Version:
    +
    1.0
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Summary

      + + + + + + + + +
      Constructors 
      Constructor and Description
      TerminalUI() 
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static voidprocessFile(java.lang.String[] args) +
      processes file extraction from command line.
      +
      static voidshowHelp() 
      static voidshowTooManyArguments() 
      static voidshowUnknownCommand(java.lang.String command) 
      static voidshowVersion() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Constructor Detail

      + + + +
        +
      • +

        TerminalUI

        +
        public TerminalUI()
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        showVersion

        +
        public static void showVersion()
        +
      • +
      + + + +
        +
      • +

        showHelp

        +
        public static void showHelp()
        +
      • +
      + + + +
        +
      • +

        processFile

        +
        public static void processFile(java.lang.String[] args)
        +
        processes file extraction from command line.
        +
      • +
      + + + +
        +
      • +

        showUnknownCommand

        +
        public static void showUnknownCommand(java.lang.String command)
        +
      • +
      + + + +
        +
      • +

        showTooManyArguments

        +
        public static void showTooManyArguments()
        +
      • +
      +
    • +
    +
  • +
+
+
+ + +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/allclasses-frame.html b/doc/allclasses-frame.html new file mode 100644 index 0000000..11a4d8f --- /dev/null +++ b/doc/allclasses-frame.html @@ -0,0 +1,25 @@ + + + + + +All Classes (Halo 3 Reclaimer) + + + + + +

All Classes

+ + + diff --git a/doc/allclasses-noframe.html b/doc/allclasses-noframe.html new file mode 100644 index 0000000..a976273 --- /dev/null +++ b/doc/allclasses-noframe.html @@ -0,0 +1,25 @@ + + + + + +All Classes (Halo 3 Reclaimer) + + + + + +

All Classes

+ + + diff --git a/doc/class-use/Arbiter.html b/doc/class-use/Arbiter.html new file mode 100644 index 0000000..02c72e0 --- /dev/null +++ b/doc/class-use/Arbiter.html @@ -0,0 +1,127 @@ + + + + + +Uses of Class Arbiter (Halo 3 Reclaimer) + + + + + + + + + + + +
+

Uses of Class
Arbiter

+
+
No usage of Arbiter
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/class-use/ErrorHandler.html b/doc/class-use/ErrorHandler.html new file mode 100644 index 0000000..a0190ee --- /dev/null +++ b/doc/class-use/ErrorHandler.html @@ -0,0 +1,127 @@ + + + + + +Uses of Class ErrorHandler (Halo 3 Reclaimer) + + + + + + + + + + + +
+

Uses of Class
ErrorHandler

+
+
No usage of ErrorHandler
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/class-use/GraphicalUI.html b/doc/class-use/GraphicalUI.html new file mode 100644 index 0000000..6c07b36 --- /dev/null +++ b/doc/class-use/GraphicalUI.html @@ -0,0 +1,127 @@ + + + + + +Uses of Class GraphicalUI (Halo 3 Reclaimer) + + + + + + + + + + + +
+

Uses of Class
GraphicalUI

+
+
No usage of GraphicalUI
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/class-use/Main.html b/doc/class-use/Main.html new file mode 100644 index 0000000..683e05c --- /dev/null +++ b/doc/class-use/Main.html @@ -0,0 +1,127 @@ + + + + + +Uses of Class Main (Halo 3 Reclaimer) + + + + + + + + + + + +
+

Uses of Class
Main

+
+
No usage of Main
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/class-use/MapReclaimer.html b/doc/class-use/MapReclaimer.html new file mode 100644 index 0000000..a5ef6c4 --- /dev/null +++ b/doc/class-use/MapReclaimer.html @@ -0,0 +1,127 @@ + + + + + +Uses of Class MapReclaimer (Halo 3 Reclaimer) + + + + + + + + + + + +
+

Uses of Class
MapReclaimer

+
+
No usage of MapReclaimer
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/class-use/ScreenshotReclaimer.html b/doc/class-use/ScreenshotReclaimer.html new file mode 100644 index 0000000..841c191 --- /dev/null +++ b/doc/class-use/ScreenshotReclaimer.html @@ -0,0 +1,127 @@ + + + + + +Uses of Class ScreenshotReclaimer (Halo 3 Reclaimer) + + + + + + + + + + + +
+

Uses of Class
ScreenshotReclaimer

+
+
No usage of ScreenshotReclaimer
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/class-use/TerminalUI.html b/doc/class-use/TerminalUI.html new file mode 100644 index 0000000..9cd8826 --- /dev/null +++ b/doc/class-use/TerminalUI.html @@ -0,0 +1,127 @@ + + + + + +Uses of Class TerminalUI (Halo 3 Reclaimer) + + + + + + + + + + + +
+

Uses of Class
TerminalUI

+
+
No usage of TerminalUI
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/constant-values.html b/doc/constant-values.html new file mode 100644 index 0000000..2572218 --- /dev/null +++ b/doc/constant-values.html @@ -0,0 +1,205 @@ + + + + + +Constant Field Values (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
+

Constant Field Values

+

Contents

+ +
+
+ + +

<Unnamed>.*

+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ErrorHandler 
    Modifier and TypeConstant FieldValue
    + +public static final java.lang.StringBAD_INPUT"123: Input file problem"
    + +public static final java.lang.StringBAD_OUTPUT"123: Output directory problem"
    + +public static final java.lang.StringCANT_PROCESS"003: Cannot process file"
    + +public static final java.lang.StringNEED_SELECTION"001: Please select file and directory"
    + +public static final java.lang.StringNOT_READY"117: Feature not ready yet"
    + +public static final java.lang.StringTOO_MANY_ARGS"002: Too many arguments"
    + +public static final java.lang.StringUNKNOWN_COMMAND"500: Unknown command"
    + +public static final java.lang.StringUNKNOWN_FILE"343: Not a Halo game (file)"
    +
  • +
+
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/deprecated-list.html b/doc/deprecated-list.html new file mode 100644 index 0000000..4022909 --- /dev/null +++ b/doc/deprecated-list.html @@ -0,0 +1,127 @@ + + + + + +Deprecated List (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/help-doc.html b/doc/help-doc.html new file mode 100644 index 0000000..512ac5b --- /dev/null +++ b/doc/help-doc.html @@ -0,0 +1,232 @@ + + + + + +API Help (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Overview

    +

    The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

    +
  • +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/index-all.html b/doc/index-all.html new file mode 100644 index 0000000..ff57abc --- /dev/null +++ b/doc/index-all.html @@ -0,0 +1,290 @@ + + + + + +Index (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
A B C E G M N P S T U  + + +

A

+
+
Arbiter - Class in <Unnamed>
+
+
Arbiter class that determines file type and routes to appropriate extractor.
+
+
Arbiter() - Constructor for class Arbiter
+
 
+
+ + + +

B

+
+
BAD_INPUT - Static variable in class ErrorHandler
+
 
+
BAD_OUTPUT - Static variable in class ErrorHandler
+
 
+
+ + + +

C

+
+
CANT_PROCESS - Static variable in class ErrorHandler
+
 
+
+ + + +

E

+
+
ErrorHandler - Class in <Unnamed>
+
+
Simple error handling class.
+
+
ErrorHandler() - Constructor for class ErrorHandler
+
 
+
exitWithError(String, String) - Static method in class ErrorHandler
+
+
TUI only: print error AND QUIT
+
+
exitWithError(String) - Static method in class ErrorHandler
+
+
TUI only: print error AND QUIT
+
+
extractMap(File, File) - Method in class MapReclaimer
+
 
+
extractScreenshot(File, File) - Method in class ScreenshotReclaimer
+
+
Extracts a screenshot from an Xbox 360 file and saves it as a JPEG.
+
+
+ + + +

G

+
+
getFileTypeDescription(File) - Static method in class Arbiter
+
 
+
GraphicalUI - Class in <Unnamed>
+
+
Graphical User Interface for Halo 3 Reclaimer.
+
+
GraphicalUI() - Constructor for class GraphicalUI
+
+
initializes the GUI
+
+
+ + + +

M

+
+
main() - Static method in class GraphicalUI
+
+
start the GUI mode
+
+
Main - Class in <Unnamed>
+
+
Main entry point for the program.
+
+
Main() - Constructor for class Main
+
 
+
main(String[]) - Static method in class Main
+
 
+
makeException(String) - Static method in class ErrorHandler
+
+
Make exception for GUI
+
+
MapReclaimer - Class in <Unnamed>
+
+
Core extraction engine for Forge map variants.
+
+
MapReclaimer() - Constructor for class MapReclaimer
+
 
+
+ + + +

N

+
+
NEED_SELECTION - Static variable in class ErrorHandler
+
 
+
NOT_READY - Static variable in class ErrorHandler
+
 
+
+ + + +

P

+
+
processFile(File, File) - Static method in class Arbiter
+
 
+
processFile(String[]) - Static method in class TerminalUI
+
+
processes file extraction from command line.
+
+
+ + + +

S

+
+
ScreenshotReclaimer - Class in <Unnamed>
+
+
Core extraction engine for screenshots.
+
+
ScreenshotReclaimer() - Constructor for class ScreenshotReclaimer
+
 
+
showHelp() - Static method in class TerminalUI
+
 
+
showTooManyArguments() - Static method in class TerminalUI
+
 
+
showUnknownCommand(String) - Static method in class TerminalUI
+
 
+
showVersion() - Static method in class TerminalUI
+
 
+
+ + + +

T

+
+
TerminalUI - Class in <Unnamed>
+
+
Terminal User Interface for Halo 3 Reclaimer.
+
+
TerminalUI() - Constructor for class TerminalUI
+
 
+
TOO_MANY_ARGS - Static variable in class ErrorHandler
+
 
+
+ + + +

U

+
+
UNKNOWN_COMMAND - Static variable in class ErrorHandler
+
 
+
UNKNOWN_FILE - Static variable in class ErrorHandler
+
 
+
+A B C E G M N P S T U 
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 0000000..97ce0c4 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,72 @@ + + + + + +Halo 3 Reclaimer + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="overview-summary.html">Non-frame version</a>.</p> + + + diff --git a/doc/overview-summary.html b/doc/overview-summary.html new file mode 100644 index 0000000..7b89e3f --- /dev/null +++ b/doc/overview-summary.html @@ -0,0 +1,135 @@ + + + + + +Overview (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
+

Halo 3 Reclaimer - File extractor from Xbox 360 version of Halo 3

+
+
+ + + + + + +
Packages 
PackageDescription
+
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/overview-tree.html b/doc/overview-tree.html new file mode 100644 index 0000000..c68191a --- /dev/null +++ b/doc/overview-tree.html @@ -0,0 +1,162 @@ + + + + + +Class Hierarchy (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
+

Hierarchy For All Packages

+
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • Arbiter
    • +
    • java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable) +
        +
      • java.awt.Container +
          +
        • java.awt.Window (implements javax.accessibility.Accessible) +
            +
          • java.awt.Frame (implements java.awt.MenuContainer) +
              +
            • javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants) + +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    • ErrorHandler
    • +
    • Main
    • +
    • MapReclaimer
    • +
    • ScreenshotReclaimer
    • +
    • TerminalUI
    • +
    +
  • +
+
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/package-frame.html b/doc/package-frame.html new file mode 100644 index 0000000..a1051d0 --- /dev/null +++ b/doc/package-frame.html @@ -0,0 +1,26 @@ + + + + + +<Unnamed> (Halo 3 Reclaimer) + + + + + +

<Unnamed>

+ + + diff --git a/doc/package-list b/doc/package-list new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/doc/package-list @@ -0,0 +1 @@ + diff --git a/doc/package-summary.html b/doc/package-summary.html new file mode 100644 index 0000000..4e978d8 --- /dev/null +++ b/doc/package-summary.html @@ -0,0 +1,183 @@ + + + + + + (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
+

Package <Unnamed>

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Arbiter +
    Arbiter class that determines file type and routes to appropriate extractor.
    +
    ErrorHandler +
    Simple error handling class.
    +
    GraphicalUI +
    Graphical User Interface for Halo 3 Reclaimer.
    +
    Main +
    Main entry point for the program.
    +
    MapReclaimer +
    Core extraction engine for Forge map variants.
    +
    ScreenshotReclaimer +
    Core extraction engine for screenshots.
    +
    TerminalUI +
    Terminal User Interface for Halo 3 Reclaimer.
    +
    +
  • +
+
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/package-tree.html b/doc/package-tree.html new file mode 100644 index 0000000..b06f226 --- /dev/null +++ b/doc/package-tree.html @@ -0,0 +1,162 @@ + + + + + + Class Hierarchy (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
+

Hierarchy For Package <Unnamed>

+
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • Arbiter
    • +
    • java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable) +
        +
      • java.awt.Container +
          +
        • java.awt.Window (implements javax.accessibility.Accessible) +
            +
          • java.awt.Frame (implements java.awt.MenuContainer) +
              +
            • javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants) + +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    • ErrorHandler
    • +
    • Main
    • +
    • MapReclaimer
    • +
    • ScreenshotReclaimer
    • +
    • TerminalUI
    • +
    +
  • +
+
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/package-use.html b/doc/package-use.html new file mode 100644 index 0000000..a5f471e --- /dev/null +++ b/doc/package-use.html @@ -0,0 +1,127 @@ + + + + + +Uses of Package (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
+

Uses of Package

+
+
No usage of
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/script.js b/doc/script.js new file mode 100644 index 0000000..b346356 --- /dev/null +++ b/doc/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/doc/serialized-form.html b/doc/serialized-form.html new file mode 100644 index 0000000..96cf025 --- /dev/null +++ b/doc/serialized-form.html @@ -0,0 +1,171 @@ + + + + + +Serialized Form (Halo 3 Reclaimer) + + + + + + + + +
+ + + + + + + +
Halo 3 Reclaimer
+
+ + +
+

Serialized Form

+
+
+
    +
  • +

    Package <Unnamed>

    +
      +
    • + + +

      Class GraphicalUI extends javax.swing.JFrame implements Serializable

      +
        +
      • +

        Serialized Fields

        +
          +
        • +

          rawFileField

          +
          javax.swing.JTextField rawFileField
          +
        • +
        • +

          saveDestinationField

          +
          javax.swing.JTextField saveDestinationField
          +
        • +
        • +

          reclaimButton

          +
          javax.swing.JButton reclaimButton
          +
        • +
        • +

          browseRawButton

          +
          javax.swing.JButton browseRawButton
          +
        • +
        • +

          browseSaveButton

          +
          javax.swing.JButton browseSaveButton
          +
        • +
        • +

          statusLabel

          +
          javax.swing.JLabel statusLabel
          +
        • +
        +
      • +
      +
    • +
    +
  • +
+
+ +
+ + + + + + + +
File extractor from Xbox 360 version of Halo 3
+
+ + +

Copyright 2025. Documentation licensed under GFDL v1.3.

+ + diff --git a/doc/stylesheet.css b/doc/stylesheet.css new file mode 100644 index 0000000..98055b2 --- /dev/null +++ b/doc/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/doc/user-manual-editable.odt b/doc/user-manual-editable.odt new file mode 100644 index 0000000..ca16c70 Binary files /dev/null and b/doc/user-manual-editable.odt differ diff --git a/doc/user-manual.pdf b/doc/user-manual.pdf new file mode 100644 index 0000000..ca355ae Binary files /dev/null and b/doc/user-manual.pdf differ diff --git a/halo3-reclaimer.jar b/halo3-reclaimer.jar new file mode 100644 index 0000000..af0e593 Binary files /dev/null and b/halo3-reclaimer.jar differ diff --git a/src/Arbiter.java b/src/Arbiter.java new file mode 100644 index 0000000..6fa6706 --- /dev/null +++ b/src/Arbiter.java @@ -0,0 +1,60 @@ +/* +* Halo 3 Reclaimer [Arbiter.java] +* player data extractor from Xbox 360 version of Halo 3 +* copyright 2025, David Polakovic, licensed under GPLv3 +* contact: email@dpolakovic.space +*/ + +import java.io.File; + +/** +* Arbiter class that determines file type and routes to appropriate extractor. +* +*

This class analyzes the input file to determine whether it's a screenshot +* or map file, then calls the appropriate reclaimer. The Xbox 360 saves file +* type directly in file name. So it just checks for names...

+* +* @version 1.0 +*/ + +public class Arbiter { + + public static void processFile(File inputFile, File outputDir) throws Exception { + String fileName = inputFile.getName().toLowerCase(); + + if (isScreenshotFile(fileName)) { + // route to screenshot extractor + ScreenshotReclaimer screenshotReclaimer = new ScreenshotReclaimer(); + screenshotReclaimer.extractScreenshot(inputFile, outputDir); + } else if (isMapFile(fileName)) { + // route to map extractor + MapReclaimer mapReclaimer = new MapReclaimer(); + mapReclaimer.extractMap(inputFile, outputDir); + } else { + // unrecognized file type + throw ErrorHandler.makeException(ErrorHandler.UNKNOWN_FILE); + } + } + + + private static boolean isScreenshotFile(String fileName) { + return fileName.contains("screenshot") || fileName.contains("shot"); + } + + + private static boolean isMapFile(String fileName) { + return fileName.contains("map") || fileName.contains("variant") || fileName.contains("forge"); + } + + public static String getFileTypeDescription(File inputFile) { + String fileName = inputFile.getName().toLowerCase(); + + if (isScreenshotFile(fileName)) { + return "Screenshot file"; + } else if (isMapFile(fileName)) { + return "Map file"; + } else { + return "Unrecognized file"; + } + } +} \ No newline at end of file diff --git a/src/ErrorHandler.java b/src/ErrorHandler.java new file mode 100644 index 0000000..37789c7 --- /dev/null +++ b/src/ErrorHandler.java @@ -0,0 +1,49 @@ +/* +* Halo 3 Reclaimer [ErrorHandler.java] +* player data extractor from Xbox 360 version of Halo 3 +* copyright 2025, David Polakovic, licensed under GPLv3 +* contact: email@dpolakovic.space +*/ + +/** +* Simple error handling class. +* +*

This class just stores error messages and prints them when needed.

+* +* @version 1.0 +*/ +public class ErrorHandler { + + // Error messages + public static final String UNKNOWN_FILE = "343: Not a Halo game (file)"; + public static final String TOO_MANY_ARGS = "002: Too many arguments"; + public static final String BAD_INPUT = "123: Input file problem"; + public static final String BAD_OUTPUT = "123: Output directory problem"; + public static final String CANT_PROCESS = "003: Cannot process file"; + public static final String NOT_READY = "117: Feature not ready yet"; + public static final String NEED_SELECTION = "001: Please select file and directory"; + public static final String UNKNOWN_COMMAND = "500: Unknown command"; + + /** + * TUI only: print error AND QUIT + */ + public static void exitWithError(String errorMessage, String extraInfo) { + System.err.println("Error " + errorMessage + + (extraInfo != null ? ": " + extraInfo : "")); + System.exit(1); + } + + /** + * TUI only: print error AND QUIT + */ + public static void exitWithError(String errorMessage) { + exitWithError(errorMessage, null); + } + + /** + * Make exception for GUI + */ + public static Exception makeException(String errorMessage) { + return new Exception(errorMessage); + } +} \ No newline at end of file diff --git a/src/GraphicalUI.java b/src/GraphicalUI.java new file mode 100644 index 0000000..bff04e2 --- /dev/null +++ b/src/GraphicalUI.java @@ -0,0 +1,354 @@ +/* +* Halo 3 Reclaimer [GraphicalUI.java] +* player data extractor from Xbox 360 version of Halo 3 +* copyright 2025, David Polakovic, licensed under GPLv3 +* contact: email@dpolakovic.space +*/ + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; + +/** +* Graphical User Interface for Halo 3 Reclaimer. +* +*

This class contains all the GUI components and +* logic for the application's windowed interface

+* +* @version 1.0 +*/ + +public class GraphicalUI extends JFrame { + private JTextField rawFileField; + private JTextField saveDestinationField; + private JButton reclaimButton; + private JButton browseRawButton; + private JButton browseSaveButton; + private JLabel statusLabel; + + /** + * start the GUI mode + */ + public static void main() { + new GraphicalUI().setVisible(true); + } + + /** + * initializes the GUI + */ + public GraphicalUI() { + initializeGUI(); + } + + private void initializeGUI() { + setTitle("Halo 3 Reclaimer"); + setSize(400, 320); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setResizable(false); + setLocationRelativeTo(null); + setLayout(new BorderLayout()); + + ImageIcon icon = new ImageIcon("src/mc.png"); + setIconImage(icon.getImage()); + + // create menu bar + createMenuBar(); + + // create main panel with padding + JPanel mainPanel = new JPanel(); + mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS)); + mainPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20)); + + // raw file section + JLabel rawLabel = new JLabel("Raw file destination:"); + rawLabel.setAlignmentX(Component.LEFT_ALIGNMENT); + mainPanel.add(rawLabel); + mainPanel.add(Box.createVerticalStrut(5)); + + JPanel rawPanel = new JPanel(new BorderLayout(5, 0)); + rawPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 25)); + rawFileField = new JTextField(); + browseRawButton = new JButton("Browse"); + browseRawButton.setPreferredSize(new Dimension(80, 25)); + rawPanel.add(rawFileField, BorderLayout.CENTER); + rawPanel.add(browseRawButton, BorderLayout.EAST); + rawPanel.setAlignmentX(Component.LEFT_ALIGNMENT); + mainPanel.add(rawPanel); + + mainPanel.add(Box.createVerticalStrut(20)); + + // save destination section + JLabel saveLabel = new JLabel("Save destination:"); + saveLabel.setAlignmentX(Component.LEFT_ALIGNMENT); + mainPanel.add(saveLabel); + mainPanel.add(Box.createVerticalStrut(5)); + + JPanel savePanel = new JPanel(new BorderLayout(5, 0)); + savePanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, 25)); + saveDestinationField = new JTextField(); + browseSaveButton = new JButton("Browse"); + browseSaveButton.setPreferredSize(new Dimension(80, 25)); + savePanel.add(saveDestinationField, BorderLayout.CENTER); + savePanel.add(browseSaveButton, BorderLayout.EAST); + savePanel.setAlignmentX(Component.LEFT_ALIGNMENT); + mainPanel.add(savePanel); + + mainPanel.add(Box.createVerticalStrut(30)); + + // the action button + JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); + buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); + reclaimButton = new JButton("PELICAN!"); + reclaimButton.setPreferredSize(new Dimension(120, 40)); + reclaimButton.setFont(new Font(Font.SANS_SERIF, Font.BOLD, 14)); + buttonPanel.add(reclaimButton); + buttonPanel.setAlignmentX(Component.LEFT_ALIGNMENT); + mainPanel.add(buttonPanel); + + mainPanel.add(Box.createVerticalGlue()); + + // event listeners + browseRawButton.addActionListener(new BrowseRawActionListener()); + browseSaveButton.addActionListener(new BrowseSaveActionListener()); + reclaimButton.addActionListener(new ReclaimActionListener()); + + // status bar + statusLabel = new JLabel("Ready"); + statusLabel.setBorder(BorderFactory.createCompoundBorder( + BorderFactory.createLoweredBevelBorder(), + BorderFactory.createEmptyBorder(2, 5, 2, 5) + )); + statusLabel.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 11)); + add(mainPanel, BorderLayout.CENTER); + add(statusLabel, BorderLayout.SOUTH); + } + + // menu bar + private void createMenuBar() { + JMenuBar menuBar = new JMenuBar(); + + // file menu + JMenu fileMenu = new JMenu("Program"); + JMenuItem quitItem = new JMenuItem("Quit"); + quitItem.addActionListener(e -> System.exit(0)); + fileMenu.add(quitItem); + + // about menu + JMenu aboutMenu = new JMenu("About"); + + JMenuItem versionItem = new JMenuItem("Version info"); + versionItem.addActionListener(e -> showVersionInfo()); + aboutMenu.add(versionItem); + + JMenuItem helpItem = new JMenuItem("Help"); + helpItem.addActionListener(e -> showHelp()); + aboutMenu.add(helpItem); + + menuBar.add(fileMenu); + menuBar.add(aboutMenu); + + setJMenuBar(menuBar); + } + + /** + * shows version pop up. + */ + private void showVersionInfo() { + String versionText = "Halo 3 Reclaimer\n\n" + + "Version: 1.0\n\n" + + "player data extractor from Xbox 360 version of Halo 3\n" + + "copyright 2025, David Polakovic, licensed under GPLv3\n"; + + JOptionPane.showMessageDialog(this, versionText, "Version Information", + JOptionPane.INFORMATION_MESSAGE); + } + + /** + * shows help pop up. + */ + private void showHelp() { + String helpText = "How to use:\n\n" + + "1. Click 'Browse' next to 'Raw file destination'\n" + + " to select your Xbox 360 Halo 3 file\n\n" + + "2. Click 'Browse' next to 'Save destination'\n" + + " to choose where to save the converted image\n\n" + + "3. Click 'PELICAN!' to start the extraction process\n\n" + + "The tool will convert your Xbox 360 file\n" + + "into a standard JPEG image or map file*\n" + + "that you share on any device.\n\n" + + "* map files are not implemented yet"; + + JOptionPane.showMessageDialog(this, helpText, "Help", + JOptionPane.INFORMATION_MESSAGE); + } + + /** + * updates the status bar with a message. + */ + private void setStatus(String message) { + statusLabel.setText(message); + } + + /** + * updates the status bar with an error message in red color. + */ + private void setErrorStatus(String message) { + statusLabel.setForeground(Color.RED); + statusLabel.setText("Error " + message); + } + + /** + * updates the status bar with a success message in green color. + */ + private void setSuccessStatus(String message) { + statusLabel.setForeground(new Color(0, 120, 0)); // Dark green + statusLabel.setText(message); + } + + /** + * Resets the status bar to black color. + */ + private void resetStatusColor() { + statusLabel.setForeground(Color.BLACK); + } + + /** + * Action listener for the raw file browse button. + * Opens a file chooser dialog. + */ + private class BrowseRawActionListener implements ActionListener { + @Override + public void actionPerformed(ActionEvent e) { + JFileChooser fileChooser = new JFileChooser(); + fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); + fileChooser.setDialogTitle("Select Halo 3 raw file"); + + // set file filter for Xbox file formats + fileChooser.addChoosableFileFilter(new javax.swing.filechooser.FileFilter() { + @Override + public boolean accept(File f) { + if (f.isDirectory()) return true; + String name = f.getName().toLowerCase(); + return name.endsWith(".dds") || name.endsWith(".tga") || + name.endsWith(".xds") || name.endsWith(".dat") || + name.endsWith(".bin"); + } + + @Override + public String getDescription() { + return "Xbox files (*.dds, *.tga, *.xds, *.dat, *.bin)"; + } + }); + + int result = fileChooser.showOpenDialog(GraphicalUI.this); + if (result == JFileChooser.APPROVE_OPTION) { + File selectedFile = fileChooser.getSelectedFile(); + rawFileField.setText(selectedFile.getAbsolutePath()); + resetStatusColor(); + setStatus("Selected: " + selectedFile.getName()); + } + } + } + + /** + * Action listener for the save destination directory browse button. + * Opens a directory chooser dialog. + */ + private class BrowseSaveActionListener implements ActionListener { + @Override + public void actionPerformed(ActionEvent e) { + JFileChooser fileChooser = new JFileChooser(); + fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + fileChooser.setDialogTitle("Select save directory"); + + int result = fileChooser.showSaveDialog(GraphicalUI.this); + if (result == JFileChooser.APPROVE_OPTION) { + File selectedDir = fileChooser.getSelectedFile(); + saveDestinationField.setText(selectedDir.getAbsolutePath()); + resetStatusColor(); + setStatus("Output directory: " + selectedDir.getName()); + } + } + } + + /** + * Action listener for the button. + * Validates input paths and initiates the file extraction process + * in a background thread to keep the GUI responsive. + * + * NOTE: chatbot helped with this... + */ + private class ReclaimActionListener implements ActionListener { + @Override + public void actionPerformed(ActionEvent e) { + String rawPath = rawFileField.getText().trim(); + String savePath = saveDestinationField.getText().trim(); + + if (rawPath.isEmpty()) { + setErrorStatus(ErrorHandler.NEED_SELECTION); + return; + } + + if (savePath.isEmpty()) { + setErrorStatus(ErrorHandler.NEED_SELECTION); + return; + } + + File rawFile = new File(rawPath); + File saveDir = new File(savePath); + + if (!rawFile.exists()) { + setErrorStatus(ErrorHandler.BAD_INPUT); + return; + } + + if (!saveDir.exists() || !saveDir.isDirectory()) { + setErrorStatus(ErrorHandler.BAD_OUTPUT); + return; + } + + reclaimButton.setEnabled(false); + reclaimButton.setText("Processing..."); + resetStatusColor(); + setStatus("Processing file..."); + + SwingWorker worker = new SwingWorker() { + @Override + protected Void doInBackground() throws Exception { + try { + Arbiter.processFile(rawFile, saveDir); + } catch (Exception ex) { + SwingUtilities.invokeLater(() -> { + setErrorStatus("Extraction failed: " + ex.getMessage()); + }); + throw ex; + } + return null; + } + + @Override + protected void done() { + reclaimButton.setEnabled(true); + reclaimButton.setText("PELICAN!"); + + try { + get(); // Check if any exception occurred + + String baseName = rawFile.getName(); + int dotIndex = baseName.lastIndexOf('.'); + if (dotIndex > 0) { + baseName = baseName.substring(0, dotIndex); + } + String outputFileName = baseName + "-reclaimed.jpg"; + + setSuccessStatus("Success! Saved as: " + outputFileName); + } catch (Exception ex) { } + } + }; + + worker.execute(); + } + } +} \ No newline at end of file diff --git a/src/Main.java b/src/Main.java new file mode 100644 index 0000000..58f68f3 --- /dev/null +++ b/src/Main.java @@ -0,0 +1,53 @@ +/* +* Halo 3 Reclaimer [Main.java] +* player data extractor from Xbox 360 version of Halo 3 +* copyright 2025, David Polakovic, licensed under GPLv3 +* contact: email@dpolakovic.space +*/ + +/** +* Main entry point for the program. +* +*

This class handles command line argument processing +* and routes execution to either the GUI or TUI.

+* +* @version 1.0 +*/ + +public class Main { + + public static void main(String[] args) { + + if (args.length > 3) { + TerminalUI.showTooManyArguments(); + System.exit(1); + } + + if (args.length > 0) { + switch (args[0]) { + case "-h": + case "--help": + TerminalUI.showHelp(); + break; + + case "-v": + case "--version": + TerminalUI.showVersion(); + break; + + case "-f": + case "--file": + TerminalUI.processFile(args); + break; + + default: + TerminalUI.showUnknownCommand(args[0]); + break; + } + } + + if (args.length == 0) { + GraphicalUI.main(); + } + } +} \ No newline at end of file diff --git a/src/MapReclaimer.java b/src/MapReclaimer.java new file mode 100644 index 0000000..c95c256 --- /dev/null +++ b/src/MapReclaimer.java @@ -0,0 +1,24 @@ +/* +* Halo 3 Reclaimer [MapReclaimer.java] +* player data extractor from Xbox 360 version of Halo 3 +* copyright 2025, David Polakovic, licensed under GPLv3 +* contact: email@dpolakovic.space +*/ + +import java.io.File; + +/** +* Core extraction engine for Forge map variants. +* +*

This is harder than it looks. WIP.

+* +* @version "1.0" +*/ + +public class MapReclaimer { + + + public void extractMap(File inputFile, File outputDir) throws Exception { + throw ErrorHandler.makeException(ErrorHandler.NOT_READY); + } +} \ No newline at end of file diff --git a/src/ScreenshotReclaimer.java b/src/ScreenshotReclaimer.java new file mode 100644 index 0000000..18b8428 --- /dev/null +++ b/src/ScreenshotReclaimer.java @@ -0,0 +1,709 @@ +/* +* Halo 3 Reclaimer [ScreenshotReclaimer.java] +* player data extractor from Xbox 360 version of Halo 3 +* copyright 2025, David Polakovic, licensed under GPLv3 +* contact: email@dpolakovic.space +*/ + +import javax.imageio.ImageIO; +import java.awt.image.BufferedImage; +import java.io.*; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +/** +* Core extraction engine for screenshots. +* +*

This class extracts image data from Xbox 360 screenshot files, +* which are stored in STFS (Secure Transacted File System) format.

+* +*

Supported input formats:

+*
    +*
  • STFS container files (CON, LIVE, PIRS)
  • +*
  • DDS (DirectDraw Surface) files
  • +*
  • TGA (Targa) files
  • +*
  • Raw Xbox 360 texture data
  • +*
+* +*

Supported pixel formats:

+*
    +*
  • A8R8G8B8 (32-bit ARGB)
  • +*
  • X8R8G8B8 (32-bit RGB)
  • +*
  • RGB565 (16-bit RGB)
  • +*
  • Standard RGBA and RGB formats
  • +*
+* +* @version 1.0 +*/ + +public class ScreenshotReclaimer { + + // common Xbox 360 screenshot dimensions for Halo 3 + private static final int HALO3_SCREENSHOT_WIDTH = 1280; + private static final int HALO3_SCREENSHOT_HEIGHT = 720; + + // DDS format constants + private static final int DDS_MAGIC = 0x20534444; // "DDS " + private static final int DDS_HEADER_SIZE = 124; + private static final int DDS_PIXELFORMAT_SIZE = 32; + + // DXT compression formats + private static final int FOURCC_DXT1 = 0x31545844; + private static final int FOURCC_DXT3 = 0x33545844; + private static final int FOURCC_DXT5 = 0x35545844; + + // STFS format constants + private static final int STFS_MAGIC_CON = 0x434F4E20; // "CON " + private static final int STFS_MAGIC_LIVE = 0x4C495645; // "LIVE" + private static final int STFS_MAGIC_PIRS = 0x50495253; // "PIRS" + + /** + * Extracts a screenshot from an Xbox 360 file and saves it as a JPEG. + * + * @throws Exception if the file cannot be read, parsed, or converted + */ + public void extractScreenshot(File inputFile, File outputDir) throws Exception { + byte[] fileData = readFile(inputFile); + + System.out.println("File size: " + fileData.length + " bytes"); + + if (fileData.length < 4) { + throw ErrorHandler.makeException(ErrorHandler.CANT_PROCESS); + } + + // print first 16 bytes as hex for debugging + System.out.print("File header: "); + for (int i = 0; i < Math.min(16, fileData.length); i++) { + System.out.printf("%02X ", fileData[i] & 0xFF); + } + System.out.println(); + + BufferedImage image = null; + + // try to detect and parse different formats + if (isSTFSFile(fileData)) { + System.out.println("Detected STFS file format"); + image = extractFromSTFS(fileData); + } else if (isDDSFile(fileData)) { + System.out.println("Detected DDS file format"); + image = extractFromDDS(fileData); + } else if (isTGAFile(fileData)) { + System.out.println("Detected TGA file format"); + image = extractFromTGA(fileData); + } else { + System.out.println("Unknown format, trying raw Xbox texture extraction"); + // try as raw Xbox texture data + image = extractFromRawXboxTexture(fileData); + } + + if (image == null) { + throw ErrorHandler.makeException(ErrorHandler.CANT_PROCESS); + } + + System.out.println("Successfully extracted image: " + image.getWidth() + "x" + image.getHeight()); + + // generate output filename + String baseName = inputFile.getName(); + int dotIndex = baseName.lastIndexOf('.'); + if (dotIndex > 0) { + baseName = baseName.substring(0, dotIndex); + } + String outputFileName = baseName + "-reclaimed.jpg"; + File outputFile = new File(outputDir, outputFileName); + + if (!ImageIO.write(image, "jpg", outputFile)) { + throw ErrorHandler.makeException(ErrorHandler.CANT_PROCESS); + } + } + + /** + * Reads the entire contents of a file into a byte array. + */ + private byte[] readFile(File file) throws IOException { + try (FileInputStream fis = new FileInputStream(file)) { + byte[] data = new byte[(int) file.length()]; + int bytesRead = fis.read(data); + if (bytesRead != data.length) { + throw new IOException(ErrorHandler.CANT_PROCESS + ": Could not read entire file"); + } + return data; + } + } + + private boolean isSTFSFile(byte[] data) { + if (data.length < 4) return false; + ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.BIG_ENDIAN); + int magic = buffer.getInt(0); + return magic == STFS_MAGIC_CON || magic == STFS_MAGIC_LIVE || magic == STFS_MAGIC_PIRS; + } + + private boolean isDDSFile(byte[] data) { + if (data.length < 4) return false; + ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); + return buffer.getInt(0) == DDS_MAGIC; + } + + private boolean isTGAFile(byte[] data) { + if (data.length < 18) return false; + // the TGA files don't have a magic number, but we can check the header structure + int imageType = data[2] & 0xFF; + return imageType == 2 || imageType == 3 || imageType == 10; // Uncompressed or RLE RGB/Grayscale + } + + private BufferedImage extractFromSTFS(byte[] data) throws Exception { + ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.BIG_ENDIAN); + + // read STFS header + int magic = buffer.getInt(0); + + // STFS files have a complex structure, but for Halo 3 screenshots + // there are shortcuts - the actual image data is usually stored + // after the STFS metadata + // first, look for JPEG data (most common for screenshots) + BufferedImage jpegImage = findAndExtractJPEG(data); + if (jpegImage != null) { + return jpegImage; + } + + // if no JPEG found, try to extract from known STFS data areas + // STFS files have metadata followed by data blocks + // for screenshots, image data typically starts around offset 0xB000 or later + int[] commonOffsets = { + 0xA000, 0xB000, 0xC000, 0xD000, 0xE000, 0xF000, 0x10000, + 0x11000, 0x12000, 0x13000, 0x14000, 0x15000, 0x16000, + 0x8000, 0x9000 // Some files have earlier offsets + }; + + // try extracting raw image data from these offsets + for (int offset : commonOffsets) { + if (offset >= data.length) continue; + + // Try different formats at each offset + BufferedImage image = tryExtractFromOffset(data, offset); + if (image != null) { + return image; + } + } + + // last resort: scan through the entire file looking for image patterns + return scanForImageData(data); + } + + private BufferedImage findAndExtractJPEG(byte[] data) { + // look for JPEG magic bytes (0xFF 0xD8) + for (int i = 0; i < data.length - 10; i++) { + if ((data[i] & 0xFF) == 0xFF && (data[i + 1] & 0xFF) == 0xD8) { + // potential JPEG start, look for end marker + int jpegEnd = findJPEGEnd(data, i); + if (jpegEnd > i + 100) { // at least 100 bytes for a valid JPEG + try { + byte[] jpegData = new byte[jpegEnd - i]; + System.arraycopy(data, i, jpegData, 0, jpegData.length); + + ByteArrayInputStream bais = new ByteArrayInputStream(jpegData); + BufferedImage image = ImageIO.read(bais); + if (image != null && isReasonableImage(image)) { + return image; + } + } catch (Exception e) { + // continue searching + } + } + } + } + return null; + } + + private BufferedImage tryExtractFromOffset(byte[] data, int offset) { + if (offset >= data.length - 1000) return null; // Need at least 1KB of data + + // common Halo 3 screenshot resolutions (deps on TV and cable used) + int[][] resolutions = { + {1280, 720}, // HD resolution + {1024, 768}, // 4:3 aspect ratio + {800, 600}, // lower quality + {640, 480}, // lowest quality + {1152, 648}, // found this ratio also + {960, 540} // half HD??? + }; + + for (int[] res : resolutions) { + int width = res[0]; + int height = res[1]; + + // try different pixel formats + BufferedImage image; + + // 1. try A8R8G8B8 (most common Xbox 360 format) + image = tryExtractARGB32(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + + // 2. try RGB565 (compressed format) + image = tryExtractRGB565(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + + // 3. try standard RGBA + image = tryExtractRawRGBA(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + + // 4. try 24-bit RGB + image = tryExtractRawRGB(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + + // 5. try X8R8G8B8 (no alpha) + image = tryExtractXRGB32(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + } + + return null; + } + + private BufferedImage scanForImageData(byte[] data) { + // scan through the file in 4KB chunks looking for potential image data + int chunkSize = 4096; + + for (int offset = 0; offset < data.length - chunkSize; offset += 1024) { + BufferedImage image = tryExtractFromOffset(data, offset); + if (image != null) { + return image; + } + } + + return null; + } + + private int findJPEGEnd(byte[] data, int start) { + for (int i = start + 2; i < data.length - 1; i++) { + if ((data[i] & 0xFF) == 0xFF && (data[i + 1] & 0xFF) == 0xD9) { + return i + 2; // to include the end marker + } + } + return -1; + } + + private BufferedImage extractFromDDS(byte[] data) throws Exception { + ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); + + // skip DDS magic + buffer.getInt(); + + // read DDS header + int headerSize = buffer.getInt(); + if (headerSize != DDS_HEADER_SIZE) { + throw ErrorHandler.makeException(ErrorHandler.CANT_PROCESS); + } + + int flags = buffer.getInt(); + int height = buffer.getInt(); + int width = buffer.getInt(); + int pitchOrLinearSize = buffer.getInt(); + int depth = buffer.getInt(); + int mipMapCount = buffer.getInt(); + + // skip reserved fields + for (int i = 0; i < 11; i++) { + buffer.getInt(); + } + + // read pixel format + int pfSize = buffer.getInt(); + int pfFlags = buffer.getInt(); + int pfFourCC = buffer.getInt(); + int pfRGBBitCount = buffer.getInt(); + int pfRBitMask = buffer.getInt(); + int pfGBitMask = buffer.getInt(); + int pfBBitMask = buffer.getInt(); + int pfABitMask = buffer.getInt(); + + // skip remaining header + buffer.getInt(); // caps + buffer.getInt(); // caps2 + buffer.getInt(); // caps3 + buffer.getInt(); // caps4 + buffer.getInt(); // reserved2 + + // extract image data based on format + if (pfFourCC == FOURCC_DXT1 || pfFourCC == FOURCC_DXT3 || pfFourCC == FOURCC_DXT5) { + return extractDXTCompressed(buffer, width, height, pfFourCC); + } else if (pfRGBBitCount == 32) { + return extractRGBA32(buffer, width, height, pfRBitMask, pfGBitMask, pfBBitMask, pfABitMask); + } else if (pfRGBBitCount == 24) { + return extractRGB24(buffer, width, height); + } + + throw ErrorHandler.makeException(ErrorHandler.CANT_PROCESS); + } + + private BufferedImage extractFromTGA(byte[] data) throws Exception { + ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); + + // read TGA header + int idLength = buffer.get() & 0xFF; + int colorMapType = buffer.get() & 0xFF; + int imageType = buffer.get() & 0xFF; + + // skip color map specification + buffer.getShort(); // first entry index + buffer.getShort(); // color map length + buffer.get(); // color map entry size + + // image specification + buffer.getShort(); // x origin + buffer.getShort(); // y origin + int width = buffer.getShort() & 0xFFFF; + int height = buffer.getShort() & 0xFFFF; + int pixelDepth = buffer.get() & 0xFF; + int imageDescriptor = buffer.get() & 0xFF; + + // skip image ID + if (idLength > 0) { + buffer.position(buffer.position() + idLength); + } + + if (imageType == 2) { // uncompressed RGB + if (pixelDepth == 24) { + return extractTGARGB24(buffer, width, height); + } else if (pixelDepth == 32) { + return extractTGARGBA32(buffer, width, height); + } + } + + throw ErrorHandler.makeException(ErrorHandler.CANT_PROCESS); + } + + private BufferedImage extractFromRawXboxTexture(byte[] data) throws Exception { + // Xbox 360 specific texture formats and common Halo 3 screenshot locations + + // try common Xbox 360 texture formats and dimensions + int[][] resolutions = { + {1280, 720}, {1024, 768}, {800, 600}, {640, 480}, {1920, 1080} + }; + + // Xbox 360 files often have specific header sizes + int[] headerOffsets = {0, 128, 256, 512, 1024, 2048, 4096, 0xB000, 0x10000}; + + for (int[] res : resolutions) { + int width = res[0]; + int height = res[1]; + + for (int offset : headerOffsets) { + // try different Xbox 360 pixel formats + + // try A8R8G8B8 (common Xbox 360 format) + if (data.length >= offset + width * height * 4) { + BufferedImage image = tryExtractARGB32(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + } + + // try standard RGBA + if (data.length >= offset + width * height * 4) { + BufferedImage image = tryExtractRawRGBA(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + } + + // try RGB565 (16-bit format) + if (data.length >= offset + width * height * 2) { + BufferedImage image = tryExtractRGB565(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + } + + // try 24-bit RGB + if (data.length >= offset + width * height * 3) { + BufferedImage image = tryExtractRawRGB(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + } + + // try X8R8G8B8 (no alpha) + if (data.length >= offset + width * height * 4) { + BufferedImage image = tryExtractXRGB32(data, width, height, offset); + if (image != null && isReasonableImage(image)) return image; + } + } + } + + return null; + } + + private BufferedImage tryExtractRawRGBA(byte[] data, int width, int height, int offset) { + try { + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + ByteBuffer buffer = ByteBuffer.wrap(data, offset, width * height * 4).order(ByteOrder.LITTLE_ENDIAN); + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + int b = buffer.get() & 0xFF; + int g = buffer.get() & 0xFF; + int r = buffer.get() & 0xFF; + int a = buffer.get() & 0xFF; + + int argb = (a << 24) | (r << 16) | (g << 8) | b; + image.setRGB(x, y, argb); + } + } + + // check if the image contains reasonable data (not all black or all white) + if (isReasonableImage(image)) { + return image; + } + } catch (Exception e) { + // ignore and try next format... + } + return null; + } + + private BufferedImage tryExtractRawRGB(byte[] data, int width, int height, int offset) { + try { + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + ByteBuffer buffer = ByteBuffer.wrap(data, offset, width * height * 3).order(ByteOrder.LITTLE_ENDIAN); + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + int b = buffer.get() & 0xFF; + int g = buffer.get() & 0xFF; + int r = buffer.get() & 0xFF; + + int rgb = (r << 16) | (g << 8) | b; + image.setRGB(x, y, rgb); + } + } + + if (isReasonableImage(image)) { + return image; + } + } catch (Exception e) { + // ignore and try next format... + } + return null; + } + + private BufferedImage tryExtractARGB32(byte[] data, int width, int height, int offset) { + try { + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + ByteBuffer buffer = ByteBuffer.wrap(data, offset, width * height * 4).order(ByteOrder.LITTLE_ENDIAN); + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + int pixel = buffer.getInt(); + // Xbox 360 A8R8G8B8 format: AARRGGBB + int a = (pixel >>> 24) & 0xFF; + int r = (pixel >>> 16) & 0xFF; + int g = (pixel >>> 8) & 0xFF; + int b = pixel & 0xFF; + + int argb = (a << 24) | (r << 16) | (g << 8) | b; + image.setRGB(x, y, argb); + } + } + + return isReasonableImage(image) ? image : null; + } catch (Exception e) { + return null; + } + } + + private BufferedImage tryExtractXRGB32(byte[] data, int width, int height, int offset) { + try { + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + ByteBuffer buffer = ByteBuffer.wrap(data, offset, width * height * 4).order(ByteOrder.LITTLE_ENDIAN); + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + int pixel = buffer.getInt(); + // Xbox 360 X8R8G8B8 format: XXRRGGBB (ignore X) + int r = (pixel >>> 16) & 0xFF; + int g = (pixel >>> 8) & 0xFF; + int b = pixel & 0xFF; + + int rgb = (r << 16) | (g << 8) | b; + image.setRGB(x, y, rgb); + } + } + + return isReasonableImage(image) ? image : null; + } catch (Exception e) { + return null; + } + } + + private BufferedImage tryExtractRGB565(byte[] data, int width, int height, int offset) { + try { + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + ByteBuffer buffer = ByteBuffer.wrap(data, offset, width * height * 2).order(ByteOrder.LITTLE_ENDIAN); + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + int pixel = buffer.getShort() & 0xFFFF; + + // extract RGB565 + int r = ((pixel >> 11) & 0x1F) * 255 / 31; + int g = ((pixel >> 5) & 0x3F) * 255 / 63; + int b = (pixel & 0x1F) * 255 / 31; + + int rgb = (r << 16) | (g << 8) | b; + image.setRGB(x, y, rgb); + } + } + + if (isReasonableImage(image)) { + return image; + } + } catch (Exception e) { + // ignore and try next format... + } + return null; + } + + private BufferedImage extractRGBA32(ByteBuffer buffer, int width, int height, + int rMask, int gMask, int bMask, int aMask) { + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + int pixel = buffer.getInt(); + + int r = extractMaskedValue(pixel, rMask); + int g = extractMaskedValue(pixel, gMask); + int b = extractMaskedValue(pixel, bMask); + int a = aMask != 0 ? extractMaskedValue(pixel, aMask) : 255; + + int argb = (a << 24) | (r << 16) | (g << 8) | b; + image.setRGB(x, y, argb); + } + } + + return image; + } + + private BufferedImage extractRGB24(ByteBuffer buffer, int width, int height) { + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + + for (int y = 0; y < height; y++) { + for (int x = 0; x < width; x++) { + int b = buffer.get() & 0xFF; + int g = buffer.get() & 0xFF; + int r = buffer.get() & 0xFF; + + int rgb = (r << 16) | (g << 8) | b; + image.setRGB(x, y, rgb); + } + } + + return image; + } + + private BufferedImage extractTGARGB24(ByteBuffer buffer, int width, int height) { + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); + + for (int y = height - 1; y >= 0; y--) { // TGA is bottom-up + for (int x = 0; x < width; x++) { + int b = buffer.get() & 0xFF; + int g = buffer.get() & 0xFF; + int r = buffer.get() & 0xFF; + + int rgb = (r << 16) | (g << 8) | b; + image.setRGB(x, y, rgb); + } + } + + return image; + } + + private BufferedImage extractTGARGBA32(ByteBuffer buffer, int width, int height) { + BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + + for (int y = height - 1; y >= 0; y--) { // TGA is bottom-up + for (int x = 0; x < width; x++) { + int b = buffer.get() & 0xFF; + int g = buffer.get() & 0xFF; + int r = buffer.get() & 0xFF; + int a = buffer.get() & 0xFF; + + int argb = (a << 24) | (r << 16) | (g << 8) | b; + image.setRGB(x, y, argb); + } + } + + return image; + } + + private BufferedImage extractDXTCompressed(ByteBuffer buffer, int width, int height, int fourcc) { + // simplified DXT decompression - this is a basic implementation + // no DXT decoder + throw new RuntimeException(ErrorHandler.CANT_PROCESS + ": DXT compression not yet implemented. Please use uncompressed formats."); + } + + private int extractMaskedValue(int pixel, int mask) { + if (mask == 0) return 0; + + int value = pixel & mask; + int shift = Integer.numberOfTrailingZeros(mask); + value >>= shift; + + int bitCount = Integer.bitCount(mask); + if (bitCount < 8) { + // scale to 8-bit + value = (value * 255) / ((1 << bitCount) - 1); + } + + return value; + } + + private boolean isReasonableImage(BufferedImage image) { + if (image == null) return false; + + int width = image.getWidth(); + int height = image.getHeight(); + + // check for reasonable screenshot dimensions, again + if (width < 320 || height < 240 || width > 1920 || height > 1080) { + return false; + } + + // sample pixels across the image to check for variety + int sampleCount = Math.min(200, width * height / 100); + int uniqueColors = 0; + int totalSampled = 0; + int[] seenColors = new int[sampleCount]; + + int stepX = Math.max(1, width / 20); + int stepY = Math.max(1, height / 20); + + for (int y = 0; y < height && totalSampled < sampleCount; y += stepY) { + for (int x = 0; x < width && totalSampled < sampleCount; x += stepX) { + int rgb = image.getRGB(x, y) & 0xFFFFFF; // remove alpha + + // check if this color is unique + boolean isUnique = true; + for (int i = 0; i < uniqueColors; i++) { + if (seenColors[i] == rgb) { + isUnique = false; + break; + } + } + + if (isUnique && uniqueColors < sampleCount) { + seenColors[uniqueColors++] = rgb; + } + + totalSampled++; + } + } + + // check color variety - should have at least 10 different colors for a real screenshot + if (uniqueColors < 10) { + return false; + } + + // check that it's not all black or all white + boolean hasNonBlack = false; + boolean hasNonWhite = false; + + for (int i = 0; i < uniqueColors; i++) { + int color = seenColors[i]; + if (color != 0x000000) hasNonBlack = true; + if (color != 0xFFFFFF) hasNonWhite = true; + } + + return hasNonBlack && hasNonWhite; + } +} \ No newline at end of file diff --git a/src/TerminalUI.java b/src/TerminalUI.java new file mode 100644 index 0000000..c6c2205 --- /dev/null +++ b/src/TerminalUI.java @@ -0,0 +1,127 @@ +/* +* Halo 3 Reclaimer [TerminalUI.java] +* player data extractor from Xbox 360 version of Halo 3 +* copyright 2025, David Polakovic, licensed under GPLv3 +* contact: email@dpolakovic.space +*/ + +import java.io.File; + +/** +* Terminal User Interface for Halo 3 Reclaimer. +* +*

This class contains all the command-line interface logic.

+* +* @version 1.0 +*/ +public class TerminalUI { + + public static void showVersion() { + System.out.println("Halo 3 Reclaimer"); + System.out.println("Version: 1.0"); + System.out.println("player data extractor from Xbox 360 version of Halo 3"); + System.out.println("copyright 2025, David Polakovic, licensed under GPLv3"); + } + + + public static void showHelp() { + System.out.println("Halo 3 Reclaimer"); + System.out.println("Usage:"); + System.out.println(" GUI Mode:"); + System.out.println(" java -jar halo3-reclaimer.jar"); + System.out.println(""); + System.out.println(" Command Line Mode:"); + System.out.println(" java -jar halo3-reclaimer.jar [output]"); + System.out.println(""); + System.out.println(" Commands:"); + System.out.println(" -f, --file Process file (auto-detects screenshot or map)"); + System.out.println(" -v, --version Show version information"); + System.out.println(" -h, --help Show this help message"); + System.out.println(""); + System.out.println(" Examples:"); + System.out.println(" java -jar halo3-reclaimer.jar -f /path/to/screenshot_file"); + System.out.println(" java -jar halo3-reclaimer.jar --file /path/to/map_variant /output/dir"); + System.out.println(" java -jar halo3-reclaimer.jar --version"); + } + + /** + * processes file extraction from command line. + */ + public static void processFile(String[] args) { + if (args.length < 2) { + ErrorHandler.exitWithError(ErrorHandler.BAD_INPUT); + } + + String inputPath = args[1]; + String outputPath = null; + + // check if output path is provided + if (args.length == 3) { + outputPath = args[2]; + } + + File inputFile = new File(inputPath); + if (!inputFile.exists()) { + ErrorHandler.exitWithError(ErrorHandler.BAD_INPUT, inputPath); + } + + File outputDir; + if (outputPath != null) { + outputDir = new File(outputPath); + if (!outputDir.exists()) { + if (!outputDir.mkdirs()) { + ErrorHandler.exitWithError(ErrorHandler.BAD_OUTPUT, outputPath); + } + } + if (!outputDir.isDirectory()) { + ErrorHandler.exitWithError(ErrorHandler.BAD_OUTPUT, outputPath); + } + } else { + // use same directory as the input file if not stated otherwise + outputDir = inputFile.getParentFile(); + if (outputDir == null) { + outputDir = new File("."); + } + } + + try { + System.out.println("Processing file: " + inputFile.getName()); + + String fileType = Arbiter.getFileTypeDescription(inputFile); + if (!fileType.equals("Unrecognized file")) { + System.out.println("Detected as: " + fileType); + } + + // use Arbiter to process the file + Arbiter.processFile(inputFile, outputDir); + + String baseName = inputFile.getName(); + int dotIndex = baseName.lastIndexOf('.'); + if (dotIndex > 0) { + baseName = baseName.substring(0, dotIndex); + } + String outputFileName = baseName + "-reclaimed.jpg"; + File outputFile = new File(outputDir, outputFileName); + + System.out.println("File successfully processed to: " + outputFile.getAbsolutePath()); + + } catch (Exception e) { + // parse error code from exception message if it starts with a number + String message = e.getMessage(); + if (message != null && message.matches("^\\d+:.*")) { + System.err.println("Error " + message); + } else { + System.err.println("Error: " + message); + } + System.exit(1); + } + } + + public static void showUnknownCommand(String command) { + ErrorHandler.exitWithError(ErrorHandler.UNKNOWN_COMMAND, command); + } + + public static void showTooManyArguments() { + ErrorHandler.exitWithError(ErrorHandler.TOO_MANY_ARGS); + } +} \ No newline at end of file diff --git a/src/mc.png b/src/mc.png new file mode 100644 index 0000000..a9e4591 Binary files /dev/null and b/src/mc.png differ