aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control
AgeCommit message (Collapse)Author
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: Add logic to prevent removing locked/marked stars via skymapDavid Fioramonti
If you want to remove locked stars you can do so using the D key, but previously, you could also deselect a currently locked star via the skymap and it would crash. It previously crashed if: 1. You had 2 stars locked on and you tried to remove the 1st 2. Had 1 locked and 1 unlocked and you tried to unlock the 1st 3. Had 2 locked and 1 unlocked and you tried to unlock any of the other two locked stars. Refactoring would allow quicker comprehension of the logic of this section of code. Fixes #10126.
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: fpose, simplify inverseDavid Fioramonti
Was doing 3x3 inverse now it is doing a transpose. Also named the function.
2017-08-16TITANIC: daffine simpler inverseDavid Fioramonti
Replace rotation inverse with transpose. inv(R)=tranpose(R) for rotation matrices.
2017-08-16TITANIC: Unmarked starviewer, fix, key directionsDavid Fioramonti
Changing the fpose Y axis rotations flipped some of the keys (z,x) so I added in negatives to fix that. Also before slash was looking up and comma was looking down. This is the same as the original, but I think thats less intuitive so I have reversed that. It also makes those keys now correct in the readme.
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-15TITANIC: Cleanup of DAffine, removal of unused staticPaul Gilbert
2017-08-15Merge pull request #991 from dafioram/daffine_refactorPaul Gilbert
TITANIC: DAffine refactor
2017-08-15TITANIC: Further cleanup of FMatrix refactoringsPaul Gilbert
2017-08-15TITANIC: daffine refactor, changed Yaxis rotation conventionDavid Fioramonti
The X and Z rotation already follow the convention given in wikipedia, but the Y axis rotation doesn't (its the negative angle) so I switched that and updated where that was used. This allowed stray negatives for angle calls to this function (for Y rotations) to be removed from other parts of the code (dvector). In theory this was a non-functional change. In dvector the code was taking the negative of the angle so it was essentially doing the negative of the negative, but when it was used once in star_camera it was not (when it should of been). So That was changed. That part of the code was used for locking onto the third star after the 2nd was already locked. I can't tell if the star control puzzle has improved after this change. It can still have issues locking onto the 2nd star and also not. Also added lots of todos for things to check.
2017-08-15TITANIC: fmatrix refactor, matrix product now non-member functionDavid Fioramonti
The matrix product doesn't change anything about the class so it doesn't need to be a member function. This way other functions can do multiplication of matrices.
2017-08-15TITANIC: fmatrix refactor, common code for matrix productDavid Fioramonti
Changed the left and right matrix product to use the matrix product function with the matrix order reversed.
2017-08-15TITANIC: star control, fmatrix refactoringDavid Fioramonti
renamed fn2->MatRProd and fn3->MatLProd. They do post (R) and pre (L) multiplication.
2017-08-15TITANIC: daffine refactor, call clear before setting rot matrixDavid Fioramonti
The previous code wasn't reseting all the other elements to zero when setting up a rotation matrix. This would of left other values in the not set elements leading to a matrix not quite what the caller wanted. This should lead to the function getFrameTransform returning a different Daffine matrix. Also added lots of todos
2017-08-15TITANIC: daffine refactoring, non-functional changesDavid Fioramonti
Made default constructor col4 construction explicit. Change amount argument to be angle_deg. Added constant from dvector that does conversion from degrees to radians". Also moved conversion constants for angles in dvector to header file so daffine could use that.
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: dvect work, replace fn4 with getFrameTransformDavid Fioramonti
This function was using two vectors one as a frame rotation and the other as a vector/point rotation. This function is only used in when you click on a star in starview.
2017-08-12TITANIC: star control dvector work, replace fn3 with getAnglesAsVect also ↵David Fioramonti
replace atan2 implementation fn3 in dvector returns a vector that stores a magnitude, and 2 angles. The second angle (the z component of the returned vector) was the angle that the internal vector was between its z and x axis. This angle was obtained by doing a poor man 4-quadrant atan implementation and it gave large values for negative x. This has been replaced with the atan2 standard function.
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-06Merge pull request #983 from dafioram/titanic_starview_addReversePaul Gilbert
TITANIC: Change Starview slowdown to reverse
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-08-06TITANIC: Bring movement rates in the starfield closer to the originalPaul Gilbert
The original updated the camera during the general scene drawing, which was done at a much higher rate than I wanted for the ScummVM implementation. So I've added this workaround to update the camera every 10ms when the player is in the star control scene. This gives it a comparible rate of movement to the original.
2017-08-06TITANIC: Minor renamings in CStarViewPaul Gilbert
2017-08-06TITANIC: Don't allow movement link to be used in Starfield PuzlzePaul Gilbert
The scene has an unused right turn link that wasn't used, and is covered by the starview. Since movement now uses simulated mouse clicks, the worst result of clicking right arrow is simply that a star may be accidentally selected. But for cleanliness, it was best to fix it. It also allowed the creation of code that other objects in the view can use to override default movement logic, just in case it's needed.
2017-07-31TITANIC: Fix forward/backward manual camera movement in starmapPaul Gilbert
2017-07-30TITANIC: Star View: Added keyboard key to look upDavid Fioramonti
2017-07-29TITANIC: Fix Satrfield crash using Tab without having inserted photoPaul Gilbert
2017-07-15TITANIC: Don't allow the same star to be locked on multiple timesPaul Gilbert
2017-07-15TITANIC: Fix locking stars in star control puzzle when Caps lock is onPaul Gilbert
2017-07-15TITANIC: Don't allow starfield to be shown if puzzle was skippedPaul Gilbert
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: Fix color of starfield crosshairsPaul Gilbert
2017-06-07TITANIC: Rename CStarControlSub2 to CStarFieldBasePaul Gilbert
2017-06-07TITANIC: Renamings for camera mover classesPaul Gilbert
2017-06-07TITANIC: Renamings for automatic camera mover classesPaul Gilbert
2017-06-07TITANIC: Fix rotating starview when 2 markers are locked inPaul Gilbert
2017-06-06TITANIC: 2nd marker lock on now workingPaul Gilbert
2017-06-06TITANIC: Fix calculations in DVector fn1Paul Gilbert
2017-06-06TITANIC: Further fixes for locking marker 2Paul Gilbert
2017-06-05TITANIC: Rewrite of lockMarker2Paul Gilbert
2017-06-05TITANIC: Add some const prefixes to mover proc2Paul Gilbert