![]() |
Routines |
Prev: 59874 | Up: Map | Next: 60165 |
Used by the routines at AllTreasureCollected, Handler_Explosion, Handler_Bomb, Handler_DisappearingFloors, Handler_Items, Handler_UnlockDoor, Handler_KeysAndLockedDoors and Handler_PortHole.
|
||||||||||||||||
PrintSprite | 60051 | PUSH HL | Stash HL on the stack. | |||||||||||||
60052 | DEC A | Decrease A by one. | ||||||||||||||
60053 | LD (62262),A | Write A to *ActiveSpriteID. | ||||||||||||||
60056 | LD A,E | Write E to *ActiveSpriteWidth. | ||||||||||||||
60057 | LD (62261),A | |||||||||||||||
PrintSprite_0 | 60060 | LD A,C | Jump to PrintSprite_3 if C is lower than 2. | |||||||||||||
60061 | CP 2 | |||||||||||||||
60063 | JP C,PrintSprite_3 | |||||||||||||||
60066 | LD A,(62261) | E=*ActiveSpriteWidth. | ||||||||||||||
60069 | LD E,A | |||||||||||||||
60070 | LD A,C | Jump to PrintSprite_5 if C is higher than 34. | ||||||||||||||
60071 | CP 34 | |||||||||||||||
60073 | JP NC,PrintSprite_5 | |||||||||||||||
PrintSprite_1 | 60076 | PUSH BC | Stash BC and DE on the stack. | |||||||||||||
60077 | PUSH DE | |||||||||||||||
60078 | CALL 3545 | Call CL_SET. | ||||||||||||||
60081 | POP DE | Restore DE from the stack. | ||||||||||||||
PrintSprite_2 | 60082 | LD A,(62262) | Increment *ActiveSpriteID by one. | |||||||||||||
60085 | INC A | |||||||||||||||
60086 | LD (62262),A | |||||||||||||||
60089 | CALL PrintColourCharacter | Call PrintColourCharacter. | ||||||||||||||
60092 | LD A,C | Call PrintSprite_4 if C is equal to 2. | ||||||||||||||
60093 | CP 2 | |||||||||||||||
60095 | CALL Z,PrintSprite_4 | |||||||||||||||
60098 | DEC C | Decrease C by one. | ||||||||||||||
60099 | DEC E | Decrease E by one. | ||||||||||||||
60100 | JR NZ,PrintSprite_2 | Jump to PrintSprite_2 until E is zero. | ||||||||||||||
60102 | POP BC | Restore BC from the stack. | ||||||||||||||
60103 | DEC D | Decrease D by one. | ||||||||||||||
60104 | JR Z,PrintSprite_3 | Jump to PrintSprite_3 if D is zero. | ||||||||||||||
60106 | DEC B | Decrease B by one. | ||||||||||||||
60107 | JR PrintSprite_0 | Jump to PrintSprite_0. | ||||||||||||||
PrintSprite_3 | 60109 | POP HL | Restore HL from the stack. | |||||||||||||
60110 | RET | Return. | ||||||||||||||
PrintSprite_4 | 60111 | DEC E | Decrease E by one. | |||||||||||||
60112 | PUSH AF | Stash AF on the stack. | ||||||||||||||
60113 | INC E | Increment E by one. | ||||||||||||||
60114 | LD A,(62262) | Increment *ActiveSpriteID by one. | ||||||||||||||
60117 | INC A | |||||||||||||||
60118 | LD (62262),A | |||||||||||||||
60121 | POP AF | Restore AF from the stack. | ||||||||||||||
60122 | RET Z | Return if *ActiveSpriteID is zero. | ||||||||||||||
60123 | DEC E | Decrease E by one. | ||||||||||||||
60124 | JR PrintSprite_4 | Jump to PrintSprite_4. | ||||||||||||||
PrintSprite_5 | 60126 | LD A,(62262) | Increment *ActiveSpriteID by one. | |||||||||||||
60129 | INC A | |||||||||||||||
60130 | LD (62262),A | |||||||||||||||
60133 | DEC E | Decrease E by one. | ||||||||||||||
60134 | JP Z,PrintSprite_3 | Jump to PrintSprite_3 if E is zero. | ||||||||||||||
60137 | DEC C | Decrease C by one. | ||||||||||||||
60138 | LD A,C | Jump to PrintSprite_1 if C is higher than 34. | ||||||||||||||
60139 | CP 34 | |||||||||||||||
60141 | JR NC,PrintSprite_1 | |||||||||||||||
60143 | JR PrintSprite_5 | Jump to PrintSprite_5. | ||||||||||||||
60145 | LD B,24 | Clear the bottom 24 lines using CL_LINE. | ||||||||||||||
60147 | CALL 3652 | |||||||||||||||
60150 | LD BC,1600 | BC=1600. | ||||||||||||||
60153 | LD HL,41412 | HL=BufferRoom. | ||||||||||||||
PrintSprite_6 | 60156 | XOR A | Write 0 to *HL. | |||||||||||||
60157 | LD (HL),A | |||||||||||||||
60158 | INC HL | Increment HL by one. | ||||||||||||||
60159 | DEC BC | Decrease BC by one. | ||||||||||||||
60160 | LD A,B | Jump to PrintSprite_6 until BC is zero. | ||||||||||||||
60161 | OR C | |||||||||||||||
60162 | JR NZ,PrintSprite_6 | |||||||||||||||
60164 | RET | Return. |
Prev: 59874 | Up: Map | Next: 60165 |