diff options
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/common.h b/src/core/common.h index da162762..9d3bca67 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -116,10 +116,8 @@ typedef ptrdiff_t ssize_t; #include "config.h" -#ifdef PED_SKIN #include <rphanim.h> #include <rpskin.h> -#endif #ifdef __GNUC__ #define TYPEALIGN(n) __attribute__ ((aligned (n))) @@ -148,7 +146,7 @@ inline uint32 ldb(uint32 p, uint32 s, uint32 w) #include "skeleton.h" #include "Draw.h" -#if defined(PROPER_SCALING) || defined(PS2_HUD) +#if defined(PROPER_SCALING) #ifdef FORCE_PC_SCALING #define DEFAULT_SCREEN_WIDTH (640) #define DEFAULT_SCREEN_HEIGHT (448) @@ -286,12 +284,15 @@ public: #if (defined(_MSC_VER)) extern int strcasecmp(const char *str1, const char *str2); +extern int strncasecmp(const char *str1, const char *str2, size_t len); #endif extern wchar *AllocUnicode(const char*src); #define Clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v)) +#define Clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius)) + inline float sq(float x) { return x*x; } #define SQR(x) ((x) * (x)) @@ -393,3 +394,4 @@ template<int s, int t> struct check_size { #define STR(x) STRINGIFY(x) #define CONCAT_(x,y) x##y #define CONCAT(x,y) CONCAT_(x,y) + |