Commit Graph

286 Commits

Author SHA1 Message Date
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
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 eac1007c56 - automap color fix. 2020-01-30 22:05:18 +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 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 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
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 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
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 964e303dd7 - draw the textures on the automap with the 2D drawer. 2019-12-31 15:05:08 +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 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
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
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 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 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 62ecedf1f8 - got it to the point where it can render to the GL surface from the native backend. 2019-12-23 19:37:40 +01:00
hendricks266 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 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
Christoph Oelckers 43c66d07ae Merge branch 'master' into sound 2019-12-18 11:23:20 +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
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 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 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 e4735fdff1 - dead code removal. 2019-11-07 00:49:19 +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 250fa0b847 - consolidation of exit and quit CCMDs. 2019-11-03 13:31:03 +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 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 c0d5ca8ab8 - Config work almost done.
The only thing still referencing the old config file is Shadow Warrior's config read function.
2019-10-27 13:40:24 +01:00
Christoph Oelckers 20df360778 - converted the Polymost CVARs. 2019-10-23 21:11:37 +02:00
Szilárd Biró c419fae31b Fix compiling without OpenGL 2019-10-23 18:37:56 +02:00
Christoph Oelckers 63f020996e - a few more CVARs 2019-10-23 01:30:43 +02:00
Christoph Oelckers cd7bbe35a8 - removed all legacy fog code. 2019-10-19 15:52:46 +02:00
Christoph Oelckers 1426ebec20 Moved hightile replacement data into the textures
Not tested yet!
2019-10-17 12:45:25 +02:00
Christoph Oelckers 4f8e0dd936 - cleaned up a few copyright notices and unified licenses 2019-10-17 09:42:11 +02:00
Christoph Oelckers 0aa5db7969 - project rework to shorten compile times.
* subprojects fpr game frontends added and unsigned char option put into global flags.
2019-10-16 23:09:02 +02:00
Christoph Oelckers 64e116a4b1 - use special classes with [] operators to redirect the frequently used global arrays to the newly implemented texture manager.
This allows to use the contained storage without changing all the code.
2019-10-16 20:39:59 +02:00
Christoph Oelckers 4dc69620b7 - cleanup 2019-10-15 23:56:29 +02:00
Christoph Oelckers 57c221644a - transitioned all texture options of the def file 2019-10-15 23:38:01 +02:00
Christoph Oelckers bb78db71bc - tileDelete / tileSetDummy 2019-10-15 23:29:47 +02:00
Christoph Oelckers 9a52e8039c - rerouted tileCreate and tileSetExternal calls. 2019-10-15 23:18:52 +02:00
Christoph Oelckers c3bc690e98 - more updating and bug in UpdatePicSize fixed. 2019-10-15 20:02:37 +02:00
Christoph Oelckers 0e165e40a3 - first batch of adjustments to the new tile management.
- consolidated Polymost precaching and removed precaching for static tiles because they now are always loaded.
- removed cache configurability. On modern systems this is relatively pointless - allocating 50 or 100 MB is a non-issue - and the cache is due for replacement anyway.
2019-10-15 00:54:14 +02:00
Christoph Oelckers 039d948991 - update of new texture classes. 2019-10-14 23:11:01 +02:00
Christoph Oelckers a6ba81939a - reworked texture management, not yet active. 2019-10-12 22:49:46 +02:00
Christoph Oelckers fbc22e0125 - sanitized walock.
Sorry, but having a globally writable pointer to every texture is just insane and makes any functional management impossible.
This is merely a preparation for adding a real texture manager. That cannot be done if any code can write over the data at will. For that, it now has to make the texture writable first or create a writable empty texture.
2019-10-11 23:31:59 +02:00
Christoph Oelckers 3621aae3f0 - rerouted all write accesses to tilesiz and picsiz through a function interface.
These will have to do some texture management bookkeeping so directly changing the values is problematic.
This required changing the parameter interface in polymost.cpp because a few places hacked around with the global state to pass parameters to subfunctions.
2019-10-11 21:04:31 +02:00
Christoph Oelckers 14b21bab7a - merged playing_blood and bloodhack variables because they did the same thing.
The only difference was that bloodhack came from NBlood and playing_blood was added for unhandled differences between the backends of EDuke32 and NBlood.
2019-10-11 00:34:27 +02:00
Christoph Oelckers fbc7e626e9 - removed the fullbright render pass, because this is better set up as a shader option.
- also removed the legacy fog modes because their implementation did not mix well with the texture system - they are also not really useful to begin with.

The last fog mode will most likely also be removed once true color shading is working but that one is less of an issue.
2019-10-10 21:05:10 +02:00
Christoph Oelckers 93f9303c62 - minor reorganization of tiles. 2019-10-08 19:46:39 +02:00
Christoph Oelckers d1a7c4225d - added a texture class for ART-format hightiles.
This allows to treat them like all other image formats.
2019-10-05 23:44:28 +02:00
Christoph Oelckers f99492d6d5 - removed OpenGL headers from non-backend files. 2019-10-05 13:57:26 +02:00
Christoph Oelckers bd4e4834e3 - moved the main shader and its entire uniform maintenance into the backend. 2019-10-05 12:28:08 +02:00
Christoph Oelckers 96c0c3197c - abstracted away more OpenGL calls, in particular all matrix access. 2019-10-04 18:12:03 +02:00
Christoph Oelckers 0261fef4a8 - removed some unused files. 2019-09-25 23:00:10 +02:00
nukeykt 895fb719d9 blooddemohack -> enginecompatibility_mode 2019-09-23 01:30:07 +02:00
Christoph Oelckers 2cbe211e7c - transitioned project to CMake and deleted most of the old build system.
The EDuke32 and RedNukem frontends are working, Blood isn't yet.

Notes:

many of the CMake variables and its output still refer to zdoom. Before changing that I wanted to make sure to be able to commit something that works.
support code for Windows XP has been entirely removed. On Windows this will only target Vista and up.
the crc32.h header had to be renamed to deconflict from zlib.
several Windows API calls were changed to call the A-versions directly. Weirdly enough there were places that defined their parameters as T types but in a non-working way.
removed some remaining editor files and support for the native software rendering only Windows backend.
in a few simple cases, replaced 'char' with 'uint8_t'. The code as-is depends on chars being unsigned which is non-portable. This needs to be carefully reviewed.
2019-09-22 23:15:46 +02:00
Christoph Oelckers 55a879fcc0 - put EDuke frontend source into a namespace.
This commit does not work yet!
2019-09-21 22:53:00 +02:00
Christoph Oelckers 5050716bc0 - removed most extern "C" from the rest of the code base. 2019-09-21 20:14:34 +02:00
Christoph Oelckers a2b429ffe0 - removed unused declaration. 2019-09-21 13:16:02 +02:00
Christoph Oelckers 998ac01157 - manual merge of all NBlood changes that couldn't get cherry picked. 2019-09-21 13:02:17 +02:00
nukeykt 81f78c24b7 Implement rotate parameter for voxel definitions
# Conflicts:
#	source/build/include/build.h
#	source/build/include/mdsprite.h
#	source/build/src/defs.cpp
2019-09-21 11:43:50 +02:00
nukeykt 68c7b8c402 Compile fix
# Conflicts:
#	source/build/include/build.h
2019-09-21 10:38:26 +02:00
nukeykt 935084ae52 More hacks to emulate old clipping
# Conflicts:
#	source/build/src/clip.cpp
2019-09-21 10:28:10 +02:00
nukeykt 107a630883 Add TROR rendering
# Conflicts:
#	source/blood/src/mapedit.cpp
#	source/build/include/editor.h
#	source/build/include/polymer.h
#	source/build/src/build.cpp
#	source/build/src/polymer.cpp
2019-09-21 10:11:02 +02:00
nukeykt 1fe344d273 Free cstat bit 14
# Conflicts:
#	source/blood/src/mapedit.cpp
#	source/build/src/build.cpp
#	source/build/src/engine.cpp
#	source/duke3d/src/astub.cpp
2019-09-21 10:10:15 +02:00
nukeykt 858da4351c Semi-working map save 2019-09-21 10:08:04 +02:00
nukeykt 2867131c86 Add ability to load blood maps
# Conflicts:
#	platform/Windows/nmapedit.vcxproj
#	platform/Windows/nmapedit.vcxproj.filters
#	source/blood/src/mapedit.cpp
#	source/build/src/build.cpp
#	source/build/src/engine.cpp
2019-09-21 10:06:57 +02:00
nukeykt 8fd6e0e183 TROR related tweaks
# Conflicts:
#	source/blood/src/mirrors.cpp
2019-09-21 09:59:58 +02:00
terminx 3e4f2de79a Add yax_getzsofslope(), based on getzsofslope_player()
git-svn-id: https://svn.eduke32.com/eduke32@8109 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 23:23:17 +02:00
terminx aa8ce8d42a Fix USE_OPENGL=0 builds
git-svn-id: https://svn.eduke32.com/eduke32@8082 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 23:17:57 +02:00
Christoph Oelckers 46b4b6ffd4 - removed all editor related code from 2D.cpp.
# Conflicts:
#	source/build/include/build.h
#	source/build/src/2d.cpp
#	source/build/src/softwarerenderer/engine_swr.cpp
2019-09-20 22:24:03 +02:00
pogokeen 222e593437 Change some clocks to support sub-tick precision using a new class, ClockTicks.
Using that higher precision, interpolate at a higher granularity.
Further, truncate the target interpolation time to vertical blank boundaries to avoid producing temporal artifacts.
Fix issues caused by interpolation calculations being handled differently in multiple places (and fix cases where smoothratios were being thrown away only to be redone without checking all proper conditions).
Ensure ClockTicks changes do not break other targets (EKenBuild, VoidSW), but note any interpolation there is not similarly updated.

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

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/sdlayer.cpp
2019-09-20 21:09:14 +02:00
terminx ec7fce9ff2 Ultra minor clipping stuff
git-svn-id: https://svn.eduke32.com/eduke32@8048 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 20:19:11 +02:00
Christoph Oelckers 20f5972b9b - fixed everything to compile again. 2019-09-20 19:37:29 +02:00
hendricks266 3bfed33608 Add voxels option to menu, if at least one has been defined
git-svn-id: https://svn.eduke32.com/eduke32@7961 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/engine.cpp
2019-09-20 16:04:57 +02:00
terminx 41ff733fcd Happier try_facespr_intersect()
I'm prejudiced against 30-line functions with statements nested 5 levels deep.

git-svn-id: https://svn.eduke32.com/eduke32@7933 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 16:02:56 +02:00
terminx 95598e08f9 getwalldist() tweak
git-svn-id: https://svn.eduke32.com/eduke32@7878 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:34:14 +02:00
terminx 9f9a158946 Replace runtime pow2 calculations with pow2char LUT usage
I don't know that this is any faster, but there's something to be said for standardization and consistency. I will be making most of this stuff use bitmap_set/test/clear() soon.

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

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/polymost.cpp
2019-09-20 15:34:08 +02:00
terminx 1a0c56f0f1 This adds back in the engine's old automapping feature
This was removed a long time ago because Duke3D and Shadow Warrior don't use it.

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

# Conflicts:
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
2019-09-20 15:32:13 +02:00
terminx c7e403619b Don't blow away wall cstat bit 14 for use as a temp flag in the editor
Patch from Nuke.YKT.

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

# Conflicts:
#	source/build/src/build.cpp
2019-09-20 15:29:35 +02:00
terminx 2482cddbb5 Add getcorrectzsofslope()
git-svn-id: https://svn.eduke32.com/eduke32@7822 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:23:08 +02:00
terminx 165b320f64 Amend r7805
'Murica.

git-svn-id: https://svn.eduke32.com/eduke32@7811 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 15:17:40 +02:00
pogokeen 3d63d1b720 Add updatesectorneighbour() and updatesectorneighbourz() and make them accessible to CON to allow searching for nearby neighbouring sectors from a known sector.
These updatesector counterparts are more performant for tasks that require determining whether nearby sectors exist at a point as they will not exhaustively search the map.
This also leads to more correct behaviour when sectors are disjoint, as queries will breadth-first search neighbouring sectors rather than risk accidentally stumbling first across accomodating disjoint sectors.

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

# Conflicts:
#	source/build/include/build.h
2019-09-20 15:16:47 +02:00
terminx 7e7f19b5fd Add tilehasmodelorvoxel() function and fix instances where voxels for multi-sided sprites would get flipped based on the viewing angle
git-svn-id: https://svn.eduke32.com/eduke32@7767 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 14:36:40 +02:00
pogokeen 8cbdf3a0c4 Use stencil buffer in Polymost to restrict mirrors to only render within the region of the screen occupied by the mirror wall.
Additionally, raise minimum number of stencil buffer bits to accomodate future use of the stencil buffer.

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

# Conflicts:
#	source/build/include/build.h
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/kenbuild/src/game.cpp
2019-09-20 14:04:29 +02:00
pogokeen 281ee3358b Add benchmarkmode cvar which allows putting demo cameras in the map which can be used for automatic benchmarking of performance & correctness testing
git-svn-id: https://svn.eduke32.com/eduke32@7729 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 13:32:24 +02:00
terminx 2ce96f67be Patch from Nuke.YKT to add support for the cstat flip bits to voxels in both software and Polymost
git-svn-id: https://svn.eduke32.com/eduke32@7723 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 13:17:29 +02:00
terminx ff4449638e Use #if DEBUGGINGAIDS>=2 for the assertions in the structure trackers
git-svn-id: https://svn.eduke32.com/eduke32@7711 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 12:07:27 +02:00
terminx 26a266dfe5 Rename STRUCT_TRACKERS_ENABLED preprocessor definition to USE_STRUCT_TRACKERS
This may also fix a minor performance regression introduced in Polymer sometime after we switched to building as C++, caused by confusion between STRUCT_TRACKERS_ENABLED and UNTRACKED_STRUCTS. UNTRACKED_STRUCTS is now named UNTRACT_STRUCTS__ to dissuade use outside of buildtypes.h.

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

# Conflicts:
#	source/build/src/polymer.cpp
2019-09-20 12:01:36 +02:00
terminx 9d7e5d9970 Rename vec2s_t to vec2_16_t
git-svn-id: https://svn.eduke32.com/eduke32@7694 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/polymost.cpp
2019-09-20 11:28:57 +02:00
terminx 5be379c6b0 This benchmarks as just the tiniest bit faster on my machine
git-svn-id: https://svn.eduke32.com/eduke32@7691 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:15:19 +02:00
terminx 0556fe1738 Simplify map structure tracker overloads
Due to less branching, this is actually faster than trying to be clever.

git-svn-id: https://svn.eduke32.com/eduke32@7690 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:15:17 +02:00
terminx 9aa1030a09 Promote `display_mirror` from char to int32_t and remove GAMEVAR_UINT8PTR handling since nothing else was using it
git-svn-id: https://svn.eduke32.com/eduke32@7662 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:31 +02:00
terminx 3db7512c69 Templatize bfirst_search_init() and bfirst_search_try() so they can be used with types other than int16_t
git-svn-id: https://svn.eduke32.com/eduke32@7629 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
2019-09-20 09:20:14 +02:00
Christoph Oelckers 8074d8251e - can be compiled again but crashes. 2019-09-19 23:02:57 +02:00
Christoph Oelckers 53335f20ec - Blood merge
# Conflicts:
#	source/build/include/polymost.h
#	source/build/src/build.cpp
#	source/build/src/engine.cpp
#	source/build/src/polymost.cpp
#	source/build/src/voxmodel.cpp
2019-09-19 22:06:49 +02:00
terminx 60ea578a8c Add support for returning the closest point in the sector to getsectordist()
git-svn-id: https://svn.eduke32.com/eduke32@7609 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:52:37 +02:00
terminx 8d85e8d934 Add new findwallbetweensectors() function and change sectoradjacent() to use it
git-svn-id: https://svn.eduke32.com/eduke32@7608 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:52:35 +02:00
terminx 301ac48ccd Utilize the types added in the previous commit
This patch is a bit large.

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

# Conflicts:
#	source/build/include/mdsprite.h
#	source/build/src/build.cpp
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/build/src/voxmodel.cpp
2019-09-19 14:46:31 +02:00
terminx 5948513d76 Introduce a few "new" types for convenience when dealing with pointers to sprites, walls, and sectors that bypass the StructTracker stuff
git-svn-id: https://svn.eduke32.com/eduke32@7602 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:37:07 +02:00
terminx a89c260592 Add optional output parameter to getwalldist(), to return the coordinates of the closest point on the wall
git-svn-id: https://svn.eduke32.com/eduke32@7600 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:37:04 +02:00
terminx 413d68f1f8 Replace yax_getclosestpointonwall() with getclosestpointonwall_internal() and use it in both yax_walldist() and getwalldist()
This commit also adds a getsectordist() but we aren't using it anywhere yet.

git-svn-id: https://svn.eduke32.com/eduke32@7591 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:36:40 +02:00
terminx ea826fb117 Move NEXTWALL and POINT2 macros into build.h
git-svn-id: https://svn.eduke32.com/eduke32@7590 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:30:26 +02:00
terminx e5bd221746 auto/const/constexpr bullshit
git-svn-id: https://svn.eduke32.com/eduke32@7587 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:49 +02:00
terminx f9e866d32d Rename clipwalldist() to getwalldist() and move both it and sectoradjacent() to engine.cpp
git-svn-id: https://svn.eduke32.com/eduke32@7586 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:48 +02:00
terminx 76d7fec2ff Expose yax_getclosestpointonwall() for use outside of engine.cpp
git-svn-id: https://svn.eduke32.com/eduke32@7581 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:26:38 +02:00
terminx 7abfcd28be Add clipupdatesector(), a special version of updatesector() that only searches and returns results that are already in clipsectorlist[]
git-svn-id: https://svn.eduke32.com/eduke32@7546 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 14:20:47 +02:00
terminx 0edbd45145 Retire the original naive updatesector() and updatesectorz() in favor of the breadth-first versions
git-svn-id: https://svn.eduke32.com/eduke32@7484 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/polymer.cpp
2019-09-19 13:52:32 +02:00
terminx 631863ab67 const correctness for parameters passed to the updatesector family of functions
git-svn-id: https://svn.eduke32.com/eduke32@7478 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:46 +02:00
terminx 83999ee6e4 Minor cleanup of breadth-first search functions
git-svn-id: https://svn.eduke32.com/eduke32@7476 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:41 +02:00
pogokeen a82eb1d6fe Re-introduce earlier lintersect() work that was reverted.
engine.cpp/.h: clean up & fix lintersect().  Additionally, add support for finding intersections of collinear line segments.

This reverts r7290.

git-svn-id: https://svn.eduke32.com/eduke32@7471 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-19 13:51:32 +02:00
Christoph Oelckers 155f093bd5 - stuff 2019-09-17 20:57:45 +02:00
Christoph Oelckers d63cf04e06 - removed the compressed texture cache.
This is a pointless relic from the past and makes zero sense with modern graphics hardware.
2019-09-17 20:18:18 +02:00
Christoph Oelckers 6536d910b3 - all drawing is being routed through the interface layer, all vertex buffers are gone.
No big loss here, none of them made much sense performance wise.
2019-09-16 21:08:42 +02:00
Christoph Oelckers 524f6cf5e5 - crap 2019-09-13 22:18:37 +02:00
terminx 7ccbd22013 Move some clipping related stuff out of engine.cpp and into clip.cpp
git-svn-id: https://svn.eduke32.com/eduke32@7417 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-19 17:08:59 +00:00
terminx 61b89491c6 Lower MAXWALLSB
git-svn-id: https://svn.eduke32.com/eduke32@7373 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:48 +00:00
terminx e84d62416d Patch from Striker to allow selective tile redefinition in .def files based on the crc of the original tile
This only works for "tilefromtexture" for now.

git-svn-id: https://svn.eduke32.com/eduke32@7370 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-02 23:21:37 +00:00
hendricks266 7414f29348 Add buildvfs, abstraction layer for file I/O.
Currently it passes calls through to the system libraries as before.

Also adds an incomplete implementation on PhysFS.

git-svn-id: https://svn.eduke32.com/eduke32@7359 1a8010ca-5511-0410-912e-c29ae57300e0
2019-03-01 08:51:50 +00:00
terminx 8e50f47aa4 rotatesprite hack from Fox
git-svn-id: https://svn.eduke32.com/eduke32@7321 1a8010ca-5511-0410-912e-c29ae57300e0
2019-01-30 00:19:56 +00:00
terminx ea86e5520b Revert "engine.cpp/.h: clean up & fix lintersect(). Additionally, add support for finding intersections of collinear line segments."
This reverts r6886.

git-svn-id: https://svn.eduke32.com/eduke32@7290 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-15 01:40:31 +00:00
terminx ae39954376 Initialize rottile values to -1 with a loop like this instead, because doing it the C++ way increases the binary size by like 120KB
git-svn-id: https://svn.eduke32.com/eduke32@7255 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-15 01:37:19 +00:00
seventyfive 87cf4495bf - Packet code implementation (merge from private c/s repo), world updates are now synced through snapshots. See tag SVN_SyncPoint_Dec2018 on master of the other repo.
- "Scratch pad" sprites implementation, to avoid desyncs in sprite indexes, clients will insert temporary sprites which are cleared out when they receive the next snapshot from the server.
- Patches from Striker which fix player stomping frag counts, the accept button when hosting a game through the menu, and a "noffire" command line parameter.
- Patches from NY00123: t_data sync optimizations to improve some jittery behavior on the client side.

git-svn-id: https://svn.eduke32.com/eduke32@7242 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-08 00:40:39 +00:00
terminx 252fb58321 Fix oversight with wall texture rotation on tile 0
git-svn-id: https://svn.eduke32.com/eduke32@7240 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 21:17:59 +00:00
terminx 4861d1fc3d WIP wall texture rotation bit
git-svn-id: https://svn.eduke32.com/eduke32@7226 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:13:48 +00:00
terminx e513e1ceae Cleanup includes
git-svn-id: https://svn.eduke32.com/eduke32@7186 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:09:48 +00:00
terminx a6e60e9723 Move pow2char and pow2long to build.h and make them constexpr
git-svn-id: https://svn.eduke32.com/eduke32@7146 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-18 18:05:26 +00:00
hendricks266 de5d358d32 Refresh BUILDLIC copyright headers
git-svn-id: https://svn.eduke32.com/eduke32@7139 1a8010ca-5511-0410-912e-c29ae57300e0
2018-11-05 07:28:01 +00:00
terminx ebcebbde5e Update engine headers so that argument names in function declarations match the actual function definitions. This also removes const from function declarations in cases when it isn't meaningful.
git-svn-id: https://svn.eduke32.com/eduke32@7073 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-16 06:09:20 +00:00
pogokeen 1df7127609 Support software renderer upscaling engine-side in sdlayer and sdlayer12 with various scaling factors (beyond just pixel doubling).
When glsurface is available, use GL to upscale the render buffer.
Additionally, fix build issues with sdlayer12 introduced by GLAD changes (r6656).

git-svn-id: https://svn.eduke32.com/eduke32@6939 1a8010ca-5511-0410-912e-c29ae57300e0
2018-07-14 21:36:44 +00:00
pogokeen d6d078114c engine.cpp/.h: clean up & fix lintersect(). Additionally, add support for finding intersections of collinear line segments.
git-svn-id: https://svn.eduke32.com/eduke32@6886 1a8010ca-5511-0410-912e-c29ae57300e0
2018-05-15 16:45:34 +00:00
terminx 87d19d5cde More function name shit
git-svn-id: https://svn.eduke32.com/eduke32@6832 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:04:00 +00:00
terminx 19c43b84b3 Function names
git-svn-id: https://svn.eduke32.com/eduke32@6831 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:03:47 +00:00
terminx e5bcc1cf81 More function name cleanup
git-svn-id: https://svn.eduke32.com/eduke32@6830 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:03:30 +00:00
terminx 1fd209444f Continuing the quest for clearer function names
git-svn-id: https://svn.eduke32.com/eduke32@6829 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:03:12 +00:00
terminx 0340e3cc0f Engine function name cleanup round 2
git-svn-id: https://svn.eduke32.com/eduke32@6828 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:02:51 +00:00
terminx ee63d2c070 Beginnings of baselayer.cpp/.h refactor. This is 99.9% renames.
git-svn-id: https://svn.eduke32.com/eduke32@6827 1a8010ca-5511-0410-912e-c29ae57300e0
2018-04-12 21:02:31 +00:00