mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-26 20:00:30 +00:00
e5ecdfd559
* `0` -> `CHEST_ANIM_SHORT` in `GET_ITEM` z_player macro * fix typos in z_en_skj Co-authored-by: Yanis42 <yalink88@gmail.com> * `unkSkjStruct` -> `EnSkjUnkStruct` * Use `EFFECT_SS_` enum in all `EffectSs_Spawn` calls * Decimal for all `EffectSs_Spawn` priorities * Use `OBJECT_INVALID` more * `Object_IsLoaded` returns a boolean * Add `@bug` in `DmaMgr_SendRequestImpl` about passing partially uninitialized struct * Fix typo `forc_structure_alignment` -> "force" * Move `CMD_F` to `z64cutscene_commands.h` since it is specifically for cutscene data * Use `ALIGN16` macro more * Use `ALIGN256` macro more * Add `@bug` on two messed up 8-bytes-aligns * Set `gSaveContext.nightFlag` to 0/1 instead of false/true * Use `IS_DAY` macro more * Run formatter Co-authored-by: Yanis42 <yalink88@gmail.com>
22 lines
650 B
C
22 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), halfwords (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
|