Commit graph

31 commits

Author SHA1 Message Date
Mitchell Richters
5bb7c7a647 - adjust elapsedInputTicks in GetInput() to be 1000.0 / REALGAMETICSPERSEC.
* 1000 / 30 = 33.333~. This ensures that if 33.333 is the minimum value, the calculation for scaleAdjust always equals 1.0 (no scaling).
2020-07-24 19:38:09 +10:00
Mitchell Richters
25ca23f2e2 - fix keyboard input fvel/svel more in line with Graf's coding style.
* Essentially reverts e41041074d and moves the use of `abs()` from keymove to fvel/svel itself.
2020-07-24 18:32:01 +10:00
Christoph Oelckers
be9094cb97 Silenced lots of warnings pointed out by XCode. 2020-07-23 17:02:59 +02:00
Mitchell Richters
eadb31f9cd - use REALGAMETICSPERSEC as maximum value for elapsedInputTicks in GetInput().
Hard-coded value of `10.0` was too low and was always being used instead of the value of `(now - lastCheck)`. This made `scaleAdjust` inaccurate and not fast enough.
2020-07-23 19:16:51 +10:00
Mitchell Richters
e41041074d - ensure keyboard fvel/svel input never exceeds the range of keymove.
Repairs issue where keyboard input was accelerating to a value of 90 which was not possible in the original game.
2020-07-22 20:42:05 +10:00
Christoph Oelckers
61f5247b71 -let's hope this will solve the pausing problem for good.
The checks for game pause were totally inconsistent, so now there is a utility function that tells whether the game is supposed to run or not.
pause can also take 3 values now - 0 for no pause, 1 for pause from opening the menu or console or 2 for hitting the pause button.
2020-07-21 22:46:26 +02:00
Christoph Oelckers
16efa87701 - started sorting variables in globals.h and removed player.h after cleaning it out. 2020-07-20 18:43:50 +02:00
Christoph Oelckers
3028b3f3fd - merged game.h into global.h and game.cpp into global.cpp.
Meaning that all global declarations are in one file now.
2020-07-20 18:43:50 +02:00
Mitchell Richters
2ce612e8ab - remove multiplier when finalising player's angle in FinalizeInput().
Not sure how this came to be but was causing rather accelerated angle adjustments compared to the stock game.
2020-07-20 20:38:38 +10:00
Christoph Oelckers
c767ead84f - properly route gameexitfrommenu through the callbacks. 2020-07-18 21:28:57 +02:00
Christoph Oelckers
36d61fc662 - make sure that the static time counters in the input code do not accumulate while not in use.
The one for holding the turn key needs to be reset any time there is no turning and everything needs to be cleared when the input state is cleared. And all need to check for the case where the static state is not set yet.
2020-07-18 13:27:24 +02:00
Christoph Oelckers
f9e76ba178 - merged the last two functions of the input code with input.cpp. 2020-07-18 09:59:16 +02:00
Christoph Oelckers
47a0b14b43 - the main input function is also free of conflicts. That leaves 3 functions with roughly 4kb of code that cannot be redone without using EDuke code. 2020-07-18 00:59:10 +02:00
Christoph Oelckers
6c2600df51 - cleanup of the main input code.
Only 8 kb code left that is clearly recognizable as coming from EDuke32.
2020-07-18 00:34:20 +02:00
Christoph Oelckers
1d685d24e9 - fixed handling of BitsToSend. 2020-07-17 22:19:22 +02:00
Christoph Oelckers
7bc2befc84 - consolidated the finalizing parts of the input code and fully merged most of the bike/boat handlers.
Turned out that the only major difference was already split off into subfunctions.
2020-07-17 22:09:01 +02:00
Christoph Oelckers
29e107ad24 - use CCMDs for weapon and inventory selection, courtesy of ZDuke. 2020-07-17 20:56:10 +02:00
Christoph Oelckers
01d3ca870d - more consolidation between old and new input paths.
This also simplifies the one_eighty handling to be closer to the original idea.
2020-07-17 11:46:23 +02:00
Christoph Oelckers
7ba4e4de97 - weapon selection offloaded and cleaned up. 2020-07-16 23:32:00 +02:00
Christoph Oelckers
43c4c5eb5e - consolidated some parts common to the 3 input routines. 2020-07-16 22:49:26 +02:00
Christoph Oelckers
ff9e2c3f5e - same procedure for the motorcycle - and again roughly 10% of the input code down. 2020-07-16 19:16:56 +02:00
Christoph Oelckers
fca4bdcafb - split out the main movement calculation out of P_PlayerInputBoat and used the original code for providing a replacement. 2020-07-16 18:58:31 +02:00
Christoph Oelckers
a066c5bc4b - make everything compile again. 2020-07-16 00:27:09 +02:00
Christoph Oelckers
d139720607 - cleaned up the setup code and consolidated everything in a separate file. 2020-07-15 21:11:23 +02:00
Christoph Oelckers
ea6c74d0e6 - transitioned the local input handler.
There wasn't anything EDuke32-specific in there - nearly everything mapped perfectly to JFDuke.
2020-07-15 19:48:04 +02:00
Christoph Oelckers
a0cd407632 - cleanup on pausing code. 2020-07-15 18:10:31 +02:00
Christoph Oelckers
f2380f8829 - constant cleanup. 2020-07-06 13:26:26 +02:00
Christoph Oelckers
6be1a9a9e4 - copyright 2020-06-28 09:03:31 +02:00
Christoph Oelckers
a39f6062ce - fixed new input code and delete the old one. 2020-06-21 23:28:47 +02:00
Christoph Oelckers
2e15cec17a - safety commit 2020-06-21 23:28:47 +02:00
Christoph Oelckers
985fa2a159 - cheat and chat code from ZDoom.
Not active yet because it does not integrate with the current input code, but at least it's there now.

# Conflicts:
#	source/build/include/baselayer.h
2020-06-21 23:28:45 +02:00