Sprite2

From SRB2 Wiki
Jump to navigation Jump to search
This article is a stub. It already has some of the necessary information on this topic, but it could be expanded upon. You can help the SRB2 Wiki and its users by expanding it!
This article or section should contain one or more images. Please spruce up the article by adding an image.

A Sprite2 is a special type of sprite that changes based on a player's skin. They are primarily used by the Player object, but they are also used by Signposts and Extra Life Monitors.

Usage

Sprite2s are specified within the character's skin, after the S_SKIN lump. They are called by using the frame attribute of a state that uses the sprite SPR_PLAY. The name of any given Sprite2 is SPR2_ followed by the prefix of the Sprite2 in the files (see Sprite).

Each consecutive time a Sprite2 is called, it progresses one frame through the animation. This allows scripts to control how fast a Sprite2 animates by repeatedly calling the Sprite2 at regular intervals.

Fallbacks

If a Sprite2 is called, but it is not specified within the current skin, SRB2 will instead display a fallback Sprite2. The state will still be called as usual, but the Sprite2 will not. The only Sprite2 not to have such a fallback is SPR2_STND; any other Sprite2 will point to another graphic. This fallback graphic is often another Sprite2 within the skin; if this is the case and the fallback Sprite2 is also not specified, that Sprite2's fallback will be used instead, repeating until a valid Sprite2 is reached. For example, if SPR2_FRUN is not specified within a skin, the fallback graphic SPR2_RUN will be used instead. If SPR2_RUN is not present, then SPR2_WALK will be used, and if SPR2_WALK is not present, then SPR2_STND will be used.

List of Sprite2s
Sprite2 Number Sprite2 Name Fallback Associated State(s) Usage Example Frame
0 SPR2_STND None* S_PLAY_STND Used when the player is standing still on the ground. If this Sprite2 is not specified, the skin will fail to load.
To do
Upload frame examples
1 SPR2_WAIT SPR2_STND S_PLAY_WAIT Used when the player has been idle for approximately 3 seconds.
2 SPR2_WALK SPR2_STND S_PLAY_WALK Used when the player is moving on the ground below running speed.
3 SPR2_SKID SPR2_WALK S_PLAY_SKID Used when the player is stopping or turning sharply. Not specified by any character in unmodified SRB2.
4 SPR2_RUN SPR2_WALK S_PLAY_RUN Used when the player is moving on the ground at or above running speed.
5 SPR2_DASH SPR2_RUN S_PLAY_DASH Used when the player is in Boost Mode.
6 SPR2_PAIN SPR2_STND S_PLAY_PAIN Used when the player is being knocked back, typically from losing rings or a shield. Also used by certain stage mechanics.
7 SPR2_STUN SPR2_PAIN S_PLAY_STUN Used when getting combo'd by Fang's popgun attack. Not specified by any character in unmodified SRB2.
8 SPR2_DEAD SPR2_STND S_PLAY_DEAD Used when the player has died.
9 SPR2_DRWN SPR2_DEAD S_PLAY_DRWN Used when the player has died from drowning.
10 SPR2_ROLL SPR2_STND S_PLAY_ROLL Used when the player is spinning, usually from jumping or the Spindash secondary ability.
11 SPR2_GASP SPR2_SPNG S_PLAY_GASP Used when the player is gasping for air from an air bubble.
12 SPR2_JUMP SPR2_ROLL* S_PLAY_JUMP Used when the player jumps, regardless of whether or not the skin flag SF_NOJUMPSPIN is set; if unspecified, falls back to SPR2_ROLL if SF_NOJUMPSPIN is not set; otherwise, falls back to SPR2_SPNG when going up, and SPR2_FALL when going down. Not specified by any character in unmodified SRB2.
13 SPR2_SPNG SPR2_FALL S_PLAY_SPRING Used when the player has been launched off the ground by a spring.
14 SPR2_FALL SPR2_WALK S_PLAY_FALL Used when the player is falling. Note that walking off of a ledge will not call this state.
15 SPR2_EDGE SPR2_STND S_PLAY_EDGE Used when a player is teetering on a ledge.
16 SPR2_RIDE SPR2_FALL S_PLAY_RIDE Used when the player is hanging onto a character using the Fly primary ability. Also used by certain stage mechanics.
17 SPR2_SPIN SPR2_ROLL S_PLAY_SPINDASH Used when charging up the Spindash secondary ability. Not to be confused with SPR2_ROLL, which is used when the player releases this ability.
18 SPR2_FLY SPR2_SPNG S_PLAY_FLY Used when using the Fly primary ability.
19 SPR2_SWIM SPR2_FLY* S_PLAY_SWIM Used when using the Fly, Glide and Climb, or Swim primary abilities while underwater. Falls back to SPR2_FLY if using Fly, or SPR2_GLID if using Glide and Climb.
20 SPR2_TIRE SPR2_FLY S_PLAY_FLY_TIRED Used when the flight timer has expired for Fly or Swim primary abilities.
21 SPR2_GLID SPR2_FLY S_PLAY_GLIDE Used when gliding with the Glide and Climb primary ability.
22 SPR2_LAND SPR2_ROLL S_PLAY_GLIDE_LANDING, S_PLAY_BOUNCE_LANDING Used when landing with the Glide and Climb or Bounce primary abilities.
23 SPR2_CLNG SPR2_CLMB S_PLAY_CLING Used when clinging to a wall (not moving) with the Glide and Climb primary ability.
24 SPR2_CLMB SPR2_ROLL S_PLAY_CLIMB Used when climbing a wall (moving) with the Glide and Climb primary ability.
25 SPR2_FLT SPR2_WALK S_PLAY_FLOAT Used when moving slowly with the Float or Slow Fall primary abilities.
26 SPR2_FRUN SPR2_RUN S_PLAY_FLOAT_RUN Used when moving quickly with the Float or Slow Fall primary abilities. Not specified by any character in unmodified SRB2.
27 SPR2_BNCE SPR2_FALL S_PLAY_BOUNCE Used when using the Bounce primary ability.
28 SPR2_FIRE SPR2_STND S_PLAY_FIRE, S_PLAY_FIRE_FINISH Used when using the Gunslinger secondary ability.
29 SPR2_TWIN SPR2_ROLL S_PLAY_TWINSPIN Used when using the Twinspin primary ability.
30 SPR2_MLEE SPR2_TWIN S_PLAY_MELEE, S_PLAY_MELEE_FINISH Used during the hop portion of the Melee secondary ability.
31 SPR2_MLEL SPR2_STND S_PLAY_MELEE_LANDING Used during the landing portion of the Melee secondary ability.
32 SPR2_TRNS SPR2_STND S_PLAY_SUPER_TRANS1-6 Used when transforming into Super or NiGHTS form.
33 SPR2_NSTD SPR2_NFLT
To do
Document states for NiGHTS Sprite2s
Used when the player is sitting still on the ground in NiGHTS form. Not specified by any character in unmodified SRB2.
34 SPR2_NFLT SPR2_FALL Used when the player is sitting still in midair NiGHTS form.
35 SPR2_NFLY SPR2_NFLY* Used when the player is moving in NiGHTS form. If unspecified, reverts all NiGHTS sprites to those of Sonic.
36 SPR2_NDRL SPR2_NFLY Used when the player is using the Drill Dash in NiGHTS form.
37 SPR2_NSTN SPR2_STUN Used when the player gets hit in NiGHTS mode.
38 SPR2_NPUL SPR2_NSTN Used when a player in NiGHTS form is automatically being pulled into an Ideya Capture. This Sprite2 is identical to SPR2_NFLY for all characters in unmodified SRB2.
39 SPR2_NATK SPR2_ROLL Used when a player in NiGHTS form is destroying an Ideya Capture. Not specified by any character in unmodified SRB2.
40-52 SPR2_TAL1-9, SPR2_TALA-C See below S_INVISIBLE[confirm? – discuss] Used by Tails' tails.
53 SPR2_CNT1 SPR2_WAIT* N/A Used on the continue screen, during the countdown. Fallback uses the contangle argument in the S_SKIN lump.
54 SPR2_CNT2 SPR2_FALL Used on the continue screen, as the character is rising. Only specified by Tails in the unmodified game.
55 SPR2_CNT3 SPR2_SPRING
56 SPR2_CNT4 SPR2_CNT1 Used by Tails in Sonic and Tails' continue screen.
57 SPR2_SIGN Special* S_PLAY_SIGN Used on the Signpost when the player has cleared the level. Also used on the File Select screen. If unspecified, Signposts that would otherwise depict this character display a default graphic depicting the word "CLEAR!", and they will display no icon on the File Select.
58 SPR2_LIFE Special* S_PLAY_BOX1 Used on Extra Life Monitors. If unspecified, Extra Life Monitors that would otherwise depict this character display a default graphic depicting the word "1up."
59 SPR2_XTRA Special* N/A Contains the lives counter icon for the HUD, the character select portrait, the continue icon, and graphics for the good ending.

If unspecified, the good ending graphic is replaced with a star, and everything else is replaced with a question mark.

Tail Sprite2s
Sprite2 Number Sprite2 Name Fallback Usage Example Frame
40 SPR2_TAL0 SPR2_STND
To do
Document tail sprite2 usages
To do
See above table
41 SPR2_TAL1 SPR2_TAL0
42 SPR2_TAL2 SPR2_TAL1
43 SPR2_TAL3 SPR2_TAL2
44 SPR2_TAL4 SPR2_TAL1
45 SPR2_TAL5 SPR2_TAL4
46 SPR2_TAL6 SPR2_TAL0
47 SPR2_TAL7 SPR2_TAL3
48 SPR2_TAL8 SPR2_TAL7
49 SPR2_TAL9 SPR2_TAL0
50 SPR2_TALA SPR2_TAL9
51 SPR2_TALB SPR2_TAL0
52 SPR2_TALC SPR2_TAL6

Additionally, Amy's skin in the vanilla game specifies a TPOS sprite, showing her T-posing with an unsettling, blank expression; however, SPR2_TPOS does not exist.[confirm? – discuss] It is likely left in the game as an easter egg.