aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control/star_camera.cpp
AgeCommit message (Collapse)Author
2019-11-30TITANIC: Fix Missing Default Switch CasesD G Turner
These are flagged by GCC if -Wswitch-default is enabled.
2017-09-10TITANIC: Remove redundant flag clearing in star controlPaul Gilbert
2017-09-09TITANIC: Fix locking/unlocking starfield markers multiple timesPaul Gilbert
2017-09-09TITANIC: Various whitespace fixes in star control classesPaul Gilbert
2017-09-07TITANIC: star camera better handler function namingDavid Fioramonti
The functions that dealt with the mover handling only had handler in the name so I added mover and type to the name to reflect that it involves the mover handler.
2017-09-07TITANIC: star control, removed todos and improved some commentsDavid Fioramonti
2017-09-07TITANIC: Better naming for Viewport functionDavid Fioramonti
I differentiated getRelativePosCentering() and getRelativePosCentering2() since one was using the raw Pose and one was using the regular Pose.
2017-09-02TITANIC: Minor cleanup and warning fixes to star controlPaul Gilbert
2017-09-02TITANIC: Fix star3 locking overshoot, #9961David Fioramonti
I fixed this previously for star2, I thought the overshoot for star3 locking might have also been fixed since I hadn't observed it in a while. I applied the same workaround by setting the old position to be the new position.
2017-09-02TITANIC: Move Matrix4Inv out of starcamera and into FPose functionDavid Fioramonti
2017-09-02TITANIC: Remove DVector and DAffine files from build and folderDavid Fioramonti
2017-09-02TITANIC: Swap DAffine for FPose in Orientation and TransformsDavid Fioramonti
More swapping of functions in the Orientation and Transform classes.
2017-09-02TITANIC: Swap DAffine usage for FPose in setViewportAngleDavid Fioramonti
2017-09-02TITANIC: Replace DAffine with FPose in Transform and Orientation classesDavid Fioramonti
2017-09-02TITANIC: Duplicate DAffine usage in lockMarker2 with FPose usageDavid Fioramonti
2017-09-01TITANIC: Added DAffine functions that combines several vector operationsDavid Fioramonti
2017-09-01TITANIC: Replace all external uses of DVector with FVectorDavid Fioramonti
Wherever DVector was used outside of DAffine and CMatrixTransform I replaced with FVectors. So Internally those functions are still using DVectors. This required adding some new functions to FVector that duplicated functionality in DVector.
2017-08-31TITANIC: Don't allow unlocking stars while locking onto a starDavid Fioramonti
Fixes #10170. I've added a boolean variable that tracks whether the game is in the process of locking onto a star or not. When the user hits the unlock button _isInLockingProcess gets checked and the request to unlock is denied if the locking on is currently happening. Once the locking on is finished then the release is lifted and the user can unlock at this time (or after locking onto the next star).
2017-08-31TITANIC: Minor syntactic fixes for Star Control classesPaul Gilbert
2017-08-31TITANIC: Fix star lock2/lock3 overshoot, fixes #9961David Fioramonti
The problem was that the camera when locking onto the 2nd star was starting at a bad spot and then overshooting when it moved to do the locking movements. A solution I picked is just to start at the final spot. I also removed the check that the distance the mover had to move was too large since the bug is now avoided.
2017-08-31TITANIC: Star Camera lockMarker2 refactorDavid Fioramonti
Named many variables in the lockMarker2 functions.
2017-08-30TITANIC: Renamed a dvector funcDavid Fioramonti
More correct function naming then before.
2017-08-30TITANIC: StarCamera separate function for calculating angleDavid Fioramonti
This makes lockMarker2 more manageable.
2017-08-30TITANIC: StarCamera workDavid Fioramonti
2017-08-30TITANIC: CCameraMover and related classes RefactorDavid Fioramonti
1. Removed updatePosition function defintions since UnmarkedCameraMover and MarkedCameraMover, derived classes, are overriddening it. I.e., CCameraMover::updatePosition doesn't get used. This also allowed some header files to removed. 2. Renaming of some functions.
2017-08-27TITANIC: Refactoring of Viewport classDavid Fioramonti
1. Improved naming of functions. E.x., fn17 is now called getRelativePosNoCentering 2. Improved variable names E.x., _valArray[3] is now _pixel1OffSetX, naming makes sense for it use in CBaseStars::draw. 3. Lots of comments and TODO added for suspicious behavior Mentioned unused functions and values that don't get used. 4. Changes in other classes that viewport renaming affected Some of the star_camera functions were 1-1 mapping of functions in viewport so I just made the names be the same.
2017-08-24TITANIC: Reduce header includes for titanic.hDavid Fioramonti
I reduced the header includes a lot in Titanic.h and forward declared when I could. Titanic.h was including a lot and a lot of functions that were including it were not using its API. This will help make it more clear which implementation files are using which class since they will just need to include which ones they need. I also moved the debug related items in Titanic.h into the debugger header. I also reordered several of the the header includes to be local to global.
2017-08-21TITANIC: Named some functions in fvectorDavid Fioramonti
2017-08-20TITANIC: Prevent 2 star locking for large distancesDavid Fioramonti
I have added a conditional to the code so that if the player tries to lock onto the 2nd star and they are very far away, >1e8, then the game will not allow the star to be locked. This is a temporary workaround since if a distance of farther then this is attempted then the view will be throw way off and the stars will not be shown locking onto correctly. I've also made the locking functions return booleans so I can determine the success of the lockings. This is a partial fix for #9961.
2017-08-20TITANIC: Change ship view and position even if not movedDavid Fioramonti
The code was preventing the position and view from changing when the distance between the current and new position for a marked auto mover was zero. This happens if you lock the 2nd or 3rd star and then unlock and relock again. It was prevented this with asserts and if statement checks and I removed them all. This section of code isn't doing any inverses based on the reciprocal of the distance so theres no issue with allowing transition speeds/distances of zero. Fixes #10148.
2017-08-20TITANIC: Further camera and crosshair classes cleanupPaul Gilbert
2017-08-19TITANIC: Prevent moving for locking stars when onto of starDavid Fioramonti
Originally, if you unlocked a star when you had 2 or 3 stars locked and then relocked without changing views then the game crashed. This was because it was trying to transition a distance of zero and this failed an assert (to normalize the length to be the distance). The transition is no longer done so the crash does not happen. Fixes #10147.
2017-08-19TITANIC: Pull assert out of dvector/fvector normalizationDavid Fioramonti
Before the normalization function was asserting if it couldn't normalize now the caller can determine what to do with a failed normalization.
2017-08-18TITANIC: Renamed functions that adds/removes stars/markersDavid Fioramonti
Before it was add/remove row so the new name is more informative.
2017-08-18TITANIC: Simplified dependencies for classes related to star_cameraDavid Fioramonti
This involved removing header files and forward declaring when possible. I also reorded the header include files to be local to gloabal. E.x., in the class implementation the class header file would be the first included. This is a first pass of header reduction for star_control/ files
2017-08-18TITANIC: Change variable for tracking stars marked into enumDavid Fioramonti
2017-08-16TITANIC: Change fpose Yaxis rotation to be same as wikipediaDavid Fioramonti
Add negatives to star camera turning rotations so view turns correctly when no stars are marked and 1 star is marked.
2017-08-13TITANIC: Further cleanup of DVector classPaul Gilbert
2017-08-12TITANIC: dvector work, fn5 renamed to RotXYDavid Fioramonti
It does a rotation around the X axis then Y.
2017-08-12TITANIC: star control dvector rename fn2 to RotVectAxisYDavid Fioramonti
2017-08-12TITANIC: Star control dvector work, renamed fn1 to DAffMatrixProdVecDavid Fioramonti
It does a matrix product with a vector and a z translation
2017-08-06TITANIC: Change Starview slowdown to reverseDavid Fioramonti
This changes the starview manual camera movement using semicolon. Before it slowed down the ship. To make it more like the original game it now adds negative velocity so that it slows down then speeds up in the backward direction. The functions were renamed accordingly.
2017-07-12TITANIC: Fix daffine.h includesPaul Gilbert
2017-07-12TITANIC: Rename DMatrix to DAffine, thanks to wjpPaul Gilbert
2017-07-12TITANIC: Change rows to cols in DMatrix, thanks to wjpPaul Gilbert
2017-06-07TITANIC: Renamings for camera mover classesPaul Gilbert
2017-06-07TITANIC: Fix rotating starview when 2 markers are locked inPaul Gilbert
2017-06-06TITANIC: Further fixes for locking marker 2Paul Gilbert
2017-06-05TITANIC: Rewrite of lockMarker2Paul Gilbert
2017-06-04TITANIC: Simplifications in lockMarker2Paul Gilbert