Prev: 28823 Up: Map Next: 28850
28845: Get Visible Height
Used by the routines at PrepareOldSprite and PrepareActorSprite.
Works out how many lines of a sprite can be drawn upwards from a position without reaching the top row of the screen (which is not part of the play area).
Input
H Y position of the sprite
Output
C Number of lines
GetVisibleHeight 28845 LD A,H Fetch the Y position of the sprite.
28846 SUB 8 Take 8 away, as the top row of the screen is not part of the play area.
28848 LD C,A Keep the number of lines that can be drawn in C.
28849 RET Return.
Prev: 28823 Up: Map Next: 28850