Commit Graph

2339 Commits

Author SHA1 Message Date
Christoph Oelckers 4a9f0248d7 - removed the texture ID cache.
Although this initially helped, it was only because it partially covered up the issues from the real problem which was using the sampler properties of the texture offsets.
With that one fixed this cache became pointless.
2019-10-19 10:40:47 +02:00
Christoph Oelckers bc986b8054 - make the engine consistently use BGRA data - the internal palettes were still RGBA, which caused problems down the line.
- increased cache size to 200 MB (Note: The cache really needs to be replaced with something better that can adapt better to a system's RAM size.)
2019-10-19 10:22:02 +02:00
Christoph Oelckers 8b1f2f5fc9 - disabled console lockout option as a modding feature.
No, sorry, but this is something I consider unacceptable!
2019-10-19 00:27:34 +02:00
Christoph Oelckers 4142d3792b - delete BUILDART header if found.
This will otherwise cause problems down the line because these 8 bytes are ignored in the offsets.
2019-10-19 00:26:43 +02:00
Christoph Oelckers c6f973d05f - more palookup information dumping 2019-10-19 00:25:42 +02:00
Christoph Oelckers 00630f728f - fixed voxel rendering.
Still need to move the voxel textures into the texture manager but at least they render properly again.
2019-10-18 22:25:47 +02:00
Christoph Oelckers 00d59459a1 - fixed creation of true color textures and disabled fog in palette mode.
The fog should go away entirely but in palette mode it made everything too dark.
2019-10-18 22:09:19 +02:00
Christoph Oelckers 2ed722f329 - do not draw invalid textures. 2019-10-18 19:29:35 +02:00
Christoph Oelckers 9f357248e5 - fixed crash on shutdown. 2019-10-18 19:11:18 +02:00
Christoph Oelckers dab7c43f7c - fixed all compiler errors.
It mostly works again, but still has a few glitches.
2019-10-18 19:06:57 +02:00
Christoph Oelckers ed415c1fa0 - silenced a few warnings. 2019-10-18 17:55:22 +02:00
Christoph Oelckers 23265ad213 - rework of texture management for models
Voxels yet to do.
This also removes the redundant texture matrix for the glow texture.
2019-10-18 14:04:32 +02:00
Christoph Oelckers 542994cc20 - added lookup for brightmap palettes. 2019-10-18 12:11:53 +02:00
Christoph Oelckers 530a9944f7 - texture loader redone but not tested yet
Models are currently non-functional and need to reroute their texture handling to the global texture manager instead of handling everything themselves.

Voxels also need a bit of work to make their texture management more automated.
2019-10-18 11:37:07 +02:00
Christoph Oelckers c6514949e3 - texture creation WIP. 2019-10-18 00:20:27 +02:00
Christoph Oelckers 3da49ad20a - safety commit: all relevant code for the texturing system has been moved to texcache.cpp. 2019-10-17 21:44:34 +02:00
Christoph Oelckers bef8c9ae76 - hictinting cleanup.
This needs to be moved into the backend, and partially into the shader. So far this only removes the code from the main rendering logic, the final implementation is not done yet.
It had to go because it required the main rendering code to look deep into the texture data which would be a major blocker for refactoring.
2019-10-17 20:29:58 +02:00
Christoph Oelckers 304a906aa7 copy code 2019-10-17 14:21:51 +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 6d7458fe42 - fixed bad endif() placing in CMake projects 2019-10-17 08:44:01 +02:00
Christoph Oelckers 452cfe385e - Blood's voxel loader override has somehow gotten lost. 2019-10-16 23:57:29 +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 c988165131 - added a temporary workaround for image-based tile replacements.
The texture management is not ready yet to seamlessly handle these textures so for now they always need to be installed as hightile replacements.
2019-10-16 22:02:27 +02:00
Christoph Oelckers 066a76c892 - missed this part. 2019-10-16 21:18:26 +02:00
Christoph Oelckers 4cd2c024fc - fixed crash in texture deinit code and ensure that everything gets deleted. 2019-10-16 21:16:40 +02:00
nukeykt 37322d001d Do not apply zero floorpal on color sectors 2019-10-16 20:40:54 +02:00
nukeykt a94404232b Default target value to -1
# Conflicts:
#	source/blood/src/trig.cpp
2019-10-16 20:40:53 +02:00
nukeykt 97feb8d59c Fix mapedit compiling
# Conflicts:
#	source/blood/src/mapedit.cpp
2019-10-16 20:40:41 +02:00
CommonLoon102 70b5e67e6f fix cultist respawn time (#220)
# Conflicts:
#	source/blood/src/actor.cpp
2019-10-16 20:40:34 +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 4b6f28e7c8 - hooked up the writable texture types. 2019-10-15 00:19:31 +02:00
Christoph Oelckers 039d948991 - update of new texture classes. 2019-10-14 23:11:01 +02:00
Grind Core 9dd46c1c7c - Fixes for refactor (wrong kills count)
- Fixes for refactor (proximity flag for dudes)
- Fixes for refactor (wrong kills count)

# Conflicts:
#	source/blood/src/actor.cpp
2019-10-14 22:42:43 +02:00
Grind Core 16d4aebbb4 - Fixes for refactor
- Some ThrowError() calls was replaced my viewSetSystemMessage()
- New modern type playQAV (WIP)

# Conflicts:
#	source/blood/src/actor.cpp
#	source/blood/src/weapon.h
2019-10-14 22:42:43 +02:00
Grind Core 08dfee073c - Added names for callbacks
- Added names for sprite, wall and sector types
- Added gModernMap protection for using new features only on different version of map

# Conflicts:
#	source/blood/src/actor.cpp
#	source/blood/src/callback.cpp
#	source/blood/src/callback.h
#	source/blood/src/triggers.h
2019-10-14 22:42:42 +02:00
Christoph Oelckers 9a4c07db27 - make it compile again. 2019-10-14 22:42:29 +02:00
Christoph Oelckers 17a4ddd51e - adjusted bit array helpers for the change of type for gotpic from (undefined) char to (defined) uint8_t. 2019-10-13 08:55:52 +02:00
Christoph Oelckers a6ba81939a - reworked texture management, not yet active. 2019-10-12 22:49:46 +02:00
Christoph Oelckers bb67a1ba38 - some reworking of the texture code to make integration of Build tiles easier. 2019-10-12 08:54:06 +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 fdbb27a796 - added back the paletted texture readers.
... after finding out what an inefficient and poorly working method the Build backend uses for downconverting true color textures.
2019-10-11 19:21:36 +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 d9d721bff6 - removed old sky code.
r_flatsky is now the only option.
2019-10-11 00:15:20 +02:00
Christoph Oelckers 79ef3413dc - removed a large block of fudging code for NPOT textures on non-supporting hardware.
We do not care about non-supporting hardware, so off this goes.
2019-10-10 23:38:06 +02:00
Christoph Oelckers 4d83a3c2a5 - moved all code related to texture creation to texache.cpp
Also go directly to the source when trying to determine translucency of a texture.
2019-10-10 23:29:13 +02:00
Christoph Oelckers c588cd499a - let GLInstance::Draw set the palette indexing mode.
This can be trivially decided based on the texture type, so there's really no need to let the higher level code deal with this.
2019-10-10 23:14:57 +02:00
Christoph Oelckers 36ca38258e - hotfixed the transparency checkers to not create textures from regular tiles.
This caused some broken textures, apparently this gets called when not everything has been set up.
The hightile case will also have to be fixed.
2019-10-10 22:23:20 +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 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 179076c4b1 - set up the texture matrix. 2019-10-10 19:46:46 +02:00
Christoph Oelckers 1407c18f8b - cleaned out some remains of the non-indexed render path.
All of this will be redone in the backend.
2019-10-10 19:40:33 +02:00
Christoph Oelckers 46ffea94a4 - cleanup of gloadtile_art. 2019-10-10 19:30:05 +02:00
Christoph Oelckers 34b7759b7e - removed the non-indexed parts of gloadtile_art.
This won't be needed anymore.
2019-10-10 19:25:03 +02:00
Christoph Oelckers c428e367a0 - hotfix for texture filter settings.
This needs to be done differently later to choose the proper clamp setting.
2019-10-10 19:16:27 +02:00
Christoph Oelckers 1fee7a5f01 - cleanup of texture creation code.
There were several mostly pointless options complicating all of this.
2019-10-10 00:07:45 +02:00
Christoph Oelckers eca099681a - hooked up the Shadow Warrior frontend.
It doesn't really work but this way it always gets compiled and linked so that it receives the changes to the backend code.
2019-10-09 20:14:04 +02:00
Christoph Oelckers 0f4abfa4f4 - SW compiles.
This required taking lots of function prototypes out of functions because they won't get a namespace in there.
2019-10-09 19:58:09 +02:00
Christoph Oelckers 70004665fd - added Shadow Warrior files to CMake project - not compiled yet. 2019-10-09 18:09:05 +02:00
nukeykt 1104065b47 Fix RR compiling on other platforms
Patch by NY00123
2019-10-09 17:31:13 +02:00
Christoph Oelckers 50a53bd2b9 - fixed: The precacher should not look for presence of the tile's pixel data.
For hardware rendered precaching this is meaningless.
2019-10-09 00:32:28 +02:00
Christoph Oelckers 9dc0ff08f5 - hotfixed compile error. 2019-10-09 00:26:54 +02:00
Grind Core f5f012ccb9 - Added names for statnums
- Added names for system RX/TX channels
- Detect if map requires new features to work properly via special TX and command
- Effect Gen update

# Conflicts:
#	source/blood/src/actor.cpp
#	source/blood/src/eventq.h
#	source/blood/src/triggers.cpp
#	source/blood/src/triggers.h
2019-10-08 22:27:45 +02:00
Christoph Oelckers ef0fd57367 - small bits of cleanup. 2019-10-08 22:23:48 +02:00
Christoph Oelckers 93f9303c62 - minor reorganization of tiles. 2019-10-08 19:46:39 +02:00
Christoph Oelckers b78b53d75b - deleted unused function. 2019-10-08 18:48:14 +02:00
Christoph Oelckers 48a5dfe9a6 - skip -game in Blood menu 2019-10-08 01:38:01 +02:00
Christoph Oelckers 13115ad217 - another crash in Blood 2019-10-08 01:37:43 +02:00
Christoph Oelckers 50e6d364be - prevent crash on invalid textures. 2019-10-08 01:37:24 +02:00
Christoph Oelckers 7131fe6c6e - use separate textures for the palswap shade tables.
This creates a lot less mess than one big texture and also allows easier use of texelFetch in the server which is preferable for data textures.
2019-10-08 01:08:08 +02:00
Christoph Oelckers 06e9a60190 - nothing 2019-10-08 00:02:37 +02:00
Christoph Oelckers 82f6e2edb0 - fixed creation of paletted textures and added some palette debugging aids. 2019-10-07 23:32:38 +02:00
Christoph Oelckers 16dbb3526a - removed unused code. 2019-10-07 22:11:28 +02:00
Christoph Oelckers dfaa162bb2 - finished the palswap handling in the palette manager. 2019-10-07 22:11:09 +02:00
CommonLoon102 3b463bc38e fix disappearing bodies in coop with respawning monsters (#211) 2019-10-07 17:41:16 +02:00
Christoph Oelckers c050a0c4c8 - changed palswap management to handle the size of full lookup tables. 2019-10-07 00:34:15 +02:00
Christoph Oelckers 620897ecdd fix 2019-10-07 00:14:41 +02:00
Christoph Oelckers 7713860b63 wip. 2019-10-07 00:14:16 +02:00
CommonLoon102 70c4865ba4 Delete keybinding with delete or backspace (#208) 2019-10-07 00:10:04 +02:00
CommonLoon102 320eaae790 Fix F8 (#207) 2019-10-07 00:10:03 +02:00
Grind Core 05a1c94df4 - Changes for Enemy Target Changer
- Debris physics update

# Conflicts:
#	source/blood/src/actor.cpp
2019-10-07 00:09:32 +02:00
Christoph Oelckers 734d8b7d1e - moved the palette management into the backend. 2019-10-06 21:15:53 +02:00
Christoph Oelckers b1aaafb973 - abstracted uploadpalswap out of the game code.
This needs special setup on the renderer side that needs to be done in a more controlled fashion.
2019-10-06 19:47:31 +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 e94ed3abf2 - fixed uninitialized bitmap object for texture generation. 2019-10-06 19:19:26 +02:00
Christoph Oelckers cf30f5560b - upgraded the polymost fragment shader to GLSL 3.3 as well, removing all legacy features from it.
The only compatibility mode feature left is the main drawer function using glBegin/glEnd but changing that is not as urgent as the rest.
This also cleans up the fog application and adds the exponential fog mode again that somehow got lost over time.
2019-10-06 12:42:35 +02:00
Christoph Oelckers 3d538b4c8f - use explicit vertex attributes for everything.
No more glVertex, glTexCoord or glColor calls anywhere.
2019-10-06 10:46:23 +02:00
Christoph Oelckers 71d132b470 - use explicitly declared matrix uniforms.
The builtin matrices are no longer available in modern GLSL, preventing an upgrade of the shader.
Also perform better reporting of shader compilation errors.
2019-10-06 10:19:51 +02:00
Christoph Oelckers 126f670239 - draft class for in-game textures.
These will abstract away all the gory details so that the using code only sees a single entity to use.
2019-10-06 09:31:36 +02:00
Christoph Oelckers 4a866b0320 - use stb_image to read the image formats supported by kplib but not by GZDoom.
(No, sorry, kplib must go - a utility library like that being utterly dependent on a multitude of global variables is a no-go.)
2019-10-06 08:48:07 +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 0dfe99356d - stripped most of the image processing code from kplib, because it's not needed anymore - and also not salvageable for any refactoring. 2019-10-05 22:32:32 +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 cd0dabf2ae - this was missing 2019-10-05 19:39:41 +02:00
Christoph Oelckers 1a5e64329f - added stripped down versions of GZDoom's texture classes
We need something more manageable to deal with the textures - and the hightile code in particular needs a better backend to read the images.
2019-10-05 19:38:25 +02:00
Christoph Oelckers bedfc262c4 - added a FileReader wrapper for kopen4load.
Needed when transitioning the hightile loader to GZDoom's texture loader.
2019-10-05 17:30:23 +02:00
Christoph Oelckers 3fb5154dc9 - make it work again. 2019-10-05 14:17:59 +02:00
Christoph Oelckers f99492d6d5 - removed OpenGL headers from non-backend files. 2019-10-05 13:57:26 +02:00
Christoph Oelckers 3c193bb243 - moved the animvpx shader to the backend code.
This removes the final access to OpenGL from the rest of the source, with the exception of the glFinish call in the swap code.
2019-10-05 13:38:02 +02:00
Christoph Oelckers 0ee80628a2 - moved documentation out of the Source folder and added surface shader sources. 2019-10-05 13:17:26 +02:00
Christoph Oelckers b83349fe6b - moved the surface shader to the backend and the shader source to the resource file. 2019-10-05 13:09:15 +02:00
Christoph Oelckers 644b07b718 - minor fixes. 2019-10-05 12:39:50 +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 50c2065425 - removed miniz which is no longer in use. 2019-10-05 08:47:12 +02:00
Christoph Oelckers d058084c10 - added an engine resource file.
Currently this only contains the main Polymost shaders and the resources from nblood.pk3.
The latter cannot be used yet because the Build resource management system is too stubborn to add the newly added file without some changes.
It's better to refactor the entire system instead.
2019-10-04 23:29:00 +02:00
Christoph Oelckers ae1e090716 - all non-shader related GL calls are gone from the main code base. 2019-10-04 21:13:04 +02:00
Christoph Oelckers f992aebf33 - two more 2019-10-04 19:17:55 +02:00
Christoph Oelckers cb80e877ff - refactored fog and depth func setting into GLInterface. 2019-10-04 18:44:16 +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 a86f1ffd4f - make it compile again. 2019-10-04 17:36:37 +02:00
Christoph Oelckers 1ff8ea6a19 - added matrix class for moving the GL matrix manipulation out of the engine code. 2019-10-04 01:41:57 +02:00
Christoph Oelckers 471f720d95 - consolidated console clear functions. 2019-10-04 01:25:10 +02:00
Christoph Oelckers 63a733b934 - Project file for last commit. 2019-10-04 00:52:48 +02:00
Christoph Oelckers c5c92c1410 - removed the ZDoom CVAR code because it won't be needed and added its Zip file reader to maintain an engine file with needed assets.
The Build code for this is far too messy for this task, so an external solution is needed.
2019-10-04 00:52:19 +02:00
Christoph Oelckers ebbe1803bb - made the game selector configurable (It's still Windows only...) 2019-10-04 00:26:13 +02:00
nukeykt 61f8b8c2d6 Hopefully fix map reloading 2019-09-30 20:31:12 +02:00
nukeykt 528e7f8320 More meaningful names for build object struct members 2019-09-30 20:31:11 +02:00
nukeykt 61b4fae6e0 Simplify voxel rotation handling
# Conflicts:
#	source/build/include/mdsprite.h
2019-09-30 20:31:09 +02:00
nukeykt c00ff59579 Fix enemy respawning. Verified in disassembly 2019-09-30 20:30:57 +02:00
nukeykt 0d2567a808 Backport "bind showkeys" osdcmd crash fix from eduke32 2019-09-30 20:30:56 +02:00
CommonLoon102 ce61c38660 Fixing annoying item use after save game (#192) 2019-09-30 20:30:54 +02:00
Christoph Oelckers 5687b4c02e - added ZDoom's CVAR class.
No CVar transition has been done yet.
2019-09-26 00:20:16 +02:00
Christoph Oelckers 7fd395b5d7 - removed some legacy demo stuff from RedNukem backend. 2019-09-26 00:19:49 +02:00
nukeykt c815e1c246 Minor sorting fix 2019-09-25 23:15:45 +02:00
nukeykt 9deb486626 Second attempt to fix polymost sprite sorting issue 2019-09-25 23:15:44 +02:00
nukeykt 402d9b8f02 long -> int 2019-09-25 23:15:43 +02:00
CommonLoon102 216ce4da9b Reverb effect deactivate bugfix (#190) 2019-09-25 23:15:41 +02:00
nukeykt b1713d7e67 Add quickload/save osdcmd 2019-09-25 23:15:40 +02:00
Christoph Oelckers d12563f644 - got rid of klzw and the legacy demo code along with it. 2019-09-25 23:12:29 +02:00
Christoph Oelckers 0261fef4a8 - removed some unused files. 2019-09-25 23:00:10 +02:00
Christoph Oelckers 18b1ca287e - moved the platform specific files out of the Build folder, mainly to get them out of the way. 2019-09-25 22:43:06 +02:00
Christoph Oelckers cd920299d0 - moved winbits.cpp to the platform folder and cleaned out unused parts. 2019-09-25 22:38:47 +02:00
Christoph Oelckers ad4527c8be - initialize the GL backend in the proper place.
As long as there are still video mode switches this needs to be in the video mode switching function.
2019-09-23 23:33:59 +02:00
Christoph Oelckers a5441061e9 - always save the entire config.
It is a major hassle if values cannot be looked up and then change when switching between branches etc.
2019-09-23 21:27:23 +02:00
Christoph Oelckers 568f01792f - added ZDoom's configfile class. 2019-09-23 21:06:52 +02:00
Christoph Oelckers 86534c8a43 - more utilities, most importantly ZString without which it would be hard to use any ZDoom-based code at all. 2019-09-23 20:56:05 +02:00
Christoph Oelckers 034ce097c5 - added more utilities from GZDoom - TArray/TMap and FileReader. 2019-09-23 19:52:25 +02:00
Christoph Oelckers 330c80246e - added ZDoom's FArgs class for easier command line checking. 2019-09-23 19:29:25 +02:00
Christoph Oelckers 37907ddd06 - startup hacks.
Unfortunately nothing of this can be fixed before the resource management has been refactored from the ground up. Sp for now this ugliness needs to suffice.
2019-09-23 18:17:36 +02:00
Christoph Oelckers 07e38f3d12 - made enet a separate library. 2019-09-23 08:40:02 +02:00
nukeykt 895fb719d9 blooddemohack -> enginecompatibility_mode 2019-09-23 01:30:07 +02:00
CommonLoon102 c2e8cc6607 Do not target teammates (#187) 2019-09-23 01:30:06 +02:00