| 1847 | } |
| 1848 | |
| 1849 | void M_ChangeLightOffset(int monst) |
| 1850 | { |
| 1851 | int lx, ly, _mxoff, _myoff, sign; |
| 1852 | |
| 1853 | if ((DWORD)monst >= MAXMONSTERS) |
| 1854 | app_fatal("M_ChangeLightOffset: Invalid monster %d", monst); |
| 1855 | |
| 1856 | lx = monster[monst]._mxoff + 2 * monster[monst]._myoff; |
| 1857 | ly = 2 * monster[monst]._myoff - monster[monst]._mxoff; |
| 1858 | |
| 1859 | if (lx < 0) { |
| 1860 | sign = -1; |
| 1861 | lx = -lx; |
| 1862 | } else { |
| 1863 | sign = 1; |
| 1864 | } |
| 1865 | |
| 1866 | _mxoff = sign * (lx >> 3); |
| 1867 | if (ly < 0) { |
| 1868 | _myoff = -1; |
| 1869 | ly = -ly; |
| 1870 | } else { |
| 1871 | _myoff = 1; |
| 1872 | } |
| 1873 | |
| 1874 | _myoff *= (ly >> 3); |
| 1875 | ChangeLightOff(monster[monst].mlid, _mxoff, _myoff); |
| 1876 | } |
| 1877 | |
| 1878 | BOOL M_DoStand(int i) |
| 1879 | { |
no test coverage detected