from one place to another, and can also be used for quick lookups to see if a particular tile is threatened
by potential enemy fire. Patch review by SafetyOff and with help from Cyp.
These cases of bitshifting are premature optimisations ''only'',
especially since they obscure what's really going on (finding the center
of a range).
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
rendSurface isn't used by rendmode.c, so define it in piemode.c where it
is both used and its contents are defined.
Additionally remove unnecessary #includes from rendmode.h and include
the correct headers at places where rendmode.h was included.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
Global pointer psRendSurface only ever contains &rendSurface (another
global), provided that it isn't undefined (isn't statically NULL
initialised). So replace the use of this pointer with using
rendSurface.
Additionally remove function iV_RenderAssign, which only wraps the
psRendSurface assignment along with a debug() call, and inline it at its
only call-site.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
Remove the write only member variable `flags` from struct iSurface.
Additionally remove the macros REND_SURFACE_(UNDEFINED|SCREEN|USR) which
were only used to assign to the `flags` variable.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
Slight reordering of the call to pie_RotateProject and turn a
todo-message comment in an actual TODO.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
Mark the prototypes of all (fixed point) trigonometric functions as
pure. This declares that these functions don't have any side-effects.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
Thanks to Mysteryem for cleaning up the icons and doing some modifications as well so they all match the theme.
Cherry-picked from 934b5a4803efbc15159d07dc197424f63f3ec29e = 2.3@11710, resolved conflict by taking 2.3's data/base/images/frontend4.png and recrushing.
In 697a97ff18, my interpretation of the
performed matrix math was wrong as a result of (wrongly) reading [xyz]^2
as [xyz]*2. This commit fixes that error.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
Use multiplication and division instead of bitshifting as its
conceptually easier to understand (mathematically).
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
The variables [xy]pshift only ever contain the constant value `10`, so
instead of bothering to keep the variables around use the
STRETCHED_Z_SHIFT constant. This constant serves the same purpose as
[xy]pshift (only for the Z coordinate) and is defined to `10` as well.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
Turn the ticketnotifications and ticketvalidemail Trac plugins into
Debian packages, allowing for slightly easier management of these
plugins.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>