Difference between revisions of "A Raise"

From DoomWiki.org

[checked revision][checked revision]
(add some more detail)
(recategorize)
Line 47: Line 47:
 
* {{DoomSrc|file=p_pspr.c|line=423|text=A_Raise}} in the Doom source code.
 
* {{DoomSrc|file=p_pspr.c|line=423|text=A_Raise}} in the Doom source code.
  
[[Category:Code pointers]]
+
[[Category:Weapon code pointers]]

Revision as of 18:17, 16 March 2020

A_Raise is a code pointer used in the weapon raise animation for all weapons.

A_Raise moves the Y position of the weapon sprite upwards from the bottom of the screen by a small amount each time it is invoked. Once a threshold has been reached, the weapon is judged to have been raised and animation proceeds to the weapon's "ready state". A_Raise is usually used in a state that is an infinite loop that repeatedly jumps back to itself; the loop terminates when the weapon has finished raising. For this reason it is not possible to fire the weapon until the raise sequence has completed.

Uses

The A_Raise code pointer appears in the following states in Doom's state table:

Example

The following is an example of how to set the A_Raise code pointer in a Dehacked file:

Pointer 22 (Frame 36)
Codep Frame = 83

Or using BEX syntax:

[CODEPTR]
Frame 1234 = Raise

External links