Commit graph

2039 commits

Author SHA1 Message Date
Christoph Oelckers
c4ea5cf336 - restore original krand formula.
Note: The only game module actually using this is Duke/RR.
2021-10-26 18:48:54 +02:00
Christoph Oelckers
86c58649ba - fixed black rendered sectors in Exhumed/Polymost.
More a hack than a fix, thanks to Polymost's poor state handling
2021-10-16 15:36:34 +02:00
Christoph Oelckers
62d0d3712e - use a sprite flag to mark mapped sprites.
This avoids another global array which needs to be addressed by sprite index.
2021-10-14 15:09:43 +02:00
Christoph Oelckers
29769dd673 - fixed engine code warnings pointed out by XCode 13. 2021-10-08 19:06:41 +02:00
Christoph Oelckers
7f485bfab1 - split off the extended sprite flags into their own word.
Some code overwrites the cstat field entirely (thanks Duke, for being sloppy with this...!)
2021-09-12 18:26:35 +02:00
Christoph Oelckers
99ecfe133d - flag sprites for automapping regardless of the 'automapping' variable's value.
Duke should show its floor sprites, too.
2021-09-12 18:22:38 +02:00
Christoph Oelckers
0bd0923f44 - cleaned up some dirty code. 2021-08-30 08:07:40 +02:00
Mitchell Richters
4298399e00 - Build: Change MAXSPRITESONSCREEN from constant of 2560 to 1/4 of MAXSPRITES.
* Mods like Blood's Eviction are pushing these limits hard. Bumping the onscreen limit resolved recurring crash on `sstation.map` with no apparent ill-effects.
2021-07-25 15:38:51 +10:00
Dino Bollinger
8dd0f947f7 Remove useless code introduced in bad17f29 2021-07-07 21:31:32 +02:00
Mitchell Richters
1dbf34fe56 - Repair some potential issues from 1354d52c05 that might be causing issues with #455. 2021-07-04 21:06:13 +10:00
Christoph Oelckers
5b38343407 - fixed sprite exclusion logic in getzrange.
This was using the wrong flag.
2021-06-09 00:31:54 +02:00
Christoph Oelckers
7fa690082e - fixed cherry picked commit.
# Conflicts:
#	source/core/gamecontrol.h
2021-06-02 20:52:47 +02:00
Christoph Oelckers
dc846dcd49 - Duke: avoid clipping against self when executing script logic for floor sprites.
A good place to see the result is a kitchen knife in E4L2 that went missing due to the faulty check.
2021-06-01 21:21:39 +02:00
Christoph Oelckers
454816299e - reorganized loading of textures.
Due to dependencies on initializing some data in app_init it was not possible to cleanly set up the fonts.
This adds a game-side function for loading the entire palettes before starting with the texture data and another one for loading game-side texture data.
This now allows fully setting up the palettes before starting with the textures and to fully set up the textures before reading the .def files.

All this is needed because to properly initialize, the fonts need to be able to access the fully initialized texture state, including replacements and hires substitutions from the .def files.
2021-06-01 11:05:26 +02:00
Brian Koropoff
e4e949877d Fix buffer overflow at maploader.cpp:392 2021-05-22 22:31:16 +02:00
Christoph Oelckers
d572e56839 - removed the indirection for the global arrays.
No idea what part of EDuke32 needed this, but it is not necessary.
2021-05-21 14:32:01 +02:00
Christoph Oelckers
d4eb54d686 - render free standing wall sprites without depth bias.
Otherwise they can end up badly ordered with walls.
2021-05-20 12:36:35 +02:00
Christoph Oelckers
5ae1c334fa - Duke: fixed bad check in 'ifnotmoving' CON command. 2021-05-14 10:03:07 +02:00
Christoph Oelckers
b6dd834420 - fixed warnings in Build code. 2021-05-12 21:47:32 +02:00
Christoph Oelckers
7283de0084 - fixed some very noisy warnings in two headers. 2021-05-12 21:47:32 +02:00
Christoph Oelckers
e40ed2262e - cleanup of 'gotpic' handling. 2021-05-10 20:13:28 +02:00
Christoph Oelckers
e74aca291c - position tweaking for Nam's skies.
Why is this such an utter mess to get skies placed correctly? :(
2021-05-10 20:13:28 +02:00
Cacodemon345
36b910a253 Fix compilation on OpenBSD 2021-05-10 08:25:14 +02:00
Christoph Oelckers
34a5fb5a6a - make testnewrenderer persistent. 2021-05-06 18:12:23 +02:00
Christoph Oelckers
d54a8724b5 - default 'testnewrenderer' to false. 2021-05-06 17:04:48 +02:00
Christoph Oelckers
020a636c2f - removed some more useless stuff from headers. 2021-05-03 19:16:26 +02:00
Christoph Oelckers
0db8fc6163 - removed UNREFERENCED_PARAMETER macro.
Using C++ standard of not naming such parameters instead.
2021-05-03 19:10:53 +02:00
Christoph Oelckers
7d77b2315f - merged the few remaining contents of mmulti.h into d_net.h 2021-05-03 19:01:00 +02:00
Christoph Oelckers
8c379f7a44 Merge branch 'master' into newrenderer 2021-04-25 11:33:47 +02:00
Christoph Oelckers
3ad4a869c1 - handle the case that a deleted sprite has inserted its bogus sector reference into the clip list.
We got one report of Blood crashing on this.
2021-04-23 20:11:46 +02:00
Christoph Oelckers
db7527fa43 - fix sky palette in Polymost mode. 2021-04-22 22:03:16 +02:00
Christoph Oelckers
9092b5c392 - removed some unused stuff from engine. 2021-04-21 22:32:27 +02:00
Mitchell Richters
98a9963bb5 - Fix release builds of project and remove old def_.cpp stub file. 2021-04-22 06:30:44 +10:00
Christoph Oelckers
ba5e7d419c - cleaned up the remains of the old def parser. 2021-04-21 18:15:55 +02:00
Christoph Oelckers
1ea25e5d0e - reworked the def parser's main loop. 2021-04-21 18:15:25 +02:00
Christoph Oelckers
8c854441bc - model command migrated 2021-04-21 18:15:12 +02:00
Christoph Oelckers
542e1b2ba7 - ported all simple model commands.
'model' is the last remaining one.
2021-04-21 18:15:12 +02:00
Christoph Oelckers
b49de68c86 - migrated highpalookup, basepalette and undefbasepaletterange. 2021-04-20 22:43:02 +02:00
Christoph Oelckers
512411d0fa - parseUndefTexture(Range) 2021-04-20 20:41:15 +02:00
Christoph Oelckers
1518156386 - parseUndefPalookupRange 2021-04-20 20:41:15 +02:00
Christoph Oelckers
276fd19462 - parseMakePalookup 2021-04-20 20:41:15 +02:00
Christoph Oelckers
6fb09f36c7 - fixed a few parsing errors. 2021-04-20 20:41:04 +02:00
Christoph Oelckers
aaad546729 - palookup. 2021-04-20 20:21:51 +02:00
Christoph Oelckers
bb119fa928 - parseNumAlphaTabs 2021-04-20 20:21:51 +02:00
Christoph Oelckers
82a0b0502b - parseBlendTable 2021-04-20 20:21:51 +02:00
Christoph Oelckers
01f93f4cca - several smaller texture (un)definition commands. 2021-04-20 20:05:35 +02:00
Christoph Oelckers
8c5a9c23c3 - tileimportfromtexture and copytile. 2021-04-20 20:04:44 +02:00
Christoph Oelckers
97637e4d2d - parseArtFile. 2021-04-20 20:03:19 +02:00
Christoph Oelckers
2761ced670 - handle 2 dead .def commands. 2021-04-20 20:02:19 +02:00
Christoph Oelckers
afb2cd3b82 - fixed NoFullbrightRange.
Ever since the texture system switchover this only set a dead bit, it has to explicitly mark the texture as not having a brightmap.
2021-04-20 20:02:08 +02:00
Christoph Oelckers
40a632a2ae - rffdefineid 2021-04-20 19:39:12 +02:00
Christoph Oelckers
82194bbf6b Merge branch 'master' into newrenderer
# Conflicts:
#	source/games/exhumed/src/2d.cpp
2021-04-17 13:22:30 +02:00
Christoph Oelckers
42b87362ee - When keeping around a dummy sprite, make sure that the engine's utilities cannot find it anymore.
This was causing issues with the master switch sprites in Duke that have to be kept for sound purposes.
Unfortunately, both hitscan and neartag are far too dumb to analyze sprites they may hit in any way and needed some help skipping such sprites.
2021-04-17 09:37:38 +02:00
Christoph Oelckers
f4ec9a1921 - 4 more .def commands ported 2021-04-13 18:14:46 +02:00
Christoph Oelckers
798cf2f973 Merge branch 'newrenderer2' of https://github.com/coelckers/Raze-private into newrenderer2 2021-04-12 20:25:56 +02:00
Christoph Oelckers
aebcc13c4a - migrated voxel parsing stuff. 2021-04-11 18:37:11 +02:00
Christoph Oelckers
c33eea2540 - migrating 'tint .def command. 2021-04-11 15:23:42 +02:00
Christoph Oelckers
42d02834b1 Merge branch 'master' into newrenderer2
# Conflicts:
#	source/build/include/build.h
#	source/build/src/polymost.cpp
#	source/build/src/voxmodel.cpp
#	source/core/gamecontrol.cpp
#	source/core/gamestruct.h
#	source/games/blood/src/animatesprite.cpp
#	source/games/blood/src/misc.h
#	source/games/blood/src/view.cpp
#	source/games/duke/src/render.cpp
#	source/games/sw/src/draw.cpp
#	source/games/sw/src/game.h
#	source/games/sw/src/jsector.cpp
#	source/glbackend/glbackend.cpp
2021-04-11 14:38:56 +02:00
Christoph Oelckers
0ee28fb45e - also handle SW's voxels. 2021-04-11 13:38:23 +02:00
Christoph Oelckers
9fd3ab6b5e - fixed texture precaching.
After the migration to GZDoom's full backend this never created any textureds when precaching things.
2021-04-11 09:59:55 +02:00
Mitchell Richters
e76f63e2c0 - Consolidate all game interpolation code into inline functions. 2021-04-11 16:45:35 +10:00
Christoph Oelckers
0bdbf0f1cb - fixed: alpha was never set for voxels.
Fixes #304
2021-04-11 08:26:36 +02:00
Christoph Oelckers
a5ed7ba8a3 - two more simple .def commands. 2021-04-10 16:35:29 +02:00
Christoph Oelckers
6b684e74ba - migrated 'texture' .def command. 2021-04-10 14:09:08 +02:00
Christoph Oelckers
057b8a7354 - cleanup of bvectan family of functions.
This can be greatly simplified to a single bvectangbam function using atan2 directly.
2021-04-10 12:54:29 +02:00
Christoph Oelckers
b4d89cbac3 - got rid of the remaining occurences of gethiq16angle and all related tables. 2021-04-10 12:10:28 +02:00
Christoph Oelckers
92697686cb - migrated a few more .def commands. 2021-04-09 19:59:03 +02:00
Christoph Oelckers
333581a084 Merge branch 'master' into newrenderer2
# Conflicts:
#	source/build/src/defs.cpp
2021-04-09 19:57:56 +02:00
alexey.lysiuk
57c7a85d9f - fixed compilation with Clang
source/build/src/defs.cpp:3198:56: error: cannot pass non-trivial object of type 'FString' to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]
2021-04-09 15:55:30 +03:00
Christoph Oelckers
fb02b38279 - better .def loading logic.
To allow cumulative loading without interfering with other ports, Raze will now look for files called xxxx-raze.def, where xxxx is the default .def name (e.g. duke3d-raze.def for Duke3D.) and if that is found, cumulatively load all same-named files - it will fall back on the default name if no such thing is found.
-def still overrides both and will not cumulatively load.
2021-04-09 14:30:01 +02:00
Christoph Oelckers
778a75c097 - fixed rffdefineid handler passing a bad file name to the backend. 2021-04-08 21:36:52 +02:00
Christoph Oelckers
9f08f9786a - consolidated a bit of dead content in .def parser. 2021-04-08 20:03:50 +02:00
Christoph Oelckers
794cab2d54 - removed some dead code. 2021-04-08 18:54:39 +02:00
Christoph Oelckers
cecd34efc7 - moved a bit more script parsing functionality into the backend and tried it out on the 'skybox' command. 2021-04-08 14:00:08 +02:00
Christoph Oelckers
38ecfc8fa5 - added handling for cubemapped skyboxes. 2021-04-08 12:47:31 +02:00
Christoph Oelckers
5c2335bbeb - encapsulate setuptile(range) parsing in separate functions. 2021-04-06 16:22:24 +02:00
Christoph Oelckers
0b79649dc2 Merge branch 'master' into newrenderer2 2021-04-06 16:14:21 +02:00
Christoph Oelckers
d193e199f1 - reorganized hightile offset storage. 2021-04-06 15:55:33 +02:00
Christoph Oelckers
424c0ce3f4 - testing some script parser improvements. 2021-04-06 15:07:12 +02:00
Christoph Oelckers
7a9e58c31e - removed redundant cstat.h file.
Constants are already defined in buildtypes.h
2021-04-05 18:05:43 +02:00
Christoph Oelckers
e30dc82676 - Cleanup of the voxel code.
* moving polymost_voxdraw into polymost.cpp.
* consolidated all remaining voxel code in hw_voxels.cpp. All original Build voxel code is completely gone now, except for polymost_voxdraw, so this got moved out of the build/ folder.
* integrate Blood's voxel init code into the main function.
* some further cleanup was allowed as a result of this, so engineInit is gone now because these parts can now be done outside the games' app_init functions.
2021-04-05 18:05:43 +02:00
Mitchell Richters
be8df3488d - build.h: Remove function prototypes for now static functions within engine.cpp. 2021-04-05 20:28:57 +10:00
Christoph Oelckers
8e31c34b06 - fixed tileImportFromTexture.
* the parser read numbers with leading zeros as octal, which is not wanted here
* texture lookup by file name must be forced for root directory entries.
2021-04-04 21:02:04 +02:00
Christoph Oelckers
8055ff1d86 - fixed tileImportFromTexture.
* the parser read numbers with leading zeros as octal, which is not wanted here
* texture lookup by file name must be forced for root directory entries.
2021-04-04 21:00:41 +02:00
Christoph Oelckers
c303884274 - better handling for Duke's scrolling cloudy skies.
* Using the Doom-style dome here because it looks better.
* this necessitated changes to the backend to allow both types of sky domes at the same time
* do not clamp panning fields for cloudy sky with the new renderer because this makes the texture jump.
2021-04-04 20:35:38 +02:00
Christoph Oelckers
55ad51ee1f Merge branch 'master' into newrenderer2 2021-04-04 13:23:51 +02:00
Christoph Oelckers
97a0cb2a10 - handle voxel rotation in the backend to enable it for all games.
This was previously only present in the Blood module and missed in Exhumed from upstream so the entire option was rather pointless.
Fixes #290
2021-04-04 10:33:29 +02:00
Christoph Oelckers
952bccbf5f - added a check for game-side-defined voxels when discarding one-sided wall sprites viewed from the back. 2021-04-03 21:49:28 +02:00
Christoph Oelckers
9c95c902c7 - added a check for game-side-defined voxels when discarding one-sided wall sprites viewed from the back. 2021-04-03 21:40:16 +02:00
Christoph Oelckers
638f19172a - voxel rendering.
The stock voxels of Blood and SW seem to work so far, but not all edge cases have been tested.
2021-04-02 18:20:07 +02:00
Christoph Oelckers
c8a75a8664 - give each DrawInfo its own list of tsprites.
Since these do not fully get processed sequentially the contents need to be preserved until needed.
This required getting rid of the global tsprite array. Polymost still uses a static vatiable, though, but this is only accessed in polymost-exclusive code.
2021-04-02 10:28:40 +02:00
Christoph Oelckers
80e5cd0dc5 - fixed some automap issues:
* Blood's automap was not drawn at all.
* SW's automap always showed all sectors
* SW's player sprite was not rendered.
* Non-automap: Forward gotsector to the game code because there's still a few places in Blood that need it.
2021-04-01 20:47:05 +02:00
Christoph Oelckers
7bea8ad6ba - fixed texture overlays for SW's sector portals. 2021-03-30 23:27:11 +02:00
Christoph Oelckers
4647a0b2bc - fixed cases of small textures being used for the sky.
Case in Point: DukeDC uses a 64x64 texture with palette remap for the sky.
2021-03-29 23:25:43 +02:00
Christoph Oelckers
e7d73fd8e7 - fixed clipping code.
This seems to require the old code as-is - the latest refactoring broke some stuff again and had to be reverted.
2021-03-27 15:04:16 +01:00
Christoph Oelckers
1dfb2672a8 - flat sprite rendering! 2021-03-26 20:28:44 +01:00
Christoph Oelckers
fd0e9824b6 - call the game specific analyzesprites functions. 2021-03-26 15:06:14 +01:00
Christoph Oelckers
0b1e81023f - added sprite collection loop to ProcessSector and did a bit of cleanup on the TSprite code. 2021-03-25 23:16:32 +01:00
Christoph Oelckers
af54cf3a3c - made SW's sector portals operational.
Unlike the other games these are so poorly defined that the engine has to rely on the original fudging to pick the proper portal to link to. As a result they are just as limited as they always were.
In addition all the portal search code had to be reinstated.
2021-03-25 16:45:40 +01:00
Christoph Oelckers
168b0385cf - moved shadeToLight out of build.h. 2021-03-25 09:13:59 +01:00
Mitchell Richters
957f7e9487 - Accept binangle, fixedhoriz and lookangle classes in SetupViewpoint() vs. Q16.16 variables.
* Allows for more precision than Q16.16.
* Used as opportunity for `rollang` to be set using the `asdeg()` method, not `asbuildf()`.
2021-03-25 19:06:01 +11:00
Christoph Oelckers
463dbc4c4f - fixed issue with empty voxel slots. 2021-03-25 08:37:44 +01:00
Christoph Oelckers
368b2319f2 - replaced 'static FORCE_INLINE' globally with 'inline'.
I have no idea what kind of compiler needs such a construct, it's totally not how C++ should be written.
2021-03-24 21:43:36 +01:00
Christoph Oelckers
b7e8815133 - some further lightening of compat.h. 2021-03-24 21:13:36 +01:00
Christoph Oelckers
8993095bc0 - got rid of pow2char 2021-03-24 20:37:20 +01:00
Christoph Oelckers
d8627a2b3f - removed all remains of projection math weirdness from the automap code in the games plus a bit more cleanup of the engine code. 2021-03-24 20:28:58 +01:00
Christoph Oelckers
022edd2dc2 - cleaned engine.cpp off all code exclusive to the Polymost renderer. 2021-03-24 19:45:42 +01:00
Christoph Oelckers
0c7f05a416 - let the clipper work exclusively on Build coordinates. 2021-03-22 23:40:25 +01:00
Christoph Oelckers
63f057d93f - portal and sky WIP. 2021-03-21 22:48:01 +01:00
Christoph Oelckers
09a9e14feb - set up engine portals for SW.
Also moving more code to _polymost.cpp which is only needed for ad-hoc lookup of portals with a client side implementation of a two-layer renderer.
2021-03-21 17:04:06 +01:00
Christoph Oelckers
a36377111c - engine-side portal setup for Blood and RRRA. 2021-03-21 14:48:35 +01:00
Christoph Oelckers
b91441f849 - same render interface rework for Shadow Warrior. 2021-03-21 12:22:50 +01:00
Christoph Oelckers
d42ce0ee7e - WIP 2021-03-20 23:01:16 +01:00
Christoph Oelckers
f30a568858 - moved wallfront function into polymost.cpp.
This was one of the few functions left in engine.cpp that accesses the global scene state.
2021-03-20 19:10:46 +01:00
Christoph Oelckers
91957e40f1 - moved some original Raze code out if the Build folder. 2021-03-20 17:08:55 +01:00
Christoph Oelckers
fedfc2cfa4 - removed global variables that were only being used by the automap drawer plus a few other obsolete things. 2021-03-20 16:46:06 +01:00
Christoph Oelckers
30f4e2b29d - replaced the engine automap drawer with one leveraging the newly added sector geometry data.
This eliminates a lot of code depending on Build's projection math.
2021-03-20 16:20:48 +01:00
Christoph Oelckers
3df5c440f9 - added some helpers to make it easier to determine if a sector's geometry has been altered.
Walls had no sector reference so this was added for marking the sector as altered when a vertex gets dragged around.
2021-03-19 23:18:09 +01:00
Christoph Oelckers
a5b3a1dd3e - removed some unused things from engine.cpp. 2021-03-19 15:12:54 +01:00
Christoph Oelckers
76682c72e3 - removed krecipasm.
Analyzing the results, this is not needed as its precision is virtually the same as floating point math, so its one use got replaced.
2021-03-19 14:23:41 +01:00
Christoph Oelckers
547ed4e415 - route everything through the full backend, now completely bypassing the intermediate GLInstance layer. 2021-03-18 17:18:03 +01:00
Christoph Oelckers
4cf2493cfd set up the entry point for the renderer. 2021-03-18 14:49:36 +01:00
Christoph Oelckers
e9dd1c104b - started adding the draw list code from GZDoom. 2021-03-18 10:19:13 +01:00
Christoph Oelckers
2d958745b4 - fixed: Polymost must set the viewpoint if renderers are switched.
- fixed coordinate order in renderSetViewpoint
- fixed backwall checks accidentally testing wall 0 instead of the current wall.
2021-03-18 00:28:38 +01:00
Christoph Oelckers
65097c4098 - set proper visibility factor and viewport. 2021-03-17 19:07:00 +01:00
Christoph Oelckers
b492cbcebb - ported my old Build-style renderer for Doom from 2008 and the wall renderer from GZDoom to work with Build data.
It renders walls, but y-panning is still broken.
2021-03-17 16:54:36 +01:00
Christoph Oelckers
9ebd8fd4a5 - put all of Polymost in a namespace.
So that its static variables are properly separated from the rest.
2021-03-17 15:55:25 +01:00
Christoph Oelckers
a484e39e05 - removed integer square root code.
On modern systems using the sqrt function with a cast to int has no relevant performance disadvantage anymore so there's no need for all of this.
2021-03-15 19:02:08 +01:00
Christoph Oelckers
ac82838859 - removed unused 'wallvisible' function. 2021-03-15 18:58:14 +01:00
Christoph Oelckers
8aa59f2385 - use clamp instead of bit masking to handle out of range interpolation factors for models. 2021-03-15 11:35:39 +01:00
Christoph Oelckers
ad8654ed06 - fixed maphack loader.
The duplicate 'currentSprite' variable prevented it from doing anything.
Also cleaned up the interface a bit to avoid using a global variable for parameter passing.

Fixes #279
2021-03-07 09:39:16 +01:00
Christoph Oelckers
bbd5c0ac8b - transitioned voxel rendering to use the backend's implementation. 2021-03-02 17:10:34 +01:00
Christoph Oelckers
2094b6420f - use local screen size variables in automap code. 2021-02-27 12:30:20 +01:00
Christoph Oelckers
783328c5fa - removed some unused declarations. 2021-02-27 12:29:07 +01:00
Christoph Oelckers
99f1f0952a - little bit of engine cleanup. 2021-02-25 12:16:21 +01:00
Christoph Oelckers
cf672b508f - removed unused 'updatesectorexclude' function. 2021-02-02 23:13:40 +01:00
Christoph Oelckers
c342594691 - Exhumed: fixed wall scrollers. 2021-01-14 23:55:45 +01:00
Mitchell Richters
07a43c572e - Build: Extend spritetype struct with interpolation variables and numerous methods to do with pos, angle and interpolation of such. 2021-01-06 06:22:27 +11:00
Mitchell Richters
5124c0daec - Amalgamate ksgn and sgn into Sgn in cmdlib.h, and remove pragmas.h. 2021-01-05 07:31:37 +11:00
Mitchell Richters
b36bea7c69 - Replace scale() calls with Scale() from common. 2021-01-05 07:31:34 +11:00
Mitchell Richters
3c5d553456 - Move krecipasm() from pragmas.h into polymost.cpp. 2021-01-05 07:31:30 +11:00
Mitchell Richters
d460f048fa - Remove klabs() define and replace with abs(). 2021-01-05 07:31:28 +11:00
Mitchell Richters
b9c2af130a - Replace divscale() calls with DivScale() from common. 2021-01-05 07:31:26 +11:00
Mitchell Richters
868aa7f07a - Replace mulscale() calls with MulScale() from common. 2021-01-05 07:31:24 +11:00
Mitchell Richters
b5aac8723f - Replace dmulscale() calls with DMulScale() from common. 2021-01-05 07:31:22 +11:00
Mitchell Richters
aae175f287 - Replace divscale##() calls with MulScale() from common.
* Regex for reference: divscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:20 +11:00
Mitchell Richters
f20daa2595 - Replace divscale64() calls with DivScaleU() from common. 2021-01-05 07:31:17 +11:00
Mitchell Richters
2396179dfc - Replace mulscale##() calls with MulScale() from common.
* Regex for reference: mulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:15 +11:00
Mitchell Richters
8cf2588bad - Replace fmulscale##() calls with MulScaleF() from common.
* Regex for reference: fmulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:13 +11:00
Mitchell Richters
7d9f868e4c - Replace dmulscale##() calls with DMulScale() from common.
* Regex for reference: dmulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:10 +11:00
Mitchell Richters
8f75f06efd - Replace tmulscale##() calls with TMulScale() from common. 2021-01-05 07:31:08 +11:00
Mitchell Richters
b191a482d6 - Remove hw_detailmapping and hw_glowmapping since they're no longer relevant with GZDoom's backend (they're always in an on state). 2021-01-03 21:39:21 +11:00
Mitchell Richters
d3b95d4d70 - Build/Duke: Remove the only use case for drawrooms() inline wrapper and change getcamspriteang() to return binangle instead of a build angle. 2021-01-03 17:35:19 +11:00
Christoph Oelckers
0f8e73ce77 - inlined calc_globalshifts to get rid of two global variables. 2020-12-30 09:55:57 +01:00
Christoph Oelckers
1a2b93f402 - fixed sky panning in Duke.
This needs to take the composite texture into account because panning in Build is based on tile size, not map dimension.
It was also redone to use floating point to get rid of the horrible precision of the scrolling effect.
2020-12-06 20:49:32 +01:00
Mitchell Richters
1e8fe482f3 - Duke: Partially address excessively fast sky in E4L1 as reported in #217.
* Before d545eb7aa9, `moveclouds()` simply set `ceilingxpanning`/`ceilingypanning`. Afterwards, it was accumulating with every passing loop.
* Despite fixing this, still seems a bit fast.
2020-12-06 23:51:20 +11:00
Christoph Oelckers
d04013066c - build a composite texture of all the segments for sky rendering to reduce the seams between the single segments. 2020-12-04 22:29:25 +01:00
Christoph Oelckers
396e3cd524 - actually call the model animation timer somewhere.
Now models also animate properly. :)
2020-12-02 00:19:22 +01:00
Christoph Oelckers
25ef58f897 - re-enabled all model specific code in Duke's animatesprites function and removed some remaining software renderer-only code in the engine. 2020-12-01 23:57:39 +01:00
Christoph Oelckers
9a507e5d0a - fixed model rendering.
(What a stupid mistake... :?)

Model animations still do not work as intended, though.
2020-12-01 22:03:20 +01:00
Christoph Oelckers
2cd3927613 - use floats for wall panning offsets. 2020-11-26 18:32:35 +01:00
Christoph Oelckers
d545eb7aa9 - make sector panning variables floats and added some convenience wrappers. 2020-11-26 18:32:35 +01:00
Christoph Oelckers
9a4073508d - Blood: Savegame fully transitioned to JSON
not tested yet.
2020-11-23 09:53:58 +01:00
Christoph Oelckers
169d708547 - removed all remaining uses of tilesiz. 2020-11-23 08:55:02 +01:00
Christoph Oelckers
d60bc8be9f - replaced all remaining uses of tilesiz[].y 2020-11-23 08:39:49 +01:00
Christoph Oelckers
bbf1352db1 - replaced approx 1/3 of all accesses to the tilesiz wrapper class. 2020-11-23 00:18:30 +01:00
Mitchell Richters
0190a98a10 - Remove calcSinTableValue() inline function and clean up use of PI/fPI and BANG2RAD #defines. 2020-11-22 21:18:10 +01:00
Mitchell Richters
32a1796728 - buildutils: Replace sintable[] use within Build with bsin()/bcos(), using bsinf()/bcosf() where appropriate.
* Includes a few header include shuffles to make it all come together.
2020-11-22 21:18:02 +01:00
Christoph Oelckers
5f54eac297 - made palette loader part of the game interface.
This gets rid of the Blood 'replace' hook for thus.
2020-11-21 12:54:09 +01:00
Christoph Oelckers
b97f12a2eb - did some global search & replace to reduce the number of accesses to the tilesiz wrapper. 2020-11-20 08:18:26 +01:00
Christoph Oelckers
873f4d7c0c - link hires replacements to textures instead of tile numbers.
This is needed to connect them to fonts as well because its glyphs have no tile index.
2020-11-10 20:12:46 +01:00
Christoph Oelckers
ed599d0f05 - moved the hires texture replacement logic into a backend callback.
This way it can be handled transparently to the calling code.
Fonts do not work yet, though.
2020-11-10 16:22:02 +01:00
Christoph Oelckers
601680d08e - moved widthBits and heightBits into engine.
These functions will go away with the rest of the renderer when the time comes, so this is the right place.
2020-11-09 20:56:28 +01:00
Christoph Oelckers
7621d3e105 - removed redundant dosetaspect function.
This was software rendering only.
2020-11-04 22:30:11 +01:00
Christoph Oelckers
a5b3681630 - foundation for a better collision info management.
The way this is handled is the main reason why Build maps are size limited, but since it is extremely invasive it needs to be taken out of the game code piece by piece, this is the framework for doing this for Duke.
2020-10-24 09:31:15 +02:00
Christoph Oelckers
78afb67c7f - setup for Duke actor data transition to something more scripting friendly.
The main problem here is that there's two data arrays representing an actor - sprite and hittype and the engine only uses indices for reference.
By setting up hittype to contain a sprite reference, the function and iterator interface can be rewritten to use a single pointer instead to represent an actor.
The main objective is to reduce the number of accesses to the global arrays which constitute the biggest refactoring blocker.
2020-10-21 16:31:17 +02:00
Christoph Oelckers
08e29396e5 - split moveweapons_d further up into more smaller parts. 2020-10-18 09:45:41 +02:00
Christoph Oelckers
4f7c0b696c - and finally the iterators in the backend. 2020-10-15 20:22:40 +02:00
Christoph Oelckers
eb78b88598 - all Blood stat iterators ported. 2020-10-15 20:22:39 +02:00
Christoph Oelckers
0a0a995cbd - some cleanup of build.h 2020-10-15 20:22:38 +02:00
Christoph Oelckers
be3292d29b - removed the mostly unused macros for sprite iteration. 2020-10-15 20:22:38 +02:00
Christoph Oelckers
760a557f73 - converted the remaining sector iterators in Duke. 2020-10-15 01:34:27 +02:00
Christoph Oelckers
91fdf160b6 - fixed clearing of actorinfo.
It overwrote memory beyond its end.
2020-10-15 01:34:24 +02:00
Christoph Oelckers
d368d734d3 - prototyping some refactoring helpers. 2020-10-14 00:58:21 +02:00
Christoph Oelckers
b6149f88f7 - added sprite iterator classes.
The code base currently contains roughly 600 iterator loops directly referencing Build's global variables.
That state of things is not refactorable - these iterator wrappers are supposed to get rid of these explicit references.
2020-10-14 00:05:25 +02:00
Christoph Oelckers
99b4a64a67 - removed the PSPTwoDSetter
This is no longer needed because all weapon drawing is using the proper interface now.
2020-10-13 21:38:24 +02:00
Christoph Oelckers
817fa8aba3 - save the entire engine state as JSON.
The sprite lists may still need optimization. Due to different handling between Blood and the core engine they need to be written out completely which is quite wasteful.
2020-10-13 20:18:08 +02:00
Christoph Oelckers
b4a011300a - implemented proper delta serialization for sectors and walls. 2020-10-11 21:11:38 +02:00
Christoph Oelckers
f12c6b0319 - removed wallext because its only member 'blend' is not used by anything.
This is a feature not worth preserving, render style + alpha should be done directly, not via indirect lookup tables.
2020-10-11 18:44:16 +02:00
Christoph Oelckers
fd31da3115 - save sectors and walls as JSON
This is not optimized yet so saves are a bit larger than necessary.
2020-10-11 18:10:52 +02:00
Christoph Oelckers
fe2e96d3a6 Merge branch 'master' into InputContinuation
# Conflicts:
#	source/games/duke/src/duke3d.h
2020-10-10 21:39:27 +02:00
Christoph Oelckers
e95fea1056 - fixed: Toggling palette emulation should reset the texture filter in the samplers. 2020-10-10 18:57:16 +02:00
Mitchell Richters
90e711464a - clamp(): Remove definition in compat.h and uplift definition in templates.h. 2020-10-07 13:29:00 +11:00
Mitchell Richters
09a05f354c - Re-standardise horizon around 0 and not 100.
* Blood had this right. It makes sense that the horizon be based around as it's easier to work with.
* Removed all associated game math to deduct default horizon of 100 when doing weapon zvel etc, meaning actual horizon can just be used.
* Re-did return to center function to work on the already converted pitch. Return speed should be 1:1 with previous code.
2020-10-07 13:28:45 +11:00
Christoph Oelckers
82612a1330 - it compiles again (with lots of code commented out.) 2020-10-04 20:11:02 +02:00
Christoph Oelckers
7661720585 - fixed Blood map loading
Whoever designed that map format with its idiotic encryption should burn in Hell >)
It's a needless complication and open invitation for errors.
To avoid follow up problems it now uses its own local struct for loading in the sprites and the global spritetype no longer depends on any map format and can be changed as the need arises.

Fixes #101
2020-10-03 18:35:47 +02:00
Christoph Oelckers
89d5d18b9e - these parts were missed somehow. 2020-10-02 22:42:54 +02:00
Christoph Oelckers
4e67197838 - added back the hijacked 'detail' member to spritetype.
This changes the Blood map loader to not use the in-game sprite structure for loading a level and moves the qsprite_filler array back into the sprite.
2020-10-02 22:18:08 +02:00
Christoph Oelckers
1e63341c4d - fixed inverted checks for texture clamping. 2020-09-25 23:42:53 +02:00
Christoph Oelckers
3344e73fed - fixed some crashes in the .def parser and texture initialization code. 2020-09-25 20:51:02 +02:00
Christoph Oelckers
5a76dce5f8 - reinstated setuptile.
Apparently this is needed by some hires packs to fudge the sprite offsets.
Fortunately, setting sprite offsets is the only thing this was ever used for so it's relatively uninvasive.
2020-09-23 18:18:22 +02:00
Christoph Oelckers
5e6317b8b9 Merge remote-tracking branch 'remotes/Github_private/Blood_InputReworking' 2020-09-22 23:32:28 +02:00
Christoph Oelckers
2a2209b085 - cleanup and minor fixes. 2020-09-22 23:07:11 +02:00
Christoph Oelckers
d6bf4306eb - simplified the parser for blend modes 2020-09-22 23:05:43 +02:00
Christoph Oelckers
ec0e2be607 - better error message 2020-09-22 23:05:00 +02:00
Christoph Oelckers
880b811e0d - rewrote map loader to work independently of data structure sizes.
This is needed to extend a few fields that are too narrow - e.g. the texture offset fields have no room for interpolating scrolling textures.
Blood not done yet, will also need to be changed to get rid of the limits.
2020-09-22 22:40:53 +02:00
Christoph Oelckers
43a9be0ad0 - removed Blood's loadboard replacement hook.
It never calls engineLoadBoard but always its own map loading function directly.
2020-09-22 22:38:08 +02:00
Mitchell Richters
fdbc4d0e67 - Build: Fix precision loss when calculating an angle in renderPrepareMirror(). 2020-09-22 23:12:31 +10:00
Mitchell Richters
7bb3ab8188 - Build: Remove unused inline function in-case it accidentally gets used... 2020-09-22 23:01:45 +10:00
Mitchell Richters
d40a2d3e95 Merge branch 'back_to_basics2' into Blood_InputReworking
# Conflicts:
#	source/blood/src/hudsprites.cpp
#	source/exhumed/src/status.cpp
#	source/games/duke/src/game_misc.cpp
#	source/sw/src/draw.cpp
2020-09-22 07:34:39 +10:00
Mitchell Richters
bdc53ed7b0 - Exhumed: Standardise horizon on 100 and remove backend extern'd polymostcenterhoriz variable. 2020-09-21 18:41:56 +10:00
Christoph Oelckers
78be8f866b - always use the containing sector's fog when rendering sprites.
This is for consistency, otherwise sprites with a palette translation would stand out. Also use shade dependent fog density instead of a single global value.
Currently this only has an effect in true color rendering mode.
2020-09-20 20:39:11 +02:00
Christoph Oelckers
6776508239 - widescreen asset setup and consolidation of .def file loading. 2020-09-16 19:13:06 +02:00
Christoph Oelckers
5c777eeb38 - moved implementation of 'animtilerange' into buildtiles.cpp. 2020-09-16 19:13:05 +02:00
Christoph Oelckers
616838dd0a - little bit of cleanup on tileImport. 2020-09-16 19:13:05 +02:00
Christoph Oelckers
bc5d3eea88 - split the worker part for tileImportTexture out of the parser. 2020-09-15 01:21:17 +02:00
Christoph Oelckers
09a6534270 - redid scriptfile as a wrapper around FScanner
Another piece of Build licensed code gone, yay!
This will also allow gradual conversion of the DEF parser to our own code, unencumbered by the Build license. :)
2020-09-15 00:11:08 +02:00
Christoph Oelckers
e382690f9c - migrated defs error reporting to FScriptPosition
This not only prints better formatted texts, it also takes a lot of script maintenance out of the code.
2020-09-14 22:55:21 +02:00
Christoph Oelckers
8a7502c00d - I wish, MSVC flagged struct params to variadic functions properly…
XCode reported these as errors.
2020-09-14 22:44:21 +02:00
Christoph Oelckers
7395110ae9 - replaced brace loop condition in def parser with an inline 2020-09-14 00:19:20 +02:00
Christoph Oelckers
fe329b0870 - fixed voxel rendering in palette emulation mode. 2020-09-13 21:08:10 +02:00
Christoph Oelckers
aeeec61f39 - fixed light level setup in palette emulation mode. 2020-09-13 20:48:54 +02:00
Christoph Oelckers
0e58203d92 - fixed rintersect and removed some unused bits from engine.cpp. 2020-09-13 20:15:46 +02:00
Christoph Oelckers
a4754d7f34 - rewrote the map hack parser using sc_man.
This unexpectedly turned out a complete rewrite so now it is under my own license.
Also moved the remaining parts of map hack loading into the engine.

Overall I have to say that the feature is not what I expected, it's merely used to fudge the positioning of model sprites and for adding Polymer lights.
2020-09-13 13:01:44 +02:00
Christoph Oelckers
8ca0e9b97a - avoid using naked pointer for script positioning. 2020-09-13 11:28:32 +02:00
Christoph Oelckers
57a9419f8e - use FString for returning strings from the script parser.
This is mainly a preparation for merging the parser into sc_man, because sc_man does not keep token texts in a static variable.
This commit also fixes a handful of places that were flagged by the stricter conversion rules of FString.
2020-09-13 10:29:57 +02:00
Christoph Oelckers
aac87fc2cf - another unused function. 2020-09-13 09:45:37 +02:00
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
Christoph Oelckers
fbdc6c7a6c - removed dead Polymer handling in model code. 2020-08-16 09:36:32 +02:00
Christoph Oelckers
3f9cc1412c - transitioning helper for screen jobs. 2020-08-15 10:55:21 +02:00
Christoph Oelckers
3455610031 - base palette cleanup.
Avoid passing this anywhere in the client code. It should only be set right before rendering the 3D view and the only code using the base palette should be the 3D renderer and hud_drawsprite.
Also make the palette override CVARs 3D view only in debug mode.
2020-08-14 21:18:14 +02:00
Christoph Oelckers
249c5b5734 - removed some dead code. 2020-08-14 21:12:32 +02:00
Christoph Oelckers
66cb7f61a4 - fixed rendering on narrow screens with an aspect ratio less than 4:3 and removed some parts that are no longer needed. 2020-08-14 21:01:27 +02:00
Christoph Oelckers
9c40c2f6af - don't draw screenblends when not in a 3D view.
Fixed #174.
2020-08-12 22:52:41 +02:00
Christoph Oelckers
4fef66c78a - SW script parser cleanup 2020-08-05 22:36:37 +02:00
Mitchell Richters
8817914744 - add printcoords as an ADD_STAT() define and move string code into static function for shared use between CCMD and ADD_STAT. 2020-08-04 21:56:32 +10:00
Mitchell Richters
38fa10326d - create engine CCMD printcoords. 2020-08-04 17:53:31 +10: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
6a305748ff - removed some C cruft from compat.h. 2020-08-02 21:25:03 +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
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
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
Christoph Oelckers
b6cb0ce1a1 - consolidated shade to light conversion 2020-07-31 20:58:55 +02:00
Christoph Oelckers
3bcef7d587 - disable transparency testing, unless explicitly requested.
Fixes #60
2020-07-28 21:28:10 +02:00
Christoph Oelckers
74c4bbc0e0 - preparations for refactoring Blood's HUD drawer, mainly to pass the palette explicitly to the drawers. 2020-07-27 23:29:10 +02:00
Christoph Oelckers
b2f794bde5 - cache QAVs outside the file system as well.
- delete some voxel code that's software rendering only.
- apply Big Endian byte swapping for SFXs, as well, now that this no longer involves hacking the file system cache.
2020-07-27 19:37:02 +02:00
Christoph Oelckers
be9094cb97 Silenced lots of warnings pointed out by XCode. 2020-07-23 17:02:59 +02: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
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
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
866be28da0 - clear the input state when starting a new map or loading a savegame. 2020-07-15 09:21:47 +02:00
Christoph Oelckers
2fd2ad2212 - sky code cleanup and transitioning of Duke's. 2020-07-15 00:06:19 +02:00
Christoph Oelckers
1e9679aceb - removed faketimerhandler and the last static remains of EDuke's netcode. 2020-07-14 21:15:37 +02:00
Christoph Oelckers
af225abf80 ... 2020-07-14 21:05:26 +02:00
Christoph Oelckers
05abc262ba - removed libdivide for good and the unused C++ wrapper for fix16 along with it. 2020-07-14 20:57:42 +02:00
Christoph Oelckers
3cd475570c - fixing problems. 2020-07-14 20:39:48 +02:00
Christoph Oelckers
424716bb88 - say goodbye to libdivide! 2020-07-14 20:21:16 +02:00
Christoph Oelckers
2f3d405f8b - moved getatoken to scriptfile.cpp so common.cpp could be removed. 2020-07-14 19:51:54 +02:00
Christoph Oelckers
f9c03760a3 - removed setuptile DEF command due to the hacky implementation and general uselessness of what can be done with it. 2020-07-14 17:47:11 +02:00
Christoph Oelckers
fedeec73c7 - cleaned out some unused parts of engine.cpp 2020-07-14 17:35:19 +02:00
Christoph Oelckers
5655015691 - YAX is also gone now. 2020-07-14 16:06:14 +02:00
Christoph Oelckers
1d9d1396ac - got rid of print.h (a.k.a. 'how not do design a text formatting library'.) 2020-07-14 15:41:19 +02:00
Christoph Oelckers
117e78cb3b - removed clipshape feature as it is a feature of modern EDuke32 maps only. 2020-07-14 15:36:25 +02:00
Christoph Oelckers
aa01adb2f1 - removed osd.h as it was merely a minimal wrapper around c_dispatch, giving some alias names.
Nothing that's needed when cutting ties to upstream.
2020-07-14 14:00:27 +02:00
Christoph Oelckers
2e05ff532b - got rid of the struct trackers.
They were only used for handling an undefined case in the renderer but the overhead and side effects were too severe.
2020-07-14 13:51:03 +02:00
Christoph Oelckers
7e261425bb - time to get rid of clockticks.hpp.
Aside from its non-existent license it was also not the correct way to handle more precise view interpolation.
2020-07-14 13:00:52 +02:00
Christoph Oelckers
481ac965cf - reverted ClockTicks to an integer so that interpolation can be reimplemented without it affecting the global game timer.
The entire method at use here is essentially not correct. Interpolation should be handled independently of the game timer directly based on the underlying clock, like in ZDoom.
There's interpolation bugs in the Build games that cannot be fixed if totalclock is used for it, but if we use something else we do not need a fractional totalclock.
2020-07-14 11:52:38 +02:00
Christoph Oelckers
6b86d7606f - safety commit - does not compile! 2020-07-07 13:19:09 +02:00
Christoph Oelckers
f2380f8829 - constant cleanup. 2020-07-06 13:26:26 +02:00
Christoph Oelckers
cfe1e531c5 - activated the newly added render code and deleted the old one. 2020-07-05 21:21:39 +02:00
Christoph Oelckers
8a1206edbc Merge remote-tracking branch 'remotes/origin/master' into back_to_basics2 2020-07-05 11:55:41 +02:00
Mitchell Richters
bbacc9e816 - factor in xdimenscale and viewingrangerecip when calculating renderSetVisibility().
* Changes performed in 0bd460d9e3 didn't take into account xdimenscale and viewingrangerecip like the days of old and this wasn't picked up in d80a32d379 or d80a32d379, where the applied fixes only appeared to work because they worked for me at 2560x1440p.
2020-07-03 14:42:41 +02:00
Christoph Oelckers
c09b4896a6 - made RR summary screens work. 2020-07-01 22:14:11 +02:00
Christoph Oelckers
fc017f5868 - removed unused editwall variable. 2020-06-26 20:28:57 +02:00
Christoph Oelckers
e146e73345 - consolidated the 'music' parsing in Defs (pending a refactor of the MAPINFO system.)
- removed the remaining parts of the game Defs parser because we do not want anything EDuke in here.
2020-06-24 00:40:22 +02:00
Mitchell Richters
291475eeb5 - simplify visibility calculation from changes performed in d80a32d379.
* Achieves the exact same result in a cleaner fashion.
2020-06-23 14:16:42 +02:00
Christoph Oelckers
56834dee6b - 2D animation fix. 2020-06-22 00:27:11 +02:00
Christoph Oelckers
4c00e4cf7c - got rid of the old precaching code.
# Conflicts:
#	source/games/duke/src/zz_premap.cpp
2020-06-22 00:07:25 +02:00
Christoph Oelckers
ed9b418db7 - deleted a bit more unused code.
# Conflicts:
#	source/games/duke/src/zz_config.cpp
2020-06-22 00:06:34 +02:00
Christoph Oelckers
e3153f143d hudweapon
# Conflicts:
#	source/build/src/engine.cpp
2020-06-22 00:05:07 +02:00
Christoph Oelckers
990cb2acb8 -'shoot' replaced.
# Conflicts:
#	source/build/src/palette.cpp
2020-06-21 23:24:49 +02:00
Christoph Oelckers
f56a8360b0 - spawnglass functions and fta_sounds. 2020-06-21 23:23:21 +02:00
Christoph Oelckers
18d6a8e65d - another safety commit.
# Conflicts:
#	source/games/duke/src/zz_actors.cpp
2020-06-21 23:07:42 +02:00
Christoph Oelckers
e007b9bceb - safety commit 2020-06-21 23:07:41 +02:00
Christoph Oelckers
15c744f3da - movement code of the VM transitioned 2020-06-21 23:07:41 +02:00
Christoph Oelckers
577a800843 - the rest of sector.cpp, except for the input function. 2020-06-21 22:40:12 +02:00
Christoph Oelckers
92f5236b24 - more sector stuff. 2020-06-21 22:40:12 +02:00
Christoph Oelckers
c8cb0e4efd - the beginning of sector.cpp
The math backend functions have been moved out of Build because they originally have a good license.

# Conflicts:
#	source/build/src/mdsprite.cpp
#	source/build/src/polymost.cpp
2020-06-21 22:39:05 +02:00
Christoph Oelckers
8cc273955d - moveeffectors, actors.c complete. 2020-06-21 22:38:04 +02:00
Christoph Oelckers
7b75a0683a moveactors plus backing code. 2020-06-21 22:37:29 +02:00
Christoph Oelckers
89e555761d - guts and moves 2020-06-21 22:36:09 +02:00
Christoph Oelckers
c11963b41a - movesprite 2020-06-21 22:36:08 +02:00
Mitchell Richters
d80a32d379 - fix render visibility calculation following changes in 0bd460d9e3.
* Output from PrintVis() in 9dfd3ddd02 showed resulting global visibility as 0.078125.
* Following 0bd460d9e3, resulting global visibility shown as 0.041667.
* Scaling g_visibility by (8.f / 15.f) (0.533333) restores resulting global visibility to 0.078125.
2020-06-21 10:12:54 +02:00
Mitchell Richters
3325ef272e - make r_ambientlight work globally for all games by performing adjustment engine-side. 2020-06-21 10:12:54 +02:00
Christoph Oelckers
1bb7da173a - removed a few more dependencies on Build includes. 2020-06-20 18:17:49 +02:00
Christoph Oelckers
686999381b - moved non-Build definitions out of baselayer.h. 2020-06-20 17:52:10 +02:00
Christoph Oelckers
15d869ccde -moved scancodes.h out of Build folder.
This file is from the Duke source and available under a good license so it can be moved to a better place.
2020-06-20 12:54:33 +02:00
Christoph Oelckers
198ed45357 - clean up redundancy 2020-06-20 10:58:47 +02:00