MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / doNotchTransparencyHack

Function doNotchTransparencyHack

launcher/minecraft/skins/SkinModel.cpp:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37static void doNotchTransparencyHack(QImage& image)
38{
39 for (int y = 0; y < 32; y++) {
40 QRgb* line = reinterpret_cast<QRgb*>(image.scanLine(y));
41 for (int x = 32; x < 64; x++) {
42 if (qAlpha(line[x]) < 128) {
43 return;
44 }
45 }
46 }
47
48 setAlpha(image, { 32, 0, 32, 32 }, 0);
49}
50
51static QImage improveSkin(QImage skin)
52{

Callers 1

improveSkinFunction · 0.85

Calls 1

setAlphaFunction · 0.85

Tested by

no test coverage detected