Fixes issues with directions being projected as positions.
Clean up several now-unused functions.
Move screen projection functions from Body to Engine where they belong.
- Add limited (~1.5 degree) aim assist for the player, using the existing lead pip calculations
- Moved the target lead calculations into FixedGuns instead of WorldView
- Refactored Quaternion.h for simplified construction of axis-angle vectors.
Fix target and frame indicators being misaligned in external camera.
and the reaper's due must be paid.
As we fly back to base after another successful mission, let us clear
comms in a moment of silence for the wingmates who no longer fly in
this squadron.
- To Robn, who wrote newUI in the first place. Without you, there would
be no newUI or pigui, and I'd still be complaining about oldUI.
- To Johnbartholomew, who spearheaded the move of existing systems to
newUI and implemented plenty of code we still use today.
- To ecraven, who did all of the work of adding ImGui to the code base
and worked tirelessly to port existing screens.
- To vakhoir, who not only worked tirelessly to port the most
recalcitrant of screens, but developed UI frameworks and paradigms
that made working on the UI a pleasure instead of a pain.
This commit totally removes the newUI from the codebase. Everything that
made reference to it (save the LuaConsole) has been ported or struck
from the code. This has simplified some systems significantly, has
allowed us to drop 8,000+ lines of C++ code, cut our build times
significantly, and brings us one step closer to a modern rendering and
tools pipeline.
- Refactor InputFrame add/remove to support the console better.
- Remove the unneeded HandleSDLEvent virtual method on View.
- Fix a binding name mismatch issue.
- Add a (disabled) PerfInfo debug tab for debugging the input system.
Significantly refactored the Input class, added Input::Manager to handle
most duties of the Input system.
Replaced the legacy KeyBindings system with the new InputBindings
(namespace subject to change) system for handling key state and key
chords - among other improvements, there is no longer a hardcoded
dependency on Pi::input anymore, as well as storing the binding state in
the binding itself, completely decoupling InputBindings from the input
system that handles input events and significantly reducing the
complexity of the binding system.
Input::Manager now is totally responsible for generating binding events,
removing the need for WorldView::HandleSDLEvent and its ilk - interested
parties can simply bind to the onPressed event and they will only be
notified when the binding in question is part of an active input frame
and nothing else has grabbed the input event, vastly simplifying control
flow.
Among other effects, this almost totally eradicates the need for
Pi::IsConsoleActive().
The lua Console widget is slightly broken as a result of this change,
it doesn't handle activation/deactivation state changes properly. The
solution to this seems to simply be a direct rewrite in PiGui, which
I don't expect to cause too many issues.
I've added a CMake option to use LLD to speed up incremental build link
times; this seems to be somewhat platform dependent and is not
implemented for windows at this time.
Serialization of key bindings to the config file is totally completed,
although support for a graphical method of binding multi-key chords is
not anticipated for this pull request.
- Rename InteractionController->ViewController
- Use Body's flag mechanism to exclude bodies from drawing
- Pave the way for non-ShipView ViewControllers via SetViewController()
- Remove a number of unused variables
- Clean up a few assertions checking if an unsigned variable might be negative
- Consolidate miniz diagnostics into the miniz header
- Make sure lookup3.c doesn't throw unused variable warnings
- Moved playing the 'target selected' sound to PiGui instead of C++
- Removed several unused functions/methods from SectorView
- Removed the WorldView method handler previously responsible for playing the target selected sound
- Better documentation and behavior for pigui.playSfx
- Move some less-used signals to PlayerShipController rather than Pi
- Remove WorldView's dependency on newUI
- Remove unused signal connections in WorldView
- Body::GetTargetIndicatorPosition now returns local-space coordinates
- CameraContext has a getter for parent frame, renamed GetCamFrame to GetTempFrame, added GetCameraOrient/Position
- Implemented matrix4x4 utilities to construct from orient+pos, fast inverse transform for position vectors
- Fixed bug where mouse would be locked if held while docking
- Preliminary work on ShipViewController, made WorldView::shipView an unique_ptr (why didn't I do it that way in the first place?)
- Cleaned up some cruft from WorldView and moved to appropriate locations
- Completely changed the way WorldSpaceToScreenSpace etc. works, now no longer requires camera frame
- Added WorldView::RelSpaceToScreenSpace, meant for pigui to use for displaying e.g. body:GetPositionRelTo(player)
- WorldSpaceToScreenSpace now operates on frame-relative coordinates, use RelSpaceToScreenSpace for player-relative coordinates
Forward declare Space in Ship.h; Make things compiling again
Decouple WorldView.h; Some other decouple here and there
Decouple Renderer no more included in RenderState; Model not including directly its childs
* Get input handling into its own class, get it out of the core monolith.
* Started work on implementing the input refactor.
Don't even bother compiling this one, it is absolutely broken.
* Continue upgrading and implementing.
Still don't try to compile this.
* IT'S ALIVE!
Or, in other words, it compiles and runs just fine. Still need to re-implement
axis binding and finish moving away from KeyBindings.inc.h, but we're most of
the way there.
* Moved the lua-side code over to the new system.
Still needs changes to work with the localization system and properly
implement axis deadzone and inversion, but it's most of the way there.
* Finalized the new Input changes.
Clicking on the low thrust indicator or pressing F8 now shows the slider
above the low thrust indicator. The slider can be used to adjust the
amount of thrust when 'low thrust' is active. Clicking the low thrust
indicator or pressing F8 again hides the slider.