ugfx/src/gmisc/gmisc_options.h

93 lines
2.5 KiB
C
Raw Normal View History

/*
* This file is subject to the terms of the GFX License. If a copy of
* the license was not distributed with this file, you can obtain one at:
*
* http://ugfx.org/license.html
*/
/**
* @file src/gmisc/gmisc_options.h
* @brief GMISC - Miscellaneous Routines options header file.
*
* @addtogroup GMISC
* @{
*/
#ifndef _GMISC_OPTIONS_H
#define _GMISC_OPTIONS_H
/**
* @name GMISC Functionality to be included
* @{
*/
/**
* @brief Include array operation functions
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
*/
#ifndef GMISC_NEED_ARRAYOPS
2018-02-27 07:44:21 +00:00
#define GMISC_NEED_ARRAYOPS GFXOFF
#endif
/**
* @brief Include fast floating point trig functions (fsin, fcos)
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
*/
#ifndef GMISC_NEED_FASTTRIG
2018-02-27 07:44:21 +00:00
#define GMISC_NEED_FASTTRIG GFXOFF
#endif
/**
* @brief Include fast fixed point trig functions (ffsin, ffcos)
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
*/
#ifndef GMISC_NEED_FIXEDTRIG
2018-02-27 07:44:21 +00:00
#define GMISC_NEED_FIXEDTRIG GFXOFF
#endif
/**
* @brief Include fast inverse square root (x^-1/2)
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
*/
#ifndef GMISC_NEED_INVSQRT
2018-02-27 07:44:21 +00:00
#define GMISC_NEED_INVSQRT GFXOFF
#endif
2016-11-14 16:54:41 +00:00
/**
* @brief Include polygon hit test functions
2018-02-27 07:44:21 +00:00
* @details Defaults to GFXOFF
2016-11-14 16:54:41 +00:00
*/
#ifndef GMISC_NEED_HITTEST_POLY
2018-02-27 07:44:21 +00:00
#define GMISC_NEED_HITTEST_POLY GFXOFF
2016-11-14 16:54:41 +00:00
#endif
/**
* @}
*
* @name GMISC Optional Parameters
* @{
*/
/**
* @brief Modifies the @p invsqrt() function to assume a different integer to floating point endianness.
* @note Normally the floating point format and the integer format have
* the same endianness. Unfortunately there are some strange
* processors that don't eg. some very early ARM devices.
* For those where the endianness doesn't match you can fix it by
* defining GMISC_INVSQRT_MIXED_ENDIAN.
* @note This still assumes the processor is using an ieee floating point format.
*
* If you have a software floating point that uses a non-standard
* floating point format (or very strange hardware) then define
* GMISC_INVSQRT_REAL_SLOW and it will do it the hard way.
*/
#ifndef GMISC_INVSQRT_MIXED_ENDIAN
2018-02-27 07:44:21 +00:00
#define GMISC_INVSQRT_MIXED_ENDIAN GFXOFF
#endif
/**
* @brief Modifies the @p invsqrt() function to do things the long slow way.
* @note This causes the @p invsqrt() function to work regardless of the
* processor floating point format.
* @note This makes the @p invsqrt() function very slow.
*/
#ifndef GMISC_INVSQRT_REAL_SLOW
2018-02-27 07:44:21 +00:00
#define GMISC_INVSQRT_REAL_SLOW GFXOFF
#endif
/** @} */
#endif /* _GMISC_OPTIONS_H */
/** @} */