Commit Graph

1365 Commits

Author SHA1 Message Date
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 c8fa2443d3 - completely separated view and model matrix.
This way the view matrix will remain constant per scene and an update of the model matrix is only needed for rendering a model or voxel, reducing the total amount of generated matrices to the point where they can be written to a buffer instead of constantly uploading them as uniforms.
2020-01-19 16:07:09 +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 c4429cf15d - fixed voxel rendering. 2020-01-19 13:50:31 +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 2bc1708870 - removed the complete crosshair color hackery.
The code needs to be refactored anyway to allow better crosshair control but this also seemed to affect global render state, considering how poorly it was all implemented.
2020-01-18 16:14:31 +01:00
Christoph Oelckers 8cd9775513 - fixed VP8 video player.
Also do the color space conversion on the CPU to avoid the shader hassle, performance wise it is utterly irrelevant here.
2020-01-18 16:14:30 +01:00
Christoph Oelckers 2e06ccfec6 - draw the screen overlays using the vertex buffer. 2020-01-18 16:14:30 +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
Christoph Oelckers 661431df87 - moved bits of my own code to properly copyrighted files. 2020-01-12 14:54:43 +01:00
Christoph Oelckers 6e3772d50d - fixed voxel color setting. 2020-01-11 22:39:53 +01:00
CommonLoon102 851a82c01f Blood: prefix the new maphack tokens with md
# Conflicts:
#	source/duke3d/src/lunatic/con_lang.lua
#	source/rr/src/lunatic/con_lang.lua
2020-01-11 22:24:13 +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 df7c5a7067 - use proper math instead of crash-prone libdivide here. 2020-01-08 00:06:24 +01:00
Christoph Oelckers fb985d2503 - more macOS compilation fixes
Still not complete…
2020-01-07 01:11:19 +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
Christoph Oelckers d4b32c535a - moved matrices to render state. 2020-01-03 23:38:50 +01:00
Christoph Oelckers f743b22661 - render voxels as triangles instead of quads.
Quads are not available in the core profile which is required to run GL 3.3 on macOS.
2020-01-03 18:09:05 +01:00
Christoph Oelckers ce75832945 - color and depth func moved to render state. 2020-01-03 11:43:44 +01:00
Christoph Oelckers cfc0ba48cb - moved render style handling to the render state and simplified its storage to use FRenderStyle instead of its components. 2020-01-03 10:48:22 +01:00
Evan Ramos 1caabf2e7b Add Blood-specific synonyms for tspritetype members 2020-01-03 08:05:43 +01:00
Christoph Oelckers 3380420de9 - converted the clear screen commands. 2020-01-02 23:56:35 +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 dda45c6780 - all polymost2 code has long been nuked. 2020-01-01 13:46:46 +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 d09b83d4a5 - moved the last remaining function out of baselayer.cpp and removed that file.
g_logFlushWindow was deleted entirely because with the current console this is not needed anymore.
2020-01-01 12:01:26 +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 05e381ff6d - fixed screen clearing for the automap.
This should only affect the active window, not the entire screen.
2019-12-31 19:50:27 +01:00
Christoph Oelckers ef5292b4ae - don't use Build's clipping code to clip automap parts to the screen.
Not really surprisingly this is not compatible with a real triangulator. Fortunately it's also not really needed.
2019-12-31 19:38:50 +01:00
Christoph Oelckers 1890df98f9 - process lines through the 2D drawer. 2019-12-31 19:02:55 +01:00
Christoph Oelckers 2f8d472d7d - cleaned up the map drawer by using a real triangulator.
Immediate benefit: almost 200 lines of bona-fide Kencode go to the dumpster.
2019-12-31 17:23:29 +01:00
Christoph Oelckers 77cd7bffc5 - fixed alpha calculations for textured automap. 2019-12-31 15:50:08 +01:00
Christoph Oelckers d825282726 - removed a few software rendering parts from the automap drawer.
These won't be needed anymore.
2019-12-31 15:41:12 +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 2c35f87925 - fixed translucency determination. 2019-12-30 21:03:15 +01:00
Christoph Oelckers ad24a1ce31 - place weapon sprites in a separate render list.
They need to be drawn in a different pass than the 2D overlay HUD so the backend must have them separately.
2019-12-30 20:16:51 +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
Christoph Oelckers f1891c7750 - fixed compilation. 2019-12-29 22:47:40 +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 737bf15ad8 - added GZDoom's postprocessing/presentation code.
Compiles but only draws a black screen. Something must be missing but no idea yet what that might be.
2019-12-28 22:36:47 +01:00
Christoph Oelckers f6dee38d28 - route all 2D drawing through the 2D drawer unconditionally.
This is needed so that the postprocessor receives a clean 3D view to process without messing up the 2D parts.
2019-12-28 19:10:23 +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
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
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 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 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 221e7a6b85 paletteGetClosestColor: I think these < should be <=
git-svn-id: https://svn.eduke32.com/eduke32@8489 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-23 10:59:21 +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
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 773be7db26 - moved around a few bits of code to get rid of winbits.cpp/h. 2019-12-22 18:53:58 +01:00
Christoph Oelckers 417d425f27 - fixed cherry picked commits. 2019-12-22 17:20:13 +01:00
hendricks266 f10ea8e630 Add check against MAXVOXELS in qloadkvx
git-svn-id: https://svn.eduke32.com/eduke32@8472 1a8010ca-5511-0410-912e-c29ae57300e0

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

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

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

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

# Conflicts:
#	source/build/include/build.h
#	source/build/src/defs.cpp
#	source/build/src/tiles.cpp
2019-12-22 15:07:26 +01:00
Christoph Oelckers fffe1753ec - removed a few unused bits of code. 2019-12-19 20:04:17 +01:00
Christoph Oelckers 3cb68b2bf0 - replaced the semi-broken screenshot name generator.
Also took this file out of the 'build' folder, now that all code in here comes from elsewhere.
This also removes a few dead declarations.
2019-12-19 19:47:51 +01:00
Christoph Oelckers ee93c6e366 - fixed voxel lighting.
In all that impenetrable voodoo math from Polymost it picked the wrong vector to calculate the depth of the scene and since I apparently removed the compensation math for the broken shader on the C++ side the calculated value was no longer correct.
That Polymost renderer really needs to go away. :(
2019-12-19 17:51:33 +01:00
Christoph Oelckers 43c66d07ae Merge branch 'master' into sound 2019-12-18 11:23:20 +01:00
hendricks266 434ed57337 Fix rotatesprite widescreen pinning in 5:4
git-svn-id: https://svn.eduke32.com/eduke32@8454 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-18 11:20:30 +01:00
hendricks266 1ccda16e8e Avoid shadowed variable in dorotatesprite
Backported from PCExhumed.

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

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

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

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

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

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

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

git-svn-id: https://svn.eduke32.com/eduke32@8432 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-18 11:12:41 +01:00
Christoph Oelckers 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 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 91f83d4c55 - input code cleanup and addition of ZDoom's joystick code, which is not fully connected yet. 2019-12-14 17:15:17 +01:00
nukeykt bff0646263 Recalculate horizycent because ydim can be changed in renderSetTarget 2019-12-14 00:20:58 +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 b13ee90aa0 - first steps trying to get the game to work. 2019-12-13 00:19:34 +01:00
hendricks266 0d7fc1263e Improve diagnostic printing of slopalookup overflows
git-svn-id: https://svn.eduke32.com/eduke32@8419 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-09 17:25:25 +01:00
hendricks266 b71ef4a140 Fix regression in software rendering of slopes in r8363
git-svn-id: https://svn.eduke32.com/eduke32@8418 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-09 17:25:16 +01:00
Christoph Oelckers 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
terminx 265e7109aa Equivalent to 04e7e6af69
git-svn-id: https://svn.eduke32.com/eduke32@8363 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-08 07:53:27 +01:00
Christoph Oelckers 8f90cc8324 - more Shadow Warrior cleanup. 2019-12-07 20:48:16 +01:00
Christoph Oelckers 0b8da78ff5 - toupperlookup was no longer referenced anywhere. 2019-12-07 10:56:35 +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 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 3d10d006a7 - fixing mouse menu control, part 1. 2019-12-05 23:49:32 +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 54177cd27d - added the animated player display. 2019-12-05 19:52:46 +01:00
hendricks266 d1ed4063eb Fix the widescreen alignment of weapons when shrinking the screen with + or - (currently disabled by default)
Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@8356 1a8010ca-5511-0410-912e-c29ae57300e0
2019-12-05 17:23:07 +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 1cfe5be130 - fixed creation of true color textures.
The palette check was not correct so they ended up empty and caused other problems down the line.
2019-12-01 21:43:54 +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 c36402eb5c - fixed savegame validation and recursive ticker calls. 2019-11-30 23:33:04 +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 3bb46a4d8d Merge branch 'master' into menu_for_real 2019-11-27 18:04:44 +01:00
hendricks266 ece20928a0 Fix buffer overflow in getclosestcol_lim
Patch from Nuke.YKT.

git-svn-id: https://svn.eduke32.com/eduke32@8315 1a8010ca-5511-0410-912e-c29ae57300e0
2019-11-27 18:01:58 +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
hendricks266 31f8cb4def SW: Fix an assertion failure in palette changing code
git-svn-id: https://svn.eduke32.com/eduke32@8300 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/palette.cpp
2019-11-26 17:59:01 +01:00
hendricks266 46d4855901 Fix the ifcrc token: 0 is a valid CRC32 result!
git-svn-id: https://svn.eduke32.com/eduke32@8296 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/defs.cpp
2019-11-26 17:51:33 +01:00
Christoph Oelckers a74a670c99 -- more work on the menu - episode and skill menus are working in DN3D. 2019-11-25 23:21:51 +01:00
Christoph Oelckers 42b3d12630 - Ion Fury's main menu now looks correct. 2019-11-24 22:31:27 +01:00
Christoph Oelckers a96f1b25f7 - fixed recursion issue with menu and CON scripting.
Curse all those busy loops in the engine.
2019-11-24 17:52:54 +01:00
nukeykt 524d0dd496 Fix buffer overflow in getclosestcol_lim 2019-11-23 23:37:32 +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
nukeykt 5b50236d18 Fix movement issues when emulating old engine code 2019-11-22 00:10:35 +01:00
nukeykt bef08f4442 Fix getflor/ceilingofslope_old 2019-11-22 00:10:31 +01:00
nukeykt 6b6ecaf0fa Fix silly typo in cansee 2019-11-22 00:10:30 +01:00
nukeykt 708483ca78 wip 2019-11-21 22:59:46 +01:00
nukeykt 50349a6b3d wip
# Conflicts:
#	platform/Windows/exhumed.vcxproj
#	platform/Windows/exhumed.vcxproj.filters
#	source/build/include/build.h
#	source/build/src/palette.cpp
2019-11-21 22:59:33 +01:00
Christoph Oelckers 5f9b57519a - hooked up the menu code so that it can receive events.
Nothing pretty yet but a start is made.
2019-11-21 22:31:46 +01:00
Christoph Oelckers 2740913c60 - added a redirection hack for rotatesprite so that it can be transitionally used in the 2D drawer. 2019-11-21 19:30:27 +01:00
Christoph Oelckers 81ddf22d5d - added ZDoom's menu system as a base to build a new menu on.
# Conflicts:
#	source/CMakeLists.txt
#	source/build/src/engine.cpp
2019-11-21 18:03:09 +01:00
Christoph Oelckers caa450dcb9 - debugprintf 2019-11-20 20:07:33 +01:00
Christoph Oelckers 6d40c9202c - deleted a batch of code from engine.cpp which is only needed for the assembly drawers. 2019-11-20 19:33:36 +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 022c074ece - fixed brightmaps again - hopefully for real this time.
The lighting model being used here is not really good for implementing render effect.
2019-11-11 23:54:09 +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 7e70c217fe - fixed console event processing and added a texture memory calculator. 2019-11-09 23:58:26 +01:00
Christoph Oelckers 39df3d0560 - added 'logfile' CCMD. 2019-11-09 22:27:33 +01:00
Christoph Oelckers 2997bb6292 - the keybinding menu is finally working.
Obviously the existing menu implementation from Duke Nukem needs to be tossed out at some point, but at least the functionality is there again.
2019-11-09 22:22:51 +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 0f74a5c3a4 - make the ImGui popup close on request. 2019-11-09 14:05:52 +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 b6a3a60251 - console output is functional. 2019-11-06 23:40:10 +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 c46b22e52e - more cleanup of obsolete OSD code. 2019-11-05 20:16:53 +01:00
Christoph Oelckers a4483f131d - Printf related cleanup. 2019-11-05 20:07:16 +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 ffa16b2a53 - removed all command related code from the OSD.
None of this was used anymore.
2019-11-05 00:48:27 +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 5b67d653ed - removed the bind command set from the osdcmd files to make sure that they don't get called anympre. All input should be routed through the new console code now.
# Conflicts:
#	source/blood/src/osdcmd.cpp
#	source/build/src/osd.cpp
#	source/common/console/c_cmdline.h
#	source/common/console/c_dispatch.cpp
#	source/common/console/c_dispatch.h
#	source/duke3d/src/osdcmds.cpp
#	source/rr/src/osdcmds.cpp
2019-11-05 00:22:42 +01:00
Christoph Oelckers 44f81ebd56 - let OSD_Dispatch forward everything to the ZDoom-based command dispatcher.
Essentially making the OSD a dumb terminal. :P
2019-11-05 00:12:20 +01:00