Commit graph

34 commits

Author SHA1 Message Date
Christoph Oelckers
9f78bcd1e6 - Strife game code refactored for coordinates. 2016-01-19 11:50:07 +01:00
Christoph Oelckers
ae3b52a68a - fixed: Software renderer's colormap variables should not be accessed from common renderer interface code. 2015-06-04 09:20:55 +02:00
Randy Heit
dca5f0e908 Added QF_SINE
- Squashed commit of the following:

commit bc45fe3263d34ef5f746f524687999c19bf7b779
Author: Randy Heit <rheit@users.noreply.github.com>
Date:   Sun Mar 1 18:51:05 2015 -0600

    wave scale -> wave speed

commit ff96388b128c724c1198757bfa52f1935a263356
Author: Randy Heit <rheit@users.noreply.github.com>
Date:   Sun Mar 1 18:45:32 2015 -0600

    More sine quake fixes

commit 2a89749a6fe6d271b9fbdc218779f680afcf4cb6
Merge: 719dfbe 5456074
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sat Feb 28 20:37:22 2015 -0600

    Added QF_WAVE to A_QuakeEx.
    - Changes the random quakes into a sine wave (see Shadow Warrior/Rise of the Triad reboots, Hard Reset, etc.)
    - Added 3 properties to control waves per second along each individual axis. Only works with QF_WAVE.
    - Intensity X/Y/Z property becomes the amplitude of the wave.
    - Stacks with regular quakes, allowing shaking along the camera which must be called using A_QuakeEx WITHOUT the flag, or the other quaking functions.
    - Uses the youngest quake's time for positioning.

commit 54560741581e8d15cc7060e8e068cf85e9a4b432
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sat Feb 28 20:21:19 2015 -0600

    Recommitted recommended changes by Randi, with some modifications. Now, we should be finished!

commit 6f4473013411686d88fc185bdc1cc58b1035b0f1
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sat Feb 28 12:52:57 2015 -0600

    Finish this revert.

commit 467e53f9400f588a2ada9b32e7634cb1f4ad5066
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sat Feb 28 12:46:02 2015 -0600

    Reverted back to what was working.

commit da9de56a67efda08036e481fd5fccd5392ce6810
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Thu Feb 26 18:53:20 2015 -0600

    Forgot this bit, for testing.

commit c5093d9bb97caf8478cefc32abc56a036feeea58
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Thu Feb 26 18:52:46 2015 -0600

    Some more progress, but...
    - This did not solve anything. In fact, it did the opposite -- completely broke wave quakes. Now they only happen whenever a random quake is in progress.
    - Left in the commented code on purpose so Randi can test it.

commit 7e526405d2127cbb279f66008c8f8e55a5d497f3
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Wed Feb 25 17:50:42 2015 -0600

    - Use newest waveform timer, not oldest.

commit 1356443609dbc6c7f46e081d0846816dc0836124
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Wed Feb 25 17:32:09 2015 -0600

    - Got regular quakes to multiply onto sine quakes, but the vice versa needs fixing too.

commit d95796c94c70cd0229d4a6d30f69e3a7568b9588
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Wed Feb 25 16:46:21 2015 -0600

    - Last hurdle. Now just need to figure out how to properly scale up and down.

commit 4bc3458e689155ce72c09776604d9eb4fa73d8be
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Tue Feb 24 23:18:03 2015 -0600

    - Fixed the quakes being unstackable.

commit b51012d6d4ea065bf7f6fc9c1a0472966491f7af
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Mon Feb 23 23:48:34 2015 -0600

    QF_WAVE renamed from SINE.
    - Lots of ground covered, but still more to go.
    - Still need to figure out how to make the camera properly shudder.

commit 427e4893193470bbf45415ffec70a0b69b8cccfd
Author: MajorCooke <paul.growney22@gmail.com>
Date:   Sun Feb 22 16:52:30 2015 -0600

    - Begin the groundworks for QF_SINE.
    - Need to figure out how to rework and manipulate the sine wave to move faster, and to allow going below 0 without breaking it too much.
2015-03-01 18:53:34 -06:00
Randy Heit
2827c13d0c Rewrite new quake stuff for correctness
- Quake scaling should be handled for each quake. The former
  implementation was potentially taking flags from one quake and applying
  them to another, which is broken.
- Remove all the int<->float conversions.
2015-02-20 19:36:13 -06:00
MajorCooke
fb9231a38d - Added QF_FULLINTENSITY.
- When using both scaling flags, by default, the effect only reaches half peak going either way. This forces it to go all the way to the top (or bottom if using QF_MAX) before scaling back to its original height..
2015-02-20 11:06:41 -06:00
MajorCooke
aa3c3d6546 - Fixed: Smoothing in to out reached only half strength. 2015-02-20 10:55:06 -06:00
MajorCooke
140a650442 - Added QF_SCALEUP and QF_MAX.
- QF_SCALEUP behaves like QF_SCALEDOWN: it gradually scales the tremors, only going upwards.
- QF_SCALEUP and QF_SCALEDOWN can be combined to make an earthquake that gradually smoothes in and out.
- QF_MAX can be used to invert this behavior, where it starts at the peak of the amplitude, fades out half way, and then grows back to maximum.
2015-02-20 10:46:37 -06:00
MajorCooke
49d9482363 - Cleaned out of the code and converted it to taking a struct instead.
- This will make it much easier on me to add future changes. Big thanks to Graf for the idea.
2015-02-20 08:26:45 -06:00
MajorCooke
d6e4a7a081 - Changed QuakePower back to fixed_t and just had it return FLOAT2FIXED instead. 2015-02-20 07:36:37 -06:00
MajorCooke
9c5d90e4cb - Removed QF_SCALEUP until I can figure out a proper way to implement it. 2015-02-20 01:33:30 -06:00
MajorCooke
0948b95e08 - Changed QuakePower to take doubles on everything but intensity. This lets the camera shake until it truly reaches 0 as the limitations of integers were actually cutting it short. 2015-02-19 23:19:24 -06:00
MajorCooke
045ab9fd5b Initial groundwork for QF_SCALEDOWN. 2015-02-19 21:42:32 -06:00
Randy Heit
e377c2c4f8 Change XYZ Quaking from Major Cooke
- Relative quakes are different from other quakes; all quakes affecting
  the camera do not become relative if one of them is relative.
- Use a single function call to get quake visual parameters instead of four.
- Thrust things in a psuedo-ellipse if they're inside a damaging quake whose
  IntensityX != IntensityY.
- Don't break old savegames.
2015-02-18 14:48:52 -06:00
MajorCooke
7050d03222 Added A_QuakeEx(intensity x, y, z, duration, damrad, tremrad, sound, flags)
- Unlocks the full potential of using quakes, including the Z axis. Each intensity applies to X/Y/Z planes whenever a player is experiencing it.
- Flags:
- QF_RELATIVE - Adjusts the quaking of the camera to go in the direction its aiming (X: forward/backward. Y: Left/right.)
- Plans for including pitch will be implemented in the future for the Z axis with relativity.
2015-02-14 15:58:39 -06:00
Edoardo Prezioso
54ccf5d44d - Fixed a possible uninitialized condition.
In the function R_RebuildViewInterpolation, the pointer 'iview' was not initialized when the player or its camera were NULL, hence 'iview == NULL' was garbage. Also, the function FindPastViewer does not return NULL, hence the mentioned check is not needed at all. Just return early if the player camera does not exist.
2014-09-26 11:11:35 +02:00
Edward Richardson
53b6e7d4d5 Added silent line teleport prediction
- Allow activation of line teleport specials during prediction
- Moved prediction functions to improve uncapped framerates
2014-09-26 15:48:45 +12:00
Edoardo Prezioso
b285cbebe4 - Fixed compiler errors in latest TEXTURES code. 2014-05-25 01:12:16 +02:00
Christoph Oelckers
e126c3ec2f Merge branch 'maint' 2014-01-17 20:45:20 +01:00
Edoardo Prezioso
884928687d - Fixed overflow checking in some viewpitch code 2014-01-17 19:27:12 +01:00
Christoph Oelckers
cbed4624fa - added a user-settable factor for earthquake intensity. Value can be between 0 (no shaking) and 1 (normal shaking.) 2013-11-29 13:24:38 +01:00
Randy Heit
1f723c10ae Add CF_INTERPVIEW for players.
- Added CF_INTERPVIEW flag for players. A_SetPitch/A_SetAngle and the
  similar ACS APROPs set this when changing an angle. This forces the
  renderer to interpolate the view angles instead of updating with the
  latest mouse positions. The effect lasts one tick.
2013-10-09 21:50:24 -05:00
Christoph Oelckers
af470b3d56 - fixed: The global variables holding the view's fixed colormap must be preserved when rendering to a camera texture. 2013-07-23 12:32:33 +02:00
Randy Heit
a50e670c0c - Use tests less prone to overflow on very steep slopes when detecting which side of a plane
the camera is on. Mostly, this means testing the distance of the camera to the plane rather
  than computing the plane's Z at the camera and comparing that with the camera's Z.

SVN r4220 (trunk)
2013-04-17 01:32:40 +00:00
Randy Heit
be0845acf1 - Moved all BorderNeedRefresh and SB_state updating code into separate functions that won't crash if screen is NULL.
SVN r4167 (trunk)
2013-02-27 03:10:25 +00:00
Randy Heit
b5a731f3a6 - Move player prediction calls into D_Display().
SVN r3636 (trunk)
2012-05-10 03:48:36 +00:00
Randy Heit
25b9c3dcf2 - Fixed: 3D floors were impervious to earthquakes; CopyStackedViewParameters() needs to be among the last things called in R_SetupFrame().
SVN r3626 (trunk)
2012-05-06 03:39:45 +00:00
Randy Heit
118e513d03 - Fixed: The player's position was only predicted during the duration of R_SetupFrame().
Consequently, if somebody used the chasecam while predicting, they would appear to lag
  behind the camera, because their actor would be at its unpredicted position by the time
  sprites were processed.

SVN r3603 (trunk)
2012-04-28 03:04:21 +00:00
Randy Heit
c5a3d846dd - Implement multitick viewpitch centering logic.
SVN r3512 (trunk)
2012-04-03 04:09:30 +00:00
Randy Heit
0fc6d9a0c6 - Unload all bound camera textures when FCanvasTextureInfo::EmptyList() is called.
SVN r3397 (trunk)
2012-02-28 02:17:29 +00:00
Randy Heit
b41dbf8a52 - A_SetPitch now clamps the player's pitch within the valid range. It can
be made to clamp other actors' pitches to within the range (-90,+90)
  degrees with the SPF_FORCECLAMP flag.
- Transmit the local viewpitch limits to the other players.



SVN r3323 (trunk)
2011-12-06 01:25:37 +00:00
Randy Heit
307050d38d - Remove the chasecam restriction that the player sprite must be visible. (When
crushed, the real player is turned invisible, defeating the death/chasecam.)



SVN r3300 (trunk)
2011-10-03 00:56:01 +00:00
Braden Obrzut
5c81cf20ba - Merged r1236, r1237, and r1240 of GZDoom.
SVN r3279 (trunk)
2011-08-14 23:53:20 +00:00
Christoph Oelckers
4ef68ded5d - fixed some leftover references to the software renderer.
SVN r3264 (trunk)
2011-07-07 19:53:42 +00:00
Christoph Oelckers
5bfcaab25c - separation of software renderer from the rest of the code complete. All external access to the renderer is routed through the FRenderer interface class now, with two exceptions (2D texture drawing to a canvas and polymost testing code) that are handled by #defines.
SVN r3263 (trunk)
2011-07-07 15:37:47 +00:00