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,7 +334,7 @@ enum PLACE { FIRST_PLACE, SECOND_PLACE, THIRD_PLACE, FOURTH_PLACE };
334334// player->unk_046
335335
336336/* The first time you touch a penguin or bat, and anytime you touch a thwomp during a
337- race will set a flag which will cause your next spinout to be instant (i.e. no
337+ race will set a flag which will cause your next spinout to be instant (i.e. no
338338 sliding forward). Probably half-implemented code to prevent sliding through enemies,
339339 but causes this bug */
340340#define CRITTER_TOUCH 0x2 // Touched a penguin, bat or thwomp
@@ -344,19 +344,21 @@ enum PLACE { FIRST_PLACE, SECOND_PLACE, THIRD_PLACE, FOURTH_PLACE };
344344// player->oobProps
345345/* Deals with the lower out of bounds (OOB) plane on levels. Represented by fluids (water / lava)
346346 or nothing for Rainbow Road and Skyscraper. */
347- #define UNDER_OOB_OR_FLUID_LEVEL 0x1 // Set while mostly under the plane. Does not necessarily trigger Lakitu on Koopa Troopa Beach.
347+ #define UNDER_OOB_OR_FLUID_LEVEL \
348+ 0x1 // Set while mostly under the plane. Does not necessarily trigger Lakitu on Koopa Troopa Beach.
348349#define PASS_OOB_OR_FLUID_LEVEL 0x2 // Set when passing through the lower plane in either direction
349350// The next two are also activated when passing through the lower plane.
350351#define UNDER_FLUID_LEVEL 0x4 // Stays active until Lakitu places back on track
351- #define UNDER_OOB_LEVEL 0x8 // Active while under a non-fluid OOB plane. Is momentarily active when passing through fluids.
352-
352+ #define UNDER_OOB_LEVEL \
353+ 0x8 // Active while under a non-fluid OOB plane. Is momentarily active when passing through fluids.
353354
354355/* UNK_002 has something to do with player animations. Each player has a 32-bit
355356flag broken into 8 groups of 4 bits. Those 4 bits affect how each of the 8 players
356357appear to the specified player */
357358#define CHANGING_ANIMATION 0x1 // Seems to be set when the kart animation has to change.
358- #define UNK_002_UNKNOWN_0x2 0x2
359- #define UNK_002_UNKNOWN_0x4 0x4 /* Unclear, but has to do with viewing the side of player. At least tends to change if target
359+ #define UNK_002_UNKNOWN_0x2 0x2
360+ #define UNK_002_UNKNOWN_0x4 \
361+ 0x4 /* Unclear, but has to do with viewing the side of player. At least tends to change if target \
360362player spins. Something with avoding rollover of aniamation frame data? */
361363#define SIDE_OF_KART 0x8 // Seems to be whether you are in a rectangle shooting out from both sides of target player
362364
@@ -368,62 +370,64 @@ player spins. Something with avoding rollover of aniamation frame data? */
368370#define EXPLOSION 0x1000 // Big shock looking graphic when starting tumble
369371
370372// player->lakituProps
371- #define LAKITU_RETRIEVAL 0x1 // While lakitu is grabbing you, but before the scene transition of being placed on the track
372- #define HELD_BY_LAKITU 0x2
373- #define LAKITU_FIZZLE 0x4 // Disintegration and reintegration effect when transitioning from retrieval to placement
374- #define LAKITU_SCENE 0x8 // the whole segment from when lakitu is called to when you regain control
375- #define FRIGID_EFFECT 0x10 // Cold colors on Sherbet Land after in frigid water
376- #define THAWING_EFFECT 0x20 // Regaining usual colors post frigid effect
377- #define FROZEN_EFFECT 0x80 // In the ice cube
378- #define WENT_OVER_OOB 0x100 // Player went over (or is on) an OOB area. Cancelled if touch back in bounds
379- #define LAKITU_LAVA 0x1000 // smoky effect when retrieved from lava
380- #define LAKITU_WATER 0x2000 // dripping effect when retreived from water
373+ #define LAKITU_RETRIEVAL \
374+ 0x1 // While lakitu is grabbing you, but before the scene transition of being placed on the track
375+ #define HELD_BY_LAKITU 0x2
376+ #define LAKITU_FIZZLE 0x4 // Disintegration and reintegration effect when transitioning from retrieval to placement
377+ #define LAKITU_SCENE 0x8 // the whole segment from when lakitu is called to when you regain control
378+ #define FRIGID_EFFECT 0x10 // Cold colors on Sherbet Land after in frigid water
379+ #define THAWING_EFFECT 0x20 // Regaining usual colors post frigid effect
380+ #define FROZEN_EFFECT 0x80 // In the ice cube
381+ #define WENT_OVER_OOB 0x100 // Player went over (or is on) an OOB area. Cancelled if touch back in bounds
382+ #define LAKITU_LAVA 0x1000 // smoky effect when retrieved from lava
383+ #define LAKITU_WATER 0x2000 // dripping effect when retreived from water
381384
382385// player->kartProps
383- #define BACK_UP 0x1
384- #define RIGHT_TURN 0x2 // non-drifting (more than 5 degrees)
385- #define LEFT_TURN 0x4 // non-drifting (more than 5 degrees)
386- #define MOVE_BACKWARDS 0x8 // includes lakitu
387- #define LOSE_GP_RACE 0x10 // pointless, only unsets itself
388- #define THROTTLE 0x20 // Closely tied to just pressing A. Possible exception for AB-spins
389- #define EARLY_SPINOUT_RIGHT 0x40 // Spinning out while facing right (not actually used for anything)
390- #define EARLY_SPINOUT_LEFT 0x80 // Spinning out while facing left
391- #define POST_TUMBLE_GAS 0x100 // Causes particles after a vertical tumble, I think
392- #define BECOME_INVISIBLE 0x200
393- #define UNUSED_0x400 0x400 // locked behind 0x800 (func_80091440)
394- #define UNUSED_0x800 0x800 // locked behind 0x400 (func_8002B830 -> func_800911B4)
395- #define UNUSED_0x1000 0x1000 // 0x1000 locked behind 0x400 (func_8002B830 -> func_800911B4)
396- #define UNUSED_0x2000 0x2000 // 0x2000 locked behind 0x400 and 0x800 (func_8002B830 -> func_800911B4, apply_effect -> func_80091298,
397- // func_80091440)
398- #define DRIVING_SPINOUT 0x4000
386+ #define BACK_UP 0x1
387+ #define RIGHT_TURN 0x2 // non-drifting (more than 5 degrees)
388+ #define LEFT_TURN 0x4 // non-drifting (more than 5 degrees)
389+ #define MOVE_BACKWARDS 0x8 // includes lakitu
390+ #define LOSE_GP_RACE 0x10 // pointless, only unsets itself
391+ #define THROTTLE 0x20 // Closely tied to just pressing A. Possible exception for AB-spins
392+ #define EARLY_SPINOUT_RIGHT 0x40 // Spinning out while facing right (not actually used for anything)
393+ #define EARLY_SPINOUT_LEFT 0x80 // Spinning out while facing left
394+ #define POST_TUMBLE_GAS 0x100 // Causes particles after a vertical tumble, I think
395+ #define BECOME_INVISIBLE 0x200
396+ #define UNUSED_0x400 0x400 // locked behind 0x800 (func_80091440)
397+ #define UNUSED_0x800 0x800 // locked behind 0x400 (func_8002B830 -> func_800911B4)
398+ #define UNUSED_0x1000 0x1000 // 0x1000 locked behind 0x400 (func_8002B830 -> func_800911B4)
399+ #define UNUSED_0x2000 \
400+ 0x2000 // 0x2000 locked behind 0x400 and 0x800 (func_8002B830 -> func_800911B4, apply_effect -> func_80091298,
401+ // func_80091440)
402+ #define DRIVING_SPINOUT 0x4000
399403#define UNKNOWN_BATTLE_VAR 0x8000 // 0x8000 something battle related, unclear if ever set
400404
401405/*
402406 * @brief triggers indicating that an effect should be applied to a kart
403407 */
404- #define HIT_BANANA_TRIGGER 0x1 // hits a banana
405- #define HIGH_TUMBLE_TRIGGER 0x2 // hit by a red shell, blue shell, or hit a mole
406- #define LOW_TUMBLE_TRIGGER 0x4 // hit by a green shell
407- #define DRIVING_SPINOUT_TRIGGER 0x80 // spinning out from erratic driving
408- #define THWOMP_SQUISH_TRIGGER 0x100 // stomped by thwomp
409- #define SHROOM_TRIGGER 0x200 // being boosted by trigger a mushroom
410- #define BOO_TRIGGER 0x800 // being a boo
411- #define UNUSED_TRIGGER_0x1000 0x1000 // Unused
412- #define STAR_TRIGGER 0x2000 // Starting a star
413- #define LIGHTNING_STRIKE_TRIGGER 0x4000 // Struck by lightning
414- #define BOOST_RAMP_WOOD_TRIGGER 0x8000 // being boosted by a ramp
415- #define UNUSED_TRIGGER_0x20000 0x20000 // Unused
416- #define DRAG_ITEM_EFFECT 0x40000 // holding a non-shell item behind you
417- #define HIT_PADDLE_BOAT_TRIGGER 0x80000 // hit paddle boat
418- #define UNUSED_TRIGGER_0x10000 0x100000 // Unused
419- #define SPINOUT_TRIGGER 0x200000 // hit crab or spiny spinout or losing versus race
420- #define VERTICAL_TUMBLE_TRIGGER 0x400000 // hitting a fake item / bomb / snowman / car / train
408+ #define HIT_BANANA_TRIGGER 0x1 // hits a banana
409+ #define HIGH_TUMBLE_TRIGGER 0x2 // hit by a red shell, blue shell, or hit a mole
410+ #define LOW_TUMBLE_TRIGGER 0x4 // hit by a green shell
411+ #define DRIVING_SPINOUT_TRIGGER 0x80 // spinning out from erratic driving
412+ #define THWOMP_SQUISH_TRIGGER 0x100 // stomped by thwomp
413+ #define SHROOM_TRIGGER 0x200 // being boosted by trigger a mushroom
414+ #define BOO_TRIGGER 0x800 // being a boo
415+ #define UNUSED_TRIGGER_0x1000 0x1000 // Unused
416+ #define STAR_TRIGGER 0x2000 // Starting a star
417+ #define LIGHTNING_STRIKE_TRIGGER 0x4000 // Struck by lightning
418+ #define BOOST_RAMP_WOOD_TRIGGER 0x8000 // being boosted by a ramp
419+ #define UNUSED_TRIGGER_0x20000 0x20000 // Unused
420+ #define DRAG_ITEM_EFFECT 0x40000 // holding a non-shell item behind you
421+ #define HIT_PADDLE_BOAT_TRIGGER 0x80000 // hit paddle boat
422+ #define UNUSED_TRIGGER_0x10000 0x100000 // Unused
423+ #define SPINOUT_TRIGGER 0x200000 // hit crab or spiny spinout or losing versus race
424+ #define VERTICAL_TUMBLE_TRIGGER 0x400000 // hitting a fake item / bomb / snowman / car / train
421425#define BOOST_RAMP_ASPHALT_TRIGGER 0x800000 // being boosted by a boost pad
422- #define HIT_BY_STAR_TRIGGER 0x1000000 // being hit by a star
423- #define START_BOOST_TRIGGER 0x2000000 // Start boost
424- #define LOSE_BATTLE_EFFECT 0x4000000 // When losing battle mode
425- #define BECOME_BOMB_EFFECT 0x8000000 // When becoming a bomb in battle mode
426- #define START_SPINOUT_TRIGGER 0x10000000 // Spinning out by holding gas at start of race
426+ #define HIT_BY_STAR_TRIGGER 0x1000000 // being hit by a star
427+ #define START_BOOST_TRIGGER 0x2000000 // Start boost
428+ #define LOSE_BATTLE_EFFECT 0x4000000 // When losing battle mode
429+ #define BECOME_BOMB_EFFECT 0x8000000 // When becoming a bomb in battle mode
430+ #define START_SPINOUT_TRIGGER 0x10000000 // Spinning out by holding gas at start of race
427431
428432#define ALL_TRIGGERS (0xFFFFFFFF)
429433#define RACING_SPINOUT_TRIGGERS (SPINOUT_TRIGGER | DRIVING_SPINOUT_TRIGGER | HIT_BANANA_TRIGGER) // 0x200081
0 commit comments