Commit Graph

50 Commits

Author SHA1 Message Date
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
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 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 e24b1e8903 - replaced all uses of xxhash with SuperFastHash.
That's one more third party dependency down.
Not only are two hashing algorithms redundant, there was also a large size discrepancy: SuperFastHash is 3 kb of source code while xxhash is 120kb and generally extremely awful code.
It was easy to make a choice here. None of the use cases require this kind of performance tweaking, the longest hashed block of data is a 768 byte palette.
2019-11-02 22:52:13 +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 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 8c7590e161 - refactored most of the remaining calls to kopen4load 2019-10-21 17:16:08 +02:00
Christoph Oelckers 5333f6adc1 - refactored a few more - simple stuff but lots of lines. 2019-10-21 00:13:17 +02:00
Christoph Oelckers 449a5a4717 - refactoring of palette loader. 2019-10-20 22:26:53 +02:00
Christoph Oelckers 7d2f61db2e - converted all boolean parameters of the shader into a single flag word.
- discarded the idea of transient palettes because the maintenance here stood in no relation to the savingd.
2019-10-19 22:46:37 +02:00
Christoph Oelckers cd7bbe35a8 - removed all legacy fog code. 2019-10-19 15:52:46 +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 84b10bdb74 - cleaned up videoUpdatePalette function and removed the hardware texture invalidation from it.
This makes no sense because it'd toss out all the level textures that may still be needed for what probably is only a temporary palette change (like going underwater)
2019-10-10 20:28:41 +02:00
Christoph Oelckers ef2de97077 - the harmless changes of the failed refactoring of the shader. 2019-10-06 19:32:35 +02:00
Christoph Oelckers 93ad83b380 - use GZDoom's texture backend to read hightile textures. (Hightile tinting code moved to the shader but isn't active yet.
- remove all code for faking gamma correction through palette manipulated images.
2019-10-05 21:59:03 +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 f992aebf33 - two more 2019-10-04 19:17:55 +02:00
Christoph Oelckers 204abab724 glColor calls refactored. 2019-10-04 18:25:18 +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 998ac01157 - manual merge of all NBlood changes that couldn't get cherry picked. 2019-09-21 13:02:17 +02:00
nukeykt 140174d1ee Minor tweaks
# Conflicts:
#	source/blood/src/m32common.cpp
#	source/blood/src/mapedit.cpp
2019-09-21 10:08:04 +02:00
terminx ccdba037b5 Added Xfree() function to accompany the Xmalloc() family of functions and change all uses of Bfree() to Xfree()
This was necessary because everything is already allocated with the Xmalloc() functions, but a future commit will make blocks allocated with those functions no longer compatible with the system implementation of free(), which Bfree() wraps.

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

# Conflicts:
#	source/build/src/build.cpp
#	source/build/src/mdsprite.cpp
#	source/build/src/polymer.cpp
#	source/build/src/polymost.cpp
#	source/build/src/texcache.cpp
#	source/build/src/voxmodel.cpp
2019-09-20 12:07:10 +02:00
Christoph Oelckers 8074d8251e - can be compiled again but crashes. 2019-09-19 23:02:57 +02:00
Christoph Oelckers dd7ce38cbb - adjustments for the Blood merge. 2019-09-19 22:26:44 +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
Christoph Oelckers 51dc82b6a6 - merged in the changes RedNukem made to the Build code. 2019-09-19 00:19:02 +02:00
Christoph Oelckers e0f823a492 - refactored texture setup to use an intermediate layer. 2019-09-18 22:16:15 +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
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 91096d2415 Hendricks and I discussed "auto *" and we've come to the conclusion that it's bad form, so this corrects that.
git-svn-id: https://svn.eduke32.com/eduke32@7283 1a8010ca-5511-0410-912e-c29ae57300e0
2018-12-15 01:39:51 +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 ad7d61baa1 Use range-based loops for simplicity
git-svn-id: https://svn.eduke32.com/eduke32@7130 1a8010ca-5511-0410-912e-c29ae57300e0
2018-10-25 23:33:40 +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 9e90b0633b glsurface.h/.cpp: change how the palette is handled and fix tinting/fading
git-svn-id: https://svn.eduke32.com/eduke32@6932 1a8010ca-5511-0410-912e-c29ae57300e0
2018-06-25 14:53:46 +00:00
pogokeen 9d243606d0 When OpenGL is available, prefer using the new glsurface to blit the classic renderer's 8-bit buffer to the screen.
git-svn-id: https://svn.eduke32.com/eduke32@6919 1a8010ca-5511-0410-912e-c29ae57300e0
2018-06-13 19:15:16 +00:00
pogokeen 054f25d7ef palette.cpp: don't call uploadbasepalette() if USE_OPENGL is not defined
git-svn-id: https://svn.eduke32.com/eduke32@6915 1a8010ca-5511-0410-912e-c29ae57300e0
2018-06-12 02:13:32 +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 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
pogokeen a364b7bbfd Polymost palette-indexed texture rendering
git-svn-id: https://svn.eduke32.com/eduke32@6776 1a8010ca-5511-0410-912e-c29ae57300e0
2018-03-21 20:41:26 +00:00
pogokeen 3ca5f33c73 Moved to GLAD for dynamic GL/WGL and extension loading.
Refactored extension usage that became core in GL2, and adjusted some types for GL2 compatibility.

git-svn-id: https://svn.eduke32.com/eduke32@6656 1a8010ca-5511-0410-912e-c29ae57300e0
2018-02-16 06:38:21 +00:00
hendricks266 6a77175ac5 New def token "shadefactor"
shadefactor <value>

Controls the level of shading in GL modes. Normally it is set to the shade at which all colors are pitch black.

The default value calculated from Duke 3D's palette is 30, but most other Build games with a different palette are calculate to 31.

This token is for GL mods without a palette.

Patch from Fox.

git-svn-id: https://svn.eduke32.com/eduke32@6592 1a8010ca-5511-0410-912e-c29ae57300e0
2018-01-26 04:35:15 +00:00
hendricks266 5adb8364b6 Calculate the perceptual (i.e. "real") max shade in the given tables.
git-svn-id: https://svn.eduke32.com/eduke32@6514 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:30 +00:00
hendricks266 23b1b650bb Clean up E_PostLoadPalette.
git-svn-id: https://svn.eduke32.com/eduke32@6513 1a8010ca-5511-0410-912e-c29ae57300e0
2017-11-29 07:29:27 +00:00
terminx ff8d608caf Fix in-game 2d map view line colors when using palettes that differ completely from Duke3D's palette
git-svn-id: https://svn.eduke32.com/eduke32@6461 1a8010ca-5511-0410-912e-c29ae57300e0
2017-10-08 22:15:51 +00:00
terminx 29fc836bb1 Switch palookup memory allocation to Xalligned_alloc and fix what looks like a botched preprocessor condition
git-svn-id: https://svn.eduke32.com/eduke32@6438 1a8010ca-5511-0410-912e-c29ae57300e0
2017-09-19 19:10:19 +00:00
hendricks266 d43fb548cf Abolish all " ={ " when assigning a struct. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@6061 1a8010ca-5511-0410-912e-c29ae57300e0
2017-02-05 20:58:33 +00:00
hendricks266 1cc9d13ccf The great repository rearrangement of 2017.
Files moved but not modified. Changes to follow in a subsequent commit.

You down with CPP?

git-svn-id: https://svn.eduke32.com/eduke32@6055 1a8010ca-5511-0410-912e-c29ae57300e0
2017-02-01 10:01:11 +00:00
Renamed from polymer/eduke32/build/src/palette.c (Browse further)