MCPcopy Create free account
hub / github.com/diasurgical/devilution / RotateRadius

Function RotateRadius

Source/lighting.cpp:485–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483BYTE RadiusAdj[23] = { 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, 0 };
484
485void RotateRadius(int *x, int *y, int *dx, int *dy, int *lx, int *ly, int *bx, int *by)
486{
487 int swap;
488
489 *bx = 0;
490 *by = 0;
491
492 swap = *dx;
493 *dx = 7 - *dy;
494 *dy = swap;
495 swap = *lx;
496 *lx = 7 - *ly;
497 *ly = swap;
498
499 *x = *dx - *lx;
500 *y = *dy - *ly;
501
502 if (*x < 0) {
503 *x += 8;
504 *bx = 1;
505 }
506 if (*y < 0) {
507 *y += 8;
508 *by = 1;
509 }
510}
511
512void DoLighting(int nXPos, int nYPos, int nRadius, int Lnum)
513{

Callers 1

DoLightingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected