1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Remove use_texture_alpha compatibility code for nodeboxes & meshes (#13929)

This commit is contained in:
sfan5 2023-12-13 13:15:59 +01:00 committed by GitHub
parent 6eb9269741
commit d1a55e9ca4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 72 deletions

View file

@ -258,7 +258,7 @@ enum AlphaMode : u8 {
ALPHAMODE_BLEND,
ALPHAMODE_CLIP,
ALPHAMODE_OPAQUE,
ALPHAMODE_LEGACY_COMPAT, /* means either opaque or clip */
ALPHAMODE_LEGACY_COMPAT, /* only sent by old servers, equals OPAQUE */
};
@ -466,11 +466,9 @@ struct ContentFeatures
case NDT_NORMAL:
case NDT_LIQUID:
case NDT_FLOWINGLIQUID:
alpha = ALPHAMODE_OPAQUE;
break;
case NDT_NODEBOX:
case NDT_MESH:
alpha = ALPHAMODE_LEGACY_COMPAT; // this should eventually be OPAQUE
alpha = ALPHAMODE_OPAQUE;
break;
default:
alpha = ALPHAMODE_CLIP;
@ -529,16 +527,6 @@ struct ContentFeatures
#endif
private:
#ifndef SERVER
/*
* Checks if any tile texture has any transparent pixels.
* Prints a warning and returns true if that is the case, false otherwise.
* This is supposed to be used for use_texture_alpha backwards compatibility.
*/
bool textureAlphaCheck(ITextureSource *tsrc, const TileDef *tiles,
int length);
#endif
void setAlphaFromLegacy(u8 legacy_alpha);
u8 getAlphaForLegacy() const;