Differences From Artifact [63da7f6939]:
- File src/renderparticles.m — part of check-in [b787ad5a04] at 2025-03-22 23:10:13 on branch trunk — Clean up DynamicEntity (user: js, size: 3949) [annotate] [blame] [check-ins using]
To Artifact [8491151e32]:
- File
src/renderparticles.m
— part of check-in
[6b85eefc85]
at
2025-03-23 02:47:40
on branch trunk
— Remove loop[ijkl]
They confused clang-format a lot. (user: js, size: 4004) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
17 18 19 20 21 22 23 | VARP(maxparticles, 100, 2000, MAXPARTICLES - 500); static void newparticle(const OFVector3D *o, const OFVector3D *d, int fade, int type) { if (!parinit) { | | < | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | VARP(maxparticles, 100, 2000, MAXPARTICLES - 500); static void newparticle(const OFVector3D *o, const OFVector3D *d, int fade, int type) { if (!parinit) { for (int i = 0; i < MAXPARTICLES; i++) { particles[i].next = parempty; parempty = &particles[i]; } parinit = true; } if (parempty) { struct particle *p = parempty; |
︙ | ︙ | |||
134 135 136 137 138 139 140 | glDisable(GL_BLEND); glDepthMask(GL_TRUE); } void particle_splash(int type, int num, int fade, const OFVector3D *p) { | | < | < | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | glDisable(GL_BLEND); glDepthMask(GL_TRUE); } void particle_splash(int type, int num, int fade, const OFVector3D *p) { for (int i = 0; i < num; i++) { const int radius = type == 5 ? 50 : 150; int x, y, z; do { x = rnd(radius * 2) - radius; y = rnd(radius * 2) - radius; z = rnd(radius * 2) - radius; } while (x * x + y * y + z * z > radius * radius); OFVector3D d = OFMakeVector3D(x, y, z); newparticle(p, &d, rnd(fade * 3), type); } } void particle_trail(int type, int fade, const OFVector3D *s, const OFVector3D *e) { vdist(d, v, *s, *e); vdiv(v, d * 2 + 0.1f); OFVector3D p = *s; for (int i = 0; i < ((int)d * 2); i++) { vadd(p, v); OFVector3D d = OFMakeVector3D(rnd(11) - 5, rnd(11) - 5, rnd(11) - 5); newparticle(&p, &d, rnd(fade) + fade, type); } } |