Commit Graph
69 Commits
Author SHA1 Message Date
Paul Gilbert c86e7e4f3f TITANIC: Fix memory leak in CStarView 2017-09-27 07:40:28 -04:00
David Fioramonti 0df15f0b0d TITANIC: Don't allow unlocking stars while locking onto a star
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-31 19:25:40 -07:00
Paul Gilbert d1325e2d12 TITANIC: Formatting fixes for viewport refactoring 2017-08-30 20:05:47 -04:00
David Fioramonti 5cf2f16ca0 TITANIC: Refactoring of Viewport class
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-27 05:39: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
David Fioramonti 2a96a6fc72 TITANIC: Prevent 2 star locking for large distances
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-20 20:25:31 -07:00
David Fioramonti b200317306 TITANIC: Renamed functions that adds/removes stars/markers
Before it was add/remove row so the new name is more informative.
2017-08-18 18:56:12 -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
David Fioramonti fb1e9453fb TITANIC: Unmarked starviewer, fix, key directions
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-16 19:11:50 -07:00
Paul Gilbert b818656a85 Merge pull request #983 from dafioram/titanic_starview_addReverse
TITANIC: Change Starview slowdown to reverse
2017-08-06 21:23:54 -04:00
David Fioramonti c4751fc611 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.
2017-08-06 18:05:18 -07:00
Paul Gilbert e830ddbc70 TITANIC: Bring movement rates in the starfield closer to the original
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-06 20:36:28 -04:00
Paul Gilbert 9a98b32a11 TITANIC: Minor renamings in CStarView 2017-08-06 20:01:28 -04:00
David Fioramonti 0614174c5f TITANIC: Star View: Added keyboard key to look up 2017-07-30 09:23:41 -07:00
Paul Gilbert 2c6b2532dd TITANIC: Fix Satrfield crash using Tab without having inserted photo 2017-07-29 21:39:51 -04:00
Paul Gilbert 98060e8f60 TITANIC: Fix locking stars in star control puzzle when Caps lock is on 2017-07-15 16:45:16 -04:00
Paul Gilbert a8e03289df TITANIC: Renamings for the individual lock marker methods 2017-06-04 18:28:49 -04:00
Paul Gilbert a6735310bc TITANIC: Minor cleanups in vector/matrix calculations 2017-06-02 20:58:00 -04:00
Paul Gilbert 26ee9caebf TITANIC: Fix calculations in CStarCamera fn2 2017-06-02 20:29:51 -04:00
Paul Gilbert 10ada8b23b TITANIC: Fix some calculation errors when locking markers 2017-06-01 21:19:49 -04:00
Paul Gilbert 520ba69b24 TITANIC: Renamings for locking/unlocking markers 2017-05-31 19:00:17 -04:00
Paul Gilbert 56474edca0 TITANIC: Cleanup & fixes for starfield viewpoint box 2017-05-30 20:01:49 -04:00
Paul Gilbert 867f06a2b4 TITANIC: Renamings and further fixes for CPhotoCrosshairs 2017-05-30 12:11:35 -04:00
Paul Gilbert 8ad4c59c1c TITANIC: Fix crash switching from starfield to photo display 2017-05-28 17:14:48 -04:00
Paul Gilbert 6587cacabd TITANIC: Rename CStarControlSub8 to CPhotoCrosshairs 2017-05-28 16:27:39 -04:00
Paul Gilbert 99ce2f6f56 TITANIC: Renamings for photo surface 2017-05-28 16:14:07 -04:00
Paul Gilbert 38beceef7d TITANIC: Renamings of orientation related variables and methods 2017-05-28 15:53:52 -04:00
Paul Gilbert 60faebe348 TITANIC: Renamings for CCameraMover fields and methods 2017-04-17 11:39:25 -04:00
Paul Gilbert b22b572e64 TITANIC: Further positioning renames 2017-04-16 22:03:33 -04:00
Paul Gilbert 4fae7c8e78 TITANIC: Renaming of camera setting position & orientation 2017-04-16 17:24:41 -04:00
Paul Gilbert fa27fd7478 TITANIC: Extra debugging info for starfield movement 2017-04-16 13:03:12 -04:00
Paul Gilbert b57fd696ba TITANIC: Renamed CStarControlSub20 to CCameraMover 2017-04-16 11:35:32 -04:00
Paul Gilbert 5059aea538 TITANIC: Rename CStarControlSub12 to CStarCamera 2017-04-09 21:44:10 -04:00
Paul Gilbert 514871316f TITANIC: Further cleanup of pose usages 2017-04-05 21:42:01 -04:00
Paul Gilbert 8ffdd29b11 TITANIC: Renamed CStarControlSub6 to FPose 2017-04-05 21:29:32 -04:00
Paul Gilbert 93a4c29b11 TITANIC: Change many doubles to floats to match original's precision
Many of the Star Control classes in the original explicitly used floats
rather than doubles. I'm switching to using them where applicable for
now, since the resulting figures will more closely match the original,
and it will be easier to spot errors in the various formulas
2017-04-05 21:08:51 -04:00
Paul Gilbert 4378dd37b7 TITANIC: Correct usage of x/y angle in setViewportPosition 2017-04-04 21:44:19 -04:00
Paul Gilbert 06be112b22 TITANIC: Temporarily hard-code random vectors to ease debuggin 2017-04-02 12:01:12 -04:00
Paul Gilbert 8bce94592e TITANIC: Fix incorrect function parameter 2017-04-01 15:49:26 -04:00
Paul Gilbert 25fcb52d70 TITANIC: Renaming of crosshairs related code 2017-03-31 22:51:06 -04:00
Paul Gilbert f436382fe4 TITANIC: Merge fader classes into one, video surface setup fix 2017-03-31 20:13:42 -04:00
Paul Gilbert 581b2c84b8 TITANIC: Workaround original bug in CStarView fn18
The original accessed the raw pixels ptr of a video surface after
it had been unlocked
2017-03-28 22:31:19 -04:00
Paul Gilbert b2cddceae6 TITANIC: Add missing state reset in CStarView fn18 2017-03-28 22:02:54 -04:00
Paul Gilbert 765ec887a0 TITANIC: Fix loading of CStarView class 2017-03-26 21:05:21 -04:00
Paul Gilbert 538e6ffc8f TITANIC: Fixes to CStarView class 2017-03-25 21:25:20 -04:00
Paul Gilbert a0330c1aab TITANIC: Implemented CStarControlSub12 matrix row handling 2017-03-20 20:38:54 -04:00
Paul Gilbert a5e00ad987 TITANIC: More matrix renamings 2017-03-12 20:18:53 -04:00
Paul Gilbert 3bfc3f77dc TITANIC: More matrix renamings, thanks to Dark-Star 2017-03-12 19:55:56 -04:00
Paul Gilbert d84d166fc6 TITANIC: Implementing CStarControlSub13 class 2017-03-11 14:30:31 -05:00
Paul Gilbert 15c0cb4258 TITANIC: Added remainder of CStarView class 2017-03-05 15:09:57 -05:00