In the doldecomp decompilation of Super Mario Sunshine, most of Mario's movement constants are named parameters (TParamRT), each built with a default in the code, in sets that each name a file, such as /Mario/Jump.prm. TParams::load, in a file configure.py marks as matching the game's code, reads the set's file from the scene's /map/params folder if it is there and from the params archive if not, and a record whose key and name match a parameter replaces that parameter's default; the rest keep theirs. The values the game plays with are data on the disc, which the atlas hasn't read, so the numbers in these claims are the code's defaults. The jump set's gravity, mGravity, defaults to 0.8. In the jumping states, jumpProcess in the decompilers' Player code, which doesn't yet match, moves Mario by a quarter of his velocity in one step per update. Then fallProcess subtracts mGravity from his vertical speed, except in a dive (the dive set's own gravity, with a cap of its own), in a spin jump's descent (mSpinJumpGravity, default 0.6), and when a release cuts the rise (sms/jump); in every case it then caps the fall at −75. Super Mario 64 also moves Mario a quarter of his velocity at a time, but in four steps a frame (sm64/units). | configure.py L314–315configure.py L879configure.py L950configure.py L964include/System/ParamInst.hpp L8–9src/System/Params.cpp L12–29src/System/Params.cpp L54–66src/System/Params.cpp L5src/Player/MarioInit.cpp L544–547src/Player/MarioPhysics.cpp L498–509src/Player/MarioPhysics.cpp L464–485 | Code notes |
In Super Mario Sunshine, by the decompilers' Player code, which doesn't yet match, a press that starts a jump through changePlayerJumping first goes to a miss jump if isJumpMiss is true, then to a spin jump if considerRotateJumpStart reads the stick's recent turning as a spin, and otherwise to the status it asks for. For the single jump, MARIO_STATUS_JUMP, setStatusToJumping sets Mario's vertical speed to 42 plus a quarter of his forward speed and multiplies the forward speed by 0.8, constants in the code rather than parameters, and the same take-off as Super Mario 64's single jump (sm64/jump-speed). On two kinds of floor, which the code tells apart only as isThing2 and isThing3, the speed is replaced or added to and the jump becomes MARIO_STATUS_FORCE_JUMP; on Yoshi it is multiplied by the parameter mJumpYoshiMult, and while isSinking() is true both speeds are scaled by a factor from the mGraffitoParams set. When the new jumping status carries the bit the code calls MARIO_STATUS_FLAG_UNK2000000 (0x2000000), as the single jump, the double jump, and the wall kick do, setStatusToJumping sets bit 0x100 of unk78, and it clears that bit for any other jumping status (other code clears it too). While that bit is set, the status has neither bit 0x1000 nor 0x20000, A isn't held, and Mario rises faster than 20, fallProcess multiplies his vertical speed by 0.75 on each update in place of the gravity. Super Mario 64 divides it by 4 on each frame when A isn't held and Mario rises faster than 20, if its MARIO_UNKNOWN_08 flag is set, the action is neither intangible nor invulnerable, and the action has ACT_FLAG_CONTROL_JUMP_HEIGHT, the same bit, 0x02000000 (sm64/jump-release). The status numbers line up too: Sunshine's single jump is 0x2000000 | 0x800 | 0x080 (computed 0x2000880), and Super Mario 64's ACT_JUMP is 0x03000880. | configure.py L949–950src/Player/MarioMove.cpp L764–772src/Player/MarioMove.cpp L420–423src/Player/MarioMove.cpp L434–456src/Player/MarioMove.cpp L647–654src/Player/MarioMove.cpp L663–673src/Player/MarioMove.cpp L1482–1483src/Player/MarioPhysics.cpp L450–459src/Player/MarioPhysics.cpp L471–472include/Player/MarioStatus.hpp L7include/Player/MarioStatus.hpp L17include/Player/MarioStatus.hpp L26include/Player/MarioStatus.hpp L119–133 | Code notes |
In Super Mario Sunshine, by the decompilers' Player code, which doesn't yet match, the double jump, the backflip (MARIO_STATUS_BACK_JUMP), the spin jump, and the jumps the code calls trample and wireJumping all land in MARIO_STATUS_SEC_JUMP_SLIP. Its jumpSlipEvents counts updates and ends the landing on the 16th, before reading A, so a press on one of the first 15 (computed) goes to changePlayerJumping, which can still turn it into a miss or spin jump (sms/jump): the triple jump, MARIO_STATUS_ULTRA_JUMP, if the forward speed is at least the parameter mTriJumpEnableSp (default 20), and a single jump if not. The single jump and the wall kick land in MARIO_STATUS_JUMP_SLIP instead, where a press makes a double jump only at a forward speed of at least mSecJumpEnableSp (default 20). The triple jump takes off at mUltraJumpForce plus mUltraJumpSpeedMult times the forward speed (defaults 70 and 0.25) and multiplies the forward speed by mUltraJumpXZMult (default 0.8); its status lacks the bit that lets a release cut the rise. Super Mario 64's triple jump starts from the double jump's 4-frame landing at a forward speed above 20, takes off at 69 whatever the speed, and can't be cut either (sm64/triple-jump, sm64/jump-release). | configure.py L947–964src/Player/MarioJump.cpp L341–357src/Player/MarioJump.cpp L378–392src/Player/MarioJump.cpp L773–778src/Player/MarioJump.cpp L997–1007src/Player/MarioJump.cpp L1021–1035src/Player/MarioJump.cpp L335src/Player/MarioJump.cpp L454src/Player/MarioRun.cpp L1538–1557src/Player/MarioRun.cpp L1599–1602src/Player/MarioMove.cpp L471–474src/Player/MarioInit.cpp L572–579include/Player/MarioStatus.hpp L124–125 | Code notes |
In Super Mario Sunshine, by the decompilers' Player code, which doesn't yet match, when jumpProcess reports a wall to jumpingBasic during a jump, Mario is knocked back if his forward speed is above the parameter mClashSpeed (default 50) outside the wire roll jump, stops on Yoshi, stops on a wall marked isNoWallJump, and catches a fence (isFence). Otherwise, at a forward speed above 16, he turns about (after playerRefrection) and, against a wall, holds on in MARIO_STATUS_WALL_SLIDE. There stayWall adds 1 to the status timer each update, capped at 60, and 1 more while it is below 20, so he hangs still for 10 updates and then slides down at half the timer: −10.5 on the 11th update, then 0.5 faster each update to −30 (computed). An A press on any update on the wall kicks: startJumpWall turns him about and enters MARIO_STATUS_WALL_JUMP, whose take-off in setStatusToJumping is 62 up and 24 forward, constants in the code; the 52 that startJumpWall writes first is overwritten. Landing or losing the wall ends the hold. Super Mario 64 kicks at the same 62 up and at least 24 forward, and its act_air_hit_wall also writes a 52 that the kick's take-off overwrites, but it holds Mario only 2 frames and then bonks him away, with A still working for 5 more: 7 frames in all (sm64/wall-kick). With no wall to hold, Sunshine bonks him the way Super Mario 64 does: back down at 38 or faster, and at −8 if faster than 8. | configure.py L947–964src/Player/MarioJump.cpp L201–250src/Player/MarioJump.cpp L252–254src/Player/MarioInit.cpp L510src/Player/MarioJump.cpp L586–620src/Player/MarioJump.cpp L16–30src/Player/MarioMove.cpp L517–519src/Player/MarioMove.cpp L733–738src/Player/MarioMove.cpp L1479–1480 | Code notes |
In Super Mario Sunshine, by the decompilers' Player code, which doesn't yet match, FLUDD's hover nozzle holds Mario up through the status the code calls MARIO_STATUS_ROCKET. rocketCheck, which the jumps, the wall kick, standing, and running call, enters it, unless Mario is already in it or in MARIO_STATUS_ROCKET_LANDING, when he has FLUDD, the current nozzle's mRocketType parameter is 1, his upper body is in UPPER_STATE_PUMPING, and the nozzle is spraying (canSpray, a name a decompilers' comment calls fabricated), and sets a target height mHoverHeight (default 160) above him; standing or running, the callers set it above the floor instead. The status's entry code has a voice for the hover, rocket, and turbo nozzles, and the height-holding code in rocketing runs only for the hover. Each update rocketing sets his vertical speed to the gap to the target times the parameter mAccelRate (default 0.03) and multiplies his forward speed by mBrake (default 0.95), the stick adding forward speed or turning him, and then jumpProcess moves him a quarter of his velocity: with the defaults he closes 0.75% of the gap each update (computed), and any rise or fall he carried in is dropped at once. The hover is a trigger nozzle (TNozzleTrigger). While Mario pumps, and in water only with a full tank, each update adds 150 times R's analog reading to mInsidePressure, and every update takes away mInsidePressureDec (default 100); when the pressure passes mInsidePressureMax (default 4500) while the spray is idle and the nozzle's mRumbleOnCharge is false, the spray starts with a timer of mTriggerTime updates (with mRumbleOnCharge true, an A press with R held starts it instead). An empty tank sets the spray back to idle; the timer running out or the pumping stopping sets it to the state the code calls SPRAY_STATE_DEAD, which returns to idle only once R reads 0. Without a spray, rocketing ends in MARIO_STATUS_ROCKET_LANDING. On each update it sprays, each of the nozzle's emitters asks the water manager for drops, between mNumMin and mNum by the pressure, and the tank, which holds mAmountMax (default 2100), loses mDecRate for each drop accepted. Which nozzles have mRocketType 1, the timer, and the tank are data in each nozzle's file, NozzleTrgHover.prm for the hover. Banjo-Kazooie's Feathery Flap, a lift of 280 units/s and a fall capped at −399.9 units/s for up to 2.5 s, slows a fall where the hover holds a height (banjo-kazooie/feathery-flap). | configure.py L947–964src/Player/MarioJump.cpp L880–904src/Player/MarioWait.cpp L118–121src/Player/MarioRun.cpp L697–700src/Player/MarioJump.cpp L451include/Player/WaterGun.hpp L19include/Player/WaterGun.hpp L238–250src/Player/MarioMove.cpp L573–583src/Player/MarioJump.cpp L909–918src/Player/MarioJump.cpp L920–959src/Player/MarioJump.cpp L971–978src/Player/MarioPhysics.cpp L500src/Player/MarioInit.cpp L45src/Player/MarioInit.cpp L916–922src/Player/MarioMove.cpp L2375–2387src/Player/MarioMove.cpp L2300src/Player/MarioMove.cpp L2316–2317src/Player/WaterGun.cpp L1148src/Player/WaterGun.cpp L1163src/Player/WaterGun.cpp L197src/Player/WaterGun.cpp L222–224src/Player/WaterGun.cpp L508–527src/Player/WaterGun.cpp L529–540src/Player/WaterGun.cpp L545–553src/Player/WaterGun.cpp L570–580src/Player/WaterGun.cpp L595–598src/Player/WaterGun.cpp L605–650src/Player/WaterGun.cpp L1779–1780 | Code notes |