Commit graph

1512 commits

Author SHA1 Message Date
Christoph Oelckers
19a26f7959 - removed some unused code from engine.cpp.
Looks like editor utilities.
2020-09-13 08:30:03 +02:00
Christoph Oelckers
adf4a25b38 ... 2020-09-12 12:42:08 +02:00
Christoph Oelckers
16deb64e32 - fixed bad file checks in defs parser. 2020-09-12 12:39:18 +02:00
Christoph Oelckers
89316aea33 - demoted the SWCustom parser to the primitive Hexen interface after finding out that this is all the Build parser can do.
This also meant I had to add symbol support to the old style number parsers.
2020-09-12 10:23:47 +02:00
Christoph Oelckers
c4d7e68b4a - removed a bit more useless cruft from compat.h. 2020-09-11 19:45:17 +02:00
Christoph Oelckers
b2105f28e1 - replaced swapptr with std::swap. 2020-09-11 19:28:19 +02:00
Christoph Oelckers
d5b9a9ee43 Merge remote-tracking branch 'remotes/Github_private/InputStuffs' into back_to_basics2 2020-09-10 23:25:43 +02:00
Christoph Oelckers
9ce8202eb1 - Duke: Added a file check for the map to be entered when ending a level.
World Tour contains a map definition for E5L9 but no map for it.
2020-09-10 21:39:52 +02:00
Christoph Oelckers
41a2a63efd - moved the VP8 decoding loop into the movie player class and got rid of animvpx.
This allowed significant simplification of code data and many of the error checks could also be simplified because this player doesn't really need it all.
Also use nanoseconds to count frame delays, not milliseconds, as milliseconds can cause timing anomalies with common frame rates very easily.
2020-09-10 17:54:27 +02:00
Christoph Oelckers
83eba019b8 - added support for Megaton's widescreen assets.
Fixes #386
2020-09-10 00:05:10 +02:00
Christoph Oelckers
1a647e8104 - globally search and replaced TRUE and FALSE in SW.
There were a handful of warnings afterward which were also addressed.
The SWBOOL type has not been handled yet.
2020-09-09 19:52:52 +02:00
Christoph Oelckers
298949ceb8 - more compat.h cleanup
Its elimination is getting closer. :)
2020-09-08 18:48:18 +02:00
Christoph Oelckers
ec1c42b04a - got rid of common.h
All still relevant content was moved to places closer to its use.
2020-09-08 18:39:47 +02:00
Christoph Oelckers
18b39fd952 - first stage of generic automap code.
Lines and textures get rendered, not all colors are correct - sprites yet to do...
2020-09-06 20:49:43 +02:00
Christoph Oelckers
2395749192 - restored the automap texture drawer in the backend.
While ultimately this needs to be tossed into the deepest bowels of hell for being one gargantuan piece of bad code, it is still needed and does not really work when placed in a separate source file, due to its endless list of global dependencies.
2020-09-06 17:35:08 +02:00
Christoph Oelckers
809f8b5d4b - hooked up the new automap framework. 2020-09-06 12:44:58 +02:00
Christoph Oelckers
a6c92aec64 - removed all automap code from SW and the flat drawer from the backend.
This should have been the last parts of automap code.
Now on to rebuild this thing in a cleaner fashion...
2020-09-06 12:14:08 +02:00
Mitchell Richters
72771aeb40 - Fix broken krand() follow changes in 1354d52c05 due to truncation occuring from FixedToInt() inline function.
Very very sorry... :'(
Fixes #321.
2020-09-06 16:37:04 +10:00
Christoph Oelckers
d6b80bda52 - force the renderer to use radial fog.
Plane-distance based fog does not work with Polymost's projection settings - the distance value appears to be completely off and useless.
Fixes #243
2020-09-06 00:19:38 +02:00
Christoph Oelckers
b23424485a - re-implemented VP8 support.
Since the decoder cannot handle sound, there's two options:

1: Use the same sounds as the video it replaces.
2: If an identifiable streamable sound with the same base name is found, it will be played along with the video.
Fixes #133
2020-09-05 11:58:19 +02:00
Christoph Oelckers
8114309e89 - compat.h cleanup.
* use static_assert directly. Raze is C++17, no need for that macro shit.
* removed CONSTEXPR - I seriously fail to see the use here, many of the functions marked as CONSTEXPR cannot possibly even be constant evaluated so the declaration makes no sense. Removed most of these and replaced the valid ones with the official constexpr keyword.
* got rid of EDUKE_PREDICT_FALSE - this makes zero sense in script parsing code, at best it will save a few microseconds. Clean code wins.
* replaced Blrintf with xs_CRoundToInt. Shitty name is shitty name, even if derived from POSIX.
* replaced Bstr*casecmp with str*icmp. As these get defined in the CMake project based on actual compiler checks they are preferable here.
* removed lots of other stuff that is not needed with a minimum compiler requirement of C++17.
2020-09-04 21:24:48 +02:00
Christoph Oelckers
e5e8c02f1d - WIP level transition refactored to a game independent event system. 2020-09-04 19:43:35 +02:00
Mitchell Richters
1354d52c05 - Major cleanup of Q16.16 utilisation within games and engine.
* Remove fix16.h/cpp and utilise library from m_fixed.h.
* Extend m_fixed.h with two inline functions for int to/from float operations.
* Replace fix16_floor operations with those from xs_Float.h
* Replace multiple Q16.16 conversions from 0 to just be 0.
* Replaced all found in-game bit-shifts and multiplications/divisions with inline functions from m_fixed.h
* Replaced many casts of FRACUNIT as double in SW's panel.cpp as it is converted to double by way of type promotion.
* Fixed missed precision fixes in SW's panel.cpp where some types weren't declared correctly.
* Replaced 100+ `Cos()/Sin() >> 16` operations for Blood with inline functions `CosScale16()/SinScale16()`.
2020-09-01 23:00:47 +10:00
Christoph Oelckers
2f05a93547 Merge branch 'Packet' into back_to_basics2
# Conflicts:
#	source/core/gamestruct.h
#	source/games/duke/src/gameloop.cpp
#	source/games/duke/src/player_d.cpp
2020-08-31 00:09:56 +02:00
Christoph Oelckers
b8258da997 - cleaning out some trash from compat.h.
The header from hell...
2020-08-30 23:34:40 +02:00
Christoph Oelckers
c3fa9b76c4 - fixed: The render style must be set to a defined value at the start of rendering a scene. 2020-08-30 17:40:04 +02:00
Christoph Oelckers
0c455acaa2 - more work to switch over to the new loop.
Mainly separation of ticker and render calls
2020-08-30 10:42:44 +02:00
Mitchell Richters
c47b60e193 - Fix compile regression from 847fa48724.
Fixes #283.
2020-08-29 08:16:05 +10:00
Christoph Oelckers
847fa48724 - cleaned out the remaining parts of baselayer.h
In particular this means to remove the option to disable widescreen aspect ratios. The way this was handled makes no sense with the current render backend.

The aspect ratio code will have to be redone entirely to properly obey the backend's settings.
2020-08-28 09:06:49 +02:00
Christoph Oelckers
536e7455f2 - moved I_StartFrame to the top of the loop and cleaned up baselayer.hj 2020-08-28 08:44:44 +02:00
Christoph Oelckers
d73bf62465 Revert "- Set frame-time as close to the buffer swap as possible, and calculate smoothratio for Duke/SW as late as possible."
This reverts commit 97feb483ab.
2020-08-28 08:25:51 +02:00
Mitchell Richters
97feb483ab - Set frame-time as close to the buffer swap as possible, and calculate smoothratio for Duke/SW as late as possible.
* Micro-optimisation, but was getting a very occasional jitter in Duke 3D that seems to have gone with this.
2020-08-28 15:27:16 +10:00
Christoph Oelckers
4e846f8d66 - do not print game init messages to the notify display. 2020-08-26 20:19:54 +02:00
Mitchell Richters
76776d24d7 - All Games: Remove use of ClockTicks and replace with int. 2020-08-26 09:49:42 +10:00
Mitchell Richters
1c8b0a20fb - Build: Remove all timer code. 2020-08-26 09:49:40 +10:00
Mitchell Richters
2bf11ad378 - All Games: Remove use of timerGetTicks(). 2020-08-26 09:49:38 +10:00
Mitchell Richters
aba5c4c134 - All Games: Remove use of timerGetHiTicks(). 2020-08-26 09:49:36 +10:00
Mitchell Richters
b883204f6a - All Games: Remove remaining use of totalclock and associated timing code. 2020-08-26 09:49:34 +10:00
Mitchell Richters
76b05dbcd6 - Build (and games): Remove totalclocklock. 2020-08-26 09:48:56 +10:00
Mitchell Richters
576b13248e - Build: Use I_GetBuildTime() in place of totalclocklock in animateoffs(). This makes the SW menu work pre-game. 2020-08-26 09:48:54 +10:00
Christoph Oelckers
70cac1db54 - removed unused parts from timer.cpp. 2020-08-25 21:47:03 +02:00
Christoph Oelckers
e97fb2ab7f - reduce message spam in the notification display. 2020-08-25 20:21:18 +02:00
Mitchell Richters
d3b506eb2b - Duke (and Engine): Eliminate use of totalclock for game.
* Breaks every other game except Duke unless/until they get migrated. Done for the purpose of demonstrating PR #244.

# Conflicts:
#	source/build/src/timer.cpp
#	source/games/duke/src/game.cpp
2020-08-25 19:51:12 +02:00
Christoph Oelckers
435e13dfa4 cleanup of the timer interface.
* rewrote all uses of timerSetCallback. Most were unnecessary or long obsolete, the sound updates need to run per frame, not per tic and the UI tickers need to be handled in the main loop anyway.
* Use a more precise timer to animate the menu transition.
* uncouple other menu animations from the game timer.
2020-08-25 19:42:11 +02:00
Christoph Oelckers
8b8f048393 - moved parts of videoNextPage to app_loop. 2020-08-23 18:08:08 +02:00
Christoph Oelckers
7fe7b9b8e0 - be gone, rotatesprite. 2020-08-23 14:59:34 +02:00
Christoph Oelckers
0843f5f04a - ported the final level's text screen and exported its text to the string table. 2020-08-22 18:12:19 +02:00
Christoph Oelckers
d645674c1c - consolidated the DEF parser parts in the backend.
Only Blood had some special handling - better implement callbacks here instead of requiring a second parsing pass.
2020-08-19 20:29:37 +02:00
Christoph Oelckers
e22d9b21e4 - changed SW's cheat prefix from 'sw' to 'lw' (i.e. Lo Wang) so that the cheats do not start with two movement keys. 2020-08-19 16:51:15 +02:00
Christoph Oelckers
60275c9b6b - started with SW's new main loop.
Intro and menu are done, the game loop is quite a mess, unfortunately.
2020-08-16 20:10:26 +02:00