623 Commits

Author SHA1 Message Date
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