Differences From Artifact [279400f849]:
- File src/worldlight.m — part of check-in [0ee94739ce] at 2025-03-25 23:38:08 on branch trunk — Clean up Variable (user: js, size: 6257) [annotate] [blame] [check-ins using]
To Artifact [38a360a277]:
- File
src/worldlight.m
— part of check-in
[75e920ae30]
at
2025-03-29 14:25:43
on branch trunk
— Switch from clang-format to manual formatting
clang-format does too many weird things. (user: js, size: 6260) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
201 202 203 204 205 206 207 | void dodynlight(OFVector3D vold, OFVector3D v, int reach, int strength, DynamicEntity *owner) { if (!reach) reach = dynlight; | | | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | void dodynlight(OFVector3D vold, OFVector3D v, int reach, int strength, DynamicEntity *owner) { if (!reach) reach = dynlight; if ([owner isKindOfClass: Monster.class]) reach = reach / 2; if (!reach) return; if (v.x < 0 || v.y < 0 || v.x > ssize || v.y > ssize) return; int creach = reach + 16; // dependant on lightray random offsets! |
︙ | ︙ | |||
223 224 225 226 227 228 229 | if (b.xs + b.x > ssize - 2) b.xs = ssize - 2 - b.x; if (b.ys + b.y > ssize - 2) b.ys = ssize - 2 - b.y; if (dlights == nil) dlights = [[OFMutableData alloc] | | | | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | if (b.xs + b.x > ssize - 2) b.xs = ssize - 2 - b.x; if (b.ys + b.y > ssize - 2) b.ys = ssize - 2 - b.y; if (dlights == nil) dlights = [[OFMutableData alloc] initWithItemSize: sizeof(struct block *)]; // backup area before rendering in dynlight struct block *copy = blockcopy(&b); [dlights addItem: ©]; Entity *l = [Entity entity]; l.x = v.x; l.y = v.y; l.z = v.z; l.attr1 = reach; l.type = LIGHT; |
︙ | ︙ |