In ZDoom this would affect everything using a patch that got used in a front sky layer, even if the texture was totally unrelated. It is only owed to the low usability of such patches for other purposes that this hasn't caused problems.
Previously it tried to copy all patches of composite sub-images directly onto the main image.
This caused massive complications throughout the entire true color texture code and made any attempt of caching the source data for composition next to impossible because the entire composition process operated on the raw data read from the texture and not some cacheable image. While this may cause more pixel data to be processed, this will be easily offset by being able to reuse patches for multiple textures, once a caching system is in place, which even for the IWADs happens quite frequently.
Removing the now unneeded arguments from the implementation also makes things a lot easier to handle.
* it's no longer the main texture objects managing the pixel buffer but FSoftwareTexture.
* create proper spans for true color textures. The paletted spans only match if the image does not have any translucent pixels.
* create proper warp textures instead of working off the paletted variants.
As a side effect, caching of pixel buffers for texture composition is temporarily disabled, as it management of texture redirections. These things will be reimplemented once things progress further. The existing methods here had their share of serious issues that should be fixed.
This was done to make reviewing easier, again because it is virtually impossible to search for the operators in the code.
Going through this revealed quite a few places where texture animations were on but shouldn't and even more places that did not check PASLVERS, although they were preparing some paletted rendering.
This class has only meaning for software-based warping so it doesn't have to be a part of the FTexture hierarchy.
Making it a subclass of FSoftwareTexture is fully sufficient.
As a bonus this already fixes several bugs caused by the botched texture scaling implementation the original texture manager came with.
System cursors are currently disabled because they rely on functionality that needs to be moved to different classes.
- disallow bool as a return value for direct native calls because it only sets the lowest 8 bits of the return register.
- changed return type for several functions from bool to int where the return type was the only thing blocking use as direct native call.
CMakeFiles/zdoom.dir/r_utility.cpp.o: In function `R_SetupFrame(FRenderViewpoint&, FViewWindow&, AActor*)':
/home/travis/build/coelckers/gzdoom/src/r_utility.cpp:832: undefined reference to `AActor::GetCameraHeight() const'
CMakeFiles/zdoom.dir/g_shared/a_action.cpp.o: In function `A_Unblock(AActor*, bool)':
/home/travis/build/coelckers/gzdoom/src/g_shared/a_action.cpp:64: undefined reference to `AActor::GetDropItems() const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance2DSquared(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x6ab): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance3DSquared(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x75f): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Vec3To(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x850): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Vec2To(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x930): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_DistanceBySpeed(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0xa00): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o:vmthunks_actors.cpp:(.text+0xad3): more undefined references to `AActor::PosRelative(AActor const*) const' follow
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_PosRelative(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x1200): undefined reference to `AActor::PosRelative(sector_t*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_ClearInterpolation(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x127d): undefined reference to `AActor::ClearInterpolation()'
vmthunks_actors.cpp:(.text+0x1298): undefined reference to `AActor::ClearInterpolation()'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_GetBobOffset(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x135a): undefined reference to `AActor::GetBobOffset(double) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance2D(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x222b): undefined reference to `AActor::PosRelative(AActor const*) const'
* use I_Error instead of I_FatalError to abort. I_FatalError is only for things that are not recoverable and should not be handled outside of error cleanup and rethrowing.
* only catch CRecoverableError in JitCompile. Everything else should fall through to the outermost catch block.
* Do not I_FatalError out after handling the exception locally. Just print an error and return null, indicating failure.
Temple of the Lizardmen 3 has segs lumps in every level that seem to use a different data format and are completely unusable, up to triggering undefined behavior.
* The functions had no prototype and caused crashes.
* even after creating a prototype it didn't work because CreateAnonymousFunction was set up incorrectly for the case where a known return type was given.
- fixed: P_PoisonDamage's check for Buddha2 and the Buddha powerup were inverted.
- fixed: P_PoisonDamage checked the modified damage instead of the raw, allowing amplifiers to boost the damage beyond telefrag and circumventing regular buddha.
This was the last bit of code standing in the way of making AInventory a fully scripted class.
All that's left to sort out is some variable accesses - the vast majority of them in SBARINFO.
- moved the ALTHUDCF parser PClass::StaticInit, so that it gets done right after creating the actor definitions.
All left to do is not to reallocate the AltHud object for each frame but store it in a better suited place.
Instead of overriding the Massacre method it is preferable to clear the flags causing the bad behavior, most notably ISMONSTER.
# Conflicts:
# src/g_inventory/a_pickups.cpp
# src/g_inventory/a_pickups.h
Now a child type can decide for itself how to treat 'amount'.
The scripting interfaces to this function in ACS and FraggleScript have been consolidated and also scriptified.
- offloaded key list generation for alternative HUD to non-UI parts.
This change also revealed a problem with handling empty sprites in the key list so this got fixed, too.
- changed PARAM_STRING to use the passed string by reference instead of by value. The 3 instances where passing by value was needed now use PARAM_STRING_VAL.
* Attempts to fix errors introduced by merging of asmjit branch and weapons scripting branch
* This didn't work. The others should work though.
* fix scriptutil.cpp:(.text+0x18d): undefined reference to `PClass::FindActor(FName)'
* Attempt to fix compilation on macOS
On Windows none of this is needed, because we can generate a proper unwind frame for the JITed functions, but even on Linux, it would require manual additions to each single piece of native code that ever gets called from inside a JIT compiled function.
This is an utterly prohibitive proposition because it makes direct native calls a virtual impossibility
So, in order to get the thrown error properly presented both I_Error and ThrowAbortException will now forward to I_FatalError if it is called from inside a JIT context.