Commit Graph

83 Commits

Author SHA1 Message Date
Christoph Oelckers ae6403a205 - added a level of abstraction to the lookup table code to ease later refactoring. 2020-05-23 22:43:05 +02:00
Christoph Oelckers f929419a0a - refactoring of the lookup tables. 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 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
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 fac004b4d2 - palette code cleanup 2020-04-13 23:58:44 +02:00
Christoph Oelckers 5584c726ba - file system update and adjustment. 2020-04-12 08:30:40 +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 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 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 eac1007c56 - automap color fix. 2020-01-30 22:05:18 +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 aa1361acbb - make palfadedelta explicitly unsigned 2020-01-19 23:18:38 +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
Christoph Oelckers 1890df98f9 - process lines through the 2D drawer. 2019-12-31 19:02:55 +01:00
Christoph Oelckers 2c35f87925 - fixed translucency determination. 2019-12-30 21:03:15 +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 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 141887263d - header cleanup 2019-12-23 21:19:42 +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 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 43c66d07ae Merge branch 'master' into sound 2019-12-18 11:23:20 +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 749eda32c5 - moved kopenfilereader into the FileSystem class. 2019-12-07 10:14:51 +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
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