Something went wrong. Try again.
the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
Something went wrong. Try again.
1.3 kB · 56 lines
C++
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657#include "stdafx.h"#include "GuiParticles.h"#include "GuiParticle.h"#include "Textures.h"
GuiParticles::GuiParticles(Minecraft *mc){ this->mc = mc;}
void GuiParticles::tick(){ for (unsigned int i = 0; i < particles.size(); i++) { GuiParticle *gp = particles[i];
gp->preTick(); gp->tick(this);
if (gp->removed) { particles.erase(particles.begin()+i); i--; } }}
void GuiParticles::add(GuiParticle *guiParticle){ particles.push_back(guiParticle); guiParticle->preTick();}
void GuiParticles::render(float a){ // 4J Stu - Never used#if 0 mc->textures->bindTexture(L"/gui/particles.png");
AUTO_VAR(itEnd, particles.end()); for (AUTO_VAR(it, particles.begin()); it != itEnd; it++) { GuiParticle *gp = *it; //particles[i]; int xx = (int) (gp->xo + (gp->x - gp->xo) * a - 4); int yy = (int) (gp->yo + (gp->y - gp->yo) * a - 4);
float alpha = ((float) (gp->oA + (gp->a - gp->oA) * a)); float r = ((float) (gp->oR + (gp->r - gp->oR) * a)); float g = ((float) (gp->oG + (gp->g - gp->oG) * a)); float b = ((float) (gp->oB + (gp->b - gp->oB) * a));
glColor4f(r, g, b, alpha); blit(xx, yy, 8 * 5, 0, 8, 8); }#endif}