Commit graph

11497 commits

Author SHA1 Message Date
Christoph Oelckers
be9402c4e0 - fixed Blood not accepting any input after loading a saved game. 2020-08-03 00:10:18 +02:00
Christoph Oelckers
38616d90a3 - renamed some members of Blood's EPISODEINFO struct. 2020-08-02 23:47:21 +02:00
Christoph Oelckers
e434df5328 - always play menu sounds by calling M_MenuSound to check the menu_sounds CVAR. 2020-08-02 22:16:26 +02:00
Christoph Oelckers
d083e12967 - added the "back" sound to the menu. 2020-08-02 22:14:58 +02:00
Christoph Oelckers
8acc4101be - simplified calcSinTableValue and inlined it.
There's no need for all this magic voodoo - the sin function already returns the proper values all by itself.
2020-08-02 22:03:22 +02:00
Christoph Oelckers
9606601554 - wraooed "q16look_ang / (2. * FRACUNIT)" in an inline function.
No need to write it out each time, this wpuld be a nightmare if it ever had to be refactored.
2020-08-02 21:45:57 +02:00
Christoph Oelckers
6a305748ff - removed some C cruft from compat.h. 2020-08-02 21:25:03 +02:00
Mitchell Richters
0bcb37860a - interpolate p->weapon_pos for smooth switching of weapons. 2020-08-02 21:20:54 +02:00
Mitchell Richters
85dcffc442 - use new fmulscale16() static inline for high precision interpolation in place of manual code. 2020-08-02 21:20:54 +02:00
Mitchell Richters
3d165ee182 - extend mulscale/divscale pragmas with double versions of each. 2020-08-02 21:20:54 +02:00
Mitchell Richters
9c8593018b - define new function calcSinTableValue() to calculate an equivalent sintable[] entry.
* Returns a true double result.
* Also supports fractional input for fractional input. That is, if `sintable[1]` = 50 and `sintable[2]` = 100, `calcSinTableValue(1.5)` = 75.
* Increased precision of `BANG2RAD` define to use double and not float.
* As such, revert addition of `sintablef[]`.
2020-08-02 21:20:54 +02:00
Mitchell Richters
abb23a7bd0 - fix remaining interpolation issue with weapon swaying when taking off again from a stand-still. 2020-08-02 21:20:53 +02:00
Mitchell Richters
6fd6926d8d - remove duplicate line. 2020-08-02 21:20:53 +02:00
Mitchell Richters
11b3f5a78a - increase precision of local variable x for displaypistol(). 2020-08-02 21:20:53 +02:00
Mitchell Richters
184465460e - make full use of sintablef[2048]. 2020-08-02 21:20:53 +02:00
Mitchell Richters
977ddc5aa8 - make full use of Q16.16 resolution for player's angle and horizon values. 2020-08-02 21:20:52 +02:00
Mitchell Richters
3a4a224877 - interpolate p->weapon_sway. 2020-08-02 21:20:52 +02:00
Mitchell Richters
4499e05b06 - pass smoothratio through to displayweapon(). 2020-08-02 21:20:52 +02:00
Mitchell Richters
0c12436092 - change returned value for CalcSmoothRatio() from int to double and pass through to displayrest() for future use with displayweapon().
* `displayrooms()` ultimately should be adjusted as well. For now, just relying on integer truncation as this is just a proof of concept.

# Conflicts:
#	source/core/gamecontrol.cpp
#	source/core/gamecontrol.h
2020-08-02 21:20:52 +02:00
Mitchell Richters
4301706e00 - promote fclamp() and fclamp2() to double. 2020-08-02 21:20:06 +02:00
Mitchell Richters
7b8e40c7e1 - create sintable sintablef[2048] as sintables of doubles.
* Also change BANG2RAD define to be a double and not a float.
2020-08-02 21:20:06 +02:00
Christoph Oelckers
18c3d9b240 - get the frame time right at the start of the frame, not when performing interpolations.
This is to factor think time out of the time span between frames and to avoid changes if the smoothratio gets calculated multiple times.
2020-08-02 21:16:01 +02:00
Mitchell Richters
3861064f62 - use 1/8 of delta time as initial elapsed time when calculating smoothratio on a new ototalclk.
* Pushes final result closer to 65536 and always ensures smoothratio never starts at 0.
2020-08-02 20:57:09 +02:00
Mitchell Richters
4830989d32 - remove all code used to get current display's refresh rate.
* Serves no purpose in Raze or GZDoom and appears to only have been added to the backend to facilitate the older interpolation code that was excised in 893686709b.
2020-08-02 20:57:09 +02:00
Mitchell Richters
f8952d5cae - directly cast steady_clock::now() to nanoseconds instead of microseconds then multiplying by 1000. 2020-08-02 20:57:08 +02:00
Mitchell Richters
5000fde281 - restore legacy interpolation path behind CVAR cl_legacyintrpl.
* Hoping the old path being available will allow the new code to be merged.
* Applied offset to sum of `(totalclk - ototalclk)` of 0.5 to ensure calculated smoothratio under legacy path always returns a value.
* For the above, consider Duke 3D with 4 game tics per ticrate, the returned values would be:
0
16384
32768
49152
* With offset of 0.5, the following values are returned depending on how far advanced `totalclk` is from `ototalclk`:
8192
24576
40960
57344
2020-08-02 20:57:08 +02:00
Mitchell Richters
0aca26e197 - determine smoothRatio immediately after a potential change to ototalclock has occurred. 2020-08-02 20:57:08 +02:00
Mitchell Richters
52d9fd4cda - add cl_debugintrpl CVAR to print interpolation information to the console.
* Also revert back to use of `xs_CRoundToInt()` that was accidentally removed previously.
2020-08-02 20:57:08 +02:00
Mitchell Richters
1cf857e788 - create an enum for MaxSmoothRatio and replace multiple hard-coded uses of '65536' constant. 2020-08-02 20:57:08 +02:00
Mitchell Richters
733f3aa490 - increase granularity of CalcSmoothRatio(). 2020-08-02 20:57:07 +02:00
Christoph Oelckers
00ecea47aa - use CCMDs for input in Blood where appropriate. 2020-08-02 20:44:37 +02:00
Christoph Oelckers
4a049c1a4d - split sprite animation off view.cpp 2020-08-02 19:59:14 +02:00
Christoph Oelckers
e2498a53a9 - split Blood prediction code into its own file. 2020-08-02 19:43:45 +02:00
Christoph Oelckers
a9820abcae - migrated the remaining 2D content in Blood away from rotatesprite. 2020-08-02 19:00:32 +02:00
Christoph Oelckers
4e9ea9ef60 - fixed bad merge from some time agp. 2020-08-02 18:12:43 +02:00
Christoph Oelckers
1392f4db01 - handle the view frame with backend features. 2020-08-02 18:02:13 +02:00
Christoph Oelckers
fc390e244f - background for text screens. 2020-08-02 17:45:03 +02:00
Christoph Oelckers
1150e3ee0d - removed unused stuff from screen.cpp and deleted screen.h. 2020-08-02 13:54:36 +02:00
Christoph Oelckers
7846178130 - missed this... :( 2020-08-02 13:53:14 +02:00
Christoph Oelckers
3a32e8840f - ported Blood's status bar to the Status bar class.
Now it allows downscaling just like Duke's.
2020-08-02 13:35:34 +02:00
Christoph Oelckers
b259b94300 - implemented status bar scale control for Blood. 2020-08-02 08:48:23 +02:00
Christoph Oelckers
cc8798f6e2 - preparations for rendering Blood's status bar through the Statusbar class. 2020-08-02 08:39:51 +02:00
Christoph Oelckers
49a25c417b - split Blood's status bar code off into its own file. 2020-08-01 21:23:33 +02:00
Christoph Oelckers
ec846a3e63 - fixed shadows on Blood's text. 2020-08-01 20:07:32 +02:00
Christoph Oelckers
9dac66b6f0 - fudging for the broken FIRE animation.
Unfortunately the only thing that can be done here from inside the engine is to increase the likelihood of the animation actually starting.
Ideally the broken script should be replaced but with the way CON replacements are done this is not possible.
2020-08-01 17:54:38 +02:00
Christoph Oelckers
4332d02885 - fixed sound playback for doors etc.
The play code locked out the MUSICANDSFX actor but never properly checked for the sound being finished.
Fixes #87
2020-08-01 11:56:02 +02:00
Christoph Oelckers
76ba45ac8d - fixed the reactor for good.
Fixes #70
2020-08-01 09:55:48 +02:00
Christoph Oelckers
f75d30d858 - partial reactor fix.
This fixes the position of the debris - but there's still something else as the lightning beam still doesn't get removed.
2020-08-01 01:04:17 +02:00
Christoph Oelckers
c7c59d33ff - always set the spam timer when a quote is supposed to be printed, even if it gets rejected. 2020-07-31 21:16:07 +02:00
Christoph Oelckers
6d24a20f5c - QUOTE_DEAD may never repeat.
This gets spammed hard enough to get past the timer filter.
2020-07-31 21:14:43 +02:00