
Originally Posted by
Zion
or why not try do it urself. but i;ll give you a hint, where it gets the height of the particles, just add an exception there for if it's in resizable modes
What do I have to change about this part then?
Code:
if (enableParticles) {
iterator = currentParticles.iterator();
while (iterator.hasNext()) {
particle = iterator.next();
if (particle != null) {
particle.tick();
if (particle.isDead()) {
removeParticles.add(particle);
} else {
int displayX = particle.getPosition().getX();
int displayY = particle.getPosition().getY();
int displayZ = particle.getPosition().getZ();
int[] writing = writeParticlePos(displayX, displayY, displayZ);
float size = particle.getSize();
int alpha = (int) (particle.getAlpha() * 255.0F);
int particlesize = (int) ((4.0F) * particle.getSize());
int srcAlpha = 256 - alpha;
int srcR = (particle.getColor() >> 16 & 255) * alpha;
int srcG = (particle.getColor() >> 8 & 255) * alpha;
int srcB = (particle.getColor() & 255) * alpha;
int display1 = writing[1] - particlesize;
if (display1 < 0) {
display1 = 0;
}
int display2 = writing[1] + particlesize;
if (display2 >= DrawingArea.height) {
display2 = DrawingArea.height - 1;
}
for (int iy = display1; iy <= display2; ++iy) {
int dy = iy - writing[1];
int var30 = (int) Math.sqrt(particlesize * particlesize - dy * dy);
int var31 = writing[0] - var30;
if (var31 < 0) {
var31 = 0;
}
int var32 = writing[0] + var30;
if (var32 >= DrawingArea.width) {
var32 = DrawingArea.width - 1;
}
int pixel = var31 + iy * DrawingArea.width;
try {
if (Rasterizer.depthBuffer != null) {
if (Rasterizer.depthBuffer[pixel] >= writing[2] - size - 15 || Rasterizer.depthBuffer[pixel++] >= writing[2] + size + 15) {
for (int ix = var31; ix <= var32; ++ix) {
int dstR = (aRSImageProducer_1165.canvasRaster[pixel] >> 16 & 255) * srcAlpha;
int dstG = (aRSImageProducer_1165.canvasRaster[pixel] >> 8 & 255) * srcAlpha;
int dstB = (aRSImageProducer_1165.canvasRaster[pixel] & 255) * srcAlpha;
int rgb = (srcR + dstR >> 8 << 16) + (srcG + dstG >> 8 << 8) + (srcB + dstB >> 8);
aRSImageProducer_1165.canvasRaster[pixel++] = rgb;
}
}
}
} catch (Exception exception) {
}
}
}
}
}
} else {
iterator = currentParticles.iterator();
while (iterator.hasNext()) {
particle = iterator.next();
if (particle != null) {
particle.tick();
if (particle.isDead()) {
removeParticles.add(particle);
}
}
}
currentParticles.removeAll(removeParticles);
removeParticles.clear();
}