mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-11 03:39:59 +00:00
e3f1ccd902
* Fix all headers to comply with C standard * fix a file in libultra * Update include/stdbool.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Update stdbool.h * Update z64animation.h Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
21 lines
650 B
C
21 lines
650 B
C
#ifndef COMMAND_MACROS_BASE_H
|
|
#define COMMAND_MACROS_BASE_H
|
|
|
|
/**
|
|
* Command Base macros intended for use in designing of more specific command macros
|
|
* Each macro packs bytes (B), halfowrds (H) and words (W, for consistency) into a single word
|
|
*/
|
|
|
|
#define CMD_BBBB(a, b, c, d) (_SHIFTL(a, 24, 8) | _SHIFTL(b, 16, 8) | _SHIFTL(c, 8, 8) | _SHIFTL(d, 0, 8))
|
|
|
|
#define CMD_BBH(a, b, c) (_SHIFTL(a, 24, 8) | _SHIFTL(b, 16, 8) | _SHIFTL(c, 0, 16))
|
|
|
|
#define CMD_HBB(a, b, c) (_SHIFTL(a, 16, 16) | _SHIFTL(b, 8, 8) | _SHIFTL(c, 0, 8))
|
|
|
|
#define CMD_HH(a, b) (_SHIFTL(a, 16, 16) | _SHIFTL(b, 0, 16))
|
|
|
|
#define CMD_W(a) (a)
|
|
|
|
#define CMD_PTR(a) (u32)(a)
|
|
|
|
#endif
|