Commit graph

4687 commits

Author SHA1 Message Date
Christoph Oelckers
b15cc31a38 - transitioned matrix setup to use the backend's uniform buffer implementation. 2020-06-04 20:14:48 +02:00
Christoph Oelckers
40f085adea - draw fullscreen blends with the 2D drawer.
Removing one special case of render setup. Now all 2D content is done by the same code.
2020-06-04 18:54:10 +02:00
Christoph Oelckers
cf6855904d - took projection and view matrix out of the render state.
This is a preparation to migrate to GZDoom's HWViewpointUniforms buffer.
2020-06-04 18:46:44 +02:00
Christoph Oelckers
8216d31568 - fixed default for 'modern' in GameStartupInfo.
It shouldn't force 1.5 compatibility but enable the CVAR.
2020-06-02 16:59:21 +02:00
Christoph Oelckers
7638ead1c8 - simplified the texture sampler setup.
DAMETH_CLAMPED was redundant and only causig problems.
2020-06-02 16:55:02 +02:00
Christoph Oelckers
1b12c08c66 - backend sync 2020-06-02 11:48:48 +02:00
Christoph Oelckers
080333311c - removed polymost_dorotatespritemodel.
Models are inoperable right now anyway so this would never get called, but it does a few things that would cause problems with refactoring the backend code.
2020-06-01 11:28:07 +02:00
Christoph Oelckers
350acd2ac3 - scale the vertex coordinates that get output to the hardware by 1024.
This is needed to get a coordinate system that is compatible with GZDoom's so that its lighting code can be reused more easily.
2020-06-01 09:55:28 +02:00
Christoph Oelckers
68c97e3c25 Merge branch 'master' of https://github.com/coelckers/Raze
# Conflicts:
#	source/core/gamecontrol.h
#	source/duke3d/src/game.cpp
#	source/exhumed/src/exhumed.cpp
#	source/rr/src/game.cpp
2020-05-31 23:30:10 +02:00
Mitchell Richters
f6068043d3 - Remove 'int paused' accidentally added to music.cpp in common back-end. 2020-05-31 23:19:54 +02:00
Mitchell Richters
daa862240d Blood: Amend how game pauses. 2020-05-31 23:19:54 +02:00
Mitchell Richters
ce48f081fc Exhumed: Amend how game pauses. 2020-05-31 23:19:54 +02:00
Mitchell Richters
33b6b85d57 SW: Amend how game pauses.
- Pausing game with Pause key now works again.
2020-05-31 23:19:54 +02:00
Mitchell Richters
b86d499e0b RR: Amend how game pauses.
- M_Active or GUICapture properly pause game using game's pause mechanisms.
- Pausing game with Pause key now works again.
- Pausing game with Pause key now properly stops all sounds as per upstream.
2020-05-31 23:19:54 +02:00
Mitchell Richters
65265594e5 Duke3D: Amend how game pauses.
- M_Active or GUICapture properly pause game using game's pause mechanisms.
- Pausing game with Pause key now works again.
- Pausing game with Pause key now properly stops all sounds as per upstream.
2020-05-31 23:19:54 +02:00
Mitchell Richters
7ed9f4fa8c Prepare back-end for updated in-game pausing. 2020-05-31 23:19:54 +02:00
Christoph Oelckers
783dff41b6 - fixed clamp mode setup. 2020-05-31 23:08:56 +02:00
Christoph Oelckers
ab2686db34 - camtex transition 2020-05-31 21:43:32 +02:00
Christoph Oelckers
c26b6cdf59 - backend sync with GZDoom. 2020-05-31 21:25:52 +02:00
Christoph Oelckers
bd0c8acd46 - replaced detail matrix with a two element scale vector because that is all that is needed. 2020-05-31 12:23:35 +02:00
Christoph Oelckers
d752e33909 - removed the unused SurfaceShader class. 2020-05-31 11:47:19 +02:00
Christoph Oelckers
9ec66bafa1 - backend update.
# Conflicts:
#	source/common/textures/animtexture.cpp

# Conflicts:
#	source/common/2d/v_2ddrawer.cpp
#	source/common/textures/multipatchtexturebuilder.cpp
2020-05-31 10:57:41 +02:00
Christoph Oelckers
611dad7f69 - added the softpoly and Vulkan backend code fron GZDoom.
Not hooked up yet.
2020-05-31 10:53:11 +02:00
Christoph Oelckers
2841154683 - moved code around, got a few more utilities from GZDoom. 2020-05-31 10:37:19 +02:00
Christoph Oelckers
1d15fe63a6 - another backend update, pulling in the sky renderer. 2020-05-31 10:32:10 +02:00
Christoph Oelckers
efa1cd3048 - moved video files to 'common'.
# Conflicts:
#	source/blood/src/screen.cpp
2020-05-31 09:19:16 +02:00
Christoph Oelckers
1e2a3da5fd - video base code unified.
# Conflicts:
#	source/core/rendering/v_video.cpp
2020-05-31 09:18:43 +02:00
Christoph Oelckers
edb2cb31ee - backend update with GZDoom model code. 2020-05-31 08:55:00 +02:00
Christoph Oelckers
7e5c3e066c - fixed compilation 2020-05-30 23:45:47 +02:00
Richard C. Gobeille
47df8ed855 Duke3d: remove extraneous call to videoNextPage() when handling savegames initiated from CON
# Conflicts:
#	source/duke3d/src/game.cpp
2020-05-30 23:39:03 +02:00
Richard C. Gobeille
94eda45df9 Duke3d: improve nextsectorneighborz() return value checks
Improves the messages printed to console when bailing out of sector effect processing due to nextsectorneighborz() returning -1. This also adds such a check to ST_21_FLOOR_DOOR, which was missing it entirely. (!!)

# Conflicts:
#	source/duke3d/src/sector.cpp
2020-05-30 23:38:08 +02:00
sirlemonhead
86f2a7a578 PCExhumed: MoveSector() updates player position variables. Fixes #366 2020-05-30 23:34:26 +02:00
nukeykt
714ed1ecdd Engine: fix sprite sorting issue that caused broken voxel rendering in polymost 2020-05-30 23:28:41 +02:00
NY00123
8a812cc329 SW: Call OSD_DisplayQueued in DemoPlayback,
so OSD commands can have an effect from here
2020-05-30 23:28:24 +02:00
NY00123
9bf5ee046e SW: Remove TitleLevel (probably dating back to 1995 prototype builds)
# Conflicts:
#	source/sw/src/game.cpp
2020-05-30 23:28:24 +02:00
NY00123
6aeb366a93 SW: Remove DemoOverride, ScenePlayBack and SceneLevel
# Conflicts:
#	source/sw/src/demo.cpp
#	source/sw/src/game.cpp
2020-05-30 23:28:04 +02:00
NY00123
6920ef8fc3 SW - interpso.cpp: Imperfect hack for jittery coolies in level 1's train
(with SO interpolation turned on). It would be nicer to have something
better structured than the given hack, but this currently seems to work,
while not breaking the sprites on the boat in the beginning of level 5.
2020-05-30 23:27:18 +02:00
NY00123
217bf454f4 sw/src/interpso.cpp:so_dointerpolations:
Move ratio calculation out of inner loop.
2020-05-30 23:27:18 +02:00
Christoph Oelckers
5728241c1c - updated backend from GZDoom. 2020-05-30 23:10:17 +02:00
Christoph Oelckers
88eea8269a - set proper palette for null translation. 2020-05-30 22:35:21 +02:00
Christoph Oelckers
ea08fa0a4e - updated common code.
Most of what got added is still unused.

# Conflicts:
#	source/build/src/palette.cpp

# Conflicts:
#	source/build/src/palette.cpp

# Conflicts:
#	source/common/engine/i_interface.h
2020-05-30 22:28:24 +02:00
Christoph Oelckers
82eb807090 - activate the texture layers if needed. 2020-05-30 22:27:59 +02:00
Christoph Oelckers
00f1043047 - remember custom tile type. 2020-05-30 22:20:53 +02:00
Christoph Oelckers
58c62e071c - use FMaterial. 2020-05-30 22:20:06 +02:00
Christoph Oelckers
423f758314 - texture code restructuring. 2020-05-30 21:42:35 +02:00
Christoph Oelckers
cdcb25bc1f - use high level textures to render voxels. 2020-05-30 00:30:56 +02:00
Christoph Oelckers
cca4fc609f - texture code cleanup, mainly cppying layer data into the textures at startup to be able to use a real material system. 2020-05-29 23:33:26 +02:00
Christoph Oelckers
2c94b2bb6d - split texture selection from binding. 2020-05-29 21:53:28 +02:00
Christoph Oelckers
1bc744b77b - moved hictinting data into the lookup tables. 2020-05-29 20:15:42 +02:00
Christoph Oelckers
594ec6626c - transitioned to using GZDoom's texture creation code.
Also added support for creating indexed textures directly into CreateTexBuffer, where this functionality can be shared.
As an added plus, brightmaps are working again, this time with less hackery.
2020-05-29 19:21:18 +02:00
Christoph Oelckers
66809ca9f4 - fixed indexed display of 2D content. 2020-05-29 16:46:36 +02:00
Christoph Oelckers
87a87c155d - moved to GZDoom's gl_hwtexture.cpp. 2020-05-29 01:03:01 +02:00
Christoph Oelckers
381e53017d - some hackery to make the camera textures in DN3D work again.
They depend on a deleted texture not writing to the depth buffer, but other parts in the engine like ROR surfaces depend on them writing a proper depth buffer value, so for now there is a global variable that allows to exclude a single tile from ever getting rendered.
2020-05-29 00:44:13 +02:00
Christoph Oelckers
72889540a5 - use GZDoom's gl_samplers.cpp 2020-05-28 23:48:50 +02:00
Christoph Oelckers
362be65060 - removed FHardwareTexture's mSampler member.
This was a mostly unused relic of early development, the few places using it were static sampler settings.
2020-05-28 21:45:33 +02:00
Christoph Oelckers
f6ca5fa650 - fixed writable tiles. 2020-05-28 18:42:26 +02:00
Christoph Oelckers
5e93b8f3e7 - fixed transparent color. 2020-05-28 08:31:08 +02:00
Christoph Oelckers
a3e6829817 - fixed Exhumed menu by adding a proper layout mode to the drawer instead of hacking the broken tile offsets. 2020-05-27 23:30:36 +02:00
Christoph Oelckers
4ebe67ba3d - never render the null texture.
Blood's ROR effects won't work if this is not done.
2020-05-27 22:54:39 +02:00
Christoph Oelckers
193b940eef - palette code cleanup. 2020-05-27 22:19:02 +02:00
Christoph Oelckers
d52600663d - backend sync with GZDoom to pull in a few bugfixes and formatting corrections. 2020-05-26 23:12:04 +02:00
Christoph Oelckers
143e338d9f - fixed bad console setup. 2020-05-26 21:45:33 +02:00
Christoph Oelckers
7109ce4e30 - made some changes to the font and texture system to allow late loading of the palette.
The base palette can be set via .def files so that the engine has no access to it until the entire game state is set up.
This means that font translations and PNG palette remap tables cannot be built when the owning objects are created.
For PNGs this has the added advantage that they only get done when really required and not unconditionally - most of the time the remap table isn't even needed here.

Thid fixes the slider graphics in the option menus.

# Conflicts:
#	source/core/gamecontrol.cpp

# Conflicts:
#	source/core/gamecontrol.cpp
2020-05-26 21:43:32 +02:00
Christoph Oelckers
b233cc2ea5 - cleaned out some unused code. 2020-05-26 00:10:44 +02:00
Christoph Oelckers
e0b2497a56 - backend update. 2020-05-26 00:10:21 +02:00
Christoph Oelckers
ebe936f03f - moved platform backend code to 'common'. 2020-05-26 00:09:27 +02:00
Christoph Oelckers
29db3febb8 - updated the platform code to be mostly identical with GZDoom 2020-05-26 00:08:26 +02:00
Christoph Oelckers
c4017de12f - updated to GZDoom's new texture management system. 2020-05-25 23:59:07 +02:00
Christoph Oelckers
7a1fda2cc2 - use the 2D drawer's coordinates in the console. 2020-05-25 17:13:26 +02:00
Christoph Oelckers
55a3c62b59 - use GZDoom's 2D drawer.
Console and menu font colors are not ok yet, aside from that it works.
2020-05-25 17:11:32 +02:00
Christoph Oelckers
2f672da7ba - the basics for creating font objects for the in-game bitmap fonts.
Definitions were added to RedNukem frontend for testing, not used yet.
2020-05-25 17:01:56 +02:00
Christoph Oelckers
7c3cac5721 - buildtiles.h cleaned of merge errors. 2020-05-25 16:53:35 +02:00
Christoph Oelckers
1d065085d4 - fixed some palette issues 2020-05-25 00:46:46 +02:00
Christoph Oelckers
94cb36ae53 - removed helper #ifdefs. 2020-05-25 00:33:25 +02:00
Christoph Oelckers
758e4ad7cb - stripped down the palette manager in the GL backend and let it use the data that's managed elsewhere.
This class is only needed to manage the palette textures used by the indexed render mode, all the rest is available globally.
2020-05-25 00:31:55 +02:00
Christoph Oelckers
4178d48fb6 - re-enabled GPalette and disabled brightmaps.
In order to finish this I need the switchover, but brightmaps need an update of the texture code which requires merging a few more WIP changes before the code can be fixed.
2020-05-25 00:31:55 +02:00
Christoph Oelckers
6bd4f77c5b - fix compilation. 2020-05-25 00:31:55 +02:00
Christoph Oelckers
72c323cf32 - disabled switch to GPalette because it's not working right yet. 2020-05-25 00:05:26 +02:00
Christoph Oelckers
531c68edfe - use GZDoom's font code to fix the crash issues and moved around some files in the PK3.
This pulls in a lot of Doom specific font setup, this can be sorted out later as it won't get into the way.

# Conflicts:
#	source/CMakeLists.txt

# Conflicts:
#	source/glbackend/hw_draw2d.cpp

# Conflicts:
#	source/CMakeLists.txt

# Conflicts:
#	source/glbackend/gl_texture.cpp

# Conflicts:
#	source/CMakeLists.txt

# Conflicts:
#	source/build/src/palette.cpp
#	source/core/gamecontrol.cpp
2020-05-24 23:28:44 +02:00
Christoph Oelckers
a70b7fa698 - use the texture manager to handle texture data. 2020-05-24 23:26:47 +02:00
Christoph Oelckers
7b50e2bd8a - initialize the texture manager. 2020-05-24 23:13:08 +02:00
Christoph Oelckers
7225dbd6a4 - disabled the 0<->255 color swap because no support code to handle this exists yet. 2020-05-24 23:08:45 +02:00
Christoph Oelckers
6bffdf80a1 - finally managed to merge in the original texture system commit.
Game compiles and runs but transparency doesn't work yet.

# Conflicts:
#	source/CMakeLists.txt
#	source/core/menu/menu.cpp
#	source/core/textures/buildtiles.cpp
2020-05-24 22:53:14 +02:00
Christoph Oelckers
0179029ed1 - use image sources, not textures to manage Build tiles.
The font manager and texture compositor need this - they cannot work off non-image-backed textures.
2020-05-24 22:51:26 +02:00
Christoph Oelckers
a223535f86 - header cleanup in gl_interface.cpp
# Conflicts:
#	source/common/rendering/gl_load/gl_interface.cpp
2020-05-24 22:38:22 +02:00
Christoph Oelckers
53891004a0 - fixed compilation 2020-05-24 22:37:50 +02:00
Christoph Oelckers
bfd11f9cca - give tiles a name
# Conflicts:
#	source/core/textures/buildtiles.cpp
2020-05-24 22:33:52 +02:00
Christoph Oelckers
e500db97b1 - v_text updated and moved to 'common'.
# Conflicts:
#	source/CMakeLists.txt
2020-05-24 22:32:05 +02:00
Christoph Oelckers
272d85663a - moving files... 2020-05-24 20:39:40 +02:00
Christoph Oelckers
9bb1e43c9f - picanmbackup must be initialized. 2020-05-24 20:30:02 +02:00
Christoph Oelckers
6007d5dc8f - fixed typo in offset setter. 2020-05-24 20:11:17 +02:00
Christoph Oelckers
7a84887fc4 - transitioned FTexture.
Mostly working. Note: Brightmaps must be per-translation!
2020-05-24 19:12:22 +02:00
Christoph Oelckers
71ab8c0b10 - fixed compilation. 2020-05-24 16:56:16 +02:00
Christoph Oelckers
2e8566c6eb - console code fixes from GZDoom. 2020-05-24 16:47:18 +02:00
Christoph Oelckers
4523ad5f7e - Linux compile fixes. 2020-05-24 16:47:00 +02:00
Christoph Oelckers
e828710072 - updated common/utility. 2020-05-24 16:46:31 +02:00
Christoph Oelckers
556eb44690 - moved gl_load to 'common'.
# Conflicts:
#	source/CMakeLists.txt
#	source/common/rendering/gl_load/gl_interface.cpp
2020-05-24 16:44:13 +02:00
Christoph Oelckers
6851416e6b - make stats.cpp compile. 2020-05-24 16:42:42 +02:00
Christoph Oelckers
6276001a7c - cleanup 2020-05-24 16:42:36 +02:00
Christoph Oelckers
db21b3ec35 - cleanup 2020-05-24 16:38:16 +02:00
Christoph Oelckers
83e2a342d2 - let the fonts use image sources, not textures as their base class for glyphs. 2020-05-24 16:32:52 +02:00
Christoph Oelckers
be8813f962 - hooked up a few things and re-enabled some code depending on the texture manager. 2020-05-24 16:19:44 +02:00
Christoph Oelckers
e985db3d08 - added GZDoom's texture manager.
It doesn't do anything yet, but it can now be used to manage textures.
2020-05-24 16:11:10 +02:00
Christoph Oelckers
e6b94d35ff - reorganized how BuildTiles stores its data.
Arrays of struct are better than struct of arrays.
2020-05-24 15:02:20 +02:00
Christoph Oelckers
2c5737795f - animation fix. 2020-05-24 14:23:39 +02:00
Christoph Oelckers
d6786cf0eb - final cleanup of picanm code. 2020-05-24 13:53:27 +02:00
Christoph Oelckers
266364fc2e - properly implement texture offsets 2020-05-24 13:26:45 +02:00
Christoph Oelckers
db4850a028 - added a reverse tile map so that the tile manager can retrieve special info even when a tile texture is passed by object to the render code and not by index. 2020-05-24 10:30:09 +02:00
alexey.lysiuk
804a2964a0 - fixed compilation of POSIX targets
source/common/objects/dobject.h:276:21: error: use of undeclared identifier 'malloc_size'
source/common/utility/m_alloc.h:45:22: error: ‘malloc_usable_size’ was not declared in this scope
source/common/engine/m_random.h:40:10: fatal error: SFMT/SFMTObj.h: No such file or directory
source/common/objects/__autostart.cpp:94:10: fatal error: 'doomtype.h' file not found
source/common/objects/zzautozend.cpp:58:10: fatal error: 'doomtype.h' file not found
2020-05-24 10:11:40 +03:00
Christoph Oelckers
cbeb481d59 - what is it with passing data to subfunctions through global variables? :( 2020-05-24 09:04:25 +02:00
Christoph Oelckers
0c029750b6 - moved hightile replacements out of the texture class. 2020-05-24 08:47:45 +02:00
Christoph Oelckers
498b19873d - split up textures.h. 2020-05-24 07:58:56 +02:00
Christoph Oelckers
da26d1cec4 - more trivial adjustments. 2020-05-24 00:38:10 +02:00
Christoph Oelckers
00e7b2fa25 - simple stuff from the texture manager inclusion commit.
To get this out of the way first...
2020-05-24 00:27:24 +02:00
Christoph Oelckers
1954ac0374 - added the other image formats from GZDoom. 2020-05-24 00:15:38 +02:00
Christoph Oelckers
50ab68b53b - moved filesa to common 2020-05-23 23:53:38 +02:00
Christoph Oelckers
d0cbf21dbe - swapped the image source implementations with GZDoom's. 2020-05-23 23:46:44 +02:00
Christoph Oelckers
ab6e87b5f8 - workaround for Ion Fury display glitches on the first map.
I have no idea why this needs to be different than in EDuke32, but without always clearing the depth buffer before rendering a scene viewpoint the game will glitch like crazy.
2020-05-23 22:43:06 +02:00
Christoph Oelckers
2703823ac4 - fixed palette setup. 2020-05-23 22:43:05 +02:00
Christoph Oelckers
2d29d130c0 - fixed Blood startup. 2020-05-23 22:43:05 +02:00
Christoph Oelckers
f64bdccaca - moved renderstyle to 'common' and use GZDoom's color table code unaltered.
# Conflicts:
#	source/CMakeLists.txt
#	source/common/engine/serializer.h
2020-05-23 22:43:05 +02:00
Christoph Oelckers
b8a289bf61 - move brightmap handling to the common code.
# Conflicts:
#	source/common/utility/basics.h

# Conflicts:
#	source/build/src/palette.cpp
2020-05-23 22:43:05 +02:00
Christoph Oelckers
ae6403a205 - added a level of abstraction to the lookup table code to ease later refactoring. 2020-05-23 22:43:05 +02:00
Christoph Oelckers
f929419a0a - refactoring of the lookup tables. 2020-05-23 22:43:04 +02:00
Christoph Oelckers
daf77e55f7 - fixed compilation.
Much of this commit will have to be undone later, once the texture manager becomes available.
2020-05-23 22:43:04 +02:00
Christoph Oelckers
c0217c9152 - removed the remaining Doom-specific parts of the script compiler. 2020-05-23 22:43:04 +02:00
Christoph Oelckers
006916a0a6 - added the script compiler's front end. 2020-05-23 22:43:04 +02:00
Christoph Oelckers
99d3dc67ae - added all FString exports for scripting. 2020-05-23 22:43:03 +02:00
Christoph Oelckers
4b8444b64d - 'common' update. 2020-05-23 22:43:03 +02:00
Christoph Oelckers
4d44682603 - integrated ZScript backend 2020-05-23 22:43:03 +02:00
Christoph Oelckers
091d90aba5 - update "common" subfolder.
# Conflicts:
#	source/CMakeLists.txt
2020-05-23 22:43:02 +02:00
Christoph Oelckers
ada5ad5ec3 - missed adding a file... 2020-05-23 22:43:02 +02:00
Christoph Oelckers
920f9a3f3f - cleaned out all Doom dependencies from the DObject system. 2020-05-23 22:43:02 +02:00
Christoph Oelckers
bb9a077424 - reactivated some more code after integrating the VM core.
There's a few bits here and there that only have meaning in Doom but they are kept to allow using the same unaltered source files in both engines.
2020-05-23 22:43:02 +02:00
Christoph Oelckers
a6d982ed04 - resolve the single Doom specific dependency in the VM by using a callback. 2020-05-23 22:43:02 +02:00
Christoph Oelckers
c9b2399cd0 - added a first bunch of ZScript code.
# Conflicts:
#	source/CMakeLists.txt
#	source/common/utility/basics.h
#	source/core/serializer.h
2020-05-23 22:43:01 +02:00
Christoph Oelckers
c1f7cf1c3a - added DObject as a preparation for the ZScript compiler. Currently large parts are disabled because the backing features are not present yet.
# Conflicts:
#	source/CMakeLists.txt
2020-05-23 22:43:01 +02:00
Christoph Oelckers
b971bc2717 - avoid using global palette settings when drawing 2D content with a custom palette.
Instead pass the palette info with the render call to avoid stale global state.
2020-05-23 22:43:01 +02:00
alexey.lysiuk
57efff200a - fixed compilation of Linux target
source/core/raze_music.cpp:84:53: error: request for member ‘GetChars’ in ‘ext’, which is of non-class type ‘const char*’
2020-05-23 17:17:55 +03:00
Christoph Oelckers
8d3199514d - removed some 'pragma' cruft. 2020-05-23 13:08:10 +02:00
Christoph Oelckers
f0f17fa34f - moved sound code to "common". 2020-05-23 12:59:12 +02:00
Christoph Oelckers
8bd5f12b42 - matching sound backend code with GZDoom.
# Conflicts:
#	source/core/sound/s_soundinternal.h
2020-05-23 12:59:11 +02:00
Christoph Oelckers
c81e79e635 - fixed merge error. 2020-05-23 12:59:03 +02:00
Christoph Oelckers
cfe02cebf1 - moved music code to "common" 2020-05-23 12:37:47 +02:00
Christoph Oelckers
6a8efb7520 - update of music code, in particular separating the engine-specific lookup from the backend.
# Conflicts:
#	source/core/music/music.cpp

# Conflicts:
#	source/build/src/palette.cpp
2020-05-23 12:37:47 +02:00
Christoph Oelckers
d0406e27b6 - all base palette data has been transitioned to GPalette. 2020-05-23 12:31:05 +02:00
Christoph Oelckers
6f9ee4b60f - store palettes in the palette container. 2020-05-23 12:31:05 +02:00
Evan Ramos
960d4b6ecc Duke3D: Fix breaking glass
Amends dc46c60e9fb511c0bc955ca39ea48ccfa3b02a24
2020-05-22 23:41:14 +02:00
NY00123
cf22b4da0a sw/src/demo.cpp:DemoPlayBack: Add a call to timerUpdateClock, which
is now required. Previously, it would be called from faketimerhandler,
which in turn is called from the engine.
2020-05-22 23:41:13 +02:00
NY00123
a69f738287 sw/src/copysect.cpp: Temporarily disable interpolation of sector object
if any of its sectors is impacted by CopySectorWalls. Fixes
a possible flicker with the drill at the end of level 2.
2020-05-22 23:41:11 +02:00
NY00123
ccf6722b70 SW: Don't interpolate a sector object if the corresponding lasttic value is 0 2020-05-22 23:41:10 +02:00
NY00123
37c3f1cc46 SW: Add the macro SO_EMPTY and use it instead of
separate checks of the form sop->xmid == INT32_MAX
2020-05-22 23:41:09 +02:00
NY00123
d510b9b95a sw/src/sync.cpp:SOSync: Remove commented out code 2020-05-22 23:41:08 +02:00
NY00123
d43bffd118 SW: Remove unused DoubleInitAWE32 variable 2020-05-22 23:41:07 +02:00
NY00123
f94b38b138 SW: Modify getinput to update oq16ang/oq16horiz with the same amount
of change that camq16ang/camq16horiz gets. Such an update is possible
after making sure that UpdateInputs (faketimerhandler) is
never called from domovethings.

# Conflicts:
#	source/sw/src/game.cpp
2020-05-22 23:41:05 +02:00
NY00123
6b5cf9525b sw/src/network.cpp: Remove from UpdateInputs the checks of totalclock
and ready2send and the call to timerUpdateClock, which are now done
before calling UpdateInputs itself from RunLevel.

# Conflicts:
#	source/sw/src/network.cpp
2020-05-22 23:40:00 +02:00
NY00123
ae2bcdd1a6 Rename faketimerhandler -> UpdateInputs and keep an empty
faketimerhandler stub in SW. This basically deprecates
the usage of faketimerhandler in the game.
2020-05-22 23:39:45 +02:00
NY00123
6daf42a959 sw/src/game.cpp:RunLevel: Call faketimerhandler in a loop, based on code
from EDuke32-OldMP. Main difference from EDuke32-OldMP is that this is
done even while staying in the menu; Behaviors will otherwise break.
We should also call timerUpdateClock() before the loop, especially
after removing the call to this function from faketimerhandler soon.
2020-05-22 23:39:43 +02:00
NY00123
25b5d69cab SW: Remove commented out code accessing non-existing variable
# Conflicts:
#	source/sw/src/network.cpp
2020-05-22 23:39:42 +02:00
NY00123
7e2484f603 SW: Remove FAKETIMERHANDLER and calls to faketimerhandler via this macro
# Conflicts:
#	source/sw/src/sprite.cpp
2020-05-22 23:39:28 +02:00
NY00123
916cd01550 SW: While not exactly a favorite of mine, this fixes the floorz updates
of the secret rotating pillar in level 1 with SO interpolation.
The drill in level 2 is also covered. So far, SetVatorActive seems
to be the only place where interpolation of ceiling/floorz
may be set, outside of the SO interpolation code.
2020-05-22 23:39:12 +02:00
Christoph Oelckers
f53b348782 - stop the railgun's active sound if another weapon is selected. 2020-05-22 23:02:25 +02:00
Christoph Oelckers
ffbe275a4a - fixed some issues pointed out by CI. 2020-05-22 20:31:21 +02:00
Christoph Oelckers
f9a3ca8b6f - fixed compilation. 2020-05-22 18:35:25 +02:00
nukeykt
37c5245775 Blood: fix sprite rendering glitch related to ROR
# Conflicts:
#	source/blood/src/view.cpp
2020-05-22 18:30:59 +02:00
Evan Ramos
71dc4ff5a4 SW: Fail gracefully from WarpToArea instead of aborting 2020-05-22 18:29:21 +02:00
Evan Ramos
f318d2282a SW: Clear the background during cinematics
# Conflicts:
#	source/sw/src/anim.cpp
2020-05-22 18:29:20 +02:00
Christoph Oelckers
6a0785bbd4 - manual update of some missed content. 2020-05-22 18:28:03 +02:00
NoOneBlood
f60fa44efb - Disable STD random for autobuilds
- kModernEffectGen: fix getting middle of the sprite

# Conflicts:
#	source/blood/src/nnexts.cpp
2020-05-22 17:43:08 +02:00
nukeykt
6ec33c2954 Blood: do not use tile offsets for voxels 2020-05-22 17:38:35 +02:00
sirlemonhead
17be2617cf Clean up the FileStream code: Remove non-working Is_Eos() and make Seek() and Skip() return int. 2020-05-22 17:38:21 +02:00
sirlemonhead
6f64967d00 libsmackerdec: Fix incorrect version comparison (though it wasn't breaking anything) 2020-05-22 17:38:04 +02:00
sirlemonhead
e2569d9980 libsmackerdec: Implement GotoFrame() function
# Conflicts:
#	source/libsmackerdec/src/SmackerDecoder.cpp
2020-05-22 17:37:43 +02:00
NoOneBlood
9428c88e29 - Don't change statnum of thing converted to debris back to thing on impact trigger when firing with vector weapon.
- Change damage scale and min firedist for Custom Dude.
- Remove unnecessary checks in callback of tracking condition.
- Fix picWidth() function.
- Better initialization of modern stuff.
- kModernSeqSpawner: disable all other spawners with same TX ID when enabling current.
- Fix: sceneQav was not playing if resurrected with COUSTEAU cheat.
- kModernPictureChanger: remove kModernFlag01 feature (deprecated).
- kModernSectorFXChanger: add flags to control where exactly light effect should appear.
- kModernCondition:
 - add delay before sending command if condition is true.
 - take in account state, so kCmdState and kCmdNotState is useful.
 - fix wrong comparison result in some conditions.
 - add new various conditions.
- kModernPlayerControl:
 - fix start / stop playing qav scene when triggered with event command converted to sprite command.
 - add a way to resurrect / heal player.
 - add event commands to toggle inventory item status via trigger.
 - fix that Remote and Proximity detonators cannot be given.
 - add clear all screen effects option.
 - proper percents for changing movement / jumping.
- kModernRandomTX, kModernSequentialTX: change event redirection mode activation from kModernTypeFlag02 to kCmdLink.
- kModernSpriteDamager: treat damage value as percents by default, take in account god mode.
- kModernEffectGen: fix wrong cstat for effects.
- kModernPropertiesChanger: proper underwater status for sectors and players or enemies in it.
- Players: assign or update current player's sprite index for all conditions.

# Conflicts:
#	source/blood/src/nnexts.cpp
2020-05-22 17:36:37 +02:00
nukeykt
96c9ca657e Blood: poll player input at least once to prevent skips
Fixes #329
2020-05-22 17:35:39 +02:00
NoOneBlood
c000e2e3b3 - Removed link support for various upper / lower stacks (deprecated)
- Removed link support for path marker (deprecated)
- Removed link support for counter sector (deprecated)
- STD random for wind generator
2020-05-22 17:35:11 +02:00
MexMeRcUrY
142e611125 fixes #343 2020-05-22 17:35:01 +02:00
NoOneBlood
569fcc9542 - Custom start health fix
- Check for system reserved statnums in gModerMap
2020-05-22 17:34:54 +02:00
NoOneBlood
e3e805b24c - More compact code for event redirection
- Fix demo desync
- Fix MINGW compile warnings
- Move custom start health from data4 to sysData2 in gModern maps
- Proper respawn for custom dude

# Conflicts:
#	source/blood/src/dude.cpp
#	source/blood/src/dude.h
2020-05-22 17:34:33 +02:00
NoOneBlood
64de30209b - Player control: more strict rules for copying properties of xsprite
- Fix for custom health when respawning enemy
- Fix for custom dude when respawning it
- Conditions: added way to refresh sprite index in tracking conditions

# Conflicts:
#	source/blood/src/actor.cpp
#	source/blood/src/aiunicult.cpp
#	source/blood/src/aiunicult.h
#	source/blood/src/dude.cpp
#	source/blood/src/dude.h
2020-05-22 17:33:05 +02:00
Evan Ramos
8b0da35cb8 Avoid warnings when defining only extra in tilefromtexture
# Conflicts:
#	source/build/src/defs.cpp
2020-05-22 17:30:52 +02:00
Evan Ramos
26333dcaad Blood: Make voxels and models loaded via def inherit rotation automatically 2020-05-22 17:30:43 +02:00
nukeykt
1ef8df0a4c Blood: Fix model yoffset 2020-05-22 17:29:50 +02:00
NoOneBlood
f1f9fcff5c - Changes for conditions (WIP)
- Fix for picWidth();
2020-05-22 17:29:22 +02:00
NoOneBlood
71b110a75e - Double print in console fix for consoleSysMsg
- Changes for kModernCondition

# Conflicts:
#	source/blood/src/globals.cpp
2020-05-22 17:29:12 +02:00
NoOneBlood
c27f3b8d20 - Changes in damage scale for Custom Dude
- Conditions: added conditions for player and enemies (WIP)
2020-05-22 17:28:48 +02:00
NoOneBlood
014dfc346b - Added tracking type of conditions. Generally conditions is still WIP.
- Update aim for player while playing qav scenes.
- Fix compile warnings
2020-05-22 17:28:35 +02:00
Evan Ramos
4d7b37ca1a Rednukem: Remove redundant comment and fix formatting
# Conflicts:
#	source/rr/src/gameexec.cpp
2020-05-22 17:26:36 +02:00
nukeykt
b7294e45a1 Blood : Fix mirror issue
Fixes #334 and #338

# Conflicts:
#	source/blood/src/menu.cpp
2020-05-22 17:25:54 +02:00
MexMeRcUrY
aee64e8e34 fix #333 2020-05-22 17:24:42 +02:00
MexMeRcUrY
5faef5d6dd Blood: Caleb doesn't talk in multiplayer 2020-05-22 17:24:41 +02:00
MexMeRcUrY
f1421bd8ee Blood: Caleb doesn't talk in multiplayer 2020-05-22 17:24:41 +02:00
sirlemonhead
8f8f033956 Rednukem: Limit sprite shade change to Redneck Rampage games, and add guard for invalid array access. Fixes ASAN error. 2020-05-22 17:22:18 +02:00
sirlemonhead
19ab05655b Prevent invalid array index in polymost_spriteIsModelOrVoxel()
# Conflicts:
#	source/build/src/polymost.cpp
2020-05-22 17:22:18 +02:00
sirlemonhead
73a56f76af PCExhumed: Avoid some original memory read bugs and correct some bullet code branching. 2020-05-22 17:22:00 +02:00
sirlemonhead
02d4712e57 Rednukem: Fix MVE crash on Release gcc builds. 2020-05-22 17:21:03 +02:00
sirlemonhead
808d0591eb Rednukem: Add newline to end of playmve.h 2020-05-22 17:21:03 +02:00
sirlemonhead
b89c6da6b8 Rednukem: Playback support added for Rides Again intro movie. Closes #266
# Conflicts:
#	GNUmakefile
#	platform/Windows/rednukem.vcxproj
#	platform/Windows/rednukem.vcxproj.filters
#	source/rr/src/game.cpp
2020-05-22 17:21:03 +02:00
sirlemonhead
20cfbc1786 PCExhumed: Fix the timing of credits text when not using CD audio.
# Conflicts:
#	source/exhumed/src/exhumed.cpp
2020-05-22 17:17:54 +02:00
Evan Ramos
262f2234c6 Duke3D: Disable dead code in implementation of undocumented SE 128
Avoids warning: bitwise or with non-zero value always evaluates to true [-Wtautological-bitwise-compare]
2020-05-22 17:11:16 +02:00
Jordon Moss
49deeb350e Fix trains not moving spawn points with higher indexes than player count. 2020-05-22 17:11:16 +02:00
Richard C. Gobeille
d9b8f58558 Duke3d: make CON_GETFLORZOFSLOPE and CON_GETCEILZOFSLOPE TROR aware 2020-05-22 17:01:37 +02:00
Richard C. Gobeille
e2d79b4682 engine: add yax_getflorzofslope() and yax_getceilzofslope() 2020-05-22 17:01:36 +02:00
Richard C. Gobeille
5e677d6089 Duke3d: restore previous version of VM_ASSERT macro for compilers other than MSVC 2020-05-22 17:01:35 +02:00
Richard C. Gobeille
3ab314e95a engine: make cliptestsector() (used by clipmove(), etc) TROR aware
This is intended to help with issues where enemies get stuck in thin TROR layers.

# Conflicts:
#	source/build/src/clip.cpp
2020-05-22 17:00:55 +02:00
Richard C. Gobeille
14f3eb17f1 Duke3d: flip CON_USE_COMPUTED_GOTO dispatch macro logic around so the branch is taken less often 2020-05-22 17:00:12 +02:00
Richard C. Gobeille
34126a50be Duke3d: change random_angle hack in CON_MOVE to match CON_AI 2020-05-22 17:00:11 +02:00
Richard C. Gobeille
b0902f916a Duke3d: zero player return_to_center when setting horizRecenter to false 2020-05-22 17:00:10 +02:00
Richard C. Gobeille
2d4f6be147 Duke3d: convert several more VM error checks into VM_ASSERT statements
# Conflicts:
#	source/duke3d/src/gameexec.cpp
2020-05-22 17:00:09 +02:00
Richard C. Gobeille
7fbcab3dc1 Duke3d: VM_ASSERT fix 2020-05-22 16:57:34 +02:00
Richard C. Gobeille
86e2f4ec8a Revert "Duke3d: set .horizRecenter when handling SK_CENTER_VIEW"
This reverts commit ef06d8c3dba3e4ccf9388bf31404ab23ebdcb37e.
2020-05-22 16:57:01 +02:00
Richard C. Gobeille
1f82cfa3bf Duke3d: replace VM_CONDITIONAL macro with a lambda
# Conflicts:
#	source/duke3d/src/gameexec.cpp
2020-05-22 16:57:00 +02:00
Richard C. Gobeille
c0160065e4 Duke3d: this is intended to fix an issue where CON VM errors within a CON_FOR loop could cause an infinite loop 2020-05-22 16:56:24 +02:00
Richard C. Gobeille
8cf064b90c Duke3d: add a few missing VM_ASSERT checks 2020-05-22 16:56:23 +02:00
Richard C. Gobeille
1a1112b4c1 Duke3d: fix OOB memory access in CON_FOR 2020-05-22 16:55:37 +02:00
Richard C. Gobeille
dc9c6ce2e6 Duke3d: allow SE_14_SUBWAY_CAR to move STAT_PLAYER sprites
Fixes #18.
2020-05-22 16:54:12 +02:00
Richard C. Gobeille
23909f8ca1 Duke3d: hoist checks for ST_2_UNDERWATER outside of loops in SE_14_SUBWAY_CAR processing 2020-05-22 16:54:10 +02:00
Richard C. Gobeille
45fd214ffe Duke3d: remove interpolation fixups from subway
These aren't needed anymore after Striker's patch to improve overall interpolation.
2020-05-22 16:54:09 +02:00
Richard C. Gobeille
b19d258870 Duke3d: fix APLAYER radius damage distance calculation regression
Fixes #20.
2020-05-22 16:54:08 +02:00
Richard C. Gobeille
f5788c331e Clarify clipupdatesector() log message a bit
# Conflicts:
#	source/build/src/clip.cpp
2020-05-22 16:52:08 +02:00
Richard C. Gobeille
32ddabb12c Derp...
Probably actually fixes #4. Regardless, I want to note that this is really sub-optimal.

# Conflicts:
#	source/duke3d/src/m32def.cpp
2020-05-22 16:51:27 +02:00
Richard C. Gobeille
61d82c8152 Fix really stupid error with CON_NULLOP branch detection
Fixes #4.

# Conflicts:
#	source/duke3d/src/gamedef.cpp
#	source/duke3d/src/m32def.cpp
2020-05-22 16:50:28 +02:00
Richard C. Gobeille
94d098f8ef Fix a crash with tabledivide64()
Fixes #1.
2020-05-22 16:50:02 +02:00
Jordon Moss
79d2bb1bb8 Fix player sprite disappearing and chat indicator using the wrong sprite when typing. 2020-05-22 16:48:44 +02:00
Jordon Moss
658a96ce19 Re-added a check in VM_Move that probably should't have been removed. 2020-05-22 16:48:24 +02:00
Mitchell Richters
d98813f00f SW: Allow sector object interpolations to be disabled for debugging.
New code is causing some issues. Upstream allow it to be toggled, so let's do that also.
2020-05-22 16:43:34 +02:00
Christoph Oelckers
bad17f29e0 - made some tweaks to the anti-z-fighting code in Polymost.
It now picks the minimum of the current formula and the one from before June 2017 - the current one was causing problems with sprites in the distance so now the old one is used as an upper bound.
2020-05-22 16:27:45 +02:00
Christoph Oelckers
683672a1be - added missing game specific autoload handler. 2020-05-22 01:24:40 +02:00
Mitchell Richters
45cc95401f SW: Make game compile after upstream backports. 2020-05-21 18:47:37 +02:00
Evan Ramos
0ab81904c2 SW: Allow Strafe Left and Right to turn vehicles 2020-05-21 18:47:37 +02:00
Evan Ramos
9d11c7dfb1 SW: Add FOV support. 2020-05-21 18:47:37 +02:00
Evan Ramos
edccdccfb4 SW: Fall back gracefully if map mirror tags are not fully correct 2020-05-21 18:47:37 +02:00
Evan Ramos
e6dd2741f3 SW: Instrument Saveables with debug_break 2020-05-21 18:47:37 +02:00
Evan Ramos
9eefd3d892 SW: Add PanelSpriteFunc values to saveables 2020-05-21 18:47:37 +02:00
NY00123
024d4e7297 SW: Afraid that we should disable almost all kinds of SOs in multiplayer
for now, due to possible jitters. Currently leaving remote-controlled SOs.
2020-05-21 18:47:37 +02:00
NY00123
ab99b3b79d SW: Call FunctionKeys from getinput only if the latter is called
from faketimerhandler. This should fix the timing of playing an
RTS file's sound and sending the corresponding message.
2020-05-21 18:47:37 +02:00
NY00123
75c76f073a SW: Fix aiming in coop view 2020-05-21 18:47:37 +02:00
NY00123
5baba6b9f3 SW: Don't interpolate a non-remote sector object controlled
by the player. Make sure looking up/down is still smooth.
2020-05-21 18:47:37 +02:00
NY00123
bdacab366a SW: Disable interpolation of sector objects that
don't move as smooth as possible in multiplayer
2020-05-21 18:47:37 +02:00
NY00123
f3654d80e7 Store sector object interpolation data in saved game 2020-05-21 18:47:37 +02:00
NY00123
27675d9f4f Remove the preceding sprite interpolation functions, not needed anymore 2020-05-21 18:47:37 +02:00
NY00123
221172311c SW: Let's make use of interpso.*. Still need to do a few more things. 2020-05-21 18:47:37 +02:00
NY00123
2b1e32bf3d SW: Add the currently-unused interpso.* files, enabling interpolation
of sector objects as whole groups of points and sprite angles.

The following goals are intended to be achieved with this code:
- Make it easy to let the user toggle sector object interpolation.
- Interpolate the angles of sprites carried by sector objects.
- Use the right amount of samples for interpolating a sector object,
depending on the players' locations, as done in the checks within
DoSector. Unfortunately, modifying DoSector itself to
unconditionally call MoveSectorObjects(sop, synctics) technically
changes the way sectors move (in the logical sense), and was
found out to make a specifically constructed user map unbeatable.
- Make it easy to disable interpolation of a whole sector object in
case of a need. This is especially important if such an object
is controlled by a player in multiplayer, mostly since this
isn't compatible with the way player prediction is working.
2020-05-21 18:47:37 +02:00
NY00123
f6a5572775 SW: Add the currently unused InterpolateSO option.
A known issue, which also applies to existing settings like the voxel
toggle, is that its value gets written to the saved game, and when such
a game is loaded, the its value gets overwritten by the one in the
saved game. Options should move to settings.cfg later, anyway.
2020-05-21 18:47:37 +02:00
NY00123
890a737152 SW: Add the oangdiff field to USER struct as suggested by Hendricks,
and use it in MovePoints. This will be used for interpolating
the angles of sprites carried by SOs soon.
2020-05-21 18:47:37 +02:00
NY00123
d467ce3eb8 SW: Interpolate the player's bob_z, based on suggestion by Striker.
Using pp instead of ppp seems to work better with prediction.
2020-05-21 18:47:37 +02:00
NY00123
10e4c3e121 sw/src/draw.cpp: Import from Duke3D the Polymost shadow drawing hacks 2020-05-21 18:47:37 +02:00
NY00123
33043b3b05 sw/src/network.cpp: Fix waitforeverybody in Master/Slave
modes. This uses SVN r1135 and r1143 as a reference.
2020-05-21 18:47:37 +02:00
NY00123
dea7c83361 sw/src/network.cpp: Fix sending of messages in Master/Slave.
Thanks Dynamo for spotting the bug.
2020-05-21 18:47:37 +02:00
NY00123
63743eea67 sw/src/draw.cpp:analyzesprites: Interpolate other players' sprites, in a
similar manner to what's done in Duke3D (with the addition of the angle).

There seem to be some jitters with this, mostly in Master/Slave mode.
Decreasing PAKRATE in mmulti.cpp might also increase the frequency
of this occuring in Peer-2-Peer mode.
2020-05-21 18:47:37 +02:00
NY00123
5a6dd2224f sw/src/jsector.cpp:JS_DrawCameras: Make camera oscilation
less dependent on the frame rate.
It would probably be better to update this from the game loop side,
like in Duke3D, but it's still better than the preceding situation.
2020-05-21 18:47:37 +02:00
Mitchell Richters
471f0df69d SW: Q16.16 refinements in DoPlayerDeathFollowKiller. 2020-05-21 18:47:37 +02:00
Mitchell Richters
14273dd200 SW: Add GetDeltaQ16Angle. 2020-05-21 18:47:37 +02:00
NY00123
36e6dee64c Add PedanticQ16AngleFloor to sw/src/game.h and use it in DoPlayerTurn 2020-05-21 18:47:37 +02:00
NY00123
b84975e406 SW: Remove drive_oangvel from PLAYERstruct. We can use local variables instead. 2020-05-21 18:47:37 +02:00
NY00123
6aecd46dbc SW - Hopefully a better way to decide if getinput should call
DoPlayerTurn/DoPlayerHorizon while input is tied to the frame rate:
Introduce the new player flags PF2_INPUT_CAN_TURN and PF2_INPUT_CAN_AIM.
Set PF2_INPUT_CAN_TURN if DoPlayerTurn can be called outside
of getinput. Similarly set PF2_INPUT_CAN_AIM if DoPlayerHorizon
can be called in this manner.
getinput will only call DoPlayerTurn/DoPlayerHorizon
if PF2_INPUT_CAN_TURN/PF2_INPUT_CAN_AIM is set. These flags are reset
right before the call to the player's current DoPlayerAction function.

For one example in which this assists, it's not always the
case that DoPlayerDeathFollowKiller may call DoPlayerTurn,
even if we assume that pp->input.q16angvel is never zero.
2020-05-21 18:47:37 +02:00
NY00123
e3197d206d SW: Temporarily lock angle and horiz right upon player death 2020-05-21 18:47:37 +02:00
NY00123
bfd79d8bc2 sw/src/draw.cpp:drawscreen: Don't interpolate while the game is paused 2020-05-21 18:47:37 +02:00
NY00123
656e059c86 sw/src/game.cpp: Remove unused ReloadPromptMode variable 2020-05-21 18:47:37 +02:00
NY00123
8d748c19e4 Minor SW cleanup: Have a single declaration of
GamePaused within game.h. Do the same with ReloadPrompt.
2020-05-21 18:47:37 +02:00
NY00123
5a0e54b63e SW: Migrate the player's RevolveAng field to Q16.16 format.
This fixes truncations of q16ang in MovePlayer. One known
fixed issue is a minor micro-shaking effect, reproduced
while standing on a non-moving SO (e.g., the bus in level 1).
The latter is also related to the use of camq16ang.

Based in idea on patch from mjr4077au.
2020-05-21 18:47:37 +02:00
NY00123
ef85bc58c3 sw/src/draw.cpp:drawscreen: Use GetQ16AngleFromVect for pointing
at a remote-controlled SO. In case PedanticMode == FALSE, this
leads to small improvements with aiming at the car in EXAMPLE.MAP.
2020-05-21 18:47:37 +02:00
NY00123
207240f277 Add GetQ16AngleFromVect wrapper function to sw/src/game.h 2020-05-21 18:47:37 +02:00
NY00123
6fcb8f7a6a Add gethiq16angle and the getq16angle wrapper to the engine 2020-05-21 18:47:37 +02:00
NY00123
e2a789b8cc SW: Lock angle and horiz right after teleporting to sprite 2020-05-21 18:47:37 +02:00
NY00123
8e9130c31a sw/src/draw.cpp:drawscreen: Removing the check that pp->sop_control
is non-null seems to resolve the newly introduced interpolation
issue for looking up/down while controlling a sector object.
We can also remove the PF_DEAD test, since
game.cpp:getinput should lock any kind of aiming.

src/src/game.cpp:getinput: We now, however, need to further
lock turning here while controlling a sector object.
2020-05-21 18:47:37 +02:00
NY00123
4c73c11255 SW: Ensure the player's rendering angle is in sync with a rotating
sector. This re-introduces the angle interpolation in drawscreen
while sector object interpolation is in use.

A side-effect of this is that looking up/down is now less smooth
while controlling a sector object (e.g., a turret).
2020-05-21 18:47:37 +02:00
NY00123
0c4deb9298 sw/src/track.cpp:MovePlayer: We also need to update pp->camq16ang here.
Note that this angle is currently not interpolated,
as done for the sector.
2020-05-21 18:47:37 +02:00
NY00123
fd6df8e509 sw/src/track.cpp:MovePlayer: Missed this in preceding interpolation fixes 2020-05-21 18:47:37 +02:00
NY00123
1d1aa4581b sw/src/track.cpp: If interpolation is enabled, also cover
the SO's midpoint. Fixes aiming at a remote controlled SO.
2020-05-21 18:47:37 +02:00
alexey.lysiuk
2974af3178 - fixed a bunch of compilation errors with MSVC 16.6.0 2020-05-21 10:29:59 +03:00
Mitchell Richters
559539bed2 - bump save versions for SW following the massive amount of changes. 2020-05-20 14:43:03 +02:00
Mitchell Richters
979c4846a4 SW: Fixes and cleanups following backporting upstream's input changes. 2020-05-20 14:43:03 +02:00
Mitchell Richters
2c0ad0dd12 SW: Fix compilation after backporting upstream's input changes. 2020-05-20 14:43:03 +02:00
NY00123
3913a05713 Use pragma pack in sw/src/network.h instead of the locally defined
PACKED macro. This is more consistent with the current Duke3D codebase,
and further fixes build with older versions of MinGW GCC, in which
attribute packed is broken without specifying -mno-ms-bitfields.
2020-05-20 14:43:03 +02:00
NY00123
ff49bc2209 SW: Remove unused wfe_Clock variable 2020-05-20 14:43:03 +02:00
NY00123
b0318afbdb Fix usage of possibly wrong address in sw/src/player.cpp:DoPlayerHorizon 2020-05-20 14:43:03 +02:00
NY00123
10a5120e40 sw/src/network.cpp: I think that it's safe to enable
the sync check on the slave side in Master/Slave mode.
2020-05-20 14:43:03 +02:00
NY00123
0f761cdc77 SW: This hopefully resolves issues with leaving multiplayer games 2020-05-20 14:43:03 +02:00
NY00123
7749b0f7b9 SW: Interpolate sector objects in non-demo, single player games.
Let's see if this is breaking anything.
2020-05-20 14:43:03 +02:00
NY00123
25be14ccc0 Another change modifying saved game format in SW:
Increase MAXINTERPOLATIONS from 1024 to MAXSPRITES.
2020-05-20 14:43:03 +02:00
NY00123
bf0ace3748 SW change breaking compatibility with existing saved games:
Remove startofdynamicinterpolations and short_startofdynamicinterpolations.
2020-05-20 14:43:03 +02:00
NY00123
18602d41c9 SW: Reset the number of interpolations on level load 2020-05-20 14:43:03 +02:00
NY00123
47ac981a3a SW: Let's replace the macro PEDANTIC_MODE with variable PedanticMode 2020-05-20 14:43:03 +02:00
NY00123
cc4f1f21f9 Interpolation fixes for SW:
draw.cpp: Fix the lack of interpolation while walking on a sector
object, like the bus roof or the floor of the train in Seppuku Station.
track.cpp: Make sure the player's location and angle aren't mistakenly
interpolated while standing on a moving sector object as a consequence.
2020-05-20 14:43:03 +02:00
NY00123
eaefc2576c SW: Rename q16avel -> q16angvel and q16horz -> q16aimvel.
While it is understandable that avel and horz came from Duke3D,
having both q16horiz and q16horz in the updated SW_PACKET struct
can be confusing, and the alternative notation is more consistent
with the original struct field names of angvel and aimvel, as well
as the differing uses of the name angvel still present in player.cpp.
2020-05-20 14:43:03 +02:00
NY00123
952c578957 SW (DoPlayerTurn): The 180-degrees turns should be clockwise 2020-05-20 14:43:03 +02:00
NY00123
d07470ec4a sw/src/player.cpp:PlayerAutoLook: Modify function to
test for PF_MOUSE_AIMING_ON only if PEDANTIC_MODE == FALSE
2020-05-20 14:43:03 +02:00
NY00123
6d9c657b11 SW: This is a better place for a slave which quits to set QuitFlag 2020-05-20 14:43:03 +02:00
NY00123
d50410f06b SW: With the input tied to frame rate, disable aiming while the
player is dead, and also disable horizontal aiming while on a ladder.
2020-05-20 14:43:03 +02:00
NY00123
820e9ef5f9 SW: Use the old interpolation path in drawscreen if player is dead 2020-05-20 14:43:03 +02:00
NY00123
701b33da0d SW: Make horiz centering a bit less immediate again 2020-05-20 14:43:03 +02:00
Mitchell Richters
cba38c5cfc SW: Tie player input to frame rate. 2020-05-20 14:43:03 +02:00
Mitchell Richters
8b10f53450 SW: Add and use elapsedInputTicks and scaleAdjustmentToInterval
as one more step before tying input to frame rate.
2020-05-20 14:43:03 +02:00
NY00123
8085c8473d SW: Add the q16ang and q16horiz fields to SW_PACKET. These
will be filled by faketimerhandler with the current player's
most recent camq16ang and camq16horiz values, respectively.
2020-05-20 14:43:03 +02:00
NY00123
de0ed067f5 SW: Modify DoPlayerTurn/DoPlayerHorizon to make it possible
for them to modify the player's camq16ang/camq16horiz field
instead of q16ang/q16horiz. Additionally, pass to them the
change in angle/horiz via a parameter, as an alternative
to direct access to the corresponding player input field.
2020-05-20 14:43:03 +02:00
NY00123
1f9e319d39 SW - First step in tying player input to frame rate:
Add the camq16ang and camq16horiz fields to the player struct.
With the exception of DoPlayerTurn and DoPlayerHorizon, whenever
code in player.cpp updates player's q16ang/q16horiz, also write
the updated values to camq16ang/camq16horiz. These variables'
preceding values are never used in these functions.
2020-05-20 14:43:03 +02:00
NY00123
b447feef91 sw/src/game.cpp:LoadLevel: Rename q16ang -> ang 2020-05-20 14:43:03 +02:00
NY00123
a2a1642f3d SW: We can revert the change of siang to q16 now 2020-05-20 14:43:03 +02:00
NY00123
1d2aadd229 sw/src/draw.cpp:drawscreen: We can set the pp->si* fields just once,
a bit later.
2020-05-20 14:43:03 +02:00
NY00123
2d4766555c SW: Revert commented out horiz->q16horiz renames in DSPRINTF strings 2020-05-20 14:43:03 +02:00
NY00123
a8a47a9eb0 SW: Fix typo in DoPlayerTeleportToSprite, following the migration to q16 angles 2020-05-20 14:43:03 +02:00
NY00123
4a8ad9b550 Fix multiplayer desync after the change to q16 angle and horiz.
Note that this includes non-portable unaligned accesses, but this
already applies to surrounding code. Just add comments for now.
2020-05-20 14:43:03 +02:00
NY00123
6faa73286f SW: Trim q16 angle and horiz during demo playback/recording.
This uses the newly introduced PEDANTIC_MODE macro.
2020-05-20 14:43:03 +02:00
NY00123
8284fcba9a sw/src/player.cpp:DoPlayerTurn: Increase turning precision
with q16 angle. This uses the new NORM_Q16ANGLE macro.
2020-05-20 14:43:03 +02:00
NY00123
1a46afaf27 Fix compatibility with existing demo files after the migration
to q16 angle and horiz. The original SW_PACKET structure,
named OLD_SW_PACKET here, is used while accessing demo files.
2020-05-20 14:43:03 +02:00
Mitchell Richters
0431f5ffed SW: Refinements for Q16.16 implementation. 2020-05-20 14:43:03 +02:00
Mitchell Richters
a4fdabd860 SW: Use Q16.16 for angle. 2020-05-20 14:43:03 +02:00
Mitchell Richters
2bf2055c65 SW: Use Q16.16 for horiz. 2020-05-20 14:43:03 +02:00
NY00123
c32a8cab29 SW: Revert the changes from JFSW commit 7d0deafe81b0ffa30d77cfe242e454f8b4487a1f
related to the definitions of RANDOM_NEG in bunny.cpp, ripper.cpp
and ripper2.cpp. Do so in a way that isn't re-introducing compiler
warnings. This partially fixes compatibility with demos made for SW 1.2.
Additionally, replace the 3 separate definitions of RANDOM_NEG
with a common one within game.h.

From-SVN: r8798
2020-05-20 14:43:03 +02:00
NY00123
00daf6295e SW: Fix a few memory access errors related to demo support
From-SVN: r8797
2020-05-20 14:43:03 +02:00
NY00123
6d537f6d75 Pack the struct SW_PACKET. While this makes demo playback
functional with existing demo files, the code is known
to be incompatible with demos made for SW 1.2.

From-SVN: r8792
2020-05-20 14:43:03 +02:00
Mitchell Richters
83936bf5eb Revert "SW: Improve main game loop."
This reverts commit e878c5bab8.

Revert "SW: Use Q16.16 for horiz."

This reverts commit f07a0ae01e.

Revert "SW: Use Q16.16 for angle."

This reverts commit 1ecc74c2ec.

Revert "SW: Minor repairs for Q16.16 implementation."

This reverts commit d78d046bad.

Revert "SW: Process input at frame rate."

This reverts commit c162014dab.

Revert "SW: Amendments to accommodate changes in master."

This reverts commit eaa51138ad.

Revert "SW: Fix incorrectly declared function input type."

This reverts commit 1cdd5b08d8.

Revert "SW: Amend scaleAdjustmentToInterval() with correct value for SW."

This reverts commit d4dd737cd5.

Revert "SW: Refinements to new input code."

This reverts commit 5ebc65a1fb.

Revert "SW: Adjust look and snap up/down keys and slightly tune PLAYER_TURN_AMOUNT."

This reverts commit 2852536dbf.

Revert "SW: Get PLAYER_TURN_SCALE to be just right."

This reverts commit 4630c8a0b7.

Revert "SW: Make map follow mode work better."

This reverts commit 8e94c48eff.

Revert "SW: Remove line accidentally left from 'MoveScrollMode2D()'."

This reverts commit 5db8047b41.

Revert "Fix multiplayer desync after the change to q16 angle and horiz."

This reverts commit 3bc46078b8.

Revert "SW: Revert commented out horiz->q16horiz renames in DSPRINTF strings"

This reverts commit 537313f620.

Revert "sw/src/draw.cpp:drawscreen: We can set the pp->si* fields just once,"

This reverts commit d2e9595980.

Revert "sw/src/game.cpp:LoadLevel: Rename q16ang -> ang"

This reverts commit a178961a3e.

Revert "SW: Minor tweaks."

This reverts commit 377ba68344.

Revert "SW: Further refine turning and optimise horizon adjustment."

This reverts commit 039022d9ac.

Revert "SW: Don't process input at frame rate if ScrollMode2D is true."

This reverts commit 1aa1e62c4d.

Revert "SW: Use a bit more Q16.16 in places."

This reverts commit 40ca656f38.

Revert "SW: Use the old interpolation path in drawscreen if player is dead"

This reverts commit 2d73466425.

Revert "SW: Smooth out 180 degree turn landing and replace some fix16_min/max with fix16_clamp."

This reverts commit 0996e87f79.

Revert "Change Next/Previous Weapon button handling for Shadow Warrior."

This reverts commit f6b8ca6a22.

Revert "SW: Make "Center_View" key return smoothly."

This reverts commit 23c401fbc2.

Revert "SW: Use the old interpolation path in drawscreen if player is dead"

This reverts commit 43ec16eb55.

Revert "Interpolation fixes for SW:"

This reverts commit ac8a7ecfbd.

Revert "SW: Reset the number of interpolations on level load"

This reverts commit 04bf8499e7.

Revert "Another change modifying saved game format in SW:"

This reverts commit e80888523e.

Revert "SW: Interpolate sector objects in non-demo, single player games."

This reverts commit 996ab77cf4.

Revert "- fixed merge errors in SW."

This reverts commit b8cfa94568.

Revert "- fix interpolation stutters when opening console for SW."

This reverts commit 99fdbfb6cb.

Revert "- reset buttonMap button states after returning from pause for SW (stops keys acting stuck down if down prior to pausing)."

This reverts commit 693b6955da.

Revert "SW: fix stupid input scaling bug"

This reverts commit 1c79e6e17c.

Revert "SW: Make vehicle input better."

This reverts commit 670a53c402.

Revert "SW: Change fix16_from_float() to fix16_from_int() that was changed in 4630c8a0b7 but should have been reverted in 377ba68344e34495638c6fa7685ff78c9a0ed6f8."

This reverts commit 423c9da071.

Revert "SW: Remove ScrollMode2D extern boolean and move into PLAYERp struct."

This reverts commit 31eb55c1fa.
2020-05-20 14:43:03 +02:00
Mitchell Richters
31eb55c1fa SW: Remove ScrollMode2D extern boolean and move into PLAYERp struct. 2020-05-19 12:55:32 +02:00
Mitchell Richters
423c9da071 SW: Change fix16_from_float() to fix16_from_int() that was changed in 4630c8a0b7 but should have been reverted in 377ba68344. 2020-05-19 12:55:32 +02:00
Mitchell Richters
670a53c402 SW: Make vehicle input better.
- Define new boolean 'on_vehicle' in PLAYERp struct for use with interpolating while on vehicle and other checks.
- Move horizon code back into separate DoPlayerHorizon() function. Adjusting horizon while in vehicle must come at the end of the DoPlayerOperate*() function.
- Make DoPlayerHorizon() accessible in game.cpp.
- Change code in DoPlayerHorizon() to process according how 'pp->on_vehicle' is set.
- Make scaleAdjustmentToInterval available outside of getinput().
- Don't process input at frame-rate while on a vehicle. Vehicle code is too difficult to process outside of the game's clock.

Partially based on NY00123's upstream implementation of tying player input to frame-rate.
2020-05-19 12:55:32 +02:00
Mitchell Richters
58bb2e149b SW: Fix broken interpolation pathway following changes in 43ec16eb55.
What 43ec16eb55 intends to do was already done via 2d73466425, however I applied the if statement in the opposite order so when it was cherry-picked again, the pathway was actually reversed - interpolating when alive and not when dead.

Rather than re-apply the opposite order, I've made the if statement match upstream for more consistency and to avoid further conflicts.
2020-05-15 15:00:58 +02:00
Mitchell Richters
9a144a9afb - bump save versions for Duke3D following changes to DukePlayer_t struct. 2020-05-14 15:15:59 +02:00
Mitchell Richters
10142eee6b RR: Move lastInputTicks from DukePlayer_t struct to PlayerData_t struct.
Better location for it since it never needs to be sent across the wire in a multiplayer situation. It's now also located where the other properties to do with input being tied to frame-rate are located.
2020-05-14 10:00:16 +02:00
Mitchell Richters
1f807792af Duke3D: Move lastInputTicks from DukePlayer_t struct to PlayerData_t struct.
Better location for it since it never needs to be sent across the wire in a multiplayer situation. It's now also located where the other properties to do with input being tied to frame-rate are located.
2020-05-14 10:00:16 +02:00
Mitchell Richters
22ae4182b5 RR: Properly reset pPlayer->lastInputTicks in G_EnterLevel() since all calls to P_ResetPlayer() are commented out.
Repairs issue with player spinning out of control when entering a new level.
2020-05-13 15:12:44 +02:00
Mitchell Richters
d411defd04 RR: Reset one_eighty_count if player angle input is detected. 2020-05-13 15:12:44 +02:00
Mitchell Richters
2c13e746c5 Duke3D: Reset one_eighty_count if player angle input is detected. 2020-05-13 15:12:44 +02:00
Mitchell Richters
5f59c1364c RR: Process one_eighty_count (Turn-around key) at frame-rate. 2020-05-13 15:12:44 +02:00
Mitchell Richters
2129d3b4e7 Duke3D: Process one_eighty_count (Turn-around key) at frame-rate. 2020-05-13 15:12:44 +02:00
Mitchell Richters
5299a0625d RR: Process q16rotscrnang and q16look_ang at frame-rate.
Had to move lastInputTicks to the DukePlayer_t struct. When first running P_GetInput(), the initial value of elapsedInputTicks is the actual value of timerGetHiTicks(), which is into the thousands. This high initial value was affecting how scaleAdjustmentToInterval() scales as it was taking an initial q16look_ang value of 512 and overflowing the fix16_t type, making it -32,768.
2020-05-13 15:12:44 +02:00
Mitchell Richters
22e9396feb RR: Promote look_ang to Q16.16. 2020-05-13 15:12:44 +02:00
Mitchell Richters
21e58160bf RR: Promote rotscrnang to Q16.16. 2020-05-13 15:12:44 +02:00
Mitchell Richters
3af6ad697b Duke3D: Process q16rotscrnang and q16look_ang at frame-rate.
Had to move lastInputTicks to the DukePlayer_t struct. When first running P_GetInput(), the initial value of elapsedInputTicks is the actual value of timerGetHiTicks(), which is into the thousands. This high initial value was affecting how scaleAdjustmentToInterval() scales as it was taking an initial q16look_ang value of 512 and overflowing the fix16_t type, making it -32,768.
2020-05-13 15:12:44 +02:00
Mitchell Richters
de0cc8f164 Duke3D: Promote look_ang to Q16.16. 2020-05-13 15:12:44 +02:00
Mitchell Richters
ac4b33a770 Duke3D: Promote rotscrnang to Q16.16. 2020-05-13 15:12:44 +02:00
Mitchell Richters
3749a89d6a Build: Change renderSetRollAngle() to take a float and not an int32_t. 2020-05-13 15:12:44 +02:00
Mitchell Richters
bece408548 Exhumed: Set scaleAdjustmentToInterval to correct value for game's ticrate. 2020-05-13 15:10:18 +02:00
Richard C. Gobeille
98f4bac708 Exhumed: fix stupid input scaling bug 2020-05-11 21:27:29 +02:00
Richard C. Gobeille
1c79e6e17c SW: fix stupid input scaling bug 2020-05-11 21:27:29 +02:00
Richard C. Gobeille
c5e4c9631d RR: fix stupid input scaling bug 2020-05-11 21:27:29 +02:00
Mitchell Richters
e7621b4e05 RR: Properly scale tilt_status on vehicles with input being tied to frame-rate. 2020-05-11 21:27:29 +02:00
Mitchell Richters
da04a1d0aa RR: Return to centre improvements.
- Lock player horizon while returning to centre.
- Precisely scale player's horizon in time with rate at which 'pPlayer->return_to_center' decrements.
- Check player's horizon is between 99 and 101 degrees, not 99.9 and 100.1. The extra 0.9 degrees of precision is not noticeable and is dramatically slower.
- Reset 'pPlayer->return_to_center' to '0' when player's horizon is at 100.
- Match q16horizoff precision to precision of q16horiz.
2020-05-11 21:27:29 +02:00
Mitchell Richters
549ff75b99 RR: Change horizSkew from fix16_t to int8_t.
- No point converting an int to fix16, only to convert it back. It's only ever an unrounded integer.
2020-05-11 21:27:29 +02:00
Mitchell Richters
742974c61c Duke3D: Return to centre improvements.
- Lock player horizon while returning to centre.
- Precisely scale player's horizon in time with rate at which 'pPlayer->return_to_center' decrements.
- Check player's horizon is between 99 and 101 degrees, not 99.9 and 100.1. The extra 0.9 degrees of precision is not noticeable and is dramatically slower.
- Reset 'pPlayer->return_to_center' to '0' when player's horizon is at 100.
- Match q16horizoff precision to precision of q16horiz.
2020-05-11 21:27:29 +02:00
Mitchell Richters
ae353b93fb Duke3D: Change horizSkew from fix16_t to int8_t.
- No point converting an int to fix16, only to convert it back. It's only ever an unrounded integer.
2020-05-11 21:27:29 +02:00
Mitchell Richters
c7d3753c2b Revert "RR: Fix hard landing from preventing vertical mouse movement with player input tied to frame-rate."
This reverts commit 4bc105ec07.
2020-05-11 21:27:29 +02:00
Mitchell Richters
d088795f28 Revert "Duke3D: Fix hard landing from preventing vertical mouse movement with player input tied to frame-rate."
This reverts commit 6dcd83b734.
2020-05-11 21:27:29 +02:00
Mitchell Richters
9cc86bd003 RR: Restore old interpolations when camera is chasing actor who whacked you (idea from NY00123). 2020-05-11 21:26:34 +02:00
Mitchell Richters
d30bf548bd Duke3D: Restore old interpolations when camera is chasing actor who whacked you (idea from NY00123). 2020-05-11 21:26:34 +02:00
Richard C. Gobeille
3b6b1a3063 Fix stupid typo that broke the camera aiming at the enemy that killed you in Duke3D 2020-05-11 21:26:34 +02:00
Mitchell Richters
aad2b3a782 - hacks to make IF launch again after gamefunc changes in 57cb22f135.
Also re-ordered gamefuncs to 1:1 match EDuke32.
2020-05-11 13:30:14 +02:00
Mitchell Richters
8730bd9dda - allow game's clock to keep running while paused (restores interpolations/animations in menus). 2020-05-08 21:23:02 +02:00
Mitchell Richters
401e87f3d9 RR: Remove left-over else statement that should have been removed in 0ec2b87. 2020-05-08 10:51:59 +02:00
Mitchell Richters
d58f90de19 RR: Properly lock player movement when necessary while in a vehicle.
- This makes map follow mode work as expected again.
2020-05-08 10:51:59 +02:00