This will cause incorrectly generated textures and the reason for this no longer exists because CreateTexBuffer is doing this as a postprocessing step now.
* the MAPINFO options now get handled in g_mapinfo.cpp and g_level.cpp, just like the rest of them as members of level_info_t and FLevelLocals.
* RecalcVertexHeights has been made a member of vertex_t and been moved to p_sectors.cpp.
* the dumpgeometry CCMD has been moved to p_setup.cpp
This fixes usage of uninitialized variable in ACSStringPool::PoolEntry objects
The initial version (before 66d15dc) increased pool size by one entry and assign all its members right after that
The improved version reserved MIN_GC_SIZE entries but didn't initialize anything except the first one
ACSStringPool::FindFirstFreeEntry() cannot find the proper entry as it uses PoolEntry::Next member for list traversal
It's enough to initialize Next member with FREE_ENTRY value because other fields will be assigned anyway inside ACSStringPool::InsertString()
https://forum.zdoom.org/viewtopic.php?t=60049
This theoretically means that the software renderer could access this data as well - if it just had been written with a more flexible texture interface.
However, as things stand, this may require quite a bit of work to achieve.
The old organization made sense when ZDoom still was a thing but now it'd be better if all pure data with no dependence on renderer implementation details was moved out.
A separation between GL2 and GL3+4 renderers looks to be inevitable and the more data is out of the renderer when that happens, the better.
Previously, only .wad files can specified without file extension for -iwad command line option
For example, -iwad square1 will load square1.pk3 as IWAD
This was originally invented to fix the sprite offsets for the hardware renderer.
Changed it so that it doesn't override the original offsets but acts as a second set.
A new CVAR has been added to allow controlling the behavior per renderer.
This also replaces DTA_ColormapStyle with proper implementations of its components. As implemented it was a very awkward mixture of various effects that already existed in a separate form. As a result of its implementation it required additional but completely redundant shader support which could be removed now. As a side effect of this change a new DTA_Desaturate option was added.
No more locking insanity! :)
There are no locking counters or other saveguards here that would complicate the implementation because there's precisely two places where this buffer must be locked - the RenderView functions of the regular and poly SW renderer which cannot be called recursively.
In its current form this is quite useless. What's really needed is to require a lock on the RenderBuffer for the 3D scene, but since this is not needed for the 2D stuff anymore it can be done far simpler.
This was a bad idea from the start and really only made sense with DirectDraw.
These days a FrameBuffer represents an abstract hardware canvas that shares nothing with a software canvas so having these classes linked together makes things needlessly complicated.
The software render buffer is now a canvas object owned by the FrameBuffer.
Note that this commit deactivates a few things in the software renderer, but from the looks of it none of those will be needed anymore if we set OpenGL 2 as minimum target.
This is a necessary first step for simplifying the texture handling in order to refactor it.
# Conflicts:
# src/gl/system/gl_swframebuffer.cpp
# src/textures/textures.h
# src/win32/fb_d3d9.cpp
This was done mainly to reduce the amount of occurences of the word FTexture but it immediately helped detect two small and mostly harmless bugs that were found due to the stricter type checks.
This merely addresses the crashing issue, it does nothing about the faulty initialization logic here that causes the chorus not to get initialized properly if reverb is active.
The issue needs more in-detail investigation but for now this has to suffice.
Notes:
* ADL: The DMX volume model was set as default to unify volumes on all bank. Otherwise, if you will use 'Generic' or 'Win9x', the sound will became too loud than wanted. Each bank has own default volume model which is used when 'Auto' is set.
* ADL: 6 chips is optimal to work with default banks
* OPN: 8 chips are set to provide 48 polyphony channels. (each OPN2 chip has 6 channels only)
* Text files: junk spaces from end of lines are was auto-removed.
Also embedded MIDI sequencer has been disabled too as it is not needed in GZDoom
I made that to allow easier updates of ADLMIDI into newer versions without of any future troubles and conflicts
Also embedded MIDI sequencer has been disabled too as it is not needed in GZDoom
I made that to allow easier updates of ADLMIDI into newer versions without of any future troubles and conflicts
src/v_video.h:56:6: error: ISO C++ forbids forward references to 'enum' types
src/v_video.h:342:17: error: field has incomplete type 'FTextureFormat'
src/v_video.h:344:47: error: variable has incomplete type 'FTextureFormat'
These cannot be done with the regular textures so there needs to be an option to create more than one native texture per FTexture. For completeness' sake there is also the option now to create a paletted version of a texture if the regular one is true color. This fixes a long standing problem that translations were not applied to non-paletted textures.
Aside from PCX 4 bit, uncompressed PCX and TGA grayscale for which I was unable to obtain test images, all others now produce proper textures in both 8 and 32 bit mode.
The old logic used a translation table that does not work with color images, it was designed to handle 8 bit grayscale images.
So now, it creates a true color buffer and then turns it into a texture with R,G,B = 255 and the alpha channel set to the grayscale value.
This was also the reason why crosshairs made from 32 bit PNGs did not show correctly.
* Instead of using the red channel it now uses the grayscale value. While slower in a few situations, it is also more precise and makes the feature more useful.
* For paletted textures do not use the index as alpha anymore but the actual grayscaled color. This is again to make the feature more consistent and useful.
* To compensate for the above there is now a list of hashes for known alpha textures in patch format, so that they don't get broken.
* IMGZ is now considered a grayscale format. There's only two known textures that use IMGZ for something else than crosshairs and those are explicitly handled.
* several smaller fixes.
* the actual color conversion functions for paletted output are now consolidated in a small number of inlines so that future changes are easier to do.
Note: This hasn't been tested yet and will need further changes in the hardware rendering code. As it is it is not production-ready.
GCC/Clang reported these warnings:
src/textures/jpegtexture.cpp:305:29: warning: data argument not used by format string [-Wformat-extra-args]
src/textures/jpegtexture.cpp:388:28: warning: data argument not used by format string [-Wformat-extra-args]
src/textures/jpegtexture.cpp:432:29: warning: data argument not used by format string [-Wformat-extra-args]
src/textures/jpegtexture.cpp:481:28: warning: data argument not used by format string [-Wformat-extra-args]
Now it is no longer necessary to provide specially set up textures for rendering shaded decals, they can use any PNG texture now that contains a proper red channel.
Handling of the alPh chunk has been removed as a result as it in no longer needed.
Even though unlikely, this should work as a regular texture because it can be used as such.
As a result of the above, true color generation needs to be done explicitly now.
Until now each subclass of FTexture had to implement the entire span generation itself, presumably so that a few classes can use simpler structures.
This does not work if a texture can have more than one pixel buffer as is needed for alpha textures.
Even though it means that some classes will allocate more data now, it's the only way to do it properly.
In addition this removes a significant amount of mostly redundant code from the texture classes.
- added alpha texture processing to all converted classes
As of now this is not active and not tested.
Note that as part of the conversion even those textures that were working as alphatextures will not look correct until the higher level code gets adjusted.
This was implemented in a way that made it entirely impossible to load Build resources and make them usable for modding.
ZDoom had Build texture support for many years but the limitations the palette handling imposed made it impossible to use them.
It wasn't usable for anything more than to load Build maps and have them display properly - a feature that had to be removed because it was irreparably broken already.
With the forced palette override out of the way it should now be possible to implement loading of Build ART files as actually usable resources.
- a bit of header cleanup.
* moved <zlib.h> and <bzlib.h> from files.h to files_decompress.cpp because they are no longer needed for defining the interface.
* added <functional> to the precompiled header
This should be dealt with at the source, not one level up, so that it also works properly if the GetReader function of the ResourceFile object is called directly and not through the resource manager.