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