#define SWAP16(x) ({ uint16_t y=(x); (((y)>>8 & 0xff) | ((y)<<8 & 0xff00)); })
#define SWAP32(x) ({ uint32_t y=(x); (((y)>>24 & 0xfful) | ((y)>>8 & 0xff00ul) | ((y)<<8 & 0xff0000ul) | ((y)<<24 & 0xff000000ul)); })
-#ifdef __BIG_ENDIAN__
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
// big endian config
#define HOST2LE32(x) SWAP32(x)
typedef struct TWINTAG
{
PSXRect_t Position;
+ int xmask, ymask;
} TWin_t;
/////////////////////////////////////////////////////////////////////////////
// draw.c
extern int32_t GlobalTextAddrX,GlobalTextAddrY,GlobalTextTP;
-extern int32_t GlobalTextREST,GlobalTextABR,GlobalTextPAGE;
+extern int32_t GlobalTextABR,GlobalTextPAGE;
extern short ly0,lx0,ly1,lx1,ly2,lx2,ly3,lx3;
extern long lLowerpart;
extern BOOL bCheckMask;
#define KEY_BADTEXTURES 128
#define KEY_CHECKTHISOUT 256
-#if !defined(__BIG_ENDIAN__) || defined(__x86_64__) || defined(__i386__)
-#ifndef __LITTLE_ENDIAN__
-#define __LITTLE_ENDIAN__
-#endif
-#endif
-
-#ifdef __LITTLE_ENDIAN__
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define RED(x) (x & 0xff)
#define BLUE(x) ((x>>16) & 0xff)
#define GREEN(x) ((x>>8) & 0xff)
#define COLOR(x) (x & 0xffffff)
-#elif defined __BIG_ENDIAN__
+#else
#define RED(x) ((x>>24) & 0xff)
#define BLUE(x) ((x>>8) & 0xff)
#define GREEN(x) ((x>>16) & 0xff)
unsigned long ulInitDisplay(void);
void CloseDisplay(void);
+struct rearmed_cbs;
+extern const struct rearmed_cbs *rcbs;
+
#endif