SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit b92dd51101f85854251c06bb364aa4679ecb02ea parent d92148b461649c28946b33d11a3b15a4c5aed9c1 Author: Lior Halphon <LIJI32@gmail.com> Date: Fri, 14 Jan 2022 22:23:30 +0200 Merge pull request #429 from orbea/pedantic Silence more -pedantic warnings Diffstat:
| M | Core/gb.h | 32 | +++++++++----------------------- |
1 file changed, 9 insertions(+), 23 deletions(-)
diff --git a/Core/gb.h b/Core/gb.h @@ -36,6 +36,8 @@ #define GB_MODEL_PAL_BIT 0x40 #define GB_MODEL_NO_SFC_BIT 0x80 +#define GB_REWIND_FRAMES_PER_KEY 255 + #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #define GB_BIG_ENDIAN #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ @@ -44,6 +46,11 @@ #error Unable to detect endianess #endif +#ifdef GB_BIG_ENDIAN +#define GB_REGISTER_ORDER a,f,b,c,d,e,h,l; +#else +#define GB_REGISTER_ORDER f,a,c,b,e,d,l,h; +#endif typedef struct { struct GB_color_s { @@ -335,17 +342,7 @@ typedef union { pc; }; struct { -#ifdef GB_BIG_ENDIAN - uint8_t a, f, - b, c, - d, e, - h, l; -#else - uint8_t f, a, - c, b, - e, d, - l, h; -#endif + uint8_t GB_REGISTER_ORDER }; } GB_registers_t; @@ -383,17 +380,7 @@ struct GB_gameboy_internal_s { pc; }; struct { -#ifdef GB_BIG_ENDIAN - uint8_t a, f, - b, c, - d, e, - h, l; -#else - uint8_t f, a, - c, b, - e, d, - l, h; -#endif + uint8_t GB_REGISTER_ORDER }; }; uint8_t ime; @@ -743,7 +730,6 @@ struct GB_gameboy_internal_s { const char *undo_label; /* Rewind */ -#define GB_REWIND_FRAMES_PER_KEY 255 size_t rewind_buffer_length; struct { uint8_t *key_state;
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.