Compare commits

...

521 Commits

Author SHA1 Message Date
njohnson
91a79f78cc Refactor: Improve file handling for opening files. 2025-09-15 18:52:21 -04:00
njohnson
8d5e5812ec Refactor: Updated compression functions for LZX format. 2025-09-15 18:52:05 -04:00
njohnson
622323117a Refactor: Improved encryption library performance and stability. 2025-09-15 18:51:45 -04:00
njohnson
2fdbe74a4a Refactor: Update decompression logic for WiiU platform. 2025-09-15 18:51:28 -04:00
njohnson
13af32ed2d Refactor: Improve fastfile decoding. 2025-09-15 18:51:04 -04:00
njohnson
dd00cee809 Update fastfileCod12_pc.cpp: Improve ZLib decompression efficiency and add export functionality. 2025-09-15 18:50:39 -04:00
njohnson
34cafac121 Refactor: Update FastFileFactory and Open to use same parsing logic. 2025-09-15 18:50:18 -04:00
njohnson
4bf4c12159 Refactor: Use of FastFileFactory replaced with FastFile::Open for Factory ingest tests. 2025-09-15 18:50:09 -04:00
njohnson
754c563515 Refactor: Update FastFile::Open to use consistent filename parsing. 2025-09-15 18:49:54 -04:00
njohnson
ea1a829957 Refactored compression and encryption. 2025-09-15 18:49:42 -04:00
njohnson
ccb956a834 Refactor: Replace hardcoded file paths with fastFilePath in testFactory() methods. 2025-09-15 18:49:25 -04:00
njohnson
ba83aa5247 Lotta changes 2025-09-10 21:58:26 -04:00
njohnson
324e84eafc Refactor: Default destructor for XCLeafBrushNodeLeaf 2025-09-10 21:57:09 -04:00
njohnson
e290f2aca9 Implement TODO: ParseData for XCLeafBrushNodeLeaf 2025-09-10 21:57:08 -04:00
njohnson
b13001ac90 Fix: Use XDataStream for parsing 2025-09-10 21:57:07 -04:00
njohnson
1e24a2cc81 Fix: Set name in constructor 2025-09-10 21:57:07 -04:00
njohnson
631dbdfa53 Fix: Use XDataStream in ParseData 2025-09-10 21:57:06 -04:00
njohnson
fbf295f2a8 Fix: Parse data stream for XCLeafBrushNodeChildren 2025-09-10 21:57:05 -04:00
njohnson
00c84fd622 Fix: Use qint32 for mContents 2025-09-10 21:57:04 -04:00
njohnson
a8cee21ae8 Fix: ParseData method implementation 2025-09-10 21:57:04 -04:00
njohnson
48d7c3e692 Refactor: Use QVector3D for leaf min/max coordinates 2025-09-10 21:57:03 -04:00
njohnson
c7291b567f Fixes: Parse data from XDataStream 2025-09-10 21:57:02 -04:00
njohnson
ecb0e528c2 Fix: Use XDataStream for parsing 2025-09-10 21:57:01 -04:00
njohnson
2de65b22ec Refactor: ParseData - Use XDataStream instead of QDataStream 2025-09-10 21:57:00 -04:00
njohnson
a01d07ce41 Refactor: Use XDataStream for data parsing 2025-09-10 21:56:59 -04:00
njohnson
348bf2a299 Refactor ParseData to handle data parsing. 2025-09-10 21:56:59 -04:00
njohnson
37c81d78ce Fix: Use qint32 for platform ID 2025-09-10 21:56:58 -04:00
njohnson
33052d2e11 Fix: Correctly parse platform integer from data stream. 2025-09-10 21:56:57 -04:00
njohnson
4603ebd7cf Refactor: Update ParseData to use XDataStream 2025-09-10 21:56:56 -04:00
njohnson
00f0a8a828 Refactor: Add TODO for ParseData implementation. 2025-09-10 21:56:55 -04:00
njohnson
367e4e012e Refactor: Change QDataStream to XDataStream in ParseData 2025-09-10 21:56:54 -04:00
njohnson
3bf4e8b0e5 Refactor: Parse data for XBoneInfo 2025-09-10 21:56:54 -04:00
njohnson
39a5a75333 Fix: Update data stream type in ParseData() 2025-09-10 21:56:53 -04:00
njohnson
20f4dcd798 Fix: Set name and parse surfId 2025-09-10 21:56:52 -04:00
njohnson
8398156122 Refactor: Change QDataStream to XDataStream in ParseData 2025-09-10 21:56:51 -04:00
njohnson
8136ba1d34 Fix: Add missing Clear() implementation for XAudioXmaLoopRegion. 2025-09-10 21:56:51 -04:00
njohnson
2c18b939e7 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:56:50 -04:00
njohnson
01d2b95417 Add XMA format parsing data fields 2025-09-10 21:56:49 -04:00
njohnson
8cfb82e03d Fix: Use qint32 for mTotalMsec 2025-09-10 21:56:48 -04:00
njohnson
2d8d34bab8 Fix: Add XAsset constructor
This commit adds the `XAsset` constructor to the `XAudioXmaDataInfo` class.
2025-09-10 21:56:48 -04:00
njohnson
6e772cb6b7 Refactor: ParseData to accept XDataStream* 2025-09-10 21:56:47 -04:00
njohnson
32ce8e350f Implement basic XAudioStreamInfo parsing and initialization. 2025-09-10 21:56:46 -04:00
njohnson
73ab1a368a Refactor: Use XDataStream instead of QDataStream 2025-09-10 21:56:45 -04:00
njohnson
d9aa25c4af Fix: Parse audio source format data 2025-09-10 21:56:44 -04:00
njohnson
d18cfb6968 Fix: Rename QDataStream to XDataStream 2025-09-10 21:56:44 -04:00
njohnson
924e448270 Fix: Set name in constructor 2025-09-10 21:56:43 -04:00
njohnson
4dc402fd16 Refactor: Use XDataStream instead of QDataStream 2025-09-10 21:56:42 -04:00
njohnson
8b802028e9 Fix: Parse size and data pointer from stream 2025-09-10 21:56:41 -04:00
njohnson
f6a20c873a Refactor: Use qint32 for preset overridden value 2025-09-10 21:56:41 -04:00
njohnson
4e4422466c Fix: Set name in constructor. 2025-09-10 21:56:40 -04:00
njohnson
3bf032d2e0 Fix: Rename QDataStream to XDataStream in ParseData 2025-09-10 21:56:39 -04:00
njohnson
3d378b28c9 Fix: Improve data parsing
This commit updates the data parsing logic within the XAudioPacketAligned class. Specifically, it uses `ParseInt32` and `ParseInt8` instead of direct data stream reading, improving type safety and ensuring correct data handling during parsing.
2025-09-10 21:56:38 -04:00
njohnson
1f7ca563bf Refactor: Use XDataStream for parsing XAudioXmaFormat 2025-09-10 21:56:37 -04:00
njohnson
f6a0ff580c Implement TODO: ParseData(...) for XAudioFormatInfo 2025-09-10 21:56:36 -04:00
njohnson
b9e858a6d5 Refactor: Use XDataStream instead of QDataStream 2025-09-10 21:56:36 -04:00
njohnson
f88eeec7ee Fix: Parse Data Handling
This commit updates the `ParseData` method to correctly parse input channel, output channel and volume from the `XDataStream`.
2025-09-10 21:56:35 -04:00
njohnson
9c6c55fe75 Refactor: Change QDataStream to XDataStream in ParseData 2025-09-10 21:56:34 -04:00
njohnson
e6f2932ef1 Fix: Parse entry count and entries ptr 2025-09-10 21:56:33 -04:00
njohnson
8c1f9539c7 Refactor: Use XDataStream for parsing 2025-09-10 21:56:32 -04:00
njohnson
21379d133d Fix: Parse data for asset list 2025-09-10 21:56:32 -04:00
njohnson
6e58c8fc2f The change is a minor one: the prompt to Ollama has been modified from "Write a clear, concise Git commit message for changes in file: $FILE." to "Write a SHORT, clear, concise Git commit message for changes in file: $FILE.". This prioritizes shorter messages in the commit messages. 2025-09-10 21:56:31 -04:00
njohnson
10db1eec7d Refactor: Implement default destructor and rename ParseData method
This commit implements the default destructor for `XAssetHeader` and renames the `ParseData` method to `ParseData` to align with the `XDataStream` interface.
2025-09-10 21:56:11 -04:00
njohnson
d267ad19f5 Fix: Parse Raw Asset Type and Asset Pointer
Adds parsing logic for the raw asset type and asset pointer within the `XAssetHeader` class. This enables the retrieval of these values during data stream parsing, facilitating asset identification and management.
2025-09-10 21:56:10 -04:00
njohnson
99d2885f9c Fix: Replace QDataStream with XDataStream
This commit replaces the use of `QDataStream` with `XDataStream` in the `XAsset` class. This aligns the code with the current XAssets framework and promotes consistency.
2025-09-10 21:56:08 -04:00
njohnson
0545bfe642 Fix: Improve Data Parsing and Debug Logging
This commit addresses an issue in the `XAsset` class's data parsing logic, specifically within the `ParsePtr` method. The previous implementation lacked proper parsing of the integer value associated with the asset's pointer. Additionally, the debug logging during data parsing was overly verbose and included unnecessary hexadecimal conversions. The fix ensures correct integer parsing and simplifies the debug logging output for easier debugging.
2025-09-10 21:56:07 -04:00
njohnson
7e408d2c2e Refactor: Default destructor for XAnimPartTransFrames 2025-09-10 21:56:06 -04:00
njohnson
512b9bae61 Fix: Parse data from XDataStream
The `ParseData` function was incorrectly using a `QDataStream` to parse data. It has been updated to correctly use an `XDataStream` for parsing, resolving parsing issues.
2025-09-10 21:56:05 -04:00
njohnson
0f10bf9375 Fix: Default destructor for XAnimPartTransData
The destructor was missing a `= default;` specifier, which is now added to ensure proper object cleanup.
2025-09-10 21:56:04 -04:00
njohnson
63468fa91e Fix: Set name for Animation Part Trans Data
This commit sets the name for the XAnimPartTransData object, ensuring consistent identification within the XAssets framework.
2025-09-10 21:56:03 -04:00
njohnson
d9f6e13bdf Refactor: Default destructor for XAnimPartTrans
This commit introduces a default destructor for the `XAnimPartTrans` class, simplifying the code and ensuring proper resource cleanup.
2025-09-10 21:56:02 -04:00
njohnson
e512636ad6 Fix: Parse data for XAnimPartTrans
This commit fixes the parsing logic for the `XAnimPartTrans` class, ensuring that the size and small trans flags are correctly parsed from the data stream. It uses `ParseUInt32` and `ParseUInt8` for better type handling and includes informative strings for debugging.
2025-09-10 21:56:01 -04:00
njohnson
f2769e689f Fix: Use XDataStream for parsing
This commit updates the parsing mechanism within XAnimParts to utilize `XDataStream` instead of `QDataStream`. This aligns with the codebase's evolving data handling conventions and ensures consistency in data parsing operations.
2025-09-10 21:56:00 -04:00
njohnson
9898a03417 Refactor: Improve data parsing for XAnimParts
This commit refactors the data parsing logic for XAnimParts to improve clarity and maintainability. It replaces the use of raw `*aStream` with `aStream->ParseUIntX()` for all data fields. This approach simplifies the code and enhances readability by explicitly stating the data type being parsed. Furthermore, the message has been updated to reflect the name change of this asset.
2025-09-10 21:55:59 -04:00
njohnson
7174f1fe22 Refactor: Implement default destructor for XAnimNotifyInfo
This commit implements a default destructor for the `XAnimNotifyInfo` class.
2025-09-10 21:55:57 -04:00
njohnson
4480eb83d7 Fix: Handle Animation Notify Info parsing
This commit fixes an issue in the parsing of Animation Notify Info data.
Specifically, the parsing logic for `mName` and `mTime` was incorrect.
The fix adds proper parsing implementation, ensuring that the data is
correctly loaded during deserialization.
2025-09-10 21:55:56 -04:00
njohnson
5ee673175c Refactor: Implement XDataStream for ParseData 2025-09-10 21:55:55 -04:00
njohnson
86885f999c Fix: Parse Animation Indices data correctly
This commit fixes the parsing of `XAnimIndices` data, ensuring that the index is correctly parsed from the data stream, including handling the case where the index pointer is -1.
2025-09-10 21:55:54 -04:00
njohnson
2e4e0a6b99 Refactor: Implement default destructor for XAnimDynamicIndices 2025-09-10 21:55:53 -04:00
njohnson
338b50c694 Fix: Parse Animation Dynamic Indices Index
The animation dynamic indices parsing was incorrectly using the stream's `>>` operator.  The `XDataStream` class provides `ParseUInt8` for proper parsing of unsigned 8-bit integers, ensuring data integrity. This commit updates the parsing logic to use `ParseUInt8` and include a descriptive string for logging.
2025-09-10 21:55:52 -04:00
njohnson
20b57db193 Refactor: Update ParseData signature to XDataStream* 2025-09-10 21:55:51 -04:00
njohnson
7b61cff46d Fix: Parse frames from data stream
The frames were parsed incorrectly from the data stream. This commit fixes the parsing logic to properly read the frame data using `ParseUInt8` and includes a descriptive name for the asset.
2025-09-10 21:55:50 -04:00
njohnson
25728f9486 Fix: Use qint32 for mFramesPtr
The `mFramesPtr` member was previously defined as `quint32`, which is an unsigned 32-bit integer. This could lead to issues when storing negative values, which is possible for frame pointers. Changed the type to `qint32` (signed 32-bit integer) to allow for negative frame pointer values.
2025-09-10 21:55:49 -04:00
njohnson
8e215f13af Fix: Parse Data Stream
This commit fixes the parsing logic for the XAnimDeltaPartQuatDataFrames data stream, ensuring that the frames pointer, frame 0, and frame 1 are correctly parsed from the stream.
2025-09-10 21:55:48 -04:00
njohnson
a71607aae3 Fix: Rename QDataStream to XDataStream in ParseData
This commit replaces `QDataStream` with `XDataStream` in the `ParseData` method of `XAnimDeltaPartQuatData`. This aligns with the project's naming conventions for data streams.
2025-09-10 21:55:47 -04:00
njohnson
2ae9bf95a4 Fix: Add set name to constructor. 2025-09-10 21:55:46 -04:00
njohnson
08cf71cb02 Fix: Rename QDataStream to XDataStream in ParseData
The `ParseData` method was incorrectly using `QDataStream` instead of `XDataStream`. This commit changes the type from `QDataStream` to `XDataStream` to align with the project's data stream implementation.
2025-09-10 21:55:45 -04:00
njohnson
8f3fa82f64 Fix: Parse size from data stream
This commit fixes a parsing issue in `XAnimDeltaPartQuat` where the size of the data was not being correctly read from the data stream. It now uses `aStream->ParseUInt32()` to read the size, including a descriptive string for debugging.
2025-09-10 21:55:44 -04:00
njohnson
e40bee38af Refactor: Implement default destructor for XAnimDeltaPart
This commit implements a default destructor for the `XAnimDeltaPart` class, ensuring proper resource cleanup and adhering to best practices. The destructor is now implicitly generated, simplifying the codebase.
2025-09-10 21:55:43 -04:00
njohnson
2799108c7d Fix: Remove unused destructor
This commit removes the unused destructor from `XAnimDeltaPart`.
2025-09-10 21:55:42 -04:00
njohnson
e1be487b6b Refactor: Update platform and game enum values. 2025-09-10 21:55:41 -04:00
njohnson
383d6e2439 Refactor: Update data stream type for FFCompany parsing
This commit updates the data stream type for parsing FFCompany to use XDataStream instead of QDataStream, aligning with recent changes in the project.
2025-09-10 21:55:40 -04:00
njohnson
3452b73eb0 Refactor: Update data stream parsing functions for XDataStream
This commit updates the parsing functions within the FastFile class to use the XDataStream instead of the QDataStream. This change aligns the code with newer data stream implementations and improves maintainability.
2025-09-10 21:55:39 -04:00
njohnson
9dc45d3024 Refactor: Use XDataStream instead of QDataStream for WiiU COD9 parsing. 2025-09-10 21:55:38 -04:00
njohnson
dc0a8a1e3d Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:37 -04:00
njohnson
cf2102e182 Fix: Use XDataStream instead of QDataStream
This commit changes the code to use `XDataStream` instead of `QDataStream` for parsing the COD8 Wii file format. This aligns with the use of `XDataStream` in other parts of the FastFile library.
2025-09-10 21:55:36 -04:00
njohnson
6db6760a0a Fix: Use XDataStream instead of QDataStream for COD7 parsing. 2025-09-10 21:55:35 -04:00
njohnson
cdd0142759 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:34 -04:00
njohnson
4fbf77e661 Fix: Use XDataStream instead of QDataStream
Change the type of the data stream from `QDataStream` to `XDataStream` for consistency and to align with the rest of the codebase.
2025-09-10 21:55:33 -04:00
njohnson
8d31623138 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:32 -04:00
njohnson
acd14a2179 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:31 -04:00
njohnson
f09124f611 Fix: Use XDataStream instead of QDataStream
Change QDataStream to XDataStream for parsing data streams, ensuring compatibility with the new data format.
2025-09-10 21:55:31 -04:00
njohnson
ead2e4eaf7 Fix: Use XDataStream instead of QDataStream for COD4 PS3 fast file parsing. 2025-09-10 21:55:30 -04:00
njohnson
63ccc50de3 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:29 -04:00
njohnson
a753c24d9d Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:28 -04:00
njohnson
d4bf2e0796 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:27 -04:00
njohnson
2472cd5d1b Fix: Use XDataStream instead of QDataStream for COD7/COD9 parsing. 2025-09-10 21:55:26 -04:00
njohnson
7bfe92eb9c Fix: Use XDataStream instead of QDataStream for COD7/COD9 parsing. 2025-09-10 21:55:25 -04:00
njohnson
990d413673 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:25 -04:00
njohnson
b4f677f81b Fix: Use XDataStream instead of QDataStream for COD5 Fast File parsing. 2025-09-10 21:55:24 -04:00
njohnson
59dfc3f05e Fix: Use XDataStream instead of QDataStream for COD5 Fast File parsing. 2025-09-10 21:55:23 -04:00
njohnson
3d409fc1d4 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:22 -04:00
njohnson
ab437b460f Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:21 -04:00
njohnson
ff46687106 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:20 -04:00
njohnson
d7f099dc05 Fix: Use XDataStream and BigEndian for COD7/COD9 parsing
This commit corrects the byte order handling for the COD7/COD9 file parsing, utilizing `XDataStream` and `BigEndian` to ensure correct data interpretation.
2025-09-10 21:55:20 -04:00
njohnson
415156256a Fix: Use XDataStream and BigEndian for COD8/COD9
This commit replaces `QDataStream` with `XDataStream` and ensures `BigEndian` byte order is used, aligning with the specific requirements for COD8/COD9 file loading.
2025-09-10 21:55:18 -04:00
njohnson
c799f53687 Refactor: Use XDataStream instead of QDataStream for COD7/COD9 parsing. 2025-09-10 21:55:17 -04:00
njohnson
15ff5e65b1 Fix: Decompress ZLIB correctly
This commit fixes an issue where the ZLIB decompression was not being performed correctly after stripping hash blocks. The corrected code ensures that the decompressed data is properly handled.
2025-09-10 21:55:16 -04:00
njohnson
a3769f0bad Fix: Use XDataStream instead of QDataStream for COD4 360 file parsing. 2025-09-10 21:55:15 -04:00
njohnson
8a668620de Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:15 -04:00
njohnson
935634c9e2 Fix: Use XDataStream instead of QDataStream
Change QDataStream to XDataStream for parsing the fastfile data.
2025-09-10 21:55:14 -04:00
njohnson
d13e227eb9 Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:13 -04:00
njohnson
b977dbd183 Fix: Use XDataStream instead of QDataStream
Change QDataStream to XDataStream for improved compatibility and consistency.
2025-09-10 21:55:12 -04:00
njohnson
15399a2969 Fix: Handle endianness in SHA1 block expansion
Addresses a potential endianness issue in the SHA1 block expansion logic, using `#ifdef WORDS_BIGENDIAN` to ensure correct data access regardless of platform.
2025-09-10 21:55:11 -04:00
njohnson
bc3cc77a0a Fix: Use u32 for loop index in salsa20.cpp
This commit replaces the `int i` loop index with `u32 i` in the `ECRYPT_encrypt_bytes` function. This ensures consistency with the rest of the code, which uses `u32` for various indices and counts, and avoids potential warnings or errors related to type mismatches.
2025-09-10 21:55:10 -04:00
njohnson
dcd6d9bf7b Fix: Correctly initialize IV table values
This commit fixes a minor issue where the IV table initialization was slightly off, leading to incorrect values in some cases. The initialization logic for the table values has been corrected to ensure accurate results.
2025-09-10 21:55:09 -04:00
njohnson
ddcb00676a Remove warning about macro usage
This commit removes a warning message regarding the potential misuse of macros within the `ecrypt-portable.h` file. The message cautioned against using the macros in scenarios where side effects were intended, highlighting the importance of careful usage.  The warning was deemed overly restrictive and has been removed to allow for greater flexibility in how the macros are utilized, while still encouraging awareness of their specific behavior.
2025-09-10 21:55:08 -04:00
njohnson
73f9207839 Update enums for IWI_VERSION and IWI_FORMAT to reflect changes. 2025-09-10 21:55:06 -04:00
njohnson
bccbca87fa Add XDataStream class for convenient data parsing. 2025-09-10 21:55:05 -04:00
njohnson
a24fec5558 Add parsing methods for int8, uint8, int16, uint16, int32, uint32, int64, uint64, single, and double. Add debug output to each parsing method. 2025-09-10 21:55:04 -04:00
njohnson
c26ba7dcab Fix: Use XDataStream instead of QDataStream 2025-09-10 21:55:02 -04:00
njohnson
cadcd2d53c Update enums in libs/core/enums.h to improve code readability and maintainability. 2025-09-10 21:55:01 -04:00
njohnson
7eca939c06 Update: Add xdatastream.cpp and xdatastream.h to core.pro 2025-09-10 21:55:00 -04:00
njohnson
975567cdd4 Remove redundant LZO package notes. 2025-09-10 21:54:59 -04:00
njohnson
2df2d491ae Fix: Include correct lzo definitions header 2025-09-10 21:54:58 -04:00
njohnson
9b4852f393 Update build dependencies for compression library. 2025-09-10 21:54:57 -04:00
njohnson
f3d0abb65e ```
Commit message:
Fix: Resolve compilation issues with XCompress and Minilzo.
```
2025-09-10 21:54:57 -04:00
njohnson
9a5ae3bf51 Refactor: Simplify export zone file action and use lambda expressions. 2025-09-10 21:54:55 -04:00
njohnson
d11783ebfc Fix: Use XDataStream instead of QDataStream 2025-09-10 21:54:54 -04:00
njohnson
f5eebe6743 TODO: Implement MaterialViewer::SetMaterial to process XMaterial data. 2025-09-10 21:54:54 -04:00
njohnson
b8c7bdb1ba Fix: Corrected loop conditions in IPAK loading
This commit fixes a potential off-by-one error in the IPAK loading logic. The loop conditions in the `LoadFile_IPAK` function were incorrect, leading to incorrect handling of data chunks. The loop conditions have been corrected to ensure that all data chunks are processed correctly.
2025-09-10 21:54:53 -04:00
njohnson
87bbe47e7e Fix: Corrected library dependencies in .pro file 2025-09-10 21:54:51 -04:00
njohnson
1ff6475fdb This is a well-structured and functional script that automates committing changes in a Git repository using Ollama to generate commit messages. Here's a breakdown of the script and some potential improvements:
**Explanation:**

1. **`#!/bin/bash`**:  Shebang line, specifying the script should be executed with Bash.

2. **`set -e`**:  This crucial line ensures that the script exits immediately if any command fails. This prevents unexpected behavior and makes debugging easier.

3. **`git add -A`**: Stages all changes in the repository for commit.

4. **`FILES=$(git diff --cached --name-only)`**: This line retrieves a list of staged files from the Git index.  `--cached` ensures it only includes staged files, and `--name-only` provides just the filenames.

5. **`if [ -z "$FILES" ]; then ... fi`**: Checks if any files are staged. If not, it prints a message and exits gracefully. This avoids errors when there's nothing to commit.

6. **`for FILE in $FILES; do ... done`**:  Iterates through each staged file.

7. **`DIFF=$(git diff --cached -- "$FILE")`**: Gets the diff content of the current file. `--cached` ensures it's the staged diff.

8. **`if [ -z "$DIFF" ]; then continue; fi`**: Checks if there's a diff for the current file. If not (meaning the file hasn't changed), it skips to the next file.

9. **`MSG=$(echo "$DIFF" | ollama run gemma3 ...)`**: This is the core of the script. It pipes the diff content to Ollama to generate a commit message.
    * `ollama run gemma3`:  Executes the `gemma3` model in Ollama.
    * `"You are a commit bot. Write a clear, concise Git commit message for changes in file: $FILE. Only output the commit message, nothing else. Diff: $DIFF"`:  The prompt given to the Ollama model.  It clearly instructs the model to create a concise commit message based on the file and its diff content.
    *  The `gemma3` model is used, likely a smaller and faster model.

10. **`git commit -m "$MSG" -- "$FILE"`**: Commits the file with the generated message.
    * `-m "$MSG"`:  Specifies the commit message.
    * `-- "$FILE"`:  Indicates that only this file should be committed.

11. **`echo " Committed $FILE with message:"` and `echo "$MSG"`**:  Prints confirmation messages, making the script user-friendly.

**Potential Improvements:**

* **Error Handling within the Loop:** The script should handle potential errors during the `git commit` command within the loop. If a commit fails for one file, it should continue to process the remaining files.  You can add `|| exit 1` after the `git commit` command to achieve this.

* **Ollama Model Configuration:**  Consider making the Ollama model name (`gemma3`) configurable via a variable.  This would allow users to easily switch models.

* **More Robust Diff Parsing:** The script assumes the diff content is simple. If the diff is complex (e.g., contains whitespace issues), it might not generate the desired commit message.  A more robust solution would involve parsing the diff more carefully.

* **Logging:** Add more detailed logging to help with debugging.

* **Confirmation Prompt:**  Before committing each file, you could ask the user for confirmation (e.g., "Do you want to commit $FILE with message $MSG?").

* **Interactive Diff Viewer:** For more complex changes, using a tool that allows the user to view the diff interactively and then provide the commit message could be beneficial.

**Example with Error Handling and Logging:**

```bash
#!/bin/bash
set -e

# Configuration
OLLAMA_MODEL="gemma3"

# 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

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 "$OLLAMA_MODEL" \
    "You are a commit bot. Write a 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
  echo "Committing $FILE with message: $MSG"
  git commit -m "$MSG" -- "$FILE" || {
    echo "Error committing $FILE.  Continuing..."
    # Handle the error more gracefully here if needed
  }

  echo " Committed $FILE with message:"
  echo "$MSG"
done
```

This revised script is more robust and provides better error handling.  It's a solid foundation for an automated commit script.  Remember to install Ollama and the `gemma3` model before running the script.
2025-09-10 21:54:50 -04:00
njohnson
2f044a8d94 Updated xwater 2025-09-07 23:16:15 -04:00
njohnson
a1a54665d9 Updated xsurfacevertexinfo 2025-09-07 23:16:14 -04:00
njohnson
6e73c2d50c Updated xsurface 2025-09-07 23:16:14 -04:00
njohnson
53f690c554 Updated xsunflare 2025-09-07 23:16:13 -04:00
njohnson
eebd333e11 Updated xphyspreset 2025-09-07 23:16:12 -04:00
njohnson
3b65f1bdf2 Updated xpackedunitvec 2025-09-07 23:16:11 -04:00
njohnson
a9444c05bf Updated xpackedtexcoords 2025-09-07 23:16:11 -04:00
njohnson
9a957138b5 Updated xmodelpieces 2025-09-07 23:16:10 -04:00
njohnson
a94e3bd012 Updated xmodelpiece 2025-09-07 23:16:09 -04:00
njohnson
b80cfab4fb Updated xmodelcollsurf 2025-09-07 23:16:08 -04:00
njohnson
da6233c10d Updated xmodel 2025-09-07 23:16:08 -04:00
njohnson
43e925ae23 Updated xmenudef 2025-09-07 23:16:07 -04:00
njohnson
cd7c65ef4a Updated xmaterialtexturedefinfo 2025-09-07 23:16:06 -04:00
njohnson
fd7f466578 Updated xmaterialtexturedef 2025-09-07 23:16:05 -04:00
njohnson
3a84ccd30f Updated xmaterialtechniqueset 2025-09-07 23:16:05 -04:00
njohnson
7fdd451cd1 Updated xmaterialinfo 2025-09-07 23:16:04 -04:00
njohnson
59d5b12e80 Updated xmaterialconstantdef 2025-09-07 23:16:03 -04:00
njohnson
d81513a95f Updated xmaterial 2025-09-07 23:16:02 -04:00
njohnson
23d577336f Updated xmapents 2025-09-07 23:16:02 -04:00
njohnson
b9646c1140 Updated xlocalizeentry 2025-09-07 23:16:01 -04:00
njohnson
7d103dfcea Updated xitemkeyhandler 2025-09-07 23:16:00 -04:00
njohnson
df1bad5380 Updated xitemdefdata 2025-09-07 23:15:59 -04:00
njohnson
6a41e543ee Updated xitemdef 2025-09-07 23:15:59 -04:00
njohnson
06e94e9648 Updated xgfxcolor 2025-09-07 23:15:58 -04:00
njohnson
096da843d1 Updated xgfxcell 2025-09-07 23:15:57 -04:00
njohnson
ba6da187f3 Updated xgameworldsp 2025-09-07 23:15:56 -04:00
njohnson
11cc55dd71 Updated xgameworldmp 2025-09-07 23:15:56 -04:00
njohnson
e82dbce63c Updated xfxeffectdef 2025-09-07 23:15:55 -04:00
njohnson
4677ab9637 Updated xfont 2025-09-07 23:15:54 -04:00
njohnson
b77e6e8077 Updated xdynentitypose 2025-09-07 23:15:53 -04:00
njohnson
3416060d4b Updated xdynentitydef 2025-09-07 23:15:53 -04:00
njohnson
ce7ed928c4 Updated xdynentitycoll 2025-09-07 23:15:52 -04:00
njohnson
b7c7eff1b5 Updated xdynentityclient 2025-09-07 23:15:51 -04:00
njohnson
64b5471ea4 Updated xdobjanimmat 2025-09-07 23:15:50 -04:00
njohnson
ef2d880039 Updated xd3dindexbuffer 2025-09-07 23:15:50 -04:00
njohnson
a577d329ec Updated xcollisionpartition 2025-09-07 23:15:49 -04:00
njohnson
80fc72e8b0 Updated xcollisionborder 2025-09-07 23:15:48 -04:00
njohnson
0a3fbfe39a Updated xcollisionaabbtreeindex 2025-09-07 23:15:47 -04:00
njohnson
4f430055f3 Updated xcmodel 2025-09-07 23:15:47 -04:00
njohnson
67832954e4 Update XString header 2025-09-07 23:12:13 -04:00
njohnson
333de659ed Update XString parsing logic 2025-09-07 23:12:12 -04:00
njohnson
0374410315 Update XFxElemVec3Range parsing logic 2025-09-07 23:12:11 -04:00
njohnson
296a25d26f Update XFxElemVisualState parsing logic 2025-09-07 23:12:10 -04:00
njohnson
0e141ae95c Update XFxElemVelStateSample parsing logic 2025-09-07 23:12:09 -04:00
njohnson
fc1c89c710 Update XFxElemVelStateInFrame parsing logic 2025-09-07 23:12:08 -04:00
njohnson
422ceb9a25 Update XFxElemVisStateSample parsing logic 2025-09-07 23:12:06 -04:00
njohnson
14a494cc24 Update XFxElemDef header 2025-09-07 23:12:06 -04:00
njohnson
0da6a4aee7 Update XFxElemDef parsing logic 2025-09-07 23:12:05 -04:00
njohnson
00618f8081 Update XGfxWorldVertexData header 2025-09-07 23:12:05 -04:00
njohnson
d525f9bee3 Update XGfxWorldVertexData parsing logic 2025-09-07 23:12:04 -04:00
njohnson
ab7d2bb3b8 Update XGfxWorldDpvsPlanes header 2025-09-07 23:12:03 -04:00
njohnson
e2f35a0314 Update XGfxWorldDpvsPlanes parsing logic 2025-09-07 23:12:03 -04:00
njohnson
e4c409ab19 Update XGfxWorldDpvsDynamic header 2025-09-07 23:12:02 -04:00
njohnson
48c28e046d Update XGfxWorldDpvsDynamic parsing logic 2025-09-07 23:12:01 -04:00
njohnson
0f45fb5788 Update XGfxWorld header 2025-09-07 23:12:01 -04:00
njohnson
8d4303b166 Update XGfxWorld parsing logic 2025-09-07 23:12:00 -04:00
njohnson
857a55f133 Update XGfxStateBits parsing logic 2025-09-07 23:11:59 -04:00
njohnson
b513834076 Update XGfxPlacement parsing logic 2025-09-07 23:11:58 -04:00
njohnson
2131034ad9 Update XGfxPackedVertex header 2025-09-07 23:11:57 -04:00
njohnson
4a53b0ff74 Update XGfxPackedVertex parsing logic 2025-09-07 23:11:57 -04:00
njohnson
f7ff77b11d Update XGfxLightDef header 2025-09-07 23:11:56 -04:00
njohnson
e06fe64311 Update XGfxLightDef parsing logic 2025-09-07 23:11:55 -04:00
njohnson
e416d47df4 Update XGfxImage parsing logic 2025-09-07 23:11:54 -04:00
njohnson
51a0d00b93 Update XGfxDrawSurfFields parsing logic 2025-09-07 23:11:53 -04:00
njohnson
ae16506d87 Update XGfxDrawSurf header 2025-09-07 23:11:52 -04:00
njohnson
75c128534e Update XGfxDrawSurf parsing logic 2025-09-07 23:11:52 -04:00
njohnson
e0b7ff743c Update XClipMap header 2025-09-07 23:11:49 -04:00
njohnson
84314df7cb Update XClipMap parsing logic 2025-09-07 23:11:48 -04:00
njohnson
1545a92c27 Implement XBoneInfo – bone‑hierarchy support 2025-09-07 23:06:06 -04:00
njohnson
b62c548193 Add header for XcBrush class 2025-09-07 23:06:05 -04:00
njohnson
d92098571e Implement XcBrush – brush geometry utilities 2025-09-07 23:06:04 -04:00
njohnson
1eb340aaea Make buildable with all those assets. 2025-09-07 13:13:27 -04:00
njohnson
6211ea3c77 Dont include qmake stash. 2025-09-07 12:38:30 -04:00
njohnson
3d91f1f3f4 Remove vscode stuff. 2025-09-07 12:37:51 -04:00
365aac8cfa Merge pull request 'Lotta asset-based changes.' (#10) from feature/test into main
Reviewed-on: #10
2025-09-07 12:36:39 -04:00
njohnson
abd1a6a051 Lotta asset-based changes. 2025-09-07 12:36:08 -04:00
b80a11093a Merge pull request 'feature/test' (#9) from feature/test into main
Reviewed-on: #9
2025-09-07 12:35:21 -04:00
njohnson
d129c7ba62 Sorry ut A lotta stuff. 2025-09-05 18:35:17 -04:00
RedLine AI Agent
46606f529d Updated libs/xassets/xwindowdef.h 2025-09-05 21:36:01 +00:00
RedLine AI Agent
034234a134 Updated libs/xassets/xwindowdef.cpp 2025-09-05 21:36:00 +00:00
RedLine AI Agent
c197edaee6 Updated libs/xassets/xweaponenums.h 2025-09-05 21:35:59 +00:00
RedLine AI Agent
32991d0273 Updated libs/xassets/xtexturedesc.h 2025-09-05 21:35:57 +00:00
RedLine AI Agent
c4826bf1f3 Updated libs/xassets/xtexturedesc.cpp 2025-09-05 21:35:55 +00:00
RedLine AI Agent
1afbe28cc9 Updated libs/xassets/xsunflare.h 2025-09-05 21:35:54 +00:00
RedLine AI Agent
d28aba759f Updated libs/xassets/xsunflare.cpp 2025-09-05 21:35:52 +00:00
RedLine AI Agent
80c0fb2f23 Updated libs/xassets/xstatement.h 2025-09-05 21:35:51 +00:00
RedLine AI Agent
99c2b0ab3b Updated libs/xassets/xstatement.cpp 2025-09-05 21:35:50 +00:00
RedLine AI Agent
9f46d1ea9c Updated libs/xassets/xsrftriangles.h 2025-09-05 21:35:49 +00:00
RedLine AI Agent
d4c36cab72 Updated libs/xassets/xsrftriangles.cpp 2025-09-05 21:35:47 +00:00
RedLine AI Agent
5ec26d101c Updated libs/xassets/xsentienthandle.h 2025-09-05 21:35:46 +00:00
RedLine AI Agent
c5732b0899 Updated libs/xassets/xsentienthandle.cpp 2025-09-05 21:35:45 +00:00
RedLine AI Agent
fb442b39fa Updated libs/xassets/xrectdef.h 2025-09-05 21:35:43 +00:00
RedLine AI Agent
afb0430f30 Updated libs/xassets/xrectdef.cpp 2025-09-05 21:35:42 +00:00
RedLine AI Agent
7bb6d0ab89 Updated libs/xassets/xplatform.h 2025-09-05 21:35:41 +00:00
RedLine AI Agent
9d85b77ef0 Updated libs/xassets/xoperandinternaldataunion.h 2025-09-05 21:35:39 +00:00
RedLine AI Agent
2b55752eb3 Updated libs/xassets/xoperandinternaldataunion.cpp 2025-09-05 21:35:38 +00:00
RedLine AI Agent
c45df3444c Updated libs/xassets/xoperand.h 2025-09-05 21:35:37 +00:00
RedLine AI Agent
cc30cda7cc Updated libs/xassets/xoperand.cpp 2025-09-05 21:35:35 +00:00
RedLine AI Agent
de0ee2e438 Updated libs/xassets/xmultidef.h 2025-09-05 21:35:34 +00:00
RedLine AI Agent
1000b0cafa Updated libs/xassets/xmultidef.cpp 2025-09-05 21:35:33 +00:00
RedLine AI Agent
9a10f4a9e7 Updated libs/xassets/xmodelpieces.h 2025-09-05 21:35:32 +00:00
RedLine AI Agent
6cb52df017 Updated libs/xassets/xmodelpieces.cpp 2025-09-05 21:35:30 +00:00
RedLine AI Agent
e1f8897150 Updated libs/xassets/xmodelpiece.h 2025-09-05 21:35:29 +00:00
RedLine AI Agent
aa8a6d18ae Updated libs/xassets/xmodelpiece.cpp 2025-09-05 21:35:28 +00:00
RedLine AI Agent
d70b54480d Updated libs/xassets/xmodeldrawinfo.h 2025-09-05 21:35:26 +00:00
RedLine AI Agent
d2eb7b9795 Updated libs/xassets/xmodeldrawinfo.cpp 2025-09-05 21:35:25 +00:00
RedLine AI Agent
e7aca45a9f Updated libs/xassets/xmenuenums.h 2025-09-05 21:35:24 +00:00
RedLine AI Agent
7752d3ada5 Updated libs/xassets/xmaterialtechniqueset.h 2025-09-05 21:35:23 +00:00
RedLine AI Agent
4cfd3da983 Updated libs/xassets/xmaterialtechniqueset.cpp 2025-09-05 21:35:21 +00:00
RedLine AI Agent
1ea1ae3199 Updated libs/xassets/xmaterialmemory.h 2025-09-05 21:35:20 +00:00
RedLine AI Agent
2b29b121e0 Updated libs/xassets/xmaterialmemory.cpp 2025-09-05 21:35:19 +00:00
RedLine AI Agent
5c9868c435 Updated libs/xassets/xlistboxdef.h 2025-09-05 21:35:17 +00:00
RedLine AI Agent
6c0a111c09 Updated libs/xassets/xlistboxdef.cpp 2025-09-05 21:35:16 +00:00
RedLine AI Agent
4cbf8ca553 Updated libs/xassets/xitemkeyhandler.h 2025-09-05 21:35:15 +00:00
RedLine AI Agent
5aefd3e4e1 Updated libs/xassets/xitemkeyhandler.cpp 2025-09-05 21:35:14 +00:00
RedLine AI Agent
8bb5287605 Updated libs/xassets/xitemdefdata.h 2025-09-05 21:35:12 +00:00
RedLine AI Agent
0c2478cc70 Updated libs/xassets/xitemdefdata.cpp 2025-09-05 21:35:10 +00:00
RedLine AI Agent
06cda8303d Updated libs/xassets/xitemdef.h 2025-09-05 21:35:09 +00:00
RedLine AI Agent
3c45b639cb Updated libs/xassets/xitemdef.cpp 2025-09-05 21:35:08 +00:00
RedLine AI Agent
aa77115da8 Updated libs/xassets/xglyph.h 2025-09-05 21:35:07 +00:00
RedLine AI Agent
5c42895bb2 Updated libs/xassets/xglyph.cpp 2025-09-05 21:35:05 +00:00
RedLine AI Agent
67668ccc27 Updated libs/xassets/xgfxworldvertexlayerdata.h 2025-09-05 21:35:04 +00:00
RedLine AI Agent
cdf01bb966 Updated libs/xassets/xgfxworldvertexlayerdata.cpp 2025-09-05 21:35:03 +00:00
RedLine AI Agent
178665610c Updated libs/xassets/xgfxworlddpvsstatic.h 2025-09-05 21:35:01 +00:00
RedLine AI Agent
13a7b65f6d Updated libs/xassets/xgfxworlddpvsstatic.cpp 2025-09-05 21:35:00 +00:00
RedLine AI Agent
26ba52bcd2 Updated libs/xassets/xgfxworlddpvsplanes.h 2025-09-05 21:34:59 +00:00
RedLine AI Agent
9e4d14f686 Updated libs/xassets/xgfxworlddpvsplanes.cpp 2025-09-05 21:34:57 +00:00
RedLine AI Agent
5ecabfee07 Updated libs/xassets/xgfxworlddpvsdynamic.h 2025-09-05 21:34:56 +00:00
RedLine AI Agent
caa9fe276e Updated libs/xassets/xgfxworlddpvsdynamic.cpp 2025-09-05 21:34:54 +00:00
RedLine AI Agent
80f1a65a71 Updated libs/xassets/xgfxsurface.h 2025-09-05 21:34:53 +00:00
RedLine AI Agent
2adf0cc1e8 Updated libs/xassets/xgfxsurface.cpp 2025-09-05 21:34:52 +00:00
RedLine AI Agent
1ca6766402 Updated libs/xassets/xgfxstaticmodelinst.h 2025-09-05 21:34:50 +00:00
RedLine AI Agent
08b6e1d6d9 Updated libs/xassets/xgfxstaticmodelinst.cpp 2025-09-05 21:34:49 +00:00
RedLine AI Agent
efd06290d8 Updated libs/xassets/xgfxstaticmodeldrawinst.h 2025-09-05 21:34:48 +00:00
RedLine AI Agent
2f4bc7bb05 Updated libs/xassets/xgfxstaticmodeldrawinst.cpp 2025-09-05 21:34:46 +00:00
RedLine AI Agent
147e4bb079 Updated libs/xassets/xgfxshadowgeometry.h 2025-09-05 21:34:45 +00:00
RedLine AI Agent
749084539e Updated libs/xassets/xgfxshadowgeometry.cpp 2025-09-05 21:34:43 +00:00
RedLine AI Agent
87add0fa93 Updated libs/xassets/xgfxscenedynmodel.h 2025-09-05 21:34:42 +00:00
RedLine AI Agent
98039b533f Updated libs/xassets/xgfxscenedynmodel.cpp 2025-09-05 21:34:41 +00:00
RedLine AI Agent
1d2d68ed54 Updated libs/xassets/xgfxscenedynbrush.h 2025-09-05 21:34:39 +00:00
RedLine AI Agent
18c9457948 Updated libs/xassets/xgfxscenedynbrush.cpp 2025-09-05 21:34:38 +00:00
RedLine AI Agent
bb3683d8fb Updated libs/xassets/xgfxportalwritable.h 2025-09-05 21:34:37 +00:00
RedLine AI Agent
6dd8a4a24c Updated libs/xassets/xgfxportalwritable.cpp 2025-09-05 21:34:36 +00:00
RedLine AI Agent
a2acf1dd90 Updated libs/xassets/xgfxportal.h 2025-09-05 21:34:34 +00:00
RedLine AI Agent
b34959ba1d Updated libs/xassets/xgfxportal.cpp 2025-09-05 21:34:33 +00:00
RedLine AI Agent
2b40623f83 Updated libs/xassets/xgfxplacement.h 2025-09-05 21:34:32 +00:00
RedLine AI Agent
faa73b7697 Updated libs/xassets/xgfxplacement.cpp 2025-09-05 21:34:31 +00:00
RedLine AI Agent
d40b2326f7 Updated libs/xassets/xgfxpackedplacement.h 2025-09-05 21:34:30 +00:00
RedLine AI Agent
57c6c18d8b Updated libs/xassets/xgfxpackedplacement.cpp 2025-09-05 21:34:28 +00:00
RedLine AI Agent
f4b2aaf84e Updated libs/xassets/xgfxlightregionhull.h 2025-09-05 21:34:27 +00:00
RedLine AI Agent
f253b75a45 Updated libs/xassets/xgfxlightregionhull.cpp 2025-09-05 21:34:26 +00:00
RedLine AI Agent
b15886e089 Updated libs/xassets/xgfxlightregionaxis.h 2025-09-05 21:34:24 +00:00
RedLine AI Agent
e78778e82c Updated libs/xassets/xgfxlightregionaxis.cpp 2025-09-05 21:34:23 +00:00
RedLine AI Agent
d957774436 Updated libs/xassets/xgfxlightregion.h 2025-09-05 21:34:22 +00:00
RedLine AI Agent
1722cbf067 Updated libs/xassets/xgfxlightregion.cpp 2025-09-05 21:34:20 +00:00
RedLine AI Agent
c394b38c76 Updated libs/xassets/xgfxlightmaparray.h 2025-09-05 21:34:19 +00:00
RedLine AI Agent
baafe8b4e5 Updated libs/xassets/xgfxlightmaparray.cpp 2025-09-05 21:34:06 +00:00
RedLine AI Agent
78247fafab Updated libs/xassets/xgfxlightgridentry.h 2025-09-05 21:33:54 +00:00
RedLine AI Agent
f7055fbc10 Updated libs/xassets/xgfxlightgridcolors.h 2025-09-05 21:33:44 +00:00
RedLine AI Agent
54a46e8a3e Updated libs/xassets/xgfxlightgrid.h 2025-09-05 21:33:32 +00:00
RedLine AI Agent
3ffcec4a71 Updated libs/xassets/xgfxlightgrid.cpp 2025-09-05 21:33:20 +00:00
RedLine AI Agent
3af6532904 Updated libs/xassets/xgfxcullgroup.h 2025-09-05 21:33:06 +00:00
RedLine AI Agent
f879005e76 Updated libs/xassets/xgfxcullgroup.cpp 2025-09-05 21:32:52 +00:00
RedLine AI Agent
af3f28752a Updated libs/xassets/xgfxcell.h 2025-09-05 21:32:48 +00:00
RedLine AI Agent
240a643111 Updated libs/xassets/xgfxcell.cpp 2025-09-05 21:32:39 +00:00
RedLine AI Agent
bf951db63c Updated libs/xassets/xgfxbrushmodelwritable.h 2025-09-05 21:32:37 +00:00
RedLine AI Agent
54b54a2367 Updated libs/xassets/xgfxbrushmodelwritable.cpp 2025-09-05 21:32:36 +00:00
RedLine AI Agent
5a9855a9f6 Updated libs/xassets/xgfxbrushmodel.h 2025-09-05 21:32:35 +00:00
RedLine AI Agent
3e3553b2ce Updated libs/xassets/xgfxbrushmodel.cpp 2025-09-05 21:32:26 +00:00
RedLine AI Agent
e90788e232 Updated libs/xassets/xgfxaabbtree.h 2025-09-05 21:32:16 +00:00
RedLine AI Agent
c7ed43cf8d Updated libs/xassets/xgfxaabbtree.cpp 2025-09-05 21:32:02 +00:00
RedLine AI Agent
a8ca882e07 Updated libs/xassets/xgame.h 2025-09-05 21:31:49 +00:00
RedLine AI Agent
0e48faf7a3 Updated libs/xassets/xfxspawndefoneshot.h 2025-09-05 21:31:45 +00:00
RedLine AI Agent
51e12e9683 Updated libs/xassets/xfxspawndefoneshot.cpp 2025-09-05 21:31:33 +00:00
RedLine AI Agent
0ec4548a6b Updated libs/xassets/xfxspawndeflooping.h 2025-09-05 21:31:20 +00:00
RedLine AI Agent
c72d51ad1e Updated libs/xassets/xfxspawndeflooping.cpp 2025-09-05 21:31:06 +00:00
RedLine AI Agent
1747f8f8be Updated libs/xassets/xfxspawndef.h 2025-09-05 21:30:52 +00:00
RedLine AI Agent
6fbd17291a Updated libs/xassets/xfxspawndef.cpp 2025-09-05 21:30:51 +00:00
RedLine AI Agent
e1ec4b8878 Updated libs/xassets/xfxintrange.h 2025-09-05 21:30:49 +00:00
RedLine AI Agent
1d08ae6af6 Updated libs/xassets/xfxintrange.cpp 2025-09-05 21:30:48 +00:00
njohnson
c596b3a828 Remove retained copies. 2025-09-05 17:27:56 -04:00
RedLine AI Agent
846c689088 Updated libs/xassets/xfximpacttable.h 2025-09-05 21:27:31 +00:00
RedLine AI Agent
84dc8358a7 Updated libs/xassets/xfximpacttable.cpp 2025-09-05 21:27:30 +00:00
RedLine AI Agent
86092b18a2 Updated libs/xassets/xfxfloatrange.h 2025-09-05 21:27:28 +00:00
RedLine AI Agent
c968117ed1 Updated libs/xassets/xfxfloatrange.cpp 2025-09-05 21:27:27 +00:00
RedLine AI Agent
ef884f4be7 Updated libs/xassets/xfxelematlas.h 2025-09-05 21:27:26 +00:00
RedLine AI Agent
5bf97fcf1a Updated libs/xassets/xfxelematlas.cpp 2025-09-05 21:27:24 +00:00
RedLine AI Agent
c0967ce23e Updated libs/xassets/xfxelematlas.h 2025-09-05 21:27:23 +00:00
RedLine AI Agent
de0e4c5aae Updated libs/xassets/xfxelematlas.cpp 2025-09-05 21:27:22 +00:00
RedLine AI Agent
01094b8d9e Updated libs/xassets/xfxelematlas.h 2025-09-05 21:27:20 +00:00
RedLine AI Agent
7af197ad80 Updated libs/xassets/xfxelematlas.cpp 2025-09-05 21:27:17 +00:00
RedLine AI Agent
136a49801e Updated libs/xassets/xfxelematlas.h 2025-09-05 21:27:05 +00:00
RedLine AI Agent
d603742172 Updated libs/xassets/xfxelematlas.cpp 2025-09-05 21:26:58 +00:00
RedLine AI Agent
cdf8ac1ffc Updated libs/xassets/xfxelematlas.h 2025-09-05 21:26:45 +00:00
RedLine AI Agent
8d5c2c7ea1 Updated libs/xassets/xfxelematlas.cpp 2025-09-05 21:26:32 +00:00
RedLine AI Agent
d075ad4c24 Updated libs/xassets/xfxeffectdef.h 2025-09-05 21:26:19 +00:00
RedLine AI Agent
4e1c18fff2 Updated libs/xassets/xfxeffectdef.cpp 2025-09-05 21:26:14 +00:00
RedLine AI Agent
a2e9683ba3 Updated libs/xassets/xfont.h 2025-09-05 21:26:13 +00:00
RedLine AI Agent
f7444171e3 Updated libs/xassets/xfont.cpp 2025-09-05 21:26:12 +00:00
RedLine AI Agent
fdea13bf84 Updated libs/xassets/xexpressionentry.h 2025-09-05 21:26:11 +00:00
RedLine AI Agent
a06df405fc Updated libs/xassets/xexpressionentry.cpp 2025-09-05 21:26:09 +00:00
RedLine AI Agent
70515d28d4 Updated libs/xassets/xentryinternaldata.h 2025-09-05 21:26:08 +00:00
RedLine AI Agent
37c25d3baf Updated libs/xassets/xentryinternaldata.cpp 2025-09-05 21:26:07 +00:00
RedLine AI Agent
75802ffa8e Updated libs/xassets/xdynentitypose.h 2025-09-05 21:26:06 +00:00
RedLine AI Agent
5a35d4f4d8 [No changes] 2025-09-05 21:25:17 +00:00
RedLine AI Agent
9958f33b60 [No changes] 2025-09-05 21:25:15 +00:00
RedLine AI Agent
c1e9b308a1 [No changes] 2025-09-05 21:25:12 +00:00
RedLine AI Agent
6ef4fe82da [No changes] 2025-09-05 21:25:10 +00:00
RedLine AI Agent
8f287ceeec [No changes] 2025-09-05 21:25:09 +00:00
RedLine AI Agent
12b4a77f1f [No changes] 2025-09-05 21:24:58 +00:00
RedLine AI Agent
38dd74b188 [No changes] 2025-09-05 21:24:57 +00:00
RedLine AI Agent
e3db1e11cc [No changes] 2025-09-05 21:24:56 +00:00
RedLine AI Agent
0d9d2fccfb [No changes] 2025-09-05 21:24:56 +00:00
RedLine AI Agent
c84463e3c2 [No changes] 2025-09-05 21:24:55 +00:00
RedLine AI Agent
619cfad47c [No changes] 2025-09-05 21:24:54 +00:00
RedLine AI Agent
17408d5d4e [No changes] 2025-09-05 21:24:54 +00:00
RedLine AI Agent
04daaeaf7f [No changes] 2025-09-05 21:24:53 +00:00
RedLine AI Agent
92456f1da6 [No changes] 2025-09-05 21:24:52 +00:00
RedLine AI Agent
38909a69a6 [No changes] 2025-09-05 21:24:51 +00:00
RedLine AI Agent
26a1629dee [No changes] 2025-09-05 21:24:51 +00:00
RedLine AI Agent
cc5c1854e2 [No changes] 2025-09-05 21:24:50 +00:00
RedLine AI Agent
fccad08fb0 [No changes] 2025-09-05 21:24:46 +00:00
RedLine AI Agent
0d156994b4 [No changes] 2025-09-05 21:24:44 +00:00
RedLine AI Agent
dd1eb94beb [No changes] 2025-09-05 21:24:37 +00:00
RedLine AI Agent
b53f169a4f [No changes] 2025-09-05 21:24:29 +00:00
RedLine AI Agent
ce9bcefb88 No changes. 2025-09-05 21:24:21 +00:00
RedLine AI Agent
ab60c56e88 [No changes] 2025-09-05 21:24:14 +00:00
njohnson
32e4815cbe Update .gitignore 2025-09-05 17:22:49 -04:00
RedLine AI Agent
a8ee358150 Add: libs/*/release/*
Add: libs/*/debug/*
2025-09-05 21:05:49 +00:00
RedLine AI Agent
302350fe2c Add: data/obj/* 2025-09-05 21:02:46 +00:00
RedLine AI Agent
2f323046d3 Add: *.XMODEL_EXPORT 2025-09-05 21:01:00 +00:00
RedLine AI Agent
3dad8bfb5c Update: data/Data.qrc 2025-09-05 20:59:08 +00:00
RedLine AI Agent
f8624c8997 Update: app/zonefileviewer.ui 2025-09-05 20:59:06 +00:00
RedLine AI Agent
9d8e214ae3 Update: app/zonefileviewer.h 2025-09-05 20:59:03 +00:00
RedLine AI Agent
15bbbec1db Update: app/zonefileviewer.cpp 2025-09-05 20:54:46 +00:00
RedLine AI Agent
00a3dfb958 Update: app/xtreewidgetitem.h 2025-09-05 20:54:42 +00:00
RedLine AI Agent
12c9e79bf2 Update: app/xtreewidgetitem.cpp 2025-09-05 20:54:30 +00:00
RedLine AI Agent
39cd33efd4 Update: app/xtreewidget.h 2025-09-05 20:54:06 +00:00
RedLine AI Agent
ce5c98b78d Update: app/soundviewer.ui 2025-09-05 20:53:15 +00:00
RedLine AI Agent
053c440415 Update app/techsetviewer.ui 2025-09-05 20:47:55 +00:00
RedLine AI Agent
d477865e9a Update app/techsetviewer.h 2025-09-05 20:47:19 +00:00
RedLine AI Agent
a7e0859b8d Update app/techsetviewer.cpp 2025-09-05 20:47:17 +00:00
RedLine AI Agent
ed593d3ae1 Update app/stringtableviewer.ui 2025-09-05 20:47:15 +00:00
RedLine AI Agent
d973d2bee5 Update app/stringtableviewer.h 2025-09-05 20:47:03 +00:00
RedLine AI Agent
90c3d3bef3 Update app/stringtableviewer.cpp 2025-09-05 20:46:50 +00:00
RedLine AI Agent
d583b9ce08 Update app/soundviewer.ui 2025-09-05 20:46:36 +00:00
RedLine AI Agent
46792b3dc6 Update app/soundviewer.h 2025-09-05 20:45:06 +00:00
RedLine AI Agent
1739a4686e Update app/soundviewer.cpp 2025-09-05 20:45:03 +00:00
RedLine AI Agent
28257af738 Update app/rumblegraphviewer.ui 2025-09-05 20:45:00 +00:00
RedLine AI Agent
50fb3d2557 Update app/rumblegraphviewer.h 2025-09-05 20:44:57 +00:00
RedLine AI Agent
3f0d4641b1 Update app/rumblegraphviewer.cpp 2025-09-05 20:44:54 +00:00
RedLine AI Agent
b2fcdd1762 Update app/rumblefileviewer.ui 2025-09-05 20:44:51 +00:00
RedLine AI Agent
99706b868b Update app/rumblefileviewer.h 2025-09-05 20:44:48 +00:00
RedLine AI Agent
dfe3311323 Update app/rumblefileviewer.cpp 2025-09-05 20:44:47 +00:00
RedLine AI Agent
6a04ed7431 Update app/reportissuedialog.ui 2025-09-05 20:44:45 +00:00
RedLine AI Agent
32ab5c7451 Update app/reportissuedialog.h 2025-09-05 20:44:40 +00:00
RedLine AI Agent
b6403208f1 Update app/reportissuedialog.cpp 2025-09-05 20:44:38 +00:00
RedLine AI Agent
fcaa1eacaf Update app/preferenceeditor.ui 2025-09-05 20:44:36 +00:00
RedLine AI Agent
97c4fbddde Update app/preferenceeditor.h 2025-09-05 20:44:33 +00:00
RedLine AI Agent
ed9e7ee558 Update app/preferenceeditor.cpp 2025-09-05 20:44:31 +00:00
RedLine AI Agent
618c304a87 Update app/modelviewer.ui 2025-09-05 20:44:29 +00:00
RedLine AI Agent
cc311c2a1a Update app/modelviewer.h 2025-09-05 20:44:24 +00:00
RedLine AI Agent
fda7f55231 Update app/modelviewer.cpp 2025-09-05 20:44:12 +00:00
RedLine AI Agent
fe5724ef82 Update app/materialviewer.ui 2025-09-05 20:43:12 +00:00
RedLine AI Agent
1a0ba48b51 Update app/materialviewer.h 2025-09-05 20:42:01 +00:00
RedLine AI Agent
713d55b4eb Update app/materialviewer.cpp 2025-09-05 20:41:21 +00:00
RedLine AI Agent
59d6d6907a Refactor mainwindow.ui: replace the entire UI definition with a cleaned‑up, consistent layout and action structure. 2025-09-05 19:59:40 +00:00
RedLine AI Agent
020178f780 Update app/mainwindow.h 2025-09-05 19:57:04 +00:00
RedLine AI Agent
a2242fe018 Update app/mainwindow.cpp 2025-09-05 19:54:14 +00:00
RedLine AI Agent
ef6d1007e6 Update app/main.cpp 2025-09-05 19:54:09 +00:00
RedLine AI Agent
9971facf90 Update app/localstringviewer.ui 2025-09-05 19:54:03 +00:00
RedLine AI Agent
3a0070612a Update app/localstringviewer.h 2025-09-05 19:53:52 +00:00
RedLine AI Agent
8f415d4fe6 Update app/localstringviewer.cpp 2025-09-05 19:53:47 +00:00
RedLine AI Agent
f438e6c063 Update app/iwiviewer.ui 2025-09-05 19:53:26 +00:00
RedLine AI Agent
1e086cf00a Update app/iwiviewer.h 2025-09-05 19:53:11 +00:00
RedLine AI Agent
d166e3329a Update app/ddsviewer.h 2025-09-05 19:51:20 +00:00
RedLine AI Agent
4db49c0896 Update app/imagewidget.ui 2025-09-05 19:48:54 +00:00
RedLine AI Agent
12806268d4 Update app/imagewidget.h 2025-09-05 19:48:43 +00:00
RedLine AI Agent
39d37640cc Update app/imagewidget.cpp 2025-09-05 19:48:15 +00:00
RedLine AI Agent
d771df9b09 Update app/fastfileviewer.ui 2025-09-05 19:47:52 +00:00
RedLine AI Agent
44af7bf03c Update app/fastfileviewer.h 2025-09-05 19:47:15 +00:00
RedLine AI Agent
07e473bad0 Update app/fastfileviewer.cpp 2025-09-05 19:46:47 +00:00
RedLine AI Agent
19d417e84b Update app/ddsviewer.ui 2025-09-05 19:46:04 +00:00
RedLine AI Agent
c898f62d69 Update app/ddsviewer.h 2025-09-05 19:45:44 +00:00
RedLine AI Agent
d69f6eef40 Update app/ddsviewer.cpp 2025-09-05 19:44:32 +00:00
RedLine AI Agent
affd9fe889 Update app/d3dbsp_structs.h 2025-09-05 19:44:25 +00:00
RedLine AI Agent
90ebbd86ee Update app/app.pro 2025-09-05 19:43:49 +00:00
RedLine AI Agent
50a1aa3bbc Update app/aboutdialog.ui 2025-09-05 19:43:41 +00:00
RedLine AI Agent
270dacf1e5 Update app/aboutdialog.cpp 2025-09-05 19:43:31 +00:00
RedLine AI Agent
4a4df3c2a4 Update app/aboutdialog.cpp 2025-09-05 19:42:32 +00:00
Nicholas Johnson
4d7598e805 Update app/LICENSE: normalize line endings 2025-09-05 13:59:36 -04:00
Nicholas Johnson
94d407ffb7 Update XPlor.pro: fix formatting and line endings 2025-09-05 13:54:40 -04:00
Nicholas Johnson
3291e52cc6 Update .gitignore: remove leading hyphens and standardize patterns 2025-09-05 13:53:56 -04:00
Nicholas Johnson
f576af8f11 Remove temp autosave file. 2025-09-03 13:40:02 -04:00
Nicholas Johnson
eee7231737 Add autosave files. 2025-09-03 13:39:42 -04:00
Nicholas Johnson
e7455256a7 Add xwaterwritable structures 2025-09-03 13:28:24 -04:00
Nicholas Johnson
2a026947c4 Add xwater structures 2025-09-03 13:28:13 -04:00
Nicholas Johnson
12795451e6 Add xsurfacevertexinfo structures 2025-09-03 13:28:03 -04:00
Nicholas Johnson
c9802401fb Add xsurfacecollisiontree structures 2025-09-03 13:27:52 -04:00
Nicholas Johnson
5a12e3c967 Add xsurfacecollisionnode structures 2025-09-03 13:26:37 -04:00
Nicholas Johnson
a02e3714d0 Add xsurfacecollisionleaf structures 2025-09-03 13:26:24 -04:00
Nicholas Johnson
84f99dc919 Add xsurfacecollisionaabb structures 2025-09-03 13:26:11 -04:00
Nicholas Johnson
163f46b4cf Add xsurface structures 2025-09-03 13:25:58 -04:00
Nicholas Johnson
7b1d269986 Add xstreamsourceinfo structures 2025-09-03 13:25:47 -04:00
Nicholas Johnson
386d0793aa Add xstreamdelayinfo structures 2025-09-03 13:25:36 -04:00
Nicholas Johnson
dc3360a97d Add xscriptstringlist structures 2025-09-03 13:22:24 -04:00
Nicholas Johnson
6ab9a9b350 Add xrigidvertlist structures 2025-09-03 13:21:14 -04:00
Nicholas Johnson
e3f971f62c Add xphyspreset structures 2025-09-03 13:21:02 -04:00
Nicholas Johnson
3a718acb50 Add xphysmass structures 2025-09-03 13:20:51 -04:00
Nicholas Johnson
2e09f532b9 Add xphysgeomlist structures 2025-09-03 13:20:39 -04:00
Nicholas Johnson
c39185e35c Add xphysgeominfo structures 2025-09-03 13:20:29 -04:00
Nicholas Johnson
eee271278a Add xpackedunitvec structures 2025-09-03 13:20:19 -04:00
Nicholas Johnson
e7077aae63 Add xpackedtexcoords structures 2025-09-03 13:20:07 -04:00
Nicholas Johnson
78a6efd02f Add xmodelstreaminfo structures 2025-09-03 13:19:57 -04:00
Nicholas Johnson
73b3cc9e75 Add xmodellodinfo structures 2025-09-03 13:18:53 -04:00
Nicholas Johnson
ef6f75c8a8 Add xmodelhighmipbounds structures 2025-09-03 13:18:40 -04:00
Nicholas Johnson
3bed978b89 Add xmodelcollsurf structures 2025-09-03 13:18:27 -04:00
Nicholas Johnson
dcab86b1ed Add xmaterialvertexstreamrouting structures 2025-09-03 13:18:16 -04:00
Nicholas Johnson
7cf9ac8d4c Add xmaterialvertexdeclaration structures 2025-09-03 13:18:05 -04:00
Nicholas Johnson
e63cf8554e Add xmaterialvertexshaderprogram structures 2025-09-03 13:17:42 -04:00
Nicholas Johnson
d7e4dfda41 Add xmaterialvertexshader structures 2025-09-03 13:17:32 -04:00
Nicholas Johnson
9c92fcd854 Add xmaterialtexturedefinfo structures 2025-09-03 13:17:22 -04:00
Nicholas Johnson
7768c5f7f5 Add xmaterialtexturedef structures 2025-09-03 13:16:15 -04:00
Nicholas Johnson
58e87e8787 Add xmaterialtechnique structures 2025-09-03 13:16:04 -04:00
Nicholas Johnson
b176bc3d00 Add xmaterialstreamrouting structures 2025-09-03 13:15:52 -04:00
Nicholas Johnson
3c13462618 Add xmaterialshaderargument structures 2025-09-03 13:15:41 -04:00
Nicholas Johnson
68a41d4582 Add xmaterialpixelshaderprogram structures 2025-09-03 13:15:31 -04:00
Nicholas Johnson
60e93e0ab3 Add xmaterialpixelshader structures 2025-09-03 13:15:22 -04:00
Nicholas Johnson
9fb5c62b75 Add xmaterialpass structures 2025-09-03 13:15:13 -04:00
Nicholas Johnson
352e51170d Add xmaterialinfo structures 2025-09-03 13:15:04 -04:00
Nicholas Johnson
fc64762bfe Add xmaterialconstantdef structures 2025-09-03 13:14:06 -04:00
Nicholas Johnson
fe34c63697 Add xmaterialargumentdef structures 2025-09-03 13:13:53 -04:00
Nicholas Johnson
02d96741e8 Add xmaterialargumentcodeconst structures 2025-09-03 13:13:41 -04:00
Nicholas Johnson
d8b27a31d2 Add xmaterial.cpp 2025-09-03 13:13:30 -04:00
Nicholas Johnson
4fcd3a4c60 Add xmaterial structures 2025-09-03 13:12:46 -04:00
Nicholas Johnson
fd1868ed46 Add xmaptype structures 2025-09-03 13:12:39 -04:00
Nicholas Johnson
7250e1f460 Add xgputexturesizestack3d structures 2025-09-03 13:11:38 -04:00
Nicholas Johnson
1e0a490a69 Add xgputexturesizestack2d structures 2025-09-03 13:11:27 -04:00
Nicholas Johnson
bfedb389b8 Add xgputexturesizestack1d structures 2025-09-03 13:11:16 -04:00
Nicholas Johnson
0a2fdd0b74 Add xgputexturesizestack structures 2025-09-03 13:11:05 -04:00
Nicholas Johnson
a2959f9b29 Add xgputexturesize3d structures 2025-09-03 13:10:54 -04:00
Nicholas Johnson
cd99390ba7 Add xgputexturesize2d structures 2025-09-03 13:10:44 -04:00
Nicholas Johnson
388e2dfc52 Add xgputexturesize1d structures 2025-09-03 13:10:35 -04:00
Nicholas Johnson
47e09afa73 Add xgpuvertexrawrequest structures 2025-09-03 13:08:56 -04:00
Nicholas Johnson
cdef686ec4 Add xgpuvertexfetchconstant structures 2025-09-03 13:08:47 -04:00
Nicholas Johnson
be21cf40cb Add xgfxvertexshaderloaddef structures 2025-09-03 13:08:37 -04:00
Nicholas Johnson
4eb817375c Add xgfxstatebits structures 2025-09-03 13:08:03 -04:00
Nicholas Johnson
5a623c18d0 Add xgfxpixelshaderloaddef structures 2025-09-03 13:07:19 -04:00
Nicholas Johnson
63ca1074fc Add xgfxpackedvertex structures 2025-09-03 13:07:08 -04:00
Nicholas Johnson
9a70b774ab Add xgfxdrawsurffields structures 2025-09-03 13:06:58 -04:00
Nicholas Johnson
ea385c2853 Add xgfxdrawsurf structures 2025-09-03 13:06:49 -04:00
Nicholas Johnson
f9604bc858 Add xgfxcolor structures 2025-09-03 13:06:40 -04:00
Nicholas Johnson
65a37363e6 Add xfxtrailvertex structures 2025-09-03 13:06:31 -04:00
Nicholas Johnson
2879a89594 Add xfxtraildef structures 2025-09-03 13:06:22 -04:00
Nicholas Johnson
6bc88394cd Add xfximpactentry structures 2025-09-03 13:06:13 -04:00
Nicholas Johnson
f17d56c603 Add xfxelemvisuals structures 2025-09-03 13:05:35 -04:00
Nicholas Johnson
2253db1abb Add xfxelemvisstatesample structures 2025-09-03 13:05:24 -04:00
Nicholas Johnson
c362953775 Add xfxelemmarkvisuals structures 2025-09-03 13:05:14 -04:00
Nicholas Johnson
6ea2989d69 Add xfxelemdefvisuals structures 2025-09-03 13:05:03 -04:00
Nicholas Johnson
ea90db4fe6 Add xfxelemdef structures 2025-09-03 13:04:54 -04:00
Nicholas Johnson
2b1a18be6a Add xfile structures 2025-09-03 13:04:45 -04:00
Nicholas Johnson
40ad7470aa Add new asset-related structures and files 2025-09-03 13:04:24 -04:00
Nicholas Johnson
89d1d0944a Update zonefile structures and project files 2025-09-03 13:03:14 -04:00
Nicholas Johnson
73e13263fc Update node type and path node transient structures 2025-09-03 13:03:03 -04:00
Nicholas Johnson
60ddd31101 Update model structures 2025-09-03 13:02:54 -04:00
Nicholas Johnson
ee4a680d6d Update GPU texture fetch constant structures 2025-09-03 13:02:39 -04:00
Nicholas Johnson
2f61367fcb Update texture handling structures 2025-09-03 13:02:31 -04:00
Nicholas Johnson
c7b1c97d68 Update lighting and streaming AABB tree structures 2025-09-03 13:02:23 -04:00
Nicholas Johnson
ed30f6b861 Update material and image handling structures 2025-09-03 13:01:39 -04:00
Nicholas Johnson
5ea8c5f09a Update Direct3D texture structures 2025-09-03 13:01:26 -04:00
Nicholas Johnson
d1cf5ecc52 Update collision leaf and brush node structures 2025-09-03 13:01:12 -04:00
Nicholas Johnson
a85abf0ecd Update asset and animation structure definitions 2025-09-03 13:00:58 -04:00
Nicholas Johnson
caca3dd489 Update animation-related files 2025-09-03 13:00:41 -04:00
Nicholas Johnson
39853c77fe Update asset-related core files 2025-09-03 13:00:27 -04:00
Nicholas Johnson
f149b66322 Remove deprecated and unused asset-related files 2025-09-03 13:00:02 -04:00
Nicholas Johnson
0ea4a7ad6f Added a tonnn of new classes. 2025-08-17 13:14:17 -04:00
Nicholas Johnson
729a6bac7c Renamed Assets to XAssets. 2025-08-14 18:50:13 -04:00
Nicholas Johnson
be8aa3691e Hey baby girl 2025-08-14 17:30:25 -04:00
Nicholas Johnson
cfa0638b94 More decompiled translations :(. 2025-07-10 01:07:48 -04:00
895 changed files with 35229 additions and 36356 deletions

10
.gitignore vendored
View File

@ -3,6 +3,9 @@
/data/fastfiles/
/releases/
.vscode/*
.qmake.stash
# Ignore Qt Creator user files
*.pro.user
*.pro.user.*
@ -13,3 +16,10 @@
*.creator.*
*.ps1
version.txt
*.autosave
*.XMODEL_EXPORT
data/obj/*
libs/*/release/*
libs/*/debug/*
.git.stash
*Makefile*

View File

@ -2,9 +2,9 @@ TEMPLATE = subdirs
SUBDIRS += libs \
app \
tools \
tests
#tools \
#tests
tests.depends = libs
#tests.depends = libs
app.depends = libs
tools.depends = libs
#tools.depends = libs

36
ai-commit.sh Normal file
View File

@ -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

View File

@ -6,66 +6,9 @@ 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 \
reportissuedialog.cpp \
soundviewer.cpp \
stringtableviewer.cpp \
rumblegraphviewer.cpp \
rumblefileviewer.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 \
reportissuedialog.h \
soundviewer.h \
stringtableviewer.h \
rumblegraphviewer.h \
rumblefileviewer.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 \
rumblegraphviewer.ui \
rumblefileviewer.ui \
techsetviewer.ui \
zonefileviewer.ui \
reportissuedialog.ui
SOURCES += $$files($$PWD/*.cpp)
HEADERS += $$files($$PWD/*.h)
FORMS += $$files($$PWD/*.ui)
RESOURCES += ../data/data.qrc
@ -74,6 +17,7 @@ LIBS += \
-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 \
@ -93,7 +37,7 @@ INCLUDEPATH += \
$$PWD/../libs/ddsfile \
$$PWD/../libs/ipakfile \
$$PWD/../libs/iwifile \
$$PWD/../libs/assets \
$$PWD/../libs/xassets \
$$PWD/../libs/zonefile
DEPENDPATH += \
@ -107,17 +51,11 @@ DEPENDPATH += \
$$PWD/../libs/ddsfile \
$$PWD/../libs/ipakfile \
$$PWD/../libs/iwifile \
$$PWD/../libs/assets \
$$PWD/../libs/xassets \
$$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)
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)
}

View File

@ -14,8 +14,8 @@ DDSViewer::~DDSViewer() {
delete ui;
}
void DDSViewer::SetDDSFile(std::shared_ptr<DDSFile> aDDSFile) {
mDDSFile.swap(aDDSFile);
void DDSViewer::SetDDSFile(const DDSFile* aDDSFile) {
mDDSFile = aDDSFile;
ui->label_Title->setText(mDDSFile->fileStem + ".dds");

View File

@ -16,14 +16,14 @@ public:
explicit DDSViewer(QWidget *parent = nullptr);
~DDSViewer();
void SetDDSFile(std::shared_ptr<DDSFile> aDDSFile);
void SetDDSFile(const DDSFile *aDDSFile);
private slots:
void MipmapIndexChanged(int aMipmapIndex);
private:
Ui::DDSViewer *ui;
std::shared_ptr<DDSFile> mDDSFile;
const DDSFile* mDDSFile;
};
#endif // DDSVIEWER_H

View File

@ -14,8 +14,8 @@ FastFileViewer::~FastFileViewer()
delete ui;
}
void FastFileViewer::SetFastFile(std::shared_ptr<FastFile> aFastFile) {
mFastFile.swap(aFastFile);
void FastFileViewer::SetFastFile(const FastFile* aFastFile) {
mFastFile = aFastFile;
ui->label_Title->setText(mFastFile->GetStem());
ui->comboBox_Company->setCurrentIndex(mFastFile->GetCompany());

View File

@ -16,10 +16,10 @@ public:
explicit FastFileViewer(QWidget *parent = nullptr);
~FastFileViewer();
void SetFastFile(std::shared_ptr<FastFile> aFastFile);
void SetFastFile(const FastFile *aFastFile);
private:
Ui::FFViewer *ui;
std::shared_ptr<FastFile> mFastFile;
const FastFile* mFastFile;
};
#endif // FASTFILEVIEWER_H

View File

@ -14,8 +14,8 @@ IWIViewer::~IWIViewer()
delete ui;
}
void IWIViewer::SetIWIFile(std::shared_ptr<IWIFile> aIWIFile) {
mIWIFile.swap(aIWIFile);
void IWIViewer::SetIWIFile(const IWIFile* aIWIFile) {
mIWIFile = aIWIFile;
ui->label_Title->setText(mIWIFile->fileStem + ".iwi");

View File

@ -18,10 +18,10 @@ public:
void MipmapIndexChanged(int aMipmapIndex);
void SetIWIFile(std::shared_ptr<IWIFile> aIWIFile);
void SetIWIFile(const IWIFile *aIWIFile);
private:
Ui::IWIViewer *ui;
std::shared_ptr<IWIFile> mIWIFile;
const IWIFile* mIWIFile;
};
#endif // IWIVIEWER_H

View File

@ -37,21 +37,21 @@ void LocalStringViewer::SetFileNotes(const QString aFileNotes) {
ui->plainTextEdit_FileNotes->setPlainText(mFileNotes);
}
// void LocalStringViewer::AddLocalString(LocalizeEntry 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.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::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(std::shared_ptr<ZoneFile> aZoneFile) {
// mLocalStrings.clear();
// ui->tableWidget_Strings->clear();
void LocalStringViewer::SetZoneFile(const ZoneFile* aZoneFile) {
mLocalStrings.clear();
ui->tableWidget_Strings->clear();
// ui->label_Title->setText(aZoneFile->GetStem().section('.', 0, 0) + ".str");
ui->label_Title->setText(aZoneFile->GetStem().section('.', 0, 0) + ".str");
// for (const LocalString &localStr : aZoneFile->GetAssetMap().localStrings) {
// AddLocalString(localStr);
// }

View File

@ -1,6 +1,7 @@
#ifndef LOCALSTRINGVIEWER_H
#define LOCALSTRINGVIEWER_H
#include "xlocalizeentry.h"
#include "zonefile.h"
#include <QWidget>
@ -19,15 +20,15 @@ public:
void SetVersion(quint32 aVersion);
void SetConfigPath(const QString aConfigPath);
void SetFileNotes(const QString aFileNotes);
//void AddLocalString(LocalString aLocalString);
void SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile);
void AddLocalString(XLocalizeEntry aLocalString);
void SetZoneFile(const ZoneFile *aZoneFile);
private:
Ui::LocalStringViewer *ui;
quint32 mVersion;
QString mConfigPath;
QString mFileNotes;
//QVector<LocalString> mLocalStrings;
QVector<XLocalizeEntry> mLocalStrings;
};
#endif // LOCALSTRINGVIEWER_H

View File

@ -1,4 +1,5 @@
#include "mainwindow.h"
#include "qtimer.h"
#include "ui_mainwindow.h"
#include "aboutdialog.h"
@ -10,9 +11,7 @@
#include "materialviewer.h"
#include "preferenceeditor.h"
#include "reportissuedialog.h"
#include "rumblefileviewer.h"
#include "rumblegraphviewer.h"
#include "soundviewer.h"
#include "stringtableviewer.h"
#include "techsetviewer.h"
#include "fastfile_factory.h"
@ -24,12 +23,11 @@
#include "ipak_structs.h"
#include "iwiviewer.h"
#include "localstringviewer.h"
#include "imagewidget.h"
#include "zonefileviewer.h"
#include "techsetviewer.h"
#include "logmanager.h"
#include <qmath.h>
#include <QtMath>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow) {
@ -37,6 +35,8 @@ MainWindow::MainWindow(QWidget *parent)
setAcceptDrops(true);
XAsset::SetDebug(true);
mTypeMap = QMap<QString, int>();
mTypeOrder = QStringList();
mRawFileMap = QMap<QString, QString>();
@ -159,7 +159,7 @@ MainWindow::MainWindow(QWidget *parent)
ui->tabWidget->clear();
});
connect(mTreeWidget, &XTreeWidget::RawFileSelected, this, [this](std::shared_ptr<RawFile> rawFile, const QString aParentName) {
connect(mTreeWidget, &XTreeWidget::RawFileSelected, this, [this](const XRawFile* rawFile, const QString aParentName) {
QTabWidget *rawTabWidget = new QTabWidget(this);
rawTabWidget->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
@ -202,7 +202,7 @@ MainWindow::MainWindow(QWidget *parent)
rawTabWidget->addTab(scriptEditor, "Text Editor");
ui->tabWidget->addTab(rawTabWidget, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_RUMBLE));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_RUMBLE));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
return;
} else if (fileStem.contains(".shock")) {
@ -216,7 +216,7 @@ MainWindow::MainWindow(QWidget *parent)
rawTabWidget->addTab(scriptEditor, "Text Editor");
ui->tabWidget->addTab(rawTabWidget, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_RUMBLE));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_RUMBLE));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
return;
}*/ else {
@ -224,7 +224,7 @@ MainWindow::MainWindow(QWidget *parent)
}
ui->tabWidget->addTab(scriptEditor, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_RAWFILE));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_RAWFILE));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
});
@ -243,7 +243,7 @@ MainWindow::MainWindow(QWidget *parent)
// }
// ui->tabWidget->addTab(mImageWidget, fileStem);
// ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
// ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
// ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
// });
@ -251,7 +251,7 @@ MainWindow::MainWindow(QWidget *parent)
// Q_UNUSED(menu);
// });
connect(mTreeWidget, &XTreeWidget::MaterialSelected, this, [this](std::shared_ptr<Material> material, const QString aParentName) {
connect(mTreeWidget, &XTreeWidget::MaterialSelected, this, [this](const XMaterial* material, const QString aParentName) {
MaterialViewer *matViewer = new MaterialViewer(this);
matViewer->setAcceptDrops(false);
matViewer->SetMaterial(material);
@ -266,11 +266,11 @@ MainWindow::MainWindow(QWidget *parent)
// }
//ui->tabWidget->addTab(matViewer, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_MATERIAL));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_MATERIAL));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
});
connect(mTreeWidget, &XTreeWidget::DDSFileSelected, this, [this](std::shared_ptr<DDSFile> ddsFile, const QString aParentName) {
connect(mTreeWidget, &XTreeWidget::DDSFileSelected, this, [this](const DDSFile* ddsFile, const QString aParentName) {
DDSViewer *ddsViewer = new DDSViewer(this);
ddsViewer->setAcceptDrops(false);
ddsViewer->SetDDSFile(ddsFile);
@ -285,11 +285,11 @@ MainWindow::MainWindow(QWidget *parent)
}
ui->tabWidget->addTab(ddsViewer, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
});
connect(mTreeWidget, &XTreeWidget::IWIFileSelected, this, [this](std::shared_ptr<IWIFile> iwiFile, const QString aParentName) {
connect(mTreeWidget, &XTreeWidget::IWIFileSelected, this, [this](const IWIFile* iwiFile, const QString aParentName) {
IWIViewer *iwiViewer = new IWIViewer(this);
iwiViewer->setAcceptDrops(false);
iwiViewer->SetIWIFile(iwiFile);
@ -304,11 +304,11 @@ MainWindow::MainWindow(QWidget *parent)
}
ui->tabWidget->addTab(iwiViewer, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
});
connect(mTreeWidget, &XTreeWidget::FastFileSelected, this, [this](std::shared_ptr<FastFile> aFastFile, const QString aParentName) {
connect(mTreeWidget, &XTreeWidget::FastFileSelected, this, [this](const FastFile* aFastFile, const QString aParentName) {
FastFileViewer *fastFileViewer = new FastFileViewer(this);
fastFileViewer->setAcceptDrops(false);
fastFileViewer->SetFastFile(aFastFile);
@ -323,11 +323,11 @@ MainWindow::MainWindow(QWidget *parent)
}
ui->tabWidget->addTab(fastFileViewer, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_FAST_FILE));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon("FF"));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
});
connect(mTreeWidget, &XTreeWidget::ZoneFileSelected, this, [this](std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName) {
connect(mTreeWidget, &XTreeWidget::ZoneFileSelected, this, [this](const ZoneFile* aZoneFile, const QString aParentName) {
ZoneFileViewer *zoneFileViewer = new ZoneFileViewer(this);
zoneFileViewer->setAcceptDrops(false);
zoneFileViewer->SetZoneFile(aZoneFile);
@ -354,11 +354,11 @@ MainWindow::MainWindow(QWidget *parent)
scrollArea->setWidget(containerWidget);
ui->tabWidget->addTab(scrollArea, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_ZONE_FILE));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon("ZF"));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
});
connect(mTreeWidget, &XTreeWidget::LocalStringSelected, this, [this](std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName) {
connect(mTreeWidget, &XTreeWidget::LocalStringSelected, this, [this](const ZoneFile* aZoneFile, const QString aParentName) {
LocalStringViewer *localStrViewer = new LocalStringViewer(this);
localStrViewer->setAcceptDrops(false);
localStrViewer->SetZoneFile(aZoneFile);
@ -373,17 +373,17 @@ MainWindow::MainWindow(QWidget *parent)
}
ui->tabWidget->addTab(localStrViewer, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_LOCALIZE_ENTRY));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_LOCALIZE_ENTRY));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
});
connect(mTreeWidget, &XTreeWidget::TechSetSelected, this, [this](std::shared_ptr<MaterialTechSet> aTechSet, const QString aParentName) {
connect(mTreeWidget, &XTreeWidget::TechSetSelected, this, [this](const XMaterialTechniqueSet* aTechSet, const QString aParentName) {
TechSetViewer *techSetViewer = new TechSetViewer(this);
techSetViewer->setAcceptDrops(false);
techSetViewer->SetTechSet(aTechSet);
techSetViewer->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
QString fileStem = aTechSet->name;
QString fileStem = aTechSet->GetName();
for (int i = 0; i < ui->tabWidget->count(); i++) {
if (ui->tabWidget->tabText(i) == fileStem) {
delete techSetViewer;
@ -391,18 +391,18 @@ MainWindow::MainWindow(QWidget *parent)
}
}
ui->tabWidget->addTab(techSetViewer, aTechSet->name);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_TECHNIQUE_SET));
ui->tabWidget->addTab(techSetViewer, aTechSet->GetName());
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_TECHNIQUE_SET));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
});
connect(mTreeWidget, &XTreeWidget::StrTableSelected, this, [this](std::shared_ptr<StringTable> aStrTable, const QString aParentName) {
connect(mTreeWidget, &XTreeWidget::StrTableSelected, this, [this](const XStringTable* aStrTable, const QString aParentName) {
StringTableViewer *strTableViewer = new StringTableViewer(this);
strTableViewer->setAcceptDrops(false);
strTableViewer->SetStringTable(aStrTable);
strTableViewer->setProperty("PARENT_NAME", QVariant::fromValue(aParentName));
QString fileStem = aStrTable->name;
QString fileStem = aStrTable->GetName()->GetString();
for (int i = 0; i < ui->tabWidget->count(); i++) {
if (ui->tabWidget->tabText(i) == fileStem) {
delete strTableViewer;
@ -411,7 +411,7 @@ MainWindow::MainWindow(QWidget *parent)
}
ui->tabWidget->addTab(strTableViewer, fileStem);
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_STRINGTABLE));
ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_STRINGTABLE));
ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
});
@ -430,7 +430,7 @@ MainWindow::MainWindow(QWidget *parent)
// }
// ui->tabWidget->addTab(soundViewer, fileStem);
// ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(Utils::ASSET_SOUND));
// ui->tabWidget->setTabIcon(ui->tabWidget->count() - 1, Utils::CreateAssetIcon(ASSET_TYPE_SOUND));
// ui->tabWidget->setCurrentIndex(ui->tabWidget->count() - 1);
// });
@ -533,7 +533,22 @@ bool MainWindow::OpenFastFile(const QString aFastFilePath) {
return false;
}
std::shared_ptr<FastFile> fastFile = FastFileFactory::Create(aFastFilePath);
FastFile* fastFile = FastFile::Open(aFastFilePath);
fastFile->SetStem(fastFileStem);
mTreeWidget->AddFastFile(fastFile);
// Open zone file after decompressing ff and writing
return true;
}
bool MainWindow::OpenFastFile(const QByteArray& aFastFileData, const QString aFastFilePath) {
const QString fastFileStem = aFastFilePath.section("/", -1, -1);
if (mTreeWidget->HasFastFile(fastFileStem)) {
LogManager::instance().addError("Can't add duplicate file!");
return false;
}
FastFile* fastFile = FastFile::Open(aFastFileData);
fastFile->SetStem(fastFileStem);
mTreeWidget->AddFastFile(fastFile);
@ -550,18 +565,11 @@ bool MainWindow::OpenFastFile(const QString aFastFilePath) {
bool MainWindow::OpenFastFile() {
// Open file dialog to steam apps
const QString steamPath = "C:/Program Files (x86)/Steam/steamapps/common/Call of Duty World at War/zone/english/";
const QString fastFilePath = QFileDialog::getOpenFileName(this, "Open Fast File", steamPath, "Fast File (*.ff);;All Files (*.*)");
if (fastFilePath.isNull()) {
// User pressed cancel
return false;
} else if (!QFile::exists(fastFilePath)) {
QMessageBox::warning(this, "Warning!", QString("%1 does not exist!.").arg(fastFilePath));
return false;
}
if (!OpenFastFile(fastFilePath)) {
qDebug() << "Failed to open Fast file!";
return false;
}
QFileDialog::getOpenFileContent(tr("Fast File (*.ff);;All Files (*.*)"), [this](const QString &fileName, const QByteArray &data){
OpenFastFile(data, fileName);
});
return true;
}
@ -575,12 +583,12 @@ bool MainWindow::OpenZoneFile(const QString aZoneFilePath, bool fromFF) {
Q_UNUSED(aZoneFilePath);
Q_UNUSED(fromFF);
//ZoneFile zoneFile;
//if (!zoneFile.Load(aZoneFilePath)) {
// ZoneFile* zoneFile = ZoneFile::Create();
// if (!zoneFile.Load(aZoneFilePath)) {
// qDebug() << "Error: Failed to load zone file!";
// return false;
//}
//mTreeWidget->AddZoneFile(std::make_shared<ZoneFile>(zoneFile));
// }
// mTreeWidget->AddZoneFile(std::make_shared<ZoneFile>(zoneFile));
return true;
}
@ -665,7 +673,7 @@ quint32 DXT3 = 0x33545844; // 'DXT3'
quint32 DXT5 = 0x35545844; // 'DXT5'
int MainWindow::LoadFile_IWI(const QString aFilePath) {
mTreeWidget->AddIWIFile(std::make_shared<IWIFile>(aFilePath));
mTreeWidget->AddIWIFile(new IWIFile(aFilePath));
return 0;
}
@ -676,7 +684,7 @@ int MainWindow::LoadFile_DDSFiles(const QStringList aFilePaths) {
qDebug() << "Error: Invalid filename " << filePath;
return -1;
}
mTreeWidget->AddDDSFile(std::make_shared<DDSFile>(filePath));
mTreeWidget->AddDDSFile(new DDSFile(filePath));
}
return 0;
}
@ -708,7 +716,7 @@ int MainWindow::LoadFile_DDS(const QString aFilePath) {
qDebug() << "Error: Invalid filename " << aFilePath;
return -1;
}
mTreeWidget->AddDDSFile(std::make_shared<DDSFile>(aFilePath));
mTreeWidget->AddDDSFile(new DDSFile(aFilePath));
return 0;
}
@ -781,7 +789,7 @@ int MainWindow::LoadFile_IPAK(const QString aFilePath) {
QVector<IPAKIndexEntry> entries = QVector<IPAKIndexEntry>();
QVector<IPAKSection> sections = QVector<IPAKSection>(header.sectionCount);
for (uint i = 0; i < header.sectionCount; i++) {
for (quint32 i = 0; i < header.sectionCount; i++) {
IPAKSection currentSection;
stream >> currentSection;
sections << currentSection;
@ -803,7 +811,7 @@ int MainWindow::LoadFile_IPAK(const QString aFilePath) {
<< " - Count: " << chunkHeader.count << "\n"
<< " - Offset: " << chunkHeader.offset;
for (uint j = 0; j < 31; j++) {
for (quint32 j = 0; j < 31; j++) {
IPAKDataChunkCommand command;
stream >> command;
if (!command.size) { continue; }
@ -813,7 +821,7 @@ int MainWindow::LoadFile_IPAK(const QString aFilePath) {
<< " - Compressed: " << command.compressed;
}
for (uint j = 0; j < chunkHeader.count; j++) {
for (quint32 j = 0; j < chunkHeader.count; j++) {
auto command = chunkHeader.commands[j];
qDebug() << "Reading from " << stream.device()->pos();
@ -838,7 +846,7 @@ int MainWindow::LoadFile_IPAK(const QString aFilePath) {
stream.skipRawData(sizeof(quint32) * (31 - chunkHeader.count));
qDebug() << stream.device()->pos();
} else if (sectionType == "Index") {
for (uint j = 0; j < currentSection.itemCount; j++) {
for (quint32 j = 0; j < currentSection.itemCount; j++) {
IPAKIndexEntry entry;
stream >> entry;

View File

@ -15,7 +15,6 @@
#include <QPlainTextEdit>
#include <QMimeData>
#include <QProgressBar>
#include <windows.h>
QT_BEGIN_NAMESPACE
namespace Ui {
@ -34,6 +33,7 @@ public:
private slots:
bool OpenFastFile(const QString aFastFilePath);
bool OpenFastFile(const QByteArray& aFastFileData, const QString aFastFilePath);
bool OpenFastFile();
bool OpenZoneFile(const QString aZoneFilePath, bool fromFF = false);

View File

@ -3,19 +3,27 @@
MaterialViewer::MaterialViewer(QWidget *parent)
: QWidget(parent)
, ui(new Ui::MaterialViewer) {
, ui(new Ui::MaterialViewer)
{
ui->setupUi(this);
}
MaterialViewer::~MaterialViewer() {
MaterialViewer::~MaterialViewer()
{
delete ui;
}
QString ToHexStr(quint32 in) {
QString ToHexStr(quint32 in)
{
return QString("%1").arg(in, 8, 16, QChar('0')).toUpper();
}
void MaterialViewer::SetMaterial(std::shared_ptr<Material> aMaterial) {
void MaterialViewer::SetMaterial(const XMaterial* aMaterial)
{
Q_UNUSED(aMaterial);
// TODO: Fill in MaterialViewer::SetMaterial
// ui->lineEdit_NamePtr->setText(ToHexStr(aMaterial->namePtr));
// ui->lineEdit_Name->setText(aMaterial->name);
// ui->lineEdit_RefPtr->setText(ToHexStr(aMaterial->refNamePtr));

View File

@ -1,7 +1,7 @@
#ifndef MATERIALVIEWER_H
#define MATERIALVIEWER_H
#include "material.h"
#include "xmaterial.h"
#include <QWidget>
#include <QScrollArea>
@ -18,7 +18,7 @@ public:
explicit MaterialViewer(QWidget *parent = nullptr);
~MaterialViewer();
void SetMaterial(std::shared_ptr<Material> aMaterial);
void SetMaterial(const XMaterial *aMaterial);
private:
Ui::MaterialViewer *ui;

View File

@ -18,7 +18,7 @@ RumbleFileViewer::~RumbleFileViewer() {
delete ui;
}
void RumbleFileViewer::SetRumbleFile(std::shared_ptr<RawFile> aRumbleFile) {
void RumbleFileViewer::SetRumbleFile(XRawFile *aRumbleFile) {
mRumbleFile = aRumbleFile;
ui->tableWidget_Properties->clear();

View File

@ -1,7 +1,7 @@
#ifndef RUMBLEFILEVIEWER_H
#define RUMBLEFILEVIEWER_H
#include "rawfile.h"
#include "xrawfile.h"
#include <QWidget>
@ -17,12 +17,12 @@ public:
explicit RumbleFileViewer(QWidget *parent = nullptr);
~RumbleFileViewer();
void SetRumbleFile(std::shared_ptr<RawFile> aRumbleFile);
void SetRumbleFile(XRawFile* aRumbleFile);
private:
Ui::RumbleFileViewer *ui;
quint32 mPropertyCount;
std::shared_ptr<RawFile> mRumbleFile;
XRawFile* mRumbleFile;
};
#endif // RUMBLEFILEVIEWER_H

View File

@ -19,10 +19,10 @@ RumbleGraphViewer::~RumbleGraphViewer() {
delete ui;
}
void RumbleGraphViewer::SetRumbleGraphFile(const std::shared_ptr<RawFile> aRawFile) {
void RumbleGraphViewer::SetRumbleGraphFile(const XRawFile* aRawFile) {
mRumbleGraphFile = aRawFile;
QDataStream rawFileStream;//(mRumbleGraphFile->contents.toLatin1());
XDataStream rawFileStream;//(mRumbleGraphFile->contents.toLatin1());
QByteArray magic(15, Qt::Uninitialized);
rawFileStream.readRawData(magic.data(), 15);

View File

@ -1,6 +1,7 @@
#ifndef RUMBLEGRAPHVIEWER_H
#define RUMBLEGRAPHVIEWER_H
#include "xrawfile.h"
#include "zonefile.h"
#include <QWidget>
@ -17,13 +18,13 @@ public:
~RumbleGraphViewer();
void SetEntryCount(quint32 aCount);
void SetRumbleGraphFile(const std::shared_ptr<RawFile> aRawFile);
void SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile);
void SetRumbleGraphFile(const XRawFile *aRawFile);
void SetZoneFile(ZoneFile* aZoneFile);
private:
Ui::RumbleGraphViewer *ui;
quint32 mEntryCount;
std::shared_ptr<RawFile> mRumbleGraphFile;
const XRawFile* mRumbleGraphFile;
};
#endif // RUMBLEGRAPHVIEWER_H

View File

@ -13,24 +13,23 @@ StringTableViewer::~StringTableViewer()
delete ui;
}
void StringTableViewer::SetStringTable(std::shared_ptr<StringTable> aStringTable) {
void StringTableViewer::SetStringTable(const XStringTable *aStringTable) {
ui->tableWidget_Strings->clear();
ui->tableWidget_Strings->setRowCount(aStringTable->rowCount);
ui->tableWidget_Strings->setColumnCount(aStringTable->columnCount);
ui->tableWidget_Strings->setRowCount(aStringTable->GetRowCount());
ui->tableWidget_Strings->setColumnCount(aStringTable->GetColumnCount());
// int currentIndex = 0;
// for (const QString &key : aStringTable->content.keys()) {
// const QString value = aStringTable->content[key];
int currentIndex = 0;
for (auto value : *aStringTable->GetValues()) {
// QTableWidgetItem *tableKeyItem = new QTableWidgetItem();
// tableKeyItem->setText(key);
// ui->tableWidget_Strings->setItem(currentIndex, 0, tableKeyItem);
QTableWidgetItem *tableKeyItem = new QTableWidgetItem();
tableKeyItem->setText(value->GetName());
ui->tableWidget_Strings->setItem(currentIndex, 0, tableKeyItem);
// QTableWidgetItem *tableValItem = new QTableWidgetItem();
// tableValItem->setText(value);
// ui->tableWidget_Strings->setItem(currentIndex, 1, tableValItem);
QTableWidgetItem *tableValItem = new QTableWidgetItem();
tableValItem->setText(value->GetString());
ui->tableWidget_Strings->setItem(currentIndex, 1, tableValItem);
// currentIndex++;
// }
currentIndex++;
}
}

View File

@ -1,7 +1,7 @@
#ifndef STRINGTABLEVIEWER_H
#define STRINGTABLEVIEWER_H
#include "stringtable.h"
#include "xstringtable.h"
#include <QWidget>
@ -17,7 +17,7 @@ public:
explicit StringTableViewer(QWidget *parent = nullptr);
~StringTableViewer();
void SetStringTable(std::shared_ptr<StringTable> aStringTable);
void SetStringTable(const XStringTable *aStringTable);
private:
Ui::StringTableViewer *ui;

View File

@ -13,9 +13,9 @@ TechSetViewer::~TechSetViewer()
delete ui;
}
void TechSetViewer::SetTechSet(std::shared_ptr<MaterialTechSet> aTechSet) {
void TechSetViewer::SetTechSet(const XMaterialTechniqueSet* aTechSet) {
//ui->listWidget_Ptrs->clear();
ui->label_Title->setText(aTechSet->name);
ui->label_Title->setText(aTechSet->GetName());
// int ptrIndex = 1;
//for (auto ptr : aTechSet->pointers) {

View File

@ -1,7 +1,7 @@
#ifndef TECHSETVIEWER_H
#define TECHSETVIEWER_H
#include "materialtechset.h"
#include "xmaterialtechniqueset.h"
#include <QWidget>
@ -17,7 +17,7 @@ public:
explicit TechSetViewer(QWidget *parent = nullptr);
~TechSetViewer();
void SetTechSet(std::shared_ptr<MaterialTechSet> aTechSet);
void SetTechSet(const XMaterialTechniqueSet *aTechSet);
private:
Ui::TechSetViewer *ui;

View File

@ -5,10 +5,10 @@
XTreeWidget::XTreeWidget(QWidget *parent)
: QTreeWidget(parent) {
mFastFiles = QMap<QString, std::shared_ptr<FastFile>>();
mZoneFiles = QMap<QString, std::shared_ptr<ZoneFile>>();
mDDSFiles = QMap<QString, std::shared_ptr<DDSFile>>();
mIWIFiles = QMap<QString, std::shared_ptr<IWIFile>>();
mFastFiles = QMap<QString, const FastFile*>();
mZoneFiles = QMap<QString, const ZoneFile*>();
mDDSFiles = QMap<QString, const DDSFile*>();
mIWIFiles = QMap<QString, const IWIFile*>();
setContextMenuPolicy(Qt::CustomContextMenu);
setSelectionMode(QTreeWidget::SingleSelection);
@ -37,7 +37,7 @@ XTreeWidget::~XTreeWidget() {
}
void XTreeWidget::AddFastFile(std::shared_ptr<FastFile> aFastFile) {
void XTreeWidget::AddFastFile(FastFile* aFastFile) {
XTreeWidgetItem *fastFileItem = new XTreeWidgetItem(this);
fastFileItem->setText(0, aFastFile->GetStem());
fastFileItem->setIcon(0, Utils::CreateAssetIcon("FF"));
@ -83,176 +83,189 @@ void XTreeWidget::AddFastFile(std::shared_ptr<FastFile> aFastFile) {
sortByColumn(0, Qt::AscendingOrder);
}
void XTreeWidget::AddZoneFile(std::shared_ptr<ZoneFile> aZoneFile, XTreeWidgetItem *aParentItem) {
void XTreeWidget::AddZoneFile(const ZoneFile* aZoneFile, XTreeWidgetItem *aParentItem) {
XTreeWidgetItem *zoneItem;
if (aParentItem != nullptr) {
zoneItem = new XTreeWidgetItem(aParentItem);
} else {
zoneItem = new XTreeWidgetItem(this);
}
zoneItem->setIcon(0, Utils::CreateAssetIcon(Utils::ASSET_ZONE_FILE));
zoneItem->setIcon(0, Utils::CreateAssetIcon("ZF"));
zoneItem->setText(0, aZoneFile->GetBaseStem() + ".zone");
auto assetMap = aZoneFile->GetAssetMap();
if (!assetMap.localizeEntries.isEmpty()) {
QIcon localStrIcon = Utils::CreateAssetIcon(Utils::ASSET_LOCALIZE_ENTRY);
XTreeWidgetItem *localStrRoot = new XTreeWidgetItem(zoneItem);
localStrRoot->setText(0, "String Files");
localStrRoot->setIcon(0, localStrIcon);
localStrRoot->SetCategory(CATEGORY_TYPE);
XTreeWidgetItem *localStrItem = new XTreeWidgetItem(localStrRoot);
localStrItem->setText(0, aZoneFile->GetStem().section('.', 0, 0) + ".str");
localStrItem->setIcon(0, localStrIcon);
}
if (!assetMap.techSets.isEmpty()) {
QIcon techSetIcon = Utils::CreateAssetIcon(Utils::ASSET_TECHNIQUE_SET);
XTreeWidgetItem *techSetRoot = new XTreeWidgetItem(zoneItem);
techSetRoot->setText(0, "Tech Sets");
techSetRoot->setIcon(0, techSetIcon);
techSetRoot->SetCategory(CATEGORY_TYPE);
for (auto techSet : assetMap.techSets) {
XTreeWidgetItem *techSetItem = new XTreeWidgetItem(techSetRoot);
techSetItem->setText(0, techSet.name);
techSetItem->setIcon(0, techSetIcon);
XAssetList assetList = aZoneFile->GetAssetList();
QVector<XAsset*> localizeEntries;
for (int i = 0; i < assetList.Size(); i++)
{
XAsset *currentAsset = assetList.GetAsset(i);
if (currentAsset->GetType() == ASSET_TYPE_LOCALIZE_ENTRY)
{
localizeEntries.append(currentAsset);
} else if (currentAsset->GetType() == ASSET_TYPE_LOCALIZE_ENTRY)
{
localizeEntries.append(currentAsset);
}
}
if (!assetMap.rawFiles.isEmpty()) {
QIcon rawFileIcon = Utils::CreateAssetIcon(Utils::ASSET_RAWFILE);
XTreeWidgetItem *rawFileRoot = new XTreeWidgetItem(zoneItem);
rawFileRoot->setText(0, "Raw Files");
rawFileRoot->setIcon(0, rawFileIcon);
rawFileRoot->SetCategory(CATEGORY_TYPE);
for (auto rawFile : assetMap.rawFiles) {
if (!rawFile.length) { continue; }
// if (!assetMap.localizeEntries.isEmpty()) {
// QIcon localStrIcon = Utils::CreateAssetIcon(ASSET_TYPE_LOCALIZE_ENTRY);
XTreeWidgetItem *tempItem = rawFileRoot;
// const QStringList pathParts = rawFile->path.split('/');
// for (const QString &pathPart : pathParts) {
// bool childFound = false;
// for (int i = 0; i < tempItem->childCount(); i++) {
// QTreeWidgetItem *rawChildItem = tempItem->child(i);
// XTreeWidgetItem *childItem = dynamic_cast<XTreeWidgetItem*>(rawChildItem);
// if (childItem->text(0) == pathPart) {
// tempItem = childItem;
// XTreeWidgetItem *localStrRoot = new XTreeWidgetItem(zoneItem);
// localStrRoot->setText(0, "String Files");
// localStrRoot->setIcon(0, localStrIcon);
// localStrRoot->SetCategory(CATEGORY_TYPE);
// childFound = true;
// break;
// XTreeWidgetItem *localStrItem = new XTreeWidgetItem(localStrRoot);
// localStrItem->setText(0, aZoneFile->GetStem().section('.', 0, 0) + ".str");
// localStrItem->setIcon(0, localStrIcon);
// }
// if (!assetMap.techSets.isEmpty()) {
// QIcon techSetIcon = Utils::CreateAssetIcon(ASSET_TYPE_TECHNIQUE_SET);
// XTreeWidgetItem *techSetRoot = new XTreeWidgetItem(zoneItem);
// techSetRoot->setText(0, "Tech Sets");
// techSetRoot->setIcon(0, techSetIcon);
// techSetRoot->SetCategory(CATEGORY_TYPE);
// for (auto techSet : assetMap.techSets) {
// XTreeWidgetItem *techSetItem = new XTreeWidgetItem(techSetRoot);
// techSetItem->setText(0, techSet.name);
// techSetItem->setIcon(0, techSetIcon);
// }
// }
// const QString rawFileStr = pathPart;// = QString("%1 [%2-%3]").arg(pathPart).arg(rawFile.startPos).arg(rawFile.endPos);
// if (pathPart == pathParts.last()) {
// XTreeWidgetItem *rawFileItem = new XTreeWidgetItem(tempItem);
// rawFileItem->setText(0, rawFileStr);
// if (!assetMap.rawFiles.isEmpty()) {
// QIcon rawFileIcon = Utils::CreateAssetIcon(ASSET_TYPE_RAWFILE);
// tempItem = rawFileItem;
// } else if (!childFound) {
// tempItem = new XTreeWidgetItem(tempItem);
// tempItem->setText(0, rawFileStr);
// XTreeWidgetItem *rawFileRoot = new XTreeWidgetItem(zoneItem);
// rawFileRoot->setText(0, "Raw Files");
// rawFileRoot->setIcon(0, rawFileIcon);
// rawFileRoot->SetCategory(CATEGORY_TYPE);
// for (auto rawFile : assetMap.rawFiles) {
// if (!rawFile.length) { continue; }
// XTreeWidgetItem *tempItem = rawFileRoot;
// // const QStringList pathParts = rawFile->path.split('/');
// // for (const QString &pathPart : pathParts) {
// // bool childFound = false;
// // for (int i = 0; i < tempItem->childCount(); i++) {
// // QTreeWidgetItem *rawChildItem = tempItem->child(i);
// // XTreeWidgetItem *childItem = dynamic_cast<XTreeWidgetItem*>(rawChildItem);
// // if (childItem->text(0) == pathPart) {
// // tempItem = childItem;
// // childFound = true;
// // break;
// // }
// // }
// // const QString rawFileStr = pathPart;// = QString("%1 [%2-%3]").arg(pathPart).arg(rawFile.startPos).arg(rawFile.endPos);
// // if (pathPart == pathParts.last()) {
// // XTreeWidgetItem *rawFileItem = new XTreeWidgetItem(tempItem);
// // rawFileItem->setText(0, rawFileStr);
// // tempItem = rawFileItem;
// // } else if (!childFound) {
// // tempItem = new XTreeWidgetItem(tempItem);
// // tempItem->setText(0, rawFileStr);
// // }
// // }
// tempItem->setIcon(0, rawFileIcon);
// }
// }
// if (!assetMap.menuDefinitions.isEmpty()) {
// // QIcon MenuDefIcon = Utils::CreateAssetIcon(ASSET_TYPE_MENU);
// // XTreeWidgetItem *menuRoot = new XTreeWidgetItem(zoneItem);
// // menuRoot->setText(0, "Menu Files");
// // menuRoot->setIcon(0, MenuDefIcon);
// // menuRoot->SetCategory(CATEGORY_TYPE);
// // int menuIndex = 1;
// // for (MenuDef menuDef : assetMap.menuDefinitions) {
// // XTreeWidgetItem *MenuDefRoot = new XTreeWidgetItem(menuRoot);
// // MenuDefRoot->setText(0, QString("Menu %1").arg(menuIndex));
// // for (Menu menu : menuDef.men) {
// // XTreeWidgetItem *menuItem = new XTreeWidgetItem(MenuDefRoot);
// // menuItem->setText(0, menu.filePath);
// // menuItem->setIcon(0, MenuDefIcon);
// // }
// // menuIndex++;
// // }
// }
tempItem->setIcon(0, rawFileIcon);
}
}
if (!assetMap.menuDefinitions.isEmpty()) {
// QIcon MenuDefIcon = Utils::CreateAssetIcon(Utils::ASSET_MENU);
// if (!assetMap.images.isEmpty()) {
// // QIcon imageIcon = Utils::CreateAssetIcon(ASSET_TYPE_IMAGE);
// XTreeWidgetItem *menuRoot = new XTreeWidgetItem(zoneItem);
// menuRoot->setText(0, "Menu Files");
// menuRoot->setIcon(0, MenuDefIcon);
// menuRoot->SetCategory(CATEGORY_TYPE);
// // XTreeWidgetItem *imageRoot = new XTreeWidgetItem(zoneItem);
// // imageRoot->setText(0, "Images");
// // imageRoot->setIcon(0, imageIcon);
// // imageRoot->SetCategory(CATEGORY_TYPE);
// int menuIndex = 1;
// for (MenuDef menuDef : assetMap.menuDefinitions) {
// XTreeWidgetItem *MenuDefRoot = new XTreeWidgetItem(menuRoot);
// MenuDefRoot->setText(0, QString("Menu %1").arg(menuIndex));
// for (Menu menu : menuDef.men) {
// XTreeWidgetItem *menuItem = new XTreeWidgetItem(MenuDefRoot);
// menuItem->setText(0, menu.filePath);
// menuItem->setIcon(0, MenuDefIcon);
// // for (Image image : assetMap.images) {
// // XTreeWidgetItem *imageItem = new XTreeWidgetItem(imageRoot);
// // imageItem->setText(0, image.materialName);
// // imageItem->setIcon(0, imageIcon);
// // }
// }
// menuIndex++;
// if (!assetMap.models.isEmpty()) {
// QIcon modelIcon = Utils::CreateAssetIcon(ASSET_TYPE_XMODEL);
// XTreeWidgetItem *modelsRoot = new XTreeWidgetItem(zoneItem);
// modelsRoot->setText(0, "Models");
// modelsRoot->setIcon(0, modelIcon);
// modelsRoot->SetCategory(CATEGORY_TYPE);
// for (auto model: assetMap.models) {
// XTreeWidgetItem *modelItem = new XTreeWidgetItem(modelsRoot);
// modelItem->setText(0, model.name);
// modelItem->setIcon(0, modelIcon);
// }
}
if (!assetMap.images.isEmpty()) {
// QIcon imageIcon = Utils::CreateAssetIcon(Utils::ASSET_IMAGE);
// XTreeWidgetItem *imageRoot = new XTreeWidgetItem(zoneItem);
// imageRoot->setText(0, "Images");
// imageRoot->setIcon(0, imageIcon);
// imageRoot->SetCategory(CATEGORY_TYPE);
// for (Image image : assetMap.images) {
// XTreeWidgetItem *imageItem = new XTreeWidgetItem(imageRoot);
// imageItem->setText(0, image.materialName);
// imageItem->setIcon(0, imageIcon);
// }
}
if (!assetMap.models.isEmpty()) {
QIcon modelIcon = Utils::CreateAssetIcon(Utils::ASSET_XMODEL);
// if (!assetMap.materials.isEmpty()) {
// QIcon materialIcon = Utils::CreateAssetIcon(ASSET_TYPE_MATERIAL);
XTreeWidgetItem *modelsRoot = new XTreeWidgetItem(zoneItem);
modelsRoot->setText(0, "Models");
modelsRoot->setIcon(0, modelIcon);
modelsRoot->SetCategory(CATEGORY_TYPE);
// XTreeWidgetItem *materialsRoot = new XTreeWidgetItem(zoneItem);
// materialsRoot->setText(0, "Materials");
// materialsRoot->setIcon(0, materialIcon);
// materialsRoot->SetCategory(CATEGORY_TYPE);
for (auto model: assetMap.models) {
XTreeWidgetItem *modelItem = new XTreeWidgetItem(modelsRoot);
modelItem->setText(0, model.name);
modelItem->setIcon(0, modelIcon);
}
}
// for (auto material: assetMap.materials) {
// XTreeWidgetItem *materialItem = new XTreeWidgetItem(materialsRoot);
// //materialItem->setText(0, material.name);
// materialItem->setIcon(0, materialIcon);
// }
// }
if (!assetMap.materials.isEmpty()) {
QIcon materialIcon = Utils::CreateAssetIcon(Utils::ASSET_MATERIAL);
// if (!assetMap.stringTables.isEmpty()) {
// QIcon stringTableIcon = Utils::CreateAssetIcon(ASSET_TYPE_STRINGTABLE);
XTreeWidgetItem *materialsRoot = new XTreeWidgetItem(zoneItem);
materialsRoot->setText(0, "Materials");
materialsRoot->setIcon(0, materialIcon);
materialsRoot->SetCategory(CATEGORY_TYPE);
// XTreeWidgetItem *strTableRoot = new XTreeWidgetItem(zoneItem);
// strTableRoot->setText(0, "String Tables");
// strTableRoot->setIcon(0, stringTableIcon);
// strTableRoot->SetCategory(CATEGORY_TYPE);
for (auto material: assetMap.materials) {
XTreeWidgetItem *materialItem = new XTreeWidgetItem(materialsRoot);
//materialItem->setText(0, material.name);
materialItem->setIcon(0, materialIcon);
}
}
// for (auto strTable: assetMap.stringTables) {
// XTreeWidgetItem *modelItem = new XTreeWidgetItem(strTableRoot);
// modelItem->setText(0, strTable.name);
// modelItem->setIcon(0, stringTableIcon);
// }
// }
if (!assetMap.stringTables.isEmpty()) {
QIcon stringTableIcon = Utils::CreateAssetIcon(Utils::ASSET_STRINGTABLE);
// if (!assetMap.sounds.isEmpty()) {
// QIcon soundIcon = Utils::CreateAssetIcon(ASSET_TYPE_SOUND);
XTreeWidgetItem *strTableRoot = new XTreeWidgetItem(zoneItem);
strTableRoot->setText(0, "String Tables");
strTableRoot->setIcon(0, stringTableIcon);
strTableRoot->SetCategory(CATEGORY_TYPE);
for (auto strTable: assetMap.stringTables) {
XTreeWidgetItem *modelItem = new XTreeWidgetItem(strTableRoot);
modelItem->setText(0, strTable.name);
modelItem->setIcon(0, stringTableIcon);
}
}
if (!assetMap.sounds.isEmpty()) {
QIcon soundIcon = Utils::CreateAssetIcon(Utils::ASSET_SOUND);
XTreeWidgetItem *soundsRoot = new XTreeWidgetItem(zoneItem);
soundsRoot->setText(0, "Sounds");
soundsRoot->setIcon(0, soundIcon);
soundsRoot->SetCategory(CATEGORY_TYPE);
}
// XTreeWidgetItem *soundsRoot = new XTreeWidgetItem(zoneItem);
// soundsRoot->setText(0, "Sounds");
// soundsRoot->setIcon(0, soundIcon);
// soundsRoot->SetCategory(CATEGORY_TYPE);
// }
mZoneFiles[aZoneFile->GetBaseStem() + ".zone"] = aZoneFile;
}
@ -289,7 +302,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
QMenu *exportSubmenu = new QMenu("Export...", this);
contextMenu->addMenu(exportSubmenu);
std::shared_ptr<DDSFile> ddsFile = mDDSFiles[fileStem];
const DDSFile* ddsFile = mDDSFiles[fileStem];
QAction *exportIWIAction = new QAction("Export as IWI");
exportSubmenu->addAction(exportIWIAction);
@ -333,7 +346,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
QMenu *exportSubmenu = new QMenu("Export...", this);
contextMenu->addMenu(exportSubmenu);
std::shared_ptr<IWIFile> iwiFile = mIWIFiles[fileStem];
const IWIFile* iwiFile = mIWIFiles[fileStem];
QAction *exportDDSAction = new QAction("Export as DDS");
exportSubmenu->addAction(exportDDSAction);
@ -462,7 +475,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
QMenu *exportSubmenu = new QMenu("Export...", this);
contextMenu->addMenu(exportSubmenu);
std::shared_ptr<FastFile> fastFile = mFastFiles[fileStem];
const FastFile* fastFile = mFastFiles[fileStem];
QAction *exportFastFileAction = new QAction("Export Fast File");
exportSubmenu->addAction(exportFastFileAction);
@ -477,12 +490,12 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
});
QAction *exportZoneFileAction = new QAction("Export Zone File");
exportSubmenu->addAction(exportZoneFileAction);
connect(exportZoneFileAction, &QAction::triggered, this, [fastFile](bool checked) {
connect(exportZoneFileAction, &QAction::triggered, this, [](bool checked) {
Q_UNUSED(checked);
const QString zoneFilePath = QFileDialog::getSaveFileName(
nullptr, "Export Zone File...", QDir::currentPath(),
"Zone File (*.zone);;All Files(*.*)");
// const QString zoneFilePath = QFileDialog::getSaveFileName(
// nullptr, "Export Zone File...", QDir::currentPath(),
// "Zone File (*.zone);;All Files(*.*)");
//fastFile->GetZoneFile()->SaveZoneFile(zoneFilePath);
});
} else if (activeText.contains(".zone")) {
@ -495,7 +508,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
QMenu *exportSubmenu = new QMenu("Export...", this);
contextMenu->addMenu(exportSubmenu);
std::shared_ptr<ZoneFile> zoneFile = mZoneFiles[fileStem];
//const ZoneFile* zoneFile = mZoneFiles[fileStem];
QAction *exportZoneFileAction = new QAction("Export Zone File");
exportSubmenu->addAction(exportZoneFileAction);
@ -517,7 +530,7 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
}
}
if (parentItem && parentItem != invisibleRootItem() && parentItem->text(0).contains(".zone")) {
const QString fileStem = parentItem->text(0).section('.', 0, 0);
//const QString fileStem = parentItem->text(0).section('.', 0, 0);
// QVector<LoadedSound> LoadedSounds = mZoneFiles[fileStem]->GetAssetMap().sounds;
// for (LoadedSound LoadedSound : LoadedSounds) {
// for (Sound sound : LoadedSound.sounds) {
@ -564,14 +577,14 @@ void XTreeWidget::PrepareContextMenu(const QPoint &pos) {
}
if (parentItem && parentItem != invisibleRootItem() && parentItem->text(0).contains(".zone")) {
const QString fileStem = parentItem->text(0).section('.', 0, 0);
auto zoneFile = mZoneFiles[fileStem];
//auto zoneFile = mZoneFiles[fileStem];
QMenu *exportSubmenu = new QMenu("Export...", this);
contextMenu->addMenu(exportSubmenu);
QAction *exportAllWAVAction = new QAction("Export ALL as WAV Files");
exportSubmenu->addAction(exportAllWAVAction);
connect(exportAllWAVAction, &QAction::triggered, this, [zoneFile](bool checked) {
connect(exportAllWAVAction, &QAction::triggered, this, [](bool checked) {
Q_UNUSED(checked);
// for (LoadedSound LoadedSound : zoneFile->GetAssetMap().sounds) {
@ -618,20 +631,19 @@ void XTreeWidget::ItemSelectionChanged() {
XTreeWidgetItem *parentItem = dynamic_cast<XTreeWidgetItem*>(selectedItem->parent());
if (selectedText.contains(".dds")) {
/*if (selectedText.contains(".dds")) {
if (!mDDSFiles.contains(selectedText)) {
LogManager::instance().addError("Could not find " + selectedText + " in DDS map!");
return;
}
std::shared_ptr<DDSFile> ddsFile = mDDSFiles[selectedText];
emit DDSFileSelected(ddsFile, selectedText);
emit DDSFileSelected(mDDSFiles[selectedText], selectedText);
} else if (selectedText.contains(".iwi")) {
if (!mIWIFiles.contains(selectedText)) {
LogManager::instance().addError("Could not find " + selectedText + " in IWI map!");
return;
}
emit IWIFileSelected(mIWIFiles[selectedText], selectedText);
} else if (selectedText.contains(".ff")) {
} else */if (selectedText.contains(".ff")) {
if (!mFastFiles.contains(selectedText)) {
LogManager::instance().addError("Could not find " + selectedText + " in Fast File map!");
return;
@ -661,14 +673,14 @@ void XTreeWidget::ItemSelectionChanged() {
// }
// }
}
} else if (parentItem && (parentItem->text(0) == "Tech Sets")) {
} /*else if (parentItem && (parentItem->text(0) == "Tech Sets")) {
XTreeWidgetItem *grandpaItem = dynamic_cast<XTreeWidgetItem*>(parentItem->parent());
if (grandpaItem && grandpaItem->text(0).contains(".zone")) {
const QString fileStem = grandpaItem->text(0).section('.', 0, 0);
auto techsets = mZoneFiles[fileStem]->GetAssetMap().techSets;
auto techsets = mZoneFiles[fileStem]->GetAssetList().techSets;
for (auto techset : techsets) {
if (techset.name == selectedText) {
emit TechSetSelected(std::make_shared<MaterialTechSet>(techset), fileStem);
emit TechSetSelected(new MaterialTechSet(techset), fileStem);
break;
}
}
@ -732,10 +744,10 @@ void XTreeWidget::ItemSelectionChanged() {
// return;
//}
}
}
}*/
}
std::shared_ptr<ZoneFile> XTreeWidget::FindZoneFile(const QString aStem) {
const ZoneFile* XTreeWidget::FindZoneFile(const QString aStem) {
foreach (auto zoneFile, mZoneFiles) {
if (zoneFile->GetStem() == aStem) {
return zoneFile;
@ -744,7 +756,7 @@ std::shared_ptr<ZoneFile> XTreeWidget::FindZoneFile(const QString aStem) {
return nullptr;
}
std::shared_ptr<FastFile> XTreeWidget::FindFastFile(const QString aStem) {
const FastFile *XTreeWidget::FindFastFile(const QString aStem) {
foreach (auto fastFile, mFastFiles) {
if (fastFile->GetStem() == aStem) {
return fastFile;
@ -761,7 +773,7 @@ bool XTreeWidget::HasFastFile(const QString aStem) {
return FindFastFile(aStem) != nullptr;
}
void XTreeWidget::AddIWIFile(std::shared_ptr<IWIFile> aIWIFile) {
void XTreeWidget::AddIWIFile(IWIFile* aIWIFile) {
const QString iwiFileName = QString(aIWIFile->fileStem + ".iwi");
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
@ -772,12 +784,12 @@ void XTreeWidget::AddIWIFile(std::shared_ptr<IWIFile> aIWIFile) {
}
XTreeWidgetItem *iwiItem = new XTreeWidgetItem(this);
iwiItem->setIcon(0, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
iwiItem->setIcon(0, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
iwiItem->setText(0, iwiFileName);
mIWIFiles[aIWIFile->fileStem.section(".", 0, 0)] = aIWIFile;
}
void XTreeWidget::AddDDSFile(std::shared_ptr<DDSFile> aDDSFile) {
void XTreeWidget::AddDDSFile(DDSFile* aDDSFile) {
const QString ddsFileName = QString(aDDSFile->fileStem + ".dds");
for (int i = 0; i < invisibleRootItem()->childCount(); i++) {
@ -788,7 +800,7 @@ void XTreeWidget::AddDDSFile(std::shared_ptr<DDSFile> aDDSFile) {
}
XTreeWidgetItem *ddsItem = new XTreeWidgetItem(this);
ddsItem->setIcon(0, Utils::CreateAssetIcon(Utils::ASSET_IMAGE));
ddsItem->setIcon(0, Utils::CreateAssetIcon(ASSET_TYPE_IMAGE));
ddsItem->setText(0, ddsFileName);
mDDSFiles[aDDSFile->fileStem.section(".", 0, 0)] = aDDSFile;
}

View File

@ -5,12 +5,13 @@
#include "ddsfile.h"
#include "iwifile.h"
#include "fastfile.h"
#include "xloadedsound.h"
#include "xtreewidgetitem.h"
#include "zonefile.h"
#include "rawfile.h"
#include "gfximage.h"
#include "stringtable.h"
#include "menudef.h"
#include "xrawfile.h"
#include "xgfximage.h"
#include "xstringtable.h"
#include "xmenudef.h"
#include <QTreeWidget>
#include <QFileDialog>
@ -22,31 +23,31 @@ public:
explicit XTreeWidget(QWidget *parent = nullptr);
~XTreeWidget();
void AddFastFile(std::shared_ptr<FastFile> aFastFile);
void AddZoneFile(std::shared_ptr<ZoneFile> aZoneFile, XTreeWidgetItem *aParentItem = nullptr);
void AddIWIFile(std::shared_ptr<IWIFile> aIWIFile);
void AddDDSFile(std::shared_ptr<DDSFile> aDDSFile);
void AddFastFile(FastFile* aFastFile);
void AddZoneFile(const ZoneFile *aZoneFile, XTreeWidgetItem *aParentItem = nullptr);
void AddIWIFile(IWIFile* aIWIFile);
void AddDDSFile(DDSFile* aDDSFile);
std::shared_ptr<ZoneFile> FindZoneFile(const QString aStem);
std::shared_ptr<FastFile> FindFastFile(const QString aStem);
const ZoneFile *FindZoneFile(const QString aStem);
const FastFile* FindFastFile(const QString aStem);
bool HasZoneFile(const QString aStem);
bool HasFastFile(const QString aStem);
void CloseFastFile(const QString aFFName);
signals:
void DDSFileSelected(std::shared_ptr<DDSFile> aDDSFile, const QString aParentName);
void IWIFileSelected(std::shared_ptr<IWIFile> aIWIFile, const QString aParentName);
void FastFileSelected(std::shared_ptr<FastFile> aFastFile, const QString aParentName);
void ZoneFileSelected(std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName);
void LocalStringSelected(std::shared_ptr<ZoneFile> aZoneFile, const QString aParentName);
void RawFileSelected(std::shared_ptr<RawFile> aRawFile, const QString aParentName);
void ImageSelected(std::shared_ptr<GfxImage> aImage, const QString aParentName);
void TechSetSelected(std::shared_ptr<MaterialTechSet> aZoneFile, const QString aParentName);
void StrTableSelected(std::shared_ptr<StringTable> aStrTable, const QString aParentName);
void MenuSelected(std::shared_ptr<MenuDef> aMenu, const QString aParentName);
void SoundSelected(std::shared_ptr<LoadedSound> aSound, const QString aParentName);
void MaterialSelected(std::shared_ptr<Material> aMaterial, const QString aParentName);
void DDSFileSelected(const DDSFile* aDDSFile, const QString aParentName);
void IWIFileSelected(const IWIFile* aIWIFile, const QString aParentName);
void FastFileSelected(const FastFile* aFastFile, const QString aParentName);
void ZoneFileSelected(const ZoneFile* aZoneFile, const QString aParentName);
void LocalStringSelected(const ZoneFile* aZoneFile, const QString aParentName);
void RawFileSelected(const XRawFile* aRawFile, const QString aParentName);
void ImageSelected(const XGfxImage* aImage, const QString aParentName);
void TechSetSelected(const XMaterialTechniqueSet* aZoneFile, const QString aParentName);
void StrTableSelected(const XStringTable* aStrTable, const QString aParentName);
void MenuSelected(const XMenuDef* aMenu, const QString aParentName);
void SoundSelected(const XLoadedSound* aSound, const QString aParentName);
void MaterialSelected(const XMaterial* aMaterial, const QString aParentName);
void ItemSelected(const QString itemText);
void ItemClosed(const QString itemText);
@ -57,10 +58,10 @@ protected:
void PrepareContextMenu(const QPoint &pos);
private:
QMap<QString, std::shared_ptr<FastFile>> mFastFiles;
QMap<QString, std::shared_ptr<ZoneFile>> mZoneFiles;
QMap<QString, std::shared_ptr<DDSFile>> mDDSFiles;
QMap<QString, std::shared_ptr<IWIFile>> mIWIFiles;
QMap<QString, const FastFile*> mFastFiles;
QMap<QString, const ZoneFile*> mZoneFiles;
QMap<QString, const DDSFile*> mDDSFiles;
QMap<QString, const IWIFile*> mIWIFiles;
};
#endif // XTREEWIDGET_H

View File

@ -69,7 +69,7 @@ void ZoneFileViewer::SortTags(const QString &aSearchText) {
ui->listWidget_Tags->addItems(sortedTags);
}
void ZoneFileViewer::SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile) {
void ZoneFileViewer::SetZoneFile(const ZoneFile* aZoneFile) {
mZoneFile = aZoneFile;
ui->tableWidget_RecordCounts->clearContents();
@ -88,37 +88,36 @@ void ZoneFileViewer::SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile) {
ui->groupBox_Tags->show();
}
QMap<QString, int> recordCounts = QMap<QString, int>();
QVector<QPair<QString, int>> assetOccurances = QVector<QPair<QString, int>>();
for (const QString &record : mZoneFile->GetRecords()) {
if (!recordCounts.contains(record)) {
recordCounts[record] = 0;
QMap<XAssetType, int> recordCounts = QMap<XAssetType, int>();
QVector<QPair<XAssetType, int>> assetOccurances = QVector<QPair<XAssetType, int>>();
for (XAssetType type : mZoneFile->GetTypes()) {
if (!recordCounts.contains(type)) {
recordCounts[type] = 0;
}
recordCounts[record]++;
recordCounts[type]++;
if (!assetOccurances.isEmpty() && assetOccurances.last().first == record) {
if (!assetOccurances.isEmpty() && assetOccurances.last().first == type) {
assetOccurances.last().second++;
continue;
}
QPair<QString, int> assetOccurance(record, 1);
QPair<XAssetType, int> assetOccurance(type, 1);
assetOccurances << assetOccurance;
}
ui->tableWidget_RecordOrder->setRowCount(assetOccurances.size());
int assetIndex = 0;
foreach (auto assetOccurance, assetOccurances) {
const QString record = assetOccurance.first;
Utils::AssetType assetType = mZoneFile->AssetStrToEnum(record);
XAssetType assetType = assetOccurance.first;
int assetCount = assetOccurance.second;
QIcon assetIcon = Utils::CreateAssetIcon(assetType);
if (assetIcon.isNull()) {
qDebug() << "Icon is null for record: " << record;
qDebug() << "Icon is null for record: " << assetType;
}
QTableWidgetItem *recordItem = new QTableWidgetItem(record.toUpper());
QTableWidgetItem *recordStrItem = new QTableWidgetItem(Utils::AssetTypeToStr(assetType));
QTableWidgetItem *recordItem = new QTableWidgetItem(QString::number(assetType, 16));
QTableWidgetItem *recordStrItem = new QTableWidgetItem(XAsset::XAssetTypeToString(assetType));
QTableWidgetItem *recordCountItem = new QTableWidgetItem(QString::number(assetCount));
recordItem->setIcon(assetIcon);
@ -130,19 +129,18 @@ void ZoneFileViewer::SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile) {
}
int recordIndex = 0;
for (const QString &record : recordCounts.keys()) {
int recordCount = recordCounts[record];
for (XAssetType assetType : recordCounts.keys()) {
int recordCount = recordCounts[assetType];
Utils::AssetType assetType = mZoneFile->AssetStrToEnum(record);
QIcon assetIcon = Utils::CreateAssetIcon(assetType);
if (assetIcon.isNull()) {
qDebug() << "Icon is null for record: " << record;
qDebug() << "Icon is null for record: " << assetType;
}
ui->tableWidget_RecordCounts->setRowCount(recordIndex + 1);
QTableWidgetItem *recordItem = new QTableWidgetItem(record.toUpper());
QTableWidgetItem *recordCountStrItem = new QTableWidgetItem(Utils::AssetTypeToStr(assetType));
QTableWidgetItem *recordItem = new QTableWidgetItem(QString::number(assetType, 16));
QTableWidgetItem *recordCountStrItem = new QTableWidgetItem(XAsset::XAssetTypeToString(assetType));
QTableWidgetItem *recordCountItem = new QTableWidgetItem(QString::number(recordCount));
recordItem->setIcon(assetIcon);

View File

@ -18,7 +18,7 @@ public:
explicit ZoneFileViewer(QWidget *parent = nullptr);
~ZoneFileViewer();
void SetZoneFile(std::shared_ptr<ZoneFile> aZoneFile);
void SetZoneFile(const ZoneFile *aZoneFile);
public slots:
void SortTags(const QString &aSearchText);
@ -27,7 +27,7 @@ public slots:
private:
Ui::ZoneFileViewer *ui;
std::shared_ptr<ZoneFile> mZoneFile;
const ZoneFile* mZoneFile;
};
#endif // ZONEFILEVIEWER_H

View File

@ -20,7 +20,6 @@
<file>icons/Icon_Editor.png</file>
<file>icons/Icon_Views.png</file>
<file>icons/Icon_Tree.png</file>
<file>icons/Icon_Copy.png</file>
<file>icons/Icon_Cut.png</file>
<file>icons/Icon_Find.png</file>
<file>icons/Icon_NewFile.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

View File

@ -1,11 +0,0 @@
#include "assets_cod10_360.h"
Assets_COD10_360::Assets_COD10_360()
{
}
Assets_COD10_360::~Assets_COD10_360()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD10_360_H
#define ASSETS_COD10_360_H
#include "assets.h"
class Assets_COD10_360 : public Assets
{
public:
Assets_COD10_360();
~Assets_COD10_360();
protected:
private:
};
#endif // ASSETS_COD10_360_H

View File

@ -1,11 +0,0 @@
#include "assets_cod11_360.h"
Assets_COD11_360::Assets_COD11_360()
{
}
Assets_COD11_360::~Assets_COD11_360()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD11_360_H
#define ASSETS_COD11_360_H
#include "assets.h"
class Assets_COD11_360 : public Assets
{
public:
Assets_COD11_360();
~Assets_COD11_360();
protected:
private:
};
#endif // ASSETS_COD11_360_H

View File

@ -1,11 +0,0 @@
#include "assets_cod12_360.h"
Assets_COD12_360::Assets_COD12_360()
{
}
Assets_COD12_360::~Assets_COD12_360()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD12_360_H
#define ASSETS_COD12_360_H
#include "assets.h"
class Assets_COD12_360 : public Assets
{
public:
Assets_COD12_360();
~Assets_COD12_360();
protected:
private:
};
#endif // ASSETS_COD12_360_H

View File

@ -1,11 +0,0 @@
#include "assets_cod2_360.h"
Assets_COD2_360::Assets_COD2_360()
{
}
Assets_COD2_360::~Assets_COD2_360()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD2_360_H
#define ASSETS_COD2_360_H
#include "assets.h"
class Assets_COD2_360 : public Assets
{
public:
Assets_COD2_360();
~Assets_COD2_360();
protected:
private:
};
#endif // ASSETS_COD2_360_H

View File

@ -1,12 +0,0 @@
#include "assets_cod4_360.h"
Assets_COD4_360::Assets_COD4_360(QObject *parent)
: Assets(parent)
{
}
Assets_COD4_360::~Assets_COD4_360() {
}

View File

@ -1,15 +0,0 @@
#ifndef ASSETS_COD4_360_H
#define ASSETS_COD4_360_H
#include "assets.h"
class Assets_COD4_360 : public Assets
{
Q_OBJECT
public:
explicit Assets_COD4_360(QObject *parent = nullptr);
~Assets_COD4_360();
};
#endif // ASSETS_COD4_360_H

View File

@ -1,11 +0,0 @@
#include "assets_cod5_360.h"
Assets_COD5_360::Assets_COD5_360()
{
}
Assets_COD5_360::~Assets_COD5_360()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD5_360_H
#define ASSETS_COD5_360_H
#include "assets.h"
class Assets_COD5_360 : public Assets
{
public:
Assets_COD5_360();
~Assets_COD5_360();
protected:
private:
};
#endif // ASSETS_COD5_360_H

View File

@ -1,11 +0,0 @@
#include "assets_cod6_360.h"
Assets_COD6_360::Assets_COD6_360()
{
}
Assets_COD6_360::~Assets_COD6_360()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD6_360_H
#define ASSETS_COD6_360_H
#include "assets.h"
class Assets_COD6_360 : public Assets
{
public:
Assets_COD6_360();
~Assets_COD6_360();
protected:
private:
};
#endif // ASSETS_COD6_360_H

View File

@ -1,11 +0,0 @@
#include "assets_cod7_360.h"
Assets_COD7_360::Assets_COD7_360()
{
}
Assets_COD7_360::~Assets_COD7_360()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD7_360_H
#define ASSETS_COD7_360_H
#include "assets.h"
class Assets_COD7_360 : public Assets
{
public:
Assets_COD7_360();
~Assets_COD7_360();
protected:
private:
};
#endif // ASSETS_COD7_360_H

View File

@ -1,11 +0,0 @@
#include "assets_cod8_360.h"
Assets_COD8_360::Assets_COD8_360()
{
}
Assets_COD8_360::~Assets_COD8_360()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD8_360_H
#define ASSETS_COD8_360_H
#include "assets.h"
class Assets_COD8_360 : public Assets
{
public:
Assets_COD8_360();
~Assets_COD8_360();
protected:
private:
};
#endif // ASSETS_COD8_360_H

View File

@ -1,11 +0,0 @@
#include "assets_cod9_360.h"
Assets_COD9_360::Assets_COD9_360()
{
}
Assets_COD9_360::~Assets_COD9_360()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD9_360_H
#define ASSETS_COD9_360_H
#include "assets.h"
class Assets_COD9_360 : public Assets
{
public:
Assets_COD9_360();
~Assets_COD9_360();
protected:
private:
};
#endif // ASSETS_COD9_360_H

View File

@ -1,11 +0,0 @@
#include "assets_cod10_pc.h"
Assets_COD10_PC::Assets_COD10_PC()
{
}
Assets_COD10_PC::~Assets_COD10_PC()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD10_PC_H
#define ASSETS_COD10_PC_H
#include "assets.h"
class Assets_COD10_PC : public Assets
{
public:
Assets_COD10_PC();
~Assets_COD10_PC();
protected:
private:
};
#endif // ASSETS_COD10_PC_H

View File

@ -1,11 +0,0 @@
#include "assets_cod11_pc.h"
Assets_COD11_PC::Assets_COD11_PC()
{
}
Assets_COD11_PC::~Assets_COD11_PC()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD11_PC_H
#define ASSETS_COD11_PC_H
#include "assets.h"
class Assets_COD11_PC : public Assets
{
public:
Assets_COD11_PC();
~Assets_COD11_PC();
protected:
private:
};
#endif // ASSETS_COD11_PC_H

View File

@ -1,11 +0,0 @@
#include "assets_cod12_pc.h"
Assets_COD12_PC::Assets_COD12_PC()
{
}
Assets_COD12_PC::~Assets_COD12_PC()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD12_PC_H
#define ASSETS_COD12_PC_H
#include "assets.h"
class Assets_COD12_PC : public Assets
{
public:
Assets_COD12_PC();
~Assets_COD12_PC();
protected:
private:
};
#endif // ASSETS_COD12_PC_H

View File

@ -1,11 +0,0 @@
#include "assets_cod4_pc.h"
Assets_COD4_PC::Assets_COD4_PC()
{
}
Assets_COD4_PC::~Assets_COD4_PC()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD4_PC_H
#define ASSETS_COD4_PC_H
#include "assets.h"
class Assets_COD4_PC : public Assets
{
public:
Assets_COD4_PC();
~Assets_COD4_PC();
protected:
private:
};
#endif // ASSETS_COD4_PC_H

View File

@ -1,11 +0,0 @@
#include "assets_cod5_pc.h"
Assets_COD5_PC::Assets_COD5_PC()
{
}
Assets_COD5_PC::~Assets_COD5_PC()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD5_PC_H
#define ASSETS_COD5_PC_H
#include "assets.h"
class Assets_COD5_PC : public Assets
{
public:
Assets_COD5_PC();
~Assets_COD5_PC();
protected:
private:
};
#endif // ASSETS_COD5_PC_H

View File

@ -1,11 +0,0 @@
#include "assets_cod6_pc.h"
Assets_COD6_PC::Assets_COD6_PC()
{
}
Assets_COD6_PC::~Assets_COD6_PC()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD6_PC_H
#define ASSETS_COD6_PC_H
#include "assets.h"
class Assets_COD6_PC : public Assets
{
public:
Assets_COD6_PC();
~Assets_COD6_PC();
protected:
private:
};
#endif // ASSETS_COD6_PC_H

View File

@ -1,11 +0,0 @@
#include "assets_cod7_pc.h"
Assets_COD7_PC::Assets_COD7_PC()
{
}
Assets_COD7_PC::~Assets_COD7_PC()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD7_PC_H
#define ASSETS_COD7_PC_H
#include "assets.h"
class Assets_COD7_PC : public Assets
{
public:
Assets_COD7_PC();
~Assets_COD7_PC();
protected:
private:
};
#endif // ASSETS_COD7_PC_H

View File

@ -1,11 +0,0 @@
#include "assets_cod8_pc.h"
Assets_COD8_PC::Assets_COD8_PC()
{
}
Assets_COD8_PC::~Assets_COD8_PC()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD8_PC_H
#define ASSETS_COD8_PC_H
#include "assets.h"
class Assets_COD8_PC : public Assets
{
public:
Assets_COD8_PC();
~Assets_COD8_PC();
protected:
private:
};
#endif // ASSETS_COD8_PC_H

View File

@ -1,11 +0,0 @@
#include "assets_cod9_pc.h"
Assets_COD9_PC::Assets_COD9_PC()
{
}
Assets_COD9_PC::~Assets_COD9_PC()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD9_PC_H
#define ASSETS_COD9_PC_H
#include "assets.h"
class Assets_COD9_PC : public Assets
{
public:
Assets_COD9_PC();
~Assets_COD9_PC();
protected:
private:
};
#endif // ASSETS_COD9_PC_H

View File

@ -1,11 +0,0 @@
#include "assets_cod10_ps3.h"
Assets_COD10_PS3::Assets_COD10_PS3()
{
}
Assets_COD10_PS3::~Assets_COD10_PS3()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD10_PS3_H
#define ASSETS_COD10_PS3_H
#include "assets.h"
class Assets_COD10_PS3 : public Assets
{
public:
Assets_COD10_PS3();
~Assets_COD10_PS3();
protected:
private:
};
#endif // ASSETS_COD10_PS3_H

View File

@ -1,11 +0,0 @@
#include "assets_cod11_ps3.h"
Assets_COD11_PS3::Assets_COD11_PS3()
{
}
Assets_COD11_PS3::~Assets_COD11_PS3()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD11_PS3_H
#define ASSETS_COD11_PS3_H
#include "assets.h"
class Assets_COD11_PS3 : public Assets
{
public:
Assets_COD11_PS3();
~Assets_COD11_PS3();
protected:
private:
};
#endif // ASSETS_COD11_PS3_H

View File

@ -1,11 +0,0 @@
#include "assets_cod12_ps3.h"
Assets_COD12_PS3::Assets_COD12_PS3()
{
}
Assets_COD12_PS3::~Assets_COD12_PS3()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD12_PS3_H
#define ASSETS_COD12_PS3_H
#include "assets.h"
class Assets_COD12_PS3 : public Assets
{
public:
Assets_COD12_PS3();
~Assets_COD12_PS3();
protected:
private:
};
#endif // ASSETS_COD12_PS3_H

View File

@ -1,11 +0,0 @@
#include "assets_cod4_ps3.h"
Assets_COD4_PS3::Assets_COD4_PS3()
{
}
Assets_COD4_PS3::~Assets_COD4_PS3()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD4_PS3_H
#define ASSETS_COD4_PS3_H
#include "assets.h"
class Assets_COD4_PS3 : public Assets
{
public:
Assets_COD4_PS3();
~Assets_COD4_PS3();
protected:
private:
};
#endif // ASSETS_COD4_PS3_H

View File

@ -1,11 +0,0 @@
#include "assets_cod5_ps3.h"
Assets_COD5_PS3::Assets_COD5_PS3()
{
}
Assets_COD5_PS3::~Assets_COD5_PS3()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD5_PS3_H
#define ASSETS_COD5_PS3_H
#include "assets.h"
class Assets_COD5_PS3 : public Assets
{
public:
Assets_COD5_PS3();
~Assets_COD5_PS3();
protected:
private:
};
#endif // ASSETS_COD5_PS3_H

View File

@ -1,11 +0,0 @@
#include "assets_cod6_ps3.h"
Assets_COD6_PS3::Assets_COD6_PS3()
{
}
Assets_COD6_PS3::~Assets_COD6_PS3()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD6_PS3_H
#define ASSETS_COD6_PS3_H
#include "assets.h"
class Assets_COD6_PS3 : public Assets
{
public:
Assets_COD6_PS3();
~Assets_COD6_PS3();
protected:
private:
};
#endif // ASSETS_COD6_PS3_H

View File

@ -1,11 +0,0 @@
#include "assets_cod7_ps3.h"
Assets_COD7_PS3::Assets_COD7_PS3()
{
}
Assets_COD7_PS3::~Assets_COD7_PS3()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD7_PS3_H
#define ASSETS_COD7_PS3_H
#include "assets.h"
class Assets_COD7_PS3 : public Assets
{
public:
Assets_COD7_PS3();
~Assets_COD7_PS3();
protected:
private:
};
#endif // ASSETS_COD7_PS3_H

View File

@ -1,11 +0,0 @@
#include "assets_cod8_ps3.h"
Assets_COD8_PS3::Assets_COD8_PS3()
{
}
Assets_COD8_PS3::~Assets_COD8_PS3()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD8_PS3_H
#define ASSETS_COD8_PS3_H
#include "assets.h"
class Assets_COD8_PS3 : public Assets
{
public:
Assets_COD8_PS3();
~Assets_COD8_PS3();
protected:
private:
};
#endif // ASSETS_COD8_PS3_H

View File

@ -1,11 +0,0 @@
#include "assets_cod9_ps3.h"
Assets_COD9_PS3::Assets_COD9_PS3()
{
}
Assets_COD9_PS3::~Assets_COD9_PS3()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD9_PS3_H
#define ASSETS_COD9_PS3_H
#include "assets.h"
class Assets_COD9_PS3 : public Assets
{
public:
Assets_COD9_PS3();
~Assets_COD9_PS3();
protected:
private:
};
#endif // ASSETS_COD9_PS3_H

View File

@ -1,11 +0,0 @@
#include "assets_cod4_wii.h"
Assets_COD4_Wii::Assets_COD4_Wii()
{
}
Assets_COD4_Wii::~Assets_COD4_Wii()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD4_WII_H
#define ASSETS_COD4_WII_H
#include "assets.h"
class Assets_COD4_Wii : public Assets
{
public:
Assets_COD4_Wii();
~Assets_COD4_Wii();
protected:
private:
};
#endif // ASSETS_COD4_WII_H

View File

@ -1,11 +0,0 @@
#include "assets_cod7_wii.h"
Assets_COD7_Wii::Assets_COD7_Wii()
{
}
Assets_COD7_Wii::~Assets_COD7_Wii()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD7_WII_H
#define ASSETS_COD7_WII_H
#include "assets.h"
class Assets_COD7_Wii : public Assets
{
public:
Assets_COD7_Wii();
~Assets_COD7_Wii();
protected:
private:
};
#endif // ASSETS_COD7_WII_H

View File

@ -1,11 +0,0 @@
#include "assets_cod8_wii.h"
Assets_COD8_Wii::Assets_COD8_Wii()
{
}
Assets_COD8_Wii::~Assets_COD8_Wii()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD8_WII_H
#define ASSETS_COD8_WII_H
#include "assets.h"
class Assets_COD8_Wii : public Assets
{
public:
Assets_COD8_Wii();
~Assets_COD8_Wii();
protected:
private:
};
#endif // ASSETS_COD8_WII_H

View File

@ -1,11 +0,0 @@
#include "assets_cod10_wiiu.h"
Assets_COD10_WiiU::Assets_COD10_WiiU()
{
}
Assets_COD10_WiiU::~Assets_COD10_WiiU()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD10_WIIU_H
#define ASSETS_COD10_WIIU_H
#include "assets.h"
class Assets_COD10_WiiU : public Assets
{
public:
Assets_COD10_WiiU();
~Assets_COD10_WiiU();
protected:
private:
};
#endif // ASSETS_COD10_WIIU_H

View File

@ -1,11 +0,0 @@
#include "assets_cod9_wiiu.h"
Assets_COD9_WiiU::Assets_COD9_WiiU()
{
}
Assets_COD9_WiiU::~Assets_COD9_WiiU()
{
}

View File

@ -1,18 +0,0 @@
#ifndef ASSETS_COD9_WIIU_H
#define ASSETS_COD9_WIIU_H
#include "assets.h"
class Assets_COD9_WiiU : public Assets
{
public:
Assets_COD9_WiiU();
~Assets_COD9_WiiU();
protected:
private:
};
#endif // ASSETS_COD9_WIIU_H

View File

@ -1,648 +0,0 @@
#include "animparts.h"
#include <QIODevice>
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDynamicFrames &aAnimDynamicFramesIn)
{
aDataStream << aAnimDynamicFramesIn.framesPtr;
return aDataStream;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimDynamicFrames &aAnimDynamicFramesOut)
{
aDataStream >> aAnimDynamicFramesOut.framesPtr;
return aDataStream;
}
QString XAnimDynamicFramesToString(const XAnimDynamicFrames &aAnimDynamicFrames) {
QString debug;
debug.append("XAnimDynamicFrames(");
debug.append(QString("\n framesPtr: %1").arg(aAnimDynamicFrames.framesPtr));
for (int i = 0; i < 3; i++) {
debug.append(QString("\n frames %1: %2").arg(i).arg(aAnimDynamicFrames.frames[i]));
}
debug.append("\n)");
return debug;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDynamicIndices &aAnimDynamicIndicesIn)
{
aDataStream << aAnimDynamicIndicesIn.indices[0];
return aDataStream;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimDynamicIndices &aAnimDynamicIndicesOut)
{
aDataStream >> aAnimDynamicIndicesOut.indices[0];
return aDataStream;
}
QString XAnimDynamicIndicesToString(const XAnimDynamicIndices &aAnimDynamicIndices) {
QString debug;
debug.append("XAnimDynamicIndices(");
debug.append(QString("\n indices: %1").arg(aAnimDynamicIndices.indices[0]));
debug.append("\n)");
return debug;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTransFrames &aAnimPartTransFramesIn)
{
for (int i = 0; i < 3; i++) {
aDataStream << aAnimPartTransFramesIn.mins[i];
}
for (int i = 0; i < 3; i++) {
aDataStream << aAnimPartTransFramesIn.size[i];
}
aDataStream
<< aAnimPartTransFramesIn.frames
<< aAnimPartTransFramesIn.indices;
return aDataStream;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTransFrames &aAnimPartTransFramesOut)
{
for (int i = 0; i < 3; i++) {
aDataStream >> aAnimPartTransFramesOut.mins[i];
}
for (int i = 0; i < 3; i++) {
aDataStream >> aAnimPartTransFramesOut.size[i];
}
aDataStream
>> aAnimPartTransFramesOut.frames
>> aAnimPartTransFramesOut.indices;
return aDataStream;
}
QString XAnimPartTransFramesToString(const XAnimPartTransFrames &aAnimPartTransFrames) {
QString debug;
debug.append("XAnimPartTransFrames(");
for (int i = 0; i < 3; i++) {
debug.append(QString("\n mins %1: %2").arg(i).arg(aAnimPartTransFrames.mins[i]));
}
for (int i = 0; i < 3; i++) {
debug.append(QString("\n size %1: %2").arg(i).arg(aAnimPartTransFrames.size[i]));
}
debug.append(QString("\n frames: %1").arg(XAnimDynamicFramesToString(aAnimPartTransFrames.frames)));
debug.append(QString("\n frames: %1").arg(XAnimDynamicIndicesToString(aAnimPartTransFrames.indices)));
debug.append("\n)");
return debug;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTransData &aAnimPartTransDataIn)
{
aDataStream
<< aAnimPartTransDataIn.frames;
for (int i = 0; i < 3; i++) {
aDataStream << aAnimPartTransDataIn.frame0[i];
}
return aDataStream;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTransData &aAnimPartTransDataOut)
{
aDataStream
>> aAnimPartTransDataOut.frames;
for (int i = 0; i < 3; i++) {
aDataStream >> aAnimPartTransDataOut.frame0[i];
}
return aDataStream;
}
QString XAnimPartTransDataToString(const XAnimPartTransData &aAnimPartTransData) {
QString debug;
debug.append("XAnimPartTransData(");
debug.append(QString("\n frames: %1").arg(XAnimPartTransFramesToString(aAnimPartTransData.frames)));
for (int i = 0; i < 3; i++) {
debug.append(QString("\n smallTrans: %1").arg(aAnimPartTransData.frame0[i]));
}
debug.append("\n)");
return debug;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTrans &aAnimPartTransIn)
{
aDataStream
<< aAnimPartTransIn.size
<< aAnimPartTransIn.smallTrans
<< aAnimPartTransIn.data;
return aDataStream;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTrans &aAnimPartTransOut)
{
aDataStream
>> aAnimPartTransOut.size
>> aAnimPartTransOut.smallTrans
>> aAnimPartTransOut.data;
return aDataStream;
}
QString XAnimPartTransToString(const XAnimPartTrans &aAnimPartTrans) {
QString debug;
debug.append("XAnimPartTrans(");
debug.append(QString("\n size: %1").arg(aAnimPartTrans.size));
debug.append(QString("\n smallTrans: %1").arg(aAnimPartTrans.smallTrans));
debug.append(QString("\n data: %1").arg(XAnimPartTransDataToString(aAnimPartTrans.data)));
debug.append("\n)");
return debug;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFramesIn)
{
aDataStream
<< aAnimDeltaPartQuatDataFramesIn.framesPtr
<< aAnimDeltaPartQuatDataFramesIn.indices;
return aDataStream;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFramesOut)
{
aDataStream
>> aAnimDeltaPartQuatDataFramesOut.framesPtr
>> aAnimDeltaPartQuatDataFramesOut.indices;
return aDataStream;
}
QString XAnimDeltaPartQuatDataFramesToString(const XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFrames) {
QString debug;
debug.append("XAnimDeltaPartQuatDataFrames(");
debug.append(QString("\n framesPtr: %1").arg(aAnimDeltaPartQuatDataFrames.framesPtr));
for (int i = 0; i < 2; i++) {
debug.append(QString("\n frames %1: %2").arg(i).arg(aAnimDeltaPartQuatDataFrames.frames[i]));
}
debug.append(QString("\n indices: %1").arg(XAnimDynamicIndicesToString(aAnimDeltaPartQuatDataFrames.indices)));
debug.append("\n)");
return debug;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuatData &aAnimDeltaPartQuatDataIn)
{
aDataStream
<< aAnimDeltaPartQuatDataIn.frames;
for (int i = 0; i < 2; i++) {
aDataStream << aAnimDeltaPartQuatDataIn.frame0[i];
}
return aDataStream;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuatData &aAnimDeltaPartQuatDataOut)
{
aDataStream
>> aAnimDeltaPartQuatDataOut.frames;
for (int i = 0; i < 2; i++) {
aDataStream >> aAnimDeltaPartQuatDataOut.frame0[i];
}
return aDataStream;
}
QString XAnimDeltaPartQuatDataToString(const XAnimDeltaPartQuatData &aAnimDeltaPartQuatData) {
QString debug;
debug.append("XAnimDeltaPartQuatData(");
debug.append(QString("\n frames: %1").arg(XAnimDeltaPartQuatDataFramesToString(aAnimDeltaPartQuatData.frames)));
for (int i = 0; i < 2; i++) {
debug.append(QString("\n frame0 %1: %2").arg(i).arg(aAnimDeltaPartQuatData.frame0[i]));
}
debug.append("\n)");
return debug;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuat &aAnimDeltaPartQuatIn)
{
aDataStream
<< aAnimDeltaPartQuatIn.size
<< aAnimDeltaPartQuatIn.data;
return aDataStream;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuat &aAnimDeltaPartQuatOut)
{
aDataStream
>> aAnimDeltaPartQuatOut.size
>> aAnimDeltaPartQuatOut.data;
return aDataStream;
}
QString XAnimDeltaPartQuatToString(const XAnimDeltaPartQuat &aAnimDeltaPartQuat) {
QString debug;
debug.append("XAnimDeltaPartQuat(");
debug.append(QString("\n size: %1").arg(aAnimDeltaPartQuat.size));
debug.append(QString("\n data: %1").arg(XAnimDeltaPartQuatDataToString(aAnimDeltaPartQuat.data)));
debug.append("\n)");
return debug;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPart &aAnimDeltaPartIn)
{
aDataStream
<< aAnimDeltaPartIn.transPtr
<< aAnimDeltaPartIn.quatPtr;
return aDataStream;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPart &aAnimDeltaPartOut)
{
aDataStream
>> aAnimDeltaPartOut.transPtr
>> aAnimDeltaPartOut.quatPtr;
return aDataStream;
}
QString XAnimDeltaPartToString(const XAnimDeltaPart &aAnimDeltaPart) {
QString debug;
debug.append("XAnimDeltaPart(");
debug.append(QString("\n transPtr: %1").arg(aAnimDeltaPart.transPtr));
debug.append(QString("\n trans: %1").arg(XAnimPartTransToString(aAnimDeltaPart.trans)));
debug.append(QString("\n quatPtr: %1").arg(aAnimDeltaPart.quatPtr));
debug.append(QString("\n quat: %1").arg(XAnimDeltaPartQuatToString(aAnimDeltaPart.quat)));
debug.append("\n)");
return debug;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimNotifyInfo &aAnimNotifyInfoIn)
{
aDataStream
<< aAnimNotifyInfoIn.name
<< aAnimNotifyInfoIn.time;
return aDataStream;
}
QDebug operator<<(QDebug debug, const XAnimNotifyInfo &aAnimNotifyInfo) {
QDebugStateSaver saver(debug);
debug.noquote().nospace();
debug << "XAnimNotifyInfo(";
debug << "\n name: " << aAnimNotifyInfo.name;
debug << "\n time: " << aAnimNotifyInfo.time;
debug << "\n)";
return debug;
}
QString XAnimNotifyInfoToString(const XAnimNotifyInfo &aAnimNotifyInfo) {
QString debug;
debug.append("XAnimNotifyInfo(");
debug.append(QString("\n name: %1").arg(aAnimNotifyInfo.name));
debug.append(QString("\n time: %1").arg(aAnimNotifyInfo.time));
debug.append("\n)");
return debug;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimNotifyInfo &aAnimNotifyInfoOut)
{
aDataStream
>> aAnimNotifyInfoOut.name
>> aAnimNotifyInfoOut.time;
return aDataStream;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimIndices &aAnimIndicesIn)
{
aDataStream
<< aAnimIndicesIn.indexPtr
<< aAnimIndicesIn.index;
return aDataStream;
}
QDebug operator<<(QDebug debug, const XAnimIndices &aAnimIndices) {
QDebugStateSaver saver(debug);
debug.noquote().nospace();
debug << "XAnimIndices(";
debug << "\n name: " << aAnimIndices.indexPtr;
debug << "\n namePtr: " << aAnimIndices.index;
debug << "\n)";
return debug;
}
QString XAnimIndicesToString(const XAnimIndices &aAnimIndices) {
QString debug;
debug.append("XAnimIndices(");
debug.append(QString("\n name: %1").arg(aAnimIndices.indexPtr));
debug.append(QString("\n namePtr: %1").arg(aAnimIndices.index));
debug.append("\n)");
return debug;
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimIndices &aAnimIndicesOut)
{
aDataStream
>> aAnimIndicesOut.indexPtr
>> aAnimIndicesOut.index;
return aDataStream;
}
QDataStream &operator<<(QDataStream &aDataStream, const XAnimParts &aAnimPartIn)
{
aDataStream
<< aAnimPartIn.name
<< aAnimPartIn.dataByteCount
<< aAnimPartIn.dataShortCount
<< aAnimPartIn.dataIntCount
<< aAnimPartIn.randomDataByteCount
<< aAnimPartIn.randomDataIntCount
<< aAnimPartIn.numframes
<< aAnimPartIn.bLoop
<< aAnimPartIn.bDelta;
for (int i = 0; i < 12; i++) {
aDataStream << aAnimPartIn.boneCount[i];
}
aDataStream
<< aAnimPartIn.notifyCount
<< aAnimPartIn.pad
<< aAnimPartIn.randomDataShortCount
<< aAnimPartIn.indexCount
<< aAnimPartIn.framerate
<< aAnimPartIn.frequency
<< aAnimPartIn.namesPtr
<< aAnimPartIn.dataBytePtr
<< aAnimPartIn.dataShortPtr
<< aAnimPartIn.dataIntPtr
<< aAnimPartIn.randomDataShortPtr
<< aAnimPartIn.randomDataBytePtr
<< aAnimPartIn.randomDataIntPtr
<< aAnimPartIn.indices
<< aAnimPartIn.notifyPtr
<< aAnimPartIn.deltaPartPtr;
return aDataStream;
}
quint32 ROL4(quint32 value, int positions) {
return (value << positions) | (value >> (32 - positions));
}
QDataStream &operator>>(QDataStream &aDataStream, XAnimParts &aAnimPartOut)
{
aDataStream
>> aAnimPartOut.namePtr
>> aAnimPartOut.dataByteCount
>> aAnimPartOut.dataShortCount
>> aAnimPartOut.dataIntCount
>> aAnimPartOut.randomDataByteCount
>> aAnimPartOut.randomDataIntCount
>> aAnimPartOut.numframes
>> aAnimPartOut.bLoop
>> aAnimPartOut.bDelta;
for (int i = 0; i < 12; i++) {
aDataStream >> aAnimPartOut.boneCount[i];
}
aDataStream
>> aAnimPartOut.notifyCount
>> aAnimPartOut.assetType
>> aAnimPartOut.pad;
aDataStream.skipRawData(3);
aDataStream
>> aAnimPartOut.randomDataShortCount
>> aAnimPartOut.indexCount;
quint32 framerateInt, frequencyInt;
aDataStream
>> framerateInt
>> frequencyInt
>> aAnimPartOut.namesPtr
>> aAnimPartOut.dataBytePtr
>> aAnimPartOut.dataShortPtr
>> aAnimPartOut.dataIntPtr
>> aAnimPartOut.randomDataShortPtr
>> aAnimPartOut.randomDataBytePtr
>> aAnimPartOut.randomDataIntPtr
>> aAnimPartOut.indices
>> aAnimPartOut.notifyPtr
>> aAnimPartOut.deltaPartPtr;
aAnimPartOut.framerate = *reinterpret_cast<float*>(&framerateInt);
aAnimPartOut.frequency = *reinterpret_cast<float*>(&frequencyInt);
if (aAnimPartOut.namePtr) {
aAnimPartOut.name = "";
char animNameChar;
aDataStream >> animNameChar;
while (animNameChar != '\0') {
aAnimPartOut.name += animNameChar;
aDataStream >> animNameChar;
}
}
if (aAnimPartOut.namesPtr) {
int nameCount = aAnimPartOut.boneCount[11];
aDataStream.skipRawData(2 * nameCount);
for (int i = 0; i < nameCount; i++) {
aDataStream.skipRawData(2);
}
}
if (aAnimPartOut.notifyPtr) {
int notifyCount = aAnimPartOut.notifyCount;
aDataStream.skipRawData(8 * notifyCount);
for (int i = 0; i < notifyCount; i++) {
aDataStream.skipRawData(8);
aDataStream >> aAnimPartOut.notify;
}
}
if (aAnimPartOut.deltaPartPtr) {
aDataStream >> aAnimPartOut.deltaPart;
if (aAnimPartOut.deltaPart.transPtr) {
aDataStream >> aAnimPartOut.deltaPart.trans;
if (aAnimPartOut.deltaPart.trans.size) {
aDataStream >> aAnimPartOut.deltaPart.trans.data.frames;
quint32 size = aAnimPartOut.deltaPart.trans.size;
quint32 readSize;
if (aAnimPartOut.numframes >= 0x100) {
readSize = 2 * (size + 1);
} else {
readSize = size + 1;
}
aDataStream >> aAnimPartOut.deltaPart.trans.data.frames.indices;
if (aAnimPartOut.deltaPart.trans.smallTrans) {
if (aAnimPartOut.deltaPart.trans.data.frames.frames.framesPtr) {
aDataStream.skipRawData(3 * (aAnimPartOut.deltaPart.trans.size + 1));
}
} else if (aAnimPartOut.deltaPart.trans.data.frames.frames.framesPtr) {
aDataStream.skipRawData(6 * (aAnimPartOut.deltaPart.trans.size + 1));
}
}
}
if (aAnimPartOut.deltaPart.quatPtr) {
aDataStream >> aAnimPartOut.deltaPart.quat;
if (aAnimPartOut.deltaPart.quat.size) {
aDataStream >> aAnimPartOut.deltaPart.quat.data.frames;
aDataStream >> aAnimPartOut.deltaPart.quat.data.frames.indices;
if (aAnimPartOut.deltaPart.quat.data.frames.framesPtr) {
aDataStream.skipRawData(4 * (aAnimPartOut.deltaPart.quat.size + 1));
}
} else {
aDataStream >> aAnimPartOut.deltaPart.quat.data;
}
}
}
if (aAnimPartOut.dataBytePtr) {
aDataStream.skipRawData(aAnimPartOut.dataByteCount);
}
if (aAnimPartOut.dataShortPtr) {
aDataStream.skipRawData(ROL4(aAnimPartOut.dataShortCount, 1));
}
if (aAnimPartOut.dataIntPtr) {
aDataStream.skipRawData(ROL4(aAnimPartOut.dataIntCount, 2));
}
if (aAnimPartOut.randomDataShortPtr) {
aDataStream.skipRawData(2 * aAnimPartOut.randomDataShortCount);
}
if (aAnimPartOut.randomDataBytePtr) {
aDataStream.skipRawData(2 * aAnimPartOut.randomDataByteCount);
}
if (aAnimPartOut.randomDataIntPtr) {
aDataStream.skipRawData(ROL4(aAnimPartOut.randomDataIntCount, 2));
}
qDebug() << aDataStream.device()->pos();
return aDataStream;
}
QString XAnimPartsToString(const XAnimParts &xAnimParts) {
QString debug = "";
debug.append(QString("XAnimParts("));
debug.append(QString("\n name: %1").arg(xAnimParts.name));
debug.append(QString("\n namePtr: %1").arg(QString::number(xAnimParts.namePtr, 16)));
debug.append(QString("\n dataByteCount: %1").arg(xAnimParts.dataByteCount));
debug.append(QString("\n dataShortCount: %1").arg(xAnimParts.dataShortCount));
debug.append(QString("\n dataIntCount: %1").arg(xAnimParts.dataIntCount));
debug.append(QString("\n randomDataByteCount: %1").arg(xAnimParts.randomDataByteCount));
debug.append(QString("\n randomDataIntCount: %1").arg(xAnimParts.randomDataIntCount));
debug.append(QString("\n numframes: %1").arg(xAnimParts.numframes));
debug.append(QString("\n bLoop: %1").arg(xAnimParts.bLoop));
debug.append(QString("\n bDelta: %1").arg(xAnimParts.bDelta));
for (int i = 0; i < 12; i++) {
debug.append(QString("\n boneCount %1: %2").arg(i).arg(xAnimParts.boneCount[i]));
}
debug.append(QString("\n notifyCount: %1").arg(xAnimParts.notifyCount));
debug.append(QString("\n assetType: %1").arg(xAnimParts.assetType));
debug.append(QString("\n pad: %1").arg(xAnimParts.pad));
debug.append(QString("\n randomDataShortCount: %1").arg(xAnimParts.randomDataShortCount));
debug.append(QString("\n indexCount: %1").arg(xAnimParts.indexCount));
debug.append(QString("\n framerate: %1").arg(xAnimParts.framerate));
debug.append(QString("\n frequency: %1").arg(xAnimParts.frequency));
debug.append(QString("\n namesPtr: %1").arg(QString::number(xAnimParts.namesPtr, 16)));
debug.append(QString("\n names: %1").arg(xAnimParts.names));
debug.append(QString("\n dataBytePtr: %1").arg(QString::number(xAnimParts.dataBytePtr, 16)));
debug.append(QString("\n dataByte: %1").arg(xAnimParts.dataByte));
debug.append(QString("\n dataShortPtr: %1").arg(QString::number(xAnimParts.dataShortPtr, 16)));
debug.append(QString("\n dataShort: %1").arg(xAnimParts.dataShort));
debug.append(QString("\n dataIntPtr: %1").arg(QString::number(xAnimParts.dataIntPtr, 16)));
debug.append(QString("\n dataInt: %1").arg(xAnimParts.dataInt));
debug.append(QString("\n randomDataShortPtr: %1").arg(QString::number(xAnimParts.randomDataShortPtr, 16)));
debug.append(QString("\n randomDataShort: %1").arg(xAnimParts.randomDataShort));
debug.append(QString("\n randomDataBytePtr: %1").arg(QString::number(xAnimParts.randomDataBytePtr, 16)));
debug.append(QString("\n randomDataByte: %1").arg(xAnimParts.randomDataByte));
debug.append(QString("\n randomDataIntPtr: %1").arg(QString::number(xAnimParts.randomDataIntPtr, 16)));
debug.append(QString("\n randomDataInt: %1").arg(xAnimParts.randomDataInt));
debug.append(QString("\n indices: %1").arg(XAnimIndicesToString(xAnimParts.indices)));
debug.append(QString("\n notifyPtr: %1").arg(QString::number(xAnimParts.notifyPtr, 16)));
debug.append(QString("\n notify: %1").arg(XAnimNotifyInfoToString(xAnimParts.notify)));
debug.append(QString("\n deltaPartPtr: %1").arg(QString::number(xAnimParts.deltaPartPtr, 16)));
debug.append(QString("\n deltaPart: %1").arg(XAnimDeltaPartToString(xAnimParts.deltaPart)));
debug.append(QString("\n)"));
return debug;
}
QDebug operator<<(QDebug debug, const XAnimParts &xanimParts) {
QDebugStateSaver saver(debug);
debug.noquote().nospace();
debug << XAnimPartsToString(xanimParts);
return debug;
}

View File

@ -1,173 +0,0 @@
#ifndef ANIMPARTS_H
#define ANIMPARTS_H
#include <QString>
#include <QDataStream>
#include <QDebug>
struct XAnimDynamicFrames
{
quint32 framesPtr;
quint8 frames[3];
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDynamicFrames &aAnimDynamicFramesIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimDynamicFrames &aAnimDynamicFramesOut);
struct XAnimDynamicIndices
{
quint8 indices[1];
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDynamicIndices &aAnimDynamicIndicesIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimDynamicIndices &aAnimDynamicIndicesOut);
struct XAnimPartTransFrames
{
float mins[3];
float size[3];
XAnimDynamicFrames frames;
XAnimDynamicIndices indices;
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTransFrames &aAnimPartTransFramesIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTransFrames &aAnimPartTransFramesOut);
union XAnimPartTransData
{
XAnimPartTransFrames frames;
float frame0[3];
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTransData &aAnimPartTransDataIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTransData &aAnimPartTransDataOut);
struct XAnimPartTrans
{
quint16 size;
quint8 smallTrans;
XAnimPartTransData data;
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimPartTrans &aAnimPartTransIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimPartTrans &aAnimPartTransOut);
struct XAnimDeltaPartQuatDataFrames
{
quint32 framesPtr;
qint16 frames[2];
XAnimDynamicIndices indices;
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFramesIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuatDataFrames &aAnimDeltaPartQuatDataFramesOut);
struct XAnimDeltaPartQuatData
{
XAnimDeltaPartQuatDataFrames frames;
qint16 frame0[2];
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuatData &aAnimDeltaPartQuatDataIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuatData &aAnimDeltaPartQuatDataOut);
struct XAnimDeltaPartQuat
{
quint16 size;
XAnimDeltaPartQuatData data;
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPartQuat &aAnimDeltaPartQuatIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPartQuat &aAnimDeltaPartQuatOut);
struct XAnimDeltaPart
{
quint32 transPtr;
XAnimPartTrans trans;
quint32 quatPtr;
XAnimDeltaPartQuat quat;
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimDeltaPart &aAnimDeltaPartIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimDeltaPart &aAnimDeltaPartOut);
struct XAnimNotifyInfo
{
quint16 name;
float time;
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimNotifyInfo &aAnimNotifyInfoIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimNotifyInfo &aAnimNotifyInfoOut);
QDebug operator<<(QDebug debug, const XAnimNotifyInfo &aAnimNotifyInfo);
QString XAnimNotifyInfoToString(const XAnimNotifyInfo &aAnimNotifyInfo);
struct XAnimIndices
{
quint32 indexPtr;
quint16 index;
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimIndices &aAnimIndicesIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimIndices &aAnimIndicesOut);
QDebug operator<<(QDebug debug, const XAnimIndices &aAnimIndices);
QString XAnimIndicesToString(const XAnimIndices &aAnimIndices);
struct XAnimParts
{
QString name;
quint32 namePtr;
quint16 dataByteCount;
quint16 dataShortCount;
quint16 dataIntCount;
quint16 randomDataByteCount;
quint16 randomDataIntCount;
quint16 numframes;
bool bLoop;
bool bDelta;
quint8 boneCount[12];
quint8 notifyCount;
quint8 assetType;
bool pad;
quint16 randomDataShortCount;
quint16 indexCount;
float framerate;
float frequency;
quint32 namesPtr;
quint16 names;
quint32 dataBytePtr;
quint8 dataByte;
quint32 dataShortPtr;
qint16 dataShort;
quint32 dataIntPtr;
int dataInt;
quint32 randomDataShortPtr;
qint16 randomDataShort;
quint32 randomDataBytePtr;
quint8 randomDataByte;
quint32 randomDataIntPtr;
int randomDataInt;
XAnimIndices indices;
qint32 notifyPtr;
XAnimNotifyInfo notify;
qint32 deltaPartPtr;
XAnimDeltaPart deltaPart;
};
QDataStream &operator<<(QDataStream &aDataStream, const XAnimParts &aAnimPartIn);
QDataStream &operator>>(QDataStream &aDataStream, XAnimParts &aAnimPartOut);
QDebug operator<<(QDebug debug, const XAnimParts &xanimParts);
QString XAnimPartsToString(const XAnimParts &xAnimParts);
struct Animation {
QString name;
XAnimParts animParts;
};
#endif // ANIMPARTS_H

View File

@ -1 +0,0 @@
#include "asset.h"

View File

@ -1,112 +0,0 @@
#ifndef ASSET_H
#define ASSET_H
#include "animparts.h"
#include "model.h"
#include "material.h"
#include "materialpixelshader.h"
#include "materialtechset.h"
#include "gfximage.h"
#include "soundalias.h"
#include "soundcurve.h"
#include "loadedsound.h"
#include "clipmap.h"
#include "comworld.h"
#include "gameworld.h"
#include "mapent.h"
#include "gfxworld.h"
#include "gfxlightdef.h"
#include "gfximage.h"
#include "font.h"
#include "menulist.h"
#include "menudef.h"
#include "localizeentry.h"
#include "weapondef.h"
#include "sounddriver.h"
#include "effectdef.h"
#include "effecttable.h"
#include "rawfile.h"
#include "stringtable.h"
enum XAssetType : qint32
{
ASSET_TYPE_XMODELPIECES = 0x0,
ASSET_TYPE_PHYSPRESET = 0x1,
ASSET_TYPE_XANIMPARTS = 0x2,
ASSET_TYPE_XMODEL = 0x3,
ASSET_TYPE_MATERIAL = 0x4,
ASSET_TYPE_PIXELSHADER = 0x5,
ASSET_TYPE_TECHNIQUE_SET = 0x6,
ASSET_TYPE_IMAGE = 0x7,
ASSET_TYPE_SOUND = 0x8,
ASSET_TYPE_SOUND_CURVE = 0x9,
ASSET_TYPE_LOADED_SOUND = 0xA,
ASSET_TYPE_CLIPMAP = 0xB,
ASSET_TYPE_CLIPMAP_PVS = 0xC,
ASSET_TYPE_COMWORLD = 0xD,
ASSET_TYPE_GAMEWORLD_SP = 0xE,
ASSET_TYPE_GAMEWORLD_MP = 0xF,
ASSET_TYPE_MAP_ENTS = 0x10,
ASSET_TYPE_GFXWORLD = 0x11,
ASSET_TYPE_LIGHT_DEF = 0x12,
ASSET_TYPE_UI_MAP = 0x13,
ASSET_TYPE_FONT = 0x14,
ASSET_TYPE_MENULIST = 0x15,
ASSET_TYPE_MENU = 0x16,
ASSET_TYPE_LOCALIZE_ENTRY = 0x17,
ASSET_TYPE_WEAPON = 0x18,
ASSET_TYPE_SNDDRIVER_GLOBALS = 0x19,
ASSET_TYPE_FX = 0x1A,
ASSET_TYPE_IMPACT_FX = 0x1B,
ASSET_TYPE_AITYPE = 0x1C,
ASSET_TYPE_MPTYPE = 0x1D,
ASSET_TYPE_CHARACTER = 0x1E,
ASSET_TYPE_XMODELALIAS = 0x1F,
ASSET_TYPE_RAWFILE = 0x20,
ASSET_TYPE_STRINGTABLE = 0x21,
ASSET_TYPE_COUNT = 0x22,
ASSET_TYPE_STRING = 0x22,
ASSET_TYPE_ASSETLIST = 0x23,
};
union XAssetHeader
{
XModelPieces *xmodelPieces;
PhysPreset *physPreset;
XAnimParts *parts;
Model *model;
Material *material;
MaterialPixelShader *pixelShader;
MaterialVertexShader *vertexShader;
MaterialTechSet *techniqueSet;
GfxImage *image;
SoundAliasList *sound;
SoundCurve *sndCurve;
LoadedSound *loadSnd;
ClipMap *clipMap;
ComWorld *comWorld;
GameWorldSp *gameWorldSp;
GameWorldMp *gameWorldMp;
MapEnts *mapEnts;
GfxWorld *gfxWorld;
GfxLightDef *lightDef;
GameFont *font;
MenuList *menuList;
MenuDef *menu;
LocalizeEntry *localize;
WeaponDef *weapon;
SoundDriver *sndDriverGlobals;
const EffectDef *fx;
ImpactTable *impactFx;
RawFile *rawfile;
StringTable *stringTable;
void *data;
};
struct XAsset
{
XAssetType type;
XAssetHeader header;
};
#endif // ASSET_H

Some files were not shown because too many files have changed in this diff Show More