Commit Graph

11274 Commits

Author SHA1 Message Date
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 e2e9c8ad01 - fixed the timer. 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
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 61d08f41e0 - fixed DTA_KeepRatio. 2020-07-17 21:14:58 +02:00
Christoph Oelckers d1b4c34ff9 - re-added the hud_input call that somehow got lost. 2020-07-17 21:09:07 +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 dc9c8a0e60 - consolidation of pitch code for aim mode 0. 2020-07-17 00:32:26 +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 38751d19ac - changed all SYNCINPUT #defines into runtime checks so that both parts can be used and consolidated the 4 versions of the SeaSick code. 2020-07-16 17:59:25 +02:00
Christoph Oelckers 2888f29e32 - reenable the logos. 2020-07-16 15:18:27 +02:00
Christoph Oelckers f530732c46 - adjustments for input 2020-07-16 15:03:09 +02:00
Christoph Oelckers 55feadd11c - render the weapons with the DrawTexture interface and properly handle rotatesprite's alignment modes 2020-07-16 13:23:26 +02:00
Christoph Oelckers a066c5bc4b - make everything compile again. 2020-07-16 00:27:09 +02:00
Christoph Oelckers 39a6ab6f0e - input update - safety commit 2020-07-15 23:44:07 +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 381e15a9b2 - renamed playerdata_t::input back to sync and made it a static array again. 2020-07-15 13:10:18 +02:00
Christoph Oelckers a9f152c1fe - added JFDuke's label type checker and did some cleanup on the CON init code.
Most importantly: Use dynamic buffers for managing the labels instead of hijacking some other storage space.
2020-07-15 12:34:42 +02:00
Christoph Oelckers 866be28da0 - clear the input state when starting a new map or loading a savegame. 2020-07-15 09:21:47 +02:00
Christoph Oelckers 99161e2e4a - made ps an array of player_struct like it originally was. 2020-07-15 00:26:58 +02:00
Christoph Oelckers 2fd2ad2212 - sky code cleanup and transitioning of Duke's. 2020-07-15 00:06:19 +02:00