mirror of
https://github.com/zeldaret/mm.git
synced 2024-11-27 06:40:36 +00:00
a8c7a5bb89
* Bring over new stuff from player.h * door type * PlayerModelGroup * CSMODE * PLAYER_PARAMS * functions.h * item.h * a * format * ED * stuff * Magic_Reset * bodyPartsPos * format * review Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * format * params and fixes * GetItemId * yes * 2 * warnning * closestSecretDistSq Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * Name the other PLAYER_DOORTYPE * review Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> * remove pyelftools * PlayerActionParam Player_GetExchangeItemId * Update include/z64animation.h Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * bss * bss * fix linkanimation warning * bss * bss * format * fix * namefixer * format * fix * fixes * namefixer * bss * fixes Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com>
29 lines
661 B
C
29 lines
661 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
|
|
|
|
#ifdef __sgi /* IDO compiler */
|
|
#define ALIGNOF(x) __builtin_alignof(x)
|
|
#elif (__STDC_VERSION__ >= 201112L) /* C11 */
|
|
#define ALIGNOF(x) _Alignof(x)
|
|
#else /* __GNUC__ */
|
|
#define ALIGNOF(x) __alignof__(x)
|
|
#endif
|
|
|
|
#define ALIGN_MASK(n) (~((n) - 1))
|
|
|
|
#define ALIGNOF_MASK(x) ALIGN_MASK(ALIGNOF(x))
|
|
|
|
#endif
|