MCPcopy Create free account
hub / github.com/demoth/jake2 / AddParticle

Method AddParticle

client/src/main/java/jake2/client/V.java:118–133  ·  view source on GitHub ↗
(float[] org, int color, float alpha)

Source from the content-addressed store, hash-verified

116 * =====================
117 */
118 static void AddParticle(float[] org, int color, float alpha) {
119 if (r_numparticles >= MAX_PARTICLES)
120 return;
121
122 int i = r_numparticles++;
123
124 int c = particle_t.colorTable[color];
125 c |= (int) (alpha * 255) << 24;
126 particle_t.colorArray.put(i, c);
127
128 i *= 3;
129 FloatBuffer vertexBuf = particle_t.vertexArray;
130 vertexBuf.put(i++, org[0]);
131 vertexBuf.put(i++, org[1]);
132 vertexBuf.put(i++, org[2]);
133 }
134
135 /*
136 * =====================

Callers 2

AddParticlesMethod · 0.95
TestParticlesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected