Commit graph

16770 commits

Author SHA1 Message Date
Christoph Oelckers
9dceedd3b0 - cleanup 2020-04-25 14:15:15 +02:00
Christoph Oelckers
730d07fbf7 - reworked canvas texture updater to avoid passing game data to the render backends.
These are now handled one level above using a callback to perform the actual rendering.
2020-04-25 14:13:36 +02:00
Christoph Oelckers
44d39ef63e - consolidated the savegame picture code. 2020-04-25 13:18:57 +02:00
Christoph Oelckers
6177ed153d - consolidated the 3 RenderViewpoint variants and took the function out of the framebuffer class. 2020-04-25 10:51:45 +02:00
Christoph Oelckers
c203df5edb - consolidated the 3 virtually identical instances of DrawScene and moved the function to HWDrawInfo.
The only backend dependent call in there, ambient occlusion, has been made a virtual of DFrameBuffer.
2020-04-24 21:47:18 +02:00
Christoph Oelckers
90585c4931 - added a RenderState virtual to the FrameBuffer class. 2020-04-24 16:15:18 +02:00
Christoph Oelckers
70d30feb4c - moved the render interface functions out of FGLRenderer into OpenGLFrameBuffer.
These need some consolidation among the backends, and the additional indirection in the OpenGL backend made it harder than necessary.
2020-04-24 15:52:31 +02:00
Magnus Norddahl
ab16cbe298 Fix missing texture update 2020-04-24 13:08:22 +02:00
SanyaWaffles
994550fb00 Add the check to the other loop per Graf's request. 2020-04-24 10:01:36 +02:00
SanyaWaffles
6a604f35cb A much smarter DEFBINDS fix. Check if the lump is in the range of an IWAD, if so, override the settings... if not, don't override the settings.
https://forum.zdoom.org/viewtopic.php?f=2&t=68292
2020-04-24 10:01:36 +02:00
SanyaWaffles
1cf8c2f63e Fix keybinds part 1 of whatever 2020-04-24 08:10:09 +02:00
Christoph Oelckers
72533e2f8a - redirect ST_Sound to a callback because the sound code is game specific 2020-04-23 22:33:43 +02:00
Christoph Oelckers
f8e23500c7 - moved Windows platform code as well. 2020-04-23 22:26:30 +02:00
Christoph Oelckers
0b544f2956 - moved the Posix platform files to 'common' after making sure that Raze can compiled with them as-is.
No content changes.
2020-04-23 21:48:50 +02:00
Christoph Oelckers
612bf20809 - moved game state connections of the startup screen out of the backend code. 2020-04-23 00:02:34 +02:00
Christoph Oelckers
ea30707c41 - added missing include. 2020-04-22 23:48:20 +02:00
Christoph Oelckers
d19ac5b260 - separated the game specific Steam code from the pure backend. 2020-04-22 22:56:15 +02:00
Christoph Oelckers
8473be2a0c - some final cleanup. 2020-04-22 22:35:28 +02:00
Christoph Oelckers
3961f708fe - moved refreshfreq variable to a common place. 2020-04-22 22:32:24 +02:00
Christoph Oelckers
6934aebbe6 - fixed typo in HAVE_SOFTPOLY. 2020-04-22 21:57:59 +02:00
Christoph Oelckers
7f83b190cc - a few more fixes. 2020-04-22 21:46:22 +02:00
Christoph Oelckers
4da2351671 - fixed compile errors in POSIX platform code. 2020-04-22 20:42:13 +02:00
Christoph Oelckers
12e69adec3 - system backend cleanup.
This is mainly for running CI on Linux and macOS. Windws is already working.
2020-04-22 19:57:14 +02:00
Christoph Oelckers
a40578a0a4 - changed more license headers to BSD. 2020-04-21 22:11:59 +02:00
Christoph Oelckers
f17617706d - moved the scale overrider to v_draw.h. 2020-04-21 21:23:04 +02:00
Christoph Oelckers
ce95d7379f - swapped out the license in two files.
BSD is preferred over LGPL
2020-04-21 21:06:11 +02:00
Rachael Alexanderson
8c1db978b8 - fixed: hwrenderer materials were nullptr checked but the pointers were not always properly initialized 2020-04-21 09:41:33 -04:00
alexey.lysiuk
62d4bbbe65 - restored Wads.GetNumLumps() scripted function
https://forum.zdoom.org/viewtopic.php?t=68300
2020-04-21 10:07:24 +03:00
alexey.lysiuk
426f40dd52 - fixed crash when loading saved game that has no music 2020-04-20 15:08:33 +03:00
alexey.lysiuk
c37dcc6eb4 - added validation of game skill when changing a level 2020-04-20 13:32:02 +03:00
alexey.lysiuk
a9c0765fe1 - fixed potential crash on intermission cast screen 2020-04-20 12:49:18 +03:00
Christoph Oelckers
5d49faf190 Merge branch 'master' into texture_rework 2020-04-19 21:15:28 +02:00
Christoph Oelckers
f296660266 - set all texture IDs after finishing the initial texture manager initialization.
As it turned out, not all textures have a valid ID at that point so it needs to be redone.
2020-04-19 21:15:01 +02:00
Christoph Oelckers
4fb6b7c7d4 - block off the Substitute function by making it private to the 3 classes that really need it. 2020-04-19 21:08:24 +02:00
Christoph Oelckers
bd3f4e7347 - relax pointer substitution restriction for morphed monsters. 2020-04-19 21:08:23 +02:00
Christoph Oelckers
b7ea483323 - fixed checkForHacks placement. 2020-04-19 19:52:03 +02:00
Christoph Oelckers
8dbc727178 - fixed compile errors pointed out by CI 2020-04-19 19:05:50 +02:00
Christoph Oelckers
88d5bf6877 - relax pointer substitution restriction for morphed monsters. 2020-04-19 19:03:25 +02:00
Christoph Oelckers
0eb68177ca Merge branch 'master' into texture_rework 2020-04-19 18:07:16 +02:00
Christoph Oelckers
052172b9ee - let TeleportSpecial universally map to Teleport when checking action special names. 2020-04-19 18:00:27 +02:00
Christoph Oelckers
db6a284253 - apply aspect ratio compensation for all fullscreen images with a height of 200 and 400, and not just to 320x200 and 640x400. 2020-04-19 13:49:10 +02:00
Christoph Oelckers
a21d3ae106 - fixed incorrect value range for particle's depth value, used for sorting. 2020-04-19 13:46:00 +02:00
Christoph Oelckers
e63871d6f5 - made 3D floor damage transfers optional by adding a new flag bit (2048) and made that mode automatic for the old ZDoom-based light only transfer special. 2020-04-19 13:40:21 +02:00
Christoph Oelckers
5228a67ff5 - fixed keybinding reader - before trying to load DEFBINDS the lump index wasn't reset. 2020-04-19 13:23:02 +02:00
Christoph Oelckers
90f3b49bc3 - removed the "no IWAD definitions found" error message because the condition it checks for is not an error. 2020-04-19 13:17:20 +02:00
Christoph Oelckers
6dfc416b51 - fixed setup of IPK3's where all content is in a subdirectory.
These never received the file name list that was needed to eliminate this directory from internal paths.
2020-04-19 13:04:29 +02:00
Christoph Oelckers
d4cc217d42 - fixed a few things that slipped through 2020-04-19 12:40:30 +02:00
Christoph Oelckers
14ce0f4605 - deleted unused variable. 2020-04-19 12:37:50 +02:00
Christoph Oelckers
1c99e0917e - do not treat the ':' as a path separator.
The cases where it really is needed have special handling for it, in all others it causes more problems than it solves.
2020-04-19 12:24:12 +02:00
Christoph Oelckers
b2281c38e1 - fixed texture layer management so that each material layer can decide for itself if it wants to allow upscaling.
- rewrote the hardware texture precacher to use the new texture management to properly track the data to delete.
2020-04-19 10:57:56 +02:00
Christoph Oelckers
cedc95c2a5 - split out FGameTexture into its own files. 2020-04-19 10:57:56 +02:00
Christoph Oelckers
5a2a72fc95 - store the Vulkan descriptor sets in the material - where they belong!
Having them in the base texture object was a major maintenance issue.
2020-04-19 10:57:56 +02:00
Christoph Oelckers
46e75e8107 - fixed crash with particles checking a non-existent actor. 2020-04-19 10:57:56 +02:00
Christoph Oelckers
c836dd3dbf - initialize bNoRemap0 2020-04-19 10:57:55 +02:00
Christoph Oelckers
ef8e7a4944 - reworked the multipatch texture builder to reuse the FImageTexture objects. 2020-04-19 10:57:55 +02:00
Christoph Oelckers
59cd049b77 - added missing handling for Rotations to the hardware renderer.
Untested due to lack of material.
2020-04-19 10:57:55 +02:00
Christoph Oelckers
389892a079 - moved SkyOffset and Rotations. 2020-04-19 10:57:55 +02:00
Christoph Oelckers
f7dd16ba16 - test skyboxes with dynamic_cast and scale them properly. 2020-04-19 10:57:55 +02:00
Christoph Oelckers
217b80b1fb - moved the brightmap check flag out of FTexture. 2020-04-19 10:57:54 +02:00
Christoph Oelckers
0a1bd458db - moved most material flags out of FTexture. 2020-04-19 10:57:54 +02:00
Christoph Oelckers
d812801707 - moved the shader properties to FGameTexture. 2020-04-19 10:57:54 +02:00
Christoph Oelckers
e60d758287 - made all member variables of FTexture protected. Also temorarily disabled the CleanUnused call of the precacher - this needs some reworking, now that the texture system is better equipped for it. 2020-04-19 10:57:54 +02:00
Christoph Oelckers
718949f74d - moved the texture name to FGameTexture. 2020-04-19 10:57:53 +02:00
Christoph Oelckers
7dd108c960 - removed FTexture's Scale variable. 2020-04-19 10:57:53 +02:00
Christoph Oelckers
eb369dbf41 - initialize texture offsets for images on construction. 2020-04-19 10:57:53 +02:00
Christoph Oelckers
61380fc505 - moved the offsets to FGameTexture.
# Conflicts:
#	src/common/textures/textures.h
2020-04-19 10:57:53 +02:00
Christoph Oelckers
8843761bf8 - moved most of the texture size maintenance to the FGameTexture class. 2020-04-19 10:57:53 +02:00
Christoph Oelckers
9bc1d4f38f - restored null texture setup. 2020-04-19 10:57:52 +02:00
Christoph Oelckers
c563f4993f - took the sky cap color getter out of the texture system.
# Conflicts:
#	src/common/textures/textures.h
2020-04-19 10:57:52 +02:00
Christoph Oelckers
d1da26895b - moved the texture ID up one level. 2020-04-19 10:57:52 +02:00
Christoph Oelckers
7641da8b7b - moved several members from FTexture to FGameTexture. 2020-04-19 10:57:52 +02:00
Christoph Oelckers
42304d9680 - store the material layers in reference counted pointers in the FGameTexture object.
Reference counting is used because a texture image may be shared by more than one game texture.
2020-04-19 10:57:51 +02:00
Christoph Oelckers
70ec20c137 - optimization of texture scaling checks.
The texture dimension checks can be performed up front when the texture is inserted into the texture manager.
2020-04-19 10:57:51 +02:00
Christoph Oelckers
09898ef6c3 - cache the upscaling check's result in the texture, as this will be queried quite frequently. 2020-04-19 10:57:51 +02:00
Christoph Oelckers
8505c7ee7d - major refactor of texture upscaling control.
All decisions were done deep inside the texture creation code, leaving zero options to the higher level code for controlling the feature.
Changed this so that the option to upscale must be passed as a parameter to FRenderState::SetMaterial and extended all needed variables to manage the added texture variants.
Still not solved: Material layers need explicit control, not only for scaling but also for filtering.
2020-04-19 10:57:51 +02:00
Christoph Oelckers
0b990f0dcb - moved the decision whether to upscale textures up one level in the function chain. Still not the perfect place, this should be decided before creating the texture, not in the middle of the process.
- disabled the selective texture cleaning in the precacher. The logic here turned out to be a serious blocker and needs to be rethought.
2020-04-19 10:57:50 +02:00
Christoph Oelckers
a81bb2a136 - make FGameTexture a separate object owning an FTexture instead of merely using a type cast to access it. 2020-04-19 10:57:50 +02:00
Christoph Oelckers
095a5e2c0a - allocate the sprite positioning info on demand only.
For most textures this is never needed and it can easily be put in the memory arena being used for image sources.
2020-04-19 10:57:50 +02:00
Christoph Oelckers
c5e81c54a2 - Moved the raw texture handling into the texture manager as well. 2020-04-19 10:57:50 +02:00
Christoph Oelckers
5352682697 - moved the front layer hack for Hexen's skies to the texture manager. 2020-04-19 10:57:50 +02:00
Christoph Oelckers
da873ca8d1 - moved the handling for paletted replacements into the texture manager.
This is something the texture should not concern itself with.
2020-04-19 10:57:49 +02:00
Christoph Oelckers
18760d6622 - deleted unused function. 2020-04-19 10:57:49 +02:00
Christoph Oelckers
662fa6e667 - removed the conversion helper code and fixed a few places where FMaterial was only used to access the hardware textures in the FTexture class. 2020-04-19 10:57:49 +02:00
Christoph Oelckers
7bdef7fe9a - cleaned the texture manager's method interface from FTexture references. 2020-04-19 10:57:49 +02:00
Christoph Oelckers
f5d5888c22 - thinned out the Texturemanager interface. 2020-04-19 10:57:49 +02:00
Christoph Oelckers
437d4f8af0 - changed storage in texture manager to FGameTexture. 2020-04-19 10:57:48 +02:00
Christoph Oelckers
397b1520bc - deal with I_SetCursor 2020-04-19 10:57:48 +02:00
Christoph Oelckers
c605359b0e - animator transitioned. 2020-04-19 10:57:48 +02:00
Christoph Oelckers
83817080bb - more texture cleanup.
It is now in a state where FTexture really needs to be separated from FGameTexture.
2020-04-19 10:57:48 +02:00
Christoph Oelckers
31035a6cea - cleaned out the coordinate code in FMaterial. 2020-04-19 10:57:48 +02:00
Christoph Oelckers
c178313da5 - got rid of the last remaining FMaterial references in the high level renderer. 2020-04-19 10:57:47 +02:00
Christoph Oelckers
4cbd20e822 - transitioned sky and decal code away from FMaterial. 2020-04-19 10:57:47 +02:00
Christoph Oelckers
cca3f878f5 - removed FMaterial references from other high level renderer data like HWFlat and HWSprite. 2020-04-19 10:57:47 +02:00
Christoph Oelckers
1146cf9e08 - use FGameTexture instead of FMaterial for texture tracking in HWWall.
The FMaterial object is only needed when finally binding the texture to the render state.
2020-04-19 10:57:47 +02:00
Christoph Oelckers
0ce0099e29 - moved the sprite positioning info out of FMaterial back into FTexture.
This cleans out half of FMaterial and brings it closer to being a texture binding descriptor, which is all it really should be.
2020-04-19 10:57:47 +02:00
Christoph Oelckers
9099bc8420 - reworking some lower level texture code. 2020-04-19 10:57:46 +02:00
Christoph Oelckers
72835c5462 - transitioned the GLDEFS parser to FGameTexture. 2020-04-19 10:57:46 +02:00
Christoph Oelckers
54f4267597 - use FGameTexture in the model rendering code. 2020-04-19 10:57:46 +02:00
Christoph Oelckers
b9b6a354c7 - changed all texture access in the play code to use FGameTexture and redid Hexen's front sky layer by adding a new texture instead of hacking the existing one. 2020-04-19 10:57:46 +02:00
Christoph Oelckers
9e7094848c - transitioned the 2D drawer to FGameTexture. 2020-04-19 10:57:45 +02:00
Christoph Oelckers
d9928b51a8 - eliminated all cases of calling DrawTexture with an FTexture.
Everything uses FGameTexture now.
2020-04-19 10:57:45 +02:00
Christoph Oelckers
c7db5b932e - switched the entire status bar code to use FGameTexture.
- scale the automap parchment to clean 320x200 dimensions.
2020-04-19 10:57:45 +02:00
Christoph Oelckers
5d8adb90c4 - made 'supportRemap0' an image property so that later the handling for this can be taken out of the actual texture class by just providing a replacement texture for the skies. 2020-04-19 10:57:45 +02:00
Christoph Oelckers
9593cb56ae - decoupled the software renderer entirely from FTexture - it will only look at FSoftwareTexture now, all access to the texture manager has been wrapped. 2020-04-19 10:57:45 +02:00
Christoph Oelckers
73b4fbe861 - FGameTexture conversion in am_map.cpp 2020-04-19 10:57:44 +02:00
Christoph Oelckers
aeba304715 - texture code refactoring to consolidate multiple textures referencing the same backing image. 2020-04-19 10:57:44 +02:00
Christoph Oelckers
3a47c5c7f7 - fixed Vulkan's uTextureMode setup. Also only mask out the flags we really do not want to avoid surprises in the future. 2020-04-19 10:57:44 +02:00
Magnus Norddahl
9ef6d8fd53 Always null textures for all slots because the vulkan target is an OpenGL emulator ;) 2020-04-19 10:57:44 +02:00
Christoph Oelckers
7c46dace03 - this still doesn't work on Vulkan. :( 2020-04-19 10:57:44 +02:00
Christoph Oelckers
dd5de4ce51 - removed test code that forced all textures being warped. 2020-04-19 10:57:43 +02:00
Christoph Oelckers
8381092cce - major shader rework
* handle brightmaps in the main shader instead of keeping separate instances around.
* added detail and glow layers from Raze.
* fixed material setup which could not guarantee that everything was initialized correctly.
* for warped textures, warp all layers. With this brightmaps finally work on warped textures.

Note: Vulkan reports a "device lost" error with this which still needs to be investigated.
2020-04-19 10:57:43 +02:00
alexey.lysiuk
b5c88957f0 - fixed detection of standalone IWADs
https://forum.zdoom.org/viewtopic.php?t=68218
2020-04-17 12:29:46 +03:00
Rachael Alexanderson
c1421b70cf Revert "- fixed: player spawn code should now always use defaults for the currently selected player class, not current flags"
This reverts commit 8dda7c02c9.
2020-04-15 07:02:58 -04:00
Rachael Alexanderson
8dda7c02c9 - fixed: player spawn code should now always use defaults for the currently selected player class, not current flags 2020-04-15 06:58:27 -04:00
Christoph Oelckers
3e02121822 - fixed setup of content ID in CreateTexBuffer. 2020-04-13 14:55:16 +02:00
Christoph Oelckers
e92be97f33 - let FSkybox inherit from FImageTexture to simplify the redirection of the base image for the software renderer. 2020-04-13 14:23:57 +02:00
Christoph Oelckers
9a3b663e04 - fixed text size calculations in the status bar.
To avoid errors, all spacing calculations have been added to FFont::StringWidth which already performs proper escape filtering.
2020-04-13 12:11:14 +02:00
Christoph Oelckers
17df95d69e - fixed startup-time setup of serverinfo CVARs.
Looks I completely forgot this part when refactoring the interface - it must account for the callbacks not doing anything due to the network code not being operational yet.
2020-04-13 11:53:08 +02:00
Christoph Oelckers
6722b64ac0 - fixed: Setting 'noallies' on the level cleared the player's friendly flag.
The check was for mobj->player, which at this point wasn't set yet so the check failed.
2020-04-13 10:54:40 +02:00
Christoph Oelckers
4b5c74f856 - reactivated saving of sounds by name, not by index. 2020-04-13 10:32:46 +02:00
alexey.lysiuk
d29c6a55eb - fix autoseg registration by moving start/end files back to src directory
Link order was wrong when building via Xcode project because CMake generator sorts files by paths
This made most of classes missing from corresponding segments, and the game crashes right after launch
2020-04-13 10:14:07 +03:00
Major Cooke
a56177f178 Begin TICRATE conversion.
- Moved TICRATE from Thinker to Object in ZScript so status bars have access to it.
2020-04-12 22:43:33 +02:00
alexey.lysiuk
9c23c0ac59 - fixed compilation with GCC 5 2020-04-12 11:50:11 +03:00
alexey.lysiuk
5a56f209d3 - fixed conditions with SND_PlayerReserve flag
src/sound/s_advsound.cpp:953:9: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
src/sound/s_advsound.cpp:1264:20: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
src/sound/s_advsound.cpp:1426:6: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
2020-04-12 11:49:47 +03:00
alexey.lysiuk
72c8df530f - fixed compilation of optimized GCC and Clang targets 2020-04-12 11:03:25 +03:00
alexey.lysiuk
f0ca7fb213 - fixed compilation of Linux targets 2020-04-12 11:03:01 +03:00
alexey.lysiuk
91914b728b - fixed compilation of Cocoa backend 2020-04-12 11:02:28 +03:00
alexey.lysiuk
2b1ef5f4f2 - common fixes for compilation with GCC and Clang 2020-04-12 11:02:05 +03:00
alexey.lysiuk
f5a98ed7fa - fixed CMake configuration
CMake Error at src/CMakeLists.txt:1188 (add_executable): Cannot find source file: gamedata/textures/bitmap.cpp
2020-04-12 10:59:09 +03:00
Christoph Oelckers
ab8d2ef62d - fixed serializer.
All includes of RapidJSON *must*(!!!) have the same #defines, otherwise incompatible code will be generated without any hint of a warning.
2020-04-11 22:53:26 +02:00
Christoph Oelckers
07e303f99b - fixed compilation. 2020-04-11 22:23:09 +02:00
Christoph Oelckers
8f8aed5ee3 - moved bitmap.cpp to 'common' and remove the duplicate IceRemap. 2020-04-11 20:23:26 +02:00
Christoph Oelckers
9dce6d88fa - use 'override' qualifier. 2020-04-11 20:21:00 +02:00
Christoph Oelckers
0cb2a1b8e9 - moved gl_load to common. 2020-04-11 20:20:59 +02:00
Christoph Oelckers
295fa1e73f - header cleanup in gl_interface.cpp 2020-04-11 20:20:59 +02:00
Christoph Oelckers
1e40b745d5 - added some things from Raze to allow using the same code in both projects. 2020-04-11 20:20:59 +02:00
Christoph Oelckers
5fe22c70b5 - moved the 2D drawer to 'common'. 2020-04-11 20:20:59 +02:00
Christoph Oelckers
def123823b - cleanup of 2D code. 2020-04-11 20:20:58 +02:00
Christoph Oelckers
ce4c2be3c7 - use the 2d drawer's size where appropriate. 2020-04-11 20:20:58 +02:00
Christoph Oelckers
b18faacab0 - 2D drawer cleanup. 2020-04-11 20:20:58 +02:00
Christoph Oelckers
ac1f4b8f11 - initialize native functions before the first query. 2020-04-11 20:20:57 +02:00
Christoph Oelckers
932f5c64c2 - moved stats.cpp to common. 2020-04-11 20:20:57 +02:00
Christoph Oelckers
fa99fc5346 - added global variants of the main 2D-draw functions taking an F2DDrawer as their first parameter.
This is a preparation for refactoring the calls to these so that they no longer require a 'screen' parameter.
2020-04-11 20:20:57 +02:00
Christoph Oelckers
3bf7686cfb - moved v_text.cpp to 'common'. 2020-04-11 20:20:56 +02:00
Christoph Oelckers
2e5bc3e962 - moved compiler frontend to 'common'. 2020-04-11 20:20:56 +02:00
Christoph Oelckers
466ed4e8f2 - separated the Doom specific parts of the ZScript parser from the core into a subclass. 2020-04-11 20:20:56 +02:00
Christoph Oelckers
2838f5792c - moved all FString exports from vmthunks to stringformat.cpp. 2020-04-11 20:20:55 +02:00
Christoph Oelckers
a28182fe35 - moved the script compiler's backend to 'common'. 2020-04-11 20:20:55 +02:00
Christoph Oelckers
3454314bb1 - separated the Doom specific parts from the compiler backend into a separate file, these parts now get invoked via callback hooks. 2020-04-11 20:20:55 +02:00
Christoph Oelckers
64dc9ac456 - moved around some bits of code. 2020-04-11 20:20:54 +02:00
Christoph Oelckers
ef8b4c7d5e - put the state pointer serializer in a virtual function so that types.cpp can operate without any knowledge of Doom states. 2020-04-11 20:20:54 +02:00
Christoph Oelckers
1ce11ff02a - dictionary can also go to 'common'. 2020-04-11 20:20:54 +02:00
Christoph Oelckers
f6bd2e4f76 - moved serializer to 'common'. 2020-04-11 20:20:54 +02:00
Christoph Oelckers
7b292cca57 - split the serializer in two to keep the Doom specific parts out of the main file. 2020-04-11 20:20:53 +02:00
Christoph Oelckers
f74efcf721 - split the TObjPtr serializers into a separate file to avoid polluting everything that needs to use the serializer.
To use these it is necessary to include dobject.h and all its dependencies, so this should not be done unless necessary.
2020-04-11 20:20:53 +02:00
Christoph Oelckers
f02c5c0a56 - took InitializeDefaults out of PClass and moved it to PClassActor.
Like so many other parts, this created a hard dependency of the low level code on very invasive game content.
2020-04-11 20:20:53 +02:00
Christoph Oelckers
74c5f83658 - moved most of the root marking out of the garbage collector, replacing it with callbacks.
Yet another place where low level code was tied too tightly to the game instead of providing a proper interface.
2020-04-11 20:20:52 +02:00
Christoph Oelckers
933c1f6403 - moved dumpactors CCMD out of dobject.cpp. 2020-04-11 20:20:52 +02:00
Christoph Oelckers
cf51508ce6 - moved around some pieces of code to make sharing with Raze easier. 2020-04-11 20:20:52 +02:00
Christoph Oelckers
f8ac9a2662 - moved DObject and core parts of the VM to 'common'.
# Conflicts:
#	src/common/objects/dobject.h
2020-04-11 20:20:51 +02:00
Christoph Oelckers
1a0ace4f88 - palette related fixes. 2020-04-11 20:20:40 +02:00
Christoph Oelckers
940f1dc9a2 - move font code to 'common'.
- fix use of translation slot 0, used for internal translations.
2020-04-11 20:20:40 +02:00
Christoph Oelckers
32300f7d26 - use translation slot 0 for reserved content, like font translations. 2020-04-11 20:20:39 +02:00
Christoph Oelckers
2dcf63c57d - backport some fixes from Raze - mostly redundant includes. 2020-04-11 20:20:39 +02:00
Christoph Oelckers
d586ffa79c - const-ified the palette pointers in the texture creation code.
- fixed includes.
2020-04-11 20:20:39 +02:00
Christoph Oelckers
65f15e1147 - moved the material class to 'common' as well. 2020-04-11 20:20:38 +02:00
Christoph Oelckers
580e463498 - moved texture code to 'common'. 2020-04-11 20:20:38 +02:00
Christoph Oelckers
5bde737be9 - split buildtexture.cpp in two.
The texture itself is 'common', but the setup is not.
2020-04-11 20:20:38 +02:00
Christoph Oelckers
2ff93b4635 - added the missing blend modes to FRenderStyle. 2020-04-11 20:20:37 +02:00
Christoph Oelckers
3e285d2261 - moved renderstyle and colortables code to 'common'. 2020-04-11 20:20:37 +02:00
Christoph Oelckers
f8e9cb8fbc - major dependency reduction of the texture system. 2020-04-11 20:20:37 +02:00
Christoph Oelckers
ab77416ddc - set transparent color 0 in the proper place. 2020-04-11 20:20:36 +02:00
Christoph Oelckers
1ed170d955 - moved some data needed by the texture system into palettecontainer.cpp. 2020-04-11 20:20:36 +02:00
Christoph Oelckers
be24023722 - split animation management out of the texture manager into a separate class. 2020-04-11 20:20:36 +02:00
Christoph Oelckers
7d192decc7 - some cleanup of the texture code
* removed unneeded includes
* moved global brightmap to GPalette
* took Build tile init code out of the FTextureManager class, because this code is not compatible with how real Build games need to go about it, making the texture manager not shareable.
* removed dependency on higher level info from the Image class.
2020-04-11 20:20:35 +02:00
Christoph Oelckers
a13c7bd053 - moved sound code to "common". 2020-04-11 20:20:35 +02:00
Christoph Oelckers
018794f1dd - moved game specific data out of the sound backend.
In Raze I already had a user data array for that so this gets used here, too, now.
Also copied a few other fixes.
2020-04-11 20:20:35 +02:00
Christoph Oelckers
50e1efa965 - minor sound code cleanup
# Conflicts:
#	src/sound/backend/oalsound.cpp
2020-04-11 20:20:34 +02:00
Christoph Oelckers
cd9e2d3795 - moved music code to "common". 2020-04-11 20:19:55 +02:00
Christoph Oelckers
7d36af8840 - put things in their proper place. 2020-04-11 20:19:55 +02:00
Christoph Oelckers
00bbc48e70 - music.cpp include cleanup
- use a TMap to store music volume settings instead of using a homegrown linked list.
2020-04-11 20:19:54 +02:00
Christoph Oelckers
f0534afde6 - separated the game-dependent music lookup parts from the core player. 2020-04-11 20:19:54 +02:00
Christoph Oelckers
4af96bab47 - some cleanup on music code.
* change the license of the main file because there is no more id-based code here licensed under the GPL.
* moved VM interface definition out of the implementation.
* moved idmus CCMD out of implementation because it is dependent on Doom level definitions.
* moved s_music.cpp into the music folder with the rest of the music code.
2020-04-11 20:19:54 +02:00
Christoph Oelckers
56f2b2ac56 - reduce backend's dependency on game state by using callbacks. 2020-04-11 20:19:53 +02:00
Christoph Oelckers
721b857e5e - minor FTexture cleanup. 2020-04-11 20:19:53 +02:00
Christoph Oelckers
b4e9c3f20d - missed two things that need to be 'common'. 2020-04-11 20:19:53 +02:00
Christoph Oelckers
ac610d87e5 - merged FPalette and PaletteContainer. 2020-04-11 20:19:53 +02:00
Christoph Oelckers
f94e4a908c - m_png is common. 2020-04-11 20:19:52 +02:00
Christoph Oelckers
7243495b16 - moved special color maps to utilities.
The default tables are needed by the texture compositor which should be universal, so this needs to be, too.
2020-04-11 20:19:52 +02:00
Christoph Oelckers
db62aeb671 - c_cmds is not 'common'. 2020-04-11 20:19:52 +02:00
Christoph Oelckers
777f2ee7c6 - moved stringtable to 'common'. 2020-04-11 20:19:51 +02:00
Christoph Oelckers
b3c7b81893 - decoupled the string table from game implementation details.
Using callbacks now to query needed game state.
2020-04-11 20:19:51 +02:00
Christoph Oelckers
c3a381ed92 - moved most of the console code to 'common'.
The main console.cpp file cannot be done yet, but the rest is ready to go.
2020-04-11 20:19:51 +02:00
Christoph Oelckers
a712866219 - split out non-game specific CCMDs into their own file. 2020-04-11 20:19:51 +02:00
Christoph Oelckers
8dacdf2951 - use an array to store the buttons.
This puts a lot less knowledge about the game's features into the low level code.
2020-04-11 20:19:50 +02:00
Christoph Oelckers
0e7480b4ed - moved the file lookup functions to utilities.
# Conflicts:
#	src/common/utility/findfile.cpp
2020-04-11 20:19:50 +02:00
Christoph Oelckers
5dd89541fe - made console notification scrolling independent of the global game ticker variable. 2020-04-11 20:19:25 +02:00
Christoph Oelckers
d7a9bdc858 - moved key definitions to their own header.
- moved VM hooks to vmthunks.cpp.
- header cleanup for c_bind.h to avoid including high level game definitions.
2020-04-11 20:19:25 +02:00
Christoph Oelckers
756a743974 - uncouple console's cursor blinking from the game ticker.
This is now done in real time by the drawer.
2020-04-11 20:19:25 +02:00
Christoph Oelckers
31fbff85f4 - c_dispatch header cleanup and splitting of gamestate into a separate header, to avoid polluting low level code with game specific headers. 2020-04-11 20:19:25 +02:00
Christoph Oelckers
b7ff7302e5 - copied some CCMD improvements from Raze
* no longer uses copystring function.
* ability to dynamically register CCMDs.
2020-04-11 20:19:24 +02:00
Christoph Oelckers
d63a6baa5d - removed the 'caller' parameter from the CCMD dispatcher.
This can never be anything but players[consoleplayer].mo, so there is no need to pass it through the interface.
2020-04-11 20:19:24 +02:00
Christoph Oelckers
603ad755ab - separated the button code from c_dispatch.
Two separate features justify two separate files.
2020-04-11 20:19:24 +02:00
Christoph Oelckers
4a50f78bfe - more work on console code. 2020-04-11 20:19:24 +02:00
alexey.lysiuk
0d420a75b7 - fixed compilation for Linux and macOS 2020-04-11 20:36:36 +03:00
Christoph Oelckers
76db26ee0b - split off the console's command line class into its own file. 2020-04-11 14:00:22 +02:00
Christoph Oelckers
e425615770 - moved the V_GetColor family of functions to the global palette utilities. 2020-04-11 14:00:22 +02:00
Christoph Oelckers
1479e3a1c3 - CVAR cleanup, in particular decoupling from game internals, which now get handled via callbacks. 2020-04-11 14:00:22 +02:00
Christoph Oelckers
05239c63f9 - moved some palette related code into the 'common' folder. 2020-04-11 14:00:22 +02:00
Christoph Oelckers
c713850dac - moved sc_man and palettecontainer to the 'common' folder. 2020-04-11 14:00:21 +02:00
Christoph Oelckers
98472d999b - moved name.cpp to 'common'.
Still got to find a way to handle namedef.h without polluting the low level code with game content.
2020-04-11 14:00:21 +02:00
Christoph Oelckers
a00c976245 - removed a large batch of unused names. 2020-04-11 14:00:21 +02:00
Christoph Oelckers
5ac88ebce2 - added some Raze-specific file system utilities so that both can work with the same code. 2020-04-11 14:00:21 +02:00
Christoph Oelckers
05d8856fe0 - moved file system implementation to 'common'. 2020-04-11 14:00:20 +02:00
Christoph Oelckers
80c6d5b276 - renamed more stuff and also moved the Strife teaser voice handling out of the file system. 2020-04-11 14:00:19 +02:00
Christoph Oelckers
c1bb7de23a - more file system refactoring.
* moved the sprite renaming out of the file system entirely into a caller-provided callback.
* renamed several functions to closer match the terms of a file system.
* moved the VM interface out of the implementation.
2020-04-11 14:00:19 +02:00
Christoph Oelckers
6bccde3b51 - renamed the file system related classes to actually use the term "FileSystem". 2020-04-11 14:00:18 +02:00
Christoph Oelckers
83befa7686 - moved the "??? lumps" messages out of the single resource file handlers into the calling function and did a bit of include cleanup. 2020-04-11 14:00:18 +02:00
Christoph Oelckers
7d83dfa03a - moved the file names used for deciding to remove the root directory of zips out of the resource file management.
Yet again too much dependencies on game specifics in low level code.
2020-04-11 14:00:18 +02:00
Christoph Oelckers
135f159927 - pass lump filters as parameter when initializing the file system to reduce dependencies on high level state in the low level code. 2020-04-11 14:00:17 +02:00
Christoph Oelckers
d12a9bb77a - renamed the caching functions of FResourceLump. 2020-04-11 14:00:17 +02:00
Christoph Oelckers
510fc2d549 - added handler for Witchaven's sound resource files.
Useful for loading these to play the MIDIs. Since these files have no named directory, the content just gets inserted into a subdirectory named after the file with each entry given a 4 digit hex number as a name.
2020-04-11 14:00:17 +02:00
Christoph Oelckers
1574799683 - moved most parts of the Doom specific lump setup out of the file format implementations into the main class.
This is to keep as much higher level logic out of these as possible. The presentation of the data should be a concern of the file system, not the data containers.
2020-04-11 14:00:16 +02:00
Christoph Oelckers
ef300a9ea8 - lump flags cleanup. 2020-04-11 14:00:16 +02:00
Christoph Oelckers
025e80b74a - moved NeedFileStart out of the lump flag word into an empty part of the FZipLump structure. 2020-04-11 14:00:16 +02:00
Christoph Oelckers
a38633aa22 - moved the file name management out of the single resource lumps.
This is now being managed by the main file system class. The single lumps should only concern themselves with the actual data they manage, not with how the file system presents them to the outside.
The IWAD detection code was also switched to use a file system wrapper instead of looking at the single files directly.
2020-04-11 14:00:16 +02:00
Christoph Oelckers
89fb479c19 - moved the linkedTexture pointer up one level out of the resource descriptor into the file system record. 2020-04-11 14:00:15 +02:00
Christoph Oelckers
2e258e8cdb - include cleanup in Win32 folder. 2020-04-11 14:00:15 +02:00
Christoph Oelckers
fdc14ca805 - renamed fullscreen CVar internally to vid_fullscreen to make searching for it easier.
The word 'fullscreen' appears a bit too frequently in the source.
2020-04-11 14:00:15 +02:00
Christoph Oelckers
d523da1313 - make DumpCPUInfo return a string instead of letting it print the info itself. Also consolidated I_Init, because both existing versions were identical. 2020-04-11 14:00:15 +02:00
Christoph Oelckers
76352dd9b3 - moved the last remaining utilities. 2020-04-11 14:00:14 +02:00
Christoph Oelckers
5a1c4693de - moved SFMT to 'common'.
Now it is third party code with no hooks into higher level dependencies.
2020-04-11 14:00:14 +02:00
Christoph Oelckers
9ef6b15bfa - moved more stuff and split FRandom in two so that the high level baggage does not need to be pulled in to use the RNG. 2020-04-11 14:00:14 +02:00
Christoph Oelckers
fb1a7679ec - moved most basic utility code without any dependencies on the rest of the engine to 'common' directory.
Again the objective is easier sharing with Raze.
2020-04-11 14:00:13 +02:00
Christoph Oelckers
ace3e29473 - removed the implicit conversion operators from FName.
These were creating dangerous interdependencies. It is better to do explicit conversions when needed.
As an added plus, this means that zstring.h no longer depends on name.h which was very annoying.
2020-04-11 14:00:13 +02:00
Christoph Oelckers
6996d54a23 - moved more code to 'common'.
This is all low level utilities with no dependencies on game logic. Having this in a separate directory makes sharing with Raze a lot easier.
2020-04-11 14:00:12 +02:00
Christoph Oelckers
e230420f88 - moved all character set utilities to utf8.cpp.
- moved matrix class to 'common'.
2020-04-11 14:00:12 +02:00
Christoph Oelckers
669e8fbe48 - started some reorganization of low level utility code by moving all third party dependencies to a separate place. 2020-04-11 14:00:12 +02:00
Christoph Oelckers
820fe8b3f9 - split off the container for the translation data into its own file. 2020-04-11 14:00:11 +02:00
Christoph Oelckers
66a837f983 - took the translation slot definition out of the container and use a dynamic array to store the data. 2020-04-11 14:00:11 +02:00
Christoph Oelckers
cf757ba834 - made the translation container a class.
This also splits off some Doom-specific implementation details into higher level headers.
2020-04-11 14:00:11 +02:00
Christoph Oelckers
520a96033b - minimalized the interface to the translation tables to a small set of functions.
Now the internals can be refactored without affecting all using code.
2020-04-11 14:00:10 +02:00
Christoph Oelckers
0a7344e432 - abstract the external translation interface.
The translation table array now only gets accessed from within r_translate.cpp.
2020-04-11 14:00:10 +02:00
Christoph Oelckers
d00ad60437 - fixed a few issues pointed out by the assert in the TArray [] operator. 2020-04-11 14:00:10 +02:00
Christoph Oelckers
77c4a57c51 - allocate FRemapTable's content statically.
first step of organizing this data more renderer-friendly.
2020-04-11 14:00:10 +02:00
Christoph Oelckers
b0ecb02d6b - move SuperFastHash to its own set of files, instead of having this tied to the console.
- replace swapvalues with std::swap globally.
- added some additions to utility code from Raze, mainly to reduce file content differences.
- reduced some unused utilities
2020-04-11 14:00:10 +02:00
Christoph Oelckers
003294e598 - added printf.h header to avoid including more dirty ones for the console printing functions. 2020-04-11 14:00:09 +02:00
Christoph Oelckers
1fe667c6a0 - cleaned up the includes in m_png.h, this file had far too many and far too broad dependencies. 2020-04-11 14:00:09 +02:00
Christoph Oelckers
cc48f18303 - moved the dictionary implementation into the 'scripting' folder where it really belongs. 2020-04-11 14:00:09 +02:00
Christoph Oelckers
40e380f2c0 - updated m_argv.cpp from Raze. 2020-04-11 14:00:08 +02:00