Commit Graph

788 Commits

Author SHA1 Message Date
Christoph Oelckers daf77e55f7 - fixed compilation.
Much of this commit will have to be undone later, once the texture manager becomes available.
2020-05-23 22:43:04 +02:00
Christoph Oelckers b971bc2717 - avoid using global palette settings when drawing 2D content with a custom palette.
Instead pass the palette info with the render call to avoid stale global state.
2020-05-23 22:43:01 +02:00
Christoph Oelckers 8d3199514d - removed some 'pragma' cruft. 2020-05-23 13:08:10 +02:00
Christoph Oelckers d0406e27b6 - all base palette data has been transitioned to GPalette. 2020-05-23 12:31:05 +02:00
Christoph Oelckers 6f9ee4b60f - store palettes in the palette container. 2020-05-23 12:31:05 +02:00
Richard C. Gobeille e2d79b4682 engine: add yax_getflorzofslope() and yax_getceilzofslope() 2020-05-22 17:01:36 +02:00
Richard C. Gobeille 94d098f8ef Fix a crash with tabledivide64()
Fixes #1.
2020-05-22 16:50:02 +02:00
NY00123 6fcb8f7a6a Add gethiq16angle and the getq16angle wrapper to the engine 2020-05-21 18:47:37 +02:00
Mitchell Richters 3749a89d6a Build: Change renderSetRollAngle() to take a float and not an int32_t. 2020-05-13 15:12:44 +02:00
Mitchell Richters 68a0ead5f0
- fix Linux builds following reset of master branch. (#44)
* - fix Linux builds following reset of master branch.

* - fix Linux Clang CI failure.

* - change '#ifdef __linux__' to '#ifndef _WIN32' as requested/required.

* - initialise batchrun in proper spot.
2020-05-05 10:45:21 +03:00
Mitchell Richters 1ce4081d37 - change 'refreshfreq' from int to double.
A double is already used in CalcSmoothRatio. Further to this, displays that use TV standard frequencies do not use perfect 60Hz frequencies, but frequencies such as 59.94Hz, 23.976Hz (precisely, 24*(1000/1001) = 23.9760239760239760...) etc.

Reference: 'https://www.ghacks.net/2010/04/28/59-hertz-refresh-rate/', 'http://www.paradiso-design.net/videostandards_en.html'.

# Conflicts:
#	source/build/include/baselayer.h
#	source/platform/posix/cocoa/i_main.mm
2020-04-16 00:03:00 +02:00
Christoph Oelckers 156a225ff4 - renamed global palookup variable.
Since the same word gets used in text messages and local variables in the game code it is easier this way to search for it and facilitate its transition to the translation table management in PaletteContainer.
2020-04-13 23:58:46 +02:00
Christoph Oelckers fda4293013 - draw the movie franes outside of the tile system to reduce the palette maintenance.
The movie code has always been the part causing the most issues because it alters the palettes - the rest treats them as static data.
2020-04-13 23:58:45 +02:00
Christoph Oelckers fac004b4d2 - palette code cleanup 2020-04-13 23:58:44 +02:00
Christoph Oelckers 8e87674d4c - backend code matching with GZDoom 2020-04-12 08:30:40 +02:00
Christoph Oelckers 5584c726ba - file system update and adjustment. 2020-04-12 08:30:40 +02:00
Christoph Oelckers f671eb622f - migrated to GZDoom's utility code. 2020-04-12 08:30:39 +02:00
Christoph Oelckers 797640c494 - use ZDoom's memory allocation wrapper instead of EDuke's.
This simply plays nicer with the compiler's diagnostics.
2020-04-12 08:30:38 +02:00
Christoph Oelckers 66ecb05eb8 - use Printf as the only command to print to the console.
All uses of OSD_Printf, initprintf etc. have been renamed.
2020-04-12 08:30:38 +02:00
Christoph Oelckers 6ef93ba514 - match cmdlib.cpp/.h with GZDoom. 2020-04-12 08:30:36 +02:00
Christoph Oelckers 5af0217db7 - got rid of the software rendering blend tables. 2020-03-29 17:23:57 +02:00
Christoph Oelckers 41545b644a - cleaned out most of the software renderer's static global variables. 2020-03-29 16:59:49 +02:00
Christoph Oelckers 7392b699e4 - cleaning out a few more parts of the software renderer. 2020-03-29 15:54:02 +02:00
Christoph Oelckers 3f69044770 - removed all references to sdlayer.cpp as all that was left in there was only needed for software rendering.
- removed now unused a-c.cpp.
2020-03-29 15:22:07 +02:00
Christoph Oelckers 0de4b134da - stripped out most of the software renderer.
Now that the camera textures can be handled through the hardware renderer this isn't needed anymore.
2020-03-29 14:55:09 +02:00
Christoph Oelckers 621a9338e5 - render camera textures with the hardware renderer.
This removes the last active use case for the software renderer and allows rendering the camera views at a higher resolution.
For Shadow Warrior this necessitated a split of JS_DrawMirrors, because it processed cameras and mirrors in the same loop which cannot be done with the hardware renderer.
2020-03-29 14:01:46 +02:00
Christoph Oelckers 73a4e0d1fe - made Blood's FullMap flag global and removed the hacks to show the full automap.
Also refactor show2dsector into a bit array to get rid of the bit shifting code at play here.
2020-03-07 19:30:18 +01:00
Christoph Oelckers f59bfa1224 - consolidation of screentext code 2020-03-05 00:58:38 +01:00
Christoph Oelckers 348325c879 - removed some editor-only code from engine.cpp 2020-03-01 19:12:18 +01:00
Christoph Oelckers a873dcf6e0 - fixed the pause key.
Apparently SDL maps this to a different scan code.
Since pause is hard coded in all games the corresponding menu option has been disabled.
2020-02-16 17:22:14 +01:00
Christoph Oelckers 7909f29691 - allow starting Duke, NAM and WW2GI with the RedNukem-based game code for Redneck Rampage.
This mainly required some rework of the menu setup to be less explicit about the frontend's menu classes.
2020-02-12 20:25:59 +01:00
Christoph Oelckers c53d9cfc3a - reworked voxel texture generation to use the backend's palette manager.
The original code was not able to handle changing palettes and only worked if each palette change resulted in a full texture flush - which Raze does not perform.
2020-02-09 20:14:26 +01:00
Christoph Oelckers 91b9ce54e4 - use a dedicated flag for defined hightile tints so that the shader can use them. 2020-02-09 15:53:08 +01:00
Christoph Oelckers a5fc374b59 - always recalculate the projection matrix.
Trying to cache this is not useful, it barely saves time and was causing display errors.

# Conflicts:
#	source/build/src/polymost.cpp
2020-02-09 15:53:07 +01:00
Christoph Oelckers dbc958baeb - fixed swapped color channels in the tinting part of the shader. 2020-02-05 20:02:50 +01:00
Christoph Oelckers 5d4514060b - disable palette emulation for Blood's cutscenes.
These use color 255 as a valid index which the palette emulation shader does not handle.
2020-02-04 20:40:10 +01:00
Christoph Oelckers a90185bea9 - cleaned up the remaining dependencies on windows.h
This file now only gets included by code that really needs it.
2020-02-03 21:30:57 +01:00
Christoph Oelckers 78ff1f0536 - removed Bfree.
It was only used in two places in the header, no need to keep it around.
2020-02-03 19:12:36 +01:00
nukeykt 03b1f65a52 Polymost: fix sprite rendering issues
# Conflicts:
#	source/build/src/engine.cpp
#	source/build/src/polymost.cpp
2020-02-03 19:08:51 +01:00
alexey.lysiuk cdeaa5b3d5 - suppressed omnipresent GCC warning
source/build/include/compat.h:1043:21: warning: self-comparison always evaluates to true [-Wtautological-compare]
2020-02-03 10:48:15 +02:00
hendricks266 9f2cb8ea0d renderMakeTSpriteFromSprite: Copy extra, since SW uses it
SW: This fixes enemies glowing under nightvision.

git-svn-id: https://svn.eduke32.com/eduke32@8587 1a8010ca-5511-0410-912e-c29ae57300e0
2020-02-02 20:36:14 +01:00
Christoph Oelckers f76d139207 - fixed SW's interpolation math. 2020-02-02 09:51:44 +01:00
Christoph Oelckers eac1007c56 - automap color fix. 2020-01-30 22:05:18 +01:00
Christoph Oelckers cec7b006ca Merge branch 'master' of https://github.com/coelckers/Raze 2020-01-29 22:06:48 +01:00
terminx 541c71902b ClockTicks maintenance
git-svn-id: https://svn.eduke32.com/eduke32@8562 1a8010ca-5511-0410-912e-c29ae57300e0
2020-01-29 19:21:39 +01:00
terminx 6836faee07 Disable EDUKE32_PREDICT_TRUE and EDUKE32_PREDICT_FALSE for now
git-svn-id: https://svn.eduke32.com/eduke32@8553 1a8010ca-5511-0410-912e-c29ae57300e0
2020-01-29 19:15:25 +01:00
alexey.lysiuk 93fb98413e - fixed compilation with GCC and Clang
There were lots of errors ‘...’ was declared ‘extern’ and later ‘static’ [-fpermissive]
2020-01-29 10:20:17 +02:00
Christoph Oelckers 1f5f7c63fe - rewrite of tileCopySection 2020-01-28 12:42:17 +01:00
Christoph Oelckers 8657ecb35d - implemented 'map' CCMD for all games. 2020-01-28 11:20:30 +01:00
Christoph Oelckers 809b687969 - removed the Build color matching code
For the handful of lookups it got used for the needed data is too large and the lookup not precise enough. ZDoom's BestColor yields better results, does not need any tables and for the small amount of lookups being performed is more than adequate.
2020-01-28 10:31:59 +01:00
Christoph Oelckers 245aa5d3bc - reworked global palette state for robustness. 2020-01-26 10:58:00 +01:00
Christoph Oelckers e8231f904f - I have no idea why a fov of exactly 90° does not work.
Changing this by one in either direction makes the problem go away.
2020-01-25 11:56:13 +01:00
Christoph Oelckers f8a807e3bb - cleaned out a tiny bit of the garbage that has accumulated in compat.h.
This file really needs to go away, we do not need this kind of "compatibility".
2020-01-25 10:56:30 +01:00
Christoph Oelckers 09106b3159 - fixed the HUD size slider for Blood. 2020-01-22 13:53:26 +01:00
Christoph Oelckers 9c423ae6a3 - take down the level outside the LoadGame function in ShadowWarrior.
With the new savegame system it was done too late which could cause crashes.
2020-01-21 23:36:54 +01:00
Christoph Oelckers e555d15cc7 renamed the swap function in pragmas.h
This conflicts with std::swap on some setups.
2020-01-20 01:32:39 +01:00
Christoph Oelckers aa1361acbb - make palfadedelta explicitly unsigned 2020-01-19 23:18:38 +01:00
Christoph Oelckers 7a5f60e14d - removed gl_projectionhacks and the SOFTROTMAT code path.
Both were hard coded not to be used.
2020-01-19 13:57:24 +01:00
Christoph Oelckers 454f796b69 - collect all 3D geometry in a list so that it can be rendered later.
With this out of the way the renderer can now be switched to the core profile.
2020-01-18 22:41:08 +01:00
Christoph Oelckers dc5b8d27f8 - infrastructure for savegame pics.
Savepic generation implemented for Duke 3D, but results in a black image.
2020-01-12 23:16:21 +01:00
CommonLoon102 bc4a4bea23 Add possibility to move voxels/models via maphacks
# Conflicts:
#	source/build/src/engine.cpp
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/duke3d/src/lunatic/con_lang.lua
#	source/rr/src/lunatic/con_lang.lua
2020-01-11 22:23:53 +01:00
Christoph Oelckers 55dab6d3d3 - hooked up the high color texture colorization code.
Not tested and probably still not working correctly, the entire feature was a nearly impenetrable mess of convoluted code. This definitely needs verification with multiple mods using it.
2020-01-11 22:18:06 +01:00
Christoph Oelckers cfed7afd02 - all source compile now on macOS 2020-01-08 01:00:57 +01:00
Christoph Oelckers 134122335b - first attempt to compile on a Mac
This could have gone better, there's far too many warnings here
2020-01-06 02:41:47 +01:00
Evan Ramos 1caabf2e7b Add Blood-specific synonyms for tspritetype members 2020-01-03 08:05:43 +01:00
nukeykt a3b48c44d6 Blood: fix multiskies with 16 tiles in polymer
# Conflicts:
#	source/build/src/polymer.cpp
2020-01-02 20:19:08 +01:00
Christoph Oelckers e01c161258 - removed some dead variables. 2020-01-01 13:11:44 +01:00
Christoph Oelckers 18099e9179 - removed the pure software render surface and deleted a few unused variables.
With all the 2D refactorings thhe softsurface won't work anymore.
This also revealed a bug with the fullscreen variable, a few places were still using the old one from the SDL backend.
2020-01-01 12:36:48 +01:00
Christoph Oelckers bcb48d8441 - added handling for changing the screen size (dragging the window borders / change scale factor) 2020-01-01 09:49:06 +01:00
Christoph Oelckers 1890df98f9 - process lines through the 2D drawer. 2019-12-31 19:02:55 +01:00
Christoph Oelckers 964e303dd7 - draw the textures on the automap with the 2D drawer. 2019-12-31 15:05:08 +01:00
Christoph Oelckers 7ea053bd90 - reconnected the HUD model drawer.
This will have to be done differently later when the postprocessor is fully working, but for now it's sufficient to just render the model right away.
2019-12-30 20:16:51 +01:00
Christoph Oelckers 6459f4e532 - refactored rotatesprite to really use the 2D drawer.
Mostly working, except clipping and weapon sprites.
2019-12-30 19:37:23 +01:00
hendricks266 456d975392 Make the Polymode cstat bits Duke-only by translating them to tspr->clipdist
git-svn-id: https://svn.eduke32.com/eduke32@8523 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/duke3d/src/astub.cpp
#	source/duke3d/src/common_game.h

# Conflicts:
#	source/duke3d/src/common_game.h
2019-12-29 22:23:18 +01:00
hendricks266 6a5906833b Move TSPR_EXTRA_MDHACK from extra to clipdist
git-svn-id: https://svn.eduke32.com/eduke32@8522 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/mdsprite.cpp
#	source/build/src/polymer.cpp
2019-12-29 22:22:20 +01:00
hendricks266 6465feb438 Refactor tsprite creation into renderAddTSpriteFromSprite
git-svn-id: https://svn.eduke32.com/eduke32@8521 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymer.cpp
#	source/duke3d/src/m32exec.cpp
2019-12-29 22:22:19 +01:00
hendricks266 422601bc82 Make tspritetype its own distinct struct
git-svn-id: https://svn.eduke32.com/eduke32@8520 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-29 22:22:19 +01:00
Christoph Oelckers 6dc064a178 - another unused one. 2019-12-29 17:13:12 +01:00
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 cc332486b4 - cleaned out the 2D drawing code.
With the new backend there will always be just one page, never more, so the RS_PERMS case will never be entered.
In addition, since the software renderer has already been nonfunctional due to lacking support from the 2D drawer, its 2D components have also been removed. Its main remaining purpose, drawing camera textures, remains unaffected by this.
2019-12-29 15:46:48 +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 d473f9c590 - replaced all uses of Bfree with Xfree so they are subjected to debug instrumentation, uses FStrings in a few cases where it made sense.
- fixed: Sound channels weren't freed.
2019-12-26 14:43:44 +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 91cbaa1491 Add information to cstat enums
git-svn-id: https://svn.eduke32.com/eduke32@8518 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-26 08:49:42 +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 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 745d78d8d7 - fixed voxels leaking memory. 2019-12-25 08:57:58 +01:00
Christoph Oelckers 5bd32cf769 - fixed: Voxel setup code wasn't called anymore. 2019-12-25 00:30:13 +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 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 0d908960ed - started fixing memory leaks: Console and clip shapes done. 2019-12-24 16:09:43 +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 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 6b475417dc Merge branch 'master' into gzbackend 2019-12-23 14:31:31 +01:00
hendricks266 56e88b33a8 Replace color matching up to index 239 with the engine's fullbright mask
Should improve the color range available to non-Duke editors.

git-svn-id: https://svn.eduke32.com/eduke32@8491 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-23 11:37:00 +01:00
hendricks266 34ef03185d Generate editorcolors[] from vgapal16[] at a better point in the startup process
git-svn-id: https://svn.eduke32.com/eduke32@8490 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/palette.cpp
2019-12-23 11:36:24 +01:00
hendricks266 0a7f5f558a Rename colmatch functions
git-svn-id: https://svn.eduke32.com/eduke32@8488 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/colmatch.h
#	source/build/src/build.cpp
#	source/build/src/defs.cpp
#	source/build/src/palette.cpp
#	source/duke3d/src/lunatic/dynsymlist_editor.lds
#	source/duke3d/src/lunatic/dynsymlist_game.lds
#	source/duke3d/src/lunatic/engine.lua
#	source/tools/src/transpal.cpp
2019-12-23 10:59:14 +01:00
hendricks266 7db49ea20a Change PaletteIndexFullbrights from uint32_t[8] to uint8_t[32]
git-svn-id: https://svn.eduke32.com/eduke32@8487 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/palette.h
2019-12-23 10:57:11 +01:00
Christoph Oelckers 6e9631f2d8 - fixed all undefined symbols except OpenGLFrameBuffer. 2019-12-23 10:53: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 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
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 43c66d07ae Merge branch 'master' into sound 2019-12-18 11:23:20 +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 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
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 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 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 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 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 a74797b97c - fix merge errors. 2019-12-08 08:51:54 +01:00
terminx fd1656fbf2 Move atoi_safe() from editor.h to compat.h and #define Batoi atoi_safe
They were the same thing so they might as well be in the same place.

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

# Conflicts:
#	source/build/include/editor.h
2019-12-08 08:11:04 +01:00
terminx 0af13dcde0 Minor changes to hash table code
git-svn-id: https://svn.eduke32.com/eduke32@8372 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/hash.h
2019-12-08 08:09:13 +01:00
terminx 15b76f2041 Add Xaligned_calloc()
git-svn-id: https://svn.eduke32.com/eduke32@8371 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/compat.h
2019-12-08 08:08:55 +01:00
terminx 441b0460aa Map SDL joystick device trackball input to mouse input
git-svn-id: https://svn.eduke32.com/eduke32@8367 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/sdlayer.cpp
2019-12-08 07:59:14 +01:00
terminx cbfb675577 Shitcan the few uses of the bool type in the VM after reading some things and dicking around on godbolt.org
git-svn-id: https://svn.eduke32.com/eduke32@8366 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/duke3d/src/gameexec.cpp
#	source/duke3d/src/gameexec.h
2019-12-08 07:56:50 +01:00
Christoph Oelckers 8f90cc8324 - more Shadow Warrior cleanup. 2019-12-07 20:48:16 +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 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 54177cd27d - added the animated player display. 2019-12-05 19:52:46 +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 b372cb5f35 - the primary Blood menus are working.
Now this was magnitudes easier than the EDuke menu - NBlood's menu is actually clean and usable code but still nothing compared to a unified menu system.
2019-12-01 15:31:08 +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 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
Christoph Oelckers 2a9e4fca46 WIP safety commit 2019-11-30 19:23:54 +01:00
Christoph Oelckers 90c5ea6acc - updated option menu code to latest scripted version
This mainly means being able to use the generic font.
This also adds more generalization to the menu sound handling, plus an option to turn menu sound off. This is motivated by the pig sounds which RR uses in the menu.
2019-11-29 01:28:13 +01:00
Christoph Oelckers 0cedad6390 - started work on load/save menus. 2019-11-29 00:37:19 +01:00
Christoph Oelckers 59ebb10512 - fixed compilation and unhooked the Redneck Rampage menu so that it can be replaced. 2019-11-28 19:35:35 +01:00
Christoph Oelckers 115675417a Merge branch 'master' into powerslave 2019-11-28 17:07:11 +01:00
Christoph Oelckers 4e5f59a373 - Menu WIP
* implemented single image screens
* implemented skeleton of the image scroller
* added RR-specific definitions to the menus (need to copy and adjust d_menu.cpp)
* added definitions for credits screens.
2019-11-28 01:02:45 +01:00
Christoph Oelckers 723b210c95 - major work on savegame code
Not tested yet!

* Added a JSON-based header to the savegames so that the unified menu can read from a common data source.
* moved loading and saving of frontend independent data to the wrapper so that support is automatic.
2019-11-27 00:41:26 +01:00
Christoph Oelckers 3b7aa74c27 - connecting the dots in the menu. Duke Nukem can now start a level. 2019-11-26 23:20:54 +01:00
Christoph Oelckers 0f4d80b5d3 Merge branch 'master' into menu_for_real 2019-11-26 19:19:21 +01:00
hendricks266 348ccdfd5b Templatize the branchless negation method used for GV_FLAG_NEGATIVE
git-svn-id: https://svn.eduke32.com/eduke32@8312 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/compat.h
2019-11-26 18:09:00 +01:00
Christoph Oelckers 42b3d12630 - Ion Fury's main menu now looks correct. 2019-11-24 22:31:27 +01:00
Christoph Oelckers 52cfb7fb92 - completely disconnected the old menu from the rest of the game to allow rebuilding the new one.
Sadly this uncovered a few more places where script events are allowed too broad access to the game state.
2019-11-23 23:05:24 +01:00
Christoph Oelckers 326d0f5f76 - the new menu displays something. 2019-11-23 17:50:36 +01:00
Christoph Oelckers f2fc3fc2cb - WIP commit. 2019-11-23 12:38:38 +01:00
nukeykt 337dea13e6 Add FPS counter 2019-11-22 00:12:57 +01:00
Rachael Alexanderson 5002dd866c - fix compile on vs2017, change pow2char to static
- include nullptr check for mapname in music.cpp
2019-11-13 16:40:08 -05:00
Christoph Oelckers 74ed8fd1d9 - added GZDoom's statistics code
Not hooked up yet.
2019-11-12 22:00:33 +01:00
Christoph Oelckers 79561ace09 - use the precalculated or script-specified fade colors, if present. 2019-11-10 21:11:17 +01:00
Christoph Oelckers 21ac5e87b5 - added blend table translucency estimation instead of using a lame default.
- draw fullscreen blends below the console.
- moved all mouse event processing out of the SDL backend to D_PostEvent.
- removed all remaining code for dealing with mouse buttons directly.
2019-11-10 15:15:14 +01:00
Christoph Oelckers a1a9770b44 - reworked the FPS display to use ZDoom's fstat class to get rid of the microscopic font it used.
- changed time display for rendering to exclude VSync and playsim times to get more meaningful information.
2019-11-10 11:42:25 +01:00
Christoph Oelckers cae710bd59 - fixed alpha threshold.
Not only is this a deprecated feature - it also does not work right when complex lighting is at play, it must be done in the shader to get proper results.
2019-11-10 10:01:31 +01:00
Christoph Oelckers 39df3d0560 - added 'logfile' CCMD. 2019-11-09 22:27:33 +01:00
Christoph Oelckers 299f596afc - Changed EDuke menu to receive all settings storage locations as CVARs.
With this out of the way the only part that needs a real replacement immediately is the keybinds menu.
2019-11-09 19:15:03 +01:00
Christoph Oelckers fd4680c347 Merge commit '3061e3860cd212893e7d08a09223d4e9ad78b204' into Dear_ImGui 2019-11-09 13:42:59 +01:00
Christoph Oelckers 9aa275f996 - got rid of some editor-only code and the entire buildvfs header
Nearly all file write access now uses the FileWriter class, which is UTF-8-safe on all platforms - unlike stdio.
2019-11-08 02:02:54 +01:00
Christoph Oelckers 2d46827ecc font
- Dear ImGUI test.
2019-11-07 20:32:49 +01:00
Christoph Oelckers e4735fdff1 - dead code removal. 2019-11-07 00:49:19 +01:00
Christoph Oelckers 5d31119a49 - fixed the Shadow Warrior menu, but it doesn't do much good. The game appears to be thoroughly broken. 2019-11-06 19:22:14 +01:00
Christoph Oelckers e87642e197 - cleaned out the remains of the savegame compression hacks
This broke the savegame reader which still assumed it was working on compressed data. Everything will now take the uncompressed path.

In-stream optional compression is not a good idea anyway, this can and should be done better.

Also: Why  is the savegame format architecture dependent???
2019-11-06 01:01:16 +01:00
Christoph Oelckers 341ca9dd3a - removed the EDuke revision data and replaced it with Demolition's own. 2019-11-05 20:48:34 +01:00
Christoph Oelckers 3a0b8364f7 - removed the OSD entirely. 2019-11-05 20:31:30 +01:00
Christoph Oelckers 8321bc6208 - removed most of the old OSD's hooks. 2019-11-05 20:25:57 +01:00
Christoph Oelckers d943fe036d - added the ZDoom console and made all needed changes to get it compiled. 2019-11-05 19:57:48 +01:00
Christoph Oelckers e37cb782ca - fixed dependency problems with OSD definitions being used in another header. 2019-11-05 00:39:00 +01:00
Christoph Oelckers 1ee4efebb0 - fixed compilation. 2019-11-04 17:58:18 +01:00
Christoph Oelckers e7f4433df6 - consolidation of mouse code and obsolete code removal 2019-11-04 02:07:59 +01:00
Christoph Oelckers 0b6db7eede - cleanup of baselayer.cpp 2019-11-04 01:18:38 +01:00
Christoph Oelckers 29b7e1cf79 - moved all mouse button handling to the input state
Yet again an unbelievable piece of code working around how input works on modern systems to keep the old 90's code alive.
2019-11-04 01:01:54 +01:00
Christoph Oelckers b747df60ee - moved all keyboard related code into the InputState class, so that looking for this stuff is easier.
Sadly there's 1ß00 lines of code using this...
2019-11-04 00:53:55 +01:00
Christoph Oelckers 01d5d51f13 - pass key events to the event queue. 2019-11-03 22:46:01 +01:00
Christoph Oelckers 250fa0b847 - consolidation of exit and quit CCMDs. 2019-11-03 13:31:03 +01:00
Christoph Oelckers 3c7151810f - made the game interfaces classes instead of function pointer lists because that is far better at error catching.
- fixed: Blood's monster flag is a 'have_monsters', not 'nomonsters' flag. As a result none were spawned.
2019-11-03 12:32:58 +01:00
Christoph Oelckers e4ecc5d8df - some reshuffling on OSD code.
* moved the binding commands to osd.cpp. They were in the global namespace already and this way everything to be tossed out is in the same place when the time comes.
* removed support for the OSDs native CVARs. The only ones left were some internal ones I won't need until this code can be replaced.
* same for the custpmization code the games added. Duke Nukem was the only one anyway to have a decent font for it.
2019-11-02 14:25:35 +01:00
Christoph Oelckers 8fb54b51c3 - rewrote the screenshot code to use m_png as its backend.
Mainly to finally get rid of kplib. There's really no use to keep such code around if alternatives are already present.
2019-11-02 12:59:59 +01:00
Christoph Oelckers 1d7bfe14dc - removed kplib's compression code.
Its only use in savegames has already been disabled in favor of a format restructuring.
2019-11-02 11:29:23 +01:00
Christoph Oelckers ab28697c18 - undid the very pointless pow2char (de)optimization by substituting the real array with an empty struct containing an inlined [] operator.
I think this shows a fundamental misunderstanding of what constexpr means, even when declared as such it requires a constant argument to be treated as a constant.
But since nearly all uses of this were not using constants, the compiler was emitting actual memory accesses to the array each time this was used.
2019-11-02 10:45:41 +01:00
Christoph Oelckers fca3c2f5b5 - removed the directory scan code from compat.cpp.
It is only used by the user map menus which I had to disable already and on top of that is blissfully incapable of dealing with Unicode.
2019-11-02 10:39:31 +01:00
Christoph Oelckers c54ae1be83 - removed the remaining parts of cache1d. The only thing left is the dummy cacheAllocateBlock function that needs to stick around until a working cache is present.
- disabled the user maps menu because it is hopelessly dependent on functionality that cannot be fixed. Better wait until the menu refactor to do it right - it'd be a waste of time fixing the current menus.
2019-11-02 01:30:21 +01:00
Christoph Oelckers 1149b4f4aa - various fixes and improvements related to file location management:
* saving of demos and savegames no longer mindlessly writes to the mod directory. All such access is now being rerouted through the special paths interface so that the game data can reside in write protected locations.
* refactored all occurences of klistpath except fnlist_getnames.
* do not allow CON scripts to write to arbitrary files. This is a massive exploit and can be used to cause real damage if someone knows how to play this thing - it's far easier than people may think! It will now write any such data to a special section in the main config which is safe and cannot be manipulated to write to random locations on the hard drive.
2019-11-02 00:38:30 +01:00
Christoph Oelckers cfca8060ba - gutted cache1d. The old file system is gone, excepr for klistpath, which still gets used in a few places.
- consolidated the 3 identical S_OpenAudio implementations. The replacement code is disabled for the time being because it needs a rewrite. The replacement logic is uses is a bit too volatile.
- removed the old GRP scan code.
2019-11-01 22:17:15 +01:00
Christoph Oelckers 2d7c0e26d2 - cleanup of the old file system initialization.
The real fun part is yet to come, i.e. removing the remaining dependencies on the old file system code.
2019-11-01 19:25:42 +01:00
Christoph Oelckers 39bfd64fe9 - a bit more cleanup in app_init. 2019-11-01 08:24:10 +01:00
Christoph Oelckers 67acad3984 - startup cleanup. 2019-11-01 00:32:56 +01:00
Christoph Oelckers 57f879fa8b - moved the startup dialog out of the game front ends, now that there is a global cross-game list of playable configurations. 2019-10-31 23:25:21 +01:00
Christoph Oelckers c6753a3fec - tested and fixed game list loader. 2019-10-31 00:41:56 +01:00
Christoph Oelckers 2a7beeff69 - cleaned out some chunks of unused or useless code, most importantly the Build cache which was only used by the sound code for permanently loading the data into memory. 2019-10-30 21:51:04 +01:00
hendricks266 dcba445f4e SW: Fix file loading and init sequence
git-svn-id: https://svn.eduke32.com/eduke32@8269 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/duke3d/src/common.cpp
#	source/duke3d/src/game.cpp
#	source/sw/src/common.cpp
#	source/sw/src/common_game.h
#	source/sw/src/game.cpp
#	source/sw/src/jnstub.cpp
2019-10-30 18:38:43 +01:00
hendricks266 797c79d4a5 Move registry reading to engine
git-svn-id: https://svn.eduke32.com/eduke32@8268 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/duke3d/src/common.cpp
2019-10-30 18:27:40 +01:00
hendricks266 9b21fe0c28 Move VDF parsing to engine
git-svn-id: https://svn.eduke32.com/eduke32@8267 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/common.h
#	source/duke3d/src/common.cpp
2019-10-30 18:15:00 +01:00
Christoph Oelckers f8203ac766 - fixed the compile errors and consolidated the key binding CCMDs. 2019-10-28 06:47:49 +01:00