HP: Difference between revisions

Jump to navigation Jump to search
12 bytes added ,  2 May 2021
m
Bolding title in lead
(smh proper grammar when abbreviating mr.)
m (Bolding title in lead)
Line 1: Line 1:
[[File:HP-INC.gif|frameless|right]]
[[File:HP-INC.gif|frameless|right]]
HP (also known as Health) is the measure of [[Mario|Mario’s]] health. If this reaches 0, Mario loses a life.
'''HP''' (also known as '''Health''') is the measure of [[Mario|Mario’s]] health. If this reaches 0, Mario loses a life.


The variable that represents Mario’s HP is a short, which ranges from 0 to 2176 (or 0x0000 to 0x0880 in hexadecimal). Specifically, the upper byte represents how many full sectors of health Mario has, and the lower byte represents what portion of the next sector Mario has. Thus, one sector is equivalent to 256 HP units. The number of sectors displayed is the truncated version of the actual number of sectors. The maximum health is 2176 HP units (8.5 sectors). Mario will die if he goes below 256 HP units (1 sector).
The variable that represents Mario’s HP is a short, which ranges from 0 to 2176 (or 0x0000 to 0x0880 in hexadecimal). Specifically, the upper byte represents how many full sectors of health Mario has, and the lower byte represents what portion of the next sector Mario has. Thus, one sector is equivalent to 256 HP units. The number of sectors displayed is the truncated version of the actual number of sectors. The maximum health is 2176 HP units (8.5 sectors). Mario will die if he goes below 256 HP units (1 sector).
218

edits

Navigation menu