Actions

Source code/Technical information

From Sonic Retro

Revision as of 11:03, 14 March 2024 by BenoitRen (talk | contribs) (Page created)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page contains information about names and labels used in the original source code of the Mega Drive and Mega CD games.

Global variables

Name Description
generate_flag Zero if the robot transporter hasn't been destroyed (yet). 1 if it has been destroyed. Sonic CD only.
markerno Marker numero. Stores the identifier of the last activated checkpoint.
pl_suu Player lives. suu is the Japanese verb for breathing.
plpower_b Player power baria. Baria is the Japanese word for barrier. Zero when the player character doesn't have a shield. 1 when the player character has a shield.
plpower_m Player power muteki. Muteki is the Japanese word for invincible. Zero when not invincible. 1 when invincible.
plring Player rings.
plring_s Player rings save. Stores the number of rings at the time of the last checkpoint activation.
plscore Player score.
pltime Player time. The duration of time since starting the act. Stored as three bytes: 1/60 seconds, seconds,and minutes.
pltime_s Player time save. The duration of time since starting the act at the time of the last checkpoint activation.
plxposi_s Player x position save. Stores the x position of the last activated checkpoint.
plyposi_s Player y position save. Stores the y position of the last activated checkpoint.
projector_flag Zero if the Metal Sonic projector hasn't been destroyed (yet). 1 if it has been destroyed. Sonic CD only.
ta_flag Time attack flag. Zero during regular play. Non-zero when in Time Attack mode. Sonic CD only.
time_flag This flag is a combination of two values: the most significant bit stores the player currently has the power of time travel, and the rest of the byte stores a time period. If the player doesn't have the power of time travel, the time period is the current time period. If the player has the power of time travel, the time period is the one the player will travel to when time-traveling. The possible time period values are zero for past, 1 for present, and 2 for future.
time_item Stores the value of the last activated Time Warp Plate. Possible values: 0 for none, 1 for future, and -1 for past. Sonic CD only.