Commit graph

448 commits

Author SHA1 Message Date
Christoph Oelckers
43033e830a - Blood now also starts the first level without leaks.
I had to refactor the LoadSave data to allow automatic takedown, the linked list was not the most convenient thing - an array is better.
2019-12-24 19:47:34 +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
1c46c6da9d - more leaks plugged, plus rerouting exception messages to the log window. 2019-12-24 16:30:33 +01:00
Christoph Oelckers
0d908960ed - started fixing memory leaks: Console and clip shapes done. 2019-12-24 16:09:43 +01:00
Christoph Oelckers
58d0585eaa - replaced EDuke's game selector with GZDoom's. 2019-12-24 15:28:00 +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
141887263d - header cleanup 2019-12-23 21:19:42 +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
Christoph Oelckers
a1f7f0cc30 - added the GL framebuffer class.
Everything compiles again but obviously no init code will run for now.
2019-12-23 15:40:17 +01:00
Christoph Oelckers
6e9631f2d8 - fixed all undefined symbols except OpenGLFrameBuffer. 2019-12-23 10:53:58 +01:00
Christoph Oelckers
10683e9123 - added GZDoom's Windows backend code.
Compiles but doesn't link yet.
2019-12-22 20:55:47 +01:00
Christoph Oelckers
3914eb5f85 - set up some basic reverb.
I'm not sure if this is working out as the original "reverb" was just too crappy and generic. It may be best to just disable it.
2019-12-22 17:43:39 +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
aa8452a4b0 - backported IsSourcePlayingSomething fix from GZDoom. 2019-12-19 11:47:47 +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
92c8e4c110 - maintain ambient sounds in a separate structure. 2019-12-19 01:20:43 +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
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
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
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
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
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
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
dba1a348d5 Merge branch 'master' into sound 2019-12-15 07:57:48 +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
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
Christoph Oelckers
28cbecea67 - fixed some menu issues.
The submenus still do not work. Something's off here.
2019-12-14 13:40:58 +01:00
Christoph Oelckers
cc81b95570 - main menu works in the common framework.
The rest is messed up, though. This menu is really on an entirely different level of crappiness, even for a 1995 game.
2019-12-14 12:39:18 +01:00
Christoph Oelckers
7e73073103 - Exhumed menu definition. 2019-12-13 21:44:51 +01:00
Christoph Oelckers
052ed5fff7 Merge branch 'master' into powerslave 2019-12-13 20:43:23 +01:00
Christoph Oelckers
b13ee90aa0 - first steps trying to get the game to work. 2019-12-13 00:19:34 +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
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
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
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
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
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
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
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
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
4ef9ec6708 - call STAT_StartNewGame globally from the menu 2019-12-09 01:00:46 +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
ff50a1681f - simplified the music playing interface a bit.
#
2019-12-07 18:28:30 +01:00
Christoph Oelckers
a05dab66f7 - color tweaking for the options menu. 2019-12-07 15:45:29 +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
0342b96335 - cleaned out the remaining wrappers from cache1d.h and use the file system directly instead. 2019-12-07 10:49:23 +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
ddfb2223db - added a directory list function to the file system.
- fixed lookup for resources by ID - it always picked the first candidate from the hash chain without checking the actual ID.
2019-12-07 09:44:43 +01:00
Christoph Oelckers
7d7507d453 - always add movie and music subdirectories. 2019-12-07 00:57:45 +01:00
Christoph Oelckers
7a8208eb2f - fixed out of bounds memory access. 2019-12-06 23:20:18 +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
a0fe7f4048 - more mouse fixes. Most of the menu is now mouse controllable again.
The exceptions are the text screens which do not react to the mouse and the confirmation screen which treats a mouse click as a cancel event.
2019-12-06 00:06:41 +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
1b9d1943c9 - initialize all dynamic music related menus. 2019-12-05 20:50:19 +01:00
Christoph Oelckers
54177cd27d - added the animated player display. 2019-12-05 19:52: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
Christoph Oelckers
6914408453 - fixed writeback of hud_size CVAR
G_ChangeHudLayout must ensure that the written value is ok, otherwise the auto validation in the CVAR can screw things up.
2019-12-05 00:54:55 +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
1b1fad6e13 - forgot to save this. 2019-12-05 01:17:28 +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
525cf28d29 - commented FBaseCVar::GetHumanString back in.
This had to be deactivated when adding the code, but was forgotten when everything was ready.
2019-12-04 23:09:09 +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
dca118881a - added graphics for the mouse back button and reactivated the code for it. 2019-12-04 17:55:43 +01:00
Christoph Oelckers
7d1eb74b5e - more menus implemented 2019-12-04 01:38:51 +01:00
Christoph Oelckers
6a6d6e3694 - fixed quote init. 2019-12-04 00:38:43 +01:00
Christoph Oelckers
72857db17b - refactor of the quote storage.
This was consolidated for both EDuke and RedNukem frontends, put into a class with strict access control and the length limit was lifted.
The new class will eventually allow better localization control.
2019-12-04 00:28:28 +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