Routines 
Prev: D688  Up: Map  Next: D7F6 
Used by the routines at DrawMonsterSprite, D9C3, Handler_Helicopters, Draw_Human_Sprite_Mirrored, Handler_Bullets, Animate_TransformExplosion, Animate_TurnIntoHuman, Animate_ExitStageRight, Something_Helicopter, Handler_Projectiles, Audio_Projectiles_Hit, Handler_CollisionMonsters, Scene_DisplayCarpet, Handler_Vehicle and Handler_Train.


PrintSprite  D6C9  LD ($D214),A  Write A to *D214.  
D6CC  PUSH BC  Stash BC on the stack.  
D6CD  CALL InitialiseSprite  Call InitialiseSprite.  
D6D0  POP BC  Restore BC from the stack.  
D6D1  LD D,A  D=A.  
D6D2  LD A,($D247)  A=*Flag_Orientation.  
Moves the orientation flag into the carry flag.


D6D5  RRCA  Rotate A right one position, setting the carry flag if bit 0 was set.  
D6D6  JP C,PrintSprite_Mirrored_0  Jump to PrintSprite_Mirrored_0 if the carry flag is set.  
D6D9  EX AF,AF'  Exchange the AF register with the shadow AF register.  
D6DA  LD E,A  E=A.  
D6DB  LD L,C  L=C.  
D6DC  EXX  Switch to the shadow registers.  
D6DD  LD A,(HL)  A=*HL.  
D6DE  INC HL  Increment HL by one.  
D6DF  LD H,(HL)  H=*HL.  
D6E0  LD L,A  L=A.  
PrintSprite_0  D6E1  EXX  Switch back to the normal registers.  
D6E2  LD A,C  Jump to PrintSprite_1 if C is not equal to L.  
D6E3  CP L  
D6E4  JP NZ,PrintSprite_1  
D6E7  LD A,B  A=B.  
D6E8  AND %11111000  Keep only bits 37.  
D6EA  ADD A,$6B  A+=6B.  
D6EC  LD H,A  H=A.  
D6ED  EX AF,AF'  Exchange the AF register with the shadow AF register.  
D6EE  LD A,B  A=B.  
D6EF  AND %00000111  Keep only bits 02.  
D6F1  RRCA  RRCA.  
D6F2  RRCA  
D6F3  RRCA  
D6F4  ADD A,C  A+=C.  
D6F5  EXX  Switch to the shadow registers.  
D6F6  LD C,A  C=A.  
D6F7  EX AF,AF'  Exchange the AF register with the shadow AF register.  
D6F8  LD B,A  B=A.  
D6F9  JP PrintSprite_2  Jump to PrintSprite_2.  
PrintSprite_1  D6FC  LD A,H  A=H.  
D6FD  EXX  Switch back to the normal registers.  
D6FE  INC C  Increment C by one.  
D6FF  LD B,A  B=A.  
PrintSprite_2  D700  EXX  Switch to the shadow registers.  
D701  LD A,C  A=C.  
D702  CP $20  Jump to PrintSprite_6 if A is higher than 20.  
D704  JP NC,PrintSprite_6  
D707  LD A,B  A=B.  
D708  CP $18  Jump to PrintSprite_6 if A is higher than 18.  
D70A  JP NC,PrintSprite_6  
D70D  EXX  Switch back to the normal registers.  
D70E  LD A,(HL)  Jump to PrintSprite_5 if *HL is equal to 36.  
D70F  CP $36  
D711  JP Z,PrintSprite_5  
D714  LD A,(DE)  Jump to PrintSprite_8 if *DE is equal to 36.  
D715  CP $36  
D717  JP Z,PrintSprite_8  
D71A  INC HL  Increment HL by one.  
D71B  INC DE  Increment DE by one.  
D71C  LD A,(BC)  A=*BC.  
D71D  AND (HL)  Merge the bits from *HL.  
D71E  EX DE,HL  Exchange the DE and HL registers.  
D71F  OR (HL)  Set the bits from *HL.  
D720  EX DE,HL  Exchange the DE and HL registers.  
D721  LD (BC),A  Write A to *BC.  
D722  INC DE  Increment DE by one.  
D723  INC HL  Increment HL by one.  
D724  INC B  Increment B by one.  
D725  LD A,(BC)  A=*BC.  
D726  AND (HL)  Merge the bits from *HL.  
D727  EX DE,HL  Exchange the DE and HL registers.  
D728  OR (HL)  Set the bits from *HL.  
D729  EX DE,HL  Exchange the DE and HL registers.  
D72A  LD (BC),A  Write A to *BC.  
D72B  INC DE  Increment DE by one.  
D72C  INC HL  Increment HL by one.  
D72D  INC B  Increment B by one.  
D72E  LD A,(BC)  A=*BC.  
D72F  AND (HL)  Merge the bits from *HL.  
D730  EX DE,HL  Exchange the DE and HL registers.  
D731  OR (HL)  Set the bits from *HL.  
D732  EX DE,HL  Exchange the DE and HL registers.  
D733  LD (BC),A  Write A to *BC.  
D734  INC DE  Increment DE by one.  
D735  INC HL  Increment HL by one.  
D736  INC B  Increment B by one.  
D737  LD A,(BC)  A=*BC.  
D738  AND (HL)  Merge the bits from *HL.  
D739  EX DE,HL  Exchange the DE and HL registers.  
D73A  OR (HL)  Set the bits from *HL.  
D73B  EX DE,HL  Exchange the DE and HL registers.  
D73C  LD (BC),A  Write A to *BC.  
D73D  INC DE  Increment DE by one.  
D73E  INC HL  Increment HL by one.  
D73F  INC B  Increment B by one.  
D740  LD A,(BC)  A=*BC.  
D741  AND (HL)  Merge the bits from *HL.  
D742  EX DE,HL  Exchange the DE and HL registers.  
D743  OR (HL)  Set the bits from *HL.  
D744  EX DE,HL  Exchange the DE and HL registers.  
D745  LD (BC),A  Write A to *BC.  
D746  INC DE  Increment DE by one.  
D747  INC HL  Increment HL by one.  
D748  INC B  Increment B by one.  
D749  LD A,(BC)  A=*BC.  
D74A  AND (HL)  Merge the bits from *HL.  
D74B  EX DE,HL  Exchange the DE and HL registers.  
D74C  OR (HL)  Set the bits from *HL.  
D74D  EX DE,HL  Exchange the DE and HL registers.  
D74E  LD (BC),A  Write A to *BC.  
D74F  INC DE  Increment DE by one.  
D750  INC HL  Increment HL by one.  
D751  INC B  Increment B by one.  
D752  LD A,(BC)  A=*BC.  
D753  AND (HL)  Merge the bits from *HL.  
D754  EX DE,HL  Exchange the DE and HL registers.  
D755  OR (HL)  Set the bits from *HL.  
D756  EX DE,HL  Exchange the DE and HL registers.  
D757  LD (BC),A  Write A to *BC.  
D758  INC DE  Increment DE by one.  
D759  INC HL  Increment HL by one.  
D75A  INC B  Increment B by one.  
D75B  LD A,(BC)  A=*BC.  
D75C  AND (HL)  Merge the bits from *HL.  
D75D  EX DE,HL  Exchange the DE and HL registers.  
D75E  OR (HL)  Set the bits from *HL.  
D75F  EX DE,HL  Exchange the DE and HL registers.  
D760  LD (BC),A  Write A to *BC.  
D761  CALL $D986  Call D986.  
PrintSprite_3  D764  INC DE  Increment DE by one.  
D765  INC HL  Increment HL by one.  
PrintSprite_4  D766  EXX  Switch to the shadow registers.  
D767  INC C  Increment C by one.  
D768  LD A,E  Compare E with C...  
D769  CP C  
D76A  EXX  Switch back to the normal registers.  
D76B  JP NZ,PrintSprite_0  Jump to PrintSprite_0 if E is not equal to C on line D768.  
D76E  EXX  Switch to the shadow registers.  
D76F  LD C,L  C=L.  
D770  INC B  Increment B by one.  
D771  LD A,D  Compare D with B...  
D772  CP B  
D773  EXX  Switch back to the normal registers.  
D774  JP NZ,PrintSprite_0  Jump to PrintSprite_0 if D is not equal to B on line D771.  
D777  RET  Return.  
PrintSprite_5  D778  LD A,(DE)  Jump to PrintSprite_3 if *DE is equal to 36.  
D779  CP $36  
D77B  JP Z,PrintSprite_3  
D77E  INC DE  Increment DE by one.  
D77F  INC HL  Increment HL by one.  
D780  LD A,(DE)  A=*DE.  
D781  LD (BC),A  Write A to *BC.  
D782  INC DE  Increment DE by one.  
D783  INC B  Increment B by one.  
D784  LD A,(DE)  A=*DE.  
D785  LD (BC),A  Write A to *BC.  
D786  INC DE  Increment DE by one.  
D787  INC B  Increment B by one.  
D788  LD A,(DE)  A=*DE.  
D789  LD (BC),A  Write A to *BC.  
D78A  INC DE  Increment DE by one.  
D78B  INC B  Increment B by one.  
D78C  LD A,(DE)  A=*DE.  
D78D  LD (BC),A  Write A to *BC.  
D78E  INC DE  Increment DE by one.  
D78F  INC B  Increment B by one.  
D790  LD A,(DE)  A=*DE.  
D791  LD (BC),A  Write A to *BC.  
D792  INC DE  Increment DE by one.  
D793  INC B  Increment B by one.  
D794  LD A,(DE)  A=*DE.  
D795  LD (BC),A  Write A to *BC.  
D796  INC DE  Increment DE by one.  
D797  INC B  Increment B by one.  
D798  LD A,(DE)  A=*DE.  
D799  LD (BC),A  Write A to *BC.  
D79A  INC DE  Increment DE by one.  
D79B  INC B  Increment B by one.  
D79C  LD A,(DE)  A=*DE.  
D79D  LD (BC),A  Write A to *BC.  
D79E  INC DE  Increment DE by one.  
D79F  CALL $D986  Call D986.  
D7A2  JP PrintSprite_4  Jump to PrintSprite_4.  
PrintSprite_6  D7A5  EXX  Switch to the shadow registers.  
D7A6  LD A,(DE)  A=*DE.  
D7A7  INC DE  Increment DE by one.  
D7A8  CP $36  Jump to PrintSprite_7 if A is equal to 36.  
D7AA  JP Z,PrintSprite_7  
D7AD  INC DE  Increment DE by eight.  
D7AE  INC DE  
D7AF  INC DE  
D7B0  INC DE  
D7B1  INC DE  
D7B2  INC DE  
D7B3  INC DE  
D7B4  INC DE  
PrintSprite_7  D7B5  LD A,(HL)  A=*HL.  
D7B6  INC HL  Increment HL by one.  
D7B7  CP $36  Jump to PrintSprite_4 if A is equal to 36.  
D7B9  JP Z,PrintSprite_4  
D7BC  INC HL  Increment HL by eight.  
D7BD  INC HL  
D7BE  INC HL  
D7BF  INC HL  
D7C0  INC HL  
D7C1  INC HL  
D7C2  INC HL  
D7C3  INC HL  
D7C4  JP PrintSprite_4  Jump to PrintSprite_4.  
PrintSprite_8  D7C7  INC DE  Increment DE by one.  
D7C8  INC HL  Increment HL by one.  
D7C9  LD A,(BC)  A=*BC.  
D7CA  AND (HL)  Merge the bits from *HL.  
D7CB  LD (BC),A  Write A to *BC.  
D7CC  INC HL  Increment HL by one.  
D7CD  INC B  Increment B by one.  
D7CE  LD A,(BC)  A=*BC.  
D7CF  AND (HL)  Merge the bits from *HL.  
D7D0  LD (BC),A  Write A to *BC.  
D7D1  INC HL  Increment HL by one.  
D7D2  INC B  Increment B by one.  
D7D3  LD A,(BC)  A=*BC.  
D7D4  AND (HL)  Merge the bits from *HL.  
D7D5  LD (BC),A  Write A to *BC.  
D7D6  INC HL  Increment HL by one.  
D7D7  INC B  Increment B by one.  
D7D8  LD A,(BC)  A=*BC.  
D7D9  AND (HL)  Merge the bits from *HL.  
D7DA  LD (BC),A  Write A to *BC.  
D7DB  INC HL  Increment HL by one.  
D7DC  INC B  Increment B by one.  
D7DD  LD A,(BC)  A=*BC.  
D7DE  AND (HL)  Merge the bits from *HL.  
D7DF  LD (BC),A  Write A to *BC.  
D7E0  INC HL  Increment HL by one.  
D7E1  INC B  Increment B by one.  
D7E2  LD A,(BC)  A=*BC.  
D7E3  AND (HL)  Merge the bits from *HL.  
D7E4  LD (BC),A  Write A to *BC.  
D7E5  INC HL  Increment HL by one.  
D7E6  INC B  Increment B by one.  
D7E7  LD A,(BC)  A=*BC.  
D7E8  AND (HL)  Merge the bits from *HL.  
D7E9  LD (BC),A  Write A to *BC.  
D7EA  INC HL  Increment HL by one.  
D7EB  INC B  Increment B by one.  
D7EC  LD A,(BC)  A=*BC.  
D7ED  AND (HL)  Merge the bits from *HL.  
D7EE  LD (BC),A  Write A to *BC.  
D7EF  INC HL  Increment HL by one.  
D7F0  CALL $D986  Call D986.  
D7F3  JP PrintSprite_4  Jump to PrintSprite_4. 
Prev: D688  Up: Map  Next: D7F6 