Age | Commit message (Collapse) | Author |
|
Was doing 3x3 inverse now it is doing a transpose.
Also named the function.
|
|
Replace rotation inverse with transpose.
inv(R)=tranpose(R) for rotation matrices.
|
|
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.
|
|
Add negatives to star camera turning rotations so view turns correctly
when no stars are marked and 1 star is marked.
|
|
|
|
TITANIC: DAffine refactor
|
|
|
|
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.
|
|
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.
|
|
Changed the left and right matrix product to use the matrix
product function with the matrix order reversed.
|
|
renamed fn2->MatRProd and fn3->MatLProd.
They do post (R) and pre (L) multiplication.
|
|
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
|
|
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.
|
|
|
|
It does a rotation around the X axis then Y.
|
|
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.
|
|
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.
|
|
|
|
It does a matrix product with a vector and a z translation
|
|
TITANIC: Change Starview slowdown to reverse
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|