* Add test nodes for alpha compositing and the fill texture modifier
Texture test nodes can be helpful to test if `blit_with_alpha` works correctly.
The alpha compositing test node covers different cases where pixel colors are mixed with each other.
The test currently fails because `blitPixel` does not work correctly if a semi-transparent color
is drawn on top of another semi-transparent color.
The test nodes for the fill texture modifier show if the size and position arguments of the modifier work correctly.
They do not cover special cases such as very large or negative position or size values.
* Faster blit_with_alpha()
The `blit_with_alpha` function has a noticeable effect on the time it takes to join a game.
To reduce the join times, I replace the `blit_with_alpha` function with a new one:
* It does not uses floating-point numbers.
* It directly operates on the raw pixel data instead of using the comparatively
slow `setPixel` and `getPixel` functions from Irrlicht.
Only ECF_A8R8G8B8 base images are supported now.
If the top image does not have the ECF_A8R8G8B8 color format, it is converted;
I assume that this happens rarely.
* There are case distinctions for fully opaque, fully transparent and semi-transparent pixels.
This empirically increases the performance since the mixing between two semi-transparent happens rarely.
* The new function no longer has the `src_pos` argument since it was always the zero vector.
* The function is only documented once where it is declared.
For backwards compatibility, `blit_with_alpha` still mixes colors without gamma correction.
`blit_with_alpha` nonetheless behaves slightly different than before:
If a semi-transparent pixel is drawn on top of another semi-transparent pixel,
the color is mixed in a way which we can consider to be more correct now.
Many functions expect RemotePlayer to have a valid peer ID,
this however is not the case immediately after disconnecting
where the object is still alive and pending for removal.
ServerEnvironment::getPlayer(const char *, bool) now only
returns players that are connected unless forced to.
Restores backwards compatibility for death sounds or other sounds that are not supposed to be "cut off" abruptly.
---------
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: grorp <gregor.parzefall@posteo.de>