mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-25 17:54:15 +00:00
8926b08582
* Force dword alignment on OSPifRam * force_structure_alignment on each Font buffer * Add ALIGNED8 macro to gSaveContext to ensure alignment * create alignment.h header and use ALIGN8 in PLAYER_LIMB_BUF_COUNT * add comment in common_data * Roman's suggestion * player_limb_buf_count Co-authored-by: fig02 <fig02srl@gmail.com>
16 lines
365 B
C
16 lines
365 B
C
#ifndef ALIGNMENT_H
|
|
#define ALIGNMENT_H
|
|
|
|
#define ALIGN8(val) (((val) + 7) & ~7)
|
|
#define ALIGN16(val) (((val) + 0xF) & ~0xF)
|
|
#define ALIGN32(val) (((val) + 0x1F) & ~0x1F)
|
|
#define ALIGN64(val) (((val) + 0x3F) & ~0x3F)
|
|
#define ALIGN256(val) (((val) + 0xFF) & ~0xFF)
|
|
|
|
#ifdef __GNUC__
|
|
#define ALIGNED8 __attribute__ ((aligned (8)))
|
|
#else
|
|
#define ALIGNED8
|
|
#endif
|
|
|
|
#endif
|