Mitchell Richters
230332338c
- make RRRA motorbike turning speed consistent with varying framerates.
...
* Multiply returned value with scaleAdjust.
* Use doubled return values like Rednukem (20 -> 40, 10 -> 20, 3 -> 6).
2020-07-24 19:50:28 +10:00
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
928a16983d
- adapted the MVE player.
...
Video appears to work, but has quite severe artifacting I cannot tell if it's the video or the decoder which causes it.
2020-07-23 22:26:07 +02:00
Christoph Oelckers
945dbc9f7e
Use type safe angle and horizon classes for the render interface
...
These need to be robust and not allow implicit conversions.
2020-07-23 17:03:11 +02:00
Christoph Oelckers
ab8006cc40
- make binaryangle.h compile.
2020-07-23 17:02:59 +02:00
Christoph Oelckers
be9094cb97
Silenced lots of warnings pointed out by XCode.
2020-07-23 17:02:59 +02:00
Christoph Oelckers
d16d8f0d0e
- fixed issues reported 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
54d73ce9f8
- fix 'Quick Turn' for Duke.
2020-07-23 14:05:36 +10:00
Mitchell Richters
be0cbeed65
- ensure p->lookRight is reset to false in start checklook()
like lookLeft is.
...
Repairs issue where player never returned to centre when they pressed the look right key.
2020-07-23 13:34:47 +10:00
Christoph Oelckers
253dea7610
- removed parsing_ifelse sanity check because it breaks compilation in a few case.
...
if there ever needed to be proof that CON is broken beyond repair this should be it, this will allow broken code to slip through the parser and apparently some scripts exploit this bug.
NAM's soldiers won't work with the 'proper' code.
2020-07-22 22:27:51 +02:00
Mitchell Richters
77ff6f324c
- ensure rotscrnang turns right when looking right.
...
Doesn't repair issue when looking right doesn't return again, will isolate and repair.
2020-07-22 20:44:16 +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
368298d02d
- enable the menu and console everywhere, except on the intro logos.
2020-07-22 00:42:50 +02:00
Christoph Oelckers
902fbf6f5d
- got rid of MODE_TYPE since this will be handled in the backend in the future.
2020-07-21 22:59:24 +02: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
6227f9f7fd
- optimizations for better savegame performance.
2020-07-21 21:32:38 +02:00
Christoph Oelckers
1869a7930e
- hooked up the new savegame code.
...
Not tested yet.
2020-07-21 00:07:02 +02:00
Christoph Oelckers
9ace06ad81
. deleted the old savegame.h file.
2020-07-20 23:22:40 +02:00
Christoph Oelckers
7eb158bf72
- properly tabified everything.
2020-07-20 23:21:27 +02:00
Christoph Oelckers
ba7997b611
- implemented most of the savegame code and deleted the old one.
2020-07-20 23:07:44 +02:00
Christoph Oelckers
c16115d76c
- first stage of new savegame code.
...
This also refactors the animateptr array into something serializable. This kind of pointer lookup is virtually unrestorable without creating platform locked savegames.
2020-07-20 20:40:29 +02:00
Christoph Oelckers
2d78643c4d
- initial savegame work.
2020-07-20 18:43:50 +02:00
Christoph Oelckers
06fa1391f5
- did some cleanup on the global variables.
2020-07-20 18:43:50 +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
7d7ae9e463
- fixed gamestartup parser so that it can detect script versions again.
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
Christoph Oelckers
08909f414a
- merged playerdata_t into player_struct
2020-07-20 18:43:49 +02:00
Christoph Oelckers
a40343ae00
- premap.h is also gone because it didn't contain anything relevant anymore.
2020-07-20 18:43:49 +02:00
Christoph Oelckers
c3fb679992
- more header cleanup work, macros.h is gone.
2020-07-20 18:43:49 +02:00
Christoph Oelckers
2dcaf25fea
- put the entire CON parser into a class to make its state local to the caller
2020-07-20 18:43:49 +02:00
Christoph Oelckers
9346b5de7e
- testing stuff.
2020-07-20 18:43:48 +02:00
Christoph Oelckers
f9842fc4a8
- implemented running screen jobs from the main loop.
...
The entire game now has only one single place where videoNextPage gets called.
2020-07-20 18:43:48 +02:00
Christoph Oelckers
31b9995406
- rewrote the ScreenJob player as a class that can be called by an asynchronous dispatcher.
...
Works, except for timing issues with ANMs.
2020-07-20 18:43:48 +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
72bf70811e
- restructured exitlevel for asynchronous handling of the summary screen.
2020-07-19 00:53:13 +02:00
Christoph Oelckers
a1001c5fdd
- changed startnewgame to handle the screen jobs asynchronously.
2020-07-19 00:26:36 +02:00
Christoph Oelckers
a3e9ea97a8
- merged the two main loops into one.
...
Yet to do: Run the screen jobs from the main loop as well.
2020-07-18 23:50:46 +02:00
Christoph Oelckers
e97e663b49
- more restructuring of asynchronously playing sequences.
2020-07-18 22:38:19 +02:00
Christoph Oelckers
c767ead84f
- properly route gameexitfrommenu through the callbacks.
2020-07-18 21:28:57 +02:00
Christoph Oelckers
ded0edae0c
- fixed return_to_center
2020-07-18 14:30:17 +02:00
Christoph Oelckers
d88ae50923
- moved a few global variables around so that they don't get lost for handling savegames or a global state reset.
2020-07-18 13:38:16 +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
e70115ff5c
- put the CON interpreter into a class to get rid of its global variables.
2020-07-18 12:37:35 +02:00
Christoph Oelckers
28965eefd5
- moved the main loop to gameloop.cpp.
2020-07-18 11:56:49 +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
ac3925f64d
- cleanup
2020-07-18 01:40:18 +02:00
Christoph Oelckers
ba69084aa5
- consolidated the movement block check after discovering that it wasn't handling things properly for all games.
2020-07-18 01:34:13 +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