Prev: 29116 Up: Map Next: 29162
29131: Update Sprite Size
Used by the routine at MaskSprite.
Used by MaskSprite when all of the lines of the old sprite have been erased. If there are lines of the new sprite left then they are drawn, otherwise the number of lines left of both sprites is updated, so that the lines which stick out can be handled.
ActorUpdateSizeNext 29131 EXX Switch to the shadow registers (the new sprite).
29132 LD A,C A=C.
29133 AND A Test the number of lines left.
29134 JR NZ,MaskSprite_Draw Jump to MaskSprite_Draw if there are lines of the new sprite left to draw.
This entry point is used by the routine at DisplayEntity.
ActorUpdateSizeFlipReg 29136 EXX Switch to the normal registers.
This entry point is used by the routine at DisplayEntity.
ActorUpdateSize 29137 LD A,(24101) Fetch the number of lines left of the old sprite (CurrentSpriteHeight) and keep it in C.
29140 LD C,A
29141 LD A,(24102) Fetch the number of lines left of the new sprite (HeightLines).
29144 OR C Combine the lines left of the old sprite and the new sprite.
29145 RET Z Return if there are no lines left in either.
29146 XOR A Write 0 to CurrentSpriteHeight.
29147 LD (24101),A
29150 EXX Switch to the shadow registers.
29151 LD A,(24102) Fetch the number of lines left of the new sprite (HeightLines) and keep it in C.
29154 LD C,A
29155 XOR A Set A to 0.
This entry point is used by the routine at DisplayEntity.
ActorUpdateHeightAndMask 29156 LD (24102),A Write the number of lines left of the new sprite to HeightLines.
29159 EXX Switch to the normal registers.
29160 JR MaskSprite Jump to MaskSprite.
Prev: 29116 Up: Map Next: 29162