Gfx: Add #ifdef _MSC_VER, fix tiled rendering on windows
This only affects when using TILED_RENDERING
This commit is contained in:
parent
57dc0c25ff
commit
edf939e96b
|
@ -28,24 +28,57 @@ int gfxBG3Y = 0;
|
||||||
int gfxLastVCOUNT = 0;
|
int gfxLastVCOUNT = 0;
|
||||||
|
|
||||||
#ifdef TILED_RENDERING
|
#ifdef TILED_RENDERING
|
||||||
union uint8_th {
|
#ifdef _MSC_VER
|
||||||
struct
|
union uint8_th
|
||||||
{
|
{
|
||||||
/* 0*/ unsigned lo : 4;
|
__pragma( pack(push, 1));
|
||||||
/* 4*/ unsigned hi : 4;
|
struct
|
||||||
} __attribute__((packed));
|
{
|
||||||
uint8_t val;
|
#ifdef MSB_FIRST
|
||||||
|
/* 4*/ unsigned char hi:4;
|
||||||
|
/* 0*/ unsigned char lo:4;
|
||||||
|
#else
|
||||||
|
/* 0*/ unsigned char lo:4;
|
||||||
|
/* 4*/ unsigned char hi:4;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
__pragma(pack(pop));
|
||||||
|
uint8_t val;
|
||||||
};
|
};
|
||||||
|
#else // !_MSC_VER
|
||||||
|
union uint8_th
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
#ifdef MSB_FIRST
|
||||||
|
/* 4*/ unsigned char hi:4;
|
||||||
|
/* 0*/ unsigned char lo:4;
|
||||||
|
#else
|
||||||
|
/* 0*/ unsigned char lo:4;
|
||||||
|
/* 4*/ unsigned char hi:4;
|
||||||
|
#endif
|
||||||
|
} __attribute__ ((packed));
|
||||||
|
uint8_t val;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
union TileEntry {
|
union TileEntry
|
||||||
struct
|
{
|
||||||
{
|
struct
|
||||||
/* 0*/ unsigned tileNum : 10;
|
{
|
||||||
/*12*/ unsigned hFlip : 1;
|
#ifdef MSB_FIRST
|
||||||
/*13*/ unsigned vFlip : 1;
|
/*14*/ unsigned palette:4;
|
||||||
/*14*/ unsigned palette : 4;
|
/*13*/ unsigned vFlip:1;
|
||||||
};
|
/*12*/ unsigned hFlip:1;
|
||||||
uint16_t val;
|
/* 0*/ unsigned tileNum:10;
|
||||||
|
#else
|
||||||
|
/* 0*/ unsigned tileNum:10;
|
||||||
|
/*12*/ unsigned hFlip:1;
|
||||||
|
/*13*/ unsigned vFlip:1;
|
||||||
|
/*14*/ unsigned palette:4;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
uint16_t val;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TileLine {
|
struct TileLine {
|
||||||
|
|
Loading…
Reference in New Issue