Commit 8fd9e74
committed
v2: Runtime dispatch for behavior tree structs (DMC5 TDB67 support)
TreeNode, TreeNodeData, TreeObject, TreeObjectData no longer inherit
from regenny structs. They are opaque classes with offset-dispatching
accessors that branch on needs_legacy_bhvt() (tdb_ver < 69).
Key layout differences dispatched:
TreeNode: name/status1/status2 shifted +8 (parent_condition inserted)
TreeNodeData: tags/name shifted +0x10
TreeObjectData: action_methods/static_action_methods shifted +0x30
TreeObject: selectors shifted +4, root_node 0xA0 vs 0xC0
Stride-aware iteration for node arrays (0xC8 vs 0xD0 per TreeNode).
Lua bindings updated to use sol::property with getter methods.
Direct field access compiler-rejected on all 4 types.
Verified: builds clean.1 parent 6056440 commit 8fd9e74
3 files changed
Lines changed: 421 additions & 272 deletions
0 commit comments