This file houses information about KCL types, as well as the struct for collision prisms. KCL files define collision for Mario Kart Wii and other games. They organize collision triangles using an octree, which allows for efficient indexing. Each triangle is associated with a 16-bit flag, which determines the effect the triangle has on the player colliding with it.
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Definition in file KCollisionTypes.hh.
Go to the source code of this file.
Classes | |
struct | Field::KColHeader |
The header of the KCL file format. It is 0x3C bytes long (for Mario Kart Wii). More... | |
Namespaces | |
namespace | Field |
Pertains to collision. | |
Typedefs | |
typedef u32 | Field::KCLTypeMask |
Enumerations | |
enum | KColType { COL_TYPE_ROAD = 0 , COL_TYPE_SLIPPERY_ROAD = 1 , COL_TYPE_WEAK_OFF_ROAD = 2 , COL_TYPE_OFF_ROAD = 3 , COL_TYPE_HEAVY_OFF_ROAD = 4 , COL_TYPE_SLIPPERY_ROAD_2 = 5 , COL_TYPE_BOOST_PAD = 6 , COL_TYPE_BOOST_RAMP = 7 , COL_TYPE_JUMP_PAD = 8 , COL_TYPE_ITEM_ROAD = 9 , COL_TYPE_SOLID_OOB = 0xa , COL_TYPE_MOVING_WATER = 0xb , COL_TYPE_WALL = 0xc , COL_TYPE_INVISIBLE_WALL = 0xd , COL_TYPE_ITEM_WALL = 0xe , COL_TYPE_WALL_2 = 0xf , COL_TYPE_FALL_BOUNDARY = 0x10 , COL_TYPE_CANNON_TRIGGER = 0x11 , COL_TYPE_FORCE_RECALCULATE_ROUTE = 0x12 , COL_TYPE_HALFPIPE_RAMP = 0x13 , COL_TYPE_PLAYER_WALL = 0x14 , COL_TYPE_MOVING_ROAD = 0x15 , COL_TYPE_STICKY_ROAD = 0x16 , COL_TYPE_ROAD2 = 0x17 , COL_TYPE_SOUND_TRIGGER = 0x18 , COL_TYPE_WEAK_WALL = 0x19 , COL_TYPE_EFFECT_TRIGGER = 0x1a , COL_TYPE_ITEM_STATE_MODIFIER = 0x1b , COL_TYPE_HALFPIPE_INVISIBLE_WALL = 0x1c , COL_TYPE_ROTATING_ROAD = 0x1d , COL_TYPE_SPECIAL_WALL = 0x1e , COL_TYPE_INVISIBLE_WALL2 = 0x1f , COL_TYPE_COUNT } |
Functions | |
STATIC_ASSERT (KCL_TYPE_64EBDFFF==0x64EBDFFF) | |
Field::STATIC_ASSERT (sizeof(KColHeader)==0x3c) | |
#define KCL_ANY 0xffffffff |
Definition at line 71 of file KCollisionTypes.hh.
#define KCL_ATTRIBUTE_TYPE | ( | x | ) |
Computes the "Base Type" portion of the KCL flags. It's the lower 5 bits of the flag.
Definition at line 25 of file KCollisionTypes.hh.
#define KCL_ATTRIBUTE_TYPE_BIT | ( | x | ) |
Given the full 2 byte KCL flag for a triangle, extracts the "Base Type" portion of the flag.
Definition at line 30 of file KCollisionTypes.hh.
#define KCL_NONE 0x00000000 |
Definition at line 72 of file KCollisionTypes.hh.
#define KCL_SOFT_WALL_MASK 0x8000 |
Definition at line 70 of file KCollisionTypes.hh.
#define KCL_TYPE_4010D000 |
0x4010D000
Definition at line 125 of file KCollisionTypes.hh.
#define KCL_TYPE_64EBDFFF |
Definition at line 156 of file KCollisionTypes.hh.
#define KCL_TYPE_ANY_INVISIBLE_WALL (KCL_TYPE_INVISIBLE_WALL | KCL_TYPE_BIT(COL_TYPE_HALFPIPE_INVISIBLE_WALL)) |
0x90002000
Definition at line 169 of file KCollisionTypes.hh.
#define KCL_TYPE_B0E82DFF |
0xB0E82DFF
Definition at line 151 of file KCollisionTypes.hh.
#define KCL_TYPE_BIT | ( | x | ) |
Converts an attribute to the type mask bitfield for that attribute. The game uses this method in order to create a mask that represents multiple KCL attributes.
Definition at line 28 of file KCollisionTypes.hh.
#define KCL_TYPE_DIRECTIONAL |
0x05070000
Definition at line 75 of file KCollisionTypes.hh.
#define KCL_TYPE_DRIVER_FLOOR (KCL_TYPE_FLOOR & ~KCL_TYPE_BIT(COL_TYPE_ITEM_ROAD)) |
0x20E80DFF - Any KCL that the player can drive on.
Definition at line 102 of file KCollisionTypes.hh.
#define KCL_TYPE_DRIVER_SOLID_SURFACE (KCL_TYPE_VEHICLE_COLLIDEABLE | KCL_TYPE_BIT(COL_TYPE_CANNON_TRIGGER)) |
0xEAFABDFF
Definition at line 147 of file KCollisionTypes.hh.
#define KCL_TYPE_DRIVER_WALL |
0xC010B000
Definition at line 112 of file KCollisionTypes.hh.
#define KCL_TYPE_DRIVER_WALL_NO_INVISIBLE_WALL (KCL_TYPE_DRIVER_WALL & ~KCL_TYPE_BIT(COL_TYPE_INVISIBLE_WALL)) |
0xC0109000
Definition at line 117 of file KCollisionTypes.hh.
#define KCL_TYPE_DRIVER_WALL_NO_INVISIBLE_WALL2 (KCL_TYPE_DRIVER_WALL & ~KCL_TYPE_BIT(COL_TYPE_INVISIBLE_WALL2)) |
0x4010B000
Definition at line 121 of file KCollisionTypes.hh.
#define KCL_TYPE_FLOOR |
0x20E80FFF - Any KCL that the player or items can drive/land on.
Definition at line 90 of file KCollisionTypes.hh.
#define KCL_TYPE_INVISIBLE_WALL (KCL_TYPE_BIT(COL_TYPE_INVISIBLE_WALL) | KCL_TYPE_BIT(COL_TYPE_INVISIBLE_WALL2)) |
0x80002000
Definition at line 165 of file KCollisionTypes.hh.
#define KCL_TYPE_NON_DIRECTIONAL |
0xE0F8BDFF
Definition at line 142 of file KCollisionTypes.hh.
#define KCL_TYPE_SOLID_SURFACE |
0xF0F8FFFF
Definition at line 81 of file KCollisionTypes.hh.
#define KCL_TYPE_VEHICLE_COLLIDEABLE |
0xEAF8BDFF
Definition at line 135 of file KCollisionTypes.hh.
#define KCL_TYPE_VEHICLE_INTERACTABLE |
0xEFFFBDFF
Definition at line 130 of file KCollisionTypes.hh.
#define KCL_TYPE_WALL |
0xD010F000
Definition at line 105 of file KCollisionTypes.hh.
enum KColType |
Enumerator | |
---|---|
COL_TYPE_ROAD | Default road. |
COL_TYPE_SLIPPERY_ROAD | Like Dry Dry Ruins. |
COL_TYPE_WEAK_OFF_ROAD | Slight off-road slowdown. |
COL_TYPE_OFF_ROAD | Moderate off-road slowdown. |
COL_TYPE_HEAVY_OFF_ROAD | Heavy off-road slowdown. |
COL_TYPE_SLIPPERY_ROAD_2 | N64 Sherbet Land. |
COL_TYPE_BOOST_PAD | Boost panel. |
COL_TYPE_BOOST_RAMP | Trickable. Variant affects boost duration. |
COL_TYPE_JUMP_PAD | Like GBA Shy Guy Beach. |
COL_TYPE_ITEM_ROAD | Road that is only solid for items. |
COL_TYPE_SOLID_OOB | Solid out-of-bounds trigger. |
COL_TYPE_MOVING_WATER | Koopa Cape and DS Yoshi Falls. |
COL_TYPE_WALL | Default wall. |
COL_TYPE_INVISIBLE_WALL | Solid wall that is (typically) invisible. |
COL_TYPE_ITEM_WALL | Wall that is only solid for items. |
COL_TYPE_WALL_2 | Difference to COL_TYPE_WALL is unknown. |
COL_TYPE_FALL_BOUNDARY | Non-solid out-of-bounds trigger. |
COL_TYPE_CANNON_TRIGGER | Launches player to a destination "cannon point". |
COL_TYPE_FORCE_RECALCULATE_ROUTE | Forces CPU pathing recalculation. |
COL_TYPE_HALFPIPE_RAMP | Bowser's Castle half-pipe ramps. |
COL_TYPE_PLAYER_WALL | Allows items to pass through but not players. |
COL_TYPE_MOVING_ROAD | TF conveyers and CM escalators. |
COL_TYPE_STICKY_ROAD | Player sticks if within 200 units (rBC stairs). |
COL_TYPE_ROAD2 | COL_TYPE_ROAD but with more variants. |
COL_TYPE_SOUND_TRIGGER | Triggers for changing sound effects per-course. |
COL_TYPE_WEAK_WALL | Pushes player away only at low speeds. |
COL_TYPE_EFFECT_TRIGGER | Activates various effects based on variant. |
COL_TYPE_ITEM_STATE_MODIFIER | Stops items when leaving curved TF conveyers. |
COL_TYPE_HALFPIPE_INVISIBLE_WALL | Invisible wall after a half-pipe jump, like in BC. |
COL_TYPE_ROTATING_ROAD | Chain Chomp Roulette. |
COL_TYPE_SPECIAL_WALL | Various other wall types, determined by variant. |
COL_TYPE_INVISIBLE_WALL2 | Identical to COL_TYPE_INVISIBLE_WALL. |
Definition at line 33 of file KCollisionTypes.hh.