reman3/Rayman_X/cpa/public/MTH/MTH_def.h

198 lines
4.9 KiB
C

/* ##H_FILE#
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FILE : MTH_def.h
MODULE : MTH (Common Mathematic Library)
DESCRIPTION : Real precision and target definitions
VERSION : MTH V5.0.13 / Alexandre LANGER [ALX] Ubi R&D / Add Comments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#ifndef MTH_DEF_H
#define MTH_DEF_H
/* #define MTH_CHECK */ /* UNCOMMENT THIS FOR GLOBAL TEST ONLY */
/* ##-###########################
## Optimization
############################## */
/* =========== Allow optimization : ==== */
#define MTH_OPTIMIZE
/* Detect optimization forbiden : */
#ifdef MTH_NO_OPTIMIZE
#pragma message ("*** MTH : Warning MTH_OPTMIZE has been removed!")
#undef MTH_OPTIMIZE
#endif /* MTH_NO_OPTIMIZE */
/* ##-###########################
## Checking NAN
############################## */
/* =========== Warning When MTH_CHECK is Enable : ==== */
/*#ifdef MTH_CHECK*/
/*#pragma message ("*** MTH : Warning MTH_CHECK is Enable ! Do Not Archive this Lib !")*/
/*#endif /* MTH_CHECK */
/* ##-###########################
## Precision
############################## */
/* =========== Detect precision : ====== */
/* === Low precision : */
#ifdef MTH_LOW
#ifdef MTH_MEDIUM
#pragma message ("*** MTH : Precision conflict ! MTH_MEDIUM Disable")
#undef MTH_MEDIUM
#endif /* MTH_MEDIUM */
#ifdef MTH_HIGH
#pragma message ("*** MTH : Precision conflict ! MTH_HIGH Disable")
#undef MTH_HIGH
#endif /* MTH_HIGH */
#pragma message ("*** MTH : Precision set to MTH_LOW")
#define MTH_PrecisionFound
#endif /* MTH_LOW */
/* === Medium precision : */
#ifdef MTH_MEDIUM
#ifdef MTH_LOW
#pragma message ("*** MTH : Precision conflict ! MTH_LOW Disable")
#undef MTH_LOW
#endif /* MTH_LOW */
#ifdef MTH_HIGH
#pragma message ("*** MTH : Precision conflict ! MTH_HIGH Disable")
#undef MTH_HIGH
#endif /* MTH_HIGH */
#pragma message ("*** MTH : Precision set to MTH_MEDIUM")
#define MTH_PrecisionFound
#endif /* MTH_MEDIUM */
/* === High precision : */
#ifdef MTH_HIGH
#ifdef MTH_LOW
#pragma message ("*** MTH : Precision conflict ! MTH_LOW Disable")
#undef MTH_LOW
#endif /* MTH_LOW */
#ifdef MTH_MEDIUM
#pragma message ("*** MTH : Precision conflict ! MTH_MEDIUM Disable")
#undef MTH_MEDIUM
#endif /* MTH_MEDIUM */
#pragma message ("*** MTH : Precision set to MTH_HIGH")
#define MTH_PrecisionFound
#endif /* MTH_HIGH */
/* === Default precision : */
#ifndef MTH_PrecisionFound
#define MTH_MEDIUM
/*
#pragma message ("*** MTH : Precision set to Default : MTH_LOW")
*/
#endif /* NOT MTH_PrecisionFound */
/* ##-###########################
## Detect Tagets
############################## */
/* Remark :
NO_ASSEMBLY_IN_GLI must disappear when all references are deleted in GLI
*/
/* The default machine is MTH_UNKOWN_DEV */
#define MTH_UNKOWN_DEV /* Default for Dev machine */
/* Detect PC Compilators */
#ifdef _MSC_VER
#ifndef VISUAL
#define VISUAL
#endif /* VISUAL undef */
#endif /* _MSC_VER */
#ifdef VISUAL
#undef MTH_UNKOWN_DEV
#define MTH_PC_DEV /* Default PC Dev machine */
#endif /* VISUAL */
#ifdef WATCOM
#undef MTH_UNKOWN_DEV
#define MTH_PC_DEV /* Default PC Dev machine */
#endif /* WATCOM */
/* Detect U64 Machine */
#ifdef U64
#undef MTH_UNKOWN_DEV
#undef MTH_PC_DEV
#define MTH_U64_DEV
#endif /* U64 */
/* Warning if Target not reconized : */
#ifdef MTH_UNKOWN_DEV
#pragma message ("*** MTH : !! ALERT !! Alien Target Machine Found (Unkown Target) !")
#pragma message ("*** VISUAL NOR WATCOM NOR U64 is defined ! Check your makefile please !")
#define MTH_RealIsFloat
#define NO_ASSEMBLY_IN_GLI
#endif /* MTH_UNKOWN_DEV */
/* =========== MTH_U64_DEV =============== */
/* Developing version. */
#ifdef MTH_U64_DEV
#define MTH_RealIsFloat
#define NO_ASSEMBLY_IN_GLI
#if defined(MTH_RealIsFloat) && !defined(ACTIVE_EDITOR)
#define OPTIMIZED_FOR_PC_FLOATS
#ifndef CODEWARRIOR_GCC
#define OPTIMIZED_FOR_U64_ASM
#endif
#endif
#endif /* MTH_U64_DEV */
/* =========== MTH_PC_DEV =============== */
/* Pentium computer with Win95 */
/* Developing version. */
#ifdef MTH_PC_DEV
/*#pragma message ("*** MTH : MTH_PC_DEV Defined")*/
#define MTH_RealIsFloat
/* ylt, always optimize (even with editors)*/
/*#if defined(MTH_RealIsFloat) && !defined(ACTIVE_EDITOR)*/
#define OPTIMIZED_FOR_PC_FLOATS
/*#pragma message ("*** MTH : OPTIMIZED_FOR_PC_FLOATS Defined")*/
#define OPTIMIZED_FOR_PC_FLOATS_WITH_ASM
/*#pragma message ("*** MTH : OPTIMIZED_FOR_PC_FLOATS_WITH_ASM Defined")*/
/*#endif*/
#define NO_ASSEMBLY_IN_GLI
#endif /* MTH_PC_DEV */
/* =========== MTH_PC_FINAL ============ */
/* Pentium computer with Win95 */
/* Final games version. => for GliGloo ONLY !!! Do Not Use !*/
#ifdef MTH_PC_FINAL
#define MTH_RealIsFloat
#endif /* MTH_PC_FINAL */
#define MTH_CALL /* __cdecl */
#endif /* MTH_DEF_H */