![]() |
Routines |
| Prev: 53150 | Up: Map | Next: 53202 |
|
Used by the routine at RunHelperSource.
Tests if either of the two projectiles of the player touches an object.
|
||||||||||||
|
Test the first projectile.
|
||||||||||||
| TestProjectileHit | 53170 | LD D,1 | Set the result to 1, as nothing has been hit. | |||||||||
| 53172 | LD IY,42927 | Start with the first of the projectiles, ObjectsTable_Projectiles. | ||||||||||
| 53176 | LD A,(IY+0) | Fetch the type of the projectile. | ||||||||||
| 53179 | AND %11111000 | Keep only the bits of the type that tell the kinds of object apart. | ||||||||||
| 53181 | CALL TestCreatureHit_Projectile | Call TestCreatureHit_Projectile to test it, as long as there is a projectile. | ||||||||||
| 53184 | LD A,D | Fetch the result. | ||||||||||
| 53185 | AND A | Return if the projectile touches the object. | ||||||||||
| 53186 | RET Z | |||||||||||
|
Test the second projectile.
|
||||||||||||
| 53187 | LD IY,42959 | Move on to the second of the projectiles, ObjectsTable_SecondProjectile. | ||||||||||
| 53191 | LD A,(IY+0) | Fetch the type of the projectile. | ||||||||||
| 53194 | AND %11111000 | Keep only the bits of the type that tell the kinds of object apart. | ||||||||||
| 53196 | CALL TestCreatureHit_Test | Call TestCreatureHit_Test to test it. | ||||||||||
| 53199 | LD A,D | Fetch the result. | ||||||||||
| 53200 | AND A | Test it. | ||||||||||
| 53201 | RET | Return. | ||||||||||
| Prev: 53150 | Up: Map | Next: 53202 |