Mario drop held object: Difference between revisions

From Ukikipedia
Jump to navigation Jump to search
(page on algorithm within code)
 
m (link does not work bc lowercase? seriously?)
 
Line 3: Line 3:


The [https://github.com/n64decomp/sm64/blob/1372ae1bb7cbedc03df366393188f4f05dcfc422/src/game/interaction.c#L295 function] goes as follows:
The [https://github.com/n64decomp/sm64/blob/1372ae1bb7cbedc03df366393188f4f05dcfc422/src/game/interaction.c#L295 function] goes as follows:
 
# If holding a [[Water Shell|water shell]], <code>stop_shell_music()</code>
# If holding a [[water shell]], <code>stop_shell_music()</code>
# The object's held state becomes <code>bhvCarrySomething4</code> which I assume means "dropped"
# The object's held state becomes <code>bhvCarrySomething4</code> which I assume means "dropped"
# The object's position is at the [[HOLP]] but at Mario's y position
# The object's position is at the [[HOLP]] but at Mario's y position
# The object's <code>moveAngleYaw</code> becomes Mario's facing angle
# The object's <code>moveAngleYaw</code> becomes Mario's facing angle
# Mario's <code>heldObj</code> is <code>NULL</code>
# Mario's <code>heldObj</code> is <code>NULL</code>

Latest revision as of 00:51, 6 September 2022

mario_drop_held_object is a titular function within Super Mario 64's code. It only does anything if Mario is holding an object.

The function goes as follows:

  1. If holding a water shell, stop_shell_music()
  2. The object's held state becomes bhvCarrySomething4 which I assume means "dropped"
  3. The object's position is at the HOLP but at Mario's y position
  4. The object's moveAngleYaw becomes Mario's facing angle
  5. Mario's heldObj is NULL