8 Commits

Author SHA1 Message Date
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
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
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
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
d2c22dd997 Add DSL library 2026-01-01 22:18:25 -05:00