Commit Graph

2556 Commits

Author SHA1 Message Date
Christoph Oelckers 918d121d99 - fixed missing include paths 2019-10-25 02:07:46 +02:00
Christoph Oelckers 5cf5c74695 - let kopenFileReader have a look into demolition.pk3 if nothing else is found.
This should help as long as the old resource management is still in place.
2019-10-25 02:01:52 +02:00
Christoph Oelckers 60fc828a89 - converted the 3 new CVARs in the audio code. 2019-10-25 02:01:36 +02:00
Christoph Oelckers e8cf6c3d32 - fixed mus_device CVar and reenabled WinMM device. 2019-10-24 21:02:07 +02:00
Christoph Oelckers 9648c026a9 - small adjustments 2019-10-24 20:36:18 +02:00
Christoph Oelckers 8730ce552b - make things compile again.
Let's hope it still works...
2019-10-24 20:28:46 +02:00
Christoph Oelckers 082fcfeef0 - manual update of audiolib 2019-10-24 19:59:09 +02:00
nukeykt df415605ae Use gameHandleEvents for time updating
# Conflicts:
#	source/blood/src/gui.cpp
2019-10-24 19:49:57 +02:00
nukeykt 01d63d19e9 Fix crash with WinMM driver 2019-10-24 19:49:51 +02:00
nukeykt 7f094d3a73 Fix music init code
# Conflicts:
#	source/blood/src/config.cpp
#	source/blood/src/menu.cpp
#	source/blood/src/osdcmd.cpp
2019-10-24 19:49:50 +02:00
nukeykt e6f53f7c30 Resolve merge issues
# Conflicts:
#	GNUmakefile
#	platform/Windows/eduke32.sln
#	platform/Windows/props/build_common.props
#	source/audiolib/include/music.h
#	source/blood/src/blood.cpp
#	source/blood/src/gui.cpp
#	source/blood/src/mapedit.cpp
#	source/blood/src/sound.cpp
#	source/build/include/vfs.h
#	source/build/src/vfs.cpp
2019-10-24 19:48:11 +02:00
hendricks266 4ca1af72c3 SW: Load swtimbr.tmb
git-svn-id: https://svn.eduke32.com/eduke32@8262 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/sounds.cpp
2019-10-24 19:46:29 +02:00
hendricks266 c6c7c91d7c Add MIDI_GetDevice and use it so that the default driver value doesn't show as "Custom" in the menu
git-svn-id: https://svn.eduke32.com/eduke32@8261 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:44:22 +02:00
hendricks266 7650cbe592 Fix calls to FX_ErrorString and MUSIC_ErrorString
git-svn-id: https://svn.eduke32.com/eduke32@8260 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/duke3d/src/sounds.cpp
#	source/duke3d/src/sounds_mapster32.cpp
#	source/sw/src/sounds.cpp
2019-10-24 19:44:21 +02:00
hendricks266 553dfb3544 Prefer early return on error in sound and MIDI init functions
git-svn-id: https://svn.eduke32.com/eduke32@8259 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/duke3d/src/sounds.cpp
#	source/duke3d/src/sounds_mapster32.cpp
#	source/sw/src/sounds.cpp
2019-10-24 19:43:51 +02:00
hendricks266 14996d930b Prefer "MIDI driver" to "Music device"
git-svn-id: https://svn.eduke32.com/eduke32@8258 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/duke3d/src/sounds_mapster32.cpp
#	source/sw/src/sounds.cpp
2019-10-24 19:42:54 +02:00
hendricks266 55744eff09 Remove second EMIDICard / ForceEMIDI parameter from MUSIC_Init which only served to clobber the value entered using the cvar
git-svn-id: https://svn.eduke32.com/eduke32@8257 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:41:50 +02:00
hendricks266 9215812ed6 Remove obsolete comments now that the MIDI objects are back in their rightful location
git-svn-id: https://svn.eduke32.com/eduke32@8254 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:41:34 +02:00
terminx d1ccbab5ea Boost OPL3 output to about the level of WinMM
git-svn-id: https://svn.eduke32.com/eduke32@8240 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:28:16 +02:00
terminx 8827a0e84b Retain friendly names for audiolib drivers disabled at compile time
git-svn-id: https://svn.eduke32.com/eduke32@8239 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:28:15 +02:00
terminx dafd71c72f Add mus_al_additive to control the behavior mentioned in r8232 and rename mus_adlibstereo to mus_al_stereo
git-svn-id: https://svn.eduke32.com/eduke32@8238 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:28:14 +02:00
terminx e82ddb23d3 Better stereo suppport in OPL3 emulator
Patch from Nuke.YKT

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

# Conflicts:
#	source/audiolib/include/opl3.h
#	source/audiolib/src/opl3.cpp
2019-10-24 19:28:13 +02:00
terminx 9b97f504bb Fix issue with tempo when changing back and forth between OPL3 and WinMM MIDI output
git-svn-id: https://svn.eduke32.com/eduke32@8236 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:27:57 +02:00
terminx 5de8dad179 Fix mus_adlibstereo
git-svn-id: https://svn.eduke32.com/eduke32@8233 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/audiolib/include/al_midi.h
2019-10-24 19:27:22 +02:00
terminx 247e6bcc26 Revert a copy/paste error fix in the AdLib code because the fixed version doesn't work right with the timbres Blood ships with
git-svn-id: https://svn.eduke32.com/eduke32@8232 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:27:17 +02:00
terminx f0acbc1ca5 Fix AdLib timbre loading
git-svn-id: https://svn.eduke32.com/eduke32@8231 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:27:16 +02:00
terminx 47942db0a3 Fix min/max values for audiolib cvars
git-svn-id: https://svn.eduke32.com/eduke32@8230 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/audiolib/include/al_midi.h
2019-10-24 19:27:15 +02:00
terminx 5853fe1cc6 Prefer uint32_t over unsigned int
git-svn-id: https://svn.eduke32.com/eduke32@8225 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/audiolib/src/_al_midi.h
2019-10-24 19:26:30 +02:00
terminx 4ff4fddf62 The constening
git-svn-id: https://svn.eduke32.com/eduke32@8224 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/audiolib/include/al_midi.h
2019-10-24 19:26:23 +02:00
terminx ff10fdf929 Add mus_adlibstereo cvar to enable and disable AdLib stereo mode
git-svn-id: https://svn.eduke32.com/eduke32@8223 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:26:16 +02:00
terminx 8a61ceeb36 Add a cvar array for audiolib
git-svn-id: https://svn.eduke32.com/eduke32@8222 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:26:15 +02:00
terminx a2ab5492cc Further small midi cleanup changes--nothing functional
git-svn-id: https://svn.eduke32.com/eduke32@8221 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/audiolib/include/al_midi.h
#	source/audiolib/src/_al_midi.h
2019-10-24 19:26:14 +02:00
terminx 6fa287c767 Further AdLib cleanup... leaving this in a separate commit in case I fucked something up
git-svn-id: https://svn.eduke32.com/eduke32@8220 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:25:49 +02:00
terminx 8eb5233232 Further audiolib work... I think this is almost done!
git-svn-id: https://svn.eduke32.com/eduke32@8219 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	GNUmakefile
#	platform/Windows/audiolib.vcxproj
#	platform/Windows/audiolib.vcxproj.filters
#	platform/Windows/build.vcxproj
#	platform/Windows/build.vcxproj.filters
#	source/audiolib/include/al_midi.h
#	source/audiolib/src/_al_midi.h
#	source/duke3d/src/osdcmds.cpp
#	source/duke3d/src/sounds.cpp
2019-10-24 19:25:48 +02:00
terminx 8a1681fb5a More audiolib work
git-svn-id: https://svn.eduke32.com/eduke32@8218 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/audiolib/src/music.cpp

# Conflicts:
#	GNUmakefile
#	platform/Windows/audiolib.vcxproj
#	platform/Windows/audiolib.vcxproj.filters
#	source/duke3d/src/menus.cpp
2019-10-24 19:25:09 +02:00
terminx 8b20118026 Audiolib rework WIP
This attempts to rectify the differences between versions of JFAudiolib created after we forked the code, and the extra features contained in Nuke.YKT's fork of our version.

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

# Conflicts:
#	GNUmakefile
#	platform/Windows/audiolib.vcxproj
#	platform/Windows/audiolib.vcxproj.filters
#	platform/Windows/eduke32.vcxproj
#	platform/Windows/eduke32.vcxproj.filters
#	source/audiolib/include/fx_man.h
#	source/audiolib/include/multivoc.h
#	source/audiolib/src/flac.cpp
#	source/audiolib/src/formats.cpp
#	source/audiolib/src/fx_man.cpp
#	source/audiolib/src/vorbis.cpp
#	source/audiolib/src/xa.cpp
#	source/audiolib/src/xmp.cpp
#	source/duke3d/src/sounds_mapster32.cpp

# Conflicts:
#	Common.mak
#	GNUmakefile
#	platform/Windows/audiolib.vcxproj
#	platform/Windows/audiolib.vcxproj.filters
#	platform/Windows/eduke32.vcxproj
#	platform/Windows/eduke32.vcxproj.filters
#	source/audiolib/include/multivoc.h
#	source/audiolib/src/vorbis.cpp
#	source/duke3d/src/config.cpp
#	source/duke3d/src/game.h
#	source/duke3d/src/osdcmds.cpp
#	source/duke3d/src/sounds_mapster32.cpp
2019-10-24 19:24:31 +02:00
terminx a1f08f2465 New files for audiolib
This is in a separate commit just to make the changes to existing files easier to go through.

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

# Conflicts:
#	source/audiolib/include/midi.h
#	source/audiolib/src/_midi.h
#	source/audiolib/src/al_midi.cpp
#	source/audiolib/src/midi.cpp
#	source/audiolib/src/music.cpp
#	source/audiolib/src/oplmidi.cpp
#	source/duke3d/src/midi.cpp

# Conflicts:
#	source/audiolib/src/al_midi.cpp
#	source/audiolib/src/midi.cpp
#	source/audiolib/src/music.cpp
2019-10-24 19:22:49 +02:00
terminx d6e52ed526 Use SDL audiolib driver on Windows
This shitcans the SDL_mixer requirement but leaves platforms other than Windows without built-in MIDI playback capability until Nuke.YKT's OPL3 emulator is merged. This also reworks sdlmusic.cpp into music_external.cpp, including an untested port of the code to Windows.

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

# Conflicts:
#	GNUmakefile
#	platform/Windows/eduke32.vcxproj
#	platform/Windows/props/build_common.props
#	source/audiolib/src/sdlmusic.cpp

# Conflicts:
#	Common.mak
#	GNUmakefile
#	platform/Windows/audiolib.vcxproj
#	platform/Windows/eduke32.vcxproj
#	platform/Windows/eduke32.vcxproj.filters
#	platform/Windows/props/build_common.props
#	source/audiolib/src/driver_sdl.cpp
#	source/audiolib/src/sdlmusic.cpp
#	source/build/include/vfs.h
#	source/build/include/winbits.h
#	source/build/src/winbits.cpp
2019-10-24 19:22:06 +02:00
terminx c0b7745013 Misc audiolib cleanups
git-svn-id: https://svn.eduke32.com/eduke32@8213 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/audiolib/src/fx_man.cpp
#	source/audiolib/src/multivoc.cpp

# Conflicts:
#	source/audiolib/include/multivoc.h
#	source/audiolib/src/multivoc.cpp
#	source/audiolib/src/vorbis.cpp
2019-10-24 19:20:33 +02:00
hendricks266 89cd122d14 Initialize sound before music
git-svn-id: https://svn.eduke32.com/eduke32@8255 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-24 19:06:04 +02:00
Christoph Oelckers 3ed87f449e - and the last 2 hud CVARS for Blood… 2019-10-24 01:41:55 +02:00
Christoph Oelckers 3efb54e167 - ported most of the remaining HUD CVars 2019-10-24 01:30:33 +02:00
Christoph Oelckers 966751b7e8 - added GZDoom's font code and some dependencies. 2019-10-24 01:20:58 +02:00
Christoph Oelckers 2fa5e339fc - added GZDoom's 2D drawer to the project.
So that for anything new I don't have to bother with the awful 2D interface Build provides.
2019-10-23 22:51:11 +02:00
Christoph Oelckers 20df360778 - converted the Polymost CVARs. 2019-10-23 21:11:37 +02:00
Christoph Oelckers c1041a9c37 - removed the unused DN3D menu code from the Blood subproject. 2019-10-23 19:08:41 +02:00
Christoph Oelckers ee5f0a7cf6 - cleaned out the remains of the frontends' CVAR definitions. 2019-10-23 18:58:34 +02:00
CommonLoon102 20a393871b fix compiler error: storage size of weaponQAV isn't known (#226) 2019-10-23 18:38:00 +02:00
Szilárd Biró c419fae31b Fix compiling without OpenGL 2019-10-23 18:37:56 +02:00
Szilárd Biró 0f67b74a53 SEQFRAME big endian fix 2019-10-23 18:37:55 +02:00
Christoph Oelckers 21d90fd08b - fixed compilation. 2019-10-23 18:36:48 +02:00
Christoph Oelckers 02fff2df06 - refactored wchoice and sensitivity CVARS
This is all that's needed for now, the remaining ones can wait.
2019-10-23 17:21:14 +02:00
Christoph Oelckers 18430c6c9f - refactored r_fpslimit
Also removed the entire cruft related to this - the pointless offsetting value and the precalculation of the timer value (as if we could not afford a single division for something that WAITS!

Unfortunately this required removal of the menu option for the time being.
2019-10-23 17:07:29 +02:00
Christoph Oelckers 7fd05edbba - missed one 2019-10-23 14:39:46 +02:00
Christoph Oelckers 43413e4dff - r_useprecache 2019-10-23 14:39:33 +02:00
Christoph Oelckers 63f020996e - a few more CVARs 2019-10-23 01:30:43 +02:00
Christoph Oelckers 5dec4736ce - r_drawweapon, r_showfps, r_showfpsperiod 2019-10-23 01:04:07 +02:00
Christoph Oelckers e5d38b2d30 - in_mouseflip and in_mousesmoothing
in_mousemode removed from persistent state because of how it is used.
Saving it makes no sense.
2019-10-23 00:59:01 +02:00
Christoph Oelckers b73cf76f05 - in_mousebias and in_mousedeadzone
Actually, two totally useless options being preserved for historical significance.

Urgh.
2019-10-23 00:55:48 +02:00
Christoph Oelckers c0c62fe367 - in_mouseaiming 2019-10-23 00:51:49 +02:00
Christoph Oelckers 7501120dc8 - in_mouse and in_joystick 2019-10-23 00:41:28 +02:00
Christoph Oelckers 8f06f0748d - minor CVAR cleanup and refactoring of one more 2019-10-23 00:30:51 +02:00
Christoph Oelckers 713250cc64 - refactored a few more CVARs. 2019-10-23 00:20:27 +02:00
Christoph Oelckers d476037f45 - hooked up hud_custom. 2019-10-22 23:43:16 +02:00
Christoph Oelckers fe2bb036b7 - fixed bad parameter. 2019-10-22 23:32:15 +02:00
Christoph Oelckers e5aa6c5df0 - refactored the HUD scaling into something manageable.
Blood was fine, albeit with an inverted scale, but the EDuke implementation was something very special - and not in a good way, using 4 CVARs to store the scaling state instead of one.
2019-10-22 23:31:46 +02:00
Grind Core b6c16abf6f Refactor:
- PLAYER.H structs
- ACTOR.H  structs

# Conflicts:
#	source/blood/src/db.h
#	source/blood/src/player.h
2019-10-22 17:49:59 +02:00
Christoph Oelckers a829f1cb52 - fixed all compile errors. 2019-10-22 17:47:24 +02:00
Christoph Oelckers edce0d33e3 - refactored crosshairscale CVAR 2019-10-22 17:00:22 +02:00
Christoph Oelckers bdf2d24b21 - refactored cl_weaponswitch 2019-10-22 02:31:14 +02:00
Christoph Oelckers 3f48ecd479 - 5 more Blood exclusive CVARs. 2019-10-22 02:15:24 +02:00
Christoph Oelckers 8431266d27 - refactoring of music CVARs
This is a lot of changes in a lot of code because nothing here was abstracted into the sound system. :(

Hopefully most of the affected code here can be tossed out soon, it's not pretty.
2019-10-22 02:01:05 +02:00
Christoph Oelckers d2be5a4db9 - removed the OSD CVARs
They'll be removed anyway when the current OSD is tossed.
No need to bother.
2019-10-22 01:16:02 +02:00
Christoph Oelckers 38187a1870 - simple to convert demo CVARs 2019-10-22 01:06:02 +02:00
Christoph Oelckers c5cb86bf2b - sevral simple CVARs ported 2019-10-22 01:00:22 +02:00
Christoph Oelckers 279c0caea4 - autosave variables 2019-10-22 00:58:51 +02:00
Christoph Oelckers dbe3cadd0f - refactored autorunning CVARs 2019-10-22 00:52:07 +02:00
Christoph Oelckers 87653b50d4 - these were missing. 2019-10-22 00:18:58 +02:00
Christoph Oelckers 39c6af9b0a - cl_automsg 2019-10-22 00:14:39 +02:00
Christoph Oelckers 30e9eed1b3 - the next CVAR, cl_autoaim 2019-10-22 00:05:21 +02:00
Christoph Oelckers 79d02a405e - started transitioning the CVARs.
This is going to be a lot of work consolidating the 3 frontends' settings but a necessary evil for eventually getting Shadow Warrior to work as it is quite lacking here.
2019-10-21 23:29:48 +02:00
Christoph Oelckers f7b9fb92c1 - added back ZDoom's CVAR code and hooked into the OSD.
This has the distinct advantage, aside from much cleaner coding, that it can interoperate with the gameconfigfile class.
2019-10-21 22:39:26 +02:00
Christoph Oelckers bc8578e153 - brought in GZDoom's gameconfigfile so that the settings can be transitioned to a more robust implementation. 2019-10-21 21:36:05 +02:00
Christoph Oelckers 0d737ee130 - removed all code related to the -usecwd command line switch.
While feature-wise ok this was far too scattered throughout the frontends and needs to be done in a more concise way.
2019-10-21 19:51:12 +02:00
CommonLoon102 c342d25879 disable respawn for spawned dudes (#223)
makes sense
# Conflicts:
#	source/blood/src/view.cpp
2019-10-21 19:37:39 +02:00
terminx 91dac5c73a I swear, the amount of trivial differences between toolchain setups drives me up the wall sometimes
git-svn-id: https://svn.eduke32.com/eduke32@8247 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-21 19:37:14 +02:00
terminx b2421887a1 Use stat() instead of fopen() to detect existing files when saving screenshots
git-svn-id: https://svn.eduke32.com/eduke32@8246 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-21 19:37:13 +02:00
Christoph Oelckers 72b87e5bd7 - fixed compilation. 2019-10-21 19:36:54 +02:00
Christoph Oelckers 8c7590e161 - refactored most of the remaining calls to kopen4load 2019-10-21 17:16:08 +02:00
Christoph Oelckers 1269a1715f Fixed stupid typo in class name
It should read BuildTiles, not BuildFiles.
It's a tile manager, not a file manager!
2019-10-21 09:22:55 +02:00
Christoph Oelckers 0c4ffdea43 - do not use the cache for loading voxel data
This stuff is software rendering only so should be made optional anyway.

But aside from that it was the last non-sound data, being loaded into the cache.

With this gone the sound cache can be redone as a dedicated object and the atrocious cache1d implementation be tossed out.
2019-10-21 01:17:26 +02:00
Christoph Oelckers 64959be33e - Don't use the global cache for caching tiles
Sincce the cache is scheduled for removal anyway this makes no sense, this should be handled by a more generic texture eviction logic that's needed anyway to deal with accumulating texture data.
2019-10-21 01:01:38 +02:00
Christoph Oelckers 5333f6adc1 - refactored a few more - simple stuff but lots of lines. 2019-10-21 00:13:17 +02:00
Christoph Oelckers 5022c58a63 - refactored the file access in the rest of the DN3D frontend and in some duplicated code in the Blood frontend. 2019-10-20 23:37:07 +02:00
Christoph Oelckers d3c2d8e96f - refactored file access in the movie player. 2019-10-20 22:48:21 +02:00
Christoph Oelckers 449a5a4717 - refactoring of palette loader. 2019-10-20 22:26:53 +02:00
Christoph Oelckers 6e7db1b63a - refactored file access in RR frontend's sound code. 2019-10-20 21:56:13 +02:00
terminx 9aae157e27 This helps the player not fall off of the edges of certain types of moving sectors as easily
git-svn-id: https://svn.eduke32.com/eduke32@8245 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 21:08:53 +02:00
terminx 4c28d25e3f Don't activate gamefunc_Toggle_Crouch if cheat_phase is non-zero
git-svn-id: https://svn.eduke32.com/eduke32@8244 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 21:08:51 +02:00
terminx 6f6d568720 This fixes most issues with the player clipping through the walls of rotating sectors
git-svn-id: https://svn.eduke32.com/eduke32@8243 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 21:08:50 +02:00
terminx 21025ea18f Prefer assignment of .vec2 union inside vec3_t instead of explicitly assigning .x and .y members
git-svn-id: https://svn.eduke32.com/eduke32@8242 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 21:08:49 +02:00
terminx 69a3f9e884 Band-aid fix for Duke3d E4L4 map "corruption"
The map isn't necessarily "corrupt", but it has a large water sector with half a dozen different SE7 teleporter sprites in it, of which all but one have destination SE7 sprites that are constantly moving while the matching SE7 in the large sector stays in place. When you teleport, the game code picks one. It doesn't always pick the one that matches.

Yeah, OK, it never picks the one that matches.

The area is a total clusterfuck.

git-svn-id: https://svn.eduke32.com/eduke32@8241 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 21:08:48 +02:00
Christoph Oelckers 2be5727137 - refactored all file reading in the savegame code to the FileReader interface.
In this case a different open function is used because this is normally files on the hard drive and not assets, so being able to have a different setup for finding them is important.
2019-10-20 21:04:55 +02:00
Christoph Oelckers 7cacb7203f - refactored all file access in SW frontend to use the FileReader variant and added a few utilities to avoid opening handles.
Because use of the handle API needs to be eliminated before a functioning resource management can be plugged in here.
2019-10-20 20:08:17 +02:00
Christoph Oelckers 1b96861615 - consolidated RTS code, because there were 3 copies.
Also completely rewritten to get rid of the cache dependency.
2019-10-20 19:13:44 +02:00
Christoph Oelckers bf8a2ee573 - started refactoring of file handling, starting with some nasty bits in Shadow Warrior. 2019-10-20 17:09:58 +02:00
Christoph Oelckers 06f4138202 - merge fixes in Blood frontend code. 2019-10-20 17:09:01 +02:00
Christoph Oelckers d83b3f34a3 - restored original whitespacing in blood/actor.cpp.
This ensures that future cherry picks won't conflict as badly.
2019-10-20 16:50:47 +02:00
Grind Core 70e0ed9ec4 - Refactor: added names for powerups and updated some old.
- AI: there is printing error message in conosole added (instead of dassert)
- Updates for Player Control modern type

# Conflicts:
#	source/blood/src/actor.cpp
#	source/blood/src/actor.h
#	source/blood/src/globals.cpp
#	source/blood/src/globals.h
#	source/blood/src/player.h
#	source/blood/src/sound.cpp
#	source/blood/src/triggers.cpp
#	source/blood/src/triggers.h
#	source/blood/src/view.cpp
#	source/blood/src/weapon.cpp
#	source/blood/src/weapon.h
2019-10-20 12:30:16 +02:00
terminx a278a85b3b Add const to dest parameter of MV_Reverb()
git-svn-id: https://svn.eduke32.com/eduke32@8184 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 11:53:25 +02:00
terminx 9756db95ca Use templates for audiolib mixing functions
Patch from NY00123.

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

# Conflicts:
#	source/audiolib/src/mix.cpp
#	source/audiolib/src/mixst.cpp
2019-10-20 11:51:57 +02:00
Christoph Oelckers 75205ca69c - do not throw exceptions to exit without proper handling. 2019-10-20 11:28:16 +02:00
Christoph Oelckers c3d742dda0 - really delete the textures. 2019-10-20 10:52:56 +02:00
Christoph Oelckers 489170b12c - fixed compilation again. 2019-10-20 10:52:38 +02:00
terminx 63d6e70e21 Apparently, a long while back when I limited snd_numvoices to 128 I forgot to change the menu to reflect it
git-svn-id: https://svn.eduke32.com/eduke32@8234 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 10:45:51 +02:00
Christoph Oelckers 76bceb81cd - removed time consuming load indicator from Duke3D frontend as well. 2019-10-20 10:45:50 +02:00
terminx c68c50ddca Add snd_tryformats cvar to disable automatic loading of .ogg and .flac versions of sound and music
git-svn-id: https://svn.eduke32.com/eduke32@8212 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 10:45:50 +02:00
terminx 873440f06c Fix tiny header issue
git-svn-id: https://svn.eduke32.com/eduke32@8208 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/duke3d/src/osdcmds.cpp
#	source/duke3d/src/osdcmds.h
2019-10-20 10:45:50 +02:00
terminx b8f4651ab4 Don't try videoSetGameMode() if there aren't any valid modes
git-svn-id: https://svn.eduke32.com/eduke32@8207 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 10:45:50 +02:00
Christoph Oelckers 215a7cdff3 - removed unused animlock variable. 2019-10-20 10:45:49 +02:00
terminx ca789dc4d0 Wait to run G_MoveLoop() until a frame has just been rendered
This should give G_MoveLoop() a better chance to not run past the time when another frame is to be drawn.

git-svn-id: https://svn.eduke32.com/eduke32@8195 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 10:45:49 +02:00
terminx 9fadf6032d Silence a warning
git-svn-id: https://svn.eduke32.com/eduke32@8194 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 10:45:49 +02:00
terminx ba02bbaf67 Add #pragma once to debugbreak.h and remove it from separate inclusion in a couple of translation units as we're including it directly in compat.h now
git-svn-id: https://svn.eduke32.com/eduke32@8192 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/sdlayer.cpp
#	source/duke3d/src/gamedef.cpp
2019-10-20 10:45:48 +02:00
terminx d7f779eaec Use EXIT_FAILURE and EXIT_SUCCESS from stdlib.h when calling exit()
git-svn-id: https://svn.eduke32.com/eduke32@8190 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/polymost.cpp
#	source/build/src/tiles.cpp
#	source/duke3d/src/astub.cpp
2019-10-20 10:45:48 +02:00
terminx a15c2abf46 Update LZ4 to e8baeca51ef2003d6c9ec21c32f1563fef1065b9
git-svn-id: https://svn.eduke32.com/eduke32@8186 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 10:45:48 +02:00
terminx 8d74b9562f Update xxHash to 1ea98d6a38300f7224869de856a876a2050cdf78
git-svn-id: https://svn.eduke32.com/eduke32@8185 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 10:45:48 +02:00
Christoph Oelckers 462bd8d292 - cleaned out some commented out code. 2019-10-20 10:44:51 +02:00
Christoph Oelckers 2316957026 - made things compile again after updating enet. Also removed the redundant dumb and game_music_emu libraries which just got imported by accident when using other things from GZDoom.
Note: enet uses 'malloc' and 'free' as field names in a struct - this does not work with any compiler using some sort of heap instrumentation that #defines these names!
This had to be changed to allow MSVC debug builds to compile again.
2019-10-20 09:16:01 +02:00
terminx 63713002b3 Swap out our old deprecated version of ENet for a single-file header-based fork, including features like IPv6 support
git-svn-id: https://svn.eduke32.com/eduke32@8175 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	GNUmakefile
#	libraries/enet/LICENSE
#	libraries/enet/callbacks.c
#	libraries/enet/compress.c
#	libraries/enet/enet/callbacks.h
#	libraries/enet/enet/enet.h
#	libraries/enet/enet/list.h
#	libraries/enet/enet/protocol.h
#	libraries/enet/enet/time.h
#	libraries/enet/enet/types.h
#	libraries/enet/enet/unix.h
#	libraries/enet/enet/utility.h
#	libraries/enet/enet/win32.h
#	libraries/enet/host.c
#	libraries/enet/list.c
#	libraries/enet/packet.c
#	libraries/enet/peer.c
#	libraries/enet/protocol.c
#	libraries/enet/unix.c
#	libraries/enet/win32.c
#	platform/Windows/build.vcxproj
#	platform/Windows/build.vcxproj.filters
#	platform/Windows/eduke32.sln
#	platform/Windows/eduke32.vcxproj
#	source/duke3d/src/player.cpp
2019-10-20 08:43:36 +02:00
terminx 1667d4dd87 This is useless
git-svn-id: https://svn.eduke32.com/eduke32@8170 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 08:31:49 +02:00
terminx 8b43ed5777 Rename timerUpdate() and timerGetRate() to timerUpdateClock() and timerGetClockRate(), because they both only apply to totalclock
git-svn-id: https://svn.eduke32.com/eduke32@8169 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/timer.cpp
#	source/build/src/winlayer.cpp
2019-10-20 08:31:26 +02:00
terminx 91fde580ce Use nanosleep instead of usleep
git-svn-id: https://svn.eduke32.com/eduke32@8168 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 08:29:25 +02:00
terminx ad6d94b0f5 Patch from Doom64hunter to address a couple of issues with per-map art
git-svn-id: https://svn.eduke32.com/eduke32@8167 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/tiles.cpp
2019-10-20 08:28:44 +02:00
terminx 8e088f6659 Equivalent to jfbuild commit b6a666745cea21c6f8193b046bcdd0636fb7c166
git-svn-id: https://svn.eduke32.com/eduke32@8158 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 08:17:35 +02:00
terminx 0270cc2df5 SDL_free() is not for pointers to SDL_RWops structures...
git-svn-id: https://svn.eduke32.com/eduke32@8151 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 08:16:02 +02:00
terminx c86af959b9 Add optional duration parameter to idle()
git-svn-id: https://svn.eduke32.com/eduke32@8149 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/winlayer.h
2019-10-20 08:13:22 +02:00
terminx a649130327 Clamp nextPageDelay in G_FPSLimit() to 0.0 - g_frameDelay
git-svn-id: https://svn.eduke32.com/eduke32@8148 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 08:12:26 +02:00
Christoph Oelckers 53248945e8 - added license headers. 2019-10-20 08:07:12 +02:00
Christoph Oelckers e5ddb28a2b - renamed texcache.cpp and moved it to its proper place.
The old content no longer exists, this is entirely backend code now.
2019-10-20 08:04:54 +02:00
Christoph Oelckers f29dd6c495 - include cleanup 2019-10-20 08:02:45 +02:00
Christoph Oelckers efcf447398 - moved newly added file to its proper place. 2019-10-20 07:51:35 +02:00
terminx 4dfae31900 Update xxHash to git commit cd0f5c22095c49c35104dca86620322801f14893
git-svn-id: https://svn.eduke32.com/eduke32@8142 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	platform/Windows/build.vcxproj
#	platform/Windows/build.vcxproj.filters
2019-10-20 07:50:30 +02:00
terminx 70171ea341 Use timerGetHiTicks() instead of timerGetTicks() for timing in osdfunc_fileinfo()
git-svn-id: https://svn.eduke32.com/eduke32@8141 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 07:48:16 +02:00
terminx 85dd8e31a5 G_HandleAsync() -> gameHandleEvents()
git-svn-id: https://svn.eduke32.com/eduke32@8140 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 07:48:15 +02:00
terminx 802f69d324 Partial timer cleanup
After this revision, the only place timerUpdate() is called is from within handleevents(). S_Cleanup(), MUSIC_Update(), and G_HandleSpecialKeys() are now called from a timer callback set with timerSetCallback(). This more or less deprecates the usage of faketimerhandler() in EDuke32 and Mapster32, but other games still rely on the functionality.

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

# Conflicts:
#	source/duke3d/src/astub.cpp
2019-10-20 07:48:13 +02:00
terminx 593b5740e3 Reword stupid error message that has probably never even been seen
git-svn-id: https://svn.eduke32.com/eduke32@8138 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 07:48:05 +02:00
terminx 4d3dedd4ab ifdef DEBUGGINGAIDS for this quick exit crap
this is more like regular AIDS than DEBUGGINGAIDS though

git-svn-id: https://svn.eduke32.com/eduke32@8137 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 07:48:04 +02:00
terminx 4c4ffa80b4 Use tabledivide64() in timerUpdate()
git-svn-id: https://svn.eduke32.com/eduke32@8136 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 07:48:02 +02:00
terminx b298ed19ff Ugh, apparently we rely on this for FURY
git-svn-id: https://svn.eduke32.com/eduke32@8135 1a8010ca-5511-0410-912e-c29ae57300e0
2019-10-20 07:48:01 +02:00
Christoph Oelckers 85d377647a - tweaked the fade ramp a bit.
For Duke Nukem and its direct offspring (Nam, WW2GI and Redneck Rampage) the ramp is not a linear fade from 0 to 1, it needs to be a little darker than that.
Unfortunately the proper factor needed here must be set manually, this cannot really be calculated from the lookup tables.
2019-10-20 01:14:48 +02:00
Christoph Oelckers 9437387b4a - fixed handling of FogDisabled flag 2019-10-20 00:45:47 +02:00
Christoph Oelckers abaa1d19ee - fixed some bad setup in SetTextureInternal. 2019-10-20 00:31:27 +02:00
Christoph Oelckers 2162ce1f26 - disabled the Redneck Rampage load progress indicator because it only prolongs the precaching time by waiting for the screen to be refreshed. 2019-10-19 23:19:45 +02:00
Christoph Oelckers bb4a19cf3a - added a few more texture formats to FHardwareTexture.
For brightmaps we do not need full RGBA8 data with mipmaps - RGBA2 without mipmaps is fully sufficient here and will save a lot of video memory.
2019-10-19 23:14:36 +02:00
Christoph Oelckers 7d2f61db2e - converted all boolean parameters of the shader into a single flag word.
- discarded the idea of transient palettes because the maintenance here stood in no relation to the savingd.
2019-10-19 22:46:37 +02:00
Christoph Oelckers 17816b0f63 - fixed compilation for NBlood update. 2019-10-19 20:48:59 +02:00
nukeykt 098740155b Use screentext in DrawStatNumber 2019-10-19 20:33:52 +02:00
nukeykt 182d5d2eb5 Use screentext in viewDrawText 2019-10-19 20:33:50 +02:00
nukeykt 90dc59749d Import screentext from eduke32
# Conflicts:
#	platform/Windows/nblood.vcxproj
#	platform/Windows/nblood.vcxproj.filters
2019-10-19 20:33:49 +02:00
Christoph Oelckers 6f4ca480b5 - sky clamping may only be done in Blood for now.
This needs a better solution.
2019-10-19 20:25:58 +02:00
Christoph Oelckers 5fa879d5d1 - use texture clamping for skies, because these textures do not always wrap. 2019-10-19 19:29:59 +02:00
Christoph Oelckers 39e32d560c - fixed progdir setup. 2019-10-19 19:22:23 +02:00
Christoph Oelckers d4fc13fba5 - cleaned up the sampler manager's content names and added the missing types to allow easier switching between indexed (no filtering) and non-indexed (filter as per user option). 2019-10-19 19:10:09 +02:00
Christoph Oelckers 2152780806 - added some hackery to render voxels properly again.
Something about their data preparation is not right, their depth looks totally off and causes fog to become to dense.
One more reason to reconstruct the renderer in a sane fashion.
2019-10-19 18:14:13 +02:00
Christoph Oelckers e2f9e12efb - implemented shade level based depth fading for the true color renderer. 2019-10-19 16:35:06 +02:00
Christoph Oelckers cd7bbe35a8 - removed all legacy fog code. 2019-10-19 15:52:46 +02:00
Christoph Oelckers 2ef89abe08 - reworked palookupinfo output. 2019-10-19 13:27:09 +02:00
Christoph Oelckers 4a9f0248d7 - removed the texture ID cache.
Although this initially helped, it was only because it partially covered up the issues from the real problem which was using the sampler properties of the texture offsets.
With that one fixed this cache became pointless.
2019-10-19 10:40:47 +02:00
Christoph Oelckers bc986b8054 - make the engine consistently use BGRA data - the internal palettes were still RGBA, which caused problems down the line.
- increased cache size to 200 MB (Note: The cache really needs to be replaced with something better that can adapt better to a system's RAM size.)
2019-10-19 10:22:02 +02:00
Christoph Oelckers 8b1f2f5fc9 - disabled console lockout option as a modding feature.
No, sorry, but this is something I consider unacceptable!
2019-10-19 00:27:34 +02:00
Christoph Oelckers 4142d3792b - delete BUILDART header if found.
This will otherwise cause problems down the line because these 8 bytes are ignored in the offsets.
2019-10-19 00:26:43 +02:00
Christoph Oelckers c6f973d05f - more palookup information dumping 2019-10-19 00:25:42 +02:00
Christoph Oelckers 00630f728f - fixed voxel rendering.
Still need to move the voxel textures into the texture manager but at least they render properly again.
2019-10-18 22:25:47 +02:00
Christoph Oelckers 00d59459a1 - fixed creation of true color textures and disabled fog in palette mode.
The fog should go away entirely but in palette mode it made everything too dark.
2019-10-18 22:09:19 +02:00
Christoph Oelckers 2ed722f329 - do not draw invalid textures. 2019-10-18 19:29:35 +02:00
Christoph Oelckers 9f357248e5 - fixed crash on shutdown. 2019-10-18 19:11:18 +02:00
Christoph Oelckers dab7c43f7c - fixed all compiler errors.
It mostly works again, but still has a few glitches.
2019-10-18 19:06:57 +02:00
Christoph Oelckers ed415c1fa0 - silenced a few warnings. 2019-10-18 17:55:22 +02:00
Christoph Oelckers 23265ad213 - rework of texture management for models
Voxels yet to do.
This also removes the redundant texture matrix for the glow texture.
2019-10-18 14:04:32 +02:00
Christoph Oelckers 542994cc20 - added lookup for brightmap palettes. 2019-10-18 12:11:53 +02:00
Christoph Oelckers 530a9944f7 - texture loader redone but not tested yet
Models are currently non-functional and need to reroute their texture handling to the global texture manager instead of handling everything themselves.

Voxels also need a bit of work to make their texture management more automated.
2019-10-18 11:37:07 +02:00
Christoph Oelckers c6514949e3 - texture creation WIP. 2019-10-18 00:20:27 +02:00
Christoph Oelckers 3da49ad20a - safety commit: all relevant code for the texturing system has been moved to texcache.cpp. 2019-10-17 21:44:34 +02:00
Christoph Oelckers bef8c9ae76 - hictinting cleanup.
This needs to be moved into the backend, and partially into the shader. So far this only removes the code from the main rendering logic, the final implementation is not done yet.
It had to go because it required the main rendering code to look deep into the texture data which would be a major blocker for refactoring.
2019-10-17 20:29:58 +02:00
Christoph Oelckers 304a906aa7 copy code 2019-10-17 14:21:51 +02:00
Christoph Oelckers 1426ebec20 Moved hightile replacement data into the textures
Not tested yet!
2019-10-17 12:45:25 +02:00
Christoph Oelckers 4f8e0dd936 - cleaned up a few copyright notices and unified licenses 2019-10-17 09:42:11 +02:00
Christoph Oelckers 6d7458fe42 - fixed bad endif() placing in CMake projects 2019-10-17 08:44:01 +02:00
Christoph Oelckers 452cfe385e - Blood's voxel loader override has somehow gotten lost. 2019-10-16 23:57:29 +02:00
Christoph Oelckers 0aa5db7969 - project rework to shorten compile times.
* subprojects fpr game frontends added and unsigned char option put into global flags.
2019-10-16 23:09:02 +02:00
Christoph Oelckers c988165131 - added a temporary workaround for image-based tile replacements.
The texture management is not ready yet to seamlessly handle these textures so for now they always need to be installed as hightile replacements.
2019-10-16 22:02:27 +02:00
Christoph Oelckers 066a76c892 - missed this part. 2019-10-16 21:18:26 +02:00
Christoph Oelckers 4cd2c024fc - fixed crash in texture deinit code and ensure that everything gets deleted. 2019-10-16 21:16:40 +02:00
nukeykt 37322d001d Do not apply zero floorpal on color sectors 2019-10-16 20:40:54 +02:00
nukeykt a94404232b Default target value to -1
# Conflicts:
#	source/blood/src/trig.cpp
2019-10-16 20:40:53 +02:00
nukeykt 97feb8d59c Fix mapedit compiling
# Conflicts:
#	source/blood/src/mapedit.cpp
2019-10-16 20:40:41 +02:00
CommonLoon102 70b5e67e6f fix cultist respawn time (#220)
# Conflicts:
#	source/blood/src/actor.cpp
2019-10-16 20:40:34 +02:00
Christoph Oelckers 64e116a4b1 - use special classes with [] operators to redirect the frequently used global arrays to the newly implemented texture manager.
This allows to use the contained storage without changing all the code.
2019-10-16 20:39:59 +02:00
Christoph Oelckers 4dc69620b7 - cleanup 2019-10-15 23:56:29 +02:00
Christoph Oelckers 57c221644a - transitioned all texture options of the def file 2019-10-15 23:38:01 +02:00