![]() |
Routines |
| Prev: A438 | Up: Map | Next: A45F |
|
Used by the routine at HandlerWeapon.
Plays a run of clicks. The number of clicks comes from NumCreatures, and the counter goes down by two each time.
|
||||
| SoundsWeaponPop | A445 | LD A,($5E25) | Fetch the number of creatures from NumCreatures. | |
| A448 | INC A | Increment A by one. | ||
| A449 | RLCA | Rotate left four times. | ||
| A44A | RLCA | |||
| A44B | RLCA | |||
| A44C | RLCA | |||
| A44D | OR %00001111 | Set bits 0-3. | ||
| A44F | AND %01111111 | Keep only bits 0-6. | ||
| A451 | LD D,A | Keep the counter in D. | ||
| SoundsWeaponPop_Loop | A452 | LD A,D | Fetch the counter. | |
| A453 | XOR %00100000 | Flip bit 5. | ||
| A455 | LD B,A | Keep the half period in B. | ||
| A456 | CALL SoundsClick | Play a click with SoundsClick. | ||
| A459 | DEC D | Decrease the counter by one, and return if it is zero. | ||
| A45A | RET Z | |||
| A45B | DEC D | Decrease the counter by one again, and return if it is zero. | ||
| A45C | RET Z | |||
| A45D | JR SoundsWeaponPop_Loop | Jump back to SoundsWeaponPop_Loop. | ||
|
View the equivalent code in;
|
||||
| Prev: A438 | Up: Map | Next: A45F |