butterfly
butterfly copied to clipboard
Refactor and update parsing
Fixes #7 Fixes #8
- [x] Fix docker build
- [x] Fix stringtables parsing
- [x] Fix deprecation warnings
- [x] Add support for stringtables using varint_bitcounts
- [x] Fix fp_PushN
- [x] Clean up and optimize
fieldpathcode - [x] Implement resource manifest parsing to avoid embedding resources trie in butterfly binary/sources
- [x] Rework flattened serializers
- [x] Handle all arrays as if they're dynamic
- [x] Move
property#typetofs_info - [x] Avoid storing property paths as strings and introduce new property getter API to reduce RAM usage
- [x] Construct entities layout inside
flattened_serializerinstead of usingstd::vector/std::unordered_mapto reduce RAM and CPU usage
- [ ] Fix
m_fGameTimelogic -m_fGameTimewas removed in favor of tick-based time calculation - [ ] Implement proper entities baselines support
- [ ] Implement stringtables callbacks
- [ ] Implement entities props callbacks nor specify changed paths in on_entity callback?
- [ ] Eliminate
BUTTERFLY_THREADSAFE- [ ] Eliminate global object pools
- [ ] Replace static
std::vectorwithllvm::SmallVectorinentity::parse
- [ ] Discuss and reimplement JS/Python APIs using event-driven approach
- [ ] Discuss whether we want to store resource paths as strings or provide API for resource path resolution
- [ ] Discuss clang-format
Would it be fine if I add Google/LLVM-styled clang-format?
If so, is
SpacesInParentheses: trueworth preserving in butterfly code? - [ ] Fix Windows builds
- [ ] Run unit tests against matches in different game patches?
- [ ] Add support for GitHub CI?
- [ ] Store statically sized arrays without additional allocations? This might introduce problems if array size is parsed incorrectly, but could theoretically reduce RAM/CPU usage.
Known problems:
- Possible crash on exit in case of global
butterfly::parserdue to global object pools heap use-after-free inentity::~entityThis affects 03-props, 06-events and 07-combatlog entity_classesclass_idshould either assert or returnUINT32_MAXon lookup failure
Next PRs TODO:
- Proper VPK API
- KV parsing API