7373
7474// Float version required for matching
7575#ifdef VERSION_EU
76- #define COURSE_TIMER_ITER 0.020041665999999999 // 1 / 50
77- #ifdef AVOID_UB
78- #define COURSE_TIMER_ITER_f 0.020041665999999999f // 1 / 50
79- #else
80- #define COURSE_TIMER_ITER_f 0.01666666f //! 1 / 60 - Float unchanged in EU
81- #endif
76+ #define COURSE_TIMER_ITER 0.020041665999999999 // 1 / 50
77+ #ifdef AVOID_UB
78+ #define COURSE_TIMER_ITER_f 0.020041665999999999f // 1 / 50
79+ #else
80+ #define COURSE_TIMER_ITER_f 0.01666666f //! 1 / 60 - Float unchanged in EU
81+ #endif
8282#else
8383#define COURSE_TIMER_ITER 0.01666666 // 1 / 60
8484#define COURSE_TIMER_ITER_f 0.01666666f // 1 / 60
@@ -334,19 +334,21 @@ enum PLACE { FIRST_PLACE, SECOND_PLACE, THIRD_PLACE, FOURTH_PLACE };
334334// player->oobProps
335335/* Deals with the lower out of bounds (OOB) plane on levels. Represented by fluids (water / lava)
336336 or nothing for Rainbow Road and Skyscraper. */
337- #define UNDER_OOB_OR_FLUID_LEVEL 0x1 // Set while mostly under the plane. Does not necessarily trigger Lakitu on Koopa Troopa Beach.
337+ #define UNDER_OOB_OR_FLUID_LEVEL \
338+ 0x1 // Set while mostly under the plane. Does not necessarily trigger Lakitu on Koopa Troopa Beach.
338339#define PASS_OOB_OR_FLUID_LEVEL 0x2 // Set when passing through the lower plane in either direction
339340// The next two are also activated when passing through the lower plane.
340341#define UNDER_FLUID_LEVEL 0x4 // Stays active until Lakitu places back on track
341- #define UNDER_OOB_LEVEL 0x8 // Active while under a non-fluid OOB plane. Is momentarily active when passing through fluids.
342-
342+ #define UNDER_OOB_LEVEL \
343+ 0x8 // Active while under a non-fluid OOB plane. Is momentarily active when passing through fluids.
343344
344345/* UNK_002 has something to do with player animations. Each player has a 32-bit
345346flag broken into 8 groups of 4 bits. Those 4 bits affect how each of the 8 players
346347appear to the specified player */
347348#define CHANGING_ANIMATION 0x1 // Seems to be set when the kart animation has to change.
348- #define UNK_002_UNKNOWN_0x2 0x2
349- #define UNK_002_UNKNOWN_0x4 0x4 /* Unclear, but has to do with viewing the side of player. At least tends to change if target
349+ #define UNK_002_UNKNOWN_0x2 0x2
350+ #define UNK_002_UNKNOWN_0x4 \
351+ 0x4 /* Unclear, but has to do with viewing the side of player. At least tends to change if target \
350352player spins. Something with avoding rollover of aniamation frame data? */
351353#define SIDE_OF_KART 0x8 // Seems to be whether you are in a rectangle shooting out from both sides of target player
352354
@@ -358,62 +360,64 @@ player spins. Something with avoding rollover of aniamation frame data? */
358360#define EXPLOSION 0x1000 // Big shock looking graphic when starting tumble
359361
360362// player->lakituProps
361- #define LAKITU_RETRIEVAL 0x1 // While lakitu is grabbing you, but before the scene transition of being placed on the track
362- #define HELD_BY_LAKITU 0x2
363- #define LAKITU_FIZZLE 0x4 // Disintegration and reintegration effect when transitioning from retrieval to placement
364- #define LAKITU_SCENE 0x8 // the whole segment from when lakitu is called to when you regain control
365- #define FRIGID_EFFECT 0x10 // Cold colors on Sherbet Land after in frigid water
366- #define THAWING_EFFECT 0x20 // Regaining usual colors post frigid effect
367- #define FROZEN_EFFECT 0x80 // In the ice cube
368- #define WENT_OVER_OOB 0x100 // Player went over (or is on) an OOB area. Cancelled if touch back in bounds
369- #define LAKITU_LAVA 0x1000 // smoky effect when retrieved from lava
370- #define LAKITU_WATER 0x2000 // dripping effect when retreived from water
363+ #define LAKITU_RETRIEVAL \
364+ 0x1 // While lakitu is grabbing you, but before the scene transition of being placed on the track
365+ #define HELD_BY_LAKITU 0x2
366+ #define LAKITU_FIZZLE 0x4 // Disintegration and reintegration effect when transitioning from retrieval to placement
367+ #define LAKITU_SCENE 0x8 // the whole segment from when lakitu is called to when you regain control
368+ #define FRIGID_EFFECT 0x10 // Cold colors on Sherbet Land after in frigid water
369+ #define THAWING_EFFECT 0x20 // Regaining usual colors post frigid effect
370+ #define FROZEN_EFFECT 0x80 // In the ice cube
371+ #define WENT_OVER_OOB 0x100 // Player went over (or is on) an OOB area. Cancelled if touch back in bounds
372+ #define LAKITU_LAVA 0x1000 // smoky effect when retrieved from lava
373+ #define LAKITU_WATER 0x2000 // dripping effect when retreived from water
371374
372375// player->kartProps
373- #define BACK_UP 0x1
374- #define RIGHT_TURN 0x2 // non-drifting (more than 5 degrees)
375- #define LEFT_TURN 0x4 // non-drifting (more than 5 degrees)
376- #define MOVE_BACKWARDS 0x8 // includes lakitu
377- #define LOSE_GP_RACE 0x10 // pointless, only unsets itself
378- #define THROTTLE 0x20 // Closely tied to just pressing A. Possible exception for AB-spins
379- #define EARLY_SPINOUT_RIGHT 0x40 // Spinning out while facing right (not actually used for anything)
380- #define EARLY_SPINOUT_LEFT 0x80 // Spinning out while facing left
381- #define POST_TUMBLE_GAS 0x100 // Causes particles after a vertical tumble, I think
382- #define BECOME_INVISIBLE 0x200
383- #define UNUSED_0x400 0x400 // locked behind 0x800 (func_80091440)
384- #define UNUSED_0x800 0x800 // locked behind 0x400 (func_8002B830 -> func_800911B4)
385- #define UNUSED_0x1000 0x1000 // 0x1000 locked behind 0x400 (func_8002B830 -> func_800911B4)
386- #define UNUSED_0x2000 0x2000 // 0x2000 locked behind 0x400 and 0x800 (func_8002B830 -> func_800911B4, apply_effect -> func_80091298,
387- // func_80091440)
388- #define DRIVING_SPINOUT 0x4000
376+ #define BACK_UP 0x1
377+ #define RIGHT_TURN 0x2 // non-drifting (more than 5 degrees)
378+ #define LEFT_TURN 0x4 // non-drifting (more than 5 degrees)
379+ #define MOVE_BACKWARDS 0x8 // includes lakitu
380+ #define LOSE_GP_RACE 0x10 // pointless, only unsets itself
381+ #define THROTTLE 0x20 // Closely tied to just pressing A. Possible exception for AB-spins
382+ #define EARLY_SPINOUT_RIGHT 0x40 // Spinning out while facing right (not actually used for anything)
383+ #define EARLY_SPINOUT_LEFT 0x80 // Spinning out while facing left
384+ #define POST_TUMBLE_GAS 0x100 // Causes particles after a vertical tumble, I think
385+ #define BECOME_INVISIBLE 0x200
386+ #define UNUSED_0x400 0x400 // locked behind 0x800 (func_80091440)
387+ #define UNUSED_0x800 0x800 // locked behind 0x400 (func_8002B830 -> func_800911B4)
388+ #define UNUSED_0x1000 0x1000 // 0x1000 locked behind 0x400 (func_8002B830 -> func_800911B4)
389+ #define UNUSED_0x2000 \
390+ 0x2000 // 0x2000 locked behind 0x400 and 0x800 (func_8002B830 -> func_800911B4, apply_effect -> func_80091298,
391+ // func_80091440)
392+ #define DRIVING_SPINOUT 0x4000
389393#define UNKNOWN_BATTLE_VAR 0x8000 // 0x8000 something battle related, unclear if ever set
390394
391395/*
392396 * @brief triggers indicating that an effect should be applied to a kart
393397 */
394- #define HIT_BANANA_TRIGGER 0x1 // hits a banana
395- #define HIGH_TUMBLE_TRIGGER 0x2 // hit by a red shell, blue shell, or hit a mole
396- #define LOW_TUMBLE_TRIGGER 0x4 // hit by a green shell
397- #define DRIVING_SPINOUT_TRIGGER 0x80 // spinning out from erratic driving
398- #define THWOMP_SQUISH_TRIGGER 0x100 // stomped by thwomp
399- #define SHROOM_TRIGGER 0x200 // being boosted by trigger a mushroom
400- #define BOO_TRIGGER 0x800 // being a boo
401- #define UNUSED_TRIGGER_0x1000 0x1000 // Unused
402- #define STAR_TRIGGER 0x2000 // Starting a star
403- #define LIGHTNING_STRIKE_TRIGGER 0x4000 // Struck by lightning
404- #define BOOST_RAMP_WOOD_TRIGGER 0x8000 // being boosted by a ramp
405- #define UNUSED_TRIGGER_0x20000 0x20000 // Unused
406- #define DRAG_ITEM_EFFECT 0x40000 // holding a non-shell item behind you
407- #define HIT_PADDLE_BOAT_TRIGGER 0x80000 // hit paddle boat
408- #define UNUSED_TRIGGER_0x10000 0x100000 // Unused
409- #define SPINOUT_TRIGGER 0x200000 // hit crab or spiny spinout or losing versus race
410- #define VERTICAL_TUMBLE_TRIGGER 0x400000 // hitting a fake item / bomb / snowman / car / train
398+ #define HIT_BANANA_TRIGGER 0x1 // hits a banana
399+ #define HIGH_TUMBLE_TRIGGER 0x2 // hit by a red shell, blue shell, or hit a mole
400+ #define LOW_TUMBLE_TRIGGER 0x4 // hit by a green shell
401+ #define DRIVING_SPINOUT_TRIGGER 0x80 // spinning out from erratic driving
402+ #define THWOMP_SQUISH_TRIGGER 0x100 // stomped by thwomp
403+ #define SHROOM_TRIGGER 0x200 // being boosted by trigger a mushroom
404+ #define BOO_TRIGGER 0x800 // being a boo
405+ #define UNUSED_TRIGGER_0x1000 0x1000 // Unused
406+ #define STAR_TRIGGER 0x2000 // Starting a star
407+ #define LIGHTNING_STRIKE_TRIGGER 0x4000 // Struck by lightning
408+ #define BOOST_RAMP_WOOD_TRIGGER 0x8000 // being boosted by a ramp
409+ #define UNUSED_TRIGGER_0x20000 0x20000 // Unused
410+ #define DRAG_ITEM_EFFECT 0x40000 // holding a non-shell item behind you
411+ #define HIT_PADDLE_BOAT_TRIGGER 0x80000 // hit paddle boat
412+ #define UNUSED_TRIGGER_0x10000 0x100000 // Unused
413+ #define SPINOUT_TRIGGER 0x200000 // hit crab or spiny spinout or losing versus race
414+ #define VERTICAL_TUMBLE_TRIGGER 0x400000 // hitting a fake item / bomb / snowman / car / train
411415#define BOOST_RAMP_ASPHALT_TRIGGER 0x800000 // being boosted by a boost pad
412- #define HIT_BY_STAR_TRIGGER 0x1000000 // being hit by a star
413- #define START_BOOST_TRIGGER 0x2000000 // Start boost
414- #define LOSE_BATTLE_EFFECT 0x4000000 // When losing battle mode
415- #define BECOME_BOMB_EFFECT 0x8000000 // When becoming a bomb in battle mode
416- #define START_SPINOUT_TRIGGER 0x10000000 // Spinning out by holding gas at start of race
416+ #define HIT_BY_STAR_TRIGGER 0x1000000 // being hit by a star
417+ #define START_BOOST_TRIGGER 0x2000000 // Start boost
418+ #define LOSE_BATTLE_EFFECT 0x4000000 // When losing battle mode
419+ #define BECOME_BOMB_EFFECT 0x8000000 // When becoming a bomb in battle mode
420+ #define START_SPINOUT_TRIGGER 0x10000000 // Spinning out by holding gas at start of race
417421
418422#define ALL_TRIGGERS (0xFFFFFFFF)
419423#define RACING_SPINOUT_TRIGGERS (SPINOUT_TRIGGER | DRIVING_SPINOUT_TRIGGER | HIT_BANANA_TRIGGER) // 0x200081
0 commit comments