Commit Graph

2978 Commits

Author SHA1 Message Date
hendricks266 f4fda7e646 SW: Fix crash issues when Track sprites are set up incorrectly
git-svn-id: https://svn.eduke32.com/eduke32@8485 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-22 15:19:55 +01:00
hendricks266 e50cdbad0c SW, KenBuild: Remove some unnecessary #ifdef RENDERTYPEWIN
git-svn-id: https://svn.eduke32.com/eduke32@8482 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/kenbuild/src/config.cpp
#	source/sw/src/config.cpp
#	source/sw/src/game.cpp
2019-12-22 15:19:15 +01:00
hendricks266 acd56e319a SW: Add tailspritefree to savegames
git-svn-id: https://svn.eduke32.com/eduke32@8481 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/save.cpp
#	source/sw/src/sounds.cpp
2019-12-22 15:16:58 +01:00
hendricks266 f10ea8e630 Add check against MAXVOXELS in qloadkvx
git-svn-id: https://svn.eduke32.com/eduke32@8472 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/engine.cpp
2019-12-22 15:13:30 +01:00
hendricks266 deec38c827 Expose nextvoxid variable
This allows game and defs to not overwrite each other's voxels.

git-svn-id: https://svn.eduke32.com/eduke32@8471 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/kenbuild/src/bstub.cpp
#	source/kenbuild/src/game.cpp
#	source/sw/src/bldscript.cpp
#	source/sw/src/jnstub.cpp
2019-12-22 15:12:49 +01:00
hendricks266 f03bc3656f SW: Add call to palettePostLoadLookups
git-svn-id: https://svn.eduke32.com/eduke32@8469 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/jnstub.cpp
2019-12-22 15:11:13 +01:00
hendricks266 abd79c18c1 Defs: Add tilefromtexture subtoken "ifmatch", with subtokens "crc32" and "size"
git-svn-id: https://svn.eduke32.com/eduke32@8465 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/build.h
#	source/build/src/defs.cpp
#	source/build/src/tiles.cpp
2019-12-22 15:10:24 +01:00
hendricks266 777b895748 Defs: Minor ifcrc cleanup
git-svn-id: https://svn.eduke32.com/eduke32@8464 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/build.h
#	source/build/src/defs.cpp
#	source/build/src/tiles.cpp
2019-12-22 15:07:26 +01:00
CommonLoon102 b7479b567d Revert tiny Caleb flameguy fix (#254) 2019-12-21 10:43:11 +01:00
Christoph Oelckers fffe1753ec - removed a few unused bits of code. 2019-12-19 20:04:17 +01:00
Christoph Oelckers 3cb68b2bf0 - replaced the semi-broken screenshot name generator.
Also took this file out of the 'build' folder, now that all code in here comes from elsewhere.
This also removes a few dead declarations.
2019-12-19 19:47:51 +01:00
Christoph Oelckers ee93c6e366 - fixed voxel lighting.
In all that impenetrable voodoo math from Polymost it picked the wrong vector to calculate the depth of the scene and since I apparently removed the compensation math for the broken shader on the C++ side the calculated value was no longer correct.
That Polymost renderer really needs to go away. :(
2019-12-19 17:51:33 +01:00
Christoph Oelckers a38077a17e - clear the intermittent sound ticker when the sound gets checked. 2019-12-19 12:08:01 +01:00
Christoph Oelckers aa8452a4b0 - backported IsSourcePlayingSomething fix from GZDoom. 2019-12-19 11:47:47 +01:00
Christoph Oelckers c056a53792 - fixed ANM playback in Shadow Warrior and removed the rather pointless caching for the ANM files. 2019-12-19 10:18:05 +01:00
Christoph Oelckers c35ebeadff - fixed: Global sounds were started as 3D if anything but ATTN_NONE was used, regarding in them not playing. 2019-12-19 09:43:43 +01:00
Christoph Oelckers ef01c34346 - fixed status bar initialization for all games.
Also deleted a few obsolete config variables for the old menu.
2019-12-19 09:31:39 +01:00
Christoph Oelckers e348fcb843 - fixed playback on the wrong sound channel. 2019-12-19 09:29:23 +01:00
Christoph Oelckers 92c8e4c110 - maintain ambient sounds in a separate structure. 2019-12-19 01:20:43 +01:00
Christoph Oelckers 52d13f5ee0 - fixed a few sound issues in Shadow Warrior.
Ingame sound appears to be mostly working, menu doesn't yet.
2019-12-18 23:18:23 +01:00
Christoph Oelckers a6395c0ed9 - be gone, MultiVoc. 2019-12-18 22:50:37 +01:00
Christoph Oelckers 2cf9a4a626 - removed leftpver music calls as well.
The code should now be free of the old audio backend.
2019-12-18 22:32:09 +01:00
Christoph Oelckers 3f9657b96a - removed all leftover dependencies on the old sound backend. 2019-12-18 22:24:50 +01:00
Christoph Oelckers 591ace496f - SW sound refactoring complete, not tested yet. 2019-12-18 22:13:19 +01:00
Christoph Oelckers a087d566ee - more refactoring on SW's sound system:
* removed all cases of getting a sound handle and checking it later.
* In particular, refactor the cases where the handle is stored in a static local variable. These are fundamentally unsafe because nothing maintains these local variables.
* finished rewriting the PlaySound function. Let's hope this is what was intended, the entire coding here was not particularly good, mixing high and low level sound handling all on the same level.
* call the update routine each tic and not merely every 4th or 8th one, this kind of granularity was ok in 1997 but not with a modern sound engine.
2019-12-18 19:17:37 +01:00
Christoph Oelckers 43c66d07ae Merge branch 'master' into sound 2019-12-18 11:23:20 +01:00
hendricks266 434ed57337 Fix rotatesprite widescreen pinning in 5:4
git-svn-id: https://svn.eduke32.com/eduke32@8454 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-18 11:20:30 +01:00
hendricks266 1ccda16e8e Avoid shadowed variable in dorotatesprite
Backported from PCExhumed.

git-svn-id: https://svn.eduke32.com/eduke32@8446 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-18 11:18:58 +01:00
hendricks266 90412527e0 Improve accuracy of sepldist when one dimension is zero
Backported from Rednukem.

git-svn-id: https://svn.eduke32.com/eduke32@8442 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/common.h
2019-12-18 11:17:37 +01:00
hendricks266 5f748fc17e Expose hitscangoal variable
Backported from NBlood.

git-svn-id: https://svn.eduke32.com/eduke32@8439 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-18 11:15:22 +01:00
hendricks266 efc7365df9 Fix the interpretation of old-format PALETTE.DAT
Backported from PCExhumed.

git-svn-id: https://svn.eduke32.com/eduke32@8436 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/palette.cpp
2019-12-18 11:14:47 +01:00
hendricks266 6eec629cfd Expose blackcol variable, containing the palette index closest to #000000
Backported from PCExhumed.

git-svn-id: https://svn.eduke32.com/eduke32@8433 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-18 11:13:00 +01:00
hendricks266 120a2b4ca7 Remove arbitrary check on numshades == 32
Backported from PCExhumed.

git-svn-id: https://svn.eduke32.com/eduke32@8432 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-18 11:12:41 +01:00
Christoph Oelckers 75c76ccf66 - changed SW's PlaySound interface to take pointers to objects instead of pointers to coordinates.
With pointers to coordinates the sound engine cannot work, so this had to be changed globally.
2019-12-18 11:09:01 +01:00
Christoph Oelckers a7075bc1b0 - SW sound WIP
* removed old sound loading code, which was the last bit to use cacheAllocateBlock which is also gone now.
* cleanup of player sound code. All game side tracking of the sound resources has been removed.

does not compile yet.
2019-12-17 23:25:07 +01:00
Christoph Oelckers 650b53454d - cleaned up SW sound code a bit and thinned out the original console code 2019-12-17 21:33:53 +01:00
Christoph Oelckers 7916b16efc - fixed undefined behavior with iterating over null unique_ptrs.
I have no idea why this works most of the time - it should crash right away.
2019-12-17 20:08:59 +01:00
Christoph Oelckers 706157d623 - converted Blood's sound system to the OpenAL sound engine.
Now, this code was one big mess of strange design, let's hope it sounds better with a real 3D mixer now.
2019-12-17 19:37:05 +01:00
Christoph Oelckers 4d5755ca67 - update of the sound engine for unlimited channels per source.
Blood needs this.
2019-12-17 00:29:38 +01:00
Christoph Oelckers fa7638c446 - removed the old sound system header from Duke and RR frontends and fixed every report this produced:
* reverb/echo is not yet implemented, so there's two stub functions for now.
* RTS needs to be done differently, because the sound engine cannot play raw buffers without any control data.
2019-12-16 19:18:03 +01:00
Christoph Oelckers fbfb1972b8 - fixed a few places where the wrong sound ID was checked. 2019-12-16 17:41:44 +01:00
Christoph Oelckers 3cba51cfd4 - missed one line. 2019-12-16 17:02:35 +01:00
Christoph Oelckers d24bd0fc14 - added refactored sound code to RR frontend.
- removed most code using the low level sound interface directly from Duke and RR frontends.
2019-12-16 16:18:47 +01:00
Christoph Oelckers a66fc98d24 - a few more tweaks of the sound system.
* removed the distance hack for explosions and replaced it with a lowered attenuation. The distance hack combined with the rolloff hack forced these sounds to always be unattenuated, even when at the far end of a level. Now they fade, but much less than other sounds.
* increased the default NearLimit to 6. For some sounds 4 is not enough and this needs a global limit that works for everything.
2019-12-16 13:41:57 +01:00
Christoph Oelckers b38d8a6dc2 - fixed 16 bit VOC loader. 2019-12-16 13:18:27 +01:00
Christoph Oelckers fd9a3a9f16 - fixed lump filtering. 2019-12-16 13:03:22 +01:00
Christoph Oelckers 84b6a89057 - fixed inconsistent coordinate system transformations
- fixed bad sound ID being passed in S_CalcDistAndAng;
- cleaned up CalcPosVel.
- lowered the volume of unattenuated sounds a bit. They were disproportionately loud compared to the old sound system.
2019-12-16 13:02:43 +01:00
Christoph Oelckers 9adb4dd98d - pass correct sound ID to frontend for position calculation and minor improvements on debug printer. 2019-12-16 12:32:42 +01:00
Christoph Oelckers ea9a84752f - switched the volume slider to the OpenAL backend. 2019-12-16 09:32:58 +01:00
Christoph Oelckers b1b33ef231 - fixed hang with skill sound on game start.
This waits inside code where S_Update wasn't called. To make things clearer the waiting loop was moved closer to where it gets played.
2019-12-16 09:19:04 +01:00
Christoph Oelckers 938db6d35d - sounds in the menu are working now.
Since the in-game sound is paused in the menu these sounds need the CHAN_UI flag to play.
2019-12-16 08:19:57 +01:00
Christoph Oelckers 9b9c009de9 - copybyte is not the same as memcpy.
It should be inlined to use it, though, because homegrown loops for this stuff may have been ok in 1995, but not in 2019.
2019-12-15 21:06:41 +01:00
Christoph Oelckers c9198729b0 - did some tweaks to the sound.
The angle was wrong and the rolloff type apparently as well. It sounds a lot better now, especially after also altering the minimum distance for the rolloff. This one is interesting, it looks like a bug where the desired value was shifted two bits too much, quadrupling the distance where volume reduction starts.
2019-12-15 20:55:15 +01:00
Christoph Oelckers 22ef66209d - sound is finally playing, but the volume needs balancing and positioning doesn't seem to be 100% correct. 2019-12-15 20:16:36 +01:00
Christoph Oelckers 4f9eda189a - a few sounds play, but it's still very buggy. 2019-12-15 19:00:41 +01:00
Christoph Oelckers 38dc39b8cd - got it to start, cannot hear anything... 2019-12-15 17:16:11 +01:00
Christoph Oelckers d7ddd620e4 - added some final missing pieces to the sound code. 2019-12-15 16:32:39 +01:00
Christoph Oelckers a28cd17454 - refactoring of DN3D sound code complete but not tested yet. 2019-12-15 13:34:00 +01:00
Christoph Oelckers 62660e76f3 - sound system rework. Not complete. 2019-12-15 10:00:25 +01:00
Christoph Oelckers dba1a348d5 Merge branch 'master' into sound 2019-12-15 07:57:48 +01:00
nukeykt 9cc8dee5fe Add guard to prevent OOB error 2019-12-15 07:54:29 +01:00
nukeykt 1719b70559 Oops, i've missed do while here
# Conflicts:
#	source/rr/src/game.cpp
2019-12-15 07:54:27 +01:00
Christoph Oelckers d23b4a7e33 - hooked up ZDoom' joystick code and removed the remaining parts of the old MACT input library. 2019-12-14 20:15:15 +01:00
Christoph Oelckers 957d997353 - made joystick configuration menu operational. 2019-12-14 19:21:49 +01:00
Christoph Oelckers 6c1a8fb8c2 - cleaned out a bit more unused code. 2019-12-14 17:47:48 +01:00
Christoph Oelckers 91f83d4c55 - input code cleanup and addition of ZDoom's joystick code, which is not fully connected yet. 2019-12-14 17:15:17 +01:00
nukeykt f2dd7326d0 Backport changes related to timing from mainline
# Conflicts:
#	source/rr/src/game.cpp
2019-12-14 00:21:32 +01:00
nukeykt bff0646263 Recalculate horizycent because ydim can be changed in renderSetTarget 2019-12-14 00:20:58 +01:00
Christoph Oelckers 773c480940 - this sound system is too insane to be ported. 2019-12-12 21:42:58 +01:00
Christoph Oelckers c5c2873223 - added GZDoom's sound engine.
This is not connected with the games yet.
2019-12-12 19:21:36 +01:00
Christoph Oelckers b5cc3ef883 - moved a few bits of code around in Duke's sounds.cpp.
- refactored the only place in the entire code that used the return of S_PlaySound.
2019-12-12 18:43:27 +01:00
Christoph Oelckers 86dc909559 - added detection logic for zipped versions of the Cryptic Passage add-on for Blood and the Route66 add-on for Redneck Rampage.
- added command line options to load the original file dump of both mods in the game directory.
- both also require loading additional non-standard-named .art files
2019-12-11 23:41:05 +01:00
Christoph Oelckers 7942bc9490 - completed work on Shadow Warrior main menu.
This one will definitely be a problem for localization because the font is extremely large.
2019-12-11 20:35:25 +01:00
Christoph Oelckers 95625567e0 - fixed compile errors. 2019-12-11 18:40:42 +01:00
Christoph Oelckers 3f524d7026 - set currentLevel in SW 2019-12-11 02:30:34 +01:00
Christoph Oelckers 875678f20b - transitioned Shadow Warrior to the global mapinfo 2019-12-11 02:01:11 +01:00
Christoph Oelckers 250dd36289 - this better uses currentLevel for consistency 2019-12-11 01:19:32 +01:00
Christoph Oelckers ec96ae8992 - cleanup of -map setup. 2019-12-11 01:11:35 +01:00
Christoph Oelckers cb051b44ea - removed unused compression records from savegame header 2019-12-11 01:10:59 +01:00
Christoph Oelckers 69fd6cf69d - removed currentBoardFilename
This was only used for displaying the name for user maps, everything else was using other means of getting the data already, and even here currentLevel is better suited.
2019-12-11 01:01:03 +01:00
Christoph Oelckers 5c0cd5114d - transitioned Blood to the common mapinfo system. 2019-12-11 00:57:53 +01:00
Christoph Oelckers cc33c6a0ed - deactivate statistics for user maps.
This really isn't controllable.
2019-12-10 23:11:02 +01:00
Christoph Oelckers ebb43f9129 - use the currentLevel record for the status screens. What was there could be broken by scripts thanks to the non-existent access control to critical variables.
- give the final map in RR a proper mapinfo record. Without this the map is not really stable with the current savegame system.
2019-12-10 23:04:06 +01:00
Christoph Oelckers 0e19d4262e - savegame and mapinfo cleanup in DN3D and RR frontends.
Also added an "end game" flag to the mapinfo. For those who like to assemble single levels into custom episodes. More features for that to come. ;)
2019-12-10 22:22:59 +01:00
Christoph Oelckers 4cc22e155f - better handling for maps without names.
Use the file's base part as name if that happens.
2019-12-10 17:35:28 +01:00
Christoph Oelckers db29fc1a01 - removed the mostly useless changelevel CCMDs.
It makes more sense to do a real 'map' CCMD instead once the level management is working properly.
2019-12-10 17:25:45 +01:00
Christoph Oelckers 4f04fe66de - transitioned RR to the new mapinfo 2019-12-10 00:31:55 +01:00
Christoph Oelckers 3b57f38e55 - started transitioning to a global mapinfo list.
This will make it a lot easier for cross-game parts of the engine to query game state.
So far the EDuke frontend has been ported over.
2019-12-10 00:01:45 +01:00
Christoph Oelckers 16818d2d71 - exported Shadow Warrior strings to stringtable.
The MP obituaries are not handled yet, they were only copied but there's no code using them.
2019-12-09 21:19:05 +01:00
Christoph Oelckers 6ef1f96b40 - added SWP's parser for theme music definitions.
Because, why not? The SWCustom I use already contains them.
However, since the original source does not play theme MIDIs - only CDA, there's a switch to disable them.
2019-12-09 20:12:54 +01:00
Christoph Oelckers e62f6cbc20 - weapon and ammo names are now also localizable. 2019-12-09 19:49:36 +01:00
Christoph Oelckers da1900dc8a - same for inventory pickup messages. 2019-12-09 19:00:30 +01:00
Christoph Oelckers 670c8b1408 - use the quote array to store the key, door and fortune cookie messages in Shadow Warrior.
This is infinitely better than leaking char pointers.
2019-12-09 18:40:07 +01:00
Christoph Oelckers 782dfcdc54 - changed licenses in a few files.
These originated from GZDoom and originally contained original Doom code, but for Demolition the offending parts are no longer present so the ZDoom-BSD license applies now.
2019-12-09 17:29:31 +01:00
Christoph Oelckers f658b0f33d - deleted duplicated music code.
Apparently this got back in with some cherry pick.
2019-12-09 17:29:31 +01:00
hendricks266 0d7fc1263e Improve diagnostic printing of slopalookup overflows
git-svn-id: https://svn.eduke32.com/eduke32@8419 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-09 17:25:25 +01:00
hendricks266 b71ef4a140 Fix regression in software rendering of slopes in r8363
git-svn-id: https://svn.eduke32.com/eduke32@8418 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-09 17:25:16 +01:00
Christoph Oelckers ba978ab0d9 - text update and missing includes. 2019-12-09 17:17:15 +01:00
Christoph Oelckers 5e9b874610 - exported most of Blood's text to the string table
MP messages with %s yet to do.
2019-12-09 02:01:30 +01:00
Christoph Oelckers 0604c72586 - code cleanup
removed some unused definitions
replaced the copybuf* functions with memcpy. These days doing homegrown copy loops is not efficient anymore.
2019-12-09 01:39:40 +01:00