chore: format Minecraft.Client

This commit is contained in:
Tropical
2026-03-13 17:10:10 -05:00
parent 33d0737d1d
commit e8424f2000
531 changed files with 67709 additions and 62690 deletions

View File

@@ -1,15 +1,15 @@
#include "../Platform/stdafx.h"
#include "MobSkinMemTextureProcessor.h"
BufferedImage *MobSkinMemTextureProcessor::process(BufferedImage *in)
{
BufferedImage* MobSkinMemTextureProcessor::process(BufferedImage* in) {
if (in == NULL) return NULL;
width = 64;
height = 32;
BufferedImage *out = new BufferedImage(width, height, BufferedImage::TYPE_INT_ARGB);
Graphics *g = out->getGraphics();
BufferedImage* out =
new BufferedImage(width, height, BufferedImage::TYPE_INT_ARGB);
Graphics* g = out->getGraphics();
g->drawImage(in, 0, 0, NULL);
g->dispose();
@@ -20,18 +20,16 @@ BufferedImage *MobSkinMemTextureProcessor::process(BufferedImage *in)
setNoAlpha(0, 16, 64, 32);
bool hasAlpha = false;
for (int x = 32; x < 64; x++)
for (int y = 0; y < 16; y++)
{
for (int y = 0; y < 16; y++) {
int pix = pixels[x + y * 64];
if (((pix >> 24) & 0xff) < 128) hasAlpha = true;
}
// 4J-PB - looks like the code below is wrong, and really should be looping from 0 to <32
if (!hasAlpha)
{
// 4J-PB - looks like the code below is wrong, and really should be looping
// from 0 to <32
if (!hasAlpha) {
for (int x = 32; x < 64; x++)
for (int y = 0; y < 16; y++)
{
for (int y = 0; y < 16; y++) {
int pix = pixels[x + y * 64];
if (((pix >> 24) & 0xff) < 128) hasAlpha = true;
}
@@ -40,31 +38,25 @@ BufferedImage *MobSkinMemTextureProcessor::process(BufferedImage *in)
return out;
}
void MobSkinMemTextureProcessor::setForceAlpha(int x0, int y0, int x1, int y1)
{
void MobSkinMemTextureProcessor::setForceAlpha(int x0, int y0, int x1, int y1) {
if (hasAlpha(x0, y0, x1, y1)) return;
for (int x = x0; x < x1; x++)
for (int y = y0; y < y1; y++)
{
for (int y = y0; y < y1; y++) {
pixels[x + y * width] &= 0x00ffffff;
}
}
void MobSkinMemTextureProcessor::setNoAlpha(int x0, int y0, int x1, int y1)
{
void MobSkinMemTextureProcessor::setNoAlpha(int x0, int y0, int x1, int y1) {
for (int x = x0; x < x1; x++)
for (int y = y0; y < y1; y++)
{
for (int y = y0; y < y1; y++) {
pixels[x + y * width] |= 0xff000000;
}
}
bool MobSkinMemTextureProcessor::hasAlpha(int x0, int y0, int x1, int y1)
{
bool MobSkinMemTextureProcessor::hasAlpha(int x0, int y0, int x1, int y1) {
for (int x = x0; x < x1; x++)
for (int y = y0; y < y1; y++)
{
for (int y = y0; y < y1; y++) {
int pix = pixels[x + y * width];
if (((pix >> 24) & 0xff) < 128) return true;
}