495 Commits

Author SHA1 Message Date
njohnson
ef6300aee9 Fix Linux build: define __stdcall as empty on non-Windows
The __stdcall calling convention is Windows-specific.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 16:28:28 -05:00
njohnson
c3d75e4a97 Merge branch 'alpha'
Some checks failed
CI Build / build-macos (push) Failing after 27s
CI Build / build-windows (push) Failing after 7m50s
2026-01-13 14:29:48 -05:00
njohnson
51d632dd90 Fix macOS build: wrap Xbox SDK code with Q_OS_WIN guards
The xcompress.h header and XMem compression functions require Windows.h
and the Xbox SDK, which are not available on macOS. Wrap all XMem
functions with #ifdef Q_OS_WIN and provide stub implementations that
return empty data on non-Windows platforms.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13 14:27:34 -05:00
njohnson
d0b8560913 Fix macOS build: use system zlib and fix LZO types
Some checks failed
CI Build / build-macos (push) Failing after 13s
CI Build / build-windows (push) Failing after 15s
2026-01-13 14:22:28 -05:00
njohnson
05c70c1108 Add field editing UI with undo support and dirty state tracking
Implement infrastructure for editing parsed binary fields:

FieldEditCommand (QUndoCommand):
- Undo/redo support for field value changes
- Stores old and new values with field metadata
- Integrates with Qt's undo stack

DirtyStateManager:
- Tracks modified state per-tab
- Emits signals when dirty state changes
- Enables save prompts and tab indicators

ScriptTypeEditorWidget enhancements:
- Add recompilation debouncing (300ms) for responsive editing
- Build form layout only for fields with values (skip unexecuted branches)
- Support edit signals for modified fields
- Improved table and form layout building

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 20:54:23 -05:00
njohnson
3e3883cfeb Add DSL journaling infrastructure for field editing and write-back
Introduce operation journaling to track how values are read from the
binary stream, enabling future write-back of edited fields.

New components:
- OperationJournal: Records read operations with stream offsets, sizes,
  byte order, and original values during parsing
- ReverseEval: Analyzes expressions for invertibility (e.g., x+5 can be
  reversed to compute the source field when editing the result)
- Recompiler: Infrastructure for recompiling modified values back to
  binary format

Interpreter enhancements:
- Add runTypeInternalWithJournal() for journaled parsing
- Journal scalar reads, byte reads, strings, skip/seek operations
- Add deadrising_lzx() built-in for Dead Rising 2 LZX decompression
- Support _deadrising_lzx_stem context variable for nested archives

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 20:53:20 -05:00
njohnson
2f84e41cb7 Add native LZX decompression via libmspack
Integrate libmspack's LZX decompressor for Xbox 360 and UE-style
compressed data. This replaces the need for external xcompress64.dll
which was hanging/crashing on certain files.

- Add mspack/ library (lzxd.c decompressor with Gildor's fixes)
- Implement memory-based mspack_system for in-memory decompression
- Support multiple LZX formats: raw streams, Xbox 360 block format,
  and Dead Rising 2's per-block format with 4-byte size headers
- Add DecompressDeadRisingLZX() with per-block independent contexts
  to handle the block-based compression correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 20:52:18 -05:00
njohnson
39230139b9 Update DSL parser and interpreter
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 16:08:38 -05:00
njohnson
19459d7aaf Enhance LogManager with file output and entry buffering
- Add log-to-file functionality with configurable path
- Buffer log entries before listeners connect to prevent lost messages
- Add flush mechanism for buffered entries
- Improve utils.h with additional helper functions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:11:16 -05:00
njohnson
c45d5cba86 Add XScript language features and DslKeys abstraction
- Add inline, array, const, and match statement syntax
- Add true/false keywords and deflate() decompression function
- Introduce DslKeys enum for internal metadata key management
- Improve parse_here delegation pattern with variable merging
- Remove deprecated bracket attribute syntax (use ui() instead)
- Enhance script type editor with additional functionality
- Remove obsolete install.cmd

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:08:26 -05:00
njohnson
904abf2e36 Add configurable QuickBMS path with auto-detection
- Add QuickBMS path setting to Settings class with auto-detection
- Add Tools page in Preferences with QuickBMS configuration UI
- Update Compression class to use configurable path instead of hardcoded
- Add startup prompt if QuickBMS not found, with option to locate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:54:57 -05:00
njohnson
b46c94a47b Update compression and logging libraries
- Enhanced compression support
- Log manager improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:38:25 -05:00
njohnson
c208595473 Update DSL interpreter and type registry
- Enhanced XScript parsing capabilities
- Type registry improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:38:12 -05:00
njohnson
64db5a19ed Add dynamic file filter to Open dialog
- Add TypeRegistry::supportedExtensions() to extract file extensions
  from loaded XScript definitions by parsing criteria blocks
- Implement File > Open action with QFileDialog
- Generate filter string dynamically from all root type definitions
- Include "All Supported Files" and "All Files" filter options

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 16:41:46 -05:00
njohnson
d7285b5bbe Enhance DSL interpreter with new built-in functions
Add support for:
- basename() function for extracting filenames from paths
- cstring() function for reading null-terminated strings
- ascii() function for reading fixed-length ASCII strings
- Enhanced type registry with additional primitive types
- Improved parser with better error handling

These additions enable more flexible XScript definitions for
parsing binary file formats.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 16:35:35 -05:00
njohnson
db78d63e13 Update app to use DSL engine 2026-01-01 22:18:51 -05:00
njohnson
594774c8e8 Remove old script library and JSON definitions 2026-01-01 22:18:33 -05:00
njohnson
d2c22dd997 Add DSL library 2026-01-01 22:18:25 -05:00
njohnson
7e0898d484 Start writing AST to parse script rather than JSON. 2025-12-31 18:13:41 -05:00
njohnson
becf84cdb6 Remove specific ipak code 2025-12-31 18:12:20 -05:00
njohnson
6460a03d07 Remove specific iwi code 2025-12-31 18:12:13 -05:00
njohnson
6b908347be Remove specific dds code 2025-12-31 18:12:06 -05:00
njohnson
3b61ff5a05 Remove specific zonefile code 2025-12-31 18:11:48 -05:00
njohnson
9d6fa35f50 Remove specific zonefile code 2025-12-31 18:11:33 -05:00
njohnson
0ce346c979 Remove specific asset code. 2025-12-31 18:11:22 -05:00
njohnson
f6d32552b0 Remove some libs, fix many assets, update some UIs. 2025-12-19 23:06:03 -05: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
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