Commit Graph
13 Commits
Author SHA1 Message Date
Adrian Frühwirth cee4d6b853 JANITORIAL: Fix trailing whitespace 2018-05-24 15:30:55 +02:00
David Fioramonti 4bdea384c3 TITANIC: make sure of setOrientations more clear
Made camera automover setOrientations not virtual and reduced
arguments also changed name since to differentiate it from
behavior of derived classes.
2017-09-07 06:31:20 -07:00
David Fioramonti d69404d5de TITANIC: Make use of CCameraAutoMover::setPath() more clear
There was a setPath() adn setPath2() function took in
different arguments and were doing the same thing, but
not using the different arguments. I made it into
one function that only takes in the arguments it uses.

Also it was marked virtual, but all the derived classes,
CMarkedAutoMover, and CUnmarkedAutoMover were just doing
there own thing and then calling this base class implementation.
Therefore, I made it be not virtual and the derived classes can do
there own thing and then call this, but since they are doing slightly
different things it makes sense to differentiate the names and not have
them all be called setPath. I.e., the derived classes also change
the orientation so that is included in their function names to reflect
that.
2017-09-07 06:25:43 -07:00
Paul Gilbert 88782928ff TITANIC: Minor syntactic fixes for Star Control classes 2017-08-31 20:04:28 -04:00
David Fioramonti b64a5bc3d2 TITANIC: AutoMover and related refactoring 2017-08-30 19:53:13 -07:00
David Fioramonti d01354ab0d TITANIC: Reduce header includes for star_control files
Minimized a lot of the unncessary files includes in the
implementation files as well.
2017-08-24 04:31:04 -07:00
Paul Gilbert ceb329ad0e TITANIC: Formatting fixes for star control classes 2017-08-22 19:53:47 -04:00
David Fioramonti c06055e1a4 TITANIC: Made variable for magic number used in auto camera mover
This variable controls the number of transitions the game goes
through when the mover is changing position. This reduces
several 31/32s from the code.
2017-08-21 16:55:25 -07:00
David Fioramonti 09a7a139f4 TITANIC: Camera Auto Mover class cleanup
Named some functions, made _speeds be an array instead of
a dynamic one.
2017-08-21 15:57:53 -07:00
David Fioramonti ffbfdac87e TITANIC: Change ship view and position even if not moved
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-20 13:24:37 -07:00
David Fioramonti 24bec379d5 TITANIC: Pull assert out of dvector/fvector normalization
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-19 08:36:02 -07:00
David Fioramonti 1370b49b6a TITANIC: Simplified dependencies for classes related to star_camera
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-18 17:26:05 -07:00
Paul Gilbert c105be916e TITANIC: Renamings for automatic camera mover classes 2017-06-07 21:50:03 -04:00