Skip to content

Consolidate interpreter window access and replace WheelHandler singleton with ControlDeck-owned dependency#1099

Open
Kenix3 with Copilot wants to merge 138 commits into
mainfrom
copilot/fix-ci-failures-from-pr-1094
Open

Consolidate interpreter window access and replace WheelHandler singleton with ControlDeck-owned dependency#1099
Kenix3 with Copilot wants to merge 138 commits into
mainfrom
copilot/fix-ci-failures-from-pr-1094

Conversation

Copilot AI commented May 4, 2026

Copy link
Copy Markdown
Contributor

This addresses two review points: removing redundant Interpreter window accessors and eliminating WheelHandler::GetInstance() in favor of explicit ownership. Wheel input state is now sourced through ControlDeck, which already sits on the controller/mapping path.

  • Interpreter window access cleanup

    • Removed Interpreter::GetFast3dWindow() and kept a single access path via Interpreter::GetCurrentWindow().
    • GetCurrentWindow() now resolves the cached weak window pointer directly from the live interpreter instance.
  • WheelHandler lifecycle/ownership

    • Removed singleton state and WheelHandler::GetInstance(...).
    • ControlDeck now creates/caches a WheelHandler during Init(...) and exposes it with GetWheelHandler().
  • Wheel input call-site migration

    • Updated wheel-dependent mapping/factory code and control deck update path to consume wheel state through ControlDeck::GetWheelHandler().
    • This removes implicit global state access from wheel mapping logic.
// Before
WheelDirections wheelDirections = WheelHandler::GetInstance()->GetDirections();
Ship::WheelHandler::GetInstance()->Update();

// After
auto wheelDirections = controlDeck->GetWheelHandler()->GetDirections();
GetWheelHandler()->Update();

Kenix3 and others added 30 commits November 4, 2025 13:35
…mponent, and more const correctness on Component
…n, follow header/cpp convention

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/6e90e1a4-728a-444d-92d4-72d5a92fec6a

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
… remove HasParent/HasChild from Component

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/24ec6af5-909d-4cd3-af8d-076796aa6397

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/f4d5fa12-709f-4925-be34-d81c2a4c4cbf

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
…ashHandler ctor, TickableComponent shared_from_this, add Component::GetChild<T>()

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/229a7c8a-e77b-48d9-b998-36f65cce7d44

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
…ThreadPoolComponent

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/229a7c8a-e77b-48d9-b998-36f65cce7d44

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
…ods from Context, add LoggerComponent and ThreadPoolComponent, move thread pool from ResourceManager to Context, fix tests

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/229a7c8a-e77b-48d9-b998-36f65cce7d44

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
…e empty PartList.cpp

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/229a7c8a-e77b-48d9-b998-36f65cce7d44

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
Resolve merge conflicts keeping component system accessor patterns
(GetChildren().GetFirst<T>()) while integrating new features from main:
- EventSystem, ScriptLoader, Keystore infrastructure
- MouseStateManager refactor
- Shader name lookup support
- Archive validation with crypto signing
- Configurable log levels
- Address filtering in interpreter
- DLL loader and scripting build options
- Test suite from main (lus_tests)

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
Add documentation comments to 7 header files that were modified when
converting classes to the Component hierarchy. Comments follow the
existing codebase style using @brief, @param, and @return tags.

Files documented:
- ArchiveManager.h: Full javadoc restored for all public/protected methods
- Window.h: Class, enums, structs, and all methods documented
- GuiElement.h: Class and lifecycle methods documented
- GuiWindow.h: Class and all constructor overloads documented
- GfxDebugger.h: Class and all public methods documented
- classes.h: File-level umbrella header comment added
- FileDropMgr.h: Class, typedef, and all methods documented

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
Document all 13 new header files in the component system with Javadoc-style
comments using @brief, @param, @return, and @tparam tags:

- Part.h: Base identifiable class with auto-assigned IDs
- PartList.h: Templated ordered list with ListReturnCode enum
- Component.h: Named Part with parent/child hierarchy
- ComponentList.h: Name- and type-based Component lookups
- Action.h: Discrete operation with ClockType/ActionType enums
- ActionList.h: Action-type-based lookup helpers
- Tickable.h: Action manager with type-sorted execution
- TickableComponent.h: Combined Tickable+Component with Context registration
- DrawAction.h, DrawDebugMenuAction.h, TickAction.h: Concrete Actions
- LoggerComponent.h: spdlog::logger wrapper
- ThreadPoolComponent.h: BS::thread_pool wrapper

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
…ormat-14

- Fix gfx_opengl.cpp: restore missing shader processing code (result variable)
- Fix Archive.cpp: remove duplicate LoadFile(uint64_t) definition
- Add Doxygen documentation to all PR-changed headers
- Add Doxygen documentation to all new component system headers
- Apply clang-format-14 to all modified files

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
…GetFirst, Logger init in component, Part context ref, ComponentList propagates context, Component::Tick, GameOverlay extends Component, Gui/Fast3dGui use GetContext, Context sets itself

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/11e0fb9d-19f7-489a-92b0-bae87b9f5808

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
Copilot AI and others added 2 commits May 22, 2026 21:28
…remove Component::Tick, add Context::Tick, remove Context::GetInstance symbol

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/36a862eb-2701-40b4-99e1-25d08c8555b3

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
Copilot AI and others added 2 commits May 23, 2026 10:38
…HierarchyWindow, fix ConsoleWindow commands

Agent-Logs-Url: https://github.com/Kenix3/libultraship/sessions/e7cdd90b-99a3-4dc2-8e71-9ca945f90e97

Co-authored-by: Kenix3 <18299654+Kenix3@users.noreply.github.com>
- ComponentHierarchyWindow: remove mContext, use Part::GetContext() instead
- ConsoleWindow: remove Console param from private command methods, use mConsole
- Fast3dWindow: remove sCurrentWindow; cache Fast3dWindow in Interpreter.mFast3dWindow, use Interpreter::GetCurrentWindow() in static callbacks
- ResourceManager: add template LoadResource<T> overloads; update GameOverlay.cpp to use them
- Run clang-format-14 across all src/include files
Copilot AI changed the title Fix Windows CI failures branched from PR #1094 Refactor: ComponentHierarchyWindow context, ConsoleWindow command methods, sCurrentWindow, and ResourceManager typed loads May 30, 2026
Copilot finished work on behalf of Kenix3 May 30, 2026 13:21
Copilot AI changed the title Refactor: ComponentHierarchyWindow context, ConsoleWindow command methods, sCurrentWindow, and ResourceManager typed loads Fix Windows CI build failures and clang-tidy errors from transitive include removal May 30, 2026
Copilot finished work on behalf of Kenix3 May 30, 2026 13:58
Copilot AI changed the title Fix Windows CI build failures and clang-tidy errors from transitive include removal Consolidate interpreter window access and replace WheelHandler singleton with ControlDeck-owned dependency May 30, 2026
Copilot finished work on behalf of Kenix3 May 30, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants