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) |
#define BSS __attribute__ ((nocommon, section (".bss"))) |
#define TRANSPARENT_UNION __attribute__ ((__transparent_union__)) |
#define ALIGNED | ( | x | ) | __attribute__((aligned(x))) |
#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().
#define ALIGN8 | ( | val | ) | (((val) + 0x7) & ~0x7) |
Definition at line 21 of file macros.h.
Referenced by spr_load_sprite().
#define NAME_PREFIX |
#define A | ( | sym | ) | NS(AREA, NAME_PREFIX, sym, NAME_SUFFIX) |
#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().
#define PTR_LIST_END ((void*) -1) |
Definition at line 42 of file macros.h.
Referenced by entity_Tweester_select_target_point(), func_E0020000(), set_npc_imgfx_comp(), set_player_imgfx_comp(), spr_allocate_components(), spr_component_update(), spr_draw_npc_sprite(), spr_draw_player_sprite(), spr_free_sprite(), spr_get_comp_position(), spr_init_anim_state(), spr_init_component_anim_state(), spr_load_npc_extra_anims(), spr_load_npc_sprite(), spr_load_sprite(), spr_swizzle_anim_offsets(), and spr_update_player_sprite().
#define PHYSICAL_TO_VIRTUAL | ( | addr | ) | (void*)((u32)(addr) + 0x80000000) |
#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().
#define IS_DEBUG_PANIC | ( | statement | ) | is_debug_panic(statement) |
#define PANIC | ( | ) | IS_DEBUG_PANIC("Panic") |
Definition at line 55 of file macros.h.
Referenced by boot_main(), calc_item_damage_enemy(), create_actor(), evt_execute_next_command(), evt_goto_end_case(), evt_goto_end_loop(), evt_goto_next_case(), evt_skip_else(), evt_skip_if(), find_script_labels(), get_enemy(), load_partner_actor(), load_simple_entity_data(), and load_split_entity_data().
#define PANIC_MSG | ( | msg, | |
args... ) |
#define ASSERT | ( | condition | ) |
#define ASSERT_MSG | ( | condition, | |
msg, | |||
args... ) |
Definition at line 66 of file macros.h.
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().
#define BADGE_MENU_PAGE | ( | index | ) | (&gPauseBadgesPages[index]) |
Definition at line 73 of file macros.h.
Referenced by pause_badges_get_column(), pause_badges_get_pos_x(), pause_badges_get_pos_y(), and pause_badges_get_row().
#define ITEM_MENU_PAGE | ( | index | ) | (&gPauseItemsPages[index]) |
Definition at line 74 of file macros.h.
Referenced by pause_items_get_column(), pause_items_get_pos_x(), pause_items_get_pos_y(), and pause_items_get_row().
#define MENU_PANEL_SELECTED_GRID_DATA | ( | panel | ) |
Definition at line 76 of file macros.h.
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().
#define MAX_MAPVARS 16 |
Definition at line 81 of file macros.h.
Referenced by clear_script_list().
#define MAX_MAPFLAGS 3 |
Definition at line 82 of file macros.h.
Referenced by clear_script_list().
#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().
#define MAX_ENTITY_MODELS 256 |
Definition at line 87 of file macros.h.
Referenced by ALT_load_entity_model(), clear_entity_models(), free_entity_model_by_ref(), and load_entity_model().
#define MAX_MODELS 256 |
Definition at line 88 of file macros.h.
Referenced by get_model_list_index_from_tree_index(), mdl_group_set_custom_gfx(), and mdl_group_set_visibility().
#define MAX_MODEL_TRANSFORM_GROUPS 4 |
Definition at line 89 of file macros.h.
Referenced by get_transform_group_index().
#define MAX_SCRIPTS 128 |
Definition at line 90 of file macros.h.
Referenced by clear_script_flags(), clear_script_list(), does_script_exist(), does_script_exist_by_ref(), func_802C39F8(), func_802C3C10(), func_802C73B8(), get_script_by_id(), kill_all_scripts(), kill_script(), kill_script_by_ID(), resume_all_group(), resume_all_script(), resume_group_others(), resume_group_script(), resume_group_script_index(), set_script_flags(), sort_scripts(), start_child_script(), start_script(), start_script_in_group(), suspend_all_group(), suspend_all_script(), suspend_group_others(), suspend_group_script(), and suspend_group_script_index().
#define MAX_NPCS 64 |
Definition at line 91 of file macros.h.
Referenced by clear_npcs(), create_npc_impl(), free_npc(), get_npc_safe(), get_npc_unsafe(), npc_do_other_npc_collision(), npc_reload_all(), render_npcs(), and update_npcs().
#define MAX_TRIGGERS 64 |
Definition at line 92 of file macros.h.
Referenced by get_trigger_tattle().
#define MAX_SHADOWS 60 |
Definition at line 93 of file macros.h.
Referenced by clear_entity_data(), render_shadows(), spawn_drops(), and update_shadows().
#define MAX_ENTITIES 30 |
Definition at line 94 of file macros.h.
Referenced by clear_entity_data(), create_entity(), entity_free_static_data(), is_entity_data_loaded(), reload_world_entity_data(), render_entities(), test_ray_entities(), and update_entities().
#define MAX_WORKERS 16 |
Definition at line 95 of file macros.h.
Referenced by clear_worker_list(), create_worker_backUI(), create_worker_frontUI(), create_worker_world(), render_workers_backUI(), render_workers_frontUI(), render_workers_world(), and update_workers().
#define MAX_ITEM_ENTITIES 256 |
#define MAX_IMGFX_INSTANCES 90 |
Definition at line 98 of file macros.h.
Referenced by imgfx_appendGfx_component(), imgfx_get_next_instance(), imgfx_release_instance(), imgfx_release_instance_chain(), and imgfx_update().
#define MAX_STAR_PIECES 222 |
Definition at line 100 of file macros.h.
Referenced by add_star_pieces(), and update_item_entity_pickup().
#define SP_PER_BAR 256 |
Definition at line 102 of file macros.h.
Referenced by add_star_power(), btl_state_update_celebration(), btl_state_update_end_turn(), increment_max_star_power(), pause_stats_draw_contents(), set_max_star_power(), and update_status_bar().
#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().
#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().
#define SCREEN_HEIGHT 240 |
Definition at line 106 of file macros.h.
Referenced by _render_transition_stencil(), appendGfx_darkness_stencil(), appendGfx_intro_logos(), appendGfx_message(), appendGfx_reset_tile_pattern(), appendGfx_screen_transition_stencil(), appendGfx_title_screen(), btl_draw_upgrade_windows(), btl_state_draw_select_target(), btl_update_starpoints_display(), bulb_glow_appendGfx(), crash_screen_draw(), 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_update_show_name_confirm(), firework_rocket_appendGfx(), func_80027774(), func_80027BAC(), func_800F102C(), func_E00D8630(), gfx_draw_background(), gfx_draw_frame(), gfx_transfer_frame_to_depth(), hud_element_draw_rect(), hud_element_setup_cam(), motion_blur_flame_appendGfx(), msg_draw_rewind_arrow(), 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_frame(), render_windows(), sfx_compute_spatialized_sound_params_full(), show_first_strike_message(), state_drawUI_startup(), tattle_window_fill_clipped_quad(), and update_status_bar().
#define LAST_DEMO_SCENE_IDX 18 |
Definition at line 108 of file macros.h.
Referenced by btl_state_update_end_demo_battle(), state_step_demo(), and update_exit_map_screen_overlay().
#define COLLISION_HEAP_SIZE 0x18000 |
Definition at line 111 of file macros.h.
Referenced by collision_heap_create().
#define GENERAL_HEAP_SIZE 0x54000 |
Definition at line 112 of file macros.h.
Referenced by general_heap_create().
#define SPRITE_HEAP_SIZE 0x60000 |
Definition at line 113 of file macros.h.
Referenced by spr_init_sprites().
#define BATTLE_HEAP_SIZE 0x25800 |
Definition at line 114 of file macros.h.
Referenced by battle_heap_create().
#define CAM_NEAR_CLIP 16 |
Definition at line 117 of file macros.h.
Referenced by hud_element_setup_cam(), state_init_file_select(), state_init_logos(), and state_init_title_screen().
#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().
#define TMEM_SIZE 0x1000 |
Definition at line 121 of file macros.h.
Referenced by bulb_glow_appendGfx().
#define SCREEN_COPY_TILE_HEIGHT ((TMEM_SIZE) / ((SCREEN_WIDTH) * (2))) |
Definition at line 123 of file macros.h.
Referenced by gfx_draw_background().
#define PI 3.141592f |
Definition at line 126 of file macros.h.
Referenced by create_camera_leadplayer_matrix().
#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().
#define TAU 6.28318f |
Definition at line 128 of file macros.h.
Referenced by appendGfx_background_texture(), and entity_GiantChest_open().
#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().
#define RAD_TO_BINANG | ( | x | ) | ((x) * (f32)(0x8000 / M_PI)) |
Definition at line 133 of file macros.h.
Referenced by build_gfx_blue_stars(), build_gfx_green_stars(), build_gfx_pink_stars(), build_gfx_yellow_stars(), cos_rad(), sin_cos_rad(), and sin_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().
#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().
#define SPRITE_WORLD_SCALE_F (5.0f/7.0f) |
Definition at line 139 of file macros.h.
Referenced by peach_star_beam_appendGfx().
#define SPRITE_WORLD_SCALE_D (5.0/7.0) |
Definition at line 140 of file macros.h.
Referenced by appendGfx_nonplayer_actor_blur(), appendGfx_npc(), appendGfx_npc_actor(), appendGfx_npc_actor_reflection(), appendGfx_npc_blur(), appendGfx_player(), appendGfx_player_actor(), appendGfx_player_actor_blur(), appendGfx_player_actor_reflection(), appendGfx_player_spin(), and throw_spiny_appendGfx().
#define SPR_PAL_SIZE 16 |
Definition at line 142 of file macros.h.
Referenced by make_flash_palettes(), npc_render_with_double_pal_blending(), npc_render_with_single_pal_blending(), npc_render_with_watt_idle_palettes(), render_with_berserk_palettes(), render_with_fear_palettes(), render_with_pal_blending(), render_with_palset_blending(), render_with_paralyze_palettes(), render_with_player_debuff_palettes(), render_with_poison_palettes(), render_with_sleep_palettes(), render_with_static_palettes(), render_with_watt_attack_palettes(), and render_with_watt_idle_palettes().
#define BATTLE_ID_BIT 0x800 |
Definition at line 144 of file macros.h.
Referenced by create_mesh_animator(), create_model_animator(), render_animated_model(), render_animated_model_with_vertices(), update_model_animator(), and update_model_animator_with_transform().
#define BATTLE_NPC_ID_BIT 0x800 |
Definition at line 145 of file macros.h.
Referenced by create_npc_impl().
#define BATTLE_ENTITY_ID_BIT 0x800 |
Definition at line 146 of file macros.h.
Referenced by ALT_load_entity_model(), create_worker_backUI(), create_worker_frontUI(), create_worker_world(), draw_entity_model_A(), draw_entity_model_B(), draw_entity_model_C(), draw_entity_model_D(), exec_entity_model_commandlist(), free_worker(), and load_entity_model().
#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().
#define UNPACK_BTL_INDEX | ( | battleID | ) | ((battleID) & 0xFF) |
Definition at line 149 of file macros.h.
Referenced by load_battle_section(), and state_step_battle().
#define COLLISION_WITH_NPC_BIT 0x2000 |
Definition at line 151 of file macros.h.
Referenced by check_for_interactables(), and should_continue_inspect().
#define COLLISION_WITH_ENTITY_BIT 0x4000 |
Definition at line 152 of file macros.h.
Referenced by action_hammer_end_swing(), action_hammer_test_swing_collision(), action_update_land(), action_update_peach_land(), action_update_peach_step_down_land(), action_update_spin_jump(), action_update_step_down_land(), action_update_tornado_jump(), action_update_use_spinning_flower(), blast_affect_entities(), can_dismount(), check_for_interactables(), check_input_jump(), collision_main_above(), entity_get_collision_flags(), entity_raycast_down(), entity_StarBoxLauncher_check_launch(), func_800E06D8(), func_800EA4B0(), get_collider_flags(), interact_inspect_update(), lateral_hit_interactable_entity(), npc_find_standing_on_entity(), npc_raycast_down(), npc_raycast_general(), npc_raycast_up(), npc_raycast_up_corner(), phys_main_collision_below(), phys_player_land(), player_raycast_down(), player_raycast_general(), player_raycast_up_corner(), should_continue_inspect(), and vertical_hit_interactable_entity().
#define ENTITY_COLLIDER_ID | ( | entityIndex | ) | (entityIndex | COLLISION_WITH_ENTITY_BIT) |
#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().
#define NPC_DISPOSE_LOCATION 0,-1000,0 |
#define NPC_DISPOSE_POS_X 0 |
Definition at line 159 of file macros.h.
Referenced by appendGfx_npc_actor(), appendGfx_player_actor(), btl_save_world_cameras(), and create_partner_npc().
#define NPC_DISPOSE_POS_Y -1000 |
Definition at line 160 of file macros.h.
Referenced by appendGfx_npc_actor(), appendGfx_player_actor(), btl_save_world_cameras(), create_partner_npc(), and firework_rocket_update().
#define NPC_DISPOSE_POS_Z 0 |
Definition at line 161 of file macros.h.
Referenced by appendGfx_npc_actor(), appendGfx_player_actor(), btl_save_world_cameras(), and create_partner_npc().
#define PACK_FILL_COLOR | ( | r, | |
g, | |||
b, | |||
a ) (GPACK_RGBA5551(r, g, b, a) << 0x10) | GPACK_RGBA5551(r, g, b, a) |
Definition at line 163 of file macros.h.
Referenced by appendGfx_intro_logos(), draw_box(), gfx_draw_background(), and tattle_cam_pre_render().
#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().
#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().
#define CUBE | ( | x | ) | ((x) * (x) * (x)) |
Definition at line 167 of file macros.h.
Referenced by update_lerp(), and update_lerp_battle().
#define QUART | ( | x | ) | ((x) * (x) * (x) * (x)) |
Definition at line 168 of file macros.h.
Referenced by update_lerp(), and update_lerp_battle().
#define F16 | ( | f | ) | (s16)(f * 327.67f) |
#define X10 | ( | f | ) | (s32)(f * 1024.0f) |
X.10 fixed-point literal.
Definition at line 174 of file macros.h.
Referenced by draw_hud_element_internal(), hud_element_create(), hud_element_set_scale(), hud_element_set_script(), hud_element_update(), hud_element_use_preset_size(), render_hud_elements_backUI(), and render_hud_elements_frontUI().
#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().
#define ITEM_VIS_GROUP | ( | itemID, | |
visGroupID ) ((visGroupID) << 16 | (itemID)) |
#define PACK_ROOM_FLAGS | ( | itemVisGroup, | |
roomFlags ) ((itemVisGroup) << 12 | (roomFlags)) |
#define LOAD_INTEGRATOR_FALL | ( | ptr | ) |
Definition at line 186 of file macros.h.
Referenced by action_update_hit_lava(), action_update_sliding(), handle_jumping_launch(), and start_falling().
#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 |
Definition at line 222 of file macros.h.
Referenced by try_inflict_status().
#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_PACK_WHOLE | ( | a, | |
b ) (_RDP_WHOLE(a) << 16) | _RDP_WHOLE(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) |
Definition at line 267 of file macros.h.
Referenced by appendGfx_background_texture(), gfx_frame_filter_pass_0(), msg_draw_frame(), npc_blend_palette_colors(), render_with_berserk_palettes(), render_with_fear_palettes(), render_with_pal_blending(), render_with_palset_blending(), render_with_paralyze_palettes(), render_with_player_debuff_palettes(), render_with_sleep_palettes(), render_with_static_palettes(), and tattle_cam_pre_render().
#define UNPACK_PAL_G | ( | color | ) | (((color) >> 6) & 0x1F) |
Definition at line 268 of file macros.h.
Referenced by appendGfx_background_texture(), gfx_frame_filter_pass_0(), msg_draw_frame(), npc_blend_palette_colors(), render_with_berserk_palettes(), render_with_fear_palettes(), render_with_pal_blending(), render_with_palset_blending(), render_with_paralyze_palettes(), render_with_player_debuff_palettes(), render_with_sleep_palettes(), render_with_static_palettes(), and tattle_cam_pre_render().
#define UNPACK_PAL_B | ( | color | ) | (((color) >> 1) & 0x1F) |
Definition at line 269 of file macros.h.
Referenced by appendGfx_background_texture(), gfx_frame_filter_pass_0(), msg_draw_frame(), npc_blend_palette_colors(), render_with_berserk_palettes(), render_with_fear_palettes(), render_with_pal_blending(), render_with_palset_blending(), render_with_paralyze_palettes(), render_with_player_debuff_palettes(), render_with_sleep_palettes(), render_with_static_palettes(), and tattle_cam_pre_render().
#define UNPACK_PAL_A | ( | color | ) | ((color) & 1) |
Definition at line 270 of file macros.h.
Referenced by npc_blend_palette_colors(), render_with_berserk_palettes(), render_with_fear_palettes(), render_with_pal_blending(), render_with_palset_blending(), render_with_paralyze_palettes(), render_with_player_debuff_palettes(), render_with_sleep_palettes(), and render_with_static_palettes().
#define PACK_PAL_RGBA | ( | r, | |
g, | |||
b, | |||
a ) (((r) << 11) | ((g) << 6) | ((b) << 1) | (a)); |
Definition at line 272 of file macros.h.
Referenced by npc_blend_palette_colors(), render_with_berserk_palettes(), render_with_fear_palettes(), render_with_pal_blending(), render_with_palset_blending(), render_with_paralyze_palettes(), render_with_player_debuff_palettes(), render_with_sleep_palettes(), and render_with_static_palettes().
#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().
#define PM_CC_01 0, 0, 0, TEXEL0, PRIMITIVE, 0, TEXEL0, 0 |
Definition at line 276 of file macros.h.
Referenced by draw_number(), entity_base_block_setupGfx(), entity_HeartBlockContent__setupGfx(), entity_ItemBlock_setupGfx(), entity_PinkFlowerLight_setupGfx(), entity_SaveBlock_setupGfx(), entity_SuperBlockContent_setupGfx(), func_8010FD98(), func_E011A3BC(), and hud_element_draw_rect().
#define PM_CC_02 0, 0, 0, TEXEL0, TEXEL0, 0, PRIMITIVE, 0 |
Definition at line 277 of file macros.h.
Referenced by appendGfx_message(), draw_ci_image_with_clipping(), entity_base_block_setupGfx(), entity_HeartBlockContent__setupGfx(), entity_ItemBlock_setupGfx(), entity_PinkFlowerLight_setupGfx(), entity_SaveBlock_setupGfx(), entity_SuperBlockContent_setupGfx(), func_8010FD98(), func_801491E4(), hud_element_draw_rect(), imgfx_appendGfx_mesh(), msg_draw_frame(), msg_draw_speech_bubble(), and title_screen_draw_copyright().
#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 |
Definition at line 280 of file macros.h.
Referenced by imgfx_appendGfx_mesh_strip().
#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 |
Definition at line 282 of file macros.h.
Referenced by appendGfx_message(), draw_number(), filemenu_draw_char(), hud_element_draw_rect(), msg_draw_choice_pointer(), and radiating_energy_orb_appendGfx().
#define PM_CC_PRIM_FULL_ALPHA 0, 0, 0, PRIMITIVE, 0, 0, 0, 1 |
Definition at line 283 of file macros.h.
Referenced by appendGfx_msg_prim_rect(), appendGfx_screen_transition_stencil(), appendGfx_startup_prim_rect(), btl_appendGfx_prim_quad(), and virtual_entity_appendGfx_quad().
#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().
#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().
#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().
#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().
#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().
#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().
#define PM_CC_11 0, 0, 0, TEXEL0, SHADE, 0, TEXEL0, 0 |
Definition at line 294 of file macros.h.
Referenced by Entity_BoardedFloor_setupGfx(), entity_BombableRock_setupGfx(), entity_shattering_setupGfx(), and entity_WoodenCrate_setupGfx().
#define PM_CC_12 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0 |
Definition at line 295 of file macros.h.
Referenced by Entity_BoardedFloor_setupGfx(), entity_BombableRock_setupGfx(), entity_shattering_setupGfx(), entity_WoodenCrate_setupGfx(), and imgfx_appendGfx_mesh().
#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 |
Definition at line 305 of file macros.h.
Referenced by quizmo_stage_appendGfx().
#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().
#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 |
Definition at line 376 of file macros.h.
Referenced by entity_Tweester_setupGfx().
#define PM_CC_2C PRIMITIVE, 0, TEXEL1, 0, TEXEL1, 0, PRIMITIVE, 0 |
#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().
#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().
#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 |
Definition at line 404 of file macros.h.
Referenced by ice_shard_appendGfx().
#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().
#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 |
Definition at line 413 of file macros.h.
Referenced by appendGfx_reset_tile_pattern().
#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 |
Definition at line 431 of file macros.h.
Referenced by damage_indicator_render_impl().
#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().
#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().
#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 |
Definition at line 441 of file macros.h.
Referenced by func_801491E4().
#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 |
Definition at line 447 of file macros.h.
Referenced by imgfx_appendGfx_mesh().
#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().
#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().
#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().
#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_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().
#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().
#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().
#define PM_CC_45 TEXEL0, 0, PRIMITIVE, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0 |
Definition at line 472 of file macros.h.
Referenced by confetti_appendGfx().
#define PM_CC_46 TEXEL0, ENVIRONMENT, PRIMITIVE, 0, PRIMITIVE, 0, TEXEL0, 0 |
Definition at line 473 of file macros.h.
Referenced by confetti_appendGfx().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#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().
#define PM_CC_HOS_BG_SHADE 0, 0, 0, SHADE, SHADE, 0, PRIMITIVE, 0 |
#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().
#define DT (1.0f) |
Definition at line 522 of file macros.h.
Referenced by _update_message(), and initialize_printer().
#define DMA_COPY_SEGMENT | ( | segment | ) | dma_copy(segment##_ROM_START, segment##_ROM_END, segment##_VRAM) |
Definition at line 525 of file macros.h.
Referenced by btl_state_update_celebration(), btl_state_update_prepare_menu(), check_for_conversation_prompt(), check_for_interactables(), check_for_ispy(), check_for_pulse_stone(), clear_effect_data(), filemenu_init(), load_area_specific_entity_data(), load_engine_data(), load_map_script_lib(), pause_init(), shim_battle_heap_create_obfuscated(), shim_create_audio_system_obfuscated(), shim_general_heap_create_obfuscated(), shim_load_engine_data_obfuscated(), and state_step_battle().
#define EVT_LOCAL_VAR_CUTOFF -20000000 |
Expressions in EVT instructions should be one of the following types:
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().
#define EVT_MAP_VAR_CUTOFF -40000000 |
Definition at line 26 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().
#define EVT_LOCAL_FLAG_CUTOFF -60000000 |
Definition at line 28 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().
#define EVT_MAP_FLAG_CUTOFF -80000000 |
Definition at line 30 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().
#define EVT_AREA_FLAG_CUTOFF -100000000 |
Definition at line 32 of file macros.h.
Referenced by evt_get_variable(), evt_get_variable_index(), evt_get_variable_index_alt(), evt_handle_print_debug_var(), and evt_set_variable().
#define EVT_GAME_FLAG_CUTOFF -120000000 |
Definition at line 34 of file macros.h.
Referenced by clear_global_flag(), entity_GiantChest_give_equipment(), evt_get_variable(), evt_get_variable_index(), evt_get_variable_index_alt(), evt_handle_print_debug_var(), evt_set_variable(), get_global_flag(), make_item_entity(), and set_global_flag().
#define EVT_AREA_BYTE_CUTOFF -140000000 |
Definition at line 36 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(), and evt_set_variable().
#define EVT_GAME_BYTE_CUTOFF -160000000 |
Definition at line 38 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_variable(), get_global_byte(), get_global_short(), get_global_word(), set_global_byte(), set_global_short(), and set_global_word().
#define EVT_ARRAY_VAR_CUTOFF -180000000 |
Definition at line 40 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().
#define EVT_ARRAY_FLAG_CUTOFF -200000000 |
Definition at line 42 of file macros.h.
Referenced by evt_get_variable(), evt_get_variable_index(), evt_get_variable_index_alt(), evt_handle_print_debug_var(), and evt_set_variable().
#define EVT_FIXED_CUTOFF -220000000 |
Definition at line 44 of file macros.h.
Referenced by evt_fixed_var_to_float(), 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().
#define EVT_FIXED_OFFSET 230000000 |
Definition at line 45 of file macros.h.
Referenced by evt_float_to_fixed_var().
#define EVT_IGNORE_ARG -250000000 |
Definition at line 46 of file macros.h.
Referenced by evt_get_float_variable(), evt_get_variable(), evt_get_variable_index(), and evt_get_variable_index_alt().
#define EVT_LIMIT -270000000 |
Definition at line 47 of file macros.h.
Referenced by create_actor(), create_encounters(), evt_find_label(), 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(), evt_set_variable(), and resolve_npc().
#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.
Definition at line 54 of file macros.h.
Referenced by evt_fixed_var_to_float().
#define FLOAT_TO_FIXED | ( | x | ) | (((x) * 1024.0f) + -EVT_FIXED_OFFSET) |
#define Ref | ( | sym | ) | ((Bytecode) &(sym)) |
#define LocalVar | ( | INDEX | ) | ((INDEX) - EVT_LOCAL_VAR_OFFSET) |
#define MapVar | ( | INDEX | ) | ((INDEX) - EVT_MAP_VAR_OFFSET) |
#define LocalFlag | ( | INDEX | ) | ((INDEX) - EVT_LOCAL_FLAG_OFFSET) |
#define MapFlag | ( | INDEX | ) | ((INDEX) - EVT_MAP_FLAG_OFFSET) |
#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
#define GameFlag | ( | INDEX | ) | ((INDEX) - EVT_GAME_FLAG_OFFSET) |
#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
#define GameByte | ( | INDEX | ) | ((INDEX) - EVT_GAME_BYTE_OFFSET) |
#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
#define ArrayFlag | ( | INDEX | ) | ((INDEX) - EVT_ARRAY_FLAG_OFFSET) |
#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.
#define EVT_ENTITY_INDEX | ( | entityIndex | ) | ((entityIndex) + EVT_ENTITY_ID_BIT) |
#define EVT_INDEX_OF_LOCAL_VAR | ( | v | ) | ((v) + EVT_LOCAL_VAR_OFFSET) |
Definition at line 136 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().
#define EVT_INDEX_OF_LOCAL_FLAG | ( | v | ) | ((v) + EVT_LOCAL_FLAG_OFFSET) |
Definition at line 137 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().
#define EVT_INDEX_OF_MAP_VAR | ( | v | ) | ((v) + EVT_MAP_VAR_OFFSET) |
Definition at line 138 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().
#define EVT_INDEX_OF_MAP_FLAG | ( | v | ) | ((v) + EVT_MAP_FLAG_OFFSET) |
Definition at line 139 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().
#define EVT_INDEX_OF_AREA_FLAG | ( | v | ) | ((v) + EVT_AREA_FLAG_OFFSET) |
Definition at line 140 of file macros.h.
Referenced by evt_get_variable(), evt_get_variable_index(), evt_get_variable_index_alt(), evt_handle_print_debug_var(), and evt_set_variable().
#define EVT_INDEX_OF_AREA_BYTE | ( | v | ) | ((v) + EVT_AREA_BYTE_OFFSET) |
Definition at line 141 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(), and evt_set_variable().
#define EVT_INDEX_OF_GAME_FLAG | ( | v | ) | ((v) + EVT_GAME_FLAG_OFFSET) |
Definition at line 142 of file macros.h.
Referenced by clear_global_flag(), entity_GiantChest_give_equipment(), evt_get_variable(), evt_get_variable_index(), evt_get_variable_index_alt(), evt_handle_print_debug_var(), evt_set_variable(), get_global_flag(), make_item_entity(), set_global_flag(), and spawn_drops().
#define EVT_INDEX_OF_GAME_BYTE | ( | v | ) | ((v) + EVT_GAME_BYTE_OFFSET) |
Definition at line 143 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_variable(), get_global_byte(), get_global_short(), get_global_word(), is_actor_health_bar_visible(), is_actortype_health_bar_visible(), load_tattle_flags(), save_tattle_flags(), set_global_byte(), set_global_short(), and set_global_word().
#define EVT_INDEX_OF_ARRAY_FLAG | ( | v | ) | ((v) + EVT_ARRAY_FLAG_OFFSET) |
Definition at line 144 of file macros.h.
Referenced by evt_get_variable(), evt_get_variable_index(), evt_get_variable_index_alt(), evt_handle_print_debug_var(), and evt_set_variable().
#define EVT_INDEX_OF_ARRAY_VAR | ( | v | ) | ((v) + EVT_ARRAY_VAR_OFFSET) |
Definition at line 145 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().
#define LVar0 LocalVar(0) |
#define LVar1 LocalVar(1) |
Definition at line 149 of file macros.h.
Referenced by A(), A(), A(), exec_ShakeCamX(), and make_vine_interpolation().
#define LVar2 LocalVar(2) |
Definition at line 150 of file macros.h.
Referenced by A(), A(), A(), exec_ShakeCamX(), and make_vine_interpolation().
#define LVar3 LocalVar(3) |
Definition at line 151 of file macros.h.
Referenced by A(), exec_ShakeCamX(), and make_vine_interpolation().
#define LVarA LocalVar(10) |
#define LVarB LocalVar(11) |
#define LVarC LocalVar(12) |
#define EVT_CMD | ( | opcode, | |
argv... ) |
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:
Definition at line 207 of file macros.h.
#define End EVT_CMD(EVT_OP_END), |
#define Return EVT_CMD(EVT_OP_RETURN), |
#define Jump | ( | EVT_SOURCE | ) | EVT_CMD(EVT_OP_JUMP, (Bytecode) EVT_SOURCE), |
#define Label | ( | LABEL_ID | ) | EVT_CMD(EVT_OP_LABEL, LABEL_ID), |
#define Goto | ( | LABEL_ID | ) | EVT_CMD(EVT_OP_GOTO, LABEL_ID), |
#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.
#define EndLoop EVT_CMD(EVT_OP_END_LOOP), |
#define BreakLoop EVT_CMD(EVT_OP_BREAK_LOOP), |
#define Wait | ( | NUM_FRAMES | ) | EVT_CMD(EVT_OP_WAIT_FRAMES, NUM_FRAMES), |
#define WaitSecs | ( | NUM_SECONDS | ) | EVT_CMD(EVT_OP_WAIT_SECS, NUM_SECONDS), |
#define IfEq | ( | LVAR, | |
RVAR ) EVT_CMD(EVT_OP_IF_EQ, LVAR, RVAR), |
#define IfNe | ( | LVAR, | |
RVAR ) EVT_CMD(EVT_OP_IF_NE, LVAR, RVAR), |
#define IfLt | ( | LVAR, | |
RVAR ) EVT_CMD(EVT_OP_IF_LT, LVAR, RVAR), |
#define IfGt | ( | LVAR, | |
RVAR ) EVT_CMD(EVT_OP_IF_GT, LVAR, RVAR), |
#define IfLe | ( | LVAR, | |
RVAR ) EVT_CMD(EVT_OP_IF_LE, LVAR, RVAR), |
#define IfGe | ( | LVAR, | |
RVAR ) EVT_CMD(EVT_OP_IF_GE, LVAR, RVAR), |
#define IfFlag | ( | LVAR, | |
RVAR ) EVT_CMD(EVT_OP_IF_FLAG, LVAR, RVAR), |
#define IfNotFlag | ( | LVAR, | |
RVAR ) EVT_CMD(EVT_OP_IF_NOT_FLAG, LVAR, RVAR), |
#define Else EVT_CMD(EVT_OP_ELSE), |
#define EndIf EVT_CMD(EVT_OP_END_IF), |
#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.
#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)
.
#define CaseEq | ( | RVAR | ) | EVT_CMD(EVT_OP_CASE_EQ, RVAR), |
#define CaseNe | ( | RVAR | ) | EVT_CMD(EVT_OP_CASE_NE, RVAR), |
#define CaseLt | ( | RVAR | ) | EVT_CMD(EVT_OP_CASE_LT, RVAR), |
#define CaseGt | ( | RVAR | ) | EVT_CMD(EVT_OP_CASE_GT, RVAR), |
#define CaseLe | ( | RVAR | ) | EVT_CMD(EVT_OP_CASE_LE, RVAR), |
#define CaseGe | ( | RVAR | ) | EVT_CMD(EVT_OP_CASE_GE, RVAR), |
#define CaseDefault EVT_CMD(EVT_OP_CASE_DEFAULT), |
#define CaseOrEq | ( | RVAR | ) | EVT_CMD(EVT_OP_CASE_OR_EQ, RVAR), |
#define CaseAndEq | ( | RVAR | ) | EVT_CMD(EVT_OP_CASE_AND_EQ, RVAR), |
#define CaseFlag | ( | RVAR | ) | EVT_CMD(EVT_OP_CASE_FLAG, RVAR), |
#define EndCaseGroup EVT_CMD(EVT_OP_END_CASE_GROUP), |
#define CaseRange | ( | MIN, | |
MAX ) EVT_CMD(EVT_OP_CASE_RANGE, MIN, MAX), |
#define BreakSwitch EVT_CMD(EVT_OP_BREAK_SWITCH), |
#define EndSwitch EVT_CMD(EVT_OP_END_SWITCH), |
#define Set | ( | VAR, | |
INT_VALUE ) EVT_CMD(EVT_OP_SET, VAR, (Bytecode) INT_VALUE), |
#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)
.
#define SetF | ( | VAR, | |
FLOAT_VALUE ) EVT_CMD(EVT_OP_SETF, VAR, FLOAT_VALUE), |
#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), |
#define BufRead1 | ( | VAR | ) | EVT_CMD(EVT_OP_BUF_READ1, VAR), |
#define BufRead2 | ( | VAR1, | |
VAR2 ) EVT_CMD(EVT_OP_BUF_READ2, VAR1, VAR2), |
#define BufRead3 | ( | VAR1, | |
VAR2, | |||
VAR3 ) EVT_CMD(EVT_OP_BUF_READ3, VAR1, VAR2, VAR3), |
#define BufRead4 | ( | VAR1, | |
VAR2, | |||
VAR3, | |||
VAR4 ) EVT_CMD(EVT_OP_BUF_READ4, VAR1, VAR2, VAR3, VAR4), |
#define BufPeek | ( | OFFSET, | |
VAR ) EVT_CMD(EVT_OP_BUF_PEEK, OFFSET, VAR), |
#define UseFBuf | ( | FLOAT_PTR | ) | EVT_CMD(EVT_OP_USE_FBUF, (Bytecode) FLOAT_PTR), |
#define FBufRead1 | ( | VAR | ) | EVT_CMD(EVT_OP_FBUF_READ1, VAR), |
#define FBufRead2 | ( | VAR1, | |
VAR2 ) EVT_CMD(EVT_OP_FBUF_READ2, VAR1, VAR2), |
#define FBufRead3 | ( | VAR1, | |
VAR2, | |||
VAR3 ) EVT_CMD(EVT_OP_FBUF_READ3, VAR1, VAR2, VAR3), |
#define FBufRead4 | ( | VAR1, | |
VAR2, | |||
VAR3, | |||
VAR4 ) EVT_CMD(EVT_OP_FBUF_READ4, VAR1, VAR2, VAR3, VAR4), |
#define FBufPeek | ( | OFFSET, | |
VAR ) EVT_CMD(EVT_OP_FBUF_PEEK, OFFSET, VAR), |
#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 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.
#define BitwiseAnd | ( | VAR, | |
VALUE ) EVT_CMD(EVT_OP_BITWISE_AND, VAR, VALUE), |
#define BitwiseAndConst | ( | VAR, | |
CONST ) EVT_CMD(EVT_OP_BITWISE_AND_CONST, VAR, CONST), |
#define BitwiseOr | ( | VAR, | |
VALUE ) EVT_CMD(EVT_OP_BITWISE_OR, VAR, VALUE), |
#define BitwiseOrConst | ( | VAR, | |
CONST ) EVT_CMD(EVT_OP_BITWISE_OR_CONST, VAR, CONST), |
#define Exec | ( | EVT_SOURCE | ) | EVT_CMD(EVT_OP_EXEC, (Bytecode) EVT_SOURCE), |
#define ExecGetTID | ( | EVT_SOURCE, | |
OUTVAR ) EVT_CMD(EVT_OP_EXEC_GET_TID, (Bytecode) EVT_SOURCE, OUTVAR), |
#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:
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.
#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:
For the COLLIDER_ID
param, the following values are accepted:
Only one thread will run for a trigger at once.
Definition at line 499 of file macros.h.
#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.
#define Unbind EVT_CMD(EVT_OP_UNBIND), |
#define KillThread | ( | TID | ) | EVT_CMD(EVT_OP_KILL_THREAD, TID), |
#define SetPriority | ( | PRIORITY | ) | EVT_CMD(EVT_OP_SET_PRIORITY, PRIORITY), |
#define SetTimescale | ( | TIMESCALE | ) | EVT_CMD(EVT_OP_SET_TIMESCALE, TIMESCALE), |
#define SetGroup | ( | GROUP | ) | EVT_CMD(EVT_OP_SET_GROUP, GROUP), |
#define SuspendGroup | ( | GROUP | ) | EVT_CMD(EVT_OP_SUSPEND_GROUP, GROUP), |
#define ResumeGroup | ( | GROUP | ) | EVT_CMD(EVT_OP_RESUME_GROUP, GROUP), |
#define SuspendOthers | ( | GROUP | ) | EVT_CMD(EVT_OP_SUSPEND_OTHERS, GROUP), |
#define ResumeOthers | ( | GROUP | ) | EVT_CMD(EVT_OP_RESUME_OTHERS, GROUP), |
#define SuspendThread | ( | TID | ) | EVT_CMD(EVT_OP_SUSPEND_THREAD, TID), |
#define ResumeThread | ( | TID | ) | EVT_CMD(EVT_OP_RESUME_THREAD, TID), |
#define IsThreadRunning | ( | TID, | |
OUTVAR ) EVT_CMD(EVT_OP_IS_THREAD_RUNNING, TID, OUTVAR), |
#define Thread EVT_CMD(EVT_OP_THREAD), |
#define EndThread EVT_CMD(EVT_OP_END_THREAD), |
#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
#define EndChildThread EVT_CMD(EVT_OP_END_CHILD_THREAD), |
#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
.
#define EVT_DEBUG_LOG | ( | STRING | ) | EVT_CMD(EVT_OP_DEBUG_LOG, STRING), |
#define DebugPrintVar | ( | VAR | ) | EVT_CMD(EVT_OP_DEBUG_PRINT_VAR, VAR), |
#define EVT_AS_VEC3 | ( | baseVar | ) | (baseVar), (baseVar + 1), (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 ) |
Definition at line 608 of file macros.h.
#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 EVT_EXIT_WALK | ( | walkDistance, | |
exitIdx, | |||
map, | |||
entryIdx ) |
Definition at line 648 of file macros.h.
#define EVT_EXIT_WALK_NOK | ( | walkDistance, | |
exitIdx, | |||
map, | |||
entryIdx ) |
Definition at line 661 of file macros.h.
#define EVT_EXIT_SINGLE_DOOR | ( | exitIdx, | |
map, | |||
entryIdx, | |||
colliderID, | |||
modelID, | |||
swingDir ) |
Definition at line 671 of file macros.h.
#define EVT_EXIT_SINGLE_DOOR_SET_SOUNDS | ( | exitIdx, | |
map, | |||
entryIdx, | |||
colliderID, | |||
modelID, | |||
swingDir, | |||
sounds ) |
Definition at line 687 of file macros.h.
#define EVT_EXIT_SPLIT_SINGLE_DOOR | ( | exitIdx, | |
map, | |||
entryIdx, | |||
colliderID, | |||
topModelID, | |||
bottomModelID, | |||
swingDir ) |
Definition at line 704 of file macros.h.
#define EVT_EXIT_DOUBLE_DOOR | ( | exitIdx, | |
map, | |||
entryIdx, | |||
colliderID, | |||
leftDoorModelID, | |||
rightDoorModelID ) |
Definition at line 721 of file macros.h.
#define EVT_EXIT_DOUBLE_DOOR_SET_SOUNDS | ( | exitIdx, | |
map, | |||
entryIdx, | |||
colliderID, | |||
leftDoorModelID, | |||
rightDoorModelID, | |||
sounds ) |
Definition at line 737 of file macros.h.
#define EVT_SETUP_CAMERA_DEFAULT | ( | r, | |
g, | |||
b ) |
Enable camera using standard parameters for clip distances and FOV.
r | background red color |
g | background green color |
b | background blue color |
Definition at line 758 of file macros.h.
#define EVT_SETUP_CAMERA_NO_LEAD | ( | r, | |
g, | |||
b ) |
Enable camera using standard parameters for clip distances and FOV with LeadPlayer disabled.
r | background red color |
g | background green color |
b | background blue color |
Definition at line 767 of file macros.h.
#define EVT_SETUP_CAMERA_MIM | ( | ) |
Enable camera for AREA_MIM
using a closer far clip distance and appropriate background color.
Definition at line 774 of file macros.h.
#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 | ( | ) |
Definition at line 795 of file macros.h.
#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) |