From 48ed7835d733044917a73e3bd2c6d90ca9ea067b Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Mon, 10 Apr 2017 11:41:26 +0100 Subject: [PATCH] Add a helpful comment in order to make people who look at this in future suffer less. --- src/r_plane.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/r_plane.c b/src/r_plane.c index 209d29495..cf7b679bb 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -965,6 +965,13 @@ void R_DrawSinglePlane(visplane_t *pl) if (hack) { + /* + Essentially: We can't & the components along the regular axes when the plane is rotated. + This is because the distance on each regular axis in order to loop is different. + We rotate them, & the components, add them together, & them again, and then rotate them back. + These three seperate & operations are done per axis in order to prevent overflows. + toast 10/04/17 + */ const fixed_t cosinecomponent = FINECOSINE(hack>>ANGLETOFINESHIFT); const fixed_t sinecomponent = FINESINE(hack>>ANGLETOFINESHIFT);