Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
macros.h File Reference

Go to the source code of this file.

Macros

#define BSS   __attribute__ ((nocommon, section (".bss")))
 
#define TRANSPARENT_UNION   __attribute__ ((__transparent_union__))
 
#define ALIGNED(x)   __attribute__((aligned(x)))
 
#define OSALIGNED(x)   ALIGNED(x)
 
#define BBALIGNED(x)   ALIGNED(x)
 
#define ALIGN16(val)   (((val) + 0xF) & ~0xF)
 
#define ALIGN8(val)   (((val) + 0x7) & ~0x7)
 
#define EXTERN_C   extern
 
#define NAME_SUFFIX
 
#define NAME_PREFIX
 
#define A(sym)   NS(AREA, NAME_PREFIX, sym, NAME_SUFFIX)
 
#define ARRAY_COUNT(arr)   (s32)(sizeof(arr) / sizeof(arr[0]))
 
#define PTR_LIST_END   ((void*) -1)
 
#define PHYSICAL_TO_VIRTUAL(addr)   (void*)((u32)(addr) + 0x80000000)
 
#define VIRTUAL_TO_PHYSICAL(addr)   (u32)((u8*)(addr) - 0x80000000)
 
#define IS_DEBUG_PANIC(statement)   is_debug_panic(statement)
 
#define PANIC()   IS_DEBUG_PANIC("Panic")
 
#define PANIC_MSG(msg, args...)
 
#define ASSERT(condition)
 
#define ASSERT_MSG(condition, msg, args...)
 
#define BADGE_MENU_PAGE(index)   (&gPauseBadgesPages[index])
 
#define ITEM_MENU_PAGE(index)   (&gPauseItemsPages[index])
 
#define MENU_PANEL_SELECTED_GRID_DATA(panel)
 
#define MAX_MAPVARS   16
 
#define MAX_MAPFLAGS   3
 
#define MAX_ENEMY_ACTORS   24
 
#define MAX_ANIMATED_MODELS   16
 
#define MAX_ANIMATED_MESHES   16
 
#define MAX_ENTITY_MODELS   256
 
#define MAX_MODELS   256
 
#define MAX_MODEL_TRANSFORM_GROUPS   4
 
#define MAX_SCRIPTS   128
 
#define MAX_NPCS   64
 
#define MAX_TRIGGERS   64
 
#define MAX_SHADOWS   60
 
#define MAX_ENTITIES   30
 
#define MAX_WORKERS   16
 
#define MAX_TEX_PANNERS   16
 
#define MAX_ITEM_ENTITIES   256
 
#define MAX_IMGFX_INSTANCES   90
 
#define MAX_STAR_PIECES   222
 
#define SP_PER_BAR   256
 
#define SP_PER_SEG   32
 
#define SCREEN_WIDTH   320
 
#define SCREEN_HEIGHT   240
 
#define LAST_DEMO_SCENE_IDX   18
 
#define WORLD_ENTITY_HEAP_SIZE   0x17FF0
 
#define COLLISION_HEAP_SIZE   0x18000
 
#define GENERAL_HEAP_SIZE   0x54000
 
#define SPRITE_HEAP_SIZE   0x60000
 
#define BATTLE_HEAP_SIZE   0x25800
 
#define FRAME_BUFFER_SIZE   0x25800
 
#define CAM_NEAR_CLIP   16
 
#define CAM_FAR_CLIP   4096
 
#define TMEM_SIZE   0x1000
 
#define SCREEN_COPY_TILE_HEIGHT   ((TMEM_SIZE) / ((SCREEN_WIDTH) * (2)))
 
#define PI   3.141592f
 
#define PI_D   3.141592
 
#define TAU   6.28318f
 
#define PI_S   3.14159f
 
#define DEG_TO_BINANG(x)   ((x) * (0x8000 / 180.0f))
 
#define RAD_TO_BINANG(x)   ((x) * (f32)(0x8000 / M_PI))
 
#define DEG_TO_RAD(deg)   (((deg) * TAU) / 360.0f)
 
#define SHT_MINV   3.051851e-05
 
#define SPRITE_WORLD_SCALE_F   (5.0f/7.0f)
 
#define SPRITE_WORLD_SCALE_D   (5.0/7.0)
 
#define SPR_PAL_SIZE   16
 
#define BATTLE_ID_BIT   0x800
 
#define BATTLE_NPC_ID_BIT   0x800
 
#define BATTLE_ENTITY_ID_BIT   0x800
 
#define UNPACK_BTL_AREA(battleID)   (((battleID) >> 8) & 0xFF)
 
#define UNPACK_BTL_INDEX(battleID)   ((battleID) & 0xFF)
 
#define COLLISION_WITH_NPC_BIT   0x2000
 
#define COLLISION_WITH_ENTITY_BIT   0x4000
 
#define ENTITY_COLLIDER_ID(entityIndex)   (entityIndex | COLLISION_WITH_ENTITY_BIT)
 
#define NO_COLLIDER   -1
 
#define NPC_DISPOSE_LOCATION   0,-1000,0
 
#define NPC_DISPOSE_POS_X   0
 
#define NPC_DISPOSE_POS_Y   -1000
 
#define NPC_DISPOSE_POS_Z   0
 
#define PACK_FILL_COLOR(r, g, b, a)   (GPACK_RGBA5551(r, g, b, a) << 0x10) | GPACK_RGBA5551(r, g, b, a)
 
#define PACK_FILL_DEPTH(z, dz)   (GPACK_ZDZ(z, dz) << 0x10) | GPACK_ZDZ(z, dz)
 
#define SQ(x)   ((x) * (x))
 
#define CUBE(x)   ((x) * (x) * (x))
 
#define QUART(x)   ((x) * (x) * (x) * (x))
 
#define F16(f)   (s16)(f * 327.67f)
 Fixed-point short literal.
 
#define X10(f)   (s32)(f * 1024.0f)
 X.10 fixed-point literal.
 
#define _NS(w, x, y, z)   w ## _ ## x ## y ## z
 
#define NS(w, x, y, z)   _NS(w, x, y, z)
 
#define ASCII_TO_U32(a, b, c, d)   ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))
 
#define ITEM_VIS_GROUP(itemID, visGroupID)   ((visGroupID) << 16 | (itemID))
 
#define PACK_ROOM_FLAGS(itemVisGroup, roomFlags)   ((itemVisGroup) << 12 | (roomFlags))
 
#define LOAD_INTEGRATOR_FALL(ptr)
 
#define AI_TEMP_STATE   functionTemp[0]
 
#define AI_TEMP_STATE_AFTER_SUSPEND   functionTemp[1]
 
#define AI_PATROL_GOAL_INDEX   functionTemp[2]
 
#define AI_VAR_ATTACK_STATE   varTable[0]
 
#define AI_VAR_MELEE_PRE_TIME   varTable[1]
 
#define AI_VAR_MELEE_HIT_TIME   varTable[2]
 
#define AI_VAR_MELEE_MISS_TIME   varTable[3]
 
#define AI_VAR_NEXT_STATE   varTable[7]
 
#define AI_VAR_HITNPC_YOFFSET   varTable[0]
 
#define AI_VAR_HITNPC_DIST   varTable[1]
 
#define AI_VAR_HITNPC_2   varTable[2]
 
#define AI_VAR_HITNPC_3   varTable[3]
 
#define AI_VAR_HITNPC_4   varTable[4]
 
#define AI_VAR_HITNPC_SOUND   varTable[15]
 
#define VAR_PROJECTILE_HITBOX_STATE   varTable[0]
 
#define AI_PROJECTILE_AMMO_COUNT   varTable[3]
 
#define INTEGER_LOG2(x)   ((x) <= 2 ? 1 : (x) <= 4 ? 2 : (x) <= 8 ? 3 : (x) <= 16 ? 4 : (x) <= 32 ? 5 : (x) <= 64 ? 6 : (x) <= 128 ? 7 : (x) <= 256 ? 8 : (x) <= 512 ? 9 : 10)
 
#define FOLIAGE_MODEL_LIST(names...)
 
#define STATUS_KEY_IGNORE_RES   0xFE
 
#define STATUS_KEY_NEVER   0xFF
 
#define DMG_STATUS_KEY(typeFlag, duration, chance)   (STATUS_FLAG_80000000 | typeFlag | (duration << 8) | chance)
 
#define DMG_STATUS_ALWAYS(typeFlag, duration)   (STATUS_FLAG_80000000 | STATUS_FLAG_RIGHT_ON | typeFlag | (duration << 8))
 
#define DMG_STATUS_IGNORE_RES(typeFlag, duration)   (STATUS_KEY_IGNORE_RES | typeFlag | (duration << 8))
 
#define _RDP_WHOLE(x)   (((s32)(x * 65536.0) >> 16) & 0xFFFF)
 
#define _RDP_FRAC(x)   ((s32)(x * 65536.0) & 0xFFFF)
 
#define _RDP_PACK_WHOLE(a, b)   (_RDP_WHOLE(a) << 16) | _RDP_WHOLE(b)
 
#define _RDP_PACK_FRAC(a, b)   (_RDP_FRAC(a) << 16) | _RDP_FRAC(b)
 
#define RDP_MATRIX( Ax, Bx, Cx, Dx, Ay, By, Cy, Dy, Az, Bz, Cz, Dz, Aw, Bw, Cw, Dw)
 
#define UNPACK_PAL_R(color)   (((color) >> 11) & 0x1F)
 
#define UNPACK_PAL_G(color)   (((color) >> 6) & 0x1F)
 
#define UNPACK_PAL_B(color)   (((color) >> 1) & 0x1F)
 
#define UNPACK_PAL_A(color)   ((color) & 1)
 
#define PACK_PAL_RGBA(r, g, b, a)   (((r) << 11) | ((g) << 6) | ((b) << 1) | (a));
 
#define PM_RM_SHROUD   GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA)
 
#define PM_CC_01   0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC_02   0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0
 
#define PM_CC_03   TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0
 
#define PM_CC_04   PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0
 
#define PM_CC_05   TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0
 
#define PM_CC_06   COMBINED, 0, PRIMITIVE_ALPHA, 0, 0, 0, 0, COMBINED
 
#define PM_CC_07   0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0
 
#define PM_CC_PRIM_FULL_ALPHA   0, 0, 0, PRIMITIVE, 0, 0, 0, 1
 
#define PM_CC_PRIM_NO_ALPHA   0, 0, 0, PRIMITIVE, 0, 0, 0, 0
 
#define PM_CC_0A   0, 0, 0, 0, ENVIRONMENT, 0, TEXEL0, 0
 
#define PM_CC_0B   0, 0, 0, 0, ENVIRONMENT, 0, TEXEL1, 0
 
#define PM_CC_0D   0, 0, 0, 0, SHADE, 0, TEXEL1, 0
 
#define PM_CC_0C   0, 0, 0, 0, 0, 0, 0, COMBINED
 
#define PM_CC_0E   0, 0, 0, TEXEL0, 0, 0, 0, 0
 
#define PM_CC_0F   0, 0, 0, TEXEL0, 0, 0, 0, 1
 
#define PM_CC_10   0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE
 
#define PM_CC_11   0, 0, 0, TEXEL0, SHADE, 0, TEXEL0, 0
 
#define PM_CC_12   0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0
 
#define PM_CC_MSG_UP_ARROW
 
#define PM_CC_14   PRIMITIVE, ENVIRONMENT, TEXEL1, ENVIRONMENT, PRIMITIVE, 0, TEXEL1, 0
 
#define PM_CC_15   PRIMITIVE, ENVIRONMENT, TEXEL1, ENVIRONMENT, 0, 0, 0, TEXEL1
 
#define PM_CC2_MULTIPLY_PRIM   COMBINED, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED
 
#define PM_CC2_MULTIPLY_SHADE   COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED
 
#define PM_CC_NOISE   NOISE, 0, SHADE_ALPHA, 0, 0, 0, 0, 1
 
#define PM_CC_1A   TEXEL0, 0, PRIMITIVE_ALPHA, PRIMITIVE, 0, 0, 0, TEXEL0
 
#define PM_CC_TINT_DEPTH_NOTEX
 
#define PM_CC_TINT_DEPTH_NO_SHADE
 
#define PM_CC_20
 
#define PM_CC_TINT_DEPTH_MIPMAPS
 
#define PM_CC_TINT_REMAP_NOTEX
 
#define PM_CC_TINT_REMAP_NO_SHADE
 
#define PM_CC_TINT_REMAP_SHADE_ALPHA
 
#define PM_CC_22   TEXEL0, TEXEL1, SHADE_ALPHA, TEXEL1, 0, 0, 0, TEXEL0
 
#define PM_CC_23   1, TEXEL0, PRIMITIVE, TEXEL0, 0, 0, 0, TEXEL0
 
#define PM_CC1_24   1, TEXEL0, PRIMITIVE, TEXEL0, 1, TEXEL0, TEXEL1, TEXEL0
 
#define PM_CC2_24   1, TEXEL1, TEXEL0, COMBINED, 0, 0, 0, COMBINED
 
#define PM_CC_TEX_COMBINE_3A   0, 0, 0, 0, TEXEL0, TEXEL1, SHADE, 0
 
#define PM_CC_TEX_COMBINE_3B   0, 0, 0, SHADE, 0, 0, 0, COMBINED
 
#define PM_CC_TEX_COMBINE_3C   SHADE, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, COMBINED
 
#define PM_CC1_29   TEXEL0, SHADE, TEXEL0, TEXEL0, 1, TEXEL1, TEXEL0, TEXEL1
 
#define PM_CC2_29   TEXEL0, COMBINED, TEXEL0_ALPHA, TEXEL0, 1, TEXEL0, TEXEL1, TEXEL0
 
#define PM_CC_ALT_INTERFERENCE
 
#define PM_CC_2B   PRIMITIVE, 0, TEXEL1, 0, 0, 0, 0, TEXEL1
 
#define PM_CC_2C   PRIMITIVE, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0
 
#define PM_CC_2D   PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0
 
#define PM_CC_2E   0, 0, 0, TEXEL0, TEXEL1, 0, PRIMITIVE, 0
 
#define PM_CC_2F   PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC_32   PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0
 
#define PM_CC_33   ENVIRONMENT, PRIMITIVE, COMBINED, PRIMITIVE, COMBINED, 0, PRIMITIVE, 0
 
#define PM_CC_34   TEXEL0, CENTER, SCALE, ENVIRONMENT, 0, 0, 0, TEXEL0
 
#define PM_CC_35   0, PRIMITIVE, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED
 
#define PM_CC_36   TEXEL0, TEXEL1, TEXEL0, TEXEL1, 1, TEXEL0, TEXEL1, 1
 
#define PM_CC_37   0, 0, 0, COMBINED, COMBINED, TEXEL1, TEXEL1, TEXEL1
 
#define PM_CC_38   TEXEL1, K4, PRIMITIVE_ALPHA, TEXEL0, TEXEL0, TEXEL1, ENVIRONMENT, ENVIRONMENT
 
#define PM_CC_39   TEXEL1, K4, COMBINED_ALPHA, COMBINED, 0, 0, 0, 1
 
#define PM_CC_3A   0, 0, 0, PRIMITIVE, 1, TEXEL0, PRIMITIVE, TEXEL0
 
#define PM_CC_SCREEN_OVERLAY
 
#define PM_CC_3C   0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0
 
#define PM_CC_3D   SHADE, ENVIRONMENT, TEXEL0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC_3F   TEXEL0, 0, SHADE, 0, SHADE, 0, PRIMITIVE, 0
 
#define PM_CC_RESET_TILES   0, 0, 0, 0, 0, 0, 0, TEXEL0
 
#define PM_CC_FLOWER_GATE_GLOW   0, 0, 0, 1, SHADE, 0, PRIMITIVE, 0
 
#define PM_CC_KKJ_SPILL_LIGHT   TEXEL0, 0, SHADE, 0, 0, 0, 0, PRIMITIVE
 
#define PM_CC_KKJ14_FIRE   0, 0, 0, COMBINED, 0, 0, 0, PRIMITIVE
 
#define PM_CC_DAMAGE_INDICATOR   1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC1_SHADOW   0, 0, 0, 0, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC2_SHADOW   0, 0, 0, 0, TEXEL0, 0, PRIMITIVE, 0
 
#define PM_CC_WINDOW_2   PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, TEXEL1
 
#define PM_CC_WINDOW_3   PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL1, 0
 
#define PM_CC_WINDOW_4   PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE
 
#define PM_CC_WINDOW_5   0, 0, 0, TEXEL1, 0, 0, 0, TEXEL1
 
#define PM_CC_WINDOW_6   0, 0, 0, TEXEL1, PRIMITIVE, 0, TEXEL1, 0
 
#define PM_CC_WINDOW_7   PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, 1
 
#define PM_CC_WINDOW_1   COMBINED, 0, TEXEL0, 0, 0, 0, 0, COMBINED
 
#define PM_CC_IMGFX_COLOR_FILL   0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0
 
#define PM_CC_IMGFX_HOLOGRAM   NOISE, PRIMITIVE, PRIMITIVE, TEXEL0, TEXEL0, 0, PRIMITIVE, 0
 
#define PM_CC_MSG_NOISE_OUTLINE   NOISE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0
 
#define PM_CC_MSG_STATIC   NOISE, TEXEL0, ENVIRONMENT, TEXEL0, 0, 0, 0, TEXEL0
 
#define PM_CC_CANDLE_1   TEXEL0, TEXEL1, TEXEL0, 1, 1, TEXEL0, TEXEL1, 1
 
#define PM_CC_CANDLE_2   0, PRIMITIVE, COMBINED, ENVIRONMENT, COMBINED, TEXEL1, TEXEL1, TEXEL1
 
#define PM_CC_BOX1_OPAQUE   TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL1
 
#define PM_CC_BOX2_OPAQUE   TEXEL0, 0, TEXEL1, 0, 0, 0, 0, TEXEL1
 
#define PM_CC_BOX1_TRANSPARENT   TEXEL0, 0, PRIMITIVE, 0, TEXEL1, 0, PRIMITIVE, 0
 
#define PM_CC_BOX2_TRANSPARENT   TEXEL0, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0
 
#define PM_CC_BOX1_CYC2   TEXEL0, ENVIRONMENT, ENV_ALPHA, COMBINED, 0, 0, 0, COMBINED
 
#define PM_CC_BOX2_CYC2   PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED
 
#define PM_CC_30   1, 0, TEXEL1, 0, 0, 0, 0, TEXEL1
 
#define PM_CC_31   1, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0
 
#define PM_CC_42   TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0
 
#define PM_CC_43   PRIMITIVE, TEXEL0, PRIMITIVE_ALPHA, TEXEL0, 0, 0, 0, 1
 
#define PM_CC_44   PRIMITIVE, TEXEL1, PRIMITIVE_ALPHA, TEXEL1, 0, 0, 0, 1
 
#define PM_CC_45   TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC_46   TEXEL0, ENVIRONMENT, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC_47   TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC_48   PRIMITIVE, 0, PRIMITIVE_ALPHA, TEXEL0, 0, 0, 0, SHADE
 
#define PM_CC_49   TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC_4A   TEXEL1, TEXEL0, ENV_ALPHA, TEXEL0, TEXEL1, TEXEL0, ENVIRONMENT, TEXEL0
 
#define PM_CC_4B   PRIMITIVE, CENTER, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED
 
#define PM_CC_4C   1, COMBINED, PRIMITIVE, COMBINED, 0, 0, 0, COMBINED
 
#define PM_CC_4D   ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0
 
#define PM_CC_4E   SHADE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, SHADE, 0
 
#define PM_CC_4F   0, 0, 0, COMBINED, COMBINED, 0, PRIMITIVE, 0
 
#define PM_CC_50   TEXEL0, 0, TEXEL1, 0, 0, 0, 0, TEXEL1
 
#define PM_CC_51   TEXEL0, 0, TEXEL1, 0, PRIMITIVE, 0, TEXEL1, 0
 
#define PM_CC_52   SHADE, ENVIRONMENT, COMBINED, COMBINED, 0, 0, 0, COMBINED
 
#define PM_CC_53   TEXEL1, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0
 
#define PM_CC_54   COMBINED, TEXEL0, COMBINED_ALPHA, TEXEL0, PRIMITIVE, 0, TEXEL0, 0
 
#define PM_CC_55   PRIMITIVE, ENVIRONMENT, TEXEL0_ALPHA, ENVIRONMENT, 0, 0, 0, 1
 
#define PM_CC_56   0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0
 
#define PM_CC_57   1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE
 
#define PM_CC_58   0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE
 
#define PM_CC_59   0, 0, 0, 0, SHADE, 0, TEXEL0, 0
 
#define PM_CC_5A   SHADE, ENVIRONMENT, TEXEL0, TEXEL0, 0, 0, 0, TEXEL0
 
#define PM_CC_5B   1, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0
 
#define PM_CC_5C   1, 0, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0
 
#define PM_CC_5D   1, SHADE, TEXEL0, SHADE, 0, 0, 0, TEXEL0
 
#define PM_CC_5E   1, SHADE, TEXEL0, SHADE, TEXEL0, 0, SHADE, 0
 
#define PM_CC_HOS_BG_SHADE   0, 0, 0, SHADE, SHADE, 0, PRIMITIVE, 0
 
#define PM_CC_CONST_ALPHA_1   0, 0, 0, 0, 0, 0, 0, 1
 
#define PM_CC_CONST_0   0, 0, 0, 0, 0, 0, 0, 0
 
#define PM_CC_CONST_1   0, 0, 0, 1, 0, 0, 0, 1
 
#define VLA
 
#define DT   (1.0f)
 
#define DMA_COPY_SEGMENT(segment)   dma_copy(segment##_ROM_START, segment##_ROM_END, segment##_VRAM)
 
#define NODISCARD
 
#define UNUSED
 
#define NORETURN
 
#define ALWAYS_INLINE   inline
 
#define FALL_THROUGH
 
#define OPTIMIZE_OG
 
#define OPTIMIZE_OS
 
#define OPTIMIZE_OFAST
 
#define PACKED
 
#define ALIGNED4
 
#define ALIGNED8
 
#define ALIGNED16
 
#define ALIGNED32
 
#define ALIGNED64
 
#define EVT_LOCAL_VAR_CUTOFF   -20000000
 Expressions in EVT instructions should be one of the following types:
 
#define EVT_LOCAL_VAR_OFFSET   30000000
 
#define EVT_MAP_VAR_CUTOFF   -40000000
 
#define EVT_MAP_VAR_OFFSET   50000000
 
#define EVT_LOCAL_FLAG_CUTOFF   -60000000
 
#define EVT_LOCAL_FLAG_OFFSET   70000000
 
#define EVT_MAP_FLAG_CUTOFF   -80000000
 
#define EVT_MAP_FLAG_OFFSET   90000000
 
#define EVT_AREA_FLAG_CUTOFF   -100000000
 
#define EVT_AREA_FLAG_OFFSET   110000000
 
#define EVT_GAME_FLAG_CUTOFF   -120000000
 
#define EVT_GAME_FLAG_OFFSET   130000000
 
#define EVT_AREA_BYTE_CUTOFF   -140000000
 
#define EVT_AREA_BYTE_OFFSET   150000000
 
#define EVT_GAME_BYTE_CUTOFF   -160000000
 
#define EVT_GAME_BYTE_OFFSET   170000000
 
#define EVT_ARRAY_VAR_CUTOFF   -180000000
 
#define EVT_ARRAY_VAR_OFFSET   190000000
 
#define EVT_ARRAY_FLAG_CUTOFF   -200000000
 
#define EVT_ARRAY_FLAG_OFFSET   210000000
 
#define EVT_FIXED_CUTOFF   -220000000
 
#define EVT_FIXED_OFFSET   230000000
 
#define EVT_IGNORE_ARG   -250000000
 
#define EVT_LIMIT   -270000000
 
#define FLOAT_ROUND(x)   ((x) >=0 ? (f64)((x) + 0.9) : (f64)(x))
 
#define Float(DOUBLE)   ((Bytecode)FLOAT_ROUND(((DOUBLE) * 1024.0f)) - EVT_FIXED_OFFSET)
 
#define EVT_FIXED_TO_FLOAT(x)   ({f32 var = (x) + EVT_FIXED_OFFSET; var /= 1024.0f; var;})
 Progammatically converts Float --> f32.
 
#define FLOAT_TO_FIXED(x)   (((x) * 1024.0f) + -EVT_FIXED_OFFSET)
 Progammatically converts f32 --> Float.
 
#define Ref(sym)   ((Bytecode) &(sym))
 Address/pointer constant.
 
#define LocalVar(INDEX)   ((INDEX) - EVT_LOCAL_VAR_OFFSET)
 Local Word.
 
#define MapVar(INDEX)   ((INDEX) - EVT_MAP_VAR_OFFSET)
 Global Word.
 
#define LocalFlag(INDEX)   ((INDEX) - EVT_LOCAL_FLAG_OFFSET)
 Local Flag.
 
#define MapFlag(INDEX)   ((INDEX) - EVT_MAP_FLAG_OFFSET)
 Global Flag.
 
#define AreaFlag(INDEX)   ((INDEX) - EVT_AREA_FLAG_OFFSET)
 Local Save World Flag.
 
#define GameFlag(INDEX)   ((INDEX) - EVT_GAME_FLAG_OFFSET)
 Global Save World Flag.
 
#define AreaByte(INDEX)   ((INDEX) - EVT_AREA_BYTE_OFFSET)
 Local Saved Byte.
 
#define GameByte(INDEX)   ((INDEX) - EVT_GAME_BYTE_OFFSET)
 Global Saved Byte.
 
#define ArrayVar(INDEX)   ((INDEX) - EVT_ARRAY_VAR_OFFSET)
 User Word.
 
#define ArrayFlag(INDEX)   ((INDEX) - EVT_ARRAY_FLAG_OFFSET)
 User Flag.
 
#define EVT_ENTITY_ID_BIT   0x4000
 An entity index.
 
#define EVT_ENTITY_INDEX(entityIndex)   ((entityIndex) + EVT_ENTITY_ID_BIT)
 
#define EVT_INDEX_OF_LOCAL_VAR(v)   ((v) + EVT_LOCAL_VAR_OFFSET)
 
#define EVT_INDEX_OF_LOCAL_FLAG(v)   ((v) + EVT_LOCAL_FLAG_OFFSET)
 
#define EVT_INDEX_OF_MAP_VAR(v)   ((v) + EVT_MAP_VAR_OFFSET)
 
#define EVT_INDEX_OF_MAP_FLAG(v)   ((v) + EVT_MAP_FLAG_OFFSET)
 
#define EVT_INDEX_OF_AREA_FLAG(v)   ((v) + EVT_AREA_FLAG_OFFSET)
 
#define EVT_INDEX_OF_AREA_BYTE(v)   ((v) + EVT_AREA_BYTE_OFFSET)
 
#define EVT_INDEX_OF_GAME_FLAG(v)   ((v) + EVT_GAME_FLAG_OFFSET)
 
#define EVT_INDEX_OF_GAME_BYTE(v)   ((v) + EVT_GAME_BYTE_OFFSET)
 
#define EVT_INDEX_OF_ARRAY_FLAG(v)   ((v) + EVT_ARRAY_FLAG_OFFSET)
 
#define EVT_INDEX_OF_ARRAY_VAR(v)   ((v) + EVT_ARRAY_VAR_OFFSET)
 
#define LVar0   LocalVar(0)
 
#define LVar1   LocalVar(1)
 
#define LVar2   LocalVar(2)
 
#define LVar3   LocalVar(3)
 
#define LVar4   LocalVar(4)
 
#define LVar5   LocalVar(5)
 
#define LVar6   LocalVar(6)
 
#define LVar7   LocalVar(7)
 
#define LVar8   LocalVar(8)
 
#define LVar9   LocalVar(9)
 
#define LVarA   LocalVar(10)
 
#define LVarB   LocalVar(11)
 
#define LVarC   LocalVar(12)
 
#define LVarD   LocalVar(13)
 
#define LVarE   LocalVar(14)
 
#define LVarF   LocalVar(15)
 
#define LFlag0   LocalFlag(0)
 
#define LFlag1   LocalFlag(1)
 
#define LFlag2   LocalFlag(2)
 
#define LFlag3   LocalFlag(3)
 
#define LFlag4   LocalFlag(4)
 
#define LFlag5   LocalFlag(5)
 
#define LFlag6   LocalFlag(6)
 
#define LFlag7   LocalFlag(7)
 
#define LFlag8   LocalFlag(8)
 
#define LFlag9   LocalFlag(9)
 
#define LFlagA   LocalFlag(10)
 
#define LFlagB   LocalFlag(11)
 
#define LFlagC   LocalFlag(12)
 
#define LFlagD   LocalFlag(13)
 
#define LFlagE   LocalFlag(14)
 
#define LFlagF   LocalFlag(15)
 
#define EVT_CMD(opcode, argv...)
 On each frame, the EVT manager will continue executing commands in all threads until a blocking command is encountered.
 
#define End   EVT_CMD(EVT_OP_END),
 Signals the end of EVT script data. A script missing this will likely crash on load.
 
#define Return   EVT_CMD(EVT_OP_RETURN),
 Kills the current EVT thread.
 
#define Jump(EVT_SOURCE)   EVT_CMD(EVT_OP_JUMP, (Bytecode) EVT_SOURCE),
 Jumps to a given instruction pointer and begins execution from there.
 
#define Label(LABEL_ID)   EVT_CMD(EVT_OP_LABEL, LABEL_ID),
 Marks this point in the script as a Goto target.
 
#define Goto(LABEL_ID)   EVT_CMD(EVT_OP_GOTO, LABEL_ID),
 Moves execution to the given label.
 
#define Loop(TIMES)   EVT_CMD(EVT_OP_LOOP, TIMES),
 Marks the beginning of a loop.
 
#define EndLoop   EVT_CMD(EVT_OP_END_LOOP),
 Marks the end of a loop.
 
#define BreakLoop   EVT_CMD(EVT_OP_BREAK_LOOP),
 Breaks out of the innermost loop.
 
#define Wait(NUM_FRAMES)   EVT_CMD(EVT_OP_WAIT_FRAMES, NUM_FRAMES),
 Blocks for the given number of frames.
 
#define WaitSecs(NUM_SECONDS)   EVT_CMD(EVT_OP_WAIT_SECS, NUM_SECONDS),
 Blocks for the given number of seconds.
 
#define IfEq(LVAR, RVAR)   EVT_CMD(EVT_OP_IF_EQ, LVAR, RVAR),
 Marks the beginning of an if statement that only executes if LVAR == RVAR.
 
#define IfNe(LVAR, RVAR)   EVT_CMD(EVT_OP_IF_NE, LVAR, RVAR),
 Marks the beginning of an if statement that only executes if LVAR != RVAR.
 
#define IfLt(LVAR, RVAR)   EVT_CMD(EVT_OP_IF_LT, LVAR, RVAR),
 Marks the beginning of an if statement that only executes if LVAR < RVAR.
 
#define IfGt(LVAR, RVAR)   EVT_CMD(EVT_OP_IF_GT, LVAR, RVAR),
 Marks the beginning of an if statement that only executes if LVAR <= RVAR.
 
#define IfLe(LVAR, RVAR)   EVT_CMD(EVT_OP_IF_LE, LVAR, RVAR),
 Marks the beginning of an if statement that only executes if LVAR > RVAR.
 
#define IfGe(LVAR, RVAR)   EVT_CMD(EVT_OP_IF_GE, LVAR, RVAR),
 Marks the beginning of an if statement that only executes if LVAR >= RVAR.
 
#define IfFlag(LVAR, RVAR)   EVT_CMD(EVT_OP_IF_FLAG, LVAR, RVAR),
 Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR, i.e.
 
#define IfNotFlag(LVAR, RVAR)   EVT_CMD(EVT_OP_IF_NOT_FLAG, LVAR, RVAR),
 Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR, i.e.
 
#define Else   EVT_CMD(EVT_OP_ELSE),
 Marks the end of an if statement and the start of the else block.
 
#define EndIf   EVT_CMD(EVT_OP_END_IF),
 Marks the end of an if statement or an else block.
 
#define Switch(LVAR)   EVT_CMD(EVT_OP_SWITCH, LVAR),
 Marks the start of a switch statement.
 
#define SwitchConst(LCONST)   EVT_CMD(EVT_OP_SWITCH_CONST, LCONST),
 Marks the start of a switch statement where the given value is treated as-is instead of using evt_get_variable.
 
#define CaseEq(RVAR)   EVT_CMD(EVT_OP_CASE_EQ, RVAR),
 Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any previous case.
 
#define CaseNe(RVAR)   EVT_CMD(EVT_OP_CASE_NE, RVAR),
 Marks the start of a switch case that executes only if LVAR != RVAR. It also marks the end of any previous case.
 
#define CaseLt(RVAR)   EVT_CMD(EVT_OP_CASE_LT, RVAR),
 Marks the start of a switch case that executes only if LVAR < RVAR. It also marks the end of any previous case.
 
#define CaseGt(RVAR)   EVT_CMD(EVT_OP_CASE_GT, RVAR),
 Marks the start of a switch case that executes only if LVAR <= RVAR. It also marks the end of any previous case.
 
#define CaseLe(RVAR)   EVT_CMD(EVT_OP_CASE_LE, RVAR),
 Marks the start of a switch case that executes only if LVAR > RVAR. It also marks the end of any previous case.
 
#define CaseGe(RVAR)   EVT_CMD(EVT_OP_CASE_GE, RVAR),
 Marks the start of a switch case that executes only if LVAR >= RVAR. It also marks the end of any previous case.
 
#define CaseDefault   EVT_CMD(EVT_OP_CASE_DEFAULT),
 Marks the start of a switch case that executes unconditionally. It also marks the end of any previous case.
 
#define CaseOrEq(RVAR)   EVT_CMD(EVT_OP_CASE_OR_EQ, RVAR),
 Marks the start of a switch case that executes only if LVAR == RVAR.
 
#define CaseAndEq(RVAR)   EVT_CMD(EVT_OP_CASE_AND_EQ, RVAR),
 Marks the start of a switch case that executes only if LVAR == RVAR.
 
#define CaseFlag(RVAR)   EVT_CMD(EVT_OP_CASE_FLAG, RVAR),
 Marks the start of a switch case that executes only if the RVAR flag is set on LVAR, i.e.
 
#define EndCaseGroup   EVT_CMD(EVT_OP_END_CASE_GROUP),
 Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.
 
#define CaseRange(MIN, MAX)   EVT_CMD(EVT_OP_CASE_RANGE, MIN, MAX),
 Marks the start of a switch case that executes only if MIN <= LVAR <= MAX (inclusive).
 
#define BreakSwitch   EVT_CMD(EVT_OP_BREAK_SWITCH),
 Marks the end of a switch case.
 
#define EndSwitch   EVT_CMD(EVT_OP_END_SWITCH),
 Marks the end of a switch statement and any case.
 
#define Set(VAR, INT_VALUE)   EVT_CMD(EVT_OP_SET, VAR, (Bytecode) INT_VALUE),
 Sets the given variable to a given value casted to an integer.
 
#define SetConst(VAR, CONST)   EVT_CMD(EVT_OP_SET_CONST, VAR, (Bytecode) CONST),
 Sets the given variable to a given value, skipping the evt_get_variable call.
 
#define SetF(VAR, FLOAT_VALUE)   EVT_CMD(EVT_OP_SETF, VAR, FLOAT_VALUE),
 Sets the given variable to a given value, but supports Floats.
 
#define Add(VAR, INT_VALUE)   EVT_CMD(EVT_OP_ADD, VAR, INT_VALUE),
 
#define Sub(VAR, INT_VALUE)   EVT_CMD(EVT_OP_SUB, VAR, INT_VALUE),
 
#define Mul(VAR, INT_VALUE)   EVT_CMD(EVT_OP_MUL, VAR, INT_VALUE),
 
#define Div(VAR, INT_VALUE)   EVT_CMD(EVT_OP_DIV, VAR, INT_VALUE),
 
#define Mod(VAR, INT_VALUE)   EVT_CMD(EVT_OP_MOD, VAR, INT_VALUE),
 
#define AddF(VAR, FLOAT_VALUE)   EVT_CMD(EVT_OP_ADDF, VAR, FLOAT_VALUE),
 
#define SubF(VAR, FLOAT_VALUE)   EVT_CMD(EVT_OP_SUBF, VAR, FLOAT_VALUE),
 
#define MulF(VAR, FLOAT_VALUE)   EVT_CMD(EVT_OP_MULF, VAR, FLOAT_VALUE),
 
#define DivF(VAR, FLOAT_VALUE)   EVT_CMD(EVT_OP_DIVF, VAR, FLOAT_VALUE),
 
#define UseBuf(INT_PTR)   EVT_CMD(EVT_OP_USE_BUF, (Bytecode) INT_PTR),
 Loads a s32 pointer for use with subsequent EVT_BUF_READ commands.
 
#define BufRead1(VAR)   EVT_CMD(EVT_OP_BUF_READ1, VAR),
 Consumes the next s32 from the buffer and stores it in the given variable.
 
#define BufRead2(VAR1, VAR2)   EVT_CMD(EVT_OP_BUF_READ2, VAR1, VAR2),
 Consumes the next two s32s from the buffer and stores them in the given variables.
 
#define BufRead3(VAR1, VAR2, VAR3)   EVT_CMD(EVT_OP_BUF_READ3, VAR1, VAR2, VAR3),
 Consumes the next three s32s from the buffer and stores them in the given variables.
 
#define BufRead4(VAR1, VAR2, VAR3, VAR4)   EVT_CMD(EVT_OP_BUF_READ4, VAR1, VAR2, VAR3, VAR4),
 Consumes the next four s32s from the buffer and stores them in the given variables.
 
#define BufPeek(OFFSET, VAR)   EVT_CMD(EVT_OP_BUF_PEEK, OFFSET, VAR),
 Gets the s32 at the given offset of the buffer and stores it in the given variable, without consuming it.
 
#define UseFBuf(FLOAT_PTR)   EVT_CMD(EVT_OP_USE_FBUF, (Bytecode) FLOAT_PTR),
 Identical to UseBuf. Beware that the int buffer and the float buffer are not distinct.
 
#define FBufRead1(VAR)   EVT_CMD(EVT_OP_FBUF_READ1, VAR),
 Consumes the next f32 from the buffer and stores it in the given variable.
 
#define FBufRead2(VAR1, VAR2)   EVT_CMD(EVT_OP_FBUF_READ2, VAR1, VAR2),
 Consumes the next two f32s from the buffer and stores them in the given variables.
 
#define FBufRead3(VAR1, VAR2, VAR3)   EVT_CMD(EVT_OP_FBUF_READ3, VAR1, VAR2, VAR3),
 Consumes the next three f32s from the buffer and stores them in the given variables.
 
#define FBufRead4(VAR1, VAR2, VAR3, VAR4)   EVT_CMD(EVT_OP_FBUF_READ4, VAR1, VAR2, VAR3, VAR4),
 Consumes the next four f32s from the buffer and stores them in the given variables.
 
#define FBufPeek(OFFSET, VAR)   EVT_CMD(EVT_OP_FBUF_PEEK, OFFSET, VAR),
 Gets the f32 at the given offset of the buffer and stores it in the given variable, without consuming it.
 
#define UseArray(INT_PTR)   EVT_CMD(EVT_OP_USE_ARRAY, (Bytecode) INT_PTR),
 Loads an s32 array pointer into the current thread for use with ArrayVar(INDEX).
 
#define UseFlagArray(PACKED_FLAGS_PTR)   EVT_CMD(EVT_OP_USE_FLAG_ARRAY, (Bytecode) PACKED_FLAGS_PTR),
 Loads an s32 array pointer into the current thread for use with UF(INDEX).
 
#define MallocArray(SIZE, OUT_PTR_VAR)   EVT_CMD(EVT_OP_MALLOC_ARRAY, SIZE, OUT_PTR_VAR),
 Allocates a new array of the given size for use with ArrayVar(INDEX).
 
#define BitwiseAnd(VAR, VALUE)   EVT_CMD(EVT_OP_BITWISE_AND, VAR, VALUE),
 VAR &= VALUE
 
#define BitwiseAndConst(VAR, CONST)   EVT_CMD(EVT_OP_BITWISE_AND_CONST, VAR, CONST),
 VAR &= CONST, but CONST is treated as-is rather than dereferenced with evt_get_variable.
 
#define BitwiseOr(VAR, VALUE)   EVT_CMD(EVT_OP_BITWISE_OR, VAR, VALUE),
 VAR |= VALUE
 
#define BitwiseOrConst(VAR, CONST)   EVT_CMD(EVT_OP_BITWISE_OR_CONST, VAR, CONST),
 VAR |= CONST, but CONST is treated as-is rather than dereferenced with evt_get_variable.
 
#define Exec(EVT_SOURCE)   EVT_CMD(EVT_OP_EXEC, (Bytecode) EVT_SOURCE),
 Launches a new thread.
 
#define ExecGetTID(EVT_SOURCE, OUTVAR)   EVT_CMD(EVT_OP_EXEC_GET_TID, (Bytecode) EVT_SOURCE, OUTVAR),
 Identical to Exec, but the newly-launched thread ID is stored in OUTVAR.
 
#define ExecWait(EVT_SOURCE)   EVT_CMD(EVT_OP_EXEC_WAIT, (Bytecode) EVT_SOURCE),
 Launches a new child thread.
 
#define BindTrigger(EVT_SOURCE, TRIGGER, COLLIDER_ID, UNK_A3, TRIGGER_PTR_OUTVAR)    EVT_CMD(EVT_OP_BIND_TRIGGER, (Bytecode) EVT_SOURCE, TRIGGER, (Bytecode) COLLIDER_ID, UNK_A3, TRIGGER_PTR_OUTVAR),
 Sets up a script to launch when a particular event is triggered.
 
#define BindPadlock(EVT_SOURCE, TRIGGER, COLLIDER_ID, ITEM_LIST, UNK_A3, TRIGGER_PTR_OUTVAR)    EVT_CMD(EVT_OP_BIND_PADLOCK, (Bytecode) EVT_SOURCE, TRIGGER, COLLIDER_ID, (Bytecode) ITEM_LIST, UNK_A3, TRIGGER_PTR_OUTVAR),
 Similar to BindTrigger, but also takes arguments for the item list to show.
 
#define Unbind   EVT_CMD(EVT_OP_UNBIND),
 Unbinds the current thread from the trigger it was bound to, if any.
 
#define KillThread(TID)   EVT_CMD(EVT_OP_KILL_THREAD, TID),
 Kills a thread by its thread ID.
 
#define SetPriority(PRIORITY)   EVT_CMD(EVT_OP_SET_PRIORITY, PRIORITY),
 Sets the current thread's priority. Higher-priority threads execute before lower-priority threads on each frame.
 
#define SetTimescale(TIMESCALE)   EVT_CMD(EVT_OP_SET_TIMESCALE, TIMESCALE),
 Sets the current thread's timescale. This is a multiplier applied to Wait and Wait_SECONDS.
 
#define SetGroup(GROUP)   EVT_CMD(EVT_OP_SET_GROUP, GROUP),
 Sets the current thread's group. Group value meanings are currently not known.
 
#define SuspendGroup(GROUP)   EVT_CMD(EVT_OP_SUSPEND_GROUP, GROUP),
 Suspends all threads in a group.
 
#define ResumeGroup(GROUP)   EVT_CMD(EVT_OP_RESUME_GROUP, GROUP),
 Resumes all threads in a group.
 
#define SuspendOthers(GROUP)   EVT_CMD(EVT_OP_SUSPEND_OTHERS, GROUP),
 Suspends all threads in a group, except the current thread.
 
#define ResumeOthers(GROUP)   EVT_CMD(EVT_OP_RESUME_OTHERS, GROUP),
 Resumes all threads in a group, except the current thread.
 
#define SuspendThread(TID)   EVT_CMD(EVT_OP_SUSPEND_THREAD, TID),
 Suspends all threads in a group, except the current thread.
 
#define ResumeThread(TID)   EVT_CMD(EVT_OP_RESUME_THREAD, TID),
 Resumes a thread by its thread ID.
 
#define IsThreadRunning(TID, OUTVAR)   EVT_CMD(EVT_OP_IS_THREAD_RUNNING, TID, OUTVAR),
 Sets OUTVAR to TRUE/FALSE depending on whether a thread with the given ID exists (i.e. has not been killed).
 
#define Thread   EVT_CMD(EVT_OP_THREAD),
 Marks the start of a thread block.
 
#define EndThread   EVT_CMD(EVT_OP_END_THREAD),
 Marks the end of a thread block.
 
#define ChildThread   EVT_CMD(EVT_OP_CHILD_THREAD),
 Marks the start of a child thread block.
 
#define EndChildThread   EVT_CMD(EVT_OP_END_CHILD_THREAD),
 Marks the end of a child thread block.
 
#define Call(FUNC, ARGS...)   EVT_CMD(EVT_OP_CALL, (Bytecode) FUNC, ##ARGS),
 Calls a given C EVT API function with any number of arguments.
 
#define EVT_DEBUG_LOG(STRING)   EVT_CMD(EVT_OP_DEBUG_LOG, STRING),
 Does nothing in release version.
 
#define DebugPrintVar(VAR)   EVT_CMD(EVT_OP_DEBUG_PRINT_VAR, VAR),
 Prints variable name and value.
 
#define EVT_AS_VEC2(baseVar)   (baseVar), (baseVar + 1)
 
#define EVT_AS_VEC3(baseVar)   (baseVar), (baseVar + 1), (baseVar + 2)
 
#define EVT_VEC_X(baseVar)   (baseVar)
 
#define EVT_VEC_Y(baseVar)   (baseVar + 1)
 
#define EVT_VEC_Z(baseVar)   (baseVar + 2)
 
#define EVT_VEC2_OP(OPERATION, MUT_BASE, x, y)
 
#define EVT_VEC3_OP(OPERATION, MUT_BASE, x, y, z)
 
#define EVT_VEC2_VOP(OPERATION, MUT_BASE, AMT_BASE)
 
#define EVT_VEC3_VOP(OPERATION, MUT_BASE, AMT_BASE)
 
#define EVT_VEC2I_SET(baseVar, x, y)   EVT_VEC2_OP(Set, baseVar, x, y)
 
#define EVT_VEC2F_SET(baseVar, x, y)   EVT_VEC2_OP(SetF, baseVar, x, y)
 
#define EVT_VEC3I_SET(baseVar, x, y, z)   EVT_VEC3_OP(Set, baseVar, x, y, z)
 
#define EVT_VEC3F_SET(baseVar, x, y, z)   EVT_VEC3_OP(SetF, baseVar, x, y, z)
 
#define EVT_VEC2I_VSET(baseVar, baseSrc)   EVT_VEC2_VOP(Set, baseVar, baseSrc)
 
#define EVT_VEC2F_VSET(baseVar, baseSrc)   EVT_VEC2_VOP(SetF, baseVar, baseSrc)
 
#define EVT_VEC3I_VSET(baseVar, baseSrc)   EVT_VEC3_VOP(Set, baseVar, baseSrc)
 
#define EVT_VEC3F_VSET(baseVar, baseSrc)   EVT_VEC3_VOP(SetF, baseVar, baseSrc)
 
#define EVT_VEC2I_ADD(baseVar, x, y)   EVT_VEC2_OP(Add, baseVar, x, y)
 
#define EVT_VEC2F_ADD(baseVar, x, y)   EVT_VEC2_OP(AddF, baseVar, x, y)
 
#define EVT_VEC3I_ADD(baseVar, x, y, z)   EVT_VEC3_OP(Add, baseVar, x, y, z)
 
#define EVT_VEC3F_ADD(baseVar, x, y, z)   EVT_VEC3_OP(AddF, baseVar, x, y, z)
 
#define EVT_VEC2I_VADD(baseVar, baseAmt)   EVT_VEC2_VOP(Add, baseVar, baseAmt)
 
#define EVT_VEC2F_VADD(baseVar, baseAmt)   EVT_VEC2_VOP(AddF, baseVar, baseAmt)
 
#define EVT_VEC3I_VADD(baseVar, baseAmt)   EVT_VEC3_VOP(Add, baseVar, baseAmt)
 
#define EVT_VEC3F_VADD(baseVar, baseAmt)   EVT_VEC3_VOP(AddF, baseVar, baseAmt)
 
#define EVT_VEC2I_SUB(baseVar, x, y)   EVT_VEC2_OP(Sub, baseVar, x, y)
 
#define EVT_VEC2F_SUB(baseVar, x, y)   EVT_VEC2_OP(SubF, baseVar, x, y)
 
#define EVT_VEC3I_SUB(baseVar, x, y, z)   EVT_VEC3_OP(Sub, baseVar, x, y, z)
 
#define EVT_VEC3F_SUB(baseVar, x, y, z)   EVT_VEC3_OP(SubF, baseVar, x, y, z)
 
#define EVT_VEC2I_VSUB(baseVar, baseAmt)   EVT_VEC2_VOP(Sub, baseVar, baseAmt)
 
#define EVT_VEC2F_VSUB(baseVar, baseAmt)   EVT_VEC2_VOP(SubF, baseVar, baseAmt)
 
#define EVT_VEC3I_VSUB(baseVar, baseAmt)   EVT_VEC3_VOP(Sub, baseVar, baseAmt)
 
#define EVT_VEC3F_VSUB(baseVar, baseAmt)   EVT_VEC3_VOP(SubF, baseVar, baseAmt)
 
#define IfTrue(b)   IfNe(b, 0)
 
#define IfFalse(b)   IfEq(b, 0)
 
#define EVT_EXIT_WALK(walkDistance, exitIdx, map, entryIdx)
 
#define EVT_EXIT_WALK_NOK(walkDistance, exitIdx, map, entryIdx)
 
#define EVT_EXIT_SINGLE_DOOR(exitIdx, map, entryIdx, colliderID, modelID, swingDir)
 
#define EVT_EXIT_SINGLE_DOOR_SET_SOUNDS(exitIdx, map, entryIdx, colliderID, modelID, swingDir, sounds)
 
#define EVT_EXIT_SPLIT_SINGLE_DOOR(exitIdx, map, entryIdx, colliderID, topModelID, bottomModelID, swingDir)
 
#define EVT_EXIT_DOUBLE_DOOR(exitIdx, map, entryIdx, colliderID, leftDoorModelID, rightDoorModelID)
 
#define EVT_EXIT_DOUBLE_DOOR_SET_SOUNDS(exitIdx, map, entryIdx, colliderID, leftDoorModelID, rightDoorModelID, sounds)
 
#define EVT_SETUP_CAMERA_DEFAULT(r, g, b)
 Enable camera using standard parameters for clip distances and FOV.
 
#define EVT_SETUP_CAMERA_NO_LEAD(r, g, b)
 Enable camera using standard parameters for clip distances and FOV with LeadPlayer disabled.
 
#define EVT_SETUP_CAMERA_MIM()
 Enable camera for AREA_MIM using a closer far clip distance and appropriate background color.
 
#define __NARG__(args...)    __NARG_I_(args,__RSEQ_N())
 
#define __NARG_I_(args...)    __ARG_N(args)
 
#define __ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, N, ...)   N
 
#define __RSEQ_N()
 
#define _VFUNC_(name, n)   name##n
 
#define _VFUNC(name, n)   _VFUNC_(name, n)
 
#define VFUNC(func, args...)   _VFUNC(func, __NARG__(args)) (args)
 
#define PlayEffect(args...)   VFUNC(PlayEffect, args)
 
#define PlayEffect1(effect)    Call(PlayEffect_impl, effect, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 
#define PlayEffect2(effect, subtype)    Call(PlayEffect_impl, effect, subtype, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 
#define PlayEffect3(effect, subtype, a)    Call(PlayEffect_impl, effect, subtype, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 
#define PlayEffect4(effect, subtype, a, b)    Call(PlayEffect_impl, effect, subtype, a, b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 
#define PlayEffect5(effect, subtype, a, b, c)    Call(PlayEffect_impl, effect, subtype, a, b, c, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 
#define PlayEffect6(effect, subtype, a, b, c, d)    Call(PlayEffect_impl, effect, subtype, a, b, c, d, 0, 0, 0, 0, 0, 0, 0, 0)
 
#define PlayEffect7(effect, subtype, a, b, c, d, e)    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, 0, 0, 0, 0, 0, 0, 0)
 
#define PlayEffect8(effect, subtype, a, b, c, d, e, f)    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, 0, 0, 0, 0, 0, 0)
 
#define PlayEffect9(effect, subtype, a, b, c, d, e, f, g)    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, 0, 0, 0, 0, 0)
 
#define PlayEffect10(effect, subtype, a, b, c, d, e, f, g, h)    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, 0, 0, 0, 0)
 
#define PlayEffect11(effect, subtype, a, b, c, d, e, f, g, h, i)    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, 0, 0, 0)
 
#define PlayEffect12(effect, subtype, a, b, c, d, e, f, g, h, i, j)    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, 0, 0)
 
#define PlayEffect13(effect, subtype, a, b, c, d, e, f, g, h, i, j, k)    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, 0)
 
#define PlayEffect14(effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l)    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l)
 

Macro Definition Documentation

◆ BSS

#define BSS   __attribute__ ((nocommon, section (".bss")))

Definition at line 7 of file macros.h.

◆ TRANSPARENT_UNION

#define TRANSPARENT_UNION   __attribute__ ((__transparent_union__))

Definition at line 8 of file macros.h.

◆ ALIGNED

#define ALIGNED ( x)    __attribute__((aligned(x)))

Definition at line 10 of file macros.h.

◆ OSALIGNED

#define OSALIGNED ( x)    ALIGNED(x)

Definition at line 13 of file macros.h.

◆ BBALIGNED

#define BBALIGNED ( x)    ALIGNED(x)

Definition at line 18 of file macros.h.

◆ ALIGN16

#define ALIGN16 ( val)    (((val) + 0xF) & ~0xF)

Definition at line 20 of file macros.h.

Referenced by _heap_create(), _heap_malloc(), _heap_malloc_tail(), _heap_realloc(), and alHeapAlloc().

◆ ALIGN8

#define ALIGN8 ( val)    (((val) + 0x7) & ~0x7)

Definition at line 21 of file macros.h.

Referenced by spr_load_sprite().

◆ EXTERN_C

#define EXTERN_C   extern

Definition at line 26 of file macros.h.

◆ NAME_SUFFIX

#define NAME_SUFFIX

Definition at line 29 of file macros.h.

◆ NAME_PREFIX

#define NAME_PREFIX

◆ A

#define A ( sym)    NS(AREA, NAME_PREFIX, sym, NAME_SUFFIX)

Definition at line 36 of file macros.h.

Referenced by A(), A(), A(), A(), A(), A(), A(), A(), and func_8004E880().

◆ ARRAY_COUNT

#define ARRAY_COUNT ( arr)    (s32)(sizeof(arr) / sizeof(arr[0]))

Definition at line 40 of file macros.h.

Referenced by _add_part_decoration(), _msg_get_printer_for_msg(), _update_message(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), action_update_spin(), add_anim_node(), add_item(), ALT_virtual_entity_create(), animator_copy_vertices_to_buffer(), animator_node_update_model_transform(), appendGfx_animator_node(), appendGfx_background_texture(), appendGfx_player_actor_blur(), au_amb_manager_init(), au_amb_manager_update(), au_amb_play_sequence(), au_amb_player_update(), au_amb_restore_voices(), au_amb_save_voices(), au_ambient_load(), au_bgm_dispatch_player_event(), au_bgm_load_subsegment(), au_bgm_player_init(), au_bgm_player_initialize(), au_bgm_player_update_playing(), au_bgm_player_update_stop(), au_bgm_set_effect_indices(), au_bgm_set_proximity_mix(), au_bgm_update_main(), au_BGMCmd_FF(), au_engine_init(), au_init_voices(), au_load_BK_headers(), au_load_BK_to_bank(), au_load_song_files(), au_sfx_clear_queue(), au_sfx_init(), au_sfx_load_groups_from_SEF(), au_sfx_set_reverb_type(), au_sfx_update_main(), au_syn_update(), au_update_stopped_voices(), au_update_voices(), backtrace_address_to_string(), bgm_get_map_default_variation(), bgm_reset_sequence_players(), bgm_update_music_settings(), big_smoke_puff_appendGfx(), breaking_junk_appendGfx(), btl_are_all_enemies_defeated(), btl_bonk_cleanup(), btl_check_can_change_partner(), btl_create_popup(), btl_delete_actor(), btl_draw_enemy_health_bars(), btl_init_menu_boots(), btl_init_menu_hammer(), btl_init_menu_items(), btl_init_menu_partner(), btl_popup_messages_delete(), btl_popup_messages_draw_ui(), btl_popup_messages_draw_world_geometry(), btl_popup_messages_init(), btl_popup_messages_update(), btl_render_actors(), btl_restore_world_cameras(), btl_save_world_cameras(), btl_state_draw_celebration(), btl_state_update_9(), btl_state_update_begin_partner_turn(), btl_state_update_begin_player_turn(), btl_state_update_begin_turn(), btl_state_update_celebration(), btl_state_update_change_partner(), btl_state_update_end_battle(), btl_state_update_end_demo_battle(), btl_state_update_end_turn(), btl_state_update_enemy_move(), btl_state_update_enemy_striking_first(), btl_state_update_first_strike(), btl_state_update_normal_start(), btl_state_update_partner_menu(), btl_state_update_partner_move(), btl_state_update_partner_striking_first(), btl_state_update_player_menu(), btl_state_update_player_move(), btl_state_update_run_away(), btl_state_update_switch_to_partner(), btl_state_update_switch_to_player(), btl_update(), btl_update_ko_status(), btl_update_starpoints_display(), build_custom_gfx(), check_block_input(), clear_animator_list(), clear_area_flags(), clear_effect_data(), clear_encounter_status(), clear_entity_data(), clear_model_data(), clear_player_data(), clear_printers(), clear_render_tasks(), clear_saved_variables(), clear_screen_overlays(), clear_sprite_shading_data(), clear_trigger_data(), clear_virtual_entity_list(), clear_windows(), clone_model(), count_item(), count_power_plus(), crash_screen_draw(), crash_screen_init(), create_actor(), create_audio_system(), create_cameras(), create_effect_instance(), create_encounters(), create_entity(), create_mesh_animator(), create_model_animator(), create_npc_impl(), create_shading_palette(), create_shadow_from_data(), create_target_list(), create_trigger(), debug_backtrace(), delete_model_animator(), delete_model_animator_node(), delete_model_animator_nodes(), delete_trigger(), draw(), draw_merlee_message_string(), draw_merlee_messages(), effect_86_appendGfx(), effect_simple_rand(), emote_appendGfx(), enable_actor_blur(), enable_npc_blur(), enable_player_blur(), entity_HeartBlockContent__anim_heal(), entity_HeartBlockContent_get_previous_yaw(), entity_SuperBlockContent_get_previous_yaw(), entity_SuperBlockContent_idle(), evt_find_label(), evt_handle_exec1(), evt_handle_exec1_get_id(), evt_handle_thread(), execute_render_tasks(), filemenu_choose_name_handle_input(), filemenu_choose_name_init(), filemenu_cleanup(), filemenu_draw_contents_copy_arrow(), filemenu_draw_contents_file_create_header(), filemenu_draw_contents_file_title(), filemenu_info_init(), filemenu_init(), filemenu_main_cleanup(), filemenu_main_handle_input(), filemenu_main_init(), filemenu_set_cursor_goal_pos(), filemenu_update(), filemenu_update_cursor(), filemenu_update_hidden_name_confirm(), filemenu_update_hidden_name_input(), filemenu_update_hidden_options_bottom(), filemenu_update_hidden_options_left(), filemenu_update_hidden_options_right(), filemenu_update_hidden_title(), filemenu_update_show_name_input(), filemenu_update_show_options_bottom(), filemenu_update_show_options_left(), filemenu_update_show_options_right(), filemenu_update_show_title(), filemenu_update_show_with_rotation(), filemenu_yesno_draw_prompt_contents(), filemenu_yesno_handle_input(), filemenu_yesno_init(), find_item(), find_script_labels(), fio_erase_game(), fio_fetch_saved_file_info(), fio_save_game(), fio_serialize_state(), fire_flower_update(), free(), free_animator_nodes(), free_animator_nodes_helper(), func_80045AC0(), func_80045B10(), func_80045BC8(), func_8004DCB8(), func_8004DFD4(), func_8004E444(), func_80050900(), func_80050970(), func_80053E58(), func_80054AA0(), func_80054C84(), func_80054CE0(), func_80055110(), func_800F0CB0(), func_800F0D5C(), func_800F0D80(), func_800F102C(), func_80111790(), func_8013A4D0(), func_8014AD40(), func_8024330C(), func_802435C4(), func_802C39F8(), func_E011A700(), func_unkA_draw_npc(), func_unkA_draw_player(), get_animator_child_for_model(), get_animator_child_with_id(), get_animator_child_with_id_helper(), get_consumables_count(), get_consumables_empty(), get_current_merlee_message(), get_stored_count(), get_stored_empty(), gfx_draw_frame(), gfx_task_background(), has_item(), hud_element_clear_cache(), hud_element_create(), imgfx_add_to_cache(), imgfx_get_free_instances(), imgfx_init(), imgfx_init_instance(), imgfx_load_anim(), imgfx_update_cache_impl(), init_encounter_status(), init_entity_data(), initialize_battle(), initialize_next_camera(), initialize_printer(), int_to_string(), is_ability_active(), is_another_trigger_bound(), is_badge_equipped(), is_model_center_visible(), is_point_visible(), kill_enemy(), kill_script(), lens_flare_appendGfx(), lightning_bolt_appendGfx(), lil_oink_update(), load_effect(), load_engine_data(), load_map_by_IDs(), load_mesh_animator_tree(), load_message_to_buffer(), load_model_animator_tree(), load_partner_actor(), load_player_actor(), make_npcs(), mdl_calculate_model_sizes(), mdl_create_model(), mdl_get_copied_gfx(), mdl_load_all_textures(), mdl_make_local_vertex_copy(), mdl_make_transform_group(), mdl_reset_transform_flags(), mdl_set_all_tint_type(), mdl_update_transform_matrices(), motion_blur_flame_appendGfx(), msg_draw_frame(), music_note_appendGfx(), npc_find_closest(), npc_find_closest_simple(), npc_find_standing_on_entity(), npc_follow_init(), npc_follow_npc(), npc_update_npc_tracking(), part_glow_on(), partner_buff_main(), partner_buff_update(), partner_clear_player_tracking(), partner_flying_enable(), partner_flying_update_player_tracking(), partner_walking_enable(), partner_walking_update_player_tracking(), pause_badges_cleanup(), pause_badges_count_all(), pause_badges_count_equipped(), pause_badges_draw_contents(), pause_badges_init(), pause_badges_load_badges(), pause_badges_try_equip(), pause_badges_try_remove(), pause_cleanup(), pause_get_total_equipped_bp_cost(), pause_handle_input(), pause_init(), pause_items_cleanup(), pause_items_init(), pause_items_load_items(), pause_map_cleanup(), pause_map_draw_contents(), pause_map_init(), pause_map_update(), pause_partners_cleanup(), pause_partners_draw_contents(), pause_partners_init(), pause_spirits_cleanup(), pause_spirits_init(), pause_stats_cleanup(), pause_stats_init(), pause_tabs_cleanup(), pause_tabs_init(), pause_tabs_update(), peach_star_beam_appendGfx(), peach_star_beam_main(), peach_star_beam_update(), phys_clear_spin_history(), phys_get_spin_history(), phys_reset_spin_history(), pink_sparkles_appendGfx(), popup_menu_draw_menu_contents(), push_block_handle_fall(), queue_render_task(), quizmo_assistant_appendGfx(), quizmo_audience_main(), reload_mesh_animator_tree(), remove_all_effects(), remove_effect(), remove_item(), render_effects_UI(), render_effects_world(), render_frame(), render_hud_elements_backUI(), render_hud_elements_frontUI(), render_messages(), render_models(), render_transformed_hud_elements(), render_window_root(), render_windows(), reset_actor_turn_info(), reset_player_status(), reset_status_bar(), set_message_int_var(), set_windows_visible(), setup_demo_player(), setup_item_popup(), setup_partner_popup(), shimmer_burst_update(), shimmer_wave_update(), shiny_flare_appendGfx(), shop_open_item_select_popup(), should_collider_allow_interact(), show_next_damage_popup(), sleep_bubble_appendGfx(), sleep_bubble_update(), snd_load_BGM(), snowman_doll_update(), something_rotating_update(), sort_consumables(), sparkles_appendGfx(), spawn_drops(), spr_clear_quad_cache(), spr_free_sprite(), spr_get_quad_for_size(), spr_init_player_raster_cache(), spr_init_quad_cache(), spr_init_sprites(), spr_load_npc_extra_anims(), spr_load_npc_sprite(), sprite_shading_set_light_source(), star_appendGfx(), star_main(), start_child_script(), start_script(), start_script_in_group(), stat_change_update(), state_step_exit_file_select(), state_step_intro(), state_step_startup(), state_step_unpause(), store_item(), sun_appendGfx(), sun_main(), sun_update(), tattle_cam_pre_render(), tattle_window_update(), tubba_heart_attack_update(), underwater_main(), underwater_update(), update(), update_action_ratings(), update_cameras(), update_damage_popups(), update_effects(), update_enemy_shadows(), update_health_bars(), update_hud_elements(), update_item_entity_pickup(), update_merlee_messages(), update_messages(), update_model_animator(), update_model_animator_with_transform(), update_nonplayer_actor_blur_history(), update_partner_timers(), update_player_actor_blur_history(), update_triggers(), update_window_hierarchy(), update_windows(), ver_deserialize_standard(), ver_deserialize_vanilla_save(), virtual_entity_create(), virtual_entity_delete_by_ref(), virtual_entity_list_render_UI(), virtual_entity_list_render_world(), virtual_entity_list_update(), water_block_appendGfx(), and waterfall_appendGfx().

◆ PTR_LIST_END

◆ PHYSICAL_TO_VIRTUAL

#define PHYSICAL_TO_VIRTUAL ( addr)    (void*)((u32)(addr) + 0x80000000)

Definition at line 46 of file macros.h.

◆ VIRTUAL_TO_PHYSICAL

#define VIRTUAL_TO_PHYSICAL ( addr)    (u32)((u8*)(addr) - 0x80000000)

Definition at line 47 of file macros.h.

Referenced by appendGfx_animator(), appendGfx_entity_model(), aura_appendGfx(), balloon_appendGfx(), big_smoke_puff_appendGfx(), big_snowflakes_appendGfx(), blast_appendGfx(), bombette_breaking_appendGfx(), breaking_junk_appendGfx(), bulb_glow_appendGfx(), butterflies_appendGfx(), chapter_change_appendGfx(), chomp_drop_appendGfx(), cloud_puff_appendGfx(), cloud_trail_appendGfx(), cold_breath_appendGfx(), confetti_appendGfx(), damage_indicator_render_impl(), damage_stars_appendGfx(), debuff_appendGfx(), draw_entity_model_E(), drop_leaves_appendGfx(), dust_appendGfx(), effect_3D_appendGfx(), effect_46_appendGfx(), effect_63_appendGfx(), effect_65_appendGfx(), effect_75_appendGfx(), effect_86_appendGfx(), embers_appendGfx(), emote_appendGfx(), ending_decals_appendGfx(), energy_in_out_appendGfx(), energy_orb_wave_appendGfx(), energy_shockwave_appendGfx(), explosion_appendGfx(), falling_leaves_appendGfx(), fire_breath_appendGfx(), fire_flower_appendGfx(), firework_rocket_appendGfx(), flame_appendGfx(), flashing_box_shockwave_appendGfx(), floating_cloud_puff_appendGfx(), floating_flower_appendGfx(), floating_rock_appendGfx(), flower_splash_appendGfx(), flower_trail_appendGfx(), footprint_appendGfx(), fright_jar_appendGfx(), func_E005E334(), func_E0080448(), func_E00828B4(), func_E0082A84(), func_E00863B4(), func_E0090444(), func_E00AC2A4(), func_E00D8630(), func_E011A700(), gather_energy_pink_appendGfx(), gather_magic_appendGfx(), got_item_outline_appendGfx(), green_impact_appendGfx(), hieroglyphs_appendGfx(), huff_puff_breath_appendGfx(), ice_pillar_appendGfx(), ice_shard_appendGfx(), imgfx_appendGfx_mesh_anim(), imgfx_appendGfx_mesh_strip(), landing_dust_appendGfx(), lens_flare_appendGfx(), light_rays_appendGfx(), lightning_appendGfx(), lightning_bolt_appendGfx(), lil_oink_appendGfx(), merlin_house_stars_appendGfx(), misc_particles_appendGfx(), motion_blur_flame_appendGfx(), moving_cloud_appendGfx(), msg_draw_speech_arrow(), msg_draw_speech_bubble(), msg_update_rewind_arrow(), music_note_appendGfx(), peach_star_beam_appendGfx(), pink_sparkles_appendGfx(), purple_ring_appendGfx(), quizmo_answer_main(), quizmo_assistant_appendGfx(), quizmo_audience_appendGfx(), quizmo_stage_appendGfx(), radial_shimmer_appendGfx(), radiating_energy_orb_appendGfx(), red_impact_appendGfx(), render_hud_element(), render_hud_elements_backUI(), render_hud_elements_frontUI(), ring_blast_appendGfx(), rising_bubble_appendGfx(), shape_spell_appendGfx(), shattering_stones_appendGfx(), shimmer_burst_appendGfx(), shimmer_wave_appendGfx(), shiny_flare_appendGfx(), shockwave_appendGfx(), sleep_bubble_appendGfx(), small_gold_sparkle_appendGfx(), smoke_burst_appendGfx(), smoke_impact_appendGfx(), smoke_ring_appendGfx(), snaking_static_appendGfx(), snowfall_appendGfx(), snowflake_appendGfx(), snowman_doll_appendGfx(), something_rotating_appendGfx(), sparkles_appendGfx(), spiky_white_aura_appendGfx(), spirit_card_appendGfx(), spr_appendGfx_component(), squirt_appendGfx(), star_appendGfx(), star_outline_appendGfx(), star_spirits_energy_appendGfx(), stars_burst_appendGfx(), stars_shimmer_appendGfx(), stars_spread_appendGfx(), static_status_appendGfx(), steam_burst_appendGfx(), stop_watch_appendGfx(), sun_appendGfx(), sweat_appendGfx(), throw_spiny_appendGfx(), thunderbolt_ring_appendGfx(), tubba_heart_attack_appendGfx(), underwater_appendGfx(), walking_dust_appendGfx(), water_block_appendGfx(), water_fountain_appendGfx(), and waterfall_appendGfx().

◆ IS_DEBUG_PANIC

#define IS_DEBUG_PANIC ( statement)    is_debug_panic(statement)

Definition at line 50 of file macros.h.

◆ PANIC

◆ PANIC_MSG

#define PANIC_MSG ( msg,
args... )
Value:
do { \
char panicMsg[0x40]; \
sprintf(panicMsg, msg, ##args); \
IS_DEBUG_PANIC(msg); \
} while (0)

Definition at line 56 of file macros.h.

56
57#define FLOAT_TO_FIXED(x) (((x) * 1024.0f) + -EVT_FIXED_OFFSET)
58
60#define Ref(sym) ((Bytecode) &(sym))
61

◆ ASSERT

#define ASSERT ( condition)
Value:
if (!(condition)) { \
IS_DEBUG_PANIC("Assertion failed: " #condition); \
}

◆ ASSERT_MSG

#define ASSERT_MSG ( condition,
msg,
args... )
Value:
if (!(condition)) { \
char assertMsg[0x40]; \
sprintf(assertMsg, msg, ##args); \
IS_DEBUG_PANIC(assertMsg); \
}

Definition at line 66 of file macros.h.

66
67#define LocalVar(INDEX) ((INDEX) - EVT_LOCAL_VAR_OFFSET)
68

Referenced by evt_execute_next_command(), get_asset_offset(), get_map_IDs_by_name_checked(), load_asset_by_name(), load_map_by_IDs(), reset_player_status(), spr_load_sprite(), and spr_update_sprite().

◆ BADGE_MENU_PAGE

#define BADGE_MENU_PAGE ( index)    (&gPauseBadgesPages[index])

◆ ITEM_MENU_PAGE

#define ITEM_MENU_PAGE ( index)    (&gPauseItemsPages[index])

◆ MENU_PANEL_SELECTED_GRID_DATA

#define MENU_PANEL_SELECTED_GRID_DATA ( panel)
Value:
(panel)->gridData[(panel)->state * (panel)->numCols * (panel)->numRows + \
(panel)->numCols * (panel)->row + \
(panel)->col]

Definition at line 76 of file macros.h.

76

Referenced by filemenu_choose_name_handle_input(), filemenu_main_handle_input(), filemenu_main_init(), filemenu_yesno_handle_input(), pause_spirits_handle_input(), and pause_stats_handle_input().

◆ MAX_MAPVARS

#define MAX_MAPVARS   16

Definition at line 81 of file macros.h.

Referenced by clear_script_list().

◆ MAX_MAPFLAGS

#define MAX_MAPFLAGS   3

Definition at line 82 of file macros.h.

Referenced by clear_script_list().

◆ MAX_ENEMY_ACTORS

#define MAX_ENEMY_ACTORS   24

Definition at line 83 of file macros.h.

◆ MAX_ANIMATED_MODELS

#define MAX_ANIMATED_MODELS   16

Definition at line 85 of file macros.h.

Referenced by render_animated_models(), reset_model_animators(), and update_animated_models().

◆ MAX_ANIMATED_MESHES

#define MAX_ANIMATED_MESHES   16

Definition at line 86 of file macros.h.

◆ MAX_ENTITY_MODELS

#define MAX_ENTITY_MODELS   256

◆ MAX_MODELS

#define MAX_MODELS   256

◆ MAX_MODEL_TRANSFORM_GROUPS

#define MAX_MODEL_TRANSFORM_GROUPS   4

Definition at line 89 of file macros.h.

Referenced by get_transform_group_index().

◆ MAX_SCRIPTS

◆ MAX_NPCS

◆ MAX_TRIGGERS

#define MAX_TRIGGERS   64

Definition at line 92 of file macros.h.

Referenced by get_trigger_tattle().

◆ MAX_SHADOWS

#define MAX_SHADOWS   60

Definition at line 93 of file macros.h.

Referenced by clear_entity_data(), render_shadows(), spawn_drops(), and update_shadows().

◆ MAX_ENTITIES

◆ MAX_WORKERS

◆ MAX_TEX_PANNERS

#define MAX_TEX_PANNERS   16

Definition at line 96 of file macros.h.

◆ MAX_ITEM_ENTITIES

#define MAX_ITEM_ENTITIES   256

◆ MAX_IMGFX_INSTANCES

#define MAX_IMGFX_INSTANCES   90

◆ MAX_STAR_PIECES

#define MAX_STAR_PIECES   222

Definition at line 100 of file macros.h.

Referenced by add_star_pieces(), and update_item_entity_pickup().

◆ SP_PER_BAR

◆ SP_PER_SEG

#define SP_PER_SEG   32

Definition at line 103 of file macros.h.

Referenced by add_star_power(), btl_state_update_end_turn(), and pause_stats_draw_contents().

◆ SCREEN_WIDTH

#define SCREEN_WIDTH   320

Definition at line 105 of file macros.h.

Referenced by _render_transition_stencil(), _update_message(), appendGfx_darkness_stencil(), appendGfx_intro_logos(), appendGfx_message(), appendGfx_reset_tile_pattern(), appendGfx_screen_transition_stencil(), appendGfx_shading_palette(), appendGfx_title_screen(), btl_draw_upgrade_windows(), btl_state_draw_select_target(), btl_submenu_moves_update(), btl_update_starpoints_display(), btl_update_strats_menu(), bulb_glow_appendGfx(), crash_screen_draw(), crash_screen_draw_glyph(), crash_screen_draw_rect(), crash_screen_init(), draw_all_status_icons(), draw_box(), draw_hud_element_internal(), draw_message_window(), draw_prev_frame_buffer_at_screen_pos(), filemenu_draw_contents_copy_arrow(), filemenu_draw_contents_title(), filemenu_update_show_name_confirm(), firework_rocket_appendGfx(), flame_appendGfx(), func_80027774(), func_80027BAC(), func_800F102C(), func_80143C48(), func_E00D8630(), gfx_draw_background(), gfx_draw_frame(), gfx_frame_filter_pass_0(), gfx_transfer_frame_to_depth(), hud_element_draw_rect(), hud_element_setup_cam(), is_model_center_visible(), is_point_visible(), motion_blur_flame_appendGfx(), msg_draw_rewind_arrow(), msg_printer_set_origin_pos(), pause_badges_draw_contents(), pause_items_draw_contents(), pause_map_draw_contents(), pause_partners_draw_contents(), pause_spirits_draw_contents(), pause_stats_draw_contents(), pause_textbox_draw_contents(), render_curtains(), render_frame(), render_window_root(), render_windows(), sfx_compute_spatialized_sound_params_full(), sfx_compute_spatialized_sound_params_ignore_depth(), show_first_strike_message(), state_drawUI_startup(), tattle_cam_pre_render(), tattle_window_fill_clipped_quad(), underwater_appendGfx(), and update_status_bar().

◆ SCREEN_HEIGHT

◆ LAST_DEMO_SCENE_IDX

#define LAST_DEMO_SCENE_IDX   18

◆ WORLD_ENTITY_HEAP_SIZE

#define WORLD_ENTITY_HEAP_SIZE   0x17FF0

Definition at line 110 of file macros.h.

◆ COLLISION_HEAP_SIZE

#define COLLISION_HEAP_SIZE   0x18000

Definition at line 111 of file macros.h.

Referenced by collision_heap_create().

◆ GENERAL_HEAP_SIZE

#define GENERAL_HEAP_SIZE   0x54000

Definition at line 112 of file macros.h.

Referenced by general_heap_create().

◆ SPRITE_HEAP_SIZE

#define SPRITE_HEAP_SIZE   0x60000

Definition at line 113 of file macros.h.

Referenced by spr_init_sprites().

◆ BATTLE_HEAP_SIZE

#define BATTLE_HEAP_SIZE   0x25800

Definition at line 114 of file macros.h.

Referenced by battle_heap_create().

◆ FRAME_BUFFER_SIZE

#define FRAME_BUFFER_SIZE   0x25800

Definition at line 115 of file macros.h.

◆ CAM_NEAR_CLIP

#define CAM_NEAR_CLIP   16

◆ CAM_FAR_CLIP

#define CAM_FAR_CLIP   4096

Definition at line 118 of file macros.h.

Referenced by state_init_file_select(), state_init_logos(), and state_init_title_screen().

◆ TMEM_SIZE

#define TMEM_SIZE   0x1000

Definition at line 121 of file macros.h.

Referenced by bulb_glow_appendGfx().

◆ SCREEN_COPY_TILE_HEIGHT

#define SCREEN_COPY_TILE_HEIGHT   ((TMEM_SIZE) / ((SCREEN_WIDTH) * (2)))

Definition at line 123 of file macros.h.

Referenced by gfx_draw_background().

◆ PI

#define PI   3.141592f

Definition at line 126 of file macros.h.

Referenced by create_camera_leadplayer_matrix().

◆ PI_D

#define PI_D   3.141592

Definition at line 127 of file macros.h.

Referenced by update_camera_zone_interp(), update_lerp(), and update_lerp_battle().

◆ TAU

#define TAU   6.28318f

Definition at line 128 of file macros.h.

Referenced by appendGfx_background_texture(), and entity_GiantChest_open().

◆ PI_S

#define PI_S   3.14159f

Definition at line 129 of file macros.h.

◆ DEG_TO_BINANG

#define DEG_TO_BINANG ( x)    ((x) * (0x8000 / 180.0f))

Definition at line 132 of file macros.h.

Referenced by cos_deg(), sin_cos_deg(), and sin_deg().

◆ RAD_TO_BINANG

#define RAD_TO_BINANG ( x)    ((x) * (f32)(0x8000 / M_PI))

◆ DEG_TO_RAD

#define DEG_TO_RAD ( deg)    (((deg) * TAU) / 360.0f)

Definition at line 134 of file macros.h.

Referenced by action_hammer_end_swing(), action_hammer_play_hit_fx(), action_hammer_test_swing_collision(), action_update_hit_fire(), action_update_hit_lava(), action_update_knockback(), action_update_parasol(), action_update_sliding(), action_update_spin(), action_update_state_23(), action_update_step_up(), action_update_use_spinning_flower(), action_update_use_tweester(), add_part_decor_steam(), add_vec2D_polar(), add_xz_vec3f(), add_xz_vec3f_copy1(), add_xz_vec3f_copy2(), apply_constraints_to_lead_amount(), btl_state_update_9(), btl_state_update_end_player_turn(), btl_state_update_end_turn(), btl_state_update_partner_menu(), btl_state_update_peach_menu(), btl_state_update_player_menu(), btl_state_update_twink_menu(), btl_state_update_victory(), ChompChainAddPolarPos(), ChompChainGetPolarX(), collision_main_lateral(), Entity_BoardedFloor_update_fragments(), entity_BombableRock_update_fragments(), entity_Chest_close(), entity_Chest_open(), entity_GiantChest_give_equipment(), entity_GiantChest_open(), entity_HeartBlockContent__anim_heal(), entity_HiddenPanel_flip_over(), entity_inactive_block_hit_anim(), entity_inactive_block_recoil_anim(), entity_Padlock_push_player(), entity_PinkFlowerLight_setupGfx(), entity_shattering_idle(), entity_StarBoxLauncher_launch(), entity_TrumpetPlant_create_effect(), entity_TrumpetPlant_spawn_coin(), entity_Tweester_move(), entity_WoodenCrate_update_fragments(), func_802BC3E4_E2ED14(), interp_lookat_pos(), npc_do_other_npc_collision(), npc_do_player_collision(), npc_move_heading(), npc_raycast_down_around(), npc_raycast_down_sides(), npc_raycast_up_corners(), npc_surface_spawn_basic_fx(), npc_surface_spawn_cloud_fx(), npc_surface_spawn_flower_fx(), npc_surface_spawn_hedges_fx(), npc_surface_spawn_snow_fx(), npc_surface_spawn_water_fx(), npc_test_move_with_slipping(), npc_test_move_without_slipping(), peach_disguise_check_overlaps(), play_movement_dust_effects(), player_raycast_below(), player_raycast_up_corners(), player_surface_spawn_basic_fx(), player_surface_spawn_cloud_fx(), player_surface_spawn_flower_fx(), player_surface_spawn_hedges_fx(), player_surface_spawn_snow_fx(), player_surface_spawn_water_fx(), player_test_lateral_overlap(), player_test_move_with_slipping(), player_test_move_without_slipping(), sfx_compute_spatialized_sound_params_ignore_depth(), sync_held_position(), test_ray_collider_horizontal(), test_ray_to_wall_center(), update_camera_interp_pos(), update_camera_no_interp(), update_camera_unused_ahead(), update_camera_unused_confined(), update_camera_unused_radial(), update_item_entity_collectable(), update_riding_physics(), update_riding_physics(), and virtual_entity_move_polar().

◆ SHT_MINV

#define SHT_MINV   3.051851e-05

Definition at line 137 of file macros.h.

Referenced by cos_deg(), cos_rad(), sin_cos_deg(), sin_cos_rad(), sin_deg(), and sin_rad().

◆ SPRITE_WORLD_SCALE_F

#define SPRITE_WORLD_SCALE_F   (5.0f/7.0f)

Definition at line 139 of file macros.h.

Referenced by peach_star_beam_appendGfx().

◆ SPRITE_WORLD_SCALE_D

◆ SPR_PAL_SIZE

◆ BATTLE_ID_BIT

◆ BATTLE_NPC_ID_BIT

#define BATTLE_NPC_ID_BIT   0x800

Definition at line 145 of file macros.h.

Referenced by create_npc_impl().

◆ BATTLE_ENTITY_ID_BIT

◆ UNPACK_BTL_AREA

#define UNPACK_BTL_AREA ( battleID)    (((battleID) >> 8) & 0xFF)

Definition at line 148 of file macros.h.

Referenced by load_battle_section(), and state_step_battle().

◆ UNPACK_BTL_INDEX

#define UNPACK_BTL_INDEX ( battleID)    ((battleID) & 0xFF)

Definition at line 149 of file macros.h.

Referenced by load_battle_section(), and state_step_battle().

◆ COLLISION_WITH_NPC_BIT

#define COLLISION_WITH_NPC_BIT   0x2000

Definition at line 151 of file macros.h.

Referenced by check_for_interactables(), and should_continue_inspect().

◆ COLLISION_WITH_ENTITY_BIT

◆ ENTITY_COLLIDER_ID

#define ENTITY_COLLIDER_ID ( entityIndex)    (entityIndex | COLLISION_WITH_ENTITY_BIT)

Definition at line 154 of file macros.h.

◆ NO_COLLIDER

#define NO_COLLIDER   -1

Definition at line 156 of file macros.h.

Referenced by action_hammer_end_swing(), action_hammer_play_hit_fx(), action_hammer_test_swing_collision(), action_update_hammer(), action_update_hit_fire(), action_update_knockback(), action_update_sliding(), action_update_spin(), action_update_spin_jump(), action_update_step_up(), action_update_tornado_jump(), action_update_use_munchlesia(), action_update_use_spinning_flower(), can_dismount(), check_for_interactables(), check_for_treadmill_overlaps(), clear_trigger_data(), collision_check_player_intersecting_world(), collision_lateral_peach(), collision_main_above(), collision_main_lateral(), create_npc_impl(), entity_BlueWarpPipe_wait_for_player_to_get_off(), entity_raycast_down(), entity_Signpost_idle(), func_800E06D8(), func_800E4404(), handle_jumping_land_on_switch(), initialize_jump(), interact_inspect_dismiss(), npc_raycast_down(), npc_raycast_down_around(), npc_raycast_down_sides(), npc_raycast_general(), npc_raycast_up(), npc_raycast_up_corner(), npc_raycast_up_corners(), npc_test_move_complex_with_slipping(), npc_test_move_simple_with_slipping(), npc_test_move_simple_without_slipping(), npc_test_move_taller_with_slipping(), npc_test_move_with_slipping(), npc_test_move_without_slipping(), peach_disguise_check_overlaps(), phys_check_interactable_collision(), phys_main_collision_below(), phys_update_standard(), player_check_collision_below(), player_handle_floor_collider_type(), player_jump(), player_raycast_below(), player_raycast_down(), player_raycast_general(), player_raycast_up_corner(), player_raycast_up_corners(), player_test_lateral_overlap(), player_test_move_with_slipping(), player_test_move_without_slipping(), should_continue_inspect(), test_for_water_level(), test_mounting_height_adjustment(), test_ray_colliders(), test_ray_entities(), test_ray_to_wall_center(), test_ray_zone_aabb(), test_ray_zones(), update_npcs(), update_player(), update_riding_physics(), and update_riding_physics().

◆ NPC_DISPOSE_LOCATION

#define NPC_DISPOSE_LOCATION   0,-1000,0

Definition at line 158 of file macros.h.

Referenced by A(), A(), and A().

◆ NPC_DISPOSE_POS_X

#define NPC_DISPOSE_POS_X   0

◆ NPC_DISPOSE_POS_Y

#define NPC_DISPOSE_POS_Y   -1000

◆ NPC_DISPOSE_POS_Z

#define NPC_DISPOSE_POS_Z   0

◆ PACK_FILL_COLOR

#define PACK_FILL_COLOR ( r,
g,
b,
a )   (GPACK_RGBA5551(r, g, b, a) << 0x10) | GPACK_RGBA5551(r, g, b, a)

◆ PACK_FILL_DEPTH

#define PACK_FILL_DEPTH ( z,
dz )   (GPACK_ZDZ(z, dz) << 0x10) | GPACK_ZDZ(z, dz)

Definition at line 164 of file macros.h.

Referenced by gfx_draw_background(), and tattle_cam_pre_render().

◆ SQ

#define SQ ( x)    ((x) * (x))

Definition at line 166 of file macros.h.

Referenced by action_update_peach_land(), action_update_peach_step_down_land(), action_update_run(), action_update_walk(), appendGfx_shading_palette(), appendGfx_title_screen(), apply_constraints_to_lead_amount(), apply_fixed_orientation(), au_syn_set_mixer_params(), au_syn_set_volume_delta(), au_syn_start_voice_params(), butterflies_update(), calculate_line_segment_intersection(), calculate_segment_intersection(), check_conversation_trigger(), collision_main_lateral(), create_camera_leadplayer_matrix(), create_shading_palette(), damage_stars_main(), dist2D(), dist3D(), effect_3D_main(), effect_65_update(), get_maximum_interp_delta(), get_movement_from_input(), get_player_normal_pitch(), GetFirstTriangleNormal(), length2D(), lightning_bolt_main(), load_hit_data(), load_path_data(), moving_cloud_main(), npc_do_other_npc_collision(), npc_do_player_collision(), npc_surface_spawn_cloud_fx(), npc_test_move_with_slipping(), nuAuPreNMIProc(), pause_map_update(), PiranhaPlantAI_10(), player_surface_spawn_cloud_fx(), purple_ring_main(), set_camera_from_rig(), spiky_white_aura_main(), star_main(), star_update(), sun_update(), test_first_strike(), test_first_strike(), test_item_entity_position(), test_item_player_collision(), test_ray_entities(), update_camera_from_controller(), update_camera_interp_pos(), update_camera_minimal(), update_camera_no_interp(), update_camera_unused_ahead(), update_camera_unused_confined(), update_camera_unused_leading(), update_camera_unused_radial(), update_collider_transform(), update_encounters_neutral(), update_entity_inverse_rotation_matrix(), update_lerp(), update_lerp_battle(), update_locomotion_state(), and update_player_shadow().

◆ CUBE

#define CUBE ( x)    ((x) * (x) * (x))

Definition at line 167 of file macros.h.

Referenced by update_lerp(), and update_lerp_battle().

◆ QUART

#define QUART ( x)    ((x) * (x) * (x) * (x))

Definition at line 168 of file macros.h.

Referenced by update_lerp(), and update_lerp_battle().

◆ F16

#define F16 ( f)    (s16)(f * 327.67f)

Fixed-point short literal.

Definition at line 171 of file macros.h.

◆ X10

◆ _NS

#define _NS ( w,
x,
y,
z )   w ## _ ## x ## y ## z

Definition at line 176 of file macros.h.

◆ NS

#define NS ( w,
x,
y,
z )   _NS(w, x, y, z)

Definition at line 177 of file macros.h.

◆ ASCII_TO_U32

#define ASCII_TO_U32 ( a,
b,
c,
d )   ((u32)((a << 24) | (b << 16) | (c << 8) | (d << 0)))

Definition at line 179 of file macros.h.

Referenced by func_80055068(), is_debug_init(), and is_debug_print().

◆ ITEM_VIS_GROUP

#define ITEM_VIS_GROUP ( itemID,
visGroupID )   ((visGroupID) << 16 | (itemID))

Definition at line 181 of file macros.h.

◆ PACK_ROOM_FLAGS

#define PACK_ROOM_FLAGS ( itemVisGroup,
roomFlags )   ((itemVisGroup) << 12 | (roomFlags))

Definition at line 182 of file macros.h.

◆ LOAD_INTEGRATOR_FALL

#define LOAD_INTEGRATOR_FALL ( ptr)
Value:
(ptr)[0] = 0.11430f; \
(ptr)[1] = -0.28710f; \
(ptr)[2] = -0.18230f; \
(ptr)[3] = 0.01152f; \

Definition at line 186 of file macros.h.

186

Referenced by action_update_hit_lava(), action_update_sliding(), handle_jumping_launch(), and start_falling().

◆ AI_TEMP_STATE

#define AI_TEMP_STATE   functionTemp[0]

Definition at line 194 of file macros.h.

◆ AI_TEMP_STATE_AFTER_SUSPEND

#define AI_TEMP_STATE_AFTER_SUSPEND   functionTemp[1]

Definition at line 195 of file macros.h.

◆ AI_PATROL_GOAL_INDEX

#define AI_PATROL_GOAL_INDEX   functionTemp[2]

Definition at line 196 of file macros.h.

◆ AI_VAR_ATTACK_STATE

#define AI_VAR_ATTACK_STATE   varTable[0]

Definition at line 198 of file macros.h.

◆ AI_VAR_MELEE_PRE_TIME

#define AI_VAR_MELEE_PRE_TIME   varTable[1]

Definition at line 199 of file macros.h.

◆ AI_VAR_MELEE_HIT_TIME

#define AI_VAR_MELEE_HIT_TIME   varTable[2]

Definition at line 200 of file macros.h.

◆ AI_VAR_MELEE_MISS_TIME

#define AI_VAR_MELEE_MISS_TIME   varTable[3]

Definition at line 201 of file macros.h.

◆ AI_VAR_NEXT_STATE

#define AI_VAR_NEXT_STATE   varTable[7]

Definition at line 202 of file macros.h.

◆ AI_VAR_HITNPC_YOFFSET

#define AI_VAR_HITNPC_YOFFSET   varTable[0]

Definition at line 204 of file macros.h.

◆ AI_VAR_HITNPC_DIST

#define AI_VAR_HITNPC_DIST   varTable[1]

Definition at line 205 of file macros.h.

◆ AI_VAR_HITNPC_2

#define AI_VAR_HITNPC_2   varTable[2]

Definition at line 206 of file macros.h.

◆ AI_VAR_HITNPC_3

#define AI_VAR_HITNPC_3   varTable[3]

Definition at line 207 of file macros.h.

◆ AI_VAR_HITNPC_4

#define AI_VAR_HITNPC_4   varTable[4]

Definition at line 208 of file macros.h.

◆ AI_VAR_HITNPC_SOUND

#define AI_VAR_HITNPC_SOUND   varTable[15]

Definition at line 209 of file macros.h.

◆ VAR_PROJECTILE_HITBOX_STATE

#define VAR_PROJECTILE_HITBOX_STATE   varTable[0]

Definition at line 211 of file macros.h.

◆ AI_PROJECTILE_AMMO_COUNT

#define AI_PROJECTILE_AMMO_COUNT   varTable[3]

Definition at line 212 of file macros.h.

◆ INTEGER_LOG2

#define INTEGER_LOG2 ( x)    ((x) <= 2 ? 1 : (x) <= 4 ? 2 : (x) <= 8 ? 3 : (x) <= 16 ? 4 : (x) <= 32 ? 5 : (x) <= 64 ? 6 : (x) <= 128 ? 7 : (x) <= 256 ? 8 : (x) <= 512 ? 9 : 10)

◆ FOLIAGE_MODEL_LIST

#define FOLIAGE_MODEL_LIST ( names...)
Value:
{ \
.count = __NARG__(names), \
.models = { names } \
}
#define __NARG__(args...)
Definition macros.h:783

Definition at line 216 of file macros.h.

216
217#define Return EVT_CMD(EVT_OP_RETURN),
218

◆ STATUS_KEY_IGNORE_RES

#define STATUS_KEY_IGNORE_RES   0xFE

Definition at line 222 of file macros.h.

Referenced by try_inflict_status().

◆ STATUS_KEY_NEVER

#define STATUS_KEY_NEVER   0xFF

Definition at line 223 of file macros.h.

◆ DMG_STATUS_KEY

#define DMG_STATUS_KEY ( typeFlag,
duration,
chance )   (STATUS_FLAG_80000000 | typeFlag | (duration << 8) | chance)

Definition at line 224 of file macros.h.

◆ DMG_STATUS_ALWAYS

#define DMG_STATUS_ALWAYS ( typeFlag,
duration )   (STATUS_FLAG_80000000 | STATUS_FLAG_RIGHT_ON | typeFlag | (duration << 8))

Definition at line 225 of file macros.h.

◆ DMG_STATUS_IGNORE_RES

#define DMG_STATUS_IGNORE_RES ( typeFlag,
duration )   (STATUS_KEY_IGNORE_RES | typeFlag | (duration << 8))

Definition at line 226 of file macros.h.

◆ _RDP_WHOLE

#define _RDP_WHOLE ( x)    (((s32)(x * 65536.0) >> 16) & 0xFFFF)

Definition at line 228 of file macros.h.

◆ _RDP_FRAC

#define _RDP_FRAC ( x)    ((s32)(x * 65536.0) & 0xFFFF)

Definition at line 229 of file macros.h.

◆ _RDP_PACK_WHOLE

#define _RDP_PACK_WHOLE ( a,
b )   (_RDP_WHOLE(a) << 16) | _RDP_WHOLE(b)

Definition at line 230 of file macros.h.

◆ _RDP_PACK_FRAC

#define _RDP_PACK_FRAC ( a,
b )   (_RDP_FRAC(a) << 16) | _RDP_FRAC(b)

Definition at line 231 of file macros.h.

◆ RDP_MATRIX

#define RDP_MATRIX ( Ax,
Bx,
Cx,
Dx,
Ay,
By,
Cy,
Dy,
Az,
Bz,
Cz,
Dz,
Aw,
Bw,
Cw,
Dw )
Value:
{ \
.m = { \
{ \
_RDP_PACK_WHOLE(Ax, Ay), \
_RDP_PACK_WHOLE(Az, Aw), \
_RDP_PACK_WHOLE(Bx, By), \
_RDP_PACK_WHOLE(Bz, Bw), \
}, \
{ \
_RDP_PACK_WHOLE(Cx, Cy), \
_RDP_PACK_WHOLE(Cz, Cw), \
_RDP_PACK_WHOLE(Dx, Dy), \
_RDP_PACK_WHOLE(Dz, Dw), \
}, \
{ \
_RDP_PACK_FRAC(Ax, Ay), \
_RDP_PACK_FRAC(Az, Aw), \
_RDP_PACK_FRAC(Bx, By), \
_RDP_PACK_FRAC(Bz, Bw), \
}, \
{ \
_RDP_PACK_FRAC(Cx, Cy), \
_RDP_PACK_FRAC(Cz, Cw), \
_RDP_PACK_FRAC(Dx, Dy), \
_RDP_PACK_FRAC(Dz, Dw), \
} \
} \
};

Definition at line 233 of file macros.h.

◆ UNPACK_PAL_R

◆ UNPACK_PAL_G

◆ UNPACK_PAL_B

◆ UNPACK_PAL_A

◆ PACK_PAL_RGBA

◆ PM_RM_SHROUD

#define PM_RM_SHROUD   GBL_c1(G_BL_CLR_BL, G_BL_A_FOG, G_BL_CLR_IN, G_BL_1MA)

Definition at line 274 of file macros.h.

Referenced by appendGfx_model(), and draw_box().

◆ PM_CC_01

◆ PM_CC_02

◆ PM_CC_03

#define PM_CC_03   TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0

Definition at line 278 of file macros.h.

◆ PM_CC_04

#define PM_CC_04   PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0

Definition at line 279 of file macros.h.

◆ PM_CC_05

#define PM_CC_05   TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0

Definition at line 280 of file macros.h.

Referenced by imgfx_appendGfx_mesh_strip().

◆ PM_CC_06

#define PM_CC_06   COMBINED, 0, PRIMITIVE_ALPHA, 0, 0, 0, 0, COMBINED

Definition at line 281 of file macros.h.

◆ PM_CC_07

#define PM_CC_07   0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0

◆ PM_CC_PRIM_FULL_ALPHA

#define PM_CC_PRIM_FULL_ALPHA   0, 0, 0, PRIMITIVE, 0, 0, 0, 1

◆ PM_CC_PRIM_NO_ALPHA

#define PM_CC_PRIM_NO_ALPHA   0, 0, 0, PRIMITIVE, 0, 0, 0, 0

Definition at line 284 of file macros.h.

◆ PM_CC_0A

#define PM_CC_0A   0, 0, 0, 0, ENVIRONMENT, 0, TEXEL0, 0

Definition at line 285 of file macros.h.

Referenced by imgfx_appendGfx_mesh_basic(), and spr_appendGfx_component_flat().

◆ PM_CC_0B

#define PM_CC_0B   0, 0, 0, 0, ENVIRONMENT, 0, TEXEL1, 0

Definition at line 287 of file macros.h.

Referenced by imgfx_appendGfx_mesh_basic(), and spr_appendGfx_component_flat().

◆ PM_CC_0D

#define PM_CC_0D   0, 0, 0, 0, SHADE, 0, TEXEL1, 0

Definition at line 288 of file macros.h.

Referenced by imgfx_appendGfx_mesh_basic().

◆ PM_CC_0C

#define PM_CC_0C   0, 0, 0, 0, 0, 0, 0, COMBINED

Definition at line 289 of file macros.h.

Referenced by imgfx_appendGfx_mesh_basic(), and spr_appendGfx_component_flat().

◆ PM_CC_0E

#define PM_CC_0E   0, 0, 0, TEXEL0, 0, 0, 0, 0

Definition at line 291 of file macros.h.

◆ PM_CC_0F

#define PM_CC_0F   0, 0, 0, TEXEL0, 0, 0, 0, 1

Definition at line 292 of file macros.h.

Referenced by appendGfx_darkness_stencil(), and msg_draw_speech_arrow().

◆ PM_CC_10

#define PM_CC_10   0, 0, 0, TEXEL0, 0, 0, 0, PRIMITIVE

Definition at line 293 of file macros.h.

Referenced by appendGfx_draw_prev_frame_buffer(), and msg_draw_frame().

◆ PM_CC_11

#define PM_CC_11   0, 0, 0, TEXEL0, SHADE, 0, TEXEL0, 0

◆ PM_CC_12

#define PM_CC_12   0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0

◆ PM_CC_MSG_UP_ARROW

#define PM_CC_MSG_UP_ARROW
Value:
TEXEL0, 0, PRIMITIVE, 0, \
0, 0, 0, TEXEL1

Definition at line 297 of file macros.h.

297
298#define EndIf EVT_CMD(EVT_OP_END_IF),
299

◆ PM_CC_14

#define PM_CC_14   PRIMITIVE, ENVIRONMENT, TEXEL1, ENVIRONMENT, PRIMITIVE, 0, TEXEL1, 0

Definition at line 301 of file macros.h.

◆ PM_CC_15

#define PM_CC_15   PRIMITIVE, ENVIRONMENT, TEXEL1, ENVIRONMENT, 0, 0, 0, TEXEL1

Definition at line 302 of file macros.h.

◆ PM_CC2_MULTIPLY_PRIM

#define PM_CC2_MULTIPLY_PRIM   COMBINED, 0, PRIMITIVE, 0, 0, 0, 0, COMBINED

Definition at line 305 of file macros.h.

Referenced by quizmo_stage_appendGfx().

◆ PM_CC2_MULTIPLY_SHADE

#define PM_CC2_MULTIPLY_SHADE   COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED

Definition at line 308 of file macros.h.

Referenced by appendGfx_animator_node(), appendGfx_entity_model(), and draw_entity_model_E().

◆ PM_CC_NOISE

#define PM_CC_NOISE   NOISE, 0, SHADE_ALPHA, 0, 0, 0, 0, 1

Definition at line 310 of file macros.h.

◆ PM_CC_1A

#define PM_CC_1A   TEXEL0, 0, PRIMITIVE_ALPHA, PRIMITIVE, 0, 0, 0, TEXEL0

Definition at line 312 of file macros.h.

◆ PM_CC_TINT_DEPTH_NOTEX

#define PM_CC_TINT_DEPTH_NOTEX
Value:
SHADE, 0, PRIMITIVE_ALPHA, PRIMITIVE, \
0, 0, 0, SHADE

Definition at line 318 of file macros.h.

318
319#define CaseEq(RVAR) EVT_CMD(EVT_OP_CASE_EQ, RVAR),
320

◆ PM_CC_TINT_DEPTH_NO_SHADE

#define PM_CC_TINT_DEPTH_NO_SHADE
Value:
COMBINED, 0, PRIMITIVE_ALPHA, PRIMITIVE, \
0, 0, 0, COMBINED

Definition at line 326 of file macros.h.

326
328#define CaseGt(RVAR) EVT_CMD(EVT_OP_CASE_GT, RVAR),

◆ PM_CC_20

#define PM_CC_20
Value:
COMBINED, PRIMITIVE, PRIMITIVE_ALPHA, COMBINED, \
0, 0, 0, COMBINED

Definition at line 332 of file macros.h.

332
334#define CaseGe(RVAR) EVT_CMD(EVT_OP_CASE_GE, RVAR),

◆ PM_CC_TINT_DEPTH_MIPMAPS

#define PM_CC_TINT_DEPTH_MIPMAPS
Value:
COMBINED, 0, SHADE, PRIMITIVE, \
0, 0, 0, COMBINED

Definition at line 336 of file macros.h.

336
337#define CaseDefault EVT_CMD(EVT_OP_CASE_DEFAULT),
338

◆ PM_CC_TINT_REMAP_NOTEX

#define PM_CC_TINT_REMAP_NOTEX
Value:
SHADE, 0, PRIMITIVE, ENVIRONMENT, \
0, 0, 0, SHADE

Definition at line 343 of file macros.h.

343
345#define CaseAndEq(RVAR) EVT_CMD(EVT_OP_CASE_AND_EQ, RVAR),

◆ PM_CC_TINT_REMAP_NO_SHADE

#define PM_CC_TINT_REMAP_NO_SHADE
Value:
COMBINED, 0, PRIMITIVE, ENVIRONMENT, \
0, 0, 0, COMBINED

Definition at line 351 of file macros.h.

351
352#define EndCaseGroup EVT_CMD(EVT_OP_END_CASE_GROUP),
353

◆ PM_CC_TINT_REMAP_SHADE_ALPHA

#define PM_CC_TINT_REMAP_SHADE_ALPHA
Value:
COMBINED, 0, PRIMITIVE, ENVIRONMENT, \
COMBINED, 0, SHADE, 0

Definition at line 359 of file macros.h.

359#define BreakSwitch EVT_CMD(EVT_OP_BREAK_SWITCH),
360

◆ PM_CC_22

#define PM_CC_22   TEXEL0, TEXEL1, SHADE_ALPHA, TEXEL1, 0, 0, 0, TEXEL0

Definition at line 363 of file macros.h.

◆ PM_CC_23

#define PM_CC_23   1, TEXEL0, PRIMITIVE, TEXEL0, 0, 0, 0, TEXEL0

Definition at line 364 of file macros.h.

◆ PM_CC1_24

#define PM_CC1_24   1, TEXEL0, PRIMITIVE, TEXEL0, 1, TEXEL0, TEXEL1, TEXEL0

Definition at line 365 of file macros.h.

◆ PM_CC2_24

#define PM_CC2_24   1, TEXEL1, TEXEL0, COMBINED, 0, 0, 0, COMBINED

Definition at line 366 of file macros.h.

◆ PM_CC_TEX_COMBINE_3A

#define PM_CC_TEX_COMBINE_3A   0, 0, 0, 0, TEXEL0, TEXEL1, SHADE, 0

Definition at line 368 of file macros.h.

◆ PM_CC_TEX_COMBINE_3B

#define PM_CC_TEX_COMBINE_3B   0, 0, 0, SHADE, 0, 0, 0, COMBINED

Definition at line 369 of file macros.h.

◆ PM_CC_TEX_COMBINE_3C

#define PM_CC_TEX_COMBINE_3C   SHADE, 0, PRIMITIVE, ENVIRONMENT, 0, 0, 0, COMBINED

Definition at line 370 of file macros.h.

◆ PM_CC1_29

#define PM_CC1_29   TEXEL0, SHADE, TEXEL0, TEXEL0, 1, TEXEL1, TEXEL0, TEXEL1

Definition at line 372 of file macros.h.

◆ PM_CC2_29

#define PM_CC2_29   TEXEL0, COMBINED, TEXEL0_ALPHA, TEXEL0, 1, TEXEL0, TEXEL1, TEXEL0

Definition at line 373 of file macros.h.

◆ PM_CC_ALT_INTERFERENCE

#define PM_CC_ALT_INTERFERENCE
Value:
TEXEL1, 0, TEXEL0, 0, \
TEXEL1, 0, TEXEL0, 0

Definition at line 376 of file macros.h.

376#define Add(VAR, INT_VALUE) EVT_CMD(EVT_OP_ADD, VAR, INT_VALUE),
377#define Sub(VAR, INT_VALUE) EVT_CMD(EVT_OP_SUB, VAR, INT_VALUE),
378#define Mul(VAR, INT_VALUE) EVT_CMD(EVT_OP_MUL, VAR, INT_VALUE),

Referenced by entity_Tweester_setupGfx().

◆ PM_CC_2B

#define PM_CC_2B   PRIMITIVE, 0, TEXEL1, 0, 0, 0, 0, TEXEL1

Definition at line 380 of file macros.h.

◆ PM_CC_2C

#define PM_CC_2C   PRIMITIVE, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0

Definition at line 381 of file macros.h.

◆ PM_CC_2D

#define PM_CC_2D   PRIMITIVE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0

Definition at line 382 of file macros.h.

◆ PM_CC_2E

#define PM_CC_2E   0, 0, 0, TEXEL0, TEXEL1, 0, PRIMITIVE, 0

Definition at line 383 of file macros.h.

◆ PM_CC_2F

#define PM_CC_2F   PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, TEXEL0, 0

Definition at line 384 of file macros.h.

Referenced by appendGfx_item_entity(), hud_element_draw_rect(), and render_item_entities().

◆ PM_CC_32

#define PM_CC_32   PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, PRIMITIVE, 0

Definition at line 385 of file macros.h.

Referenced by appendGfx_item_entity(), hud_element_draw_rect(), and render_item_entities().

◆ PM_CC_33

#define PM_CC_33   ENVIRONMENT, PRIMITIVE, COMBINED, PRIMITIVE, COMBINED, 0, PRIMITIVE, 0

Definition at line 387 of file macros.h.

◆ PM_CC_34

#define PM_CC_34   TEXEL0, CENTER, SCALE, ENVIRONMENT, 0, 0, 0, TEXEL0

Definition at line 389 of file macros.h.

◆ PM_CC_35

#define PM_CC_35   0, PRIMITIVE, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED

Definition at line 390 of file macros.h.

◆ PM_CC_36

#define PM_CC_36   TEXEL0, TEXEL1, TEXEL0, TEXEL1, 1, TEXEL0, TEXEL1, 1

Definition at line 392 of file macros.h.

◆ PM_CC_37

#define PM_CC_37   0, 0, 0, COMBINED, COMBINED, TEXEL1, TEXEL1, TEXEL1

Definition at line 393 of file macros.h.

◆ PM_CC_38

#define PM_CC_38   TEXEL1, K4, PRIMITIVE_ALPHA, TEXEL0, TEXEL0, TEXEL1, ENVIRONMENT, ENVIRONMENT

Definition at line 395 of file macros.h.

◆ PM_CC_39

#define PM_CC_39   TEXEL1, K4, COMBINED_ALPHA, COMBINED, 0, 0, 0, 1

Definition at line 396 of file macros.h.

◆ PM_CC_3A

#define PM_CC_3A   0, 0, 0, PRIMITIVE, 1, TEXEL0, PRIMITIVE, TEXEL0

Definition at line 398 of file macros.h.

◆ PM_CC_SCREEN_OVERLAY

#define PM_CC_SCREEN_OVERLAY
Value:
0, 0, 0, SHADE, \
1, 0, PRIMITIVE, 0

Definition at line 400 of file macros.h.

400
401#define BufRead4(VAR1, VAR2, VAR3, VAR4) EVT_CMD(EVT_OP_BUF_READ4, VAR1, VAR2, VAR3, VAR4),
402

◆ PM_CC_3C

#define PM_CC_3C   0, 0, 0, PRIMITIVE, SHADE, 0, PRIMITIVE, 0

Definition at line 404 of file macros.h.

Referenced by ice_shard_appendGfx().

◆ PM_CC_3D

#define PM_CC_3D   SHADE, ENVIRONMENT, TEXEL0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0

Definition at line 406 of file macros.h.

Referenced by spr_appendGfx_component_flat().

◆ PM_CC_3F

#define PM_CC_3F   TEXEL0, 0, SHADE, 0, SHADE, 0, PRIMITIVE, 0

Definition at line 408 of file macros.h.

◆ PM_CC_RESET_TILES

#define PM_CC_RESET_TILES   0, 0, 0, 0, 0, 0, 0, TEXEL0

Definition at line 413 of file macros.h.

Referenced by appendGfx_reset_tile_pattern().

◆ PM_CC_FLOWER_GATE_GLOW

#define PM_CC_FLOWER_GATE_GLOW   0, 0, 0, 1, SHADE, 0, PRIMITIVE, 0

Definition at line 418 of file macros.h.

◆ PM_CC_KKJ_SPILL_LIGHT

#define PM_CC_KKJ_SPILL_LIGHT   TEXEL0, 0, SHADE, 0, 0, 0, 0, PRIMITIVE

Definition at line 423 of file macros.h.

◆ PM_CC_KKJ14_FIRE

#define PM_CC_KKJ14_FIRE   0, 0, 0, COMBINED, 0, 0, 0, PRIMITIVE

Definition at line 427 of file macros.h.

◆ PM_CC_DAMAGE_INDICATOR

#define PM_CC_DAMAGE_INDICATOR   1, 0, SHADE, PRIMITIVE, PRIMITIVE, 0, TEXEL0, 0

Definition at line 431 of file macros.h.

Referenced by damage_indicator_render_impl().

◆ PM_CC1_SHADOW

#define PM_CC1_SHADOW   0, 0, 0, 0, PRIMITIVE, 0, TEXEL0, 0

Definition at line 434 of file macros.h.

Referenced by entity_model_set_shadow_color().

◆ PM_CC2_SHADOW

#define PM_CC2_SHADOW   0, 0, 0, 0, TEXEL0, 0, PRIMITIVE, 0

Definition at line 435 of file macros.h.

Referenced by entity_model_set_shadow_color().

◆ PM_CC_WINDOW_2

#define PM_CC_WINDOW_2   PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, TEXEL1

Definition at line 438 of file macros.h.

◆ PM_CC_WINDOW_3

#define PM_CC_WINDOW_3   PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL1, 0

Definition at line 439 of file macros.h.

◆ PM_CC_WINDOW_4

#define PM_CC_WINDOW_4   PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, PRIMITIVE

Definition at line 440 of file macros.h.

◆ PM_CC_WINDOW_5

#define PM_CC_WINDOW_5   0, 0, 0, TEXEL1, 0, 0, 0, TEXEL1

Definition at line 441 of file macros.h.

Referenced by func_801491E4().

◆ PM_CC_WINDOW_6

#define PM_CC_WINDOW_6   0, 0, 0, TEXEL1, PRIMITIVE, 0, TEXEL1, 0

Definition at line 442 of file macros.h.

◆ PM_CC_WINDOW_7

#define PM_CC_WINDOW_7   PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, 0, 0, 0, 1

Definition at line 443 of file macros.h.

◆ PM_CC_WINDOW_1

#define PM_CC_WINDOW_1   COMBINED, 0, TEXEL0, 0, 0, 0, 0, COMBINED

Definition at line 445 of file macros.h.

◆ PM_CC_IMGFX_COLOR_FILL

#define PM_CC_IMGFX_COLOR_FILL   0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0

Definition at line 447 of file macros.h.

Referenced by imgfx_appendGfx_mesh().

◆ PM_CC_IMGFX_HOLOGRAM

#define PM_CC_IMGFX_HOLOGRAM   NOISE, PRIMITIVE, PRIMITIVE, TEXEL0, TEXEL0, 0, PRIMITIVE, 0

Definition at line 448 of file macros.h.

Referenced by imgfx_appendGfx_mesh().

◆ PM_CC_MSG_NOISE_OUTLINE

#define PM_CC_MSG_NOISE_OUTLINE   NOISE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0

Definition at line 450 of file macros.h.

Referenced by appendGfx_message().

◆ PM_CC_MSG_STATIC

#define PM_CC_MSG_STATIC   NOISE, TEXEL0, ENVIRONMENT, TEXEL0, 0, 0, 0, TEXEL0

Definition at line 451 of file macros.h.

Referenced by appendGfx_message().

◆ PM_CC_CANDLE_1

#define PM_CC_CANDLE_1   TEXEL0, TEXEL1, TEXEL0, 1, 1, TEXEL0, TEXEL1, 1

Definition at line 453 of file macros.h.

◆ PM_CC_CANDLE_2

#define PM_CC_CANDLE_2   0, PRIMITIVE, COMBINED, ENVIRONMENT, COMBINED, TEXEL1, TEXEL1, TEXEL1

Definition at line 454 of file macros.h.

◆ PM_CC_BOX1_OPAQUE

#define PM_CC_BOX1_OPAQUE   TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL1

Definition at line 456 of file macros.h.

◆ PM_CC_BOX2_OPAQUE

#define PM_CC_BOX2_OPAQUE   TEXEL0, 0, TEXEL1, 0, 0, 0, 0, TEXEL1

Definition at line 457 of file macros.h.

◆ PM_CC_BOX1_TRANSPARENT

#define PM_CC_BOX1_TRANSPARENT   TEXEL0, 0, PRIMITIVE, 0, TEXEL1, 0, PRIMITIVE, 0

Definition at line 458 of file macros.h.

◆ PM_CC_BOX2_TRANSPARENT

#define PM_CC_BOX2_TRANSPARENT   TEXEL0, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0

Definition at line 459 of file macros.h.

◆ PM_CC_BOX1_CYC2

#define PM_CC_BOX1_CYC2   TEXEL0, ENVIRONMENT, ENV_ALPHA, COMBINED, 0, 0, 0, COMBINED

Definition at line 461 of file macros.h.

◆ PM_CC_BOX2_CYC2

#define PM_CC_BOX2_CYC2   PRIMITIVE, ENVIRONMENT, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED

Definition at line 462 of file macros.h.

◆ PM_CC_30

#define PM_CC_30   1, 0, TEXEL1, 0, 0, 0, 0, TEXEL1

Definition at line 464 of file macros.h.

◆ PM_CC_31

#define PM_CC_31   1, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0

Definition at line 465 of file macros.h.

◆ PM_CC_42

#define PM_CC_42   TEXEL0, 0, SHADE, 0, TEXEL0, 0, 0, TEXEL0

Definition at line 467 of file macros.h.

Referenced by appendGfx_animator_node(), appendGfx_entity_model(), and draw_entity_model_E().

◆ PM_CC_43

#define PM_CC_43   PRIMITIVE, TEXEL0, PRIMITIVE_ALPHA, TEXEL0, 0, 0, 0, 1

Definition at line 469 of file macros.h.

Referenced by gfx_draw_background().

◆ PM_CC_44

#define PM_CC_44   PRIMITIVE, TEXEL1, PRIMITIVE_ALPHA, TEXEL1, 0, 0, 0, 1

Definition at line 470 of file macros.h.

Referenced by gfx_draw_background().

◆ PM_CC_45

#define PM_CC_45   TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0

Definition at line 472 of file macros.h.

Referenced by confetti_appendGfx().

◆ PM_CC_46

#define PM_CC_46   TEXEL0, ENVIRONMENT, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0

Definition at line 473 of file macros.h.

Referenced by confetti_appendGfx().

◆ PM_CC_47

#define PM_CC_47   TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0

Definition at line 474 of file macros.h.

Referenced by confetti_appendGfx(), hud_element_draw_rect(), and render_hud_element().

◆ PM_CC_48

#define PM_CC_48   PRIMITIVE, 0, PRIMITIVE_ALPHA, TEXEL0, 0, 0, 0, SHADE

Definition at line 476 of file macros.h.

Referenced by underwater_appendGfx().

◆ PM_CC_49

#define PM_CC_49   TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0

Definition at line 478 of file macros.h.

Referenced by func_E0080448(), func_E00826C4(), and func_E00AC2A4().

◆ PM_CC_4A

#define PM_CC_4A   TEXEL1, TEXEL0, ENV_ALPHA, TEXEL0, TEXEL1, TEXEL0, ENVIRONMENT, TEXEL0

Definition at line 480 of file macros.h.

Referenced by ring_blast_appendGfx().

◆ PM_CC_4B

#define PM_CC_4B   PRIMITIVE, CENTER, COMBINED, ENVIRONMENT, 0, 0, 0, COMBINED

Definition at line 481 of file macros.h.

Referenced by ring_blast_appendGfx().

◆ PM_CC_4C

#define PM_CC_4C   1, COMBINED, PRIMITIVE, COMBINED, 0, 0, 0, COMBINED

Definition at line 482 of file macros.h.

Referenced by ring_blast_appendGfx().

◆ PM_CC_4D

#define PM_CC_4D   ENVIRONMENT, PRIMITIVE, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0

Definition at line 483 of file macros.h.

Referenced by radiating_energy_orb_appendGfx().

◆ PM_CC_4E

#define PM_CC_4E   SHADE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, SHADE, 0

Definition at line 484 of file macros.h.

Referenced by effect_65_appendGfx().

◆ PM_CC_4F

#define PM_CC_4F   0, 0, 0, COMBINED, COMBINED, 0, PRIMITIVE, 0

Definition at line 485 of file macros.h.

Referenced by effect_65_appendGfx().

◆ PM_CC_50

#define PM_CC_50   TEXEL0, 0, TEXEL1, 0, 0, 0, 0, TEXEL1

Definition at line 487 of file macros.h.

Referenced by appendGfx_shading_palette().

◆ PM_CC_51

#define PM_CC_51   TEXEL0, 0, TEXEL1, 0, PRIMITIVE, 0, TEXEL1, 0

Definition at line 488 of file macros.h.

Referenced by appendGfx_shading_palette().

◆ PM_CC_52

#define PM_CC_52   SHADE, ENVIRONMENT, COMBINED, COMBINED, 0, 0, 0, COMBINED

Definition at line 489 of file macros.h.

Referenced by appendGfx_shading_palette().

◆ PM_CC_53

#define PM_CC_53   TEXEL1, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0

Definition at line 491 of file macros.h.

Referenced by appendGfx_shading_palette().

◆ PM_CC_54

#define PM_CC_54   COMBINED, TEXEL0, COMBINED_ALPHA, TEXEL0, PRIMITIVE, 0, TEXEL0, 0

Definition at line 492 of file macros.h.

Referenced by appendGfx_shading_palette().

◆ PM_CC_55

#define PM_CC_55   PRIMITIVE, ENVIRONMENT, TEXEL0_ALPHA, ENVIRONMENT, 0, 0, 0, 1

Definition at line 493 of file macros.h.

Referenced by appendGfx_shading_palette().

◆ PM_CC_56

#define PM_CC_56   0, 0, 0, 0, PRIMITIVE, TEXEL0, PRIMITIVE, 0

Definition at line 495 of file macros.h.

Referenced by appendGfx_darkness_stencil().

◆ PM_CC_57

#define PM_CC_57   1, TEXEL0, PRIMITIVE, 0, TEXEL0, 0, ENVIRONMENT, PRIMITIVE

Definition at line 496 of file macros.h.

Referenced by appendGfx_darkness_stencil().

◆ PM_CC_58

#define PM_CC_58   0, 0, 0, 0, 1, 0, ENVIRONMENT, PRIMITIVE

Definition at line 497 of file macros.h.

Referenced by appendGfx_darkness_stencil().

◆ PM_CC_59

#define PM_CC_59   0, 0, 0, 0, SHADE, 0, TEXEL0, 0

Definition at line 499 of file macros.h.

Referenced by imgfx_appendGfx_mesh_basic().

◆ PM_CC_5A

#define PM_CC_5A   SHADE, ENVIRONMENT, TEXEL0, TEXEL0, 0, 0, 0, TEXEL0

Definition at line 500 of file macros.h.

Referenced by imgfx_appendGfx_mesh_basic().

◆ PM_CC_5B

#define PM_CC_5B   1, PRIMITIVE, TEXEL0, PRIMITIVE, 0, 0, 0, TEXEL0

Definition at line 502 of file macros.h.

Referenced by imgfx_appendGfx_mesh().

◆ PM_CC_5C

#define PM_CC_5C   1, 0, TEXEL0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0

Definition at line 503 of file macros.h.

Referenced by imgfx_appendGfx_mesh().

◆ PM_CC_5D

#define PM_CC_5D   1, SHADE, TEXEL0, SHADE, 0, 0, 0, TEXEL0

Definition at line 504 of file macros.h.

Referenced by imgfx_appendGfx_mesh().

◆ PM_CC_5E

#define PM_CC_5E   1, SHADE, TEXEL0, SHADE, TEXEL0, 0, SHADE, 0

Definition at line 505 of file macros.h.

Referenced by imgfx_appendGfx_mesh().

◆ PM_CC_HOS_BG_SHADE

#define PM_CC_HOS_BG_SHADE   0, 0, 0, SHADE, SHADE, 0, PRIMITIVE, 0

Definition at line 507 of file macros.h.

◆ PM_CC_CONST_ALPHA_1

#define PM_CC_CONST_ALPHA_1   0, 0, 0, 0, 0, 0, 0, 1

Definition at line 509 of file macros.h.

◆ PM_CC_CONST_0

#define PM_CC_CONST_0   0, 0, 0, 0, 0, 0, 0, 0

Definition at line 510 of file macros.h.

◆ PM_CC_CONST_1

#define PM_CC_CONST_1   0, 0, 0, 1, 0, 0, 0, 1

Definition at line 511 of file macros.h.

Referenced by appendGfx_darkness_stencil().

◆ VLA

#define VLA

Definition at line 516 of file macros.h.

◆ DT

#define DT   (1.0f)

Definition at line 522 of file macros.h.

Referenced by _update_message(), and initialize_printer().

◆ DMA_COPY_SEGMENT

◆ NODISCARD

#define NODISCARD

Definition at line 530 of file macros.h.

◆ UNUSED

#define UNUSED

Definition at line 537 of file macros.h.

◆ NORETURN

#define NORETURN

Definition at line 544 of file macros.h.

◆ ALWAYS_INLINE

#define ALWAYS_INLINE   inline

Definition at line 551 of file macros.h.

◆ FALL_THROUGH

#define FALL_THROUGH

Definition at line 558 of file macros.h.

◆ OPTIMIZE_OG

#define OPTIMIZE_OG

Definition at line 565 of file macros.h.

◆ OPTIMIZE_OS

#define OPTIMIZE_OS

Definition at line 572 of file macros.h.

◆ OPTIMIZE_OFAST

#define OPTIMIZE_OFAST

Definition at line 579 of file macros.h.

◆ PACKED

#define PACKED

Definition at line 586 of file macros.h.

◆ ALIGNED4

#define ALIGNED4

Definition at line 593 of file macros.h.

◆ ALIGNED8

#define ALIGNED8

Definition at line 600 of file macros.h.

◆ ALIGNED16

#define ALIGNED16

Definition at line 607 of file macros.h.

◆ ALIGNED32

#define ALIGNED32

Definition at line 614 of file macros.h.

◆ ALIGNED64

#define ALIGNED64

Definition at line 621 of file macros.h.

◆ EVT_LOCAL_VAR_CUTOFF

#define EVT_LOCAL_VAR_CUTOFF   -20000000

Expressions in EVT instructions should be one of the following types:

  • Integer literals (as-is, s32)
  • Float literals (Float) - cast to int where a float is not accepted
  • Pointers, string literals (Ref)
  • Variables (LW, GW, LSW, GSW, UW)
  • Flags (LF, GF, LSWF, GSWF, UF) This is implemented in evt_get_variable and evt_get_float_variable. Decimal constant. Despite the name, "floats" are actually stored as fixed-point values.

Definition at line 24 of file macros.h.

Referenced by evt_get_float_variable(), evt_get_variable(), evt_get_variable_index(), evt_get_variable_index_alt(), evt_handle_print_debug_var(), evt_set_float_variable(), and evt_set_variable().

◆ EVT_LOCAL_VAR_OFFSET

#define EVT_LOCAL_VAR_OFFSET   30000000

Definition at line 25 of file macros.h.

◆ EVT_MAP_VAR_CUTOFF

◆ EVT_MAP_VAR_OFFSET

#define EVT_MAP_VAR_OFFSET   50000000

Definition at line 27 of file macros.h.

◆ EVT_LOCAL_FLAG_CUTOFF

◆ EVT_LOCAL_FLAG_OFFSET

#define EVT_LOCAL_FLAG_OFFSET   70000000

Definition at line 29 of file macros.h.

◆ EVT_MAP_FLAG_CUTOFF

◆ EVT_MAP_FLAG_OFFSET

#define EVT_MAP_FLAG_OFFSET   90000000

Definition at line 31 of file macros.h.

◆ EVT_AREA_FLAG_CUTOFF

#define EVT_AREA_FLAG_CUTOFF   -100000000

◆ EVT_AREA_FLAG_OFFSET

#define EVT_AREA_FLAG_OFFSET   110000000

Definition at line 33 of file macros.h.

◆ EVT_GAME_FLAG_CUTOFF

◆ EVT_GAME_FLAG_OFFSET

#define EVT_GAME_FLAG_OFFSET   130000000

Definition at line 35 of file macros.h.

◆ EVT_AREA_BYTE_CUTOFF

#define EVT_AREA_BYTE_CUTOFF   -140000000

◆ EVT_AREA_BYTE_OFFSET

#define EVT_AREA_BYTE_OFFSET   150000000

Definition at line 37 of file macros.h.

◆ EVT_GAME_BYTE_CUTOFF

◆ EVT_GAME_BYTE_OFFSET

#define EVT_GAME_BYTE_OFFSET   170000000

Definition at line 39 of file macros.h.

◆ EVT_ARRAY_VAR_CUTOFF

◆ EVT_ARRAY_VAR_OFFSET

#define EVT_ARRAY_VAR_OFFSET   190000000

Definition at line 41 of file macros.h.

◆ EVT_ARRAY_FLAG_CUTOFF

#define EVT_ARRAY_FLAG_CUTOFF   -200000000

◆ EVT_ARRAY_FLAG_OFFSET

#define EVT_ARRAY_FLAG_OFFSET   210000000

Definition at line 43 of file macros.h.

◆ EVT_FIXED_CUTOFF

◆ EVT_FIXED_OFFSET

#define EVT_FIXED_OFFSET   230000000

Definition at line 45 of file macros.h.

Referenced by evt_float_to_fixed_var().

◆ EVT_IGNORE_ARG

#define EVT_IGNORE_ARG   -250000000

◆ EVT_LIMIT

◆ FLOAT_ROUND

#define FLOAT_ROUND ( x)    ((x) >=0 ? (f64)((x) + 0.9) : (f64)(x))

Definition at line 50 of file macros.h.

◆ Float

#define Float ( DOUBLE)    ((Bytecode)FLOAT_ROUND(((DOUBLE) * 1024.0f)) - EVT_FIXED_OFFSET)

Definition at line 51 of file macros.h.

Referenced by A(), A(), and A().

◆ EVT_FIXED_TO_FLOAT

#define EVT_FIXED_TO_FLOAT ( x)    ({f32 var = (x) + EVT_FIXED_OFFSET; var /= 1024.0f; var;})

Progammatically converts Float --> f32.

Definition at line 54 of file macros.h.

Referenced by evt_fixed_var_to_float().

◆ FLOAT_TO_FIXED

#define FLOAT_TO_FIXED ( x)    (((x) * 1024.0f) + -EVT_FIXED_OFFSET)

Progammatically converts f32 --> Float.

Definition at line 57 of file macros.h.

◆ Ref

#define Ref ( sym)    ((Bytecode) &(sym))

Address/pointer constant.

Definition at line 60 of file macros.h.

Referenced by A(), and A().

◆ LocalVar

#define LocalVar ( INDEX)    ((INDEX) - EVT_LOCAL_VAR_OFFSET)

Local Word.

A variable local to the current thread. LWs are copied to any threads created by this one (Exec, ExecWait, Thread, ChildThread). Additionally, ExecWait copies LWs back from the spawned thread when it completes.

Range: 0 <= v < 0x10

Definition at line 67 of file macros.h.

◆ MapVar

#define MapVar ( INDEX)    ((INDEX) - EVT_MAP_VAR_OFFSET)

Global Word.

A variable global to all threads. Cleared upon entering a new map.

Range: 0 <= v < 0x10

Definition at line 73 of file macros.h.

◆ LocalFlag

#define LocalFlag ( INDEX)    ((INDEX) - EVT_LOCAL_FLAG_OFFSET)

Local Flag.

A boolean variable local to the current thread. LFs are copied to any threads created by this one (Exec, ExecWait, Thread, ChildThread). Additionally, ExecWait copies LFs back from the spawned thread when it completes.

Range: 0 <= v < 0x60

Definition at line 80 of file macros.h.

◆ MapFlag

#define MapFlag ( INDEX)    ((INDEX) - EVT_MAP_FLAG_OFFSET)

Global Flag.

A boolean variable global to all threads. Cleared upon entering a new map.

Range: 0 <= v < 0x60

Definition at line 86 of file macros.h.

◆ AreaFlag

#define AreaFlag ( INDEX)    ((INDEX) - EVT_AREA_FLAG_OFFSET)

Local Save World Flag.

A boolean variable local to the current world area, saved in the savefile. Cleared upon entering a new world area.

Used to track whether items that respawn, such as coins, Goomnuts, or Koopa Leaves, have been collected.

Range: 0 <= v < 0x100

Definition at line 94 of file macros.h.

◆ GameFlag

#define GameFlag ( INDEX)    ((INDEX) - EVT_GAME_FLAG_OFFSET)

Global Save World Flag.

A boolean variable saved in the savefile.

Used to track whether badges, items, etc. have been collected or whether NPCs have been interacted with.

Range: 0 <= v < 0x800

Definition at line 101 of file macros.h.

◆ AreaByte

#define AreaByte ( INDEX)    ((INDEX) - EVT_AREA_BYTE_OFFSET)

Local Saved Byte.

A variable local to the current world area, saved in the savefile. Cleared upon a new world area.

Rarely used. Most common use is for NPCs with dialogue that changes depending on the number of times you have interacted with them in their 'recent memory' (i.e. until you leave the area).

Range: 0 <= v < 0x10

Definition at line 110 of file macros.h.

◆ GameByte

#define GameByte ( INDEX)    ((INDEX) - EVT_GAME_BYTE_OFFSET)

Global Saved Byte.

A variable saved in the save file.

Used for almost all savefile state.

Definition at line 115 of file macros.h.

◆ ArrayVar

#define ArrayVar ( INDEX)    ((INDEX) - EVT_ARRAY_VAR_OFFSET)

User Word.

A variable stored within the current thread's array. You can load an array with UseArray or temporarily allocate one with MallocArray, then get/set values with the ArrayVar(index) macro.

Range: 0 <= v

Definition at line 122 of file macros.h.

◆ ArrayFlag

#define ArrayFlag ( INDEX)    ((INDEX) - EVT_ARRAY_FLAG_OFFSET)

User Flag.

A boolean variable stored within the current thread's flag array. The flag array is distinct from the word array (unlike UseBuf and UseFBuf).

Range: 0 <= v

Definition at line 128 of file macros.h.

◆ EVT_ENTITY_ID_BIT

#define EVT_ENTITY_ID_BIT   0x4000

An entity index.

Entities are assigned indices in the order they are created with Call(MakeEntity, ...). Supported in BindTrigger and BindPadlock only.

Definition at line 132 of file macros.h.

◆ EVT_ENTITY_INDEX

#define EVT_ENTITY_INDEX ( entityIndex)    ((entityIndex) + EVT_ENTITY_ID_BIT)

Definition at line 133 of file macros.h.

◆ EVT_INDEX_OF_LOCAL_VAR

◆ EVT_INDEX_OF_LOCAL_FLAG

◆ EVT_INDEX_OF_MAP_VAR

◆ EVT_INDEX_OF_MAP_FLAG

◆ EVT_INDEX_OF_AREA_FLAG

#define EVT_INDEX_OF_AREA_FLAG ( v)    ((v) + EVT_AREA_FLAG_OFFSET)

◆ EVT_INDEX_OF_AREA_BYTE

◆ EVT_INDEX_OF_GAME_FLAG

◆ EVT_INDEX_OF_GAME_BYTE

◆ EVT_INDEX_OF_ARRAY_FLAG

#define EVT_INDEX_OF_ARRAY_FLAG ( v)    ((v) + EVT_ARRAY_FLAG_OFFSET)

◆ EVT_INDEX_OF_ARRAY_VAR

◆ LVar0

#define LVar0   LocalVar(0)

Definition at line 148 of file macros.h.

Referenced by A(), A(), A(), A(), and exec_ShakeCamX().

◆ LVar1

#define LVar1   LocalVar(1)

Definition at line 149 of file macros.h.

Referenced by A(), A(), A(), exec_ShakeCamX(), and make_vine_interpolation().

◆ LVar2

#define LVar2   LocalVar(2)

Definition at line 150 of file macros.h.

Referenced by A(), A(), A(), exec_ShakeCamX(), and make_vine_interpolation().

◆ LVar3

#define LVar3   LocalVar(3)

Definition at line 151 of file macros.h.

Referenced by A(), exec_ShakeCamX(), and make_vine_interpolation().

◆ LVar4

#define LVar4   LocalVar(4)

Definition at line 152 of file macros.h.

Referenced by A().

◆ LVar5

#define LVar5   LocalVar(5)

Definition at line 153 of file macros.h.

◆ LVar6

#define LVar6   LocalVar(6)

Definition at line 154 of file macros.h.

◆ LVar7

#define LVar7   LocalVar(7)

Definition at line 155 of file macros.h.

◆ LVar8

#define LVar8   LocalVar(8)

Definition at line 156 of file macros.h.

◆ LVar9

#define LVar9   LocalVar(9)

Definition at line 157 of file macros.h.

Referenced by A().

◆ LVarA

#define LVarA   LocalVar(10)

Definition at line 158 of file macros.h.

Referenced by A(), A(), and A().

◆ LVarB

#define LVarB   LocalVar(11)

Definition at line 159 of file macros.h.

Referenced by A(), A(), and A().

◆ LVarC

#define LVarC   LocalVar(12)

Definition at line 160 of file macros.h.

Referenced by A(), A(), and A().

◆ LVarD

#define LVarD   LocalVar(13)

Definition at line 161 of file macros.h.

Referenced by A(), and A().

◆ LVarE

#define LVarE   LocalVar(14)

Definition at line 162 of file macros.h.

◆ LVarF

#define LVarF   LocalVar(15)

Definition at line 163 of file macros.h.

◆ LFlag0

#define LFlag0   LocalFlag(0)

Definition at line 167 of file macros.h.

◆ LFlag1

#define LFlag1   LocalFlag(1)

Definition at line 168 of file macros.h.

◆ LFlag2

#define LFlag2   LocalFlag(2)

Definition at line 169 of file macros.h.

◆ LFlag3

#define LFlag3   LocalFlag(3)

Definition at line 170 of file macros.h.

◆ LFlag4

#define LFlag4   LocalFlag(4)

Definition at line 171 of file macros.h.

◆ LFlag5

#define LFlag5   LocalFlag(5)

Definition at line 172 of file macros.h.

◆ LFlag6

#define LFlag6   LocalFlag(6)

Definition at line 173 of file macros.h.

◆ LFlag7

#define LFlag7   LocalFlag(7)

Definition at line 174 of file macros.h.

◆ LFlag8

#define LFlag8   LocalFlag(8)

Definition at line 175 of file macros.h.

◆ LFlag9

#define LFlag9   LocalFlag(9)

Definition at line 176 of file macros.h.

◆ LFlagA

#define LFlagA   LocalFlag(10)

Definition at line 177 of file macros.h.

◆ LFlagB

#define LFlagB   LocalFlag(11)

Definition at line 178 of file macros.h.

◆ LFlagC

#define LFlagC   LocalFlag(12)

Definition at line 179 of file macros.h.

◆ LFlagD

#define LFlagD   LocalFlag(13)

Definition at line 180 of file macros.h.

◆ LFlagE

#define LFlagE   LocalFlag(14)

Definition at line 181 of file macros.h.

◆ LFlagF

#define LFlagF   LocalFlag(15)

Definition at line 182 of file macros.h.

◆ EVT_CMD

#define EVT_CMD ( opcode,
argv... )
Value:
opcode, \
(sizeof((Bytecode[]){argv})/sizeof(Bytecode)), \
##argv
s32 Bytecode
Definition evt.h:7

On each frame, the EVT manager will continue executing commands in all threads until a blocking command is encountered.

This means that if you have a thread that loops but does not block between iterations, the game will freeze! Avoid this by inserting a blocking command such as Wait(1) in the loop body.

Also note that threads are never executed in parallel. If your EVT script lacks blocking commands, it will be executed all in one go, and race conditions cannot occur.

The following subset of EVT commands are blocking:

  • ExecWait
  • Wait
  • Wait_SECONDS
  • Call (if function returns ApiStatus_BLOCK) In EVT scripts, instructions are stored contiguously in the following structs: struct { Bytecode opcode; Bytecode argc; Bytecode argv[argc]; } This macro expands to the given opcode and argv, with argc calculated automatically.

Definition at line 207 of file macros.h.

207#define EVT_CMD(opcode, argv...) \
208 opcode, \
209 (sizeof((Bytecode[]){argv})/sizeof(Bytecode)), \
210 ##argv

◆ End

#define End   EVT_CMD(EVT_OP_END),

Signals the end of EVT script data. A script missing this will likely crash on load.

Definition at line 213 of file macros.h.

Referenced by A(), A(), A(), and A().

◆ Return

#define Return   EVT_CMD(EVT_OP_RETURN),

Kills the current EVT thread.

A script missing a return will live - but do nothing - forever, or until something else kills it (e.g. leaving the map).

Definition at line 217 of file macros.h.

Referenced by A(), A(), A(), and A().

◆ Jump

#define Jump ( EVT_SOURCE)    EVT_CMD(EVT_OP_JUMP, (Bytecode) EVT_SOURCE),

Jumps to a given instruction pointer and begins execution from there.

You can jump to a different EVT source and labels etc. will be loaded as expected. The timescale for the current thread is also reset to the global default.

Definition at line 222 of file macros.h.

◆ Label

#define Label ( LABEL_ID)    EVT_CMD(EVT_OP_LABEL, LABEL_ID),

Marks this point in the script as a Goto target.

Range: 0 <= LABEL_ID <= 0x16

Definition at line 227 of file macros.h.

◆ Goto

#define Goto ( LABEL_ID)    EVT_CMD(EVT_OP_GOTO, LABEL_ID),

Moves execution to the given label.

Range: 0 <= LABEL_ID <= 0x16

Definition at line 232 of file macros.h.

◆ Loop

#define Loop ( TIMES)    EVT_CMD(EVT_OP_LOOP, TIMES),

Marks the beginning of a loop.

Loop(TIMES)
    ...
EndLoop

The variable or value given in TIMES is decremented upon each loop iteration. After the "1" iteration completes, the loop exits. Use Loop(0) for an infinite loop; make sure it breaks or blocks to avoid a freeze.

Up to 8 loops may be nested within a single script.

Definition at line 245 of file macros.h.

Referenced by A(), A(), and A().

◆ EndLoop

#define EndLoop   EVT_CMD(EVT_OP_END_LOOP),

Marks the end of a loop.

Definition at line 248 of file macros.h.

Referenced by A(), A(), and A().

◆ BreakLoop

#define BreakLoop   EVT_CMD(EVT_OP_BREAK_LOOP),

Breaks out of the innermost loop.

Definition at line 251 of file macros.h.

◆ Wait

#define Wait ( NUM_FRAMES)    EVT_CMD(EVT_OP_WAIT_FRAMES, NUM_FRAMES),

Blocks for the given number of frames.

Definition at line 254 of file macros.h.

Referenced by A(), A(), and A().

◆ WaitSecs

#define WaitSecs ( NUM_SECONDS)    EVT_CMD(EVT_OP_WAIT_SECS, NUM_SECONDS),

Blocks for the given number of seconds.

Definition at line 258 of file macros.h.

◆ IfEq

#define IfEq ( LVAR,
RVAR )   EVT_CMD(EVT_OP_IF_EQ, LVAR, RVAR),

Marks the beginning of an if statement that only executes if LVAR == RVAR.

IfEq(LVAR, RVAR)
    ...
Else
    ...
EndIf

The Else block is optional.

Definition at line 269 of file macros.h.

◆ IfNe

#define IfNe ( LVAR,
RVAR )   EVT_CMD(EVT_OP_IF_NE, LVAR, RVAR),

Marks the beginning of an if statement that only executes if LVAR != RVAR.

Definition at line 272 of file macros.h.

◆ IfLt

#define IfLt ( LVAR,
RVAR )   EVT_CMD(EVT_OP_IF_LT, LVAR, RVAR),

Marks the beginning of an if statement that only executes if LVAR < RVAR.

Definition at line 275 of file macros.h.

◆ IfGt

#define IfGt ( LVAR,
RVAR )   EVT_CMD(EVT_OP_IF_GT, LVAR, RVAR),

Marks the beginning of an if statement that only executes if LVAR <= RVAR.

Definition at line 278 of file macros.h.

Referenced by A().

◆ IfLe

#define IfLe ( LVAR,
RVAR )   EVT_CMD(EVT_OP_IF_LE, LVAR, RVAR),

Marks the beginning of an if statement that only executes if LVAR > RVAR.

Definition at line 281 of file macros.h.

◆ IfGe

#define IfGe ( LVAR,
RVAR )   EVT_CMD(EVT_OP_IF_GE, LVAR, RVAR),

Marks the beginning of an if statement that only executes if LVAR >= RVAR.

Definition at line 284 of file macros.h.

◆ IfFlag

#define IfFlag ( LVAR,
RVAR )   EVT_CMD(EVT_OP_IF_FLAG, LVAR, RVAR),

Marks the beginning of an if statement that only executes if the RVAR flag is set on LVAR, i.e.

(LVAR & RVAR) != 1.

Definition at line 288 of file macros.h.

◆ IfNotFlag

#define IfNotFlag ( LVAR,
RVAR )   EVT_CMD(EVT_OP_IF_NOT_FLAG, LVAR, RVAR),

Marks the beginning of an if statement that only executes if the RVAR flag is unset on LVAR, i.e.

(LVAR & RVAR) == 0.

Definition at line 292 of file macros.h.

◆ Else

#define Else   EVT_CMD(EVT_OP_ELSE),

Marks the end of an if statement and the start of the else block.

Definition at line 295 of file macros.h.

◆ EndIf

#define EndIf   EVT_CMD(EVT_OP_END_IF),

Marks the end of an if statement or an else block.

Definition at line 298 of file macros.h.

Referenced by A().

◆ Switch

#define Switch ( LVAR)    EVT_CMD(EVT_OP_SWITCH, LVAR),

Marks the start of a switch statement.

Switch(LVAR)
    CaseEq(RVAR)
        ...
EndSwitch

Unlike C, EVT switch statements do not have fallthrough by default. If you want to opt-in to fallthrough, use CaseOrEq.

Up to 8 switch statements may be nested within a single script.

Definition at line 311 of file macros.h.

◆ SwitchConst

#define SwitchConst ( LCONST)    EVT_CMD(EVT_OP_SWITCH_CONST, LCONST),

Marks the start of a switch statement where the given value is treated as-is instead of using evt_get_variable.

That is, SwitchConst(LocalVar(0)) will switch over the value 0xFE363C80 instead of the value contained within LocalVar(0).

Definition at line 316 of file macros.h.

◆ CaseEq

#define CaseEq ( RVAR)    EVT_CMD(EVT_OP_CASE_EQ, RVAR),

Marks the start of a switch case that executes only if LVAR == RVAR. It also marks the end of any previous case.

Definition at line 319 of file macros.h.

◆ CaseNe

#define CaseNe ( RVAR)    EVT_CMD(EVT_OP_CASE_NE, RVAR),

Marks the start of a switch case that executes only if LVAR != RVAR. It also marks the end of any previous case.

Definition at line 322 of file macros.h.

◆ CaseLt

#define CaseLt ( RVAR)    EVT_CMD(EVT_OP_CASE_LT, RVAR),

Marks the start of a switch case that executes only if LVAR < RVAR. It also marks the end of any previous case.

Definition at line 325 of file macros.h.

◆ CaseGt

#define CaseGt ( RVAR)    EVT_CMD(EVT_OP_CASE_GT, RVAR),

Marks the start of a switch case that executes only if LVAR <= RVAR. It also marks the end of any previous case.

Definition at line 328 of file macros.h.

◆ CaseLe

#define CaseLe ( RVAR)    EVT_CMD(EVT_OP_CASE_LE, RVAR),

Marks the start of a switch case that executes only if LVAR > RVAR. It also marks the end of any previous case.

Definition at line 331 of file macros.h.

◆ CaseGe

#define CaseGe ( RVAR)    EVT_CMD(EVT_OP_CASE_GE, RVAR),

Marks the start of a switch case that executes only if LVAR >= RVAR. It also marks the end of any previous case.

Definition at line 334 of file macros.h.

◆ CaseDefault

#define CaseDefault   EVT_CMD(EVT_OP_CASE_DEFAULT),

Marks the start of a switch case that executes unconditionally. It also marks the end of any previous case.

Definition at line 337 of file macros.h.

◆ CaseOrEq

#define CaseOrEq ( RVAR)    EVT_CMD(EVT_OP_CASE_OR_EQ, RVAR),

Marks the start of a switch case that executes only if LVAR == RVAR.

It also marks the end of any previous case. Unlike CaseEq, CaseOrEq will fallthrough to the next case until EndCaseGroup is reached.

Definition at line 341 of file macros.h.

◆ CaseAndEq

#define CaseAndEq ( RVAR)    EVT_CMD(EVT_OP_CASE_AND_EQ, RVAR),

Marks the start of a switch case that executes only if LVAR == RVAR.

It also marks the end of any previous case. Similar to CaseOrEq, CaseAndEq has fallthrough. However, if LVAR != RVAR, fallthrough does not apply.

Definition at line 345 of file macros.h.

◆ CaseFlag

#define CaseFlag ( RVAR)    EVT_CMD(EVT_OP_CASE_FLAG, RVAR),

Marks the start of a switch case that executes only if the RVAR flag is set on LVAR, i.e.

(LVAR & RVAR) != 1. It also marks the end of any previous case.

Definition at line 349 of file macros.h.

◆ EndCaseGroup

#define EndCaseGroup   EVT_CMD(EVT_OP_END_CASE_GROUP),

Marks the end of a switch case group (CaseOrEq and/or CaseAndEq), stopping fallthrough.

Definition at line 352 of file macros.h.

◆ CaseRange

#define CaseRange ( MIN,
MAX )   EVT_CMD(EVT_OP_CASE_RANGE, MIN, MAX),

Marks the start of a switch case that executes only if MIN <= LVAR <= MAX (inclusive).

It also marks the end of any previous case.

Definition at line 356 of file macros.h.

◆ BreakSwitch

#define BreakSwitch   EVT_CMD(EVT_OP_BREAK_SWITCH),

Marks the end of a switch case.

Definition at line 359 of file macros.h.

◆ EndSwitch

#define EndSwitch   EVT_CMD(EVT_OP_END_SWITCH),

Marks the end of a switch statement and any case.

Definition at line 362 of file macros.h.

◆ Set

#define Set ( VAR,
INT_VALUE )   EVT_CMD(EVT_OP_SET, VAR, (Bytecode) INT_VALUE),

Sets the given variable to a given value casted to an integer.

Definition at line 365 of file macros.h.

Referenced by A(), A(), and A().

◆ SetConst

#define SetConst ( VAR,
CONST )   EVT_CMD(EVT_OP_SET_CONST, VAR, (Bytecode) CONST),

Sets the given variable to a given value, skipping the evt_get_variable call.

That is, SetConst(LocalVar(0), LocalVar(1)) will set LocalVar(0) to 0xFE363C81 instead of copying the value of LocalVar(1) into LocalVar(0).

Definition at line 370 of file macros.h.

◆ SetF

#define SetF ( VAR,
FLOAT_VALUE )   EVT_CMD(EVT_OP_SETF, VAR, FLOAT_VALUE),

Sets the given variable to a given value, but supports Floats.

Definition at line 373 of file macros.h.

◆ Add

#define Add ( VAR,
INT_VALUE )   EVT_CMD(EVT_OP_ADD, VAR, INT_VALUE),

Definition at line 376 of file macros.h.

Referenced by A(), A(), and A().

◆ Sub

#define Sub ( VAR,
INT_VALUE )   EVT_CMD(EVT_OP_SUB, VAR, INT_VALUE),

Definition at line 377 of file macros.h.

◆ Mul

#define Mul ( VAR,
INT_VALUE )   EVT_CMD(EVT_OP_MUL, VAR, INT_VALUE),

Definition at line 378 of file macros.h.

◆ Div

#define Div ( VAR,
INT_VALUE )   EVT_CMD(EVT_OP_DIV, VAR, INT_VALUE),

Definition at line 379 of file macros.h.

◆ Mod

#define Mod ( VAR,
INT_VALUE )   EVT_CMD(EVT_OP_MOD, VAR, INT_VALUE),

Definition at line 380 of file macros.h.

◆ AddF

#define AddF ( VAR,
FLOAT_VALUE )   EVT_CMD(EVT_OP_ADDF, VAR, FLOAT_VALUE),

Definition at line 383 of file macros.h.

◆ SubF

#define SubF ( VAR,
FLOAT_VALUE )   EVT_CMD(EVT_OP_SUBF, VAR, FLOAT_VALUE),

Definition at line 384 of file macros.h.

◆ MulF

#define MulF ( VAR,
FLOAT_VALUE )   EVT_CMD(EVT_OP_MULF, VAR, FLOAT_VALUE),

Definition at line 385 of file macros.h.

◆ DivF

#define DivF ( VAR,
FLOAT_VALUE )   EVT_CMD(EVT_OP_DIVF, VAR, FLOAT_VALUE),

Definition at line 386 of file macros.h.

◆ UseBuf

#define UseBuf ( INT_PTR)    EVT_CMD(EVT_OP_USE_BUF, (Bytecode) INT_PTR),

Loads a s32 pointer for use with subsequent EVT_BUF_READ commands.

Definition at line 389 of file macros.h.

◆ BufRead1

#define BufRead1 ( VAR)    EVT_CMD(EVT_OP_BUF_READ1, VAR),

Consumes the next s32 from the buffer and stores it in the given variable.

Definition at line 392 of file macros.h.

◆ BufRead2

#define BufRead2 ( VAR1,
VAR2 )   EVT_CMD(EVT_OP_BUF_READ2, VAR1, VAR2),

Consumes the next two s32s from the buffer and stores them in the given variables.

Definition at line 395 of file macros.h.

◆ BufRead3

#define BufRead3 ( VAR1,
VAR2,
VAR3 )   EVT_CMD(EVT_OP_BUF_READ3, VAR1, VAR2, VAR3),

Consumes the next three s32s from the buffer and stores them in the given variables.

Definition at line 398 of file macros.h.

◆ BufRead4

#define BufRead4 ( VAR1,
VAR2,
VAR3,
VAR4 )   EVT_CMD(EVT_OP_BUF_READ4, VAR1, VAR2, VAR3, VAR4),

Consumes the next four s32s from the buffer and stores them in the given variables.

Definition at line 401 of file macros.h.

◆ BufPeek

#define BufPeek ( OFFSET,
VAR )   EVT_CMD(EVT_OP_BUF_PEEK, OFFSET, VAR),

Gets the s32 at the given offset of the buffer and stores it in the given variable, without consuming it.

Definition at line 404 of file macros.h.

◆ UseFBuf

#define UseFBuf ( FLOAT_PTR)    EVT_CMD(EVT_OP_USE_FBUF, (Bytecode) FLOAT_PTR),

Identical to UseBuf. Beware that the int buffer and the float buffer are not distinct.

Definition at line 407 of file macros.h.

◆ FBufRead1

#define FBufRead1 ( VAR)    EVT_CMD(EVT_OP_FBUF_READ1, VAR),

Consumes the next f32 from the buffer and stores it in the given variable.

Definition at line 410 of file macros.h.

◆ FBufRead2

#define FBufRead2 ( VAR1,
VAR2 )   EVT_CMD(EVT_OP_FBUF_READ2, VAR1, VAR2),

Consumes the next two f32s from the buffer and stores them in the given variables.

Definition at line 413 of file macros.h.

◆ FBufRead3

#define FBufRead3 ( VAR1,
VAR2,
VAR3 )   EVT_CMD(EVT_OP_FBUF_READ3, VAR1, VAR2, VAR3),

Consumes the next three f32s from the buffer and stores them in the given variables.

Definition at line 416 of file macros.h.

◆ FBufRead4

#define FBufRead4 ( VAR1,
VAR2,
VAR3,
VAR4 )   EVT_CMD(EVT_OP_FBUF_READ4, VAR1, VAR2, VAR3, VAR4),

Consumes the next four f32s from the buffer and stores them in the given variables.

Definition at line 419 of file macros.h.

◆ FBufPeek

#define FBufPeek ( OFFSET,
VAR )   EVT_CMD(EVT_OP_FBUF_PEEK, OFFSET, VAR),

Gets the f32 at the given offset of the buffer and stores it in the given variable, without consuming it.

Definition at line 422 of file macros.h.

◆ UseArray

#define UseArray ( INT_PTR)    EVT_CMD(EVT_OP_USE_ARRAY, (Bytecode) INT_PTR),

Loads an s32 array pointer into the current thread for use with ArrayVar(INDEX).

Definition at line 425 of file macros.h.

◆ UseFlagArray

#define UseFlagArray ( PACKED_FLAGS_PTR)    EVT_CMD(EVT_OP_USE_FLAG_ARRAY, (Bytecode) PACKED_FLAGS_PTR),

Loads an s32 array pointer into the current thread for use with UF(INDEX).

Flags are stored in a 'packed' structure where indices refer to bits.

Definition at line 429 of file macros.h.

◆ MallocArray

#define MallocArray ( SIZE,
OUT_PTR_VAR )   EVT_CMD(EVT_OP_MALLOC_ARRAY, SIZE, OUT_PTR_VAR),

Allocates a new array of the given size for use with ArrayVar(INDEX).

EVT scripts do not have to worry about freeing this array.

Definition at line 433 of file macros.h.

◆ BitwiseAnd

#define BitwiseAnd ( VAR,
VALUE )   EVT_CMD(EVT_OP_BITWISE_AND, VAR, VALUE),

VAR &= VALUE

Definition at line 436 of file macros.h.

◆ BitwiseAndConst

#define BitwiseAndConst ( VAR,
CONST )   EVT_CMD(EVT_OP_BITWISE_AND_CONST, VAR, CONST),

VAR &= CONST, but CONST is treated as-is rather than dereferenced with evt_get_variable.

Definition at line 439 of file macros.h.

◆ BitwiseOr

#define BitwiseOr ( VAR,
VALUE )   EVT_CMD(EVT_OP_BITWISE_OR, VAR, VALUE),

VAR |= VALUE

Definition at line 442 of file macros.h.

◆ BitwiseOrConst

#define BitwiseOrConst ( VAR,
CONST )   EVT_CMD(EVT_OP_BITWISE_OR_CONST, VAR, CONST),

VAR |= CONST, but CONST is treated as-is rather than dereferenced with evt_get_variable.

Definition at line 445 of file macros.h.

◆ Exec

#define Exec ( EVT_SOURCE)    EVT_CMD(EVT_OP_EXEC, (Bytecode) EVT_SOURCE),

Launches a new thread.

The following values are copied from the current thread to the new thread:

  • LFs
  • LWs
  • Array pointer
  • Flag array pointer
  • Priority
  • Group

Definition at line 455 of file macros.h.

◆ ExecGetTID

#define ExecGetTID ( EVT_SOURCE,
OUTVAR )   EVT_CMD(EVT_OP_EXEC_GET_TID, (Bytecode) EVT_SOURCE, OUTVAR),

Identical to Exec, but the newly-launched thread ID is stored in OUTVAR.

The other thread may be interacted with using KillThread, SuspendThread, ResumeThread, and IsThreadRunning.

Definition at line 460 of file macros.h.

◆ ExecWait

#define ExecWait ( EVT_SOURCE)    EVT_CMD(EVT_OP_EXEC_WAIT, (Bytecode) EVT_SOURCE),

Launches a new child thread.

Blocks for at least one frame unless the child thread is made to have a higher priority than the parent.

The following values are inherited and then copied back to the parent thread upon completion:

  • LFs
  • LWs
  • Array pointer
  • Flag array pointer
  • Priority
  • Group

Child threads are killed, suspended, and resumed as their parents are, for example, a different thread using KillThread to kill a parent thread would also kill its child thread(s) launched by this command.

Definition at line 475 of file macros.h.

Referenced by A(), and A().

◆ BindTrigger

#define BindTrigger ( EVT_SOURCE,
TRIGGER,
COLLIDER_ID,
UNK_A3,
TRIGGER_PTR_OUTVAR )    EVT_CMD(EVT_OP_BIND_TRIGGER, (Bytecode) EVT_SOURCE, TRIGGER, (Bytecode) COLLIDER_ID, UNK_A3, TRIGGER_PTR_OUTVAR),

Sets up a script to launch when a particular event is triggered.

Valid triggers:

  • TRIGGER_WALL_PUSH
  • TRIGGER_FLOOR_TOUCH
  • TRIGGER_WALL_PRESS_A (displays "!" icon above player)
  • TRIGGER_FLOOR_JUMP
  • TRIGGER_WALL_TOUCH
  • TRIGGER_FLOOR_PRESS_A
  • TRIGGER_WALL_HAMMER
  • TRIGGER_GAME_FLAG_SET (TODO: rename)
  • TRIGGER_AREA_FLAG_SET (TODO: rename)
  • TRIGGER_CEILING_TOUCH
  • TRIGGER_FLOOR_ABOVE
  • TRIGGER_POINT_BOMB (takes Vec3f* instead of collider ID)

For the COLLIDER_ID param, the following values are accepted:

  • Collider ID
  • Entity ID (use EVT_ENTITY_INDEX)
  • Pointer to a Vec3f (for TRIGGER_POINT_BOMB only)

Only one thread will run for a trigger at once.

Definition at line 499 of file macros.h.

499#define BindTrigger(EVT_SOURCE, TRIGGER, COLLIDER_ID, UNK_A3, TRIGGER_PTR_OUTVAR) \
500 EVT_CMD(EVT_OP_BIND_TRIGGER, (Bytecode) EVT_SOURCE, TRIGGER, (Bytecode) COLLIDER_ID, UNK_A3, TRIGGER_PTR_OUTVAR),

◆ BindPadlock

#define BindPadlock ( EVT_SOURCE,
TRIGGER,
COLLIDER_ID,
ITEM_LIST,
UNK_A3,
TRIGGER_PTR_OUTVAR )    EVT_CMD(EVT_OP_BIND_PADLOCK, (Bytecode) EVT_SOURCE, TRIGGER, COLLIDER_ID, (Bytecode) ITEM_LIST, UNK_A3, TRIGGER_PTR_OUTVAR),

Similar to BindTrigger, but also takes arguments for the item list to show.

Definition at line 503 of file macros.h.

503#define BindPadlock(EVT_SOURCE, TRIGGER, COLLIDER_ID, ITEM_LIST, UNK_A3, TRIGGER_PTR_OUTVAR) \
504 EVT_CMD(EVT_OP_BIND_PADLOCK, (Bytecode) EVT_SOURCE, TRIGGER, COLLIDER_ID, (Bytecode) ITEM_LIST, UNK_A3, TRIGGER_PTR_OUTVAR),

◆ Unbind

#define Unbind   EVT_CMD(EVT_OP_UNBIND),

Unbinds the current thread from the trigger it was bound to, if any.

Definition at line 507 of file macros.h.

◆ KillThread

#define KillThread ( TID)    EVT_CMD(EVT_OP_KILL_THREAD, TID),

Kills a thread by its thread ID.

Definition at line 510 of file macros.h.

◆ SetPriority

#define SetPriority ( PRIORITY)    EVT_CMD(EVT_OP_SET_PRIORITY, PRIORITY),

Sets the current thread's priority. Higher-priority threads execute before lower-priority threads on each frame.

Definition at line 513 of file macros.h.

◆ SetTimescale

#define SetTimescale ( TIMESCALE)    EVT_CMD(EVT_OP_SET_TIMESCALE, TIMESCALE),

Sets the current thread's timescale. This is a multiplier applied to Wait and Wait_SECONDS.

Definition at line 516 of file macros.h.

◆ SetGroup

#define SetGroup ( GROUP)    EVT_CMD(EVT_OP_SET_GROUP, GROUP),

Sets the current thread's group. Group value meanings are currently not known.

Definition at line 519 of file macros.h.

◆ SuspendGroup

#define SuspendGroup ( GROUP)    EVT_CMD(EVT_OP_SUSPEND_GROUP, GROUP),

Suspends all threads in a group.

Definition at line 522 of file macros.h.

◆ ResumeGroup

#define ResumeGroup ( GROUP)    EVT_CMD(EVT_OP_RESUME_GROUP, GROUP),

Resumes all threads in a group.

Definition at line 525 of file macros.h.

◆ SuspendOthers

#define SuspendOthers ( GROUP)    EVT_CMD(EVT_OP_SUSPEND_OTHERS, GROUP),

Suspends all threads in a group, except the current thread.

Definition at line 528 of file macros.h.

◆ ResumeOthers

#define ResumeOthers ( GROUP)    EVT_CMD(EVT_OP_RESUME_OTHERS, GROUP),

Resumes all threads in a group, except the current thread.

Definition at line 531 of file macros.h.

◆ SuspendThread

#define SuspendThread ( TID)    EVT_CMD(EVT_OP_SUSPEND_THREAD, TID),

Suspends all threads in a group, except the current thread.

Definition at line 534 of file macros.h.

◆ ResumeThread

#define ResumeThread ( TID)    EVT_CMD(EVT_OP_RESUME_THREAD, TID),

Resumes a thread by its thread ID.

Definition at line 537 of file macros.h.

◆ IsThreadRunning

#define IsThreadRunning ( TID,
OUTVAR )   EVT_CMD(EVT_OP_IS_THREAD_RUNNING, TID, OUTVAR),

Sets OUTVAR to TRUE/FALSE depending on whether a thread with the given ID exists (i.e. has not been killed).

Definition at line 540 of file macros.h.

◆ Thread

#define Thread   EVT_CMD(EVT_OP_THREAD),

Marks the start of a thread block.

Commands between this and a matching EndThread will be executed on their own, new thread instead of on the current thread.

Definition at line 544 of file macros.h.

Referenced by A(), A(), and A().

◆ EndThread

#define EndThread   EVT_CMD(EVT_OP_END_THREAD),

Marks the end of a thread block.

Definition at line 547 of file macros.h.

Referenced by A(), A(), and A().

◆ ChildThread

#define ChildThread   EVT_CMD(EVT_OP_CHILD_THREAD),

Marks the start of a child thread block.

Commands between this and a matching EndChildThread will be executed as a new child thread instead of on the current thread.

Child threads are killed if the parent thread dies, so the following script does NOT set the player's position:

ChildThread
    Wait_SECONDS(1)                 // child thread will be killed whilst waiting
    Call(SetPlayerPos, NPC_DISPOSE_LOCATION) // will not be executed
EndChildThread
Return                              // parent thread dies

Definition at line 560 of file macros.h.

◆ EndChildThread

#define EndChildThread   EVT_CMD(EVT_OP_END_CHILD_THREAD),

Marks the end of a child thread block.

Definition at line 563 of file macros.h.

◆ Call

#define Call ( FUNC,
ARGS... )   EVT_CMD(EVT_OP_CALL, (Bytecode) FUNC, ##ARGS),

Calls a given C EVT API function with any number of arguments.

An API function has the following signature:

ApiStatus ApiFunction(Evt* script, s32 isInitialCall);

This function could then be called with the following command:

Call(ApiFunction)

The given arguments can be accessed from the API function using thread->ptrReadPos.

Definition at line 576 of file macros.h.

Referenced by A(), A(), A(), and A().

◆ EVT_DEBUG_LOG

#define EVT_DEBUG_LOG ( STRING)    EVT_CMD(EVT_OP_DEBUG_LOG, STRING),

Does nothing in release version.

Definition at line 579 of file macros.h.

◆ DebugPrintVar

#define DebugPrintVar ( VAR)    EVT_CMD(EVT_OP_DEBUG_PRINT_VAR, VAR),

Prints variable name and value.

Definition at line 582 of file macros.h.

◆ EVT_AS_VEC2

#define EVT_AS_VEC2 ( baseVar)    (baseVar), (baseVar + 1)

Definition at line 587 of file macros.h.

◆ EVT_AS_VEC3

#define EVT_AS_VEC3 ( baseVar)    (baseVar), (baseVar + 1), (baseVar + 2)

Definition at line 588 of file macros.h.

◆ EVT_VEC_X

#define EVT_VEC_X ( baseVar)    (baseVar)

Definition at line 591 of file macros.h.

◆ EVT_VEC_Y

#define EVT_VEC_Y ( baseVar)    (baseVar + 1)

Definition at line 592 of file macros.h.

◆ EVT_VEC_Z

#define EVT_VEC_Z ( baseVar)    (baseVar + 2)

Definition at line 593 of file macros.h.

◆ EVT_VEC2_OP

#define EVT_VEC2_OP ( OPERATION,
MUT_BASE,
x,
y )
Value:
OPERATION(MUT_BASE + 0, x) \
OPERATION(MUT_BASE + 1, y)

Definition at line 595 of file macros.h.

595#define EVT_VEC2_OP(OPERATION, MUT_BASE, x, y) \
596 OPERATION(MUT_BASE + 0, x) \
597 OPERATION(MUT_BASE + 1, y)

◆ EVT_VEC3_OP

#define EVT_VEC3_OP ( OPERATION,
MUT_BASE,
x,
y,
z )
Value:
OPERATION(MUT_BASE + 0, x) \
OPERATION(MUT_BASE + 1, y) \
OPERATION(MUT_BASE + 2, z)

Definition at line 599 of file macros.h.

599#define EVT_VEC3_OP(OPERATION, MUT_BASE, x, y, z) \
600 OPERATION(MUT_BASE + 0, x) \
601 OPERATION(MUT_BASE + 1, y) \
602 OPERATION(MUT_BASE + 2, z)

◆ EVT_VEC2_VOP

#define EVT_VEC2_VOP ( OPERATION,
MUT_BASE,
AMT_BASE )
Value:
OPERATION(MUT_BASE + 0, AMT_BASE + 0) \
OPERATION(MUT_BASE + 1, AMT_BASE + 1)

Definition at line 604 of file macros.h.

604#define EVT_VEC2_VOP(OPERATION, MUT_BASE, AMT_BASE) \
605 OPERATION(MUT_BASE + 0, AMT_BASE + 0) \
606 OPERATION(MUT_BASE + 1, AMT_BASE + 1)

◆ EVT_VEC3_VOP

#define EVT_VEC3_VOP ( OPERATION,
MUT_BASE,
AMT_BASE )
Value:
OPERATION(MUT_BASE + 0, AMT_BASE + 0) \
OPERATION(MUT_BASE + 1, AMT_BASE + 1) \
OPERATION(MUT_BASE + 2, AMT_BASE + 2)

Definition at line 608 of file macros.h.

608#define EVT_VEC3_VOP(OPERATION, MUT_BASE, AMT_BASE) \
609 OPERATION(MUT_BASE + 0, AMT_BASE + 0) \
610 OPERATION(MUT_BASE + 1, AMT_BASE + 1) \
611 OPERATION(MUT_BASE + 2, AMT_BASE + 2)

◆ EVT_VEC2I_SET

#define EVT_VEC2I_SET ( baseVar,
x,
y )   EVT_VEC2_OP(Set, baseVar, x, y)

Definition at line 613 of file macros.h.

◆ EVT_VEC2F_SET

#define EVT_VEC2F_SET ( baseVar,
x,
y )   EVT_VEC2_OP(SetF, baseVar, x, y)

Definition at line 614 of file macros.h.

◆ EVT_VEC3I_SET

#define EVT_VEC3I_SET ( baseVar,
x,
y,
z )   EVT_VEC3_OP(Set, baseVar, x, y, z)

Definition at line 615 of file macros.h.

◆ EVT_VEC3F_SET

#define EVT_VEC3F_SET ( baseVar,
x,
y,
z )   EVT_VEC3_OP(SetF, baseVar, x, y, z)

Definition at line 616 of file macros.h.

◆ EVT_VEC2I_VSET

#define EVT_VEC2I_VSET ( baseVar,
baseSrc )   EVT_VEC2_VOP(Set, baseVar, baseSrc)

Definition at line 618 of file macros.h.

◆ EVT_VEC2F_VSET

#define EVT_VEC2F_VSET ( baseVar,
baseSrc )   EVT_VEC2_VOP(SetF, baseVar, baseSrc)

Definition at line 619 of file macros.h.

◆ EVT_VEC3I_VSET

#define EVT_VEC3I_VSET ( baseVar,
baseSrc )   EVT_VEC3_VOP(Set, baseVar, baseSrc)

Definition at line 620 of file macros.h.

◆ EVT_VEC3F_VSET

#define EVT_VEC3F_VSET ( baseVar,
baseSrc )   EVT_VEC3_VOP(SetF, baseVar, baseSrc)

Definition at line 621 of file macros.h.

◆ EVT_VEC2I_ADD

#define EVT_VEC2I_ADD ( baseVar,
x,
y )   EVT_VEC2_OP(Add, baseVar, x, y)

Definition at line 623 of file macros.h.

◆ EVT_VEC2F_ADD

#define EVT_VEC2F_ADD ( baseVar,
x,
y )   EVT_VEC2_OP(AddF, baseVar, x, y)

Definition at line 624 of file macros.h.

◆ EVT_VEC3I_ADD

#define EVT_VEC3I_ADD ( baseVar,
x,
y,
z )   EVT_VEC3_OP(Add, baseVar, x, y, z)

Definition at line 625 of file macros.h.

◆ EVT_VEC3F_ADD

#define EVT_VEC3F_ADD ( baseVar,
x,
y,
z )   EVT_VEC3_OP(AddF, baseVar, x, y, z)

Definition at line 626 of file macros.h.

◆ EVT_VEC2I_VADD

#define EVT_VEC2I_VADD ( baseVar,
baseAmt )   EVT_VEC2_VOP(Add, baseVar, baseAmt)

Definition at line 628 of file macros.h.

◆ EVT_VEC2F_VADD

#define EVT_VEC2F_VADD ( baseVar,
baseAmt )   EVT_VEC2_VOP(AddF, baseVar, baseAmt)

Definition at line 629 of file macros.h.

◆ EVT_VEC3I_VADD

#define EVT_VEC3I_VADD ( baseVar,
baseAmt )   EVT_VEC3_VOP(Add, baseVar, baseAmt)

Definition at line 630 of file macros.h.

◆ EVT_VEC3F_VADD

#define EVT_VEC3F_VADD ( baseVar,
baseAmt )   EVT_VEC3_VOP(AddF, baseVar, baseAmt)

Definition at line 631 of file macros.h.

◆ EVT_VEC2I_SUB

#define EVT_VEC2I_SUB ( baseVar,
x,
y )   EVT_VEC2_OP(Sub, baseVar, x, y)

Definition at line 633 of file macros.h.

◆ EVT_VEC2F_SUB

#define EVT_VEC2F_SUB ( baseVar,
x,
y )   EVT_VEC2_OP(SubF, baseVar, x, y)

Definition at line 634 of file macros.h.

◆ EVT_VEC3I_SUB

#define EVT_VEC3I_SUB ( baseVar,
x,
y,
z )   EVT_VEC3_OP(Sub, baseVar, x, y, z)

Definition at line 635 of file macros.h.

◆ EVT_VEC3F_SUB

#define EVT_VEC3F_SUB ( baseVar,
x,
y,
z )   EVT_VEC3_OP(SubF, baseVar, x, y, z)

Definition at line 636 of file macros.h.

◆ EVT_VEC2I_VSUB

#define EVT_VEC2I_VSUB ( baseVar,
baseAmt )   EVT_VEC2_VOP(Sub, baseVar, baseAmt)

Definition at line 638 of file macros.h.

◆ EVT_VEC2F_VSUB

#define EVT_VEC2F_VSUB ( baseVar,
baseAmt )   EVT_VEC2_VOP(SubF, baseVar, baseAmt)

Definition at line 639 of file macros.h.

◆ EVT_VEC3I_VSUB

#define EVT_VEC3I_VSUB ( baseVar,
baseAmt )   EVT_VEC3_VOP(Sub, baseVar, baseAmt)

Definition at line 640 of file macros.h.

◆ EVT_VEC3F_VSUB

#define EVT_VEC3F_VSUB ( baseVar,
baseAmt )   EVT_VEC3_VOP(SubF, baseVar, baseAmt)

Definition at line 641 of file macros.h.

◆ IfTrue

#define IfTrue ( b)    IfNe(b, 0)

Definition at line 645 of file macros.h.

◆ IfFalse

#define IfFalse ( b)    IfEq(b, 0)

Definition at line 646 of file macros.h.

◆ EVT_EXIT_WALK

#define EVT_EXIT_WALK ( walkDistance,
exitIdx,
map,
entryIdx )
Value:
{ \
SetGroup(EVT_GROUP_EXIT_MAP) \
Call(DisablePlayerInput, TRUE) \
Call(UseExitHeading, walkDistance, exitIdx) \
Exec(ExitWalk) \
Call(GotoMap, Ref(map), entryIdx) \
Wait(100) \
Return \
End \
}
@ EVT_GROUP_EXIT_MAP
Definition evt.h:145
ApiStatus GotoMap(Evt *script, b32 isInitialCall)
Makes the player go to the given map and at the given entrance.
ApiStatus DisablePlayerInput(Evt *script, b32 isInitialCall)
Disables player and partner input, and disables the status menu.
ApiStatus UseExitHeading(Evt *script, b32 isInitialCall)
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
EvtScript ExitWalk
Definition enter_exit.c:283

Definition at line 648 of file macros.h.

648#define EVT_EXIT_WALK(walkDistance, exitIdx, map, entryIdx) \
649 { \
650 SetGroup(EVT_GROUP_EXIT_MAP) \
651 Call(DisablePlayerInput, TRUE) \
652 Call(UseExitHeading, walkDistance, exitIdx) \
653 Exec(ExitWalk) \
654 Call(GotoMap, Ref(map), entryIdx) \
655 Wait(100) \
656 Return \
657 End \
658 }

◆ EVT_EXIT_WALK_NOK

#define EVT_EXIT_WALK_NOK ( walkDistance,
exitIdx,
map,
entryIdx )
Value:
{ \
Call(UseExitHeading, walkDistance, exitIdx) \
Exec(ExitWalk) \
Call(GotoMap, Ref(map), entryIdx) \
Wait(100) \
Return \
End \
}

Definition at line 661 of file macros.h.

661#define EVT_EXIT_WALK_NOK(walkDistance, exitIdx, map, entryIdx) \
662 { \
663 Call(UseExitHeading, walkDistance, exitIdx) \
664 Exec(ExitWalk) \
665 Call(GotoMap, Ref(map), entryIdx) \
666 Wait(100) \
667 Return \
668 End \
669 }

◆ EVT_EXIT_SINGLE_DOOR

#define EVT_EXIT_SINGLE_DOOR ( exitIdx,
map,
entryIdx,
colliderID,
modelID,
swingDir )
Value:
{ \
SetGroup(EVT_GROUP_EXIT_MAP) \
Call(DisablePlayerInput, TRUE) \
Set(LVar0, exitIdx) \
Set(LVar1, colliderID) \
Set(LVar2, modelID) \
Set(LVar3, swingDir) \
Wait(17) \
Call(GotoMap, Ref(map), entryIdx) \
Wait(100) \
Return \
End \
}
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define LVar3
Definition macros.h:151
#define LVar0
Definition macros.h:148
EvtScript ExitSingleDoor
Definition enter_exit.c:300

Definition at line 671 of file macros.h.

671#define EVT_EXIT_SINGLE_DOOR(exitIdx, map, entryIdx, colliderID, modelID, swingDir) \
672 { \
673 SetGroup(EVT_GROUP_EXIT_MAP) \
674 Call(DisablePlayerInput, TRUE) \
675 Set(LVar0, exitIdx) \
676 Set(LVar1, colliderID) \
677 Set(LVar2, modelID) \
678 Set(LVar3, swingDir) \
679 Exec(ExitSingleDoor) \
680 Wait(17) \
681 Call(GotoMap, Ref(map), entryIdx) \
682 Wait(100) \
683 Return \
684 End \
685 }

◆ EVT_EXIT_SINGLE_DOOR_SET_SOUNDS

#define EVT_EXIT_SINGLE_DOOR_SET_SOUNDS ( exitIdx,
map,
entryIdx,
colliderID,
modelID,
swingDir,
sounds )
Value:
{ \
SetGroup(EVT_GROUP_EXIT_MAP) \
Call(DisablePlayerInput, TRUE) \
Call(UseDoorSounds, sounds) \
Set(LVar0, exitIdx) \
Set(LVar1, colliderID) \
Set(LVar2, modelID) \
Set(LVar3, swingDir) \
Wait(17) \
Call(GotoMap, Ref(map), entryIdx) \
Wait(100) \
Return \
End \
}
ApiStatus UseDoorSounds(Evt *script, b32 isInitialCall)

Definition at line 687 of file macros.h.

687#define EVT_EXIT_SINGLE_DOOR_SET_SOUNDS(exitIdx, map, entryIdx, colliderID, modelID, swingDir, sounds) \
688 { \
689 SetGroup(EVT_GROUP_EXIT_MAP) \
690 Call(DisablePlayerInput, TRUE) \
691 Call(UseDoorSounds, sounds) \
692 Set(LVar0, exitIdx) \
693 Set(LVar1, colliderID) \
694 Set(LVar2, modelID) \
695 Set(LVar3, swingDir) \
696 Exec(ExitSingleDoor) \
697 Wait(17) \
698 Call(GotoMap, Ref(map), entryIdx) \
699 Wait(100) \
700 Return \
701 End \
702 }

◆ EVT_EXIT_SPLIT_SINGLE_DOOR

#define EVT_EXIT_SPLIT_SINGLE_DOOR ( exitIdx,
map,
entryIdx,
colliderID,
topModelID,
bottomModelID,
swingDir )
Value:
{ \
SetGroup(EVT_GROUP_EXIT_MAP) \
Call(DisablePlayerInput, TRUE) \
Set(LVar0, exitIdx) \
Set(LVar1, colliderID) \
Set(LVar2, topModelID) \
Set(LVar4, bottomModelID) \
Set(LVar3, swingDir) \
Wait(17) \
Call(GotoMap, Ref(map), entryIdx) \
Wait(100) \
Return \
End \
}
#define LVar4
Definition macros.h:152
EvtScript ExitSplitSingleDoor
Definition enter_exit.c:314

Definition at line 704 of file macros.h.

704#define EVT_EXIT_SPLIT_SINGLE_DOOR(exitIdx, map, entryIdx, colliderID, topModelID, bottomModelID, swingDir) \
705 { \
706 SetGroup(EVT_GROUP_EXIT_MAP) \
707 Call(DisablePlayerInput, TRUE) \
708 Set(LVar0, exitIdx) \
709 Set(LVar1, colliderID) \
710 Set(LVar2, topModelID) \
711 Set(LVar4, bottomModelID) \
712 Set(LVar3, swingDir) \
713 Exec(ExitSplitSingleDoor) \
714 Wait(17) \
715 Call(GotoMap, Ref(map), entryIdx) \
716 Wait(100) \
717 Return \
718 End \
719 }

◆ EVT_EXIT_DOUBLE_DOOR

#define EVT_EXIT_DOUBLE_DOOR ( exitIdx,
map,
entryIdx,
colliderID,
leftDoorModelID,
rightDoorModelID )
Value:
{ \
SetGroup(EVT_GROUP_EXIT_MAP) \
Call(DisablePlayerInput, TRUE) \
Set(LVar0, exitIdx) \
Set(LVar1, colliderID) \
Set(LVar2, leftDoorModelID) \
Set(LVar3, rightDoorModelID) \
Wait(17) \
Call(GotoMap, Ref(map), entryIdx) \
Wait(100) \
Return \
End \
}
EvtScript ExitDoubleDoor
Definition enter_exit.c:328

Definition at line 721 of file macros.h.

721#define EVT_EXIT_DOUBLE_DOOR(exitIdx, map, entryIdx, colliderID, leftDoorModelID, rightDoorModelID) \
722 { \
723 SetGroup(EVT_GROUP_EXIT_MAP) \
724 Call(DisablePlayerInput, TRUE) \
725 Set(LVar0, exitIdx) \
726 Set(LVar1, colliderID) \
727 Set(LVar2, leftDoorModelID) \
728 Set(LVar3, rightDoorModelID) \
729 Exec(ExitDoubleDoor) \
730 Wait(17) \
731 Call(GotoMap, Ref(map), entryIdx) \
732 Wait(100) \
733 Return \
734 End \
735 }

◆ EVT_EXIT_DOUBLE_DOOR_SET_SOUNDS

#define EVT_EXIT_DOUBLE_DOOR_SET_SOUNDS ( exitIdx,
map,
entryIdx,
colliderID,
leftDoorModelID,
rightDoorModelID,
sounds )
Value:
{ \
SetGroup(EVT_GROUP_EXIT_MAP) \
Call(DisablePlayerInput, TRUE) \
Call(UseDoorSounds, sounds) \
Set(LVar0, exitIdx) \
Set(LVar1, colliderID) \
Set(LVar2, leftDoorModelID) \
Set(LVar3, rightDoorModelID) \
Wait(17) \
Call(GotoMap, Ref(map), entryIdx) \
Wait(100) \
Return \
End \
}

Definition at line 737 of file macros.h.

737#define EVT_EXIT_DOUBLE_DOOR_SET_SOUNDS(exitIdx, map, entryIdx, colliderID, leftDoorModelID, rightDoorModelID, sounds) \
738 { \
739 SetGroup(EVT_GROUP_EXIT_MAP) \
740 Call(DisablePlayerInput, TRUE) \
741 Call(UseDoorSounds, sounds) \
742 Set(LVar0, exitIdx) \
743 Set(LVar1, colliderID) \
744 Set(LVar2, leftDoorModelID) \
745 Set(LVar3, rightDoorModelID) \
746 Exec(ExitDoubleDoor) \
747 Wait(17) \
748 Call(GotoMap, Ref(map), entryIdx) \
749 Wait(100) \
750 Return \
751 End \
752 }

◆ EVT_SETUP_CAMERA_DEFAULT

#define EVT_SETUP_CAMERA_DEFAULT ( r,
g,
b )
Value:
Call(SetCamBGColor, CAM_DEFAULT, r, g, b) \
@ CAM_UPDATE_FROM_ZONE
Definition enums.h:4755
@ CAM_DEFAULT
Definition enums.h:1800
ApiStatus SetCamEnabled(Evt *script, b32 isInitialCall)
ApiStatus SetCamBGColor(Evt *script, b32 isInitialCall)
ApiStatus SetCamPerspective(Evt *script, b32 isInitialCall)
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576

Enable camera using standard parameters for clip distances and FOV.

Parameters
rbackground red color
gbackground green color
bbackground blue color

Definition at line 758 of file macros.h.

758#define EVT_SETUP_CAMERA_DEFAULT(r, g, b) \
759 Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) \
760 Call(SetCamBGColor, CAM_DEFAULT, r, g, b) \
761 Call(SetCamEnabled, CAM_DEFAULT, TRUE)

◆ EVT_SETUP_CAMERA_NO_LEAD

#define EVT_SETUP_CAMERA_NO_LEAD ( r,
g,
b )
Value:
Call(SetCamBGColor, CAM_DEFAULT, r, g, b) \
Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) \
ApiStatus SetCamLeadPlayer(Evt *script, b32 isInitialCall)

Enable camera using standard parameters for clip distances and FOV with LeadPlayer disabled.

Parameters
rbackground red color
gbackground green color
bbackground blue color

Definition at line 767 of file macros.h.

767#define EVT_SETUP_CAMERA_NO_LEAD(r, g, b) \
768 Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 4096) \
769 Call(SetCamBGColor, CAM_DEFAULT, r, g, b) \
770 Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) \
771 Call(SetCamEnabled, CAM_DEFAULT, TRUE)

◆ EVT_SETUP_CAMERA_MIM

#define EVT_SETUP_CAMERA_MIM ( )
Value:

Enable camera for AREA_MIM using a closer far clip distance and appropriate background color.

Definition at line 774 of file macros.h.

774#define EVT_SETUP_CAMERA_MIM() \
775 Call(SetCamPerspective, CAM_DEFAULT, CAM_UPDATE_FROM_ZONE, 25, 16, 650) \
776 Call(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \
777 Call(SetCamLeadPlayer, CAM_DEFAULT, FALSE) \
778 Call(SetCamEnabled, CAM_DEFAULT, TRUE)

◆ __NARG__

#define __NARG__ ( args...)     __NARG_I_(args,__RSEQ_N())

Definition at line 783 of file macros.h.

783#define __NARG__(args...) \
784 __NARG_I_(args,__RSEQ_N())

◆ __NARG_I_

#define __NARG_I_ ( args...)     __ARG_N(args)

Definition at line 785 of file macros.h.

785#define __NARG_I_(args...) \
786 __ARG_N(args)

◆ __ARG_N

#define __ARG_N ( _1,
_2,
_3,
_4,
_5,
_6,
_7,
_8,
_9,
_10,
_11,
_12,
_13,
_14,
_15,
_16,
_17,
_18,
_19,
_20,
_21,
_22,
_23,
_24,
_25,
_26,
_27,
_28,
_29,
_30,
_31,
_32,
_33,
_34,
_35,
_36,
_37,
_38,
_39,
_40,
_41,
_42,
_43,
_44,
_45,
_46,
_47,
_48,
_49,
_50,
_51,
_52,
_53,
_54,
_55,
_56,
_57,
_58,
_59,
_60,
_61,
_62,
_63,
N,
... )   N

Definition at line 787 of file macros.h.

◆ __RSEQ_N

#define __RSEQ_N ( )
Value:
63,62,61,60, \
59,58,57,56,55,54,53,52,51,50, \
49,48,47,46,45,44,43,42,41,40, \
39,38,37,36,35,34,33,32,31,30, \
29,28,27,26,25,24,23,22,21,20, \
19,18,17,16,15,14,13,12,11,10, \
9,8,7,6,5,4,3,2,1,0

Definition at line 795 of file macros.h.

795#define __RSEQ_N() \
796 63,62,61,60, \
797 59,58,57,56,55,54,53,52,51,50, \
798 49,48,47,46,45,44,43,42,41,40, \
799 39,38,37,36,35,34,33,32,31,30, \
800 29,28,27,26,25,24,23,22,21,20, \
801 19,18,17,16,15,14,13,12,11,10, \
802 9,8,7,6,5,4,3,2,1,0

◆ _VFUNC_

#define _VFUNC_ ( name,
n )   name##n

Definition at line 803 of file macros.h.

◆ _VFUNC

#define _VFUNC ( name,
n )   _VFUNC_(name, n)

Definition at line 804 of file macros.h.

◆ VFUNC

#define VFUNC ( func,
args... )   _VFUNC(func, __NARG__(args)) (args)

Definition at line 805 of file macros.h.

◆ PlayEffect

#define PlayEffect ( args...)    VFUNC(PlayEffect, args)

Definition at line 807 of file macros.h.

Referenced by A(), and A().

◆ PlayEffect1

#define PlayEffect1 ( effect)     Call(PlayEffect_impl, effect, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

Definition at line 808 of file macros.h.

808#define PlayEffect1(effect) \
809 Call(PlayEffect_impl, effect, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

◆ PlayEffect2

#define PlayEffect2 ( effect,
subtype )    Call(PlayEffect_impl, effect, subtype, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

Definition at line 810 of file macros.h.

810#define PlayEffect2(effect, subtype) \
811 Call(PlayEffect_impl, effect, subtype, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

◆ PlayEffect3

#define PlayEffect3 ( effect,
subtype,
a )    Call(PlayEffect_impl, effect, subtype, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

Definition at line 812 of file macros.h.

812#define PlayEffect3(effect, subtype, a) \
813 Call(PlayEffect_impl, effect, subtype, a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

◆ PlayEffect4

#define PlayEffect4 ( effect,
subtype,
a,
b )    Call(PlayEffect_impl, effect, subtype, a, b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

Definition at line 814 of file macros.h.

814#define PlayEffect4(effect, subtype, a, b) \
815 Call(PlayEffect_impl, effect, subtype, a, b, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)

◆ PlayEffect5

#define PlayEffect5 ( effect,
subtype,
a,
b,
c )    Call(PlayEffect_impl, effect, subtype, a, b, c, 0, 0, 0, 0, 0, 0, 0, 0, 0)

Definition at line 816 of file macros.h.

816#define PlayEffect5(effect, subtype, a, b, c) \
817 Call(PlayEffect_impl, effect, subtype, a, b, c, 0, 0, 0, 0, 0, 0, 0, 0, 0)

◆ PlayEffect6

#define PlayEffect6 ( effect,
subtype,
a,
b,
c,
d )    Call(PlayEffect_impl, effect, subtype, a, b, c, d, 0, 0, 0, 0, 0, 0, 0, 0)

Definition at line 818 of file macros.h.

818#define PlayEffect6(effect, subtype, a, b, c, d) \
819 Call(PlayEffect_impl, effect, subtype, a, b, c, d, 0, 0, 0, 0, 0, 0, 0, 0)

◆ PlayEffect7

#define PlayEffect7 ( effect,
subtype,
a,
b,
c,
d,
e )    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, 0, 0, 0, 0, 0, 0, 0)

Definition at line 820 of file macros.h.

820#define PlayEffect7(effect, subtype, a, b, c, d, e) \
821 Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, 0, 0, 0, 0, 0, 0, 0)

◆ PlayEffect8

#define PlayEffect8 ( effect,
subtype,
a,
b,
c,
d,
e,
f )    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, 0, 0, 0, 0, 0, 0)

Definition at line 822 of file macros.h.

822#define PlayEffect8(effect, subtype, a, b, c, d, e, f) \
823 Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, 0, 0, 0, 0, 0, 0)

◆ PlayEffect9

#define PlayEffect9 ( effect,
subtype,
a,
b,
c,
d,
e,
f,
g )    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, 0, 0, 0, 0, 0)

Definition at line 824 of file macros.h.

824#define PlayEffect9(effect, subtype, a, b, c, d, e, f, g) \
825 Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, 0, 0, 0, 0, 0)

◆ PlayEffect10

#define PlayEffect10 ( effect,
subtype,
a,
b,
c,
d,
e,
f,
g,
h )    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, 0, 0, 0, 0)

Definition at line 826 of file macros.h.

826#define PlayEffect10(effect, subtype, a, b, c, d, e, f, g, h) \
827 Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, 0, 0, 0, 0)

◆ PlayEffect11

#define PlayEffect11 ( effect,
subtype,
a,
b,
c,
d,
e,
f,
g,
h,
i )    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, 0, 0, 0)

Definition at line 828 of file macros.h.

828#define PlayEffect11(effect, subtype, a, b, c, d, e, f, g, h, i) \
829 Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, 0, 0, 0)

◆ PlayEffect12

#define PlayEffect12 ( effect,
subtype,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j )    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, 0, 0)

Definition at line 830 of file macros.h.

830#define PlayEffect12(effect, subtype, a, b, c, d, e, f, g, h, i, j) \
831 Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, 0, 0)

◆ PlayEffect13

#define PlayEffect13 ( effect,
subtype,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k )    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, 0)

Definition at line 832 of file macros.h.

832#define PlayEffect13(effect, subtype, a, b, c, d, e, f, g, h, i, j, k) \
833 Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, 0)

◆ PlayEffect14

#define PlayEffect14 ( effect,
subtype,
a,
b,
c,
d,
e,
f,
g,
h,
i,
j,
k,
l )    Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l)

Definition at line 834 of file macros.h.

834#define PlayEffect14(effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l) \
835 Call(PlayEffect_impl, effect, subtype, a, b, c, d, e, f, g, h, i, j, k, l)