McRogueFace/src
John McCardle 7aef412343 feat: Thread-safe FOV system with improved API
Major improvements to the Field of View (FOV) system:

1. Added thread safety with mutex protection
   - Added mutable std::mutex fov_mutex to UIGrid class
   - Protected computeFOV() and isInFOV() with lock_guard
   - Minimal overhead for current single-threaded operation
   - Ready for future multi-threading requirements

2. Enhanced compute_fov() API to return visible cells
   - Changed return type from void to List[Tuple[int, int, bool, bool]]
   - Returns (x, y, visible, discovered) for all visible cells
   - Maintains backward compatibility by still updating internal FOV state
   - Allows FOV queries without affecting entity states

3. Fixed Part 4 tutorial visibility rendering
   - Added required entity.update_visibility() calls after compute_fov()
   - Fixed black grid issue in perspective rendering
   - Updated hallway generation to use L-shaped corridors

The architecture now properly separates concerns while maintaining
performance and preparing for future enhancements. Each entity can
have independent FOV calculations without race conditions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-22 23:00:34 -04:00
..
scripts Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
ActionCode.h Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -04:00
Animation.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
Animation.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
CommandLineParser.cpp Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -04:00
CommandLineParser.h Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -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 Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
GameEngine.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
HeadlessRenderer.cpp Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -04:00
HeadlessRenderer.h Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -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 Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
McRFPy_API.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
McRFPy_Automation.cpp Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -04:00
McRFPy_Automation.h Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -04:00
McRFPy_Libtcod.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
McRFPy_Libtcod.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
McRogueFaceConfig.h Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -04:00
PyAnimation.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
PyAnimation.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
PyCallable.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
PyCallable.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
PyColor.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyColor.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyDrawable.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyDrawable.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyFont.cpp Squashed commit of the following: [alpha_streamline_1] 2025-07-05 18:56:02 -04:00
PyFont.h Squashed commit of the following: [alpha_streamline_1] 2025-07-05 18:56:02 -04:00
PyObjectUtils.h Iterators, other Python C API improvements 2025-05-31 09:11:51 -04:00
PyPositionHelper.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyRAII.h Iterators, other Python C API improvements 2025-05-31 09:11:51 -04:00
PyScene.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
PyScene.h Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -04:00
PySceneObject.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PySceneObject.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyTexture.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyTexture.h Squashed commit of the following: [alpha_streamline_1] 2025-07-05 18:56:02 -04:00
PyTimer.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
PyTimer.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
PyVector.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyVector.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyWindow.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PyWindow.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
PythonObjectCache.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
PythonObjectCache.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -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 Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -04:00
Scene.h Squashed commit of the following: [interpreter_mode] 2025-07-05 17:23:09 -04:00
SceneTransition.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
SceneTransition.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
Timer.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
Timer.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04: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: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UICaption.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UICaption.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UICollection.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UICollection.h Squashed commit of the following: [alpha_streamline_1] 2025-07-05 18:56:02 -04:00
UIContainerBase.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
UIDrawable.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UIDrawable.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UIEntity.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UIEntity.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UIEntityPyMethods.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
UIFrame.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UIFrame.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UIGrid.cpp feat: Thread-safe FOV system with improved API 2025-07-22 23:00:34 -04:00
UIGrid.h feat: Thread-safe FOV system with improved API 2025-07-22 23:00:34 -04:00
UIGridPoint.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
UIGridPoint.h Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
UISprite.cpp Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UISprite.h Squashed commit of the following: [alpha_presentable] 2025-07-15 21:30:49 -04:00
UITestScene.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00
UITestScene.h Refactor: remove "s" prefix from "sRender" method ( -> "render") Closes #44 2024-04-20 14:16:14 -04:00
main.cpp Squashed commit of 53 Commits: [alpha_streamline_2] 2025-07-09 22:41:15 -04:00