![]() |
Routines |
| Prev: 42040 | Up: Map | Next: 42079 |
|
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 | 42053 | LD A,(24101) | Fetch the number of creatures from NumCreatures. | |
| 42056 | INC A | Increment A by one. | ||
| 42057 | RLCA | Rotate left four times. | ||
| 42058 | RLCA | |||
| 42059 | RLCA | |||
| 42060 | RLCA | |||
| 42061 | OR %00001111 | Set bits 0-3. | ||
| 42063 | AND %01111111 | Keep only bits 0-6. | ||
| 42065 | LD D,A | Keep the counter in D. | ||
| SoundsWeaponPop_Loop | 42066 | LD A,D | Fetch the counter. | |
| 42067 | XOR %00100000 | Flip bit 5. | ||
| 42069 | LD B,A | Keep the half period in B. | ||
| 42070 | CALL SoundsClick | Play a click with SoundsClick. | ||
| 42073 | DEC D | Decrease the counter by one, and return if it is zero. | ||
| 42074 | RET Z | |||
| 42075 | DEC D | Decrease the counter by one again, and return if it is zero. | ||
| 42076 | RET Z | |||
| 42077 | JR SoundsWeaponPop_Loop | Jump back to SoundsWeaponPop_Loop. | ||
|
View the equivalent code in;
|
||||
| Prev: 42040 | Up: Map | Next: 42079 |