McRogueFace/src
John McCardle 90c318104b Fix Issue #63: Implement z-order rendering with dirty flag optimization
- Add dirty flags to PyScene and UIFrame to track when sorting is needed
- Implement lazy sorting - only sort when z_index changes or elements are added/removed
- Make Frame children respect z_index (previously rendered in insertion order only)
- Update UIDrawable::set_int to notify when z_index changes
- Mark collections dirty on append, remove, setitem, and slice operations
- Remove per-frame vector copy in PyScene::render for better performance

Performance improvement: Static scenes now use O(1) check instead of O(n log n) sort every frame

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-05 10:34:06 -04:00
..
scripts Final day of changes for 7DRL 2025 - Crypt of Sokoban game code 2025-03-12 22:42:26 -04:00
ActionCode.h Implement --exec flag and PyAutoGUI-compatible automation API 2025-07-03 14:27:01 -04:00
Animation.cpp Implement comprehensive animation system (closes #59) 2025-07-05 00:56:42 -04:00
Animation.h Implement comprehensive animation system (closes #59) 2025-07-05 00:56:42 -04:00
CommandLineParser.cpp Implement --exec flag and PyAutoGUI-compatible automation API 2025-07-03 14:27:01 -04:00
CommandLineParser.h Python command emulation 2025-07-03 10:46:21 -04:00
Common.h Refactor: Python 3.12, build libtcod & SFML from source. Cmake build. Directory cleanup 2024-02-24 22:48:39 -05:00
GameEngine.cpp Implement comprehensive animation system (closes #59) 2025-07-05 00:56:42 -04:00
GameEngine.h Implement --exec flag and PyAutoGUI-compatible automation API 2025-07-03 14:27:01 -04:00
HeadlessRenderer.cpp Python command emulation 2025-07-03 10:46:21 -04:00
HeadlessRenderer.h Python command emulation 2025-07-03 10:46:21 -04:00
IndexTexture.cpp Refactor: Python 3.12, build libtcod & SFML from source. Cmake build. Directory cleanup 2024-02-24 22:48:39 -05:00
IndexTexture.h Refactor: Python 3.12, build libtcod & SFML from source. Cmake build. Directory cleanup 2024-02-24 22:48:39 -05:00
McRFPy_API.cpp Fix Issue #63: Implement z-order rendering with dirty flag optimization 2025-07-05 10:34:06 -04:00
McRFPy_API.h Fix Issue #63: Implement z-order rendering with dirty flag optimization 2025-07-05 10:34:06 -04:00
McRFPy_Automation.cpp Implement --exec flag and PyAutoGUI-compatible automation API 2025-07-03 14:27:01 -04:00
McRFPy_Automation.h Implement --exec flag and PyAutoGUI-compatible automation API 2025-07-03 14:27:01 -04:00
McRogueFaceConfig.h Implement --exec flag and PyAutoGUI-compatible automation API 2025-07-03 14:27:01 -04:00
PyAnimation.cpp Implement comprehensive animation system (closes #59) 2025-07-05 00:56:42 -04:00
PyAnimation.h Implement comprehensive animation system (closes #59) 2025-07-05 00:56:42 -04:00
PyCallable.cpp Squashed commit of the following: [raii_pyobjects] 2024-03-15 22:20:37 -04:00
PyCallable.h Squashed commit of the following: [raii_pyobjects] 2024-03-15 22:20:37 -04:00
PyColor.cpp Iterators, other Python C API improvements 2025-05-31 09:11:51 -04:00
PyColor.h Iterators, other Python C API improvements 2025-05-31 09:11:51 -04:00
PyFont.cpp Squashed commit of the following: [standardize_font_handling] 2024-04-07 22:51:31 -04:00
PyFont.h Iterators, other Python C API improvements 2025-05-31 09:11:51 -04:00
PyObjectUtils.h Iterators, other Python C API improvements 2025-05-31 09:11:51 -04:00
PyRAII.h Iterators, other Python C API improvements 2025-05-31 09:11:51 -04:00
PyScene.cpp Fix Issue #63: Implement z-order rendering with dirty flag optimization 2025-07-05 10:34:06 -04:00
PyScene.h Fix Issue #63: Implement z-order rendering with dirty flag optimization 2025-07-05 10:34:06 -04:00
PyTexture.cpp 7DRL 2025 progress 2025-03-08 10:42:17 -05:00
PyTexture.h Implement sprite index validation for Issue #33 2025-07-03 21:09:06 -04:00
PyVector.cpp Fix Entity property setters and PyVector implementation 2025-07-03 20:27:32 -04:00
PyVector.h Iterators, other Python C API improvements 2025-05-31 09:11:51 -04:00
Resources.cpp Adding text functionality to Caption (why was that missing???) 2024-03-07 12:35:07 -05:00
Resources.h Adding text functionality to Caption (why was that missing???) 2024-03-07 12:35:07 -05:00
Scene.cpp Remove deprecated registerPyAction/registerInputAction system (closes #2, closes #3) 2025-07-03 21:43:22 -04:00
Scene.h Remove deprecated registerPyAction/registerInputAction system (closes #2, closes #3) 2025-07-03 21:43:22 -04:00
Timer.cpp Segfault fixes. Switching scenes broke some assumptions. All PyObject calls from userspace now handle (discard) exceptions and return values. 2024-03-08 12:09:09 -05:00
Timer.h Whoops, some issues with deleting timers. 2024-03-07 09:49:24 -05:00
UI.h Squashed commit of the following: [break_up_ui_h] 2024-04-20 10:32:04 -04:00
UIBase.h Squashed commit of the following: [break_up_ui_h] 2024-04-20 10:32:04 -04:00
UICaption.cpp Implement complete Python Sequence Protocol for collections (closes #69) 2025-07-05 01:58:03 -04:00
UICaption.h Implement comprehensive animation system (closes #59) 2025-07-05 00:56:42 -04:00
UICollection.cpp Fix Issue #63: Implement z-order rendering with dirty flag optimization 2025-07-05 10:34:06 -04:00
UICollection.h Implement complete Python Sequence Protocol for collections (closes #69) 2025-07-05 01:58:03 -04:00
UIDrawable.cpp Fix Issue #63: Implement z-order rendering with dirty flag optimization 2025-07-05 10:34:06 -04:00
UIDrawable.h Fix Issue #63: Implement z-order rendering with dirty flag optimization 2025-07-05 10:34:06 -04:00
UIEntity.cpp Implement complete Python Sequence Protocol for collections (closes #69) 2025-07-05 01:58:03 -04:00
UIEntity.h Implement comprehensive animation system (closes #59) 2025-07-05 00:56:42 -04:00
UIFrame.cpp Fix Issue #63: Implement z-order rendering with dirty flag optimization 2025-07-05 10:34:06 -04:00
UIFrame.h Fix Issue #63: Implement z-order rendering with dirty flag optimization 2025-07-05 10:34:06 -04:00
UIGrid.cpp Implement complete Python Sequence Protocol for collections (closes #69) 2025-07-05 01:58:03 -04:00
UIGrid.h Implement complete Python Sequence Protocol for collections (closes #69) 2025-07-05 01:58:03 -04:00
UIGridPoint.cpp Squashed commit of the following: [reprs_and_member_names] 2024-04-20 18:33:18 -04:00
UIGridPoint.h Iterators, other Python C API improvements 2025-05-31 09:11:51 -04:00
UISprite.cpp Implement complete Python Sequence Protocol for collections (closes #69) 2025-07-05 01:58:03 -04:00
UISprite.h Implement comprehensive animation system (closes #59) 2025-07-05 00:56:42 -04:00
UITestScene.cpp Python command emulation 2025-07-03 10:46:21 -04:00
UITestScene.h Refactor: remove "s" prefix from "sRender" method ( -> "render") Closes #44 2024-04-20 14:16:14 -04:00
main.cpp Implement comprehensive animation system (closes #59) 2025-07-05 00:56:42 -04:00