Commit Graph

358 Commits

Author SHA1 Message Date
Christoph Oelckers 3a6d0b8f84 - more cleanup. 2019-12-29 17:04:38 +01:00
Christoph Oelckers 2e261a7468 - cleanup and removal of unused code.
compat.h probably needs a bit more attention, it's a horrendous mess of the wrong type of "compatibility" concerns.
2019-12-29 16:35:51 +01:00
Christoph Oelckers a021b96119 - added the needed parts of GZDoom's render backend to have the postprocessor working.
Not hooked up yet.
2019-12-28 18:20:47 +01:00
Christoph Oelckers 7e758a5e48 - hook up the savegame code in Exhumed. Superficially it looks like it works but it will require a lot more testing.
- fixed per-frame sound system update in Exhumed.

Sound is still quite broken and will require more work.
2019-12-27 17:07:09 +01:00
Christoph Oelckers a4c5fbe295 - savegame name generation fix for SW. 2019-12-27 10:48:43 +01:00
Christoph Oelckers 6373b75d22 Merge branch 'master' into powerslave
# Conflicts:
#	source/common/gamecontrol.cpp
#	source/common/version.h
#	wadsrc/static/engine/grpinfo.txt
2019-12-26 14:46:14 +01:00
Christoph Oelckers 62e9112133 - renamed the internal resource directory to "engine" and routed most literal mentions of the engine name through version.h
All this comes from a time when I didn't use version.h so it's better to do it the same way as GZDoom to allow easy renaming of the engine.
2019-12-26 14:04:53 +01:00
Christoph Oelckers d8dfe752b5 - fixed handling of music in Redneck Rampage and Shadow Warrior.
After merging the CD enabling CVAR they had the same default (off) as Blood which is wrong.
This also addresses other music related issues, like not properly cycling through the RR music.
2019-12-26 13:04:29 +01:00
hendricks266 8e6a54a1e4 Mostly clean up the codebase in preparation for tspritetype != uspritetype
Remaining exceptions:
SW - ConnectCopySprite
CON and M32Script - pSprite/pUSprite

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

# Conflicts:
#	source/build/include/polymer.h
#	source/build/src/engine.cpp
#	source/build/src/engine_priv.h
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/duke3d/src/astub.cpp
#	source/duke3d/src/game.h
#	source/duke3d/src/m32common.cpp
#	source/duke3d/src/m32exec.cpp
#	source/duke3d/src/m32structures.cpp
#	source/kenbuild/src/bstub.cpp
#	source/kenbuild/src/game.cpp
#	source/sw/src/jnstub.cpp
#	source/sw/src/jsector.cpp
2019-12-26 08:58:25 +01:00
hendricks266 3bbecf84c2 SW: Fix FindDistance3D calls to not z>>4 at the call site
This is handled by the function itself now.

Fixes the distance issue with the ceiling fan.

git-svn-id: https://svn.eduke32.com/eduke32@8525 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-26 08:54:17 +01:00
hendricks266 ae94566fb5 SW: Draw the crosshair actually centered
Thanks to Striker for the tip.

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

# Conflicts:
#	source/sw/src/draw.cpp
2019-12-26 08:53:36 +01:00
hendricks266 846c7eaff2 SW: Run all allocations through Xmalloc et al
git-svn-id: https://svn.eduke32.com/eduke32@8515 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/audiolib/src/driver_winmm.cpp
#	source/audiolib/src/flac.cpp
#	source/sw/src/StartupWinController.game.mm
#	source/sw/src/bldscript.cpp
#	source/sw/src/game.cpp
#	source/sw/src/game.h
#	source/sw/src/grpscan.cpp
#	source/sw/src/jbhlp.cpp
#	source/sw/src/rts.cpp
#	source/sw/src/scrip2.cpp
#	source/sw/src/sounds.cpp
2019-12-26 08:47:09 +01:00
Christoph Oelckers 1a8f11e01d Merge branch 'master' into powerslave
# Conflicts:
#	source/build/src/sdlayer.cpp
#	source/common/menu/menu.cpp
#	source/sw/src/config.cpp
#	source/sw/src/game.cpp
2019-12-26 00:21:04 +01:00
Christoph Oelckers e180d9afd3 Merge commit '40a533402e443a0de1673543642c892ab9c731fd' into powerslave
# Conflicts:
#	source/audiolib/include/fx_man.h
#	source/audiolib/include/multivoc.h
#	source/audiolib/src/_multivc.h
#	source/audiolib/src/fx_man.cpp
#	source/audiolib/src/multivoc.cpp
2019-12-25 19:24:55 +01:00
Christoph Oelckers 120a985b98 - disable palette transparency for color 255 when running an animation.
There's several intro cutscenes using the full palette and for these the color must not be nulled as it should for in-game textures.
2019-12-25 14:13:15 +01:00
Christoph Oelckers b0cefdedce - plugged all memory leaks that were reported with Shadow Warrior when starting the first level. 2019-12-25 11:26:19 +01:00
Christoph Oelckers 055b310d60 - rewrote all remaining places that used wm_msgbox to throw a fatal error instead so that the global error handler can deal with the messages.
This eliminates another piece of hideous code.
This commit also moves the memory error handler to the common code, so that all games can call it if triggered.
2019-12-24 19:59:14 +01:00
Christoph Oelckers 2820dc85a8 - plugged more memory leaks.
I can now start the first Duke Nukem level, exit with Alt-F4 and no leaked memory blocks get reported.
2019-12-24 18:53:29 +01:00
Christoph Oelckers e8d7777f4a - mouse input works again after cleaning out the remaining cruft of the old input code. 2019-12-24 13:54:50 +01:00
Christoph Oelckers 1b9a2f5932 - disabled the message entering code.
This needs to be replaced with the game independent ZDoom version and hooked up properly, but it of low priority because it's a multiplayer only feature.
2019-12-24 13:21:36 +01:00
Christoph Oelckers a870df840e - hooked up the input system and did a major cleanup.
Much of the old system is no longer needed with all buttons being handled as keys.
Mouse axis movement is not working yet.
2019-12-24 12:59:26 +01:00
Christoph Oelckers 9ab8a8c737 - refactored the coordinate printout to a stat and removed printext256 and the associated font. 2019-12-23 20:55:12 +01:00
Christoph Oelckers 3b98635170 - removed all remaining references to SDL. The Windows version is now fully native. 2019-12-23 20:03:03 +01:00
Christoph Oelckers 62ecedf1f8 - got it to the point where it can render to the GL surface from the native backend. 2019-12-23 19:37:40 +01:00
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 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
Christoph Oelckers a38077a17e - clear the intermittent sound ticker when the sound gets checked. 2019-12-19 12:08:01 +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 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 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 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 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 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 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 62660e76f3 - sound system rework. Not complete. 2019-12-15 10:00:25 +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 cbfb79977a - adjustments to make it compile with the new menu code. 2019-12-13 21:01:14 +01:00
Christoph Oelckers 052ed5fff7 Merge branch 'master' into powerslave 2019-12-13 20:43:23 +01:00
Christoph Oelckers 4d28940d2f - commented stuff out to make it compile. 2019-12-13 00:19:16 +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 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 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 ba978ab0d9 - text update and missing includes. 2019-12-09 17:17:15 +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
Christoph Oelckers 66218dd074 - connect SW with statistics code and added missing function for Blood
# Conflicts:
#	source/blood/src/blood.h
#	source/common/menu/messagebox.cpp
#	source/sw/src/game.cpp
#	source/sw/src/game.h
2019-12-09 01:03:18 +01:00
Christoph Oelckers 9f25c9c117 - some string rework
* removed temporary placeholder content from string init function. All this gets properly read from definition files now.
* preinitialize a few quotes that are used for status display purposes and are needed in all games
* only use the global episode name table in Blood to avoid redundancy
* let SW's swcustom parser write to the global tables instead of local ones.
2019-12-09 01:00:46 +01:00
Christoph Oelckers f2d0665557 - connected the screen size CVAR and slider with Shadow Warrior's internal setting. 2019-12-07 21:39:17 +01:00
Christoph Oelckers 8f90cc8324 - more Shadow Warrior cleanup. 2019-12-07 20:48:16 +01:00
Christoph Oelckers 0157446ad1 - thorough cleanup of the Shadow Warrior music code.
This was one huge mess where nothing fit together.
Also added an enhancement that the CD Audio boss theme tracks are also played when CD music is generally off, because these have no equivalent in MIDI. This needs to be checked if it's stylistically ok, though.
2019-12-07 19:57:19 +01:00
Christoph Oelckers 2ed03214b1 - disable the save option in SW's main menu if no game is running. 2019-12-07 15:07:43 +01:00
Christoph Oelckers 9960b505e8 - added captions to SW's game menus.
- made Duke Nukem's quote strings localizable.
2019-12-07 12:42:25 +01:00
Christoph Oelckers a45b1ca637 - fixed anim loading in Shadow Warrior. 2019-12-07 11:48:41 +01:00
Christoph Oelckers 30cbcb54b1 - renamed the remaining file system access wrappers in cache1d.h 2019-12-07 10:31:27 +01:00
Christoph Oelckers 749eda32c5 - moved kopenfilereader into the FileSystem class. 2019-12-07 10:14:51 +01:00
Christoph Oelckers ef87d2d4f9 - always pause the game when the console is open. 2019-12-07 10:01:03 +01:00
Christoph Oelckers 66756bfa13 - final fixes for Blood's and Duke Nukem's menus. 2019-12-06 18:36:49 +01:00
Christoph Oelckers 7a9138cde0 - made the confirmation screen functional.
This works but still needs a bit of visual work.
2019-12-05 23:17:55 +01:00
Christoph Oelckers db425a1228 - fixed keybinding and mouse cursor display.
- fixed some merge issues in Shadow Warrior.
2019-12-05 21:39:02 +01:00
Christoph Oelckers 223c6d628e Merge branch 'master' into menu_for_real 2019-12-05 21:08:46 +01:00
Christoph Oelckers 169d68f583 - fixed stuff and cleaned out most of the old menu code. 2019-12-05 19:00:40 +01:00
hendricks266 5624c9b5b0 SW: Avoid a one-pixel tall hall of mirrors above the full status bar
git-svn-id: https://svn.eduke32.com/eduke32@8355 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-05 17:23:06 +01:00
hendricks266 007d16712c SW: Draw the status bar under the menu instead of over it
git-svn-id: https://svn.eduke32.com/eduke32@8354 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-05 17:23:05 +01:00
hendricks266 22a778a22c SW: Don't show the status bar during the end of level screen
git-svn-id: https://svn.eduke32.com/eduke32@8353 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-05 17:23:04 +01:00
hendricks266 1507e9fd15 SW: Left-pin the mini HUD in widescreen
git-svn-id: https://svn.eduke32.com/eduke32@8352 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/sw/src/text.cpp
2019-12-05 17:23:03 +01:00
Christoph Oelckers 628bd9efc6 Filled in the rest of the menus
Sound is only partially functional, video mode completely nonfunctional, but it makes no sense adjusting them to the current backend code when it's due for replacement.
2019-12-05 00:47:05 +01:00
Christoph Oelckers cb0538d0f2 - mouse aiming cleanup.
Reverted this to a sane setting, as it was in the original games and in all other games I have ever seen, i.e. there is a global setting to enable mouse view, and a button to manually trigger it. The toggle can be easily handled by flipping the CVAR directly.
The main problem here was that it triggered a few cases for mouse-less gameplay in the default case with a mouse present, because the mouseaim CVAR was no longer what the game expected.
This misguided change seems to have originated in JFDuke but by now had propagated to all the other games as well, the code was in all 4 frontends.
2019-12-05 01:08:35 +01:00
Christoph Oelckers 3ea526055f - added a generic message display, using ZDoom's code.
This is mainly meant for Nam and WW2GI which have an ugly-as-hell font for these texts.
2019-12-04 23:07:02 +01:00
Christoph Oelckers 6d04f0f159 - added option to print custom messages with Duke Nukem's quote system.
- hooked up all front ends with a generic message printing function so that common code can access the native message displays. This is needed for consolidation of some input actions which are mostly identical but print messages.
- preparations for a generic message system.
2019-12-04 21:35:35 +01:00
Christoph Oelckers 4cefc1db83 Merge branch 'master' into menu_for_real 2019-12-04 17:25:40 +01:00
Christoph Oelckers c561255018 - moved the application of in_mousebias and in_mousedeadzone into the backend code.
This piece was repeated 6x for each call to CONTROL_GetInput, creating quite a bit of redundancy.
2019-12-03 20:58:43 +01:00
Christoph Oelckers 6f9494435a - adjustment for last commit. 2019-12-03 17:40:35 +01:00
hendricks266 c27616508e SW: Move HIT_PLAX_WALL out of the bit range used for limit raised struct IDs
git-svn-id: https://svn.eduke32.com/eduke32@8350 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-03 17:32:50 +01:00
hendricks266 863d35d7c2 SW: Activate ASSERT macro with RELEASE=0 builds
git-svn-id: https://svn.eduke32.com/eduke32@8349 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-03 17:32:49 +01:00
hendricks266 823e47f3e8 SW: Fix assertions and OOB so that the player can noclip OOB
git-svn-id: https://svn.eduke32.com/eduke32@8348 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-03 17:32:48 +01:00
hendricks266 f19848a1b3 SW: Address Sanitization commenceth
git-svn-id: https://svn.eduke32.com/eduke32@8347 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-03 17:32:46 +01:00
hendricks266 820bd2545c SW: Get widescreen aspect working
git-svn-id: https://svn.eduke32.com/eduke32@8346 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-03 17:32:45 +01:00
Christoph Oelckers 65ae00fb74 - completion of controls menu
- some message printing cleanup in SW frontend. This still has its native console that needs to be removed.
2019-12-03 00:57:03 +01:00
Christoph Oelckers 79ced02d36 - implemented the Shadow Warrior menu interface. 2019-12-03 00:01:04 +01:00
Christoph Oelckers 51083f6d51 Merge branch 'master' into powerslave 2019-12-02 21:14:08 +01:00
Christoph Oelckers 702f91b6b5 - disconnected Shadow Warrior's menu so it can be replaced.
Unlike the other games this was a lot more invasive
2019-12-02 21:05:19 +01:00
Christoph Oelckers 26daff79db - fixed compile errors and updated string table. 2019-12-02 18:11:10 +01:00
Christoph Oelckers aed05840ae - removed the mouseInactiveConditional interface function.
This was only a crutch to let the input interface work with the original menus.

Now that the one in Blood is gone, all the conditions are no longer relevant. (Shadow Warrior never got far enough to implement this)
2019-12-01 10:31:44 +01:00
Christoph Oelckers 55ba1116ec - fixing the last commit. 2019-12-01 09:03:51 +01:00
Christoph Oelckers 8a98f9b3ca - removed quitevent.
This was some meticulously preserved relic of bad old DOS times used to block OS facilities to close an app.
Since this has been worked around at a lower level already the variable was essentially without function but some quite bad code depended on it.
2019-12-01 09:02:17 +01:00