diff --git a/.gitignore b/.gitignore
index 6eb3cc0..55c74b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,12 +1,25 @@
-/build/
-/data/dlls/
-/data/fastfiles/
-
-# Ignore Qt Creator user files
-*.pro.user
-*.pro.user.*
-*.qbs.user
-*.qbs.user.*
-*.creator.user
-*.creator.user.*
-*.creator.*
\ No newline at end of file
+/build/
+/data/dlls/
+/data/fastfiles/
+/releases/
+
+.vscode/*
+.qmake.stash
+
+# Ignore Qt Creator user files
+*.pro.user
+*.pro.user.*
+*.qbs.user
+*.qbs.user.*
+*.creator.user
+*.creator.user.*
+*.creator.*
+*.ps1
+version.txt
+*.autosave
+*.XMODEL_EXPORT
+data/obj/*
+libs/*/release/*
+libs/*/debug/*
+.git.stash
+*Makefile*
diff --git a/XPlor.pro b/XPlor.pro
index 4cf1c89..c8309ef 100644
--- a/XPlor.pro
+++ b/XPlor.pro
@@ -1,10 +1,10 @@
-TEMPLATE = subdirs
-
-SUBDIRS += libs \
- app \
- tools \
- tests
-
-tests.depends = libs
-app.depends = libs
-tools.depends = libs
+TEMPLATE = subdirs
+
+SUBDIRS += libs \
+ app \
+ #tools \
+ #tests
+
+#tests.depends = libs
+app.depends = libs
+#tools.depends = libs
diff --git a/XPlor.pro.user.40d992c b/XPlor.pro.user.40d992c
deleted file mode 100644
index 861b133..0000000
--- a/XPlor.pro.user.40d992c
+++ /dev/null
@@ -1,625 +0,0 @@
-
-
-
-
-
- EnvironmentId
- {40d992cb-ac11-4385-a22b-016f1b4251a7}
-
-
- ProjectExplorer.Project.ActiveTarget
- 0
-
-
- ProjectExplorer.Project.EditorSettings
-
- true
- false
- true
-
- Cpp
-
- CppGlobal
-
-
-
- QmlJS
-
- QmlJSGlobal
-
-
- 2
- UTF-8
- false
- 4
- false
- 0
- 80
- true
- true
- 1
- 0
- false
- true
- false
- 2
- true
- true
- 0
- 8
- true
- false
- 1
- true
- true
- true
- *.md, *.MD, Makefile
- false
- true
- true
-
-
-
- ProjectExplorer.Project.PluginSettings
-
-
- true
- false
- true
- true
- true
- true
-
- false
-
- Unchecked
-
-
- 0
- true
-
- true
- true
- Builtin.DefaultTidyAndClazy
- 16
- true
-
-
-
- true
-
-
- true
-
-
-
-
- ProjectExplorer.Project.Target.0
-
- Desktop
- Desktop Qt 6.8.2 MSVC2022 64bit
- Desktop Qt 6.8.2 MSVC2022 64bit
- qt.qt6.682.win64_msvc2022_64_kit
- 0
- 0
- 0
-
- 0
- G:\Projects\Qt\XPlor\build\Desktop_Qt_6_8_2_MSVC2022_64bit-Debug
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_2_MSVC2022_64bit-Debug
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- false
-
- Debug
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
-
-
- G:\Projects\Qt\XPlor\build\Desktop_Qt_6_8_2_MSVC2022_64bit-Release
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_2_MSVC2022_64bit-Release
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- false
-
- Release
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
-
-
- 0
- G:\Projects\Qt\XPlor\build\Desktop_Qt_6_8_2_MSVC2022_64bit-Profile
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_2_MSVC2022_64bit-Profile
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- false
-
- Profile
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
- 0
-
- 3
-
-
- 0
- Deploy
- Deploy
- ProjectExplorer.BuildSteps.Deploy
-
- 1
-
- false
- ProjectExplorer.DefaultDeployConfiguration
-
- 1
-
- true
- true
- 0
- true
-
- 2
-
- false
- -e cpu-cycles --call-graph "dwarf,4096" -F 250
-
- Qt4ProjectManager.Qt4RunConfiguration:
- G:/Projects/Qt/XPlor/app/app.pro
- false
- true
- true
- true
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_2_MSVC2022_64bit-Debug/app
-
-
- true
- true
- 0
- true
-
- 2
-
- false
- -e cpu-cycles --call-graph "dwarf,4096" -F 250
-
- Qt4ProjectManager.Qt4RunConfiguration:
- G:/Projects/Qt/XPlor/tests/tests.pro
- false
- true
- true
- true
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_2_MSVC2022_64bit-Debug/tests
-
- 2
-
-
-
- ProjectExplorer.Project.Target.1
-
- Desktop
- Desktop Qt 6.8.2 llvm-mingw 64-bit
- Desktop Qt 6.8.2 llvm-mingw 64-bit
- qt.qt6.682.win64_llvm_mingw_kit
- 0
- 0
- 1
-
- 0
- G:\Projects\Qt\XPlor\build\Desktop_Qt_6_8_2_llvm_mingw_64_bit-Debug
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_2_llvm_mingw_64_bit-Debug
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- false
-
- Debug
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
-
-
- G:\Projects\Qt\XPlor\build\Desktop_Qt_6_8_2_llvm_mingw_64_bit-Release
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_2_llvm_mingw_64_bit-Release
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- false
-
- Release
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
-
-
- 0
- G:\Projects\Qt\XPlor\build\Desktop_Qt_6_8_2_llvm_mingw_64_bit-Profile
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_2_llvm_mingw_64_bit-Profile
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- false
-
- Profile
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
- 0
-
- 3
-
-
- 0
- Deploy
- Deploy
- ProjectExplorer.BuildSteps.Deploy
-
- 1
-
- false
- ProjectExplorer.DefaultDeployConfiguration
-
- 1
-
- true
- true
- 0
- true
-
- 2
-
- false
- -e cpu-cycles --call-graph "dwarf,4096" -F 250
-
- Qt4ProjectManager.Qt4RunConfiguration:
- G:/Projects/Qt/XPlor/app/app.pro
- false
- true
- true
- true
-
-
- true
- true
- 0
- true
-
- 2
-
- false
- -e cpu-cycles --call-graph "dwarf,4096" -F 250
-
- Qt4ProjectManager.Qt4RunConfiguration:
- G:/Projects/Qt/XPlor/tests/tests.pro
- false
- true
- true
- true
-
- 2
-
-
-
- ProjectExplorer.Project.Target.2
-
- Desktop
- Desktop Qt 6.8.1 MSVC2022 64bit
- Desktop Qt 6.8.1 MSVC2022 64bit
- qt.qt6.681.win64_msvc2022_64_kit
- 0
- 0
- 0
-
- 0
- G:\Projects\Qt\XPlor\build\Desktop_Qt_6_8_1_MSVC2022_64bit-Debug
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_1_MSVC2022_64bit-Debug
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- false
-
- Debug
- Qt4ProjectManager.Qt4BuildConfiguration
- 2
-
-
- G:\Projects\Qt\XPlor\build\Desktop_Qt_6_8_1_MSVC2022_64bit-Release
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_1_MSVC2022_64bit-Release
-
-
- true
- QtProjectManager.QMakeBuildStep
- false
-
-
-
- true
- Qt4ProjectManager.MakeStep
-
- 2
- Build
- Build
- ProjectExplorer.BuildSteps.Build
-
-
-
- true
- Qt4ProjectManager.MakeStep
- clean
-
- 1
- Clean
- Clean
- ProjectExplorer.BuildSteps.Clean
-
- 2
- false
-
- false
-
- Release
- Qt4ProjectManager.Qt4BuildConfiguration
- 0
- 0
-
- 2
-
-
- 0
- Deploy
- Deploy
- ProjectExplorer.BuildSteps.Deploy
-
- 1
-
- false
- ProjectExplorer.DefaultDeployConfiguration
-
- 1
-
- true
- true
- 0
- true
-
- 2
-
- false
- -e cpu-cycles --call-graph "dwarf,4096" -F 250
-
- Qt4ProjectManager.Qt4RunConfiguration:
- G:/Projects/Qt/XPlor/app/app.pro
- false
- true
- true
- true
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_1_MSVC2022_64bit-Debug/app
-
-
- true
- true
- 0
- true
-
- 2
-
- false
- -e cpu-cycles --call-graph "dwarf,4096" -F 250
-
- Qt4ProjectManager.Qt4RunConfiguration:
- G:/Projects/Qt/XPlor/tests/tests.pro
- false
- true
- true
- true
- G:/Projects/Qt/XPlor/build/Desktop_Qt_6_8_1_MSVC2022_64bit-Debug/tests
-
- 2
-
-
-
- ProjectExplorer.Project.TargetCount
- 3
-
-
- ProjectExplorer.Project.Updater.FileVersion
- 22
-
-
- Version
- 22
-
-
diff --git a/ai-commit.sh b/ai-commit.sh
new file mode 100644
index 0000000..de7a0dc
--- /dev/null
+++ b/ai-commit.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+set -e
+
+# 1. Stage everything
+git add -A
+
+# 2. Get list of staged files
+FILES=$(git diff --cached --name-only)
+
+if [ -z "$FILES" ]; then
+ echo "No changes to commit."
+ exit 0
+fi
+
+# 3. Loop file by file
+for FILE in $FILES; do
+ # Get diff for this file
+ DIFF=$(git diff --cached -- "$FILE")
+
+ if [ -z "$DIFF" ]; then
+ continue
+ fi
+
+ # Ask Ollama for a commit message describing this file change
+ MSG=$(echo "$DIFF" | ollama run gemma3 \
+ "You are a commit bot. Write a SHORT, clear, concise Git commit message for changes in file: $FILE.
+Only output the commit message, nothing else.
+Diff:
+$DIFF")
+
+ # Commit just this file with its message
+ git commit -m "$MSG" -- "$FILE"
+
+ echo "âś… Committed $FILE with message:"
+ echo "$MSG"
+done
diff --git a/app/LICENSE b/app/LICENSE
index 261eeb9..29f81d8 100644
--- a/app/LICENSE
+++ b/app/LICENSE
@@ -1,201 +1,201 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/app/aboutdialog.cpp b/app/aboutdialog.cpp
index c3ba1b4..66b7c67 100644
--- a/app/aboutdialog.cpp
+++ b/app/aboutdialog.cpp
@@ -1,14 +1,14 @@
-#include "aboutdialog.h"
-#include "ui_aboutdialog.h"
-
-AboutDialog::AboutDialog(QWidget *parent)
- : QDialog(parent)
- , ui(new Ui::AboutDialog)
-{
- ui->setupUi(this);
-}
-
-AboutDialog::~AboutDialog()
-{
- delete ui;
-}
+#include "aboutdialog.h"
+#include "ui_aboutdialog.h"
+
+AboutDialog::AboutDialog(QWidget *parent)
+ : QDialog(parent)
+ , ui(new Ui::AboutDialog)
+{
+ ui->setupUi(this);
+}
+
+AboutDialog::~AboutDialog()
+{
+ delete ui;
+}
diff --git a/app/aboutdialog.h b/app/aboutdialog.h
index 4474ece..2fa74dc 100644
--- a/app/aboutdialog.h
+++ b/app/aboutdialog.h
@@ -1,22 +1,22 @@
-#ifndef ABOUTDIALOG_H
-#define ABOUTDIALOG_H
-
-#include
-
-namespace Ui {
-class AboutDialog;
-}
-
-class AboutDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- explicit AboutDialog(QWidget *parent = nullptr);
- ~AboutDialog();
-
-private:
- Ui::AboutDialog *ui;
-};
-
-#endif // ABOUTDIALOG_H
+#ifndef ABOUTDIALOG_H
+#define ABOUTDIALOG_H
+
+#include
+
+namespace Ui {
+class AboutDialog;
+}
+
+class AboutDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit AboutDialog(QWidget *parent = nullptr);
+ ~AboutDialog();
+
+private:
+ Ui::AboutDialog *ui;
+};
+
+#endif // ABOUTDIALOG_H
diff --git a/app/aboutdialog.ui b/app/aboutdialog.ui
index 27665f5..a06c488 100644
--- a/app/aboutdialog.ui
+++ b/app/aboutdialog.ui
@@ -1,241 +1,241 @@
-
-
- AboutDialog
-
-
-
- 0
- 0
- 350
- 200
-
-
-
-
- 350
- 200
-
-
-
-
- 350
- 200
-
-
-
- About XPlor
-
-
- -
-
-
-
-
-
-
- 80
- 80
-
-
-
-
- 80
- 80
-
-
-
-
-
-
- :/images/data/images/XPlor.png
-
-
- true
-
-
- Qt::AlignmentFlag::AlignCenter
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- Roboto
- 16
- false
-
-
-
- XPlor v1.5
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- Roboto
-
-
-
- Copyright © 2024 RedLine Solutions LLC
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- Roboto
-
-
-
- For more, check out redline.llc
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
- QSizePolicy::Policy::Fixed
-
-
-
- 20
- 10
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- Roboto
-
-
-
- With Help From:
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- Roboto
-
-
-
- - Paging Red
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- Roboto
-
-
-
- - ISOCheated
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- Roboto
-
-
-
- - SureShotIan
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ AboutDialog
+
+
+
+ 0
+ 0
+ 350
+ 200
+
+
+
+
+ 350
+ 200
+
+
+
+
+ 350
+ 200
+
+
+
+ About XPlor
+
+
+ -
+
+
-
+
+
+
+ 80
+ 80
+
+
+
+
+ 80
+ 80
+
+
+
+
+
+
+ :/images/data/images/XPlor.png
+
+
+ true
+
+
+ Qt::AlignmentFlag::AlignCenter
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ Roboto
+ 16
+ false
+
+
+
+ XPlor v1.5
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ Roboto
+
+
+
+ Copyright © 2024 RedLine Solutions LLC
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ Roboto
+
+
+
+ For more, check out redline.llc
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+ QSizePolicy::Policy::Fixed
+
+
+
+ 20
+ 10
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ Roboto
+
+
+
+ With Help From:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ Roboto
+
+
+
+ - Paging Red
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ Roboto
+
+
+
+ - ISOCheated
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ Roboto
+
+
+
+ - SureShotIan
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/app.pro b/app/app.pro
index f10aa63..1cbef80 100644
--- a/app/app.pro
+++ b/app/app.pro
@@ -1,112 +1,61 @@
-QT += core widgets gui multimedia
-
-RC_ICONS = app.ico
-
-SUBDIRS += app
-
-CONFIG += c++17
-
-SOURCES += \
- aboutdialog.cpp \
- ddsviewer.cpp \
- fastfileviewer.cpp \
- imagewidget.cpp \
- iwiviewer.cpp \
- localstringviewer.cpp \
- main.cpp \
- mainwindow.cpp \
- materialviewer.cpp \
- preferenceeditor.cpp \
- soundviewer.cpp \
- stringtableviewer.cpp \
- techsetviewer.cpp \
- xtreewidget.cpp \
- xtreewidgetitem.cpp \
- zonefileviewer.cpp
-
-HEADERS += \
- aboutdialog.h \
- d3dbsp_structs.h \
- ddsviewer.h \
- fastfileviewer.h \
- imagewidget.h \
- iwiviewer.h \
- localstringviewer.h \
- mainwindow.h \
- materialviewer.h \
- preferenceeditor.h \
- soundviewer.h \
- stringtableviewer.h \
- techsetviewer.h \
- xtreewidget.h \
- xtreewidgetitem.h \
- zonefileviewer.h
-
-FORMS += \
- aboutdialog.ui \
- ddsviewer.ui \
- fastfileviewer.ui \
- imagewidget.ui \
- iwiviewer.ui \
- localstringviewer.ui \
- mainwindow.ui \
- materialviewer.ui \
- modelviewer.ui \
- preferenceeditor.ui \
- soundviewer.ui \
- stringtableviewer.ui \
- techsetviewer.ui \
- zonefileviewer.ui
-
-RESOURCES += ../data/data.qrc
-
-LIBS += \
- -L$$PWD/../third_party/devil_sdk/lib/ -lDevIL -lILU -lILUT \
- -L$$PWD/../third_party/zlib/lib/ -lzlib \
- -L$$PWD/../third_party/xbox_sdk/lib -lxcompress64 \
- -L$$OUT_PWD/../libs/ -lcore \
- -L$$OUT_PWD/../libs/ -lcompression \
- -L$$OUT_PWD/../libs/ -lencryption \
- -L$$OUT_PWD/../libs/ -lfastfile \
- -L$$OUT_PWD/../libs/ -lddsfile \
- -L$$OUT_PWD/../libs/ -lipakfile \
- -L$$OUT_PWD/../libs/ -liwifile \
- -L$$OUT_PWD/../libs/ -lzonefile
-
-INCLUDEPATH += \
- $$PWD/../third_party/devil_sdk/include/ \
- $$PWD/../third_party/zlib/include \
- $$PWD/../third_party/xbox_sdk/include \
- $$PWD/../libs/core \
- $$PWD/../libs/compression \
- $$PWD/../libs/encryption \
- $$PWD/../libs/fastfile \
- $$PWD/../libs/ddsfile \
- $$PWD/../libs/ipakfile \
- $$PWD/../libs/iwifile \
- $$PWD/../libs/zonefile
-
-DEPENDPATH += \
- $$PWD/../third_party/devil_sdk/include/ \
- $$PWD/../third_party/zlib/include \
- $$PWD/../third_party/xbox_sdk/include \
- $$PWD/../libs/core \
- $$PWD/../libs/compression \
- $$PWD/../libs/encryption \
- $$PWD/../libs/fastfile \
- $$PWD/../libs/ddsfile \
- $$PWD/../libs/ipakfile \
- $$PWD/../libs/iwifile \
- $$PWD/../libs/zonefile
-
-# Copy DLLs to Debug folder
-QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/devil_sdk/lib\\*.dll\" \"$$OUT_PWD/debug/\" $$escape_expand(\\n\\t)
-QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/zlib/lib\\*.dll\" \"$$OUT_PWD/debug/\" $$escape_expand(\\n\\t)
-QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/xna/lib\\*.dll\" \"$$OUT_PWD/debug/\" $$escape_expand(\\n\\t)
-QMAKE_POST_LINK += xcopy /Y /E /I \"$$PWD/../third_party/xbox_sdk/lib\\*.dll\" \"$$OUT_PWD/debug/\" $$escape_expand(\\n\\t)
-
-# Copy DLLs to Release folder
-QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/devil_sdk/lib\\*.dll\" \"$$OUT_PWD/release/\" $$escape_expand(\\n\\t)
-QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/zlib/lib\\*.dll\" \"$$OUT_PWD/release/\" $$escape_expand(\\n\\t)
-QMAKE_POST_LINK += xcopy /Y /E /I \"G:/Projects/Qt/XPlor/third_party/xna/lib\\*.dll\" \"$$OUT_PWD/release/\" $$escape_expand(\\n\\t)
-QMAKE_POST_LINK += xcopy /Y /E /I \"$$PWD/../third_party/xbox_sdk/lib\\*.dll\" \"$$OUT_PWD/release/\" $$escape_expand(\\n\\t)
+QT += core widgets gui multimedia
+
+RC_ICONS = app.ico
+
+SUBDIRS += app
+
+CONFIG += c++17
+
+SOURCES += $$files($$PWD/*.cpp)
+HEADERS += $$files($$PWD/*.h)
+FORMS += $$files($$PWD/*.ui)
+
+RESOURCES += ../data/data.qrc
+
+LIBS += \
+ -L$$PWD/../third_party/devil_sdk/lib/ -lDevIL -lILU -lILUT \
+ -L$$PWD/../third_party/zlib/lib/ -lzlib \
+ -L$$PWD/../third_party/xbox_sdk/lib -lxcompress64 \
+ -L$$OUT_PWD/../libs/ -lcore \
+ -L$$OUT_PWD/../libs/ -lxassets\
+ -L$$OUT_PWD/../libs/ -lcompression \
+ -L$$OUT_PWD/../libs/ -lencryption \
+ -L$$OUT_PWD/../libs/ -lfastfile \
+ -L$$OUT_PWD/../libs/ -lddsfile \
+ -L$$OUT_PWD/../libs/ -lipakfile \
+ -L$$OUT_PWD/../libs/ -liwifile \
+ -L$$OUT_PWD/../libs/ -lzonefile
+
+INCLUDEPATH += \
+ $$PWD/../third_party/devil_sdk/include/ \
+ $$PWD/../third_party/zlib/include \
+ $$PWD/../third_party/xbox_sdk/include \
+ $$PWD/../libs/core \
+ $$PWD/../libs/compression \
+ $$PWD/../libs/encryption \
+ $$PWD/../libs/fastfile \
+ $$PWD/../libs/ddsfile \
+ $$PWD/../libs/ipakfile \
+ $$PWD/../libs/iwifile \
+ $$PWD/../libs/xassets \
+ $$PWD/../libs/zonefile
+
+DEPENDPATH += \
+ $$PWD/../third_party/devil_sdk/include/ \
+ $$PWD/../third_party/zlib/include \
+ $$PWD/../third_party/xbox_sdk/include \
+ $$PWD/../libs/core \
+ $$PWD/../libs/compression \
+ $$PWD/../libs/encryption \
+ $$PWD/../libs/fastfile \
+ $$PWD/../libs/ddsfile \
+ $$PWD/../libs/ipakfile \
+ $$PWD/../libs/iwifile \
+ $$PWD/../libs/xassets \
+ $$PWD/../libs/zonefile
+
+
+win32 {
+ QMAKE_POST_LINK =
+ QMAKE_POST_LINK += for /D %%G in (\"$$PWD/../third_party/*/lib\") do copy /Y \"%%~G\*.dll\" \"$$OUT_PWD/$$DESTDIR/\" >NUL $$escape_expand(\\n\\t)
+}
diff --git a/app/d3dbsp_structs.h b/app/d3dbsp_structs.h
index 33017af..3a2d581 100644
--- a/app/d3dbsp_structs.h
+++ b/app/d3dbsp_structs.h
@@ -1,41 +1,41 @@
-#ifndef D3DBSP_STRUCTS_H
-#define D3DBSP_STRUCTS_H
-
-#include
-
-// Define Lump Structure
-struct Lump {
- QByteArray content;
- quint32 size = 0;
- bool isEmpty = true;
-};
-
-// Lump Index Entry Structure
-struct LumpIndexEntry {
- quint32 type;
- quint32 length;
-};
-
-// Bink structure definitions
-struct BINKRECT {
- int Left;
- int Top;
- int Width;
- int Height;
-};
-
-struct BINK {
- int Width;
- int Height;
- uint32_t Frames;
- uint32_t FrameNum;
- uint32_t FrameRate;
- uint32_t FrameRateDiv;
- uint32_t ReadError;
- uint32_t OpenFlags;
- BINKRECT FrameRects;
- uint32_t NumRects;
- uint32_t FrameChangePercent;
-};
-
-#endif // D3DBSP_STRUCTS_H
+#ifndef D3DBSP_STRUCTS_H
+#define D3DBSP_STRUCTS_H
+
+#include
+
+// Define Lump Structure
+struct Lump {
+ QByteArray content;
+ quint32 size = 0;
+ bool isEmpty = true;
+};
+
+// Lump Index Entry Structure
+struct LumpIndexEntry {
+ quint32 type;
+ quint32 length;
+};
+
+// Bink structure definitions
+struct BINKRECT {
+ int Left;
+ int Top;
+ int Width;
+ int Height;
+};
+
+struct BINK {
+ int Width;
+ int Height;
+ uint32_t Frames;
+ uint32_t FrameNum;
+ uint32_t FrameRate;
+ uint32_t FrameRateDiv;
+ uint32_t ReadError;
+ uint32_t OpenFlags;
+ BINKRECT FrameRects;
+ uint32_t NumRects;
+ uint32_t FrameChangePercent;
+};
+
+#endif // D3DBSP_STRUCTS_H
diff --git a/app/ddsviewer.cpp b/app/ddsviewer.cpp
index c9c31c5..6cdad15 100644
--- a/app/ddsviewer.cpp
+++ b/app/ddsviewer.cpp
@@ -1,182 +1,182 @@
-#include "ddsviewer.h"
-#include "enums.h"
-#include "ui_ddsviewer.h"
-
-DDSViewer::DDSViewer(QWidget *parent)
- : QWidget(parent)
- , ui(new Ui::DDSViewer)
-{
- ui->setupUi(this);
- mDDSFile = nullptr;
-}
-
-DDSViewer::~DDSViewer() {
- delete ui;
-}
-
-void DDSViewer::SetDDSFile(std::shared_ptr aDDSFile) {
- mDDSFile.swap(aDDSFile);
-
- ui->label_Title->setText(mDDSFile->fileStem + ".dds");
-
- char magicData[5];
- magicData[0] = static_cast(mDDSFile->header.magic & 0xFF);
- magicData[1] = static_cast((mDDSFile->header.magic >> 8) & 0xFF);
- magicData[2] = static_cast((mDDSFile->header.magic >> 16) & 0xFF);
- magicData[3] = static_cast((mDDSFile->header.magic >> 24) & 0xFF);
- magicData[4] = '\0';
-
- // If you’re using Qt and want a QString:
- QString magicStr = QString::fromLatin1(magicData);
- ui->lineEdit_Magic->setText(magicStr);
- ui->spinBox_Size->setValue(mDDSFile->header.size);
-
- ui->checkBox_CapsValid->setChecked((mDDSFile->header.flags & DDSD_CAPS) != 0);
- ui->checkBox_HeightValid->setChecked((mDDSFile->header.flags & DDSD_HEIGHT) != 0);
- ui->checkBox_WidthValid->setChecked((mDDSFile->header.flags & DDSD_WIDTH) != 0);
- ui->checkBox_PitchValid->setChecked((mDDSFile->header.flags & DDSD_PITCH) != 0);
- ui->checkBox_PFValid->setChecked((mDDSFile->header.flags & DDSD_PIXELFORMAT) != 0);
- ui->checkBox_MipmapCountValid->setChecked((mDDSFile->header.flags & DDSD_MIPMAPCOUNT) != 0);
- ui->checkBox_LinearSizeValid->setChecked((mDDSFile->header.flags & DDSD_LINEARSIZE) != 0);
- ui->checkBox_DepthValid->setChecked((mDDSFile->header.flags & DDSD_DEPTH) != 0);
-
- ui->spinBox_PLSize->setValue(mDDSFile->header.pitchOrLinearSize);
- ui->spinBox_Depth->setValue(mDDSFile->header.depth);
- ui->spinBox_Width->setValue(mDDSFile->header.width);
- ui->spinBox_Height->setValue(mDDSFile->header.height);
- ui->spinBox_MipmapCount->setValue(mDDSFile->header.mipMapCount);
-
- ui->spinBox_Res1->setValue(mDDSFile->header.reserved1[0]);
- ui->spinBox_Res2->setValue(mDDSFile->header.reserved1[1]);
- ui->spinBox_Res3->setValue(mDDSFile->header.reserved1[2]);
- ui->spinBox_Res4->setValue(mDDSFile->header.reserved1[3]);
- ui->spinBox_Res5->setValue(mDDSFile->header.reserved1[4]);
- ui->spinBox_Res6->setValue(mDDSFile->header.reserved1[5]);
- ui->spinBox_Res7->setValue(mDDSFile->header.reserved1[6]);
- ui->spinBox_Res8->setValue(mDDSFile->header.reserved1[7]);
- ui->spinBox_Res9->setValue(mDDSFile->header.reserved1[8]);
- ui->spinBox_Res10->setValue(mDDSFile->header.reserved1[9]);
- ui->spinBox_Res11->setValue(mDDSFile->header.reserved1[10]);
-
- ui->spinBox_Res12->setValue(mDDSFile->header.reserved2);
-
- ui->spinBox_PF_Size->setValue(mDDSFile->header.pixelFormat.size);
-
- ui->checkBox_PF_AlphaPxValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_ALPHAPIXELS) != 0);
- ui->checkBox_PF_AlphaOnlyValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_ALPHA) != 0);
- ui->checkBox_PF_FormatValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_FOURCC) != 0);
- ui->checkBox_PF_RGBValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_RGB) != 0);
- ui->checkBox_PF_YUVValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_YUV) != 0);
- ui->checkBox_PF_LuminanceValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_LUMINANCE) != 0);
-
- QString formatStr = QString::number(mDDSFile->header.pixelFormat.format);
- switch (mDDSFile->header.pixelFormat.format) {
- case IWI_FORMAT_ARGB32:
- formatStr = "ARGB32";
- break;
- case IWI_FORMAT_RGB24:
- formatStr = "RGB24";
- break;
- case IWI_FORMAT_GA16:
- formatStr = "GA16";
- break;
- case IWI_FORMAT_A8:
- formatStr = "A8";
- break;
- case IWI_FORMAT_DXT1:
- formatStr = "DXT1";
- break;
- case IWI_FORMAT_DXT3:
- formatStr = "DXT3";
- break;
- case IWI_FORMAT_DXT5:
- formatStr = "DXT5";
- break;
- }
- ui->lineEdit_PF_Format->setText(formatStr);
- ui->spinBox_PF_RGBBitCount->setValue(mDDSFile->header.pixelFormat.rgbBitCount);
- ui->spinBox_RedBitCount->setValue(mDDSFile->header.pixelFormat.rBitMask);
- ui->spinBox_GreenBitCount->setValue(mDDSFile->header.pixelFormat.gBitMask);
- ui->spinBox_BlueBitCount->setValue(mDDSFile->header.pixelFormat.bBitMask);
- ui->spinBox_AlphaBitMask->setValue(mDDSFile->header.pixelFormat.aBitMask);
-
- ui->checkBox_Caps1_TextureValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_TEXTURE) != 0);
- ui->checkBox_Caps1_ComplexValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_COMPLEX) != 0);
- ui->checkBox_Caps1_MipmapValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_MIPMAP) != 0);
-
- ui->checkBox_Caps2_CubemapValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP) != 0);
- ui->checkBox_Caps2_CMPXValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEX) != 0);
- ui->checkBox_Caps2_CMNXValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEX) != 0);
- ui->checkBox_Caps2_CMPYValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEY) != 0);
- ui->checkBox_Caps2_CMNYValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEY) != 0);
- ui->checkBox_Caps2_CMPZValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEZ) != 0);
- ui->checkBox_Caps2_CMNZValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEZ) != 0);
- ui->checkBox_Caps2_VolumeValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_VOLUME) != 0);
-
- ui->spinBox_Caps_DDSX->setValue(mDDSFile->header.caps.dDSX);
- ui->spinBox_Caps_Res->setValue(mDDSFile->header.caps.reserved);
-
- ui->comboBox_Mipmap->clear();
- for (auto mipmap : mDDSFile->mipmaps) {
- ui->comboBox_Mipmap->addItem(QString("%1x%2").arg(mipmap.width).arg(mipmap.height));
- }
-
- connect(ui->comboBox_Mipmap, &QComboBox::currentIndexChanged, this, &DDSViewer::MipmapIndexChanged);
-
- if (!mDDSFile->mipmaps.empty()) {
- MipmapIndexChanged(0);
- }
-}
-
-void DDSViewer::MipmapIndexChanged(int aMipmapIndex) {
- if (aMipmapIndex == -1) { return; }
-
- auto mipmaps = mDDSFile->mipmaps;
- auto mipmap = mipmaps[aMipmapIndex];
-
- ui->spinBox_MipmapSize->setValue(mipmap.size);
- ui->spinBox_MipmapWidth->setValue(mipmap.width);
- ui->spinBox_MipmapHeight->setValue(mipmap.height);
-
- // Validate Data
- if (mipmap.size <= 0) {
- qDebug() << "Error: Mipmap data is empty!";
- return;
- }
- if (mipmap.width <= 0 || mipmap.height <= 0) {
- qDebug() << "Error: Invalid mipmap dimensions!";
- return;
- }
-
- // Ensure data size matches expected size
- int bytesPerPixel = 4; // RGBA8888
- quint32 expectedSize = mipmap.width * mipmap.height * bytesPerPixel;
- if (mipmap.size < expectedSize) {
- qDebug() << "Error: Mipmap data size mismatch! Expected:" << expectedSize << ", Got:" << mipmap.size;
- return;
- }
-
- // Create QImage
- const unsigned char* imageData = reinterpret_cast(mipmap.data.constData());
- QImage image(reinterpret_cast(imageData),
- mipmap.width, mipmap.height,
- mipmap.width * bytesPerPixel, // Stride
- QImage::Format_RGBA8888);
-
- if (image.isNull()) {
- qDebug() << "Error: QImage creation failed!";
- return;
- }
-
- // Convert to QPixmap
- QPixmap pixmap = QPixmap::fromImage(image);
- if (pixmap.isNull()) {
- qDebug() << "Error: QPixmap conversion failed!";
- return;
- }
-
- // Scale and display
- pixmap = pixmap.scaled(ui->label_Image->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
- ui->label_Image->setPixmap(pixmap);
-}
-
+#include "ddsviewer.h"
+#include "enums.h"
+#include "ui_ddsviewer.h"
+
+DDSViewer::DDSViewer(QWidget *parent)
+ : QWidget(parent)
+ , ui(new Ui::DDSViewer)
+{
+ ui->setupUi(this);
+ mDDSFile = nullptr;
+}
+
+DDSViewer::~DDSViewer() {
+ delete ui;
+}
+
+void DDSViewer::SetDDSFile(const DDSFile* aDDSFile) {
+ mDDSFile = aDDSFile;
+
+ ui->label_Title->setText(mDDSFile->fileStem + ".dds");
+
+ char magicData[5];
+ magicData[0] = static_cast(mDDSFile->header.magic & 0xFF);
+ magicData[1] = static_cast((mDDSFile->header.magic >> 8) & 0xFF);
+ magicData[2] = static_cast((mDDSFile->header.magic >> 16) & 0xFF);
+ magicData[3] = static_cast((mDDSFile->header.magic >> 24) & 0xFF);
+ magicData[4] = '\0';
+
+ // If you’re using Qt and want a QString:
+ QString magicStr = QString::fromLatin1(magicData);
+ ui->lineEdit_Magic->setText(magicStr);
+ ui->spinBox_Size->setValue(mDDSFile->header.size);
+
+ ui->checkBox_CapsValid->setChecked((mDDSFile->header.flags & DDSD_CAPS) != 0);
+ ui->checkBox_HeightValid->setChecked((mDDSFile->header.flags & DDSD_HEIGHT) != 0);
+ ui->checkBox_WidthValid->setChecked((mDDSFile->header.flags & DDSD_WIDTH) != 0);
+ ui->checkBox_PitchValid->setChecked((mDDSFile->header.flags & DDSD_PITCH) != 0);
+ ui->checkBox_PFValid->setChecked((mDDSFile->header.flags & DDSD_PIXELFORMAT) != 0);
+ ui->checkBox_MipmapCountValid->setChecked((mDDSFile->header.flags & DDSD_MIPMAPCOUNT) != 0);
+ ui->checkBox_LinearSizeValid->setChecked((mDDSFile->header.flags & DDSD_LINEARSIZE) != 0);
+ ui->checkBox_DepthValid->setChecked((mDDSFile->header.flags & DDSD_DEPTH) != 0);
+
+ ui->spinBox_PLSize->setValue(mDDSFile->header.pitchOrLinearSize);
+ ui->spinBox_Depth->setValue(mDDSFile->header.depth);
+ ui->spinBox_Width->setValue(mDDSFile->header.width);
+ ui->spinBox_Height->setValue(mDDSFile->header.height);
+ ui->spinBox_MipmapCount->setValue(mDDSFile->header.mipMapCount);
+
+ ui->spinBox_Res1->setValue(mDDSFile->header.reserved1[0]);
+ ui->spinBox_Res2->setValue(mDDSFile->header.reserved1[1]);
+ ui->spinBox_Res3->setValue(mDDSFile->header.reserved1[2]);
+ ui->spinBox_Res4->setValue(mDDSFile->header.reserved1[3]);
+ ui->spinBox_Res5->setValue(mDDSFile->header.reserved1[4]);
+ ui->spinBox_Res6->setValue(mDDSFile->header.reserved1[5]);
+ ui->spinBox_Res7->setValue(mDDSFile->header.reserved1[6]);
+ ui->spinBox_Res8->setValue(mDDSFile->header.reserved1[7]);
+ ui->spinBox_Res9->setValue(mDDSFile->header.reserved1[8]);
+ ui->spinBox_Res10->setValue(mDDSFile->header.reserved1[9]);
+ ui->spinBox_Res11->setValue(mDDSFile->header.reserved1[10]);
+
+ ui->spinBox_Res12->setValue(mDDSFile->header.reserved2);
+
+ ui->spinBox_PF_Size->setValue(mDDSFile->header.pixelFormat.size);
+
+ ui->checkBox_PF_AlphaPxValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_ALPHAPIXELS) != 0);
+ ui->checkBox_PF_AlphaOnlyValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_ALPHA) != 0);
+ ui->checkBox_PF_FormatValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_FOURCC) != 0);
+ ui->checkBox_PF_RGBValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_RGB) != 0);
+ ui->checkBox_PF_YUVValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_YUV) != 0);
+ ui->checkBox_PF_LuminanceValid->setChecked((mDDSFile->header.pixelFormat.flags & DDPF_LUMINANCE) != 0);
+
+ QString formatStr = QString::number(mDDSFile->header.pixelFormat.format);
+ switch (mDDSFile->header.pixelFormat.format) {
+ case IWI_FORMAT_ARGB32:
+ formatStr = "ARGB32";
+ break;
+ case IWI_FORMAT_RGB24:
+ formatStr = "RGB24";
+ break;
+ case IWI_FORMAT_GA16:
+ formatStr = "GA16";
+ break;
+ case IWI_FORMAT_A8:
+ formatStr = "A8";
+ break;
+ case IWI_FORMAT_DXT1:
+ formatStr = "DXT1";
+ break;
+ case IWI_FORMAT_DXT3:
+ formatStr = "DXT3";
+ break;
+ case IWI_FORMAT_DXT5:
+ formatStr = "DXT5";
+ break;
+ }
+ ui->lineEdit_PF_Format->setText(formatStr);
+ ui->spinBox_PF_RGBBitCount->setValue(mDDSFile->header.pixelFormat.rgbBitCount);
+ ui->spinBox_RedBitCount->setValue(mDDSFile->header.pixelFormat.rBitMask);
+ ui->spinBox_GreenBitCount->setValue(mDDSFile->header.pixelFormat.gBitMask);
+ ui->spinBox_BlueBitCount->setValue(mDDSFile->header.pixelFormat.bBitMask);
+ ui->spinBox_AlphaBitMask->setValue(mDDSFile->header.pixelFormat.aBitMask);
+
+ ui->checkBox_Caps1_TextureValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_TEXTURE) != 0);
+ ui->checkBox_Caps1_ComplexValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_COMPLEX) != 0);
+ ui->checkBox_Caps1_MipmapValid->setChecked((mDDSFile->header.caps.caps1 & DDSCAPS_MIPMAP) != 0);
+
+ ui->checkBox_Caps2_CubemapValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP) != 0);
+ ui->checkBox_Caps2_CMPXValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEX) != 0);
+ ui->checkBox_Caps2_CMNXValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEX) != 0);
+ ui->checkBox_Caps2_CMPYValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEY) != 0);
+ ui->checkBox_Caps2_CMNYValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEY) != 0);
+ ui->checkBox_Caps2_CMPZValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_POSITIVEZ) != 0);
+ ui->checkBox_Caps2_CMNZValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_CUBEMAP_NEGATIVEZ) != 0);
+ ui->checkBox_Caps2_VolumeValid->setChecked((mDDSFile->header.caps.caps2 & DDSCAPS2_VOLUME) != 0);
+
+ ui->spinBox_Caps_DDSX->setValue(mDDSFile->header.caps.dDSX);
+ ui->spinBox_Caps_Res->setValue(mDDSFile->header.caps.reserved);
+
+ ui->comboBox_Mipmap->clear();
+ for (auto mipmap : mDDSFile->mipmaps) {
+ ui->comboBox_Mipmap->addItem(QString("%1x%2").arg(mipmap.width).arg(mipmap.height));
+ }
+
+ connect(ui->comboBox_Mipmap, &QComboBox::currentIndexChanged, this, &DDSViewer::MipmapIndexChanged);
+
+ if (!mDDSFile->mipmaps.empty()) {
+ MipmapIndexChanged(0);
+ }
+}
+
+void DDSViewer::MipmapIndexChanged(int aMipmapIndex) {
+ if (aMipmapIndex == -1) { return; }
+
+ auto mipmaps = mDDSFile->mipmaps;
+ auto mipmap = mipmaps[aMipmapIndex];
+
+ ui->spinBox_MipmapSize->setValue(mipmap.size);
+ ui->spinBox_MipmapWidth->setValue(mipmap.width);
+ ui->spinBox_MipmapHeight->setValue(mipmap.height);
+
+ // Validate Data
+ if (mipmap.size <= 0) {
+ qDebug() << "Error: Mipmap data is empty!";
+ return;
+ }
+ if (mipmap.width <= 0 || mipmap.height <= 0) {
+ qDebug() << "Error: Invalid mipmap dimensions!";
+ return;
+ }
+
+ // Ensure data size matches expected size
+ int bytesPerPixel = 4; // RGBA8888
+ quint32 expectedSize = mipmap.width * mipmap.height * bytesPerPixel;
+ if (mipmap.size < expectedSize) {
+ qDebug() << "Error: Mipmap data size mismatch! Expected:" << expectedSize << ", Got:" << mipmap.size;
+ return;
+ }
+
+ // Create QImage
+ const unsigned char* imageData = reinterpret_cast(mipmap.data.constData());
+ QImage image(reinterpret_cast(imageData),
+ mipmap.width, mipmap.height,
+ mipmap.width * bytesPerPixel, // Stride
+ QImage::Format_RGBA8888);
+
+ if (image.isNull()) {
+ qDebug() << "Error: QImage creation failed!";
+ return;
+ }
+
+ // Convert to QPixmap
+ QPixmap pixmap = QPixmap::fromImage(image);
+ if (pixmap.isNull()) {
+ qDebug() << "Error: QPixmap conversion failed!";
+ return;
+ }
+
+ // Scale and display
+ pixmap = pixmap.scaled(ui->label_Image->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
+ ui->label_Image->setPixmap(pixmap);
+}
+
diff --git a/app/ddsviewer.h b/app/ddsviewer.h
index f49bbc2..d5b8ce0 100644
--- a/app/ddsviewer.h
+++ b/app/ddsviewer.h
@@ -1,29 +1,29 @@
-#ifndef DDSVIEWER_H
-#define DDSVIEWER_H
-
-#include "ddsfile.h"
-#include
-
-namespace Ui {
-class DDSViewer;
-}
-
-class DDSViewer : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit DDSViewer(QWidget *parent = nullptr);
- ~DDSViewer();
-
- void SetDDSFile(std::shared_ptr aDDSFile);
-
-private slots:
- void MipmapIndexChanged(int aMipmapIndex);
-
-private:
- Ui::DDSViewer *ui;
- std::shared_ptr mDDSFile;
-};
-
-#endif // DDSVIEWER_H
+#ifndef DDSVIEWER_H
+#define DDSVIEWER_H
+
+#include "ddsfile.h"
+#include
+
+namespace Ui {
+class DDSViewer;
+}
+
+class DDSViewer : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit DDSViewer(QWidget *parent = nullptr);
+ ~DDSViewer();
+
+ void SetDDSFile(const DDSFile *aDDSFile);
+
+private slots:
+ void MipmapIndexChanged(int aMipmapIndex);
+
+private:
+ Ui::DDSViewer *ui;
+ const DDSFile* mDDSFile;
+};
+
+#endif // DDSVIEWER_H
diff --git a/app/ddsviewer.ui b/app/ddsviewer.ui
index d7dc083..821c94e 100644
--- a/app/ddsviewer.ui
+++ b/app/ddsviewer.ui
@@ -1,1712 +1,1712 @@
-
-
- DDSViewer
-
-
-
- 0
- 0
- 1326
- 876
-
-
-
- Form
-
-
- -
-
-
-
- Roboto
- 16
- true
-
-
-
- DDS File 0
-
-
-
- -
-
-
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Caps
-
-
-
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- D DSX:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
- -
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Reserved:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
- -
-
-
- false
-
-
- Caps 2 Flags / Valid Data
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Cubemap Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Cubemap +X Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Cubemap -X Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Cubemap +Y Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Cubemap -Y Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Cubemap +Z Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Cubemap -Z Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Volume Valid
-
-
-
-
-
-
- -
-
-
- false
-
-
- Caps 1 Flags / Valid Data
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Complex Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Mipmap Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Texture Valid
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 78
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Header
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
- Properties
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Magic:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Header Len:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- B
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Pitch/Linear Size:
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Depth:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Mipmap #:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Height:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Width:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
-
- -
-
-
- false
-
-
- Flags / Valid Data
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Caps Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Height Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Width Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Pitch Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Depth Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Linear Size Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Mipmap Count Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Pixel Format Valid
-
-
-
-
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Qt::Orientation::Vertical
-
-
-
- -
-
-
-
-
-
- false
-
-
- Reserved Fields
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Reserved 1:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 2:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 3:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 4:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 5:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 6:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 7:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 8:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 9:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 10:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 11:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Reserved 12:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
- QSizePolicy::Policy::Ignored
-
-
-
- 17
- 118
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Mipmaps
-
-
-
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Qt::Orientation::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Select Mipmap:
-
-
-
- -
-
-
-
- 60
- 0
-
-
-
-
- Roboto
- 9
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Qt::Orientation::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
- false
-
-
- Properties
-
-
-
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Size:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
- -
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Height:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
- -
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Width:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Pixel Format
-
-
-
-
-
-
- false
-
-
- Properties
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Size:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Format:
-
-
-
- -
-
-
- false
-
-
-
- 0
- 0
-
-
-
-
- Roboto
- 9
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- RGB Bit #:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Red Bit Mask:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Blue Bit Mask:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Green Bit Mask:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Alpha Bit Mask:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Qt::Orientation::Vertical
-
-
-
- -
-
-
- false
-
-
- Flags / Valid Data
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Alpha Pixels Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Alpha Only Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Format Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- RGB Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- YUV Valid
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Luminance Valid
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Preview
-
-
-
-
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
-
- 600
- 600
-
-
-
-
- 600
- 600
-
-
-
-
- Roboto
- 9
-
-
-
- border: 2px solid white;
-
-
-
-
-
- Qt::AlignmentFlag::AlignCenter
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
+
+
+ DDSViewer
+
+
+
+ 0
+ 0
+ 1326
+ 876
+
+
+
+ Form
+
+
+ -
+
+
+
+ Roboto
+ 16
+ true
+
+
+
+ DDS File 0
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Caps
+
+
+
-
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ D DSX:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+ -
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+ -
+
+
+ false
+
+
+ Caps 2 Flags / Valid Data
+
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Cubemap Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Cubemap +X Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Cubemap -X Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Cubemap +Y Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Cubemap -Y Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Cubemap +Z Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Cubemap -Z Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Volume Valid
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+ Caps 1 Flags / Valid Data
+
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Complex Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Mipmap Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Texture Valid
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 78
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Header
+
+
+
-
+
+
-
+
+
-
+
+
-
+
+
+ false
+
+
+ Properties
+
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Magic:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Header Len:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ B
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Pitch/Linear Size:
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Depth:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Mipmap #:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Height:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Width:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+ Flags / Valid Data
+
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Caps Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Height Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Width Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Pitch Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Depth Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Linear Size Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Mipmap Count Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Pixel Format Valid
+
+
+
+
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Qt::Orientation::Vertical
+
+
+
+ -
+
+
-
+
+
+ false
+
+
+ Reserved Fields
+
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 1:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 2:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 3:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 4:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 5:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 6:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 7:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 8:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 9:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 10:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 11:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Reserved 12:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+ QSizePolicy::Policy::Ignored
+
+
+
+ 17
+ 118
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Mipmaps
+
+
+
-
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Qt::Orientation::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Select Mipmap:
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ Roboto
+ 9
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Qt::Orientation::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ false
+
+
+ Properties
+
+
+
-
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Size:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+ -
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Height:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+ -
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Width:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Pixel Format
+
+
+
-
+
+
+ false
+
+
+ Properties
+
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Size:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Format:
+
+
+
+ -
+
+
+ false
+
+
+
+ 0
+ 0
+
+
+
+
+ Roboto
+ 9
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ RGB Bit #:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Red Bit Mask:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Blue Bit Mask:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Green Bit Mask:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Alpha Bit Mask:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Qt::Orientation::Vertical
+
+
+
+ -
+
+
+ false
+
+
+ Flags / Valid Data
+
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Alpha Pixels Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Alpha Only Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Format Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ RGB Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ YUV Valid
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Luminance Valid
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Preview
+
+
+
-
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
+
+ 600
+ 600
+
+
+
+
+ 600
+ 600
+
+
+
+
+ Roboto
+ 9
+
+
+
+ border: 2px solid white;
+
+
+
+
+
+ Qt::AlignmentFlag::AlignCenter
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
diff --git a/app/fastfileviewer.cpp b/app/fastfileviewer.cpp
index 62e7044..9328103 100644
--- a/app/fastfileviewer.cpp
+++ b/app/fastfileviewer.cpp
@@ -1,27 +1,26 @@
-#include "fastfileviewer.h"
-#include "asset_structs.h"
-#include "ui_fastfileviewer.h"
-
-FastFileViewer::FastFileViewer(QWidget *parent)
- : QWidget(parent)
- , ui(new Ui::FFViewer)
- , mFastFile(nullptr)
-{
- ui->setupUi(this);
-}
-
-FastFileViewer::~FastFileViewer()
-{
- delete ui;
-}
-
-void FastFileViewer::SetFastFile(std::shared_ptr aFastFile) {
- mFastFile.swap(aFastFile);
-
- ui->label_Title->setText(mFastFile->GetStem());
- ui->comboBox_Company->setCurrentIndex(mFastFile->GetCompany());
- ui->comboBox_FileType->setCurrentIndex(mFastFile->GetType());
- ui->checkBox_Signed->setChecked(mFastFile->GetSignage() == SIGNAGE_SIGNED);
- ui->lineEdit_Magic->setText(mFastFile->GetMagic());
- ui->spinBox_Version->setValue(mFastFile->GetVersion());
-}
+#include "fastfileviewer.h"
+#include "ui_fastfileviewer.h"
+
+FastFileViewer::FastFileViewer(QWidget *parent)
+ : QWidget(parent)
+ , ui(new Ui::FFViewer)
+ , mFastFile(nullptr)
+{
+ ui->setupUi(this);
+}
+
+FastFileViewer::~FastFileViewer()
+{
+ delete ui;
+}
+
+void FastFileViewer::SetFastFile(const FastFile* aFastFile) {
+ mFastFile = aFastFile;
+
+ ui->label_Title->setText(mFastFile->GetStem());
+ ui->comboBox_Company->setCurrentIndex(mFastFile->GetCompany());
+ ui->comboBox_FileType->setCurrentIndex(mFastFile->GetType());
+ ui->checkBox_Signed->setChecked(mFastFile->GetSignage() == SIGNAGE_SIGNED);
+ ui->lineEdit_Magic->setText(mFastFile->GetMagic());
+ ui->spinBox_Version->setValue(mFastFile->GetVersion());
+}
diff --git a/app/fastfileviewer.h b/app/fastfileviewer.h
index 3fc36c1..32fd722 100644
--- a/app/fastfileviewer.h
+++ b/app/fastfileviewer.h
@@ -1,26 +1,25 @@
-#ifndef FASTFILEVIEWER_H
-#define FASTFILEVIEWER_H
-
-#include "asset_structs.h"
-#include "fastfile.h"
-#include
-
-namespace Ui {
-class FFViewer;
-}
-
-class FastFileViewer : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit FastFileViewer(QWidget *parent = nullptr);
- ~FastFileViewer();
-
- void SetFastFile(std::shared_ptr aFastFile);
-private:
- Ui::FFViewer *ui;
- std::shared_ptr mFastFile;
-};
-
-#endif // FASTFILEVIEWER_H
+#ifndef FASTFILEVIEWER_H
+#define FASTFILEVIEWER_H
+
+#include "fastfile.h"
+#include
+
+namespace Ui {
+class FFViewer;
+}
+
+class FastFileViewer : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit FastFileViewer(QWidget *parent = nullptr);
+ ~FastFileViewer();
+
+ void SetFastFile(const FastFile *aFastFile);
+private:
+ Ui::FFViewer *ui;
+ const FastFile* mFastFile;
+};
+
+#endif // FASTFILEVIEWER_H
diff --git a/app/fastfileviewer.ui b/app/fastfileviewer.ui
index 52e4091..3714272 100644
--- a/app/fastfileviewer.ui
+++ b/app/fastfileviewer.ui
@@ -1,197 +1,197 @@
-
-
- FFViewer
-
-
-
- 0
- 0
- 428
- 459
-
-
-
- Form
-
-
- -
-
-
-
- Roboto
- 16
- true
-
-
-
- FastFile 0
-
-
-
- -
-
-
-
-
-
-
-
-
-
- 400
- 400
-
-
-
-
- Roboto
- 9
-
-
-
- Header
-
-
-
-
-
-
- Company:
-
-
-
- -
-
-
- false
-
-
-
-
- None
-
-
- -
-
- Infinity Ward
-
-
- -
-
- Treyarch
-
-
- -
-
- Sledgehammer
-
-
- -
-
- Neversoft
-
-
-
-
- -
-
-
- File Type:
-
-
-
- -
-
-
- false
-
-
-
-
- None
-
-
- -
-
- FastFile
-
-
-
-
- -
-
-
- Signed:
-
-
-
- -
-
-
- false
-
-
- Is signed
-
-
-
- -
-
-
- Magic:
-
-
-
- -
-
-
- -
-
-
- Version:
-
-
-
- -
-
-
- false
-
-
- 10000
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 1
-
-
-
-
-
-
-
-
-
+
+
+ FFViewer
+
+
+
+ 0
+ 0
+ 428
+ 459
+
+
+
+ Form
+
+
+ -
+
+
+
+ Roboto
+ 16
+ true
+
+
+
+ FastFile 0
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+ 400
+ 400
+
+
+
+
+ Roboto
+ 9
+
+
+
+ Header
+
+
+
-
+
+
+ Company:
+
+
+
+ -
+
+
+ false
+
+
-
+
+ None
+
+
+ -
+
+ Infinity Ward
+
+
+ -
+
+ Treyarch
+
+
+ -
+
+ Sledgehammer
+
+
+ -
+
+ Neversoft
+
+
+
+
+ -
+
+
+ File Type:
+
+
+
+ -
+
+
+ false
+
+
-
+
+ None
+
+
+ -
+
+ FastFile
+
+
+
+
+ -
+
+
+ Signed:
+
+
+
+ -
+
+
+ false
+
+
+ Is signed
+
+
+
+ -
+
+
+ Magic:
+
+
+
+ -
+
+
+ -
+
+
+ Version:
+
+
+
+ -
+
+
+ false
+
+
+ 10000
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 1
+
+
+
+
+
+
+
+
+
diff --git a/app/imagewidget.cpp b/app/imagewidget.cpp
index 04af5c1..f3aee49 100644
--- a/app/imagewidget.cpp
+++ b/app/imagewidget.cpp
@@ -1,28 +1,28 @@
-#include "imagewidget.h"
-#include "ui_imagewidget.h"
-
-ImageWidget::ImageWidget(QWidget *parent)
- : QWidget(parent)
- , ui(new Ui::ImageWidget)
-{
- ui->setupUi(this);
-}
-
-ImageWidget::~ImageWidget()
-{
- delete ui;
-}
-
-void ImageWidget::SetImage(std::shared_ptr aImage)
-{
- mImage = aImage;
-
- ui->lineEdit_Name->setText(aImage->name);
- ui->lineEdit_Role->setText(aImage->materialName);
- ui->comboBox_Compression->setCurrentIndex(aImage->compression);
-}
-
-std::shared_ptr ImageWidget::GetImage()
-{
- return mImage;
-}
+#include "imagewidget.h"
+#include "ui_imagewidget.h"
+
+ImageWidget::ImageWidget(QWidget *parent)
+ : QWidget(parent)
+ , ui(new Ui::ImageWidget)
+{
+ ui->setupUi(this);
+}
+
+ImageWidget::~ImageWidget()
+{
+ delete ui;
+}
+
+void ImageWidget::SetImage(std::shared_ptr aImage)
+{
+ mImage = aImage;
+
+ //ui->lineEdit_Name->setText(aImage->name);
+ //ui->lineEdit_Role->setText(aImage->materialName);
+ //ui->comboBox_Compression->setCurrentIndex(aImage->compression);
+}
+
+std::shared_ptr ImageWidget::GetImage()
+{
+ return mImage;
+}
diff --git a/app/imagewidget.h b/app/imagewidget.h
index 4de5a27..22be24c 100644
--- a/app/imagewidget.h
+++ b/app/imagewidget.h
@@ -1,32 +1,31 @@
-#ifndef IMAGEWIDGET_H
-#define IMAGEWIDGET_H
-
-#include "enums.h"
-#include "dds_structs.h"
-#include "d3dbsp_structs.h"
-#include "asset_structs.h"
-#include "ipak_structs.h"
-
-#include
-
-namespace Ui {
-class ImageWidget;
-}
-
-class ImageWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit ImageWidget(QWidget *parent = nullptr);
- ~ImageWidget();
-
- void SetImage(std::shared_ptr aImage);
- std::shared_ptr GetImage();
-
-private:
- std::shared_ptr mImage;
- Ui::ImageWidget *ui;
-};
-
-#endif // IMAGEWIDGET_H
+#ifndef IMAGEWIDGET_H
+#define IMAGEWIDGET_H
+
+#include "enums.h"
+#include "dds_structs.h"
+#include "d3dbsp_structs.h"
+#include "ipak_structs.h"
+
+#include
+
+namespace Ui {
+class ImageWidget;
+}
+
+class ImageWidget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit ImageWidget(QWidget *parent = nullptr);
+ ~ImageWidget();
+
+ void SetImage(std::shared_ptr aImage);
+ std::shared_ptr GetImage();
+
+private:
+ std::shared_ptr mImage;
+ Ui::ImageWidget *ui;
+};
+
+#endif // IMAGEWIDGET_H
diff --git a/app/imagewidget.ui b/app/imagewidget.ui
index 47b6206..df7f6f6 100644
--- a/app/imagewidget.ui
+++ b/app/imagewidget.ui
@@ -1,144 +1,144 @@
-
-
- ImageWidget
-
-
-
- 0
- 0
- 589
- 422
-
-
-
- Form
-
-
- -
-
-
-
-
-
-
-
-
- Image Role:
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
- Name:
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
- Compression:
-
-
-
- -
-
-
-
-
- None
-
-
- -
-
- DXT1
-
-
- -
-
- DXT3
-
-
- -
-
- DXT5
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- -
-
-
-
-
-
-
- 250
- 250
-
-
-
-
- 250
- 250
-
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
-
-
+
+
+ ImageWidget
+
+
+
+ 0
+ 0
+ 589
+ 422
+
+
+
+ Form
+
+
+ -
+
+
-
+
+
-
+
+
+ Image Role:
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+ Name:
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+ Compression:
+
+
+
+ -
+
+
-
+
+ None
+
+
+ -
+
+ DXT1
+
+
+ -
+
+ DXT3
+
+
+ -
+
+ DXT5
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ -
+
+
-
+
+
+
+ 250
+ 250
+
+
+
+
+ 250
+ 250
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/iwiviewer.cpp b/app/iwiviewer.cpp
index 1fd2268..e4b9c3e 100644
--- a/app/iwiviewer.cpp
+++ b/app/iwiviewer.cpp
@@ -1,98 +1,98 @@
-#include "iwiviewer.h"
-#include "enums.h"
-#include "ui_iwiviewer.h"
-
-IWIViewer::IWIViewer(QWidget *parent)
- : QWidget(parent)
- , ui(new Ui::IWIViewer)
-{
- ui->setupUi(this);
-}
-
-IWIViewer::~IWIViewer()
-{
- delete ui;
-}
-
-void IWIViewer::SetIWIFile(std::shared_ptr aIWIFile) {
- mIWIFile.swap(aIWIFile);
-
- ui->label_Title->setText(mIWIFile->fileStem + ".iwi");
-
- // If you’re using Qt and want a QString:
- QString magicStr = QString::fromLatin1(mIWIFile->header.Magic, 3);
- ui->lineEdit_Magic->setText(magicStr);
-
- ui->spinBox_Version->setValue(mIWIFile->header.Version);
- ui->spinBox_Depth->setValue(mIWIFile->info.Depth);
- QString formatStr = "";
- switch (mIWIFile->info.Format) {
- case IWI_FORMAT_ARGB32:
- formatStr = "ARGB32";
- break;
- case IWI_FORMAT_RGB24:
- formatStr = "RGB24";
- break;
- case IWI_FORMAT_GA16:
- formatStr = "GA16";
- break;
- case IWI_FORMAT_A8:
- formatStr = "A8";
- break;
- case IWI_FORMAT_DXT1:
- formatStr = "DXT1";
- break;
- case IWI_FORMAT_DXT3:
- formatStr = "DXT3";
- break;
- case IWI_FORMAT_DXT5:
- formatStr = "DXT5";
- break;
- }
- ui->lineEdit_Format->setText(formatStr);
- ui->spinBox_Height->setValue(mIWIFile->info.Height);
- ui->spinBox_Width->setValue(mIWIFile->info.Width);
- ui->spinBox_Usage->setValue(mIWIFile->info.Usage);
-
- ui->comboBox_Mipmap->clear();
- for (auto mipmap : mIWIFile->mipmaps) {
- ui->comboBox_Mipmap->addItem(QString::number(mipmap.offset));
- }
-
- connect(ui->comboBox_Mipmap, &QComboBox::currentIndexChanged, this, &IWIViewer::MipmapIndexChanged);
-
- if (!mIWIFile->mipmaps.empty()) {
- MipmapIndexChanged(0);
- }
-}
-
-void IWIViewer::MipmapIndexChanged(int aMipmapIndex) {
- auto mipmaps = mIWIFile->mipmaps;
-
- if (aMipmapIndex == -1) { return; }
-
- auto mipmap = mipmaps[aMipmapIndex];
- ui->spinBox_MipmapSize->setValue(mipmap.size);
- ui->spinBox_MipmapOffset->setValue(mipmap.offset);
-
- const unsigned char* imageData = reinterpret_cast(mipmap.data.constData());
- QImage image(reinterpret_cast(imageData),
- mIWIFile->info.Width, mIWIFile->info.Height,
- QImage::Format_RGBA8888);
-
- if (image.isNull()) {
- qDebug() << "Error: QImage creation failed!";
- return;
- }
-
- // Convert to QPixmap
- QPixmap pixmap = QPixmap::fromImage(image);
- if (pixmap.isNull()) {
- qDebug() << "Error: QPixmap conversion failed!";
- return;
- }
-
- // Scale and display
- pixmap = pixmap.scaled(ui->label_Image->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
- ui->label_Image->setPixmap(pixmap);
-}
+#include "iwiviewer.h"
+#include "enums.h"
+#include "ui_iwiviewer.h"
+
+IWIViewer::IWIViewer(QWidget *parent)
+ : QWidget(parent)
+ , ui(new Ui::IWIViewer)
+{
+ ui->setupUi(this);
+}
+
+IWIViewer::~IWIViewer()
+{
+ delete ui;
+}
+
+void IWIViewer::SetIWIFile(const IWIFile* aIWIFile) {
+ mIWIFile = aIWIFile;
+
+ ui->label_Title->setText(mIWIFile->fileStem + ".iwi");
+
+ // If you’re using Qt and want a QString:
+ QString magicStr = QString::fromLatin1(mIWIFile->header.Magic, 3);
+ ui->lineEdit_Magic->setText(magicStr);
+
+ ui->spinBox_Version->setValue(mIWIFile->header.Version);
+ ui->spinBox_Depth->setValue(mIWIFile->info.Depth);
+ QString formatStr = "";
+ switch (mIWIFile->info.Format) {
+ case IWI_FORMAT_ARGB32:
+ formatStr = "ARGB32";
+ break;
+ case IWI_FORMAT_RGB24:
+ formatStr = "RGB24";
+ break;
+ case IWI_FORMAT_GA16:
+ formatStr = "GA16";
+ break;
+ case IWI_FORMAT_A8:
+ formatStr = "A8";
+ break;
+ case IWI_FORMAT_DXT1:
+ formatStr = "DXT1";
+ break;
+ case IWI_FORMAT_DXT3:
+ formatStr = "DXT3";
+ break;
+ case IWI_FORMAT_DXT5:
+ formatStr = "DXT5";
+ break;
+ }
+ ui->lineEdit_Format->setText(formatStr);
+ ui->spinBox_Height->setValue(mIWIFile->info.Height);
+ ui->spinBox_Width->setValue(mIWIFile->info.Width);
+ ui->spinBox_Usage->setValue(mIWIFile->info.Usage);
+
+ ui->comboBox_Mipmap->clear();
+ for (auto mipmap : mIWIFile->mipmaps) {
+ ui->comboBox_Mipmap->addItem(QString::number(mipmap.offset));
+ }
+
+ connect(ui->comboBox_Mipmap, &QComboBox::currentIndexChanged, this, &IWIViewer::MipmapIndexChanged);
+
+ if (!mIWIFile->mipmaps.empty()) {
+ MipmapIndexChanged(0);
+ }
+}
+
+void IWIViewer::MipmapIndexChanged(int aMipmapIndex) {
+ auto mipmaps = mIWIFile->mipmaps;
+
+ if (aMipmapIndex == -1) { return; }
+
+ auto mipmap = mipmaps[aMipmapIndex];
+ ui->spinBox_MipmapSize->setValue(mipmap.size);
+ ui->spinBox_MipmapOffset->setValue(mipmap.offset);
+
+ const unsigned char* imageData = reinterpret_cast(mipmap.data.constData());
+ QImage image(reinterpret_cast(imageData),
+ mIWIFile->info.Width, mIWIFile->info.Height,
+ QImage::Format_RGBA8888);
+
+ if (image.isNull()) {
+ qDebug() << "Error: QImage creation failed!";
+ return;
+ }
+
+ // Convert to QPixmap
+ QPixmap pixmap = QPixmap::fromImage(image);
+ if (pixmap.isNull()) {
+ qDebug() << "Error: QPixmap conversion failed!";
+ return;
+ }
+
+ // Scale and display
+ pixmap = pixmap.scaled(ui->label_Image->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation);
+ ui->label_Image->setPixmap(pixmap);
+}
diff --git a/app/iwiviewer.h b/app/iwiviewer.h
index 86f5105..f83982f 100644
--- a/app/iwiviewer.h
+++ b/app/iwiviewer.h
@@ -1,27 +1,27 @@
-#ifndef IWIVIEWER_H
-#define IWIVIEWER_H
-
-#include "iwifile.h"
-#include
-
-namespace Ui {
-class IWIViewer;
-}
-
-class IWIViewer : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit IWIViewer(QWidget *parent = nullptr);
- ~IWIViewer();
-
- void MipmapIndexChanged(int aMipmapIndex);
-
- void SetIWIFile(std::shared_ptr aIWIFile);
-private:
- Ui::IWIViewer *ui;
- std::shared_ptr mIWIFile;
-};
-
-#endif // IWIVIEWER_H
+#ifndef IWIVIEWER_H
+#define IWIVIEWER_H
+
+#include "iwifile.h"
+#include
+
+namespace Ui {
+class IWIViewer;
+}
+
+class IWIViewer : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit IWIViewer(QWidget *parent = nullptr);
+ ~IWIViewer();
+
+ void MipmapIndexChanged(int aMipmapIndex);
+
+ void SetIWIFile(const IWIFile *aIWIFile);
+private:
+ Ui::IWIViewer *ui;
+ const IWIFile* mIWIFile;
+};
+
+#endif // IWIVIEWER_H
diff --git a/app/iwiviewer.ui b/app/iwiviewer.ui
index 657df71..d184905 100644
--- a/app/iwiviewer.ui
+++ b/app/iwiviewer.ui
@@ -1,548 +1,548 @@
-
-
- IWIViewer
-
-
-
- 0
- 0
- 1246
- 909
-
-
-
- Form
-
-
- -
-
-
-
- Roboto
- 16
- true
-
-
-
- IWI File 0
-
-
-
- -
-
-
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Header
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Magic:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Version:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- B
-
-
- 1000000000
-
-
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Info
-
-
-
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Depth:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
- -
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Format
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
-
-
-
- -
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Height:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
- -
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Width:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
- -
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Usage
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Mipmaps
-
-
-
-
-
-
-
-
-
-
- Roboto
- 9
-
-
-
- Qt::Orientation::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Select Mipmap:
-
-
-
- -
-
-
-
- 60
- 0
-
-
-
-
- Roboto
- 9
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Qt::Orientation::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Size:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Offset:
-
-
-
- -
-
-
- false
-
-
-
- Roboto
- 9
-
-
-
- 1000000000
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- Roboto
- 9
-
-
-
- Preview
-
-
-
-
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
-
- 600
- 600
-
-
-
-
- 600
- 600
-
-
-
-
- Roboto
- 9
-
-
-
- border: 2px solid white;
-
-
-
-
-
- Qt::AlignmentFlag::AlignCenter
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 116
-
-
-
-
-
-
-
-
-
+
+
+ IWIViewer
+
+
+
+ 0
+ 0
+ 1246
+ 909
+
+
+
+ Form
+
+
+ -
+
+
+
+ Roboto
+ 16
+ true
+
+
+
+ IWI File 0
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Header
+
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Magic:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Version:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ B
+
+
+ 1000000000
+
+
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Info
+
+
+
-
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Depth:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+ -
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Format
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Height:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+ -
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Width:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+ -
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Usage
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Mipmaps
+
+
+
-
+
+
-
+
+
+
+ Roboto
+ 9
+
+
+
+ Qt::Orientation::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Select Mipmap:
+
+
+
+ -
+
+
+
+ 60
+ 0
+
+
+
+
+ Roboto
+ 9
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Qt::Orientation::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Size:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Offset:
+
+
+
+ -
+
+
+ false
+
+
+
+ Roboto
+ 9
+
+
+
+ 1000000000
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ Roboto
+ 9
+
+
+
+ Preview
+
+
+
-
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
+
+ 600
+ 600
+
+
+
+
+ 600
+ 600
+
+
+
+
+ Roboto
+ 9
+
+
+
+ border: 2px solid white;
+
+
+
+
+
+ Qt::AlignmentFlag::AlignCenter
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 116
+
+
+
+
+
+
+
+
+
diff --git a/app/localstringviewer.cpp b/app/localstringviewer.cpp
index 6550668..1563ed2 100644
--- a/app/localstringviewer.cpp
+++ b/app/localstringviewer.cpp
@@ -1,59 +1,58 @@
-#include "localstringviewer.h"
-#include "ui_localstringviewer.h"
-
-LocalStringViewer::LocalStringViewer(QWidget *parent)
- : QWidget(parent)
- , ui(new Ui::LocalStringViewer),
- mVersion(),
- mConfigPath(),
- mFileNotes() {
- ui->setupUi(this);
-
- ui->tableWidget_Strings->setColumnCount(2);
- ui->tableWidget_Strings->setColumnWidth(0, 200);
- ui->tableWidget_Strings->horizontalHeader()->setStretchLastSection(true);
-}
-
-LocalStringViewer::~LocalStringViewer() {
- delete ui;
-}
-
-void LocalStringViewer::SetVersion(quint32 aVersion) {
- mVersion = aVersion;
-
- ui->spinBox_Version->setValue(mVersion);
-}
-
-void LocalStringViewer::SetConfigPath(const QString aConfigPath) {
- mConfigPath = aConfigPath;
-
- ui->lineEdit_Config->setText(mConfigPath);
-}
-
-void LocalStringViewer::SetFileNotes(const QString aFileNotes) {
- mFileNotes = aFileNotes;
-
- ui->plainTextEdit_FileNotes->setPlainText(mFileNotes);
-}
-
-void LocalStringViewer::AddLocalString(LocalString aLocalString) {
- mLocalStrings << aLocalString;
-
- ui->tableWidget_Strings->setRowCount(mLocalStrings.size());
-
- QTableWidgetItem *aliasItem = new QTableWidgetItem(aLocalString.alias);
- QTableWidgetItem *stringItem = new QTableWidgetItem(aLocalString.string);
-
- ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 0, aliasItem);
- ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 1, stringItem);
-}
-
-void LocalStringViewer::SetZoneFile(std::shared_ptr aZoneFile) {
- mLocalStrings.clear();
- ui->tableWidget_Strings->clear();
-
- ui->label_Title->setText(aZoneFile->GetStem().section('.', 0, 0) + ".str");
- for (LocalString localStr : aZoneFile->GetAssetMap().localStrings) {
- AddLocalString(localStr);
- }
-}
+#include "localstringviewer.h"
+#include "ui_localstringviewer.h"
+
+LocalStringViewer::LocalStringViewer(QWidget *parent)
+ : QWidget(parent)
+ , ui(new Ui::LocalStringViewer),
+ mVersion(),
+ mConfigPath(),
+ mFileNotes() {
+ ui->setupUi(this);
+
+ ui->tableWidget_Strings->setColumnCount(2);
+ ui->tableWidget_Strings->setRowCount(0);
+ ui->tableWidget_Strings->setColumnWidth(0, 200);
+ ui->tableWidget_Strings->horizontalHeader()->setStretchLastSection(true);
+}
+
+LocalStringViewer::~LocalStringViewer() {
+ delete ui;
+}
+
+void LocalStringViewer::SetVersion(quint32 aVersion) {
+ mVersion = aVersion;
+
+ ui->spinBox_Version->setValue(mVersion);
+}
+
+void LocalStringViewer::SetConfigPath(const QString aConfigPath) {
+ mConfigPath = aConfigPath;
+
+ ui->lineEdit_Config->setText(mConfigPath);
+}
+
+void LocalStringViewer::SetFileNotes(const QString aFileNotes) {
+ mFileNotes = aFileNotes;
+
+ ui->plainTextEdit_FileNotes->setPlainText(mFileNotes);
+}
+
+void LocalStringViewer::AddLocalString(XLocalizeEntry aLocalString) {
+ mLocalStrings.append(aLocalString);
+ ui->tableWidget_Strings->setRowCount(mLocalStrings.size());
+ ui->groupBox_LocalStrViewer->setTitle(QString("Entries (%1)").arg(mLocalStrings.size()));
+ QTableWidgetItem *aliasItem = new QTableWidgetItem(aLocalString.GetValue()->GetString());
+ QTableWidgetItem *stringItem = new QTableWidgetItem(aLocalString.GetName()->GetString());
+ ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 0, aliasItem);
+ ui->tableWidget_Strings->setItem(mLocalStrings.size() - 1, 1, stringItem);
+}
+
+void LocalStringViewer::SetZoneFile(const ZoneFile* aZoneFile) {
+ mLocalStrings.clear();
+ ui->tableWidget_Strings->clear();
+
+ ui->label_Title->setText(aZoneFile->GetStem().section('.', 0, 0) + ".str");
+ // for (const LocalString &localStr : aZoneFile->GetAssetMap().localStrings) {
+ // AddLocalString(localStr);
+ // }
+}
diff --git a/app/localstringviewer.h b/app/localstringviewer.h
index b2c8566..62b30bc 100644
--- a/app/localstringviewer.h
+++ b/app/localstringviewer.h
@@ -1,34 +1,34 @@
-#ifndef LOCALSTRINGVIEWER_H
-#define LOCALSTRINGVIEWER_H
-
-#include "asset_structs.h"
-#include "zonefile.h"
-#include
-
-namespace Ui {
-class LocalStringViewer;
-}
-
-class LocalStringViewer : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit LocalStringViewer(QWidget *parent = nullptr);
- ~LocalStringViewer();
-
- void SetVersion(quint32 aVersion);
- void SetConfigPath(const QString aConfigPath);
- void SetFileNotes(const QString aFileNotes);
- void AddLocalString(LocalString aLocalString);
- void SetZoneFile(std::shared_ptr aZoneFile);
-
-private:
- Ui::LocalStringViewer *ui;
- quint32 mVersion;
- QString mConfigPath;
- QString mFileNotes;
- QVector mLocalStrings;
-};
-
-#endif // LOCALSTRINGVIEWER_H
+#ifndef LOCALSTRINGVIEWER_H
+#define LOCALSTRINGVIEWER_H
+
+#include "xlocalizeentry.h"
+#include "zonefile.h"
+#include
+
+namespace Ui {
+class LocalStringViewer;
+}
+
+class LocalStringViewer : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit LocalStringViewer(QWidget *parent = nullptr);
+ ~LocalStringViewer();
+
+ void SetVersion(quint32 aVersion);
+ void SetConfigPath(const QString aConfigPath);
+ void SetFileNotes(const QString aFileNotes);
+ void AddLocalString(XLocalizeEntry aLocalString);
+ void SetZoneFile(const ZoneFile *aZoneFile);
+
+private:
+ Ui::LocalStringViewer *ui;
+ quint32 mVersion;
+ QString mConfigPath;
+ QString mFileNotes;
+ QVector mLocalStrings;
+};
+
+#endif // LOCALSTRINGVIEWER_H
diff --git a/app/localstringviewer.ui b/app/localstringviewer.ui
index bdd547e..112cbf8 100644
--- a/app/localstringviewer.ui
+++ b/app/localstringviewer.ui
@@ -1,194 +1,194 @@
-
-
- LocalStringViewer
-
-
-
- 0
- 0
- 841
- 457
-
-
-
-
- 841
- 457
-
-
-
- Form
-
-
- -
-
-
-
- Roboto
- 16
- true
-
-
-
- LocalString File 0
-
-
-
- -
-
-
-
-
-
-
-
-
-
- 325
- 398
-
-
-
-
- 325
- 16777215
-
-
-
-
- Roboto
- 9
-
-
-
- Header
-
-
-
-
-
-
- File Notes:
-
-
- Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
-
-
-
- -
-
-
- Version:
-
-
-
- -
-
-
- false
-
-
- C:\cod5\cod\cod5\bin\StringEd.cfg
-
-
-
- -
-
-
- Config:
-
-
-
- -
-
-
- ...
-
-
-
- -
-
-
- false
-
-
- 10000
-
-
- 1
-
-
-
- -
-
-
- Files notes...
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
- -
-
-
-
- 400
- 400
-
-
-
-
- Roboto
- 9
-
-
-
- Entries
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Orientation::Vertical
-
-
-
- 20
- 0
-
-
-
-
-
-
-
-
-
+
+
+ LocalStringViewer
+
+
+
+ 0
+ 0
+ 841
+ 457
+
+
+
+
+ 841
+ 457
+
+
+
+ Form
+
+
+ -
+
+
+
+ Roboto
+ 16
+ true
+
+
+
+ LocalString File 0
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+ 325
+ 398
+
+
+
+
+ 325
+ 16777215
+
+
+
+
+ Roboto
+ 9
+
+
+
+ Header
+
+
+
-
+
+
+ File Notes:
+
+
+ Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop
+
+
+
+ -
+
+
+ Version:
+
+
+
+ -
+
+
+ false
+
+
+ C:\cod5\cod\cod5\bin\StringEd.cfg
+
+
+
+ -
+
+
+ Config:
+
+
+
+ -
+
+
+ ...
+
+
+
+ -
+
+
+ false
+
+
+ 10000
+
+
+ 1
+
+
+
+ -
+
+
+ Files notes...
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ 400
+ 400
+
+
+
+
+ Roboto
+ 9
+
+
+
+ Entries
+
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Orientation::Vertical
+
+
+
+ 20
+ 0
+
+
+
+
+
+
+
+
+
diff --git a/app/main.cpp b/app/main.cpp
index fd3e533..aff48df 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -1,11 +1,11 @@
-#include "mainwindow.h"
-
-#include
-
-int main(int argc, char *argv[])
-{
- QApplication a(argc, argv);
- MainWindow w;
- w.show();
- return a.exec();
-}
+#include "mainwindow.h"
+
+#include
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+ w.show();
+ return a.exec();
+}
diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
index 565b339..c177e21 100644
--- a/app/mainwindow.cpp
+++ b/app/mainwindow.cpp
@@ -1,902 +1,977 @@
-#include "mainwindow.h"
-#include "aboutdialog.h"
-#include "fastfile.h"
-#include "materialviewer.h"
-#include "preferenceeditor.h"
-#include "soundviewer.h"
-#include "stringtableviewer.h"
-#include "techsetviewer.h"
-#include "ui_mainwindow.h"
-#include "compression.h"
-#include "fastfile_factory.h"
-#include "iwifile.h"
-#include "ddsfile.h"
-#include "statusbarmanager.h"
-#include "ddsviewer.h"
-#include "fastfileviewer.h"
-#include "ipak_structs.h"
-#include "iwiviewer.h"
-#include "localstringviewer.h"
-#include "imagewidget.h"
-#include "xtreewidget.h"
-#include "zonefileviewer.h"
-#include "techsetviewer.h"
-#include "logmanager.h"
-
-#include
-
-MainWindow::MainWindow(QWidget *parent)
- : QMainWindow(parent), ui(new Ui::MainWindow) {
- ui->setupUi(this);
-
- setAcceptDrops(true);
-
- mTypeMap = QMap();
- mTypeOrder = QStringList();
- mRawFileMap = QMap();
- mImageMap = QMap();
- mTreeMap = QMap();
- mStrTableMap = QMap>>();
- mBSPVersion = 0;
- mDiskLumpCount = 0;
- mDiskLumpOrder = QVector();
- mLumps = QMap();
- mTreeWidget = new XTreeWidget(this);
- mLogWidget = new QPlainTextEdit(this);
-
- //ModelViewer *mModelViewer = new ModelViewer(container);
- //mModelViewer->setAcceptDrops(false);
-
- mProgressBar = new QProgressBar(this);
- mProgressBar->setMaximum(100); // Default max value
- mProgressBar->setVisible(false); // Initially hidden
-
- connect(&StatusBarManager::instance(), &StatusBarManager::statusUpdated,
- this, &MainWindow::HandleStatusUpdate);
-
- connect(&StatusBarManager::instance(), &StatusBarManager::progressUpdated,
- this, &MainWindow::HandleProgressUpdate);
-
- connect(&LogManager::instance(), &LogManager::entryAdded,
- this, &MainWindow::HandleLogEntry);
-
- statusBar()->addPermanentWidget(mProgressBar);
-
- connect(ui->actionPreferences, &QAction::triggered, this, [this](bool checked) {
- Q_UNUSED(checked);
-
- PreferenceEditor *prefEditor = new PreferenceEditor(this);
- prefEditor->exec();
- });
-
- ui->tabWidget->setContextMenuPolicy(Qt::CustomContextMenu);
- connect(ui->tabWidget, &QTabWidget::customContextMenuRequested, this, [this](const QPoint &pos) {
- if (pos.isNull())
- return;
-
- int tabIndex = ui->tabWidget->tabBar()->tabAt(pos);
- QMenu *contextMenu = new QMenu(this);
-
- QAction *closeAction = new QAction("Close");
- contextMenu->addAction(closeAction);
- connect(closeAction, &QAction::triggered, this, [this, &tabIndex](bool checked) {
- Q_UNUSED(checked);
-
- ui->tabWidget->removeTab(tabIndex);
- });
-
- QMenu *closeMultipleAction = new QMenu("Close Multiple Tabs");
-
- QAction *closeAllAction = new QAction("Close All");
- closeMultipleAction->addAction(closeAllAction);
- connect(closeAllAction, &QAction::triggered, this, [this](bool checked) {
- Q_UNUSED(checked);
-
- ui->tabWidget->clear();
- });
-
- QAction *closeAllButAction = new QAction("Close All BUT This");
- closeMultipleAction->addAction(closeAllButAction);
- connect(closeAllButAction, &QAction::triggered, this, [this, &tabIndex](bool checked) {
- Q_UNUSED(checked);
-
- for (int i = 0; i < ui->tabWidget->count(); i++) {
- if (i != tabIndex) {
- ui->tabWidget->removeTab(i);
- }
- }
- });
-
- QAction *closeLeftAction = new QAction("Close All to the Left");
- closeMultipleAction->addAction(closeLeftAction);
- connect(closeLeftAction, &QAction::triggered, this, [this, &tabIndex](bool checked) {
- Q_UNUSED(checked);
-
- for (int i = 0; i < tabIndex; i++) {
- ui->tabWidget->removeTab(i);
- }
- });
-
- QAction *closeRightAction = new QAction("Close All to the Right");
- closeMultipleAction->addAction(closeRightAction);
- connect(closeRightAction, &QAction::triggered, this, [this, &tabIndex](bool checked) {
- Q_UNUSED(checked);
-
- for (int i = tabIndex + 1; i < ui->tabWidget->count(); i++) {
- ui->tabWidget->removeTab(i);
- }
- });
-
- contextMenu->addMenu(closeMultipleAction);
-
- QPoint pt(pos);
- contextMenu->exec(ui->tabWidget->mapToGlobal(pt));
-
- delete contextMenu;
- });
-
- connect(ui->tabWidget, &QTabWidget::tabCloseRequested, this, [this](int index) {
- ui->tabWidget->removeTab(index);
- });
-
- connect(mTreeWidget, &XTreeWidget::Cleared, this, [this]() {
- ui->tabWidget->clear();
- });
-
- connect(mTreeWidget, &XTreeWidget::RawFileSelected, this, [this](std::shared_ptr rawFile, const QString aParentName) {
- QPlainTextEdit *scriptEditor = new QPlainTextEdit(this);
- scriptEditor->setAcceptDrops(false);
- scriptEditor->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
-
- if (rawFile->contents.isEmpty()) {
- scriptEditor->setPlainText("EMPTY");
- } else {
- scriptEditor->setPlainText(rawFile->contents);
- }
-
- QString fileStem = rawFile->path.split('/').last();
- for (int i = 0; i < ui->tabWidget->count(); i++) {
- if (ui->tabWidget->tabText(i) == fileStem) {
- return;
- }
- }
-
- QScrollArea *scrollArea = new QScrollArea(ui->tabWidget);
- scrollArea->layout()->addWidget(scriptEditor);
-
- ui->tabWidget->addTab(scrollArea, fileStem);
- ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, QIcon(":/icons/icons/Icon_GSCFile.png"));
- ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
- });
-
- connect(mTreeWidget, &XTreeWidget::ImageSelected, this, [this](std::shared_ptr image, const QString aParentName) {
- ImageWidget *mImageWidget = new ImageWidget(this);
- mImageWidget->setAcceptDrops(false);
- mImageWidget->SetImage(image);
- mImageWidget->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
-
- QString fileStem = image->materialName;
- for (int i = 0; i < ui->tabWidget->count(); i++) {
- if (ui->tabWidget->tabText(i) == fileStem) {
- return;
- }
- }
-
- ui->tabWidget->addTab(mImageWidget, fileStem);
- ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, QIcon(":/icons/icons/Icon_Image.png"));
- ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
- });
-
- connect(mTreeWidget, &XTreeWidget::MenuSelected, this, [](std::shared_ptr